In Exercise 3, we will find a crash in a real-world target, a crash that has been leveraged in actual exploits.
This exercise is a bit more challenging than the previous two, but it is also more realistic. You may need to do some research to find the vulnerability, and you will need to use some of the more advanced features of Boofuzz.
Our target is the lighttpd web server, specifically version 1.4.15, which has a known vulnerability.
Download: lighttpd 1.4.15
sudo apt install build-essential
tar -xvf lighttpd-1.4.15.tar.gzcd lighttpd-1.4.15./configuremake./src/lighttpd -vIf you run lighttpd, you will receive an error about a missing configuration file:
> ./src/lighttpd
2023-10-05 22:10:13: (server.c.521) No configuration available. Try using -f option.
We can pass in a sample configuration file, which may give an error about a missing directory:
/src/lighttpd -f ./doc/lighttpd.conf
2023-10-05 22:16:12: (configfile.c.1114) base-docroot doesn't exist: /www/pages/
2023-10-05 22:16:12: (server.c.564) setting default values failed
Let's copy that file:
cp ./doc/lighttpd.conf fuzz-target.conf
And then modify the following settings:
server.document-root = "./src/"
server.errorlog = "/path/to/workingg/dir/lighttpd.error.log"
accesslog.filename = "/path/to/workingg/dir/access.log"
server.port = 8080
server.bind = "lo0" # important since this is a vulnerable server!
When everythign is operating, lighttpd should exit and run in the background, printing nothing to the console.
> ./src/lighttpd -f fuzz-target.conf
You can test that it is running by making a request to it:
> curl localhost:8080/
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>404 - Not Found</title>
</head>
<body>
<h1>404 - Not Found</h1>
</body>
</html>
This is the challengign part– have at it!
Tips:
max_len=100 to String to speed up iterations for the sake of time.User-Agent header is involved.Repeat block will help you – see https://boofuzz.readthedocs.io/.