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
121 #
122
123
# Include other scripts and library functions first
124 include("http_func.inc");
125
126
# Get initialization information from the KB or the target
127 port = get_kb_item("Services/www");
128 if ( !port ) port = 80;
129 if ( !get_port_state(port) ) exit(0);
130
131
if( safe_checks() ) {
132
133
# Nessus users can check the "Safe Checks Only" option
134 # when using Nessus to test critical hosts for known
135 # vulnerabilities. Implementing this section is optional,
136 # but highly recommended. Safe checks include banner
137 # grabbing, reading HTTP response messages, and the like.
138
139
# grab the banner
140 b = get_http_banner(port: port);
141
142
# check to see if the banner matches Apache/2.
143 if ( b =~ 'Server: *Apache/2\.' ) {
144 report = "
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