RASIGN2(1)

πŸ“¦
version 6.2.2 Β· 2 versions
, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

πŸ’– RASIGN2 πŸ’–

okay bestie, gather round, because today we're talking about rasign2 β€” that's the radare2 signature management tool, from the radare2 manual page family. it's giving "I make zignatures and I make them correctly." let's get into it πŸ¦‹


✨ SYNOPSIS ✨

rasign2 [-afjhqrvSm] [-A [AAA]] [-i script.r2] [-o sigs.sdb]
        [-s signspace] [-c] [file]

🌸 DESCRIPTION 🌸

so what does this icon actually do? rasign2 generates, dumps, and manages zignature scripts β€” for function identification and cataloging. and what's a zignature, you ask? zignatures are Radare2 scripts that capture metadata associated with function signatures. that's the whole vibe. πŸ’…

it also:

  • supports interpretation of FLIRT .sig files
  • can execute zignature scripts
  • can export signatures in various formats

lowkey a whole toolkit. no cap. ✨


πŸŽ€ OPTIONS πŸŽ€

one bullet per flag, no skipping, we respect the flag economy in this house:

  • -a β€” make signatures from all .o files in the .a file you hand over
  • -A [AAA] β€” same as r2 -A, and yes bestie, the more As you stack the more analysis gets performed πŸ”₯
  • -f β€” interpret the file as a FLIRT .sig file and dump signatures
  • -h β€” show the help menu (our beloved)
  • -j β€” show signatures in json
  • -i script.r2 β€” execute this script inside the r2 instance
  • -o sigs.sdb β€” add signatures to file, and create it if it does not exist πŸ‘‘
  • -q β€” quiet mode (shhh 🀫)
  • -r β€” show output in radare commands
  • -S β€” perform the operation on an sdb signature file (and psst: -o - saves to the same file)
  • -s signspace β€” save all signatures under this signspace
  • -c β€” add collision signatures before writing the file
  • -v β€” show version information
  • -m β€” merge/overwrite signatures with the same name

🌈 ENVIRONMENT 🌈

okay so here's the tea: rasign2 does not use any environment variables. that's it, that's the section. a clean girl. she needs nothing from your shell. πŸ’…βœ¨


🫢 EXAMPLES 🫢

these are the moments, fr fr. copy them exactly, they're doing bits:

generate signatures from a library file:

$ rasign2 -o libc.sdb libc.so.6

perform deep analysis before generating signatures:

$ rasign2 -AA -o enhanced_libc.sdb libc.so.6

output signatures in JSON format:

$ rasign2 -j input_file

show signatures as radare2 commands:

$ rasign2 -r input_file

merge new signatures into an existing file:

$ rasign2 -m -o existing.sdb new_binary

extract signatures from a FLIRT .sig file:

$ rasign2 -f flirt_signatures.sig

ate. no crumbs. πŸ“


πŸ‘‘ THE Z COMMAND IN RADARE2 πŸ‘‘

not me bringing up the z command but it's literally the main character here. the z command in radare2 is dedicated to the management of binary signatures, known as zignatures. here are the key subcommands, bestie, memorize them iykyk:

  • z β€” show zignatures
  • z. β€” find matching zignatures in current offset
  • zb β€” search for best match
  • zd β€” diff current function and signature
  • z* β€” show zignatures in radare format
  • zo β€” manage zignature files
  • zf β€” manage FLIRT signatures
  • z/ β€” search zignatures
  • zc β€” compare current zignspace zignatures
  • zs β€” manage zignspaces
  • zi β€” show zignatures matching information

these commands facilitate a robust workflow for binary analysis, enabling the identification of known functions and comparing binary similarities. ✨ (yes that sentence is doing the heavy lifting and yes it's correct.)


🧚 SUPPORTED ZIGNATURE METRICS 🧚

zignatures in radare2 can be created with various metrics β€” here's the whole alphabet of vibes:

  • a β€” bytes pattern (masked)
  • b β€” raw bytes pattern
  • c β€” base64 comment
  • n β€” real function name
  • g β€” graph metrics (complexity, edges, basic blocks)
  • o β€” original offset
  • r β€” references
  • x β€” cross references
  • h β€” basic block hashes
  • v β€” variables and arguments

πŸ’œ SEE ALSO πŸ’œ

  • radare2(1) β€” go read that one too, bestie, it's the parent lore

🌸 AUTHORS 🌸

  • pancake <pancake@nopcode.org> πŸ’–

bestie reminder: this page is from the radare2 manual, dated Jul 10, 2025, and the page you just read is RASIGN2(1). slay, go make some signatures, and remember β€” every flag, every metric, every example, all preserved, periodt. πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from