Using Spike 3
Using Spike 3
Dave Aitel
http://www.immunitysec.com
Agenda
Demo and Vulnerability
Theory
Goals
<GOBBLES>
<GOBBLES>i iused
usedtotolaugh
laughatatfuzzers,
fuzzers,but
butthen
thenyou
youchanged
changedmy
my
whole
wholeoutlook
outlookon
onlife!
life!
Theory
SPIKE is a GPL'd API and set of tools that allows you to
quickly create network protocol stress testers
Most protocols are built around extremely similar data
formatting primitives
Many of these are already supported in SPIKE
Others soon will be. :>
s_block_start(), s_block_end(),
s_blocksize_halfword_bigendian();
s_xdr_string()
s_string(Host: ); s_string_variable(localhost);
s_size_string(post,5);
s_block_start(Post);
s_string_variable(user=bob);
s_block_end(post);
Length Fields
Word/halfword/string
String calls:
s_string(hi);
s_string_variable(hi);
41 00);
set_current_spike(*struct spike);
spike_clear();
Malloc fun
spike_new();
spike_free();
spike_tcp_connect(host,port);
spike_send();
spike_close_tcp();
spike_udp_connect(host,port);
spike_send();
s_string_variable();
s_string_repeat(A,5000);
s_incrementfuzzstring();
s_incrementfuzzvariable();
Find length fields and mark them out with size calls and
s_block_start(), s_block_end();
Make sure protocol still works :>
Integrate with fuzzing framework (2 while() loops) and let the
SPIKE fuzzer do the boring work
Manually mess with the packets to see if you can cause any
aberrant behaviour (attach ollydebug first)
Write up the exploits
Quickstart: msrpcfuzz
First use DCEDUMP (basically rpcinfo against Windows)
Then chose a program and port to fuzz
Watch it crash!
Makewebfuzz.pl
Creates webfuzz.c files from http_request files
Superceeded by SPIKE Console wizardry and generic
.spk scripts, but still useful
Webfuzz
Sends the valid request, but incrementally goes through
each variable in the request and checks it for common
vulnerabilities
A Standard Request
GET /login.asp?Username=Dave&Password=Justine
Host: bobsbagoffish.com
Content-Length: 16
Server=whitebait
A webfuzz request
GET /login.asp?Username=../../etc/hosts%00&Password=Justine
Host: bobsbagoffish.com
Content-Length: 16
Server=whitebait
Closed_source_webserver_fuzz
Uses same set of fuzz strings to locate common web
server overflows, format string bugs, etc
Also useful for rigorous manual testing of one CGI
I accept patches
cross platform
pretty
Conclusion
For most standard web applications SPIKE can quickly
help you find SQL injection, overflow, and format string
bugs
SPIKE can be quickly customized for your specific needs
Use SPIKE to reverse engineer and fuzz binary protocols
in less time than you otherwise could
Download for FREE today!
http://www.immunitysec.com/spike.html
Comments to [email protected]