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
System Call Arguments
When a system call requires arguments, these arguments have to be delivered in an OS-
dependent manner. For example, FreeBSD expects that the arguments are placed on the
stack, whereas Linux expects the arguments to be placed in registers.To find out how to
use a system call in assembly, first look at the system call’s man page to get more infor-
mation about the system call’s function, required arguments, and return values.
To illustrate how system calls have to be used on Linux and FreeBSD systems, we
will discuss an example exit system call implementation for FreeBSD and Linux.
Example 8.6 shows a Linux system call argument.
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