
Vulnerability research assistant that locates calls to potentially insecure API functions in a binary file.
"The road to exploitable bugs is paved with unexploitable bugs."
-- Mark Dowd
Rhabdomancer is a blazing-fast IDA headless plugin that locates calls to potentially insecure API functions in a binary file. Auditors can backtrace from these candidate points to find pathways allowing access to untrusted input.

(lib)..plt entries of ELF binaries or the import stubs of PE and Mach-O binaries,
listed as thunks) are traced back to their callers..plt stub
(marked as thunk) and once as its import. Each call location is marked only once in the IDB.conf/rhabdomancer.toml.# marking native ARM64EC functions (e.g., #memcpy),
the variant suffixes of Apple's SDK (e.g., realpath$DARWIN_EXTSN, stat$INODE64), the size of the arguments
that 32-bit x86 calling conventions append (e.g., _WinExec@8), leading dots and underscores (e.g., _strcpy), the
prefixes of library aliases and redirects (e.g., __o_malloc in the Universal CRT, __libc_system,
__GI___snprintf, _IO_fwrite, and __isoc23_sscanf in glibc, also in ELF .plt stubs such as
.__isoc23_sscanf), and, for stubs and such aliases only, the numeric suffix that IDA appends to names already in
use (e.g., memset_0). In custom configurations, a leading #, Apple's variant suffixes, the size of the arguments,
dots, and underscores are ignored as well, and each name may be listed under one priority only.[!NOTE] Fortified functions (e.g.,
__strcpy_chk, used instead ofstrcpywhen building with_FORTIFY_SOURCE) are deliberately not matched, since they are the checked variants of the listed functions. The exception is the fortifiedprintffamily (e.g.,__printf_chk,__snprintf_chk,__syslog_chk), listed with low priority and labeled with their own names (e.g.,[BAD 2] printf_chk): their checks prevent buffer overflows and reject%nin writable format strings, but not format string bugs such as information leaks through%por%s. To also mark the calls to other fortified functions, add them explicitly to a custom configuration (e.g.,"__strcpy_chk"with the same priority asstrcpy). The same works for other redirected names that rhabdomancer doesn't map to their base function yet (e.g.,"__xstat"forstat): they are matched by name, and labeled with it once normalized (e.g.,[BAD 2] xstat).
The easiest way to get the latest release is via crates.io:
export IDADIR=/path/to/ida # if not set, the build script will check common locations
cargo install rhabdomancer --locked
On Windows, instead, use the following commands:
$env:LIBCLANG_PATH="\path\to\clang+llvm\bin"
$env:PATH="\path\to\ida;$env:PATH"
$env:IDADIR="\path\to\ida" # if not set, the build script will check common locations
cargo install rhabdomancer --locked
Alternatively, you can build from source:
git clone --depth 1 https://github.com/0xdea/rhabdomancer
cd rhabdomancer
export IDADIR=/path/to/ida # if not set, the build script will check common locations
cargo build --release --locked
On Windows, instead, use the following commands:
git clone --depth 1 https://github.com/0xdea/rhabdomancer
cd rhabdomancer
$env:LIBCLANG_PATH="\path\to\clang+llvm\bin"
$env:PATH="\path\to\ida;$env:PATH"
$env:IDADIR="\path\to\ida" # if not set, the build script will check common locations
cargo build --release --locked
conf/rhabdomancer.toml (pick the tag
that matches your installed version for its exact built-in list), edit the copy, and set the RHABDOMANCER_CONFIG
environment variable to its path. The file must define the high, medium, and low arrays, and no other keys.
Otherwise, the built-in list is used, which is embedded in the binary at build time from conf/rhabdomancer.toml
(editing that file requires a rebuild).IDADIR environment variable is set if your IDA installation is in a non-standard location.rhabdomancer <binary_file>
Any existing .i64 IDB file will be updated; otherwise, a new IDB file will be created..i64 IDB file with IDA.View > Open subviews > Bookmarks[!NOTE] Rhabdomancer also adds comments at marked call locations. Both bookmarks and comments are tagged as
[BAD n] <function_name>, wherenis the priority tier (0 = high, 1 = medium, 2 = low), so that scripts can search IDBs for them. This format is stable across releases.