Code Monkey home page Code Monkey logo

go_parser's Introduction

Yet Another Golang binary parser for IDAPro

中文 | English


golang_loader_assistjeb-golang-analyzer 启发,为 IDAPro 写了一个更完备的 Go 二进制文件解析工具。

核心功能:

  1. 自动定位 firstmoduledata 的位置并解析;
  2. 根据 firstmoduledata 中的信息定位到 pclntab(PC Line Table),并从 pclntab 入手解析、恢复函数符号,抽取源码文件列表
  3. 解析 strings 和 string pointers
  4. 根据 firstmoduledata 中的信息,解析所有 types 并为 types 各种属性打上有意义的 comment 或 dref;
  5. 解析 itab(Interface Table);
  6. 以上功能对于 buildmode=pie 类型的 Go binary 文件依然有效。

DDGMiner v5029 (MD5: 95199e8f1ab987cd8179a60834644663) 样本中核心的配置文件 struct 解析结果示例如下:

样本源码文件列表:

文件列表:

  • go_parser.py :整套工具的入口文件,在 IDAPro 中 [Alt+F7] 组合键,执行此脚本;
  • common.py: 通用变量和函数定义;
  • pclntbl.py: 解析 pclntab(PC Line Table);
  • strings.py: 解析 strings 和 string pointers;
  • moduldata.py: 解析 firstmoduledata
  • types_builder.py: 解析所有 types
  • itab.py: 解析 itab(Interface Table);.

Note

  1. 此工具只在 IDA7.2/IDA7.0 上测试过,其他的 IDA 版本未经测试;
  2. strings 解析模块从 golang_loader_assist 移植过来,我自己又增加了 string pointers 解析的功能,目前只支持 x86 架构。

Refer

  1. Analyzing Golang Executables
  2. Reversing GO binaries like a pro
  3. Reconstructing Program Semantics from Go binaries.pdf

go_parser's People

Contributors

0xjiayu avatar

Watchers

 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.