Skip to Main Content
Sockets, Shellcode, Porting, and Coding: Reverse Engineering Exploits and Tool Coding for Security Professionals
book

Sockets, Shellcode, Porting, and Coding: Reverse Engineering Exploits and Tool Coding for Security Professionals

by James C Foster
April 2005
Intermediate to advanced content levelIntermediate to advanced
700 pages
20h 39m
English
Syngress
Content preview from Sockets, Shellcode, Porting, and Coding: Reverse Engineering Exploits and Tool Coding for Security Professionals
We now create the string on the stack by pushing EAX as string terminated, fol-
lowed by the string /bin/sh (lines 4, 5, and 6). We store the pointer to the string in EBX
(line 7). With this, the first argument is ready. Now that we have the pointer, we build
the array by pushing EAX first (it will serve as array terminator), followed by the pointer
to /bin/sh (line 9). We now load the pointer to the array in the ECX register so that we
can use it as the second argument of the system call.
All arguments are ready. We put the Linux execve system call number in the AL reg-
ister and give the processor back to the kernel so that our code can be executed ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

32/64-Bit 80x86 Assembly Language Architecture

32/64-Bit 80x86 Assembly Language Architecture

James Leiterman

Publisher Resources

ISBN: 9781597490054