Analysis
This program simply creates a server on port 6666 and writes the phrase hello to clients
who connect. As you can see, we used all functions that have been reviewed in this sec-
tion. On line 6, we use the socket function to create a TCP socket descriptor. We pro-
ceed to fill out the sockaddr structure on lines 8 through 10.The socket information is
then named to the socket descriptor using the bind function.The listen function is used
to place the initialized socket into a listening state, and, lastly, the connection is accepted
from the queue using the accept function.
Stack Overflow Exploits
Traditionally, stack-based buffer overflows have been considered the most common type
of exploitable programming errors found in software applications ...