文字列とクロスリファレンス分析
文字列とクロスリファレンス(xrefs)を手がかりに、バイナリの目的を素早く理解し、コードとデータの間を移動する方法を学びます。
「文字列とクロスリファレンス分析」はCoddyKit上の無料Reverse Engineering & Binary Analysis Basicsレッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはReverse Engineering & Binary Analysis Basics学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Reverse Engineering & Binary Analysis Basicsコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
Strings Are Clues
You can disassemble code, identify functions, and read control flow graphs. One of the fastest ways to orient yourself in an unknown binary is to read its strings.
Error messages, URLs, file paths, and format specifiers reveal intent before you read a single instruction.
Extracting Strings
The classic command-line tool dumps printable sequences. Disassemblers like Ghidra and IDA have a dedicated Strings window with addresses.
strings -a -n 5 target.bin
strings -e l target.bin # 16-bit little-endian (UTF-16)ASCII vs Wide Strings
Windows binaries often store text as UTF-16 (wide) strings, where each character is two bytes. A naive ASCII scan misses them.
Always check for both encodings; missing wide strings hides half the evidence.
ASCII: 48 65 6C 6C 6F -> Hello
UTF-16: 48 00 65 00 6C 00 6C 00 -> HelloWhat Is a Cross-Reference?
A cross-reference (xref) links a location to every place that references it.
- Code xref: an instruction that jumps or calls here
- Data xref: an instruction that reads or writes this address
From String to Code
The power move: find an interesting string, then follow its data xref to the code that uses it.
Finding the string 'Invalid license key' and jumping to its xref often lands you right inside the license check.
; In Ghidra: right-click string -> References -> shows
; FUN_00401a30 loads this string at 0x00401a55Call Graphs from Xrefs
Xrefs also map function relationships. Listing who calls a function (callers) and who it calls (callees) builds a call graph.
This shows how a key routine fits into the program's overall structure.
Imports as Anchors
API imports are high-value xref targets. Find the import for connect or CreateFileW, then xref it to locate every networking or file routine.
This focuses analysis on the behavior you care about.
; xrefs to 'recv' reveal all network read sites
0x00402100 call recv
0x004023f0 call recvRenaming and Commenting
As xrefs reveal purpose, rename functions and add comments. FUN_00401a30 becomes check_license.
Good naming compounds: every future xref now reads as meaningful pseudocode.
Strings That Mislead
Be cautious: strings can be decoys, dead code, or library boilerplate. A string's presence does not prove the feature is reachable.
Confirm with xrefs that the string is actually referenced by live code.
Encrypted or Obfuscated Strings
Malware often hides strings, decrypting them at runtime. If strings shows mostly gibberish, look for a small decode routine referenced everywhere; that is the string decryptor.
Identifying it unlocks the rest of the analysis.
Navigating with Xref Lists
Disassemblers let you jump through xrefs interactively. Pressing the xref hotkey on a function shows every caller, and you can walk up the chain to main.
This turns a flat list of addresses into a navigable map of the program.
; IDA: place cursor on function, press X
; Ghidra: right-click -> References -> Show References toQuick Check
You found the string 'Invalid license key'. What is the most efficient next step to reach the license-check logic?
Recap
Strings and xrefs are a static-analysis superpower:
- Extract ASCII and UTF-16 strings for instant context
- Follow data xrefs from strings into key code
- Use import xrefs and call graphs to map structure
- Beware decoys and on-the-fly string decryption
よくある質問
「文字列とクロスリファレンス分析」レッスンは無料ですか?
はい。「文字列とクロスリファレンス分析」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Reverse Engineering & Binary Analysis Basicsコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Reverse Engineering & Binary Analysis Basicsコースには全4レッスンが含まれています。
「文字列とクロスリファレンス分析」で何を学びますか?
文字列とクロスリファレンス(xrefs)を手がかりに、バイナリの目的を素早く理解し、コードとデータの間を移動する方法を学びます。 ブラウザで直接実行するハンズオンコードでReverse Engineering & Binary Analysis Basicsを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Reverse Engineering & Binary Analysis Basicsを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのReverse Engineering & Binary Analysis Basicsは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。
「文字列とクロスリファレンス分析」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このReverse Engineering & Binary Analysis Basicsレッスンでコードを書いて実行できますか?
はい。すべてのReverse Engineering & Binary Analysis Basicsレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- 逆アセンブラ入門
- 関数とデータの特定
- 制御フローグラフ解析
- 文字列とクロスリファレンス分析