<?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 Truths &#187; Database Hacking</title>
	<atom:link href="http://www.hungry-hackers.com/category/database-hacking/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hungry-hackers.com</link>
	<description>Hacking is fun, If you are a &#34;Hacker&#34;!</description>
	<lastBuildDate>Wed, 11 Jan 2012 19:43:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Are you Vulnerable to Shell or SQL Injection?</title>
		<link>http://www.hungry-hackers.com/2008/11/are-you-vulnerable-to-shell-or-sql-injection.html</link>
		<comments>http://www.hungry-hackers.com/2008/11/are-you-vulnerable-to-shell-or-sql-injection.html#comments</comments>
		<pubDate>Sun, 23 Nov 2008 09:17:24 +0000</pubDate>
		<dc:creator>Ashik</dc:creator>
				<category><![CDATA[Cracking]]></category>
		<category><![CDATA[Database Hacking]]></category>
		<category><![CDATA[Hacking Tutorials]]></category>
		<category><![CDATA[Hardcore Hacking]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Attack]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Injection]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Vulnerabilities]]></category>

		<guid isPermaLink="false">http://www.hungry-hackers.com/?p=380</guid>
		<description><![CDATA[Injection attacks can be very easy to discover and exploit, but they can also be extremely obscure. The consequences can also run the entire range of severity, from trivial to complete system compromise or destruction. In any case, the use of external calls is quite widespread, so the likelihood of a web application having a command injection flaw should be considered high.]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Injection flaws allow attackers to relay malicious code through a web application to another system. These attacks include calls to the operating system via system calls, the use of external programs via shell commands, as well as calls to backend databases via SQL (i.e., SQL injection). Whole scripts written in perl, python, and other languages can be injected into poorly designed web applications and executed. Any time a web application uses an interpreter of any type there is a danger of an injection attack.</p>
<p style="text-align: justify;">Injection attacks can be very easy to discover and exploit, but they can also be extremely obscure. The consequences can also run the entire range of severity, from trivial to complete system compromise or destruction. In any case, the use of external calls is quite widespread, so the likelihood of a web application having a command injection flaw should be considered high.</p>
<p style="text-align: justify;"><strong>Shell Commands</strong></p>
<p style="text-align: justify;"><span lang="en-US">Many web applications use operating system features and external programs to perform their functions. Sendmail is probably the most frequently invoked external program, but many other programs are used as well. When a web application passes information from an HTTP request through to the command line, it must be carefully scrubbed. This also applies when opening files in the file system. Otherwise, the attacker can inject special (meta) characters, malicious commands, or command modifiers into the information and the web application will blindly pass these on to the external system for execution.</span></p>
<p style="text-align: justify;"><span lang="en-US"><strong>SQL</strong></span></p>
<p style="text-align: justify;"><span lang="en-US">SQL injection is a particularly widespread and dangerous form of attack. To exploit a SQL injection flaw, the attacker must find a parameter that the web application passes through to a database. By carefully embedding malicious SQL commands into the content of the parameter, the attacker can trick the web application into forwarding a malicious query to the database. These attacks are not difficult to attempt and more tools are emerging that scan for these flaws. The consequences are particularly damaging, as an attacker can obtain, corrupt, or destroy database contents.</span></p>
<h4 style="text-align: justify;">Environments Affected</h4>
<p style="text-align: justify;">Every web application environment allows the execution of external commands such as system calls, shell commands, and SQL requests. The susceptibility of an external call to command injection depends on how the call is made and the specific component that is being called, but almost all external calls can be attacked if the web application is not properly coded.</p>
<p style="text-align: justify;">Some environment specific considerations:</p>
<ul style="text-align: justify;">
<li>MySQL &#8211; 	older mysql libraries only processes one statement at a time when 	you pass it a query. Newer mysql libraries (e.g., mysql in PHP) 	will process multiple SQL commands in one query</li>
<li>Oracle &#8211; 	most Oracle client libraries support variable binding. This is the 	best way to avoid SQL injection.</li>
<li>Perl &#8211; 	check for shell injection when you open a file if the filename is 	derived from user input</li>
</ul>
<h4 style="text-align: justify;">Examples:</h4>
<ul style="text-align: justify;">
<li>
<p style="margin-top: 0.03in; margin-bottom: 0.08in;">A malicious 	parameter could modify the actions taken by a system call that 	normally retrieves the current user&#8217;s file to access another 	user&#8217;s file (e.g., by including path traversal &#8220;../&#8221; 	characters as part of a filename request).</p>
</li>
<li>
<p style="margin-top: 0.03in; margin-bottom: 0.08in;">Additional 	commands could be tacked on to the end of a parameter that is passed 	to a shell script to execute an additional shell command (e.g., &#8220;; 	rm -r *&#8221;) along with the intended command.</p>
</li>
<li>
<p style="margin-top: 0.03in; margin-bottom: 0.08in; page-break-inside: avoid;">SQL queries could be modified by adding additional &#8216;constraints&#8217; 	to a where clause (e.g., &#8220;OR 1=1&#8243;) to gain access to or modify 	unauthorized data.</p>
</li>
</ul>
<blockquote style="text-align: justify;"><p><strong>Example:</strong></p>
<ul> DELETE FROM CRITICALTABLE WHERE USER=&#8217;$VAR&#8217;</ul>
<p>where the user enters</p>
<ul> HACKER&#8217; OR &#8217;1&#8242;=&#8217;1</ul>
<p>Notice the mismatched quotes! Inserting this into the 	SQL statement, we&#8217;d get:</p>
<ul> DELETE FROM CRITICALTABLE WHERE USER=&#8217;BADGUY&#8217; OR &#8217;1&#8242;=&#8217;1&#8242;</ul>
<p>This would delete all the information in the critical table.</p></blockquote>
<h4 style="text-align: justify;">How to Determine If You Are Vulnerable</h4>
<p style="text-align: justify;">The best way to determine if you are vulnerable to command line or SQL injection attacks is to search the source code for all calls to external resources (e.g., system, exec, fork, Runtime.exec, SQL queries, or whatever the syntax is for making requests to interpreters in your environment). Note that many languages have multiple ways to run external commands. Developers should review their code and search for all places where input from an HTTP request could possibly make its way into any of these calls. You should carefully examine each of these calls to be sure that the protection steps outlined below are followed.</p>
<h4 style="text-align: justify;">How to Protect Yourself</h4>
<p style="text-align: justify;">The simplest way to protect against injection is to avoid accessing external interpreters wherever possible. For many shell commands and some system calls, there are language specific libraries that perform the same functions. Using such libraries does not involve the operating system shell interpreter, and therefore avoids a large number of problems with shell commands.</p>
<ul style="text-align: justify;">
<li>Use bind variables where ever possible. If 	not, escape all user variables which be used in a SQL statement or 	on the command line.</li>
<li>In Coldfusion, use variable binding by using 	the CFQueryParam Tag within your CFQuery tags.</li>
<li>In Perl, prepare your statements using 	variable binding and then pass the parameters when executing the 	query:
<ul> $cursor = $db-&gt;prepare(&#8220;DELETE FROM CRITICALTABLE WHERE USER=?&#8221;);<br />
$cursor-&gt;execute($user);</ul>
</li>
<li>Use pattern matching to verify user input is 	an expected value. If input is not what is expected, throw an error. 	Error messages should be generic.  <a href="http://www.upenn.edu/computing/security/swat/SWAT_Top_Ten_A7.php"></a></li>
<li>Turn off/control debug messages to avoid 	giving an attacker potentially useful information.</li>
<li>Database level: Limit access to the web 	account that is accessing the database.  Write procedures to 	insert records and update data rather than give the application 	direct access to the tables;  Limit application to READ-only 	access where possible &#8211; at user level as well as database level.</li>
<li>Reuse previously tested code wherever 	possible.</li>
</ul>
<p style="text-align: justify;">For those calls that you must still employ, such as calls to backend databases, you must carefully validate the data provided to ensure that it does not contain any malicious content. You can also structure many requests in a manner that ensures that all supplied parameters are treated as data, rather than potentially executable content. The use of stored procedures or prepared statements will provide significant protection, ensuring that supplied input is treated as data. These measures will reduce, but not completely eliminate the risk involved in these external calls. You still must always validate such input to make sure it meets the expectations of the application in question.</p>
<p style="text-align: justify;">Another strong protection against command injection is to ensure that the web application runs with only the privileges it absolutely needs to perform its function. So you should not run the webserver as root or access a database as DBADMIN, otherwise an attacker can abuse these administrative privileges granted to the web application. Some of the J2EE environments allow the use of the Java sandbox, which can prevent the execution of system commands.</p>
<p style="text-align: justify;">If an external command must be used, any user information that is being inserted into the command should be rigorously checked. Mechanisms should be put in place to handle any possible errors, timeouts, or blockages during the call.</p>
<p style="text-align: justify;">All output, return codes and error codes from the call should be checked to ensure that the expected processing actually occurred. At a minimum, this will allow you to determine that something has gone wrong. Otherwise, the attack may occur and never be detected.</p>
<p style="text-align: justify;">The OWASP Filters project is producing reusable components in several languages to help prevent many forms of injection. OWASP has also released CodeSeeker, an application level firewall.</p>
<img src="http://www.hungry-hackers.com/?ak_action=api_record_view&id=380&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.hungry-hackers.com/2008/11/are-you-vulnerable-to-shell-or-sql-injection.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Top 15 SQL Injection Scanners</title>
		<link>http://www.hungry-hackers.com/2008/10/top-15-sql-injection-scanners.html</link>
		<comments>http://www.hungry-hackers.com/2008/10/top-15-sql-injection-scanners.html#comments</comments>
		<pubDate>Fri, 03 Oct 2008 17:47:03 +0000</pubDate>
		<dc:creator>Ashik</dc:creator>
				<category><![CDATA[Cool Tricks]]></category>
		<category><![CDATA[Cracking]]></category>
		<category><![CDATA[Database Hacking]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Hacking]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Tips n Tricks]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Injection]]></category>
		<category><![CDATA[Scanner]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Softwares]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.hungry-hackers.com/?p=356</guid>
		<description><![CDATA[Web applications allow visitors to submit and retrieve data to/from a database over the Internet. Databases are the heart of most web applications. They hold data needed for web applications to deliver specific content to visitors and provide information to customers, suppliers etc.

SQL Injection is perhaps the most common web-application hacking technique which attempts to pass SQL commands through a web application for execution by the back-end database. The vulnerability is presented when user input is incorrectly sanitized and thereby executed.]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">If you are not aware of SQL Injection Attack and How it works you need to read my previous article &#8220;<a rel="bookmark" href="http://www.hungry-hackers.com/2008/01/top-10-tricks-to-exploit-sql-server-systems.html">Top 10 Tricks to exploit SQL Server Systems</a>&#8221; .</p>
<p style="text-align: justify;">While the adoption of web applications for conducting online business has enabled companies to connect seamlessly with their customers, it has also exposed a number of security concerns stemming from improper coding. Vulnerabilities in web applications allow hackers to gain direct and public access to sensitive information (e.g. personal data, login credentials).</p>
<p style="text-align: justify;">Web applications allow visitors to submit and retrieve data to/from a database over the Internet. Databases are the heart of most web applications. They hold data needed for web applications to deliver specific content to visitors and provide information to customers, suppliers etc.</p>
<p style="text-align: justify;"><strong>SQL Injection</strong> is perhaps the most common web-application hacking technique which attempts to pass SQL commands through a web application for execution by the back-end database. The vulnerability is presented when user input is incorrectly sanitized and thereby executed.</p>
<p style="text-align: justify;">Checking for <strong>SQL Injection</strong> vulnerabilities involves auditing your web applications and the best way to do it is by using automated SQL Injection Scanners. We’ve compiled a list of free <strong>SQL Injection Scanners</strong> we believe will be of a value to both web application developers and professional security auditors.</p>
<p style="text-align: justify;"><strong>SQLIer</strong> &#8211; SQLIer takes a vulnerable URL and attempts to determine all the necessary information to exploit the SQL Injection vulnerability by itself, requiring no user interaction at all. <a href="http://bcable.net/project.php?sqlier" target="_blank">Get SQLIer</a>.</p>
<p style="text-align: justify;"><strong>SQLbftools</strong> &#8211;  SQLbftools is a collection of tools to retrieve MySQL information available using a blind SQL Injection attack. <a href="http://www.reversing.org/node/view/11" target="_blank">Get SQLbftools</a>.</p>
<p style="text-align: justify;"><strong>SQL Injection Brute-forcer</strong> &#8211; SQLibf is a tool for automatizing the work of detecting and exploiting SQL Injection vulnerabilities. SQLibf can work in Visible and Blind SQL Injection. It works by doing simple logic SQL operations to determine the exposure level of the vulnerable application. <a href="http://www.open-labs.org/sqlibf19beta1.tar.gz" target="_blank">Get SQLLibf</a>.</p>
<p style="text-align: justify;"><strong>SQLBrute</strong> &#8211; SQLBrute is a tool for brute forcing data out of databases using blind SQL injection vulnerabilities. It supports time based and error based exploit types on Microsoft SQL Server, and error based exploit on Oracle. It is written in Python, uses multi-threading, and doesn’t require non-standard libraries. <a href="http://www.justinclarke.com/security/sqlbrute.py" target="_blank">Get SQLBrute</a>.</p>
<p style="text-align: justify;"><strong>BobCat</strong> &#8211; BobCat is a tool to aid an auditor in taking full advantage of SQL injection vulnerabilities. It is based on <a href="http://www.appsecinc.com/presentations/Manipulating_SQL_Server_Using_SQL_Injection.pdf" target="_blank">AppSecInc</a> research. It can list the linked severs, database schema, and allow the retrieval of data from any table that the current application user has access to. <a href="http://www.northern-monkee.co.uk/projects/bobcat/bobcat.html" target="_blank">Get BobCat</a>.</p>
<p style="text-align: justify;"><strong>SQLMap</strong> &#8211; SQLMap is an automatic blind SQL injection tool, developed in python, capable to perform an active database management system fingerprint, enumerate entire remote databases and much more. The aim of SQLMap is to implement a fully functional database management system tool which takes advantages of web application programming security flaws which lead to SQL injection vulnerabilities. <a href="http://sqlmap.sourceforge.net/" target="_blank">Get SQLMap</a>.</p>
<p style="text-align: justify;"><span class="style1"><strong>Absinthe</strong> &#8211; </span><span class="style1"> Absinthe is a GUI-based tool that automates the process of downloading the schema and contents of a database that is vulnerable to Blind SQL Injection. <a href="http://www.0x90.org/releases/absinthe/download.php" target="_blank">Get Absinthe</a>.</span></p>
<p style="text-align: justify;"><strong>SQL Injection Pen-testing Tool</strong> &#8211; <span style="color: #000000;">The SQL Injection Tool is a GUI-based utility designed to examine database through vulnerabilities in web-applications.</span> <a href="http://sqltool.itdefence.ru/indexeng.html" target="_blank">Get SQL Injection Pen-testing tool</a>.</p>
<p style="text-align: justify;"><span class="hd1"><strong>SQID</strong> &#8211; </span> SQL Injection digger (SQLID) is a command line program that looks for SQL injections and common errors in websites. It can perform the follwing operations: look for SQL injection in a web pages and test submit forms for possible SQL injection vulnerabilities. <a href="http://sqid.rubyforge.org/" target="_blank">Get SQID</a>.</p>
<p style="text-align: justify;"><strong>Blind SQL Injection Perl Tool</strong> &#8211;  	    bsqlbf is a Perl script that lets auditors retrieve information from web sites that are vulnerable to SQL Injection. <a href="http://www.unsec.net/download/bsqlbf.pl" target="_blank">Get Blind SQL Injection Perl Tool</a>.</p>
<p style="text-align: justify;"><strong>SQL Power <span style="text-decoration: line-through;">Injection</span> Injector</strong> &#8211; SQL Power Injection helps the penetration tester to inject SQL commands on a web page. It’s main strength is its capacity to automate tedious blind SQL injection with several threads. <a href="http://www.sqlpowerinjector.com/" target="_blank">Get SQL Power Injection</a>.</p>
<p style="text-align: justify;"><strong>FJ-Injector Framwork</strong> &#8211; FG-Injector is a free open source framework designed to help find SQL injection vulnerabilities in web applications. It includes a proxy feature for intercepting and modifying HTTP requests, and an interface for automating SQL injection exploitation. <a href="http://sourceforge.net/project/showfiles.php?group_id=183841" target="_blank">Get FJ-Injector Framework</a>.</p>
<p style="text-align: justify;"><strong>SQLNinja</strong> &#8211; SQLNinja is a tool to exploit SQL Injection vulnerabilities on a web application that uses Microsoft SQL Server as its back-end database. <a href="http://sqlninja.sourceforge.net/" target="_blank">Get SQLNinja</a>.</p>
<p style="text-align: justify;"><strong>Automagic SQL Injector</strong> &#8211; The Automagic SQL Injector is an automated SQL injection tool designed to help save time on penetration testing. It is only designed to work with vanilla Microsoft SQL injection holes where errors are returned. <a href="http://www.indianz.ch/tools/attack/automagic.zip" target="_blank">Get Automagic SQL Injector</a>.</p>
<p style="text-align: justify;"><strong>NGSS SQL Injector</strong> &#8211; NGSS SQL Injector exploit vulnerabilities in SQL injection on disparate database servers to gain access to stored data. It currently supports the following databases: Access, DB2, Informix, MSSQL, MySQL, Oracle, Sysbase. <a href="http://www.indianz.ch/tools/attack/sqlinjector.zip" target="_blank">Get NGSS SQL Injector</a>.</p>
<img src="http://www.hungry-hackers.com/?ak_action=api_record_view&id=356&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.hungry-hackers.com/2008/10/top-15-sql-injection-scanners.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>List of all the SQL Injection Strings</title>
		<link>http://www.hungry-hackers.com/2008/09/list-of-all-the-sql-injection-strings.html</link>
		<comments>http://www.hungry-hackers.com/2008/09/list-of-all-the-sql-injection-strings.html#comments</comments>
		<pubDate>Sun, 28 Sep 2008 06:27:58 +0000</pubDate>
		<dc:creator>Ashik</dc:creator>
				<category><![CDATA[Bad Boy]]></category>
		<category><![CDATA[Cool Tricks]]></category>
		<category><![CDATA[Cracking]]></category>
		<category><![CDATA[Database Hacking]]></category>
		<category><![CDATA[Hacking Tutorials]]></category>
		<category><![CDATA[Hardcore Hacking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Hacking]]></category>
		<category><![CDATA[Attack]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardcore]]></category>
		<category><![CDATA[Injection]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.hungry-hackers.com/?p=354</guid>
		<description><![CDATA[One of the major problems with SQL is its poor security issues surrounding is the login and url strings. This tutorial is not going to go into detail on why these string work as all these details have been given in my previous article Top 10 Tricks to exploit SQL Server Systems.]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">One of the major problems with SQL is its poor security issues surrounding is the login and url strings. This tutorial is not going to go into detail on why these string work as all these details have been given in my previous article <a title="Permanent Link: Top 10 Tricks to exploit SQL Server Systems" rel="bookmark" href="http://www.hungry-hackers.com/2008/01/top-10-tricks-to-exploit-sql-server-systems.html">Top 10 Tricks to exploit SQL Server Systems</a> .</p>
<p style="text-align: justify;">First SEARCH the following Keywords in Google or any Search Engine:</p>
<p style="text-align: justify;">admin\login.asp<br />
login.asp</p>
<p style="text-align: justify;">with these two search string you will have plenty of targets to chose from&#8230;choose one that is Vulnerable</p>
<p style="text-align: justify;"><strong>INJECTION STRINGS: How to use it?</strong></p>
<p style="text-align: justify;">This is the easiest part&#8230;very simple</p>
<p style="text-align: justify;">On the login page just enter something like</p>
<p style="text-align: justify;">user:admin (you dont even have to put this.)<br />
pass:&#8217; or 1=1&#8211;</p>
<p style="text-align: justify;">or</p>
<p style="text-align: justify;">user:&#8217; or 1=1&#8211;<br />
admin:&#8217; or 1=1&#8211;</p>
<p style="text-align: justify;">Some sites will have just a password so</p>
<p style="text-align: justify;">password:&#8217; or 1=1&#8211;</p>
<p style="text-align: justify;">In fact I have compiled a <a title="Combo List" href="#combolist" target="_self">combo list</a> with strings like this to use on my chosen targets . There are plenty of strings in the list below. There are many other strings involving for instance UNION table access via reading the error pages table structure thus an attack with this method will reveal eventually admin U\P paths.</p>
<p style="text-align: justify;">The one I am interested in are quick access to targets</p>
<p style="text-align: justify;"><strong>PROGRAM</strong></p>
<p style="text-align: justify;">i tried several programs to use with these search strings and upto now only Ares has peformed well with quite a bit of success with a combo list formatted this way. Yesteday I loaded 40 eastern targets with 18 positive hits in a few minutes how long would it take to go through 40 sites cutting and pasting each string</p>
<p style="text-align: justify;"><strong>combo example:</strong></p>
<p style="text-align: justify;">admin:&#8217; or a=a&#8211;<br />
admin:&#8217; or 1=1&#8211;</p>
<p style="text-align: justify;">And so on. You don&#8217;t have to be admin and still can do anything you want. The most important part is example:&#8217; or 1=1&#8211; this is our basic injection string</p>
<p style="text-align: justify;">Now the only trudge part is finding targets to exploit. So I tend to search say google for login.asp or whatever</p>
<p style="text-align: justify;">inurl:login.asp<br />
index of:/admin/login.asp</p>
<p style="text-align: justify;">like this: index of login.asp</p>
<p style="text-align: justify;">result:</p>
<p style="text-align: justify;"><a href="http://www3.google.com/search?hl=en&amp;ie=ISO...G=Google+Search" target="_blank"><span style="text-decoration: underline;"><span style="color: blue;">http://www3.google.com/search?hl=en&amp;ie=ISO&#8230;G=Google+Search</span></span></a></p>
<p style="text-align: justify;">17,000 possible targets trying various searches spews out plent more</p>
<p style="text-align: justify;">Now using proxy set in my browser I click through interesting targets. Seeing whats what on the site pages if interesting I then cut and paste URL as a possible target. After an hour or so you have a list of sites of potential targets like so</p>
<p style="text-align: justify;"><a href="http://www.somesite.com/login.asp" target="_blank"><span style="color: blue;"><span style="text-decoration: underline;">http://www.somesite.com/login.asp</span></span></a><br />
<a href="http://www.another.com/admin/login.asp" target="_blank"><span style="text-decoration: underline;"><span style="color: blue;">http://www.another.com/admin/login.asp</span></span></a></p>
<p style="text-align: justify;">and so on. In a couple of hours you can build up quite a list because I don&#8217;t select all results or spider for log in pages. I then save the list fire up Ares and enter</p>
<p style="text-align: justify;">1) A Proxy list<br />
2) My Target IP list<br />
3) My Combo list<br />
4) Start.</p>
<p style="text-align: justify;">Now I dont want to go into problems with users using Ares..thing is i know it works for me&#8230;</p>
<p style="text-align: justify;">Sit back and wait. Any target vulnerable will show up in the hits box. Now when it finds a target it will spew all the strings on that site as vulnerable. You have to go through each one on the site by cutting and pasting the string till you find the right one. But the thing is you know you CAN access the site. Really I need a program that will return the hit with a click on url and ignore false outputs. I am still looking for it. This will saves quite a bit of time going to each site and each string to find its not exploitable.</p>
<p style="text-align: justify;">There you go you should have access to your vulnerable target by now</p>
<p style="text-align: justify;">Another thing you can use the strings in the urls were user=? edit the url to the = part and paste &#8216; or 1=1&#8211; so it becomes</p>
<p style="text-align: justify;">user=&#8217; or 1=1&#8211; just as quick as login process</p>
<p style="text-align: justify;"><a name="combolist"></a><strong>Combo List</strong></p>
<p style="text-align: justify;"><span style="text-decoration: line-through;">There are lot of other variations of the Injection String which I cannot put on my blog because that is Illegal. If you are interested I can send it to you through Email. Just write in your email address in comment and I will send it to you as early as possible but you need to remain patient it may take 1 or 2 days.</span></p>
<p style="text-align: justify;">As a result of a lot of requests for the list of SQL Injection String and due to lack of time on our behalf to respond to your Comments we have now decided to give the download link for the list of SQL Injection Strings. Now you just need to Subscribe to our RSS Feed via Email and get the Download link at the bottom of the Confirmation Email. Please don&#8217;t Forget to click on the Confirmation Link given in that Email.</p>
<p style="text-align: justify;">Here is the form to Subscribe to our RSS feed via Email:</p>
<form style="border: 0px solid #cccccc; padding: 3px; text-align: justify;" action="http://www.feedburner.com/fb/a/emailverify" method="post">
<input id="feed_form" style="width: 250px;" onclick="this.value='';" name="email" type="text" value="Enter your Email Address" />
<input name="url" type="hidden" value="http://feeds.feedburner.com/~e?ffid=1825094" />
<input name="title" type="hidden" value="Hacking Truths" />
<input name="loc" type="hidden" value="en_US" />
<input type="submit" value="Subscribe" /></form>
<p style="text-align: justify;">Happy Hunting</p>
<img src="http://www.hungry-hackers.com/?ak_action=api_record_view&id=354&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.hungry-hackers.com/2008/09/list-of-all-the-sql-injection-strings.html/feed</wfw:commentRss>
		<slash:comments>352</slash:comments>
		</item>
		<item>
		<title>Cracking .htaccess/.htpasswd for Passwords</title>
		<link>http://www.hungry-hackers.com/2008/07/cracking-htaccss-htpaswd-for-passwords.html</link>
		<comments>http://www.hungry-hackers.com/2008/07/cracking-htaccss-htpaswd-for-passwords.html#comments</comments>
		<pubDate>Mon, 14 Jul 2008 13:06:03 +0000</pubDate>
		<dc:creator>Ashik</dc:creator>
				<category><![CDATA[Database Hacking]]></category>
		<category><![CDATA[Decryption]]></category>
		<category><![CDATA[Hacking Tutorials]]></category>
		<category><![CDATA[Hardcore Hacking]]></category>
		<category><![CDATA[Internet Hacking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Hacking]]></category>
		<category><![CDATA[Cracking]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Hardcore]]></category>
		<category><![CDATA[Htacces/Htpasswd]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.hungry-hackers.com/?p=323</guid>
		<description><![CDATA[This article is intended to be an almost complete guide to cracking and protecting websites which utilize the .htaccess/.htpasswd method for controlling access to data. it&#8217;s not intended to be a how-to guide for hacking websites. if you&#8217;re looking for a simple howto and not interested in reading in-depth information, then this isn&#8217;t the text for you.
I m considering writing a series of guides which for now I m calling &#8220;Hungry Hackers Guide&#8221;. i do have my malicious streaks (mainly on my own stuff though, I enjoy breaking my own ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">This article is intended to be an almost complete guide to cracking and protecting websites which utilize the .htaccess/.htpasswd method for controlling access to data. it&#8217;s not intended to be a how-to guide for hacking websites. if you&#8217;re looking for a simple howto and not interested in reading in-depth information, then this isn&#8217;t the text for you.</p>
<p style="text-align: justify;">I m considering writing a series of guides which for now I m calling &#8220;Hungry Hackers Guide&#8221;. i do have my malicious streaks (mainly on my own stuff though, I enjoy breaking my own machines), but I am mostly white hat. I guess these guide will basically aim to give white hat hackers a security lecture from a black hat perspective. i dunno. *shrugs*</p>
<h2 style="text-align: justify;">Basic access control in apache</h2>
<p style="text-align: justify;">At it&#8217;s most basic level, access control in apache is specified in the httpd.conf (or equivalent file. these were previously three files, now merged into one for simplicity&#8217;s sake). the most basic directives are allow from and deny from. the default permissions for any given directory is allow from all (which will allow any client to get pages from that directory).</p>
<p style="text-align: justify;">the format for these directives is as follows:</p>
<p style="text-align: justify;"><code>&lt;Directory /&gt;      Order Deny,Allow      Deny from All &lt;/Directory&gt; </code></p>
<p style="text-align: justify;">This will disallow any client from retrieving any file on your server, unless you explicitly allow files further up the tree. However, since sometimes normal users will want to control their own web directories, and it&#8217;s impractical (at least, at most, unsafe) to allow webmasters to modify the httpd.conf, we can specify to allow users to override certain directives using the <a href="http://httpd.apache.org/docs/mod/core.html#allowoverride">allowoverride directive</a>.</p>
<h2 style="text-align: justify;">Allow override</h2>
<p style="text-align: justify;">Allowoverride (as stated above) allows non-root users to override access controls on a directory. you simply specify which directives you want the user to be able to override (the default is everything), and then apache looks in each directory for a .htaccess file (or other, specified with the <a href="http://httpd.apache.org/docs/mod/core.html#accessfilename">AccessFilename directive</a>) and applies the contents of that to it&#8217;s access control.</p>
<p style="text-align: justify;">Part of the access control, the part which we will be covering (given the scope of this document) is the authconfig directives. below we&#8217;ll view a typical .htaccess file for most sites with moderate to poor security (most porn sites simply use these, porn sites can actually be great practice to crack passwords).</p>
<p style="text-align: justify;"><code>/* a typical .htaccess file */ AuthName "Marvin Martian's Porn Emporium" AuthType Basic AuthUserFile /home/marvin/public_html/members/.htpasswd require valid-user </code></p>
<p style="text-align: justify;">As you can see above, there aren&#8217;t many directives required to provide password protection to a directory. as you can see, in this case, the webmaster has been pretty lazy and stuck the .htpasswd file inside the same directory. the format of the .htpasswd file is simple: &lt;user&gt;:&lt;encryptedpassword&gt;</p>
<p>[eminimall]</p>
<h2 style="text-align: justify;">A Bad case</h2>
<p style="text-align: justify;">On a poorly secured server, there are no access restrictions on the .htpasswd file. since the .htpasswd file is in a web-accessible directory, and user which is able to authenticate to the directory is able to obtain the password list.</p>
<p style="text-align: justify;">Simply enter the url /members/.htpasswd, and you should receive a full userlist as well as all the encrypted passwords. very silly indeed. if the file doesn&#8217;t exist, on a poorly configured server one merely has to read the .htaccess file to obtain the location. if it is below the &#8220;web-root&#8221;, then it would require a cgi-exploit of some sort to obtain the file. but on any other directory, simply use the browser to obtain the file:</p>
<p style="text-align: justify;"><code>webmaster:TTn.VQRliM8c2 hornyguy:ZpgNeARi106aM fatmike69:drXj18zVxxBVc </code></p>
<p style="text-align: justify;">Unfortunately, these passwords aren&#8217;t of much use in their current form. they require cracking.</p>
<h2 style="text-align: justify;">Cracking Passwords</h2>
<p style="text-align: justify;">Most unix passwords are encrypted using a &#8220;one way hash&#8221; or &#8220;trapdoor hash&#8221; &#8211; which entails actually losing data from the password in such a way that the original password simply cannot be obtained by reversing the algorithm.</p>
<p style="text-align: justify;">The only way to crack such passwords is using brute force guessing attacks. a simple perl script can be used to achieve this:</p>
<p style="text-align: justify;"><code>#! /usr/bin/perl # crack.pl by fwaggle &lt;root@fwaggle.net&gt;  open (PASSFILE, ".htpasswd"); my @passfile = &lt;PASSFILE&gt;; close PASSFILE;  open (DICTFILE, "dictionary.txt"); my @dictfile = &lt;DICTFILE&gt;; close DICTFILE;  foreach $line (@passfile) {   my ($username, $encpass) = split(/:/, $line);   foreach $attempt (@dictfile) {     if ($encpass eq crypt($attempt, $encpass)) {       print("Cracked: ${username}:${attempt}\n");     }   } } </code></p>
<p style="text-align: justify;">The above perl script is a simple brute force password cracker. it may or may not work, i didn&#8217;t actually test it before writing this article &#8211; but it closely resembles one i released to alt.hacking quite a while ago. whether it works or not, you should hopefully be able to see the process which password cracking requires (even for perl, the syntax is almost plain english).</p>
<p>[eminimall]</p>
<h2 style="text-align: justify;">Better Cracking Performance</h2>
<p style="text-align: justify;">Perl isn&#8217;t the quickest of languages, and using the standard crypt() calls aren&#8217;t exactly optimized for high speed cracking. a far better solution is to download a purpose-built, c coded password cracker such as john the ripper. john the ripper is optimized to crack passwords extra fast, as well as it includes an &#8220;incremental mode&#8221; in case your dictionary should fail to crack a password. ie, in the above example, if the user&#8217;s password doesn&#8217;t happen to be in the dictionary, then you won&#8217;t be able to crack it.</p>
<p style="text-align: justify;">Using an incremental password cracker, every character combination is tried, in an intelligent order (in a vain attempt to save time in something that is wholely unpredictable), so that absolutely any password will be cracked, eventually.</p>
<p style="text-align: justify;">The one problem with john the ripper is that it&#8217;s picky about the files that it gets inputted. in order to crack the .htpasswd files, you must edit them to make them appear like regular unix /etc/passwd files. this means adding extra fields, like this:</p>
<p style="text-align: justify;"><code>&lt;username&gt;:&lt;password&gt;:1:1:user:/bin/sh:/root </code></p>
<p style="text-align: justify;">for example, the entries above could look like this:</p>
<p style="text-align: justify;"><code>webmaster:TTn.VQRliM8c2:1:1:webmaster:/bin/sh:/root hornyguy:ZpgNeARi106aM:3:3:hornyguy:/bin/sh:/root fatmike69:drXj18zVxxBVc:3:3:hornyguy:/bin/sh:/root </code></p>
<p style="text-align: justify;">The windows version doesn&#8217;t seem to require this for some reason, so you can just feed it a regular .htpasswd file. note that the windows version may have markedly poor performance when compared to the unix versions.</p>
<h2 style="text-align: justify;">Finding vulnerable servers</h2>
<p style="text-align: justify;">Now that we&#8217;ve discussed how to break these passwords, it&#8217;s almost time to talk about securing them. if you&#8217;re only interested in hax0ring passwords from sites, chances are you&#8217;re probably well equipped to crack any password files you might stumble accross. if you&#8217;re just looking to hack anything, try searching in <a href="http://www.google.com/">google</a> or <a href="http://www.altavista.com/">altavista</a> for a phrase like .htpass, and wade through the results and see if you find a file that says &#8220;Index of /something&#8221; that contains a .htpasswd file.</p>
<p style="text-align: justify;">if you have permission to read the file, you&#8217;ve basically hacked it already. this is admittedly a lame hack, but if you&#8217;re bored &#8211; do the net in general a favour. crack the passwords, and email them to the admin. that&#8217;s all i ever used to do, and you get the same sense of achievement and hacker cred, without the legal problems of defacements.</p>
<p style="text-align: justify;">on a side note, the same results can be achieved by searching for service.pwd. this is the password file for fp-apache, the frontpage server extensions for apache. some really lame admins don&#8217;t check permissions on this file, and you can easily gain access to these kinds of systems (and if you&#8217;re feeling particularly malicious, just connect with a frontpage client and upload a defacement).</p>
<h2 style="text-align: justify;">Putting an end to this Nonsense</h2>
<p style="text-align: justify;">if you&#8217;re running your own site, then here&#8217;s the section you&#8217;ll really be interested in &#8211; stopping someone from doing this to you. the first thing you need to do is prevent users from reading your .ht* files. the easiest way to hinder this is to put the .htpasswd file someplace that&#8217;s not web-accessible (such as your home dir, out of ~/public_html).</p>
<p style="text-align: justify;">the next step, as an admin of a server, is to prevent apache from serving these pages from the web. there is no (i repeat NO) reason that a web client should ever need to see these pages, they are for server side configuration only.</p>
<p style="text-align: justify;">so, we can easily accomplish this using the &lt;Files&gt; directive, and a niftylittle regular expression:</p>
<p style="text-align: justify;"><code> &lt;Files ~ "^\.ht"&gt;     Order allow,deny     Deny from all &lt;/Files&gt; </code></p>
<p style="text-align: justify;">this particular example (taken from apache&#8217;s httpd.conf, now thankfully included in default distributions to keep lame admins from unknowingly putting themselves at risk) prevents the server from serving any files that begin with .ht. thus, .htaccess and .htpasswd are both protected.</p>
<p style="text-align: justify;">the final step from here is to ensure that the files are protected on the server &#8211; meaning file permissions. the ideal situation is to have suEXEC for apache running, and to have the files accessible only by the httpd (but still owned by you). that way, you can chmod the files when you need to edit them, but cgi exploits will not allow users to read the files.</p>
<h2 style="text-align: justify;">Wrapping it up</h2>
<p style="text-align: justify;">well, this concludes my little rant about .htpasswd and .htaccess files. hopefully you learnt something from this. comments are always welcome, just email me. also, if you&#8217;re looking for a unix/unix-like irc channel to lurk on, come on my irc network (irc.mooircd.org) and join #hackerzlair &#8211; it&#8217;s lag free, packet kiddie free, and quite nice.</p>
<p style="text-align: justify;">That about does it I think. Maybe I&#8217;ll write some more of these files if I think about it.</p>
<img src="http://www.hungry-hackers.com/?ak_action=api_record_view&id=323&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.hungry-hackers.com/2008/07/cracking-htaccss-htpaswd-for-passwords.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>2007&#8242;s Biggest Problem &#8211; The Trusted Insider</title>
		<link>http://www.hungry-hackers.com/2007/12/2007s-biggest-problem-the-trusted-insider.html</link>
		<comments>http://www.hungry-hackers.com/2007/12/2007s-biggest-problem-the-trusted-insider.html#comments</comments>
		<pubDate>Tue, 18 Dec 2007 17:13:00 +0000</pubDate>
		<dc:creator>Ashik</dc:creator>
				<category><![CDATA[Database Hacking]]></category>
		<category><![CDATA[Hardcore Hacking]]></category>

		<guid isPermaLink="false">http://hungry-hackers.com/?p=130</guid>
		<description><![CDATA[This has not been a banner year for insider hacks, and insider data loss across the board. In many ways we can most likely call this the year of the insider.
Either through actual hacking, or through actual not compliance with company policy and taking work home, or loosing disks with millions of consumer records, the trusted insider is 2007&#8242;s biggest problem.

Adding to that is a recent insider hack from Florida, where a senior database administrator stolen and then sold through a 3rd party, consumer information that should have been better ...]]></description>
			<content:encoded><![CDATA[<div style="text-align: justify;"><span style="font-family:verdana;">This has not been a banner year for insider hacks, and insider data loss across the board. In many ways we can most likely call this the year of the insider.</span></p>
<p><span style="font-family:verdana;">Either through actual hacking, or through actual not compliance with company policy and taking work home, or loosing disks with millions of consumer records, the trusted insider is 2007&#8242;s biggest problem.</span></div>
<p><span id="fullpost">
<div style="text-align: justify;"><span style="font-family:verdana;">Adding to that is a recent insider hack from Florida, where a senior database administrator stolen and then sold through a 3rd party, consumer information that should have been better secured, or at least, someone should have been watching.</span></p>
<p><span style="font-family:verdana;">    Working for a subsidiary called Certegy Check Services, Sullivan used his access to Fidelity&#8217;s database to pilfer records that included individuals&#8217; names, addresses and financial account information, according to court documents. To cover his tracks, he incorporated a business called S&amp;S Computer Services, which sold the data to an un-indicted accomplice. According to authorities, this unidentified person resold the information to direct marketers, including one called Strategia Marketing, which also went by the name Suntasia. Source: Channel Register </span></p>
<p><span style="font-family:verdana;">While the TJX settlement was not that much in terms of money out to consumers, the loss of data, and the selling of data is not just for hackers anymore. The underground economy in data, should include insiders as a source, either by purpose, or because they got spear phished as they did at Los Alamos this week.</span></p>
<p><span style="font-family:verdana;">Security Risk Management needs to take a lot of this into consideration, and controls must be in place to make sure that these kinds of events do not happen with the same kind of frequency that they have happened this year.</span></p>
<p><span style="font-family:verdana;">One thing that security risk managers can do is familiarize them with the insider threat research conducted by CERT. This is one of the best repositories for data about insider threats, that will help a company scenario plan, and come up with contingencies as well as monitoring strategies.</span></p>
<p><span style="font-family:verdana;">Another good source of Links is Practical and well worth visiting.</span></p>
<p><span style="font-family:verdana;">In the mean time, while we wind down for the holidays, it might be time to revisit your security practices, and work on mitigations for insider threats. There have been far too many this year.</span></div>
<p></span></p>
<img src="http://www.hungry-hackers.com/?ak_action=api_record_view&id=130&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.hungry-hackers.com/2007/12/2007s-biggest-problem-the-trusted-insider.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>


<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching using disk: basic
Object Caching 778/884 objects using disk: basic

Served from: hungry-hackers.com @ 2012-02-12 02:08:15 -->
