GithubHelp home page GithubHelp logo

gabeele / buffer-overflow-example Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 7 KB

A buffer overflow built using C. This example program is used for SECU73000 Assignment 3 where the class explores several software vulnerabilities.

C 100.00%

buffer-overflow-example's Introduction

Buffer-Overflow-Example

A buffer overflow built using C. This example program is used for SECU73000 Assignment 3 where the class explores several software vulnerabilities.

To Run

Using the command line and your complier to turn off any overflow or stack curruption warnings, we can trigger a buffer overflow to gain access to the critical information behind a login.

  1. Open a command line interface and navigate to the cloned file.
  2. Using G++ (Or the complier of your choice, commands may differ) enter in the command gcc -g -fno-stack-protector -D_FORTIFY_SOURCE=0 -o example example.c
  3. In the same terminal, execute the complied application by entering example.exe
  4. Now enter the password password
  5. The system should let you in.

However, to trigger a buffer overflow, you'll need to overflow the input buffer by entering in any characters greater than the buffer limit (Limit is 15) Repeat and continue from step 3, but instead of using the password, type in any characters greater than 15. The system should print out Wrong password but still provide access rights to the user. This is beacuse the buffer was filled and continued into the next set of memory addresses, ensuring the boolean value was not 0; anything greater than 0 would allow access rights.

buffer-overflow-example's People

Contributors

gabeele avatar

Stargazers

 avatar

Watchers

 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.