Reverse Engineering & Binary Analysis Basics · レッスン

FLIRTシグネチャとライブラリ関数の識別

静的リンクされたライブラリコードを自動認識し、スクリプト作成をアプリケーション固有のロジックに集中できるようにします。

レッスン 4/413 ステップ

「FLIRTシグネチャとライブラリ関数の識別」はCoddyKit上の無料Reverse Engineering & Binary Analysis Basicsレッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはReverse Engineering & Binary Analysis Basics学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Reverse Engineering & Binary Analysis Basicsコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

The Library Noise Problem

You can script disassemblers, automate structure recovery, and patch binaries. But statically-linked programs bundle thousands of library functions (libc, the C++ STL, runtime).

Wading through them by hand wastes enormous time.

Static Linking Inlines Libraries

When a binary is statically linked, library code is copied directly into the executable. There are no import names; printf just looks like another anonymous function.

Identifying these frees you to focus on the author's own code.

What Are FLIRT Signatures?

FLIRT (Fast Library Identification and Recognition Technology) is IDA's system for matching byte patterns of known library functions and auto-naming them.

Ghidra has an equivalent via Function ID databases.

How Pattern Matching Works

A signature records a function's opcode bytes, masking out parts that vary (like relocated addresses).

The tool scans the binary; when bytes match a signature, it applies the known name and prototype.

; masked pattern (.. = varies)
55 8B EC 83 EC .. 56 57

Applying Signatures in IDA

IDA ships .sig files for common runtimes. You apply them from File, Load file, FLIRT signature file, then IDA renames matched functions.

Suddenly hundreds of sub_xxxx become recognizable like strcpy and malloc.

Building Your Own Signatures

For uncommon or custom static libraries, generate signatures with IDA's FLAIR tools: parse the .a archive into a pattern file, then compile it to a .sig.

pcf libcustom.a libcustom.pat
sigmake libcustom.pat libcustom.sig

Ghidra Function ID

Ghidra's Function ID plugin hashes function bodies and stores them in a database. Importing a database for a known runtime auto-labels matches in your target.

You can build databases from libraries you have analyzed before.

Scripting Around Identified Functions

Once libraries are named, your scripts can skip them. Iterate functions and ignore any tagged as library code, analyzing only user functions.

for f in idautils.Functions():
    flags = idc.get_func_flags(f)
    if flags & idc.FUNC_LIB:
        continue  # skip recognized library
    analyze_user_function(f)

Limits and False Matches

Signatures depend on the exact compiler and version. A different optimization level can prevent a match, and short functions may match the wrong library.

Always sanity-check auto-named functions before trusting them.

Pairing with Other Techniques

Combine signatures with string and xref analysis. A function FLIRT names printf should have format-string xrefs nearby; if not, the match may be wrong.

Cross-validation builds confidence.

Applying Prototypes

Identifying a library function also imports its prototype. Once memcpy(dst, src, n) is recognized, the decompiler labels its three arguments correctly.

This propagates type information into callers, sharply improving pseudocode readability.

; before: sub_401200(a, b, c)
; after:  memcpy(dst, src, len)

Quick Check

What is the main purpose of FLIRT signatures in static analysis?

Recap

You can now cut through library clutter:

  • Static linking hides libraries as anonymous functions
  • FLIRT (IDA) and Function ID (Ghidra) auto-name them by pattern
  • Build custom signatures with FLAIR for uncommon libs
  • Script to skip library code, but verify matches
無料で開始

AI チューターと学ぶ Assembly — 無料

ブラウザでリアルコードを書いて実行し、24/7 の AI チューターから瞬時にサポートを受け、ウェブまたはアプリで続きから学習できます。

コース
12
レッスン
48

よくある質問

「FLIRTシグネチャとライブラリ関数の識別」レッスンは無料ですか?

はい。「FLIRTシグネチャとライブラリ関数の識別」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Reverse Engineering & Binary Analysis Basicsコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Reverse Engineering & Binary Analysis Basicsコースには全4レッスンが含まれています。

「FLIRTシグネチャとライブラリ関数の識別」で何を学びますか?

静的リンクされたライブラリコードを自動認識し、スクリプト作成をアプリケーション固有のロジックに集中できるようにします。 ブラウザで直接実行するハンズオンコードでReverse Engineering & Binary Analysis Basicsを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Reverse Engineering & Binary Analysis Basicsを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのReverse Engineering & Binary Analysis Basicsは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。

「FLIRTシグネチャとライブラリ関数の識別」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このReverse Engineering & Binary Analysis Basicsレッスンでコードを書いて実行できますか?

はい。すべてのReverse Engineering & Binary Analysis Basicsレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. IDAPythonとGhidraスクリプティング
  2. データ構造復元の自動化
  3. バイナリパッチング技術
  4. FLIRTシグネチャとライブラリ関数の識別
← Reverse Engineering & Binary Analysis Basicsに戻る