Exploitable Buffer Overflow in a Server

Objective

Identify the buffer overflow vulnerability in a server process. Verify the existence of the vulnerability by fuzzing the running server process. Outline an attack that would provide remote access to a shell running on the server hardware; if possible, implement the attack. Finally, describe how to fix the bug in the server software.

Scenario

The "Bad Server" package implements a simple server program that includes an exploitable buffer overflow. Your objective is to identify the vulnerability, verify the vulnerability through fuzzing, design an attack, and, if possible, implement the attack.

The server code, sample shell code, and any other documents are available from my Box directory.

Procedure

You may choose to begin by analyzing the server code, or you can go directly to running the server and attacking it remotely. The following steps outline how to install and interact with the running server.