Git Product home page Git Product logo

physmem's Introduction

physmem

physmem is a physical memory inspection tool and local privilege escalation targeting macOS up through 10.12.1. It exploits either CVE-2016-1825 or CVE-2016-7617 depending on the deployment target. These two vulnerabilities are nearly identical, and exploitation can be done exactly the same. They were patched in OS X El Capitan 10.11.5 and macOS Sierra 10.12.2, respectively.

Because these are logic bugs, exploitation is incredibly reliable. I have not yet experienced a panic in the tens of thousands of times I've run a program (correctly) exploiting these vulnerabilities.

CVE-2016-1825

CVE-2016-1825 is an issue in IOHIDevice which allows setting arbitrary IOKit registry properties. In particular, the privileged property IOUserClientClass can be controlled by an unprivileged process. I have not tested platforms before Yosemite, but the vulnerability appears in the source code as early as Mac OS X Leopard.

CVE-2016-7617

CVE-2016-7617 is an almost identical issue in AppleBroadcomBluetoothHostController. This vulnerability appears to have been introduced in OS X El Capitan. It was reported by Ian Beer of Google's Project Zero (issue 974) and Radu Motspan.

Building

Build physmem by specifying your deployment target on the command line:

$ make MACOSX_DEPLOYMENT_TARGET=10.10.5

Running

You can read a word of physical memory using the read command:

$ ./physmem read 0x1000
a69a04f2f59625b3

You can write to physical memory using the write command:

$ ./physmem write 0x1000 0x1122334455667788
$ ./physmem read 0x1000
1122334455667788

You can exec a root shell using the root command:

$ ./physmem root
sh-3.2# whoami
root

License

The physmem code is released into the public domain. As a courtesy I ask that if you reference or use any of this code you attribute it to me.

physmem's People

Contributors

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