GithubHelp home page GithubHelp logo

z472421519 / structchecker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from absoler/varviewer

0.0 0.0 0.0 396 KB

map values in binary file with variable names from source files

Shell 0.02% C++ 88.95% Python 10.85% C 0.16% Makefile 0.03%

structchecker's Introduction

dependency

apt

apt-get update
apt -y install build-essential bison libtool cmake vim gcc g++ libc6-dev autoconf automake curl wget git make unzip openssh-server gdb
apt -y install pkgconf zlib1g zlib1g-dev libzstd1 meson ninja-build doxygen bzip2 flex
apt -y install graphviz libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev libtk8.6 libgdm-dev libdb4o-cil-dev libpcap-dev 

build python

wget https://github.com/python/cpython/archive/refs/tags/v3.11.1.zip
unzip v3.11.1.zip && cd cpython-3.11.1/ && ./configure --enable-optimizations
make -j 32 && make install

build pip

pip3 install --upgrade pip
pip3 install bz2file pydot graphviz angr iced_x86 pyelftools pyinstrument

libdwarf

need install libdwarf, can download from https://github.com/davea42/libdwarf-code/releases

mkdir /tmp/build && cd /tmp && wget  https://github.com/davea42/libdwarf-code/releases/download/v0.5.0/libdwarf-0.5.0.tar.xz && tar xf libdwarf-0.5.0.tar.xz && rm libdwarf-0.5.0.tar.xz && cd  /tmp/build && meson /tmp/libdwarf-0.5.0  &&ninja && ninja install && ninja test

angr

pip install angr, z3-solver

usage

extract debug info

  1. go into extracter/ and make extracter
  2. execute ./extracter <binary-to-extract> -o <json-file>, there are also some debug option(s)
    1. -r for print raw dwarf expression, -nc for only print complex expressions, -fde for print CFA info, and --no-traverse for avoidance of fully traversing, and quickly print other info

analysis

  1. rewrite.py rewrite a piece from large binary into a seperate binary file. ./rewrite.py <large-binary> <startpc> <endpc>
  2. variable.py deal with debuginfo from json
  3. dwarf_iced_map.py, dwarf_vex_map.py mapping between different framework

structchecker's People

Contributors

absoler avatar z472421519 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.