การวิเคราะห์สตริงและการอ้างอิงข้าม
ใช้สตริงและการอ้างอิงข้าม (xrefs) เป็นทางลัดเพื่อทำความเข้าใจจุดประสงค์ของไบนารีและนำทางระหว่างโค้ดกับข้อมูล
การวิเคราะห์สตริงและการอ้างอิงข้าม เป็นบทเรียน Reverse Engineering & Binary Analysis Basics ฟรีบน CoddyKit นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน คุณสามารถอ่านบทเรียนทั้งหมดด้านล่างฟรี — จากนั้นลองปฏิบัติด้วยตัวคุณเองในเบราว์เซอร์พร้อมตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7 บทเรียนนี้เป็นส่วนหนึ่งของเส้นทางการเรียน 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
คำถามที่พบบ่อย
บทเรียน “การวิเคราะห์สตริงและการอ้างอิงข้าม” ฟรีหรือไม่
ใช่ — ข้อความเต็มของ “การวิเคราะห์สตริงและการอ้างอิงข้าม” ฟรีให้อ่านที่นี่บนเว็บ เพื่อปฏิบัติแบบโต้ตอบ (ตัวแก้ไขโค้ดในตัวและติวเตอร์ AI ตลอด 24/7) และปลดล็อคส่วนที่เหลือของคอร์ส Reverse Engineering & Binary Analysis Basics ให้อัปเกรดเป็น CoddyKit PRO คอร์ส Reverse Engineering & Binary Analysis Basics มีบทเรียนทั้งหมด 4 บทเรียน
คุณจะเรียนรู้อะไรในบทเรียน “การวิเคราะห์สตริงและการอ้างอิงข้าม”
ใช้สตริงและการอ้างอิงข้าม (xrefs) เป็นทางลัดเพื่อทำความเข้าใจจุดประสงค์ของไบนารีและนำทางระหว่างโค้ดกับข้อมูล คุณปฏิบัติ Reverse Engineering & Binary Analysis Basics ด้วยโค้ดที่ใช้งานได้จริงที่คุณเรียกใช้โดยตรงในเบราว์เซอร์ และติวเตอร์ AI ตลอด 24/7 ตอบคำถามของคุณขณะที่คุณไปผ่านบทเรียน
คุณต้องมีประสบการณ์ก่อนที่จะเริ่มเรียน Reverse Engineering & Binary Analysis Basics หรือไม่
ไม่จำเป็นต้องมีประสบการณ์มาก่อน Reverse Engineering & Binary Analysis Basics บน CoddyKit ออกแบบมาสำหรับผู้เริ่มต้นไปจนถึงผู้เรียนขั้นสูง คุณสามารถเริ่มต้นที่นี่หรือเริ่มจากตัวแรกและเรียนด้วยความเร็วของคุณเอง นี่คือบทเรียนที่ 4 จากทั้งหมด 4 บทเรียน
บทเรียน “การวิเคราะห์สตริงและการอ้างอิงข้าม” ใช้เวลานานแค่ไหน
บทเรียน CoddyKit ส่วนใหญ่ใช้เวลาประมาณ 5–10 นาที แต่ละบทเรียนจึงสั้นและเป็นแบบโต้ตอบ คุณสามารถก้าวหน้าอย่างต่อเนื่องและกลับมาเรียนต่อจากตรงที่เพิ่งหยุดบนเว็บและแอปได้เลย
ฉันเขียนและรันโค้ดในบทเรียน Reverse Engineering & Binary Analysis Basics นี้ได้ไหม
ได้ บทเรียน Reverse Engineering & Binary Analysis Basics ทุกบทมีตัวแก้ไขโค้ดในตัว คุณจึงเขียนและรันโค้ดจริงได้เลยในเบราว์เซอร์ และได้รับข้อเสนอแนะจาก AI ในทันที — ไม่ต้องติดตั้งในเครื่องของคุณ
บทเรียนทั้งหมดในหลักสูตรนี้
- บทนำสู่เครื่องแยกส่วนคำสั่ง
- การระบุฟังก์ชันและข้อมูล
- การวิเคราะห์กราฟลำดับการทำงาน
- การวิเคราะห์สตริงและการอ้างอิงข้าม