All Projects → nlitsme → Pyidbutil

nlitsme / Pyidbutil

Licence: mit
A python library for reading IDA pro databases.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Pyidbutil

Anubis
Free open-source training software / cheat for Counter-Strike: Global Offensive, written in C.
Stars: ✭ 81 (-17.35%)
Mutual labels:  reverse-engineering
Pirogue
PiRogue is a small device meant to ease network interception and analysis.
Stars: ✭ 90 (-8.16%)
Mutual labels:  reverse-engineering
Ipod Gadget
iPod usb gadget for audio playback
Stars: ✭ 94 (-4.08%)
Mutual labels:  reverse-engineering
Az2tf
See the new version here:
Stars: ✭ 83 (-15.31%)
Mutual labels:  reverse-engineering
R2m2
radare2 + miasm2 = ♥
Stars: ✭ 86 (-12.24%)
Mutual labels:  reverse-engineering
Ida For Delphi
IDA Python Script to Get All function names from Event Constructor (VCL)
Stars: ✭ 92 (-6.12%)
Mutual labels:  reverse-engineering
Lookinsidethebox
Breaks the encryption and obfuscation layers that Dropbox applies to their modified Python interpreter.
Stars: ✭ 80 (-18.37%)
Mutual labels:  reverse-engineering
Reverse Engineering
Reverse-Engineered Tools Count-106
Stars: ✭ 94 (-4.08%)
Mutual labels:  reverse-engineering
Barf Project
BARF : A multiplatform open source Binary Analysis and Reverse engineering Framework
Stars: ✭ 1,280 (+1206.12%)
Mutual labels:  reverse-engineering
Go Whatsapp
WhatsApp Web API
Stars: ✭ 1,319 (+1245.92%)
Mutual labels:  reverse-engineering
Iostrace
alternative strace for iOS device(64bit) on frida
Stars: ✭ 84 (-14.29%)
Mutual labels:  reverse-engineering
Pentesting toolkit
🏴‍☠️ Tools for pentesting, CTFs & wargames. 🏴‍☠️
Stars: ✭ 1,268 (+1193.88%)
Mutual labels:  reverse-engineering
Zxhookutil
【iOS逆向】高效Tweak工具函数集,基于theos、monkeyDev。(含方法追踪、无须关心层级获取任意view、拦截并修改全局请求、清除keyChain数据、打印block参数、打印类的属性和方法、数据转换、数据存储、添加轮询、网络请求、加密解密等各种协助逆向分析函数)
Stars: ✭ 93 (-5.1%)
Mutual labels:  reverse-engineering
Php Malware Analysis
Deobfuscation and analysis of PHP malware captured by a WordPress honey pot
Stars: ✭ 82 (-16.33%)
Mutual labels:  reverse-engineering
Jnitrace Engine
Engine used by jnitrace to intercept JNI API calls.
Stars: ✭ 94 (-4.08%)
Mutual labels:  reverse-engineering
Projectchampollion
Reverse engineering Rosetta 2 in M1 Mac
Stars: ✭ 80 (-18.37%)
Mutual labels:  reverse-engineering
Cutter
Free and Open Source Reverse Engineering Platform powered by rizin
Stars: ✭ 10,073 (+10178.57%)
Mutual labels:  reverse-engineering
Lighthouse
A Code Coverage Explorer for Reverse Engineers
Stars: ✭ 1,348 (+1275.51%)
Mutual labels:  reverse-engineering
Xil2cppdumper
IL2CppDumper writed in C++ by xia0
Stars: ✭ 97 (-1.02%)
Mutual labels:  reverse-engineering
Fundamentos Engenharia Reversa
Livro: Fundamentos de Engenharia Reversa
Stars: ✭ 93 (-5.1%)
Mutual labels:  reverse-engineering

IDBTOOL

A tool for extracting information from IDA databases. idbtool knows how to handle databases from all IDA versions since v2.0, both i64 and idb files. You can also use idbtool to recover information from unclosed databases.

idbtool works without change with IDA v7.0.

Much faster than loading a file in IDA

With idbtool you can search thousands of .idb files in seconds.

More precisely: on my laptop it takes:

  • 1.5 seonds to extract 143 idc scripts from 119 idb and i64 files.
  • 3.8 seonds to print idb info for 441 files.
  • 5.6 seconds to extract 281 enums containing 4726 members from 35 files.
  • 67.8 seconds to extract 5942 structs containing 33672 members from 265 files.

Loading a approximately 5 Gbyte idb file in IDA, takes about 45 minutes. While idb3.h takes basically no time at all, no more than a few milliseconds.

Download

Two versions of this tool exist:

One written in python

One written in C++

Both repositories contain a library which can be used for reading .idb or .i64 files.

Usage

Usage:

idbtool [options] [database file(s)]
  • -n or --names will list all named values in the database.

  • -s or --scripts will list all scripts stored in the database.

  • -u or --structs will list all structs stored in the database.

  •     `--imports` will list all imported symbols from the database
    
  • -e or --enums will list all enums stored in the database.

  • -i or --info will print some general info about the database.

  • -d or --pagedump dump btree page tree contents.

  • --inc, --dec list all records in ascending / descending order.

  • -q or --query search specific records in the database.

  • -m or --limit limit the number of results returned by -q.

  • -id0, -id1 dump only one specific section.

  • --i64, --i32 tell idbtool that the specified file is from a 64 or 32 bit database.

  • --recover group files from an unpacked database.

  • --classify summarizes node usage in the database

  • --dump hexdump the original binary data

query

Queries need to be specified last on the commandline.

example:

idbtool [database file(s)]  --query  "Root Node;V"

Will list the source binary for all the databases specified on the commandline.

A query is a string with the following format:

  • [==,<=,>=,<,>] - optional relation, default: ==
  • a base node key:
    • a DOT followed by the numeric value of the nodeid.
    • a HASH followed by the numeric value of the system-nodeid.
    • a QUESTION followed by the name of the node. -> a 'N'ame node
    • the name of the node. -> the name is resolved, results in a '.'Dot node
  • an optional tag ( A for Alt, S for Supval, etc )
  • an optional index value

example queries:

  • Root Node;V -> prints record containing the source binary name
  • ?Root Node -> prints the Name record pointing to the root
  • >Root Node -> prints the first 10 records starting with the root node id.
  • <Root Node -> prints the 10 records startng with the recordsbefore the rootnode.
  • .0xff000001;N -> prints the rootnode name entry.
  • #1;N -> prints the rootnode name entry.

List the highest node and following record in the database in two different ways, the first: starting at the first record below ffc00000, and listing the next. The second: starting at the first record after ffc00000, and listing the previous:

  • --query "<#0xc00000" --limit 2 --inc -v
  • --query ">#0xc00000" --limit 2 --dec -v

Note that this should be the nodeid in the $ MAX NODE record.

List the last two records:

  • --limit 2 --dec -v

List the first two records, the $ MAX LINK and $ MAX NODE records:

  • --limit 2 --inc -v

A full database dump

Several methods exist for printing all records in the database. This may be useful if you want to investigate more of IDA''s internals. But can also be useful in recovering data from corrupted databases.

  • --inc, --dec can be used to enumerate all b-tree records in either forward, or backward direction.
    • add -v to get a prettier key/value output
  • --id0 walks the page tree, instead of the record tree, printing the contents of each page
  • --pagedump linearly skip through the file, this will also reveal information in deleted pages.

naked files

When IDA or your computer crashed while working on a disassembly, and you did not yet save the database, you are left with a couple of files with extensions like .id0, .id1, .nam, etc.

These files are the unpacked database, i call them naked files.

Using the --filetype and --i64 or --i32 options you can inspect these naked files individually. or use the --recover option to view them as a complete database together. idbtool will figure out automatically which files would belong together.

idbtool can figure out the bitsize of the database from an .id0 file, but not(yet) from the others.

LIBRARY

The file idblib.py contains a library.

TODO

  • add option to list all comments stored in the database
  • add option to list flags for a list of addresses.

Author

Willem Hengeveld [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].