Git Product home page Git Product logo

nosy-newt's Introduction

Nosy Newt

Nosy Newt is a simple concolic execution tool for exploring the input space of a binary executable programs. I created this POC because i could not find any better tool for this. It is extensively using Triton for almost everything (hooking, solving constrains, etc).

Use cases

Nosy Newt is designed to discover new inputs to trigger different paths in your binary using concolic execution. It requires to:

  1. Select a program that reads a file.
  2. Create a "inputs" directory with at least one file.
  3. Launch nosy newt indicating the input file in the argument using "@@".
  4. Wait for more inputs to be discover.

Requirements

  • Triton
  • Some dedicated RAM memory (at least 4 GB).
  • Time.

Installation

  1. Install Triton with PIN support
  2. Install the Triton python module locally
  3. Copy the "triton" script to your PATH (usually ~/.local/bin)
  4. Install Nosy Newt:
    $ git clone https://github.com/CIFASIS/nosy-newt
    $ cd nosy-newt
    $ python setup.py install --local

Example

$ mkdir inputs
$ python -c "print 'a'*24" > inputs/input.dat 
$ ./newt.py -n 3 -i inputs "unzip -l @@"
Using ['unzip', '-l', 'test.dat'] as arguments
Exploring inputs/input.dat executing unzip
Archive:  test.dat
Hooking read of test.dat
symbolized 0x71af20L with 0x61L
...
symbolized 0x71af38L with 0xaL
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of test.dat or
        test.dat.zip, and cannot find test.dat.ZIP, period.
Solving path conditions..
Dumping inputs/-7819407262199667705.dat with 'aaaPaaaaaaaaaaaaaaaaaaaa\n'
Solving path conditions..
Dumping inputs/-43234624507741908.dat with 'aaP\xafaaaaaaaaaaaaaaaaaaaa\n'
Solving path conditions..
Dumping inputs/-8008955989580669208.dat with 'aP\xaf\xafaaaaaaaaaaaaaaaaaaaa\n'
Solving path conditions..
Dumping inputs/-1547994686380196427.dat with 'P\xaf\xaf\xafaaaaaaaaaaaaaaaaaaaa\n'
Exploring inputs/-8008955989580669208.dat executing unzip
...

TODO:

  • Better exploration system (now just random)
  • Shared library support
  • Emulated syscalls (for detecting I/O)
    • open
    • read
    • mmap (basic)
    • close
    • seek
  • Website + Documentation

nosy-newt's People

Contributors

gaa-cifasis avatar

Watchers

James Cloos avatar  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.