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
Compilation
obsd32# cc -o udp1 udp1.c
Example Execution
obsd32# ./udp1
socket() success.
udp1.c is a simple program that attempts to create a UDP socket.
Analysis
At line 11 and 12, the sys/socket.h and netinet/in.h header files are included.
These files contain the function prototypes and data structures required to use
the socket() function.
At line 19, the socket() function is called.The first parameter is the integer con-
stant AF_INET (defined in sys/socket.h).This constant indicates that the socket
is of the AF_INET address family.The AF_INET address family indicates
usage of IPv4 addressing.
The second parameter passed to the socket() function is the ...
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