GithubHelp home page GithubHelp logo

kursh / crashmon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ant4g0nist/crashmon

0.0 0.0 0.0 1.76 MB

crashmon - A LLDB Based replacement for CrashWrangler

C++ 93.19% Python 4.25% C 1.85% Objective-C 0.04% Objective-C++ 0.51% Makefile 0.16%

crashmon's Introduction

crashmon

crashmon - A CrashWrangler replacement based on LLDB

Crashmon, same as CrashWrangelr, is a LLDB wrapper together with Lisa.py that can be used to determine if a crash is an exploitable security issue, and if a crash is a duplicate of another known crash.

Usage

========= Build Instruction =========

macOSResearch ✗ git clone https://github.com/ant4g0nist/crashmon
macOSResearch ✗ cd crashmon
crashmon git:(main) ✗ make
crashmon git:(main) ✗ make install

Clone lisa.py

cd ~/
git clone https://github.com/ant4g0nist/lisa.py
echo 'command script import ~/lisa.py/lisa.py' > ~/.lldbinit

example

For debugging macOS System Applications/Services, it is expected that you disable SIP as crashmon uses LLDB.

========= Environment Variable Reference =========

CW_CURRENT_CASE: Path of the test case file that is being open in the target application. If set, crashmon will read and save the content of the test case file to triaged crash folder. This will be handy while fuzzing!

CW_ATTACH_PID: If set, use this pid as the process to monitor for crashes.
e.g. env CW_ATTACH_PID=12313 CW_CURRENT_CASE=foo ./crashmon or sudo env CW_ATTACH_PID=12313 CW_CURRENT_CASE=foo ./crashmon

CW_LOG_DIR: (Default ./crashlogs) The directory to output crashlogs to.

CW_JSON_STDOUT: (Default false) Write exploitable output as json to stdout.

CWE_*: If there are any environment variables prefixed with CWE_, delete the prefix and set the environment variable in the child. This does not apply when using CW_ATTACH_PID or CW_REGISTER_LAUNCHD_NAME.

========= crashmon return values =========

No crash = 0 Crash = 1 Timeout = 2

========= Exploitability algorithm =========

The algorithm for determining exploitability looks like this:

Exploitable if Crash on write instruction Crash executing invalid address Crash calling an invalid address Illegal instruction exception Abort due to -fstack-protector, _FORTIFY_SOURCE, heap corruption detected Stack trace of crashing thread contains certain functions such as malloc, free, szone_error, objc_MsgSend, etc.

Not exploitable if Divide by zero exception Stack grows too large due to recursion Null dereference(read or write) Other abort Crash on read instruction

PS

This is meant to be used just as an initial triage system! Don't really 100% on the crashmon's output as there might be bugs in lisa.py. I appreciate pull requests.

So, it's recommended to run the test case again with libgmalloc(3) on, and see if the crash changes to one that is considered to be exploitable.

todo

  • add lisa.py exploitable checks
  • test moreeee
  • follow xpc services (target function -> 'xpc_connection_get_pid'. Usecase: Safari->WebContent)

thanks

  • @apple for crashwrangler
  • LLVM

crashmon's People

Contributors

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