Skip to content

Commit 48a46f3

Browse files
committed
Pack / Unpack should be V not L
Packing or unpacking to/from L, I, or S as pack types will cause problems on big-endian builds of Metasloit, and are best avoided.
1 parent d77efd5 commit 48a46f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/exploits/windows/browser/ie_execcommand_uaf.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ def get_target(agent)
9494
end
9595

9696
def junk(n=4)
97-
return rand_text_alpha(n).unpack("L")[0].to_i
97+
return rand_text_alpha(n).unpack("V")[0].to_i
9898
end
9999

100100
def nop
101-
return make_nops(4).unpack("L")[0].to_i
101+
return make_nops(4).unpack("V")[0].to_i
102102
end
103103

104104
def get_payload(t, cli)
@@ -394,4 +394,4 @@ def exploit
394394
020bc6dc 633a85c7 jscript!VAR::InvokeDispName+0x7a
395395
020bc708 633a9c0b jscript!VAR::InvokeByDispID+0xce
396396
020bc8a4 633a5ab0 jscript!CScriptRuntime::Run+0x2989
397-
=end
397+
=end

0 commit comments

Comments
 (0)