As usual, I will only be touching on interesting or unique points in the shellcode.
- Line 25/26: To avoid having the egg in memory, I moved
0x5090508f
into a register and incremented it to get0x50905090
- Line 27:
repne scasd
searches the next 4 bytes and increments the address searched automatically. This saves space compared to manual searching. However, the caveat is that it only searches at every 4 byte boundary. Hence there is a need for padding. For actual use, you might have to seed the memory with shellcode with different padding prepended.
Egghunter.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|
This blog post has (not) been created for completing the requirements of the SecurityTube Linux Assembly Expert certification:
Student ID: SLAE64-XXXXX