For the complete documentation index, see llms.txt. This page is also available as Markdown.

Generate FLIRT signatures from libraries

FLAIR is the standalone toolset for building FLIRT signatures from compiled libraries and object files, outside of any IDA database. Use it when you have the library itself (a static .lib/.a, or a set of .obj/.o files), for example the C runtime or a third-party SDK you link against. If you instead want to sign functions you've already analyzed inside IDA, see Generate FLIRT signatures from analyzed binaries.

Building a signature is a two-stage pipeline: a format-specific parser turns the library into a pattern file (.pat), then sigmake turns the pattern file into a signature file (.sig).

Prerequisites

  • A compiled library or object files to sign

  • The FLAIR tools, bundled with IDA under tools/flair/ (<IDA dir>\tools\flair\ on Windows, <IDA dir>/tools/flair/ on Linux, <IDA.app>/Contents/MacOS/tools/flair/ on macOS)

Step 1: Parse the library into a pattern file

Pick the parser that matches your library's object format:

Format
Tool

ELF (.a, .o)

pelf

COFF (.lib, .obj)

pcf

Mach-O (.a, .o)

pmacho

OMF libraries

plb

Trimedia object files

ptmobj

PSX (Sony PlayStation) libraries

ppsx

pelf mylib.a mylib.pat

pelf emits the bit-level relocation discriminators that format v11 uses on RISC targets (ARM, AArch64, MIPS, RISC-V). pcf and pmacho emit the same v11 discriminators for ARM and ARM64 COFF and Mach-O relocations.

Step 2: Build the signature with sigmake

If sigmake finds functions with identical patterns, it cannot tell them apart and reports a collision. It then writes the colliding functions, in groups, to an exclusion file (.exc) next to the signature. To resolve the collisions:

  1. Delete the comment lines at the top of the .exc file, starting with ;---------. Otherwise sigmake ignores your edits.

  2. In each group, put + at the start of the line of the function to keep. Put - instead if you are not sure: the name then appears only as a comment in IDA. Leave a group unmarked to exclude all of its functions.

  3. Re-run sigmake.

Two or three files are involved:

File
Description

Pattern file (.pat)

Produced by the parser in Step 1; holds the extracted patterns, names, and references.

Signature file (.sig)

Produced by sigmake in Step 2; the file IDA actually loads.

Exclusion file (.exc)

Produced by sigmake only when there's a collision to resolve manually.

With -K, sigmake keeps a colliding function separate from the rest of its group if its references are enough to tell it apart, instead of requiring a manual .exc entry. Run sigmake without arguments for the full list of switches.

Step 3: Apply the signature

Load the resulting .sig file the same way as any other FLIRT signature, via File → Load file → FLIRT signature file..., or by placing it in IDA's sig/<processor>/ directory alongside the bundled signatures.

See also

Last updated

Was this helpful?