GithubHelp home page GithubHelp logo

wp's Introduction

Exploit GDB 8.1~14.2 memory corruption

Google Dork:gdb, memory leak, memory exhausted, memory out-of-bounds.

Date: 2024.4.2

Exploit Author: N1nEmAn

Vendor Homepage: https://www.sourceware.org/gdb

Software Link: https://sourceware.org/pub/gdb/releases/

Version: 8.1~14.2 (currently known, and possibly more)

Tested on: Ubuntu18.02、archlinux-2024

POC

Save as poc.py and use source /path/to/poc.py.

import gdb
gdb.selected_inferior().read_memory(0, 18446744073709551615)

The following is an outdated reproduction. I found that even without loading any binary program, the vulnerability can still be reproduced. If I write 'source /path/to/poc.py' in .gdbinit or even hide it within the plugin code loaded by the gdbinit file, it will cause the vulnerability to be triggered every time gdb is run.

And I will make the following changes below to provide a new reproduction.

Vulnerability Reproduction-old

We exploited this in the newest GDB (14.2), and here are the details of my operating system:

OS: Arch Linux x86_64
Kernel: 6.8.2-zen2-1-zen
Memory: 9998MiB / 27746MiB
CPU: AMD Ryzen 7 6800H with Radeon Graphics
GPU: AMD ATI Radeon 680M

1.load any binary file

image-20240402211432774

2.run it and ctrl+c to stop it

image-20240402211541005

3. source poc.py

We can see successful memory out-of-bounds access and corruption. image-20240402211613585

image-20240402212709525

4. in Ubuntu

image-20240402212845142

Vulnerability Reproduction-new

just run gdb and source the poc (without debugging anything)

image image

wp's People

Contributors

n1neman 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.