Git Product home page Git Product logo

aslrekt's Introduction

aslrekt

ASLR

ASLREKT is a proof of concept for an unfixed generic local ASLR bypass in Linux.

ASLREKT requires a setuid binary that reads from stdin and writes to stdout/stderr (or to a readable file) the contents that it read.

/proc/pid/stat is world-readable, however, if we aren't permitted to ptrace pid (!ptrace_may_access()), addresses aren't leaked and, instead, they are replaced with 0. The problem is that we can open() /proc/pid/stat and pass the fd as stdin of a newly executed special setuid binary (which can now ptrace pid) and read those addresses. In order for an attacker to be able to actually obtain them, the special setuid binary needs to write to stdout/stderr or readable file the contents that it read. There are several setuid binaries that do this, such as "procmail" which seems to be setuid on Debian-based systems, this includes Ubuntu. Another alternative is "spice-client-glib-usb-acl-helper". There may be more of these. This breaks ASLR for any process running under another uid, such as root.

It's also possible to leak addresses via /proc/pid/syscall, it isn't world-readable, but we can open() it before a target setuid execve, and later leak them through the special setuid binary method.

Modern Linux versions are still vulnerable.

Copyright 2016-2020, Blaze Information Security

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.