GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ewimberley/AdvancedMemoryChallenges: Advanced buffer overflow and memory corruption security challenges

BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
todo
todo
 
 
1.cpp
1.cpp
 
 
2.cpp
2.cpp
 
 
3.cpp
3.cpp
 
 
4.cpp
4.cpp
 
 
5.cpp
5.cpp
 
 
6.cpp
6.cpp
 
 
BreakingAddressSanitizer.pdf
BreakingAddressSanitizer.pdf
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
ModernOverflowTargets.pdf
ModernOverflowTargets.pdf
 
 
README.md
README.md
 
 
heartbleed.cpp
heartbleed.cpp
 
 
impossible.cpp
impossible.cpp
 
 
integerOverflowDetectionAssmbly.c
integerOverflowDetectionAssmbly.c
 
 
todo.cpp
todo.cpp
 
 

Repository files navigation

AdvancedMemoryChallenges

Advanced buffer overflow and memory corruption challenges.

INSTRUCTIONS:

  1. Install gcc 4.8 or above (I recommend a late version of Ubuntu. I haven't really tested these on CentOS, but they should work. All other systems and all bets are off.)
  2. Run the command "make" in the main project directory
  3. Try to get each program to pop a shell (or change the control flow to your advantage in some way) without modifying the source code. You can try to execute some shell code, but that's the old boring way to do things. Look for something else.
  4. Profit?

For some spoilers read:

http://packetstormsecurity.com/files/121751/Modern-Overflow-Targets.html

or

http://packetstormsecurity.com/files/123977/Bypassing-AddressSanitizer.html


Spoilers below!







Hints and Challenge Description

  1. Stack Objects - Did you know you could put objects on the stack? -fstack-protector-all prevents you from writing over the stored instruction pointer, but that doesn't mean it prevents all buffer overflows on the stack. Just don't write over the canary...

  2. Heap Objects - Overflowing is a little bit different on the heap. Metadata checks will test the linked list pointers used to maintain allocations. If you free/delete after a heap overflow on modern clib you're likely to get a segfault.

  3. Canary Conundrums - Oh no! The target is on the other side of a canary from the vulnerable buffer! When function a returns there's bound to be a segfault. If function a returns...

  4. Integer Behavior - Hmm, it looks like there's some careful sanitization on that integer input. How does that ALU thing work again? Plus, this was compiled with AddressSanitizer. One wrong byte and it'll be a segfault.

  5. Heap Havoc - In the real world the heap is constantly changing. Challenge number 2 is pretty trivial compared to this one.

  6. AddressSanitizer Woes - AddressSanitizer is extremely carefully thought out. It was very challenging to balance improved security without breaking backwards compatibility. Sometimes, all it takes is a few corrupted bytes to pop a shell. That's good, because AddressSanitizer doesn't give you all that many bytes to work with.

More to come later...

About

Advanced buffer overflow and memory corruption security challenges

Topics

buffer-overflowcybersecuritymemory-corruptionmemory-hackingsecurity

Resources

Readme
GPL-2.0 license
Activity

Stars

191 stars

Watchers

13 watching

Forks

27 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.