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
16 close(soc);
17 }
18 }
Lines 3 and 4 set the variables that will be used to declare the start and end ports for
scanning. Note that these numbers represent the entire set of ports for any given system
(minus the zero port, which is frequently utilized for attacks or information gathering).
Lines 8 and 9 open a socket connection and then determine if the opened socket
connection was successful. After grabbing the banner with the inline initialization banner
(line 11) and using the recv_line function, a regular expression is used on line 13 to
determine if Apache is found within the received banner. Lastly, the script indicates that
Apache version 1.0 was found on the corresponding port that returned the banner.
Although this example script is reasonably ...
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