Lion Cipher Lab

Script Ghidra with Python and run it headless: list every caller of strcpy and system into a CSV

Why it matters

Triage is the first pass over software you did not write: which programs call dangerous functions, which ones talk to the network, which ones ship the same risky copy routine. Doing that by clicking through the GUI once is learning. Doing it again for fifty binaries, or again next month for the new build, is wasted days. A script turns your question into something you can run on every binary the same way, gets the same answer for the same input, and leaves a file you can sort, diff and hand to a colleague. Ghidra's headless mode and scripting API are how analysts at real teams run the same…

What you'll learn

Steps in this lab

  1. The vocabulary, in plain words
  2. Build a toy program with four known calls
  3. Which Python? What the docs say, and how to check your copy
  4. Write the script
  5. Run it headless: strcpy first, then system
  6. Make it repeatable: many binaries, one CSV
  7. When NOT to trust this, and how a pro does it better

Open the full interactive lab →

Keep learning