Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2002-1120 — Classic stack-based buffer overflow in Savant Web Server 3.1 demonstrating early-2000s remote memory corruption through a crafted HTTP request. | Kitploit
Tools/GitHubGitHub/themalwareguardian/cve-2002-1120
Vulnerability AnalysisExploitationReverse EngineeringShellcodeDebuggersWeb SecurityFuzzingPenetration TestingLearning & Education

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
Payload Development
Binary Exploitation
GitHubthemalwareguardian/cve-2002-1120

CVE-2002-1120

Classic stack-based buffer overflow in Savant Web Server 3.1 demonstrating early-2000s remote memory corruption through a crafted HTTP request.

View Repository
14 months agoNot yet reviewed

🐞 CVE-2002-1120: Savant Web Server 3.1 - Stack-Based Buffer Overflow (Egghunter)

Classic stack-based buffer overflow in Savant Web Server 3.1 demonstrating early-2000s remote memory corruption through a crafted HTTP request (a 2002 vulnerability that demands more from a beginner than most buffer overflow CVEs from 2025).




📑 Table of Contents

  • Why this repository exists
  • Why this vulnerability is interesting
  • Context and affected software
  • About the vulnerability
  • Triggering the crash
  • Exploitation



🎓 Why this repository exists

This repository is part of the material I use when teaching memory corruption exploitation (in addition to my regular work, I also teach in different cybersecurity courses where I help train the next generation of reverse engineers). When I cover stack-based buffer overflows in class, I work through real cases rather than toy examples, and this CVE is one I return to specifically when I want to challenge students who already have some experience with basic EIP overwrites.

The reason is that the year in a CVE identifier tells you nothing about how hard the exploitation is. Most students assume that older CVEs must be simpler, a straightforward overflow, a JMP ESP, done. This one proves otherwise. Some CVEs I teach from 2025 are fundamentally more basic than this, because the vulnerability class is simpler or the constraints are fewer. CVE-2002-1120 requires understanding things that some modern exploits do not demand: why certain opcodes cannot be used in certain parts of the request, how to craft a conditional jump that always fires when the unconditional one is blocked, how to deliver shellcode when it does not fit where you would normally put it, and how an egghunter solves a space problem that would otherwise make the exploit impossible.

It is the CVE I assign when I want to see if someone actually understands what they are doing.




💡 Why this vulnerability is interesting

This vulnerability affects Savant 3.1, a freeware Windows HTTP server from 2002. What makes it worth studying in 2025 is not the age but the combination of constraints it introduces and the techniques required to work around them:

  • No space after EIP. The usable buffer is ~267 bytes before the return address. Anything beyond that does not reach the vulnerable buffer, so shellcode cannot be placed in the usual location after EIP.
  • The HTTP method field is executable. Savant copies the method into memory and executes it. The bytes that normally spell GET are treated as code, which means an attacker can place opcodes there, but only opcodes that survive a strict bad character filter.
  • Two separate bad character lists. The URI and the method field have different filtering logic inside Savant. Both must be analyzed independently. The method zone blocks a much larger set of bytes than the URI.
  • The unconditional JMP is a bad character. \xeb does not pass the method zone filter. A conditional jump that always fires must be constructed manually using three opcodes, loading a value into a register, comparing it against a smaller value, and jumping if the result is not less or equal.
  • The shellcode does not fit. Even with the jump working and execution landing in the URI buffer, ~264 bytes is not enough for a reverse shell. The real payload must go elsewhere, in the HTTP body, which Savant stores in a heap region separate from the stack, and an egghunter is needed to locate it at runtime.

Each one of these constraints is a lesson in itself.




🔍 Context and affected software

Savant is a freeware open-source Windows HTTP server originally designed to turn any desktop computer into a web server. It listens on TCP port 80 and processes standard HTTP GET requests. The overflow occurs in the handler that copies the URI path into a fixed-size stack buffer without validating its length.

Download Tool

Key technical details:

  • Vulnerability type: Stack-based buffer overflow
  • Affected version: Savant Web Server 3.1
  • Affected endpoint: HTTP GET request
  • Vulnerable component: URI path handling in the GET handler
  • Authentication required: No
  • Impact: Remote code execution



⚠️ About the vulnerability

Savant processes incoming HTTP GET requests and copies the URI path into a fixed-size stack buffer without checking its length. A simplified version of the vulnerable logic looks like this:

root@kitploit:~
char uri_buffer[270];

strcpy(uri_buffer, uri_path);

Sending a GET request with a URI of approximately 271 bytes overwrites the saved return address on the stack. The overflow is constrained, sending significantly more than that causes the crash in a way that EIP is no longer controlled, so the usable window is narrow.

The exploitation is more complex than a standard EIP overwrite because of two additional properties of the server: the HTTP method field is also copied into memory and executed, and the body of the HTTP request is stored in a separate heap region rather than on the stack (both of these properties become essential parts of the exploit chain).




💥 Triggering the crash

The crash can be reproduced by sending a GET request with a sufficiently long URI. No authentication is required. Example using Python:

root@kitploit:~
import socket

HOST = '127.0.0.1'
PORT = 80

payload = b"A" * 271

request = (
	b"GET /" + payload + b" HTTP/1.1\r\n"
	b"Host: 127.0.0.1\r\n"
	b"Connection: close\r\n"
	b"\r\n"
)

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
s.send(request)
s.close()

When executed under a debugger, the crash shows EIP overwritten with user-controlled data:

root@kitploit:~
EIP = 41414141

confirming that the saved return address has been corrupted by the overflow.




💣 Exploitation

The goal of this repository is not only to demonstrate the crash, but to walk through the complete exploitation process step by step, including every constraint that makes this case harder than a standard EIP overwrite and every decision made to work around them.

To keep the main README clean, the detailed exploitation notes, scripts, and debugger steps are placed inside the Vulnerability 📂 folder of this repository.

There you will find the complete workflow used to exploit this CVE, including:

  • Fuzzing the GET URI to identify the crash window.
  • Manual offset discovery (cyclic patterns cannot be used here).
  • Bad character analysis for both the URI zone and the HTTP method field separately.
  • Finding a POP / RET gadget in Savant.exe for the EIP overwrite.
  • Confirming execution lands in the method field after the gadget fires.
  • Crafting a conditional JNLE jump to reach the URI buffer from the method field.
  • Locating the HTTP body in the heap and measuring available space.
  • Placing an egghunter in the URI buffer and the shellcode tagged with the egg in the HTTP body.