. . . . . . . . . 212
Exit System Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
setreuid System Call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
Shell-Spawning Shellcode with execve . . . . . . . . . . . . . . . . . . . . . . 217
Implementing Port-Binding Shellcode . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Linux Socket Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Assembly Program to Establish a Socket . . . . . . . . . . . . . . . . . . . . . 223
Test the Shellcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Implementing Reverse Connecting Shellcode . . . . . . . . . . . . . . . . . . . . . . 228
Reverse Connecting C Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Reverse Connecting Assembly Program . . . . . . . . . . . . . . . . . . . . . 230
Encoding Shellcode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Simple XOR Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Structure of Encoded Shellcode . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pages:
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