Giter Club home page Giter Club logo

proc_mem_ida_loader's Introduction

Summary

Example image

This IDA loader can snapshot a running 32-bit or 64-bit Linux process, as well as 32-bit and 64-bit WINE processes on Linux, load it into IDA with the actual processes memory permissions, and then apply DWARF symbols using IDA's built-in DWARF loader for each loaded binary (that has DWARF symbols)!

This is a small IDA loader script (copy proc_mem.py into your ida/loaders folder) and then open a /proc/<pid>/mem file in IDA!

This will automatically find all memory regions in the process, create segments for them with the correct permissions, and apply symbols to them!

This works for both 32-bit and 64-bit Linux processes. It also works with WINE binaries that have 32 or 64-bit PE files (with DWARF symbols).

Also works with qemu-user processes!

QEMU user IDA image

How does it work?

Simple, it dumps /proc/<pid>/maps to get the listing of memory regions for the process, parses them with regex. This gives us the state of the programs address space and permissions. As well as tells us if it's a mapped file. We read the bytes from /proc/<pid>/mem and then initialize the segment with that data.

Then, for all memory regions which are mapped from a file, if that file is mapped at offset 0 (eg. the \x7fELF or MZ headers are mapped at this location), we will attempt to load it as a DWARF symbol file using IDA's built-in DWARF symbol loader.

IDA's DWARF loader plugin isn't documented, but I reversed it out and found that by calling run_plugin with argument 3 you can pass in a filename and an offset. Thus, we use the original IDA DWARF loader and hopefully should get all the approprate info you would get if you loaded files individually!

proc_mem_ida_loader's People

Contributors

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