Date: 2026-06-09
Purpose: show how real researchers and CTF authors approach firmware research goals: finding zero-days, reproducing one-days and n-days, discovering backdoors or implants, solving firmware challenges, and getting difficult firmware to emulate.
Use this with:
iot_firmware_elite_field_manual.mdiot_firmware_quickstart.mdemba_firmware_analysis_walkthrough.md_personal/roadmaps/career_roi_comparison_2025.csvonly as a career context file, not as technical methodology
This file is not a list of links to skim. Each case study is a pattern to copy:
goal -> initial clues -> sequence of moves -> proof standard -> what to practice
- How To Read These Writeups
- Case Study Map
- TP-Link Archer A7 / C7 Pwn2Own Cluster
- Tenda AC15 Emulation Against The Odds
- D-Link Backdoor In Firmware Web Server
- TP-Link Horse Shell Malicious Firmware Implant
- Forescout TP-Link Rooting Routers Research
- Tenable TP-Link USB Symlink Vulnerabilities
- Personal D-Link DIR-820L Firmware Analysis
- CTF Firmware Extraction Examples
- General Research Blogs To Read Regularly
- Exercises
- Sources
Do not read a writeup like entertainment.
Read it like this:
1. Stop after the target/background section.
2. Predict the next move.
3. Read only until the next artifact appears.
4. Recreate that artifact locally if legal and practical.
5. Write a one-page "method card" from memory.
6. Compare your method card to the original.
For each writeup, extract:
| Question | Why it matters |
|---|---|
| What was the goal? | 0-day, n-day reproduction, exploit chain, backdoor, emulation, CTF flag |
| What was the first useful artifact? | firmware image, advisory, patch, binary, pcap, hardware dump |
| How did they find attack surface? | routes, daemons, protocols, init scripts, strings, xrefs |
| How did they prove reachability? | request, packet, service start, route map, emulation, hardware |
| How did they prove root cause? | source line, decompiled function, debugger, crash, patch diff |
| What made it exploitable? | command sink, memory primitive, auth bypass, root context, implant behavior |
| What was the blocker? | NVRAM, hardware, missing libs, auth, encryption, patch gaps |
| What can I practice safely? | extraction, route mapping, patch diff, emulation, report writing |
| Goal | Study | What it teaches |
|---|---|---|
| Pwn2Own n-day/1-day reproduction | TP-Link Archer A7/C7 writeups | turn advisory/PoC clues into binary/protocol analysis and exploitability |
| Emulation against blockers | Tenda AC15 EMUX | NVRAM/hardware stubbing, rootfs bootstrapping, service rehosting |
| Backdoor discovery | D-Link backdoor | extracting firmware, reversing web server auth logic, recognizing hidden trust paths |
| Firmware malware/implant analysis | Check Point Horse Shell | malicious firmware comparison, implant capability analysis, router persistence |
| Incomplete patch/new vuln | Forescout TP-Link | rooting device, reviewing prior fixes, finding residual debug functionality |
| Physical + network chain | Tenable Archer A7 USB symlink | attack assumptions, symlink/path behavior, physical precondition honesty |
| Personal end-to-end firmware analysis | D-Link DIR-820L | binwalk/rootfs/web CGI/static-to-reproducer flow |
| CTF mechanics | Grey Cat Firmware, PatriotCTF Banner | extraction, filesystem search, odd acquisition sources such as PCAP |
Sources:
- ZDI: Exploiting the TP-Link Archer A7 at Pwn2Own Tokyo
- STAR Labs: Analysis and exploitation of a recent TP-Link Archer A7 vulnerability
- Synacktiv: Pwn2Own Tokyo 2020: Defeating the TP-Link AC1750
- Flashback Team: LAO BOMB - TP-LINK Archer C7/A7 LAN RCE
- WithSecure Labs: TP-Link AC1750 Pwn2Own 2019 advisory
Different researchers attacked related TP-Link router targets and daemons. The goal was not "scan firmware and hope." It was to identify a reachable LAN/router management service, reverse the protocol or request path, find a command injection or memory corruption primitive, and turn it into reliable code execution.
firmware/advisory/target device
-> identify model, firmware version, architecture
-> extract rootfs
-> find startup scripts and listening daemons
-> locate target daemon such as tdpServer or sync-server
-> reverse protocol/message parser
-> trace attacker-controlled fields
-> find sink or memory corruption
-> build LAN-side request/packet
-> demonstrate root-level impact
The repeated pattern is:
daemon + protocol + reachable LAN surface + root context = high-value firmware target
For n-day reproduction, start from public advisories and ask:
- Which binary contains the vulnerable service?
- Which init script starts it?
- Which port/protocol reaches it?
- Which parser handles the attacker field?
- What changed in the patched firmware?
Use an old router firmware image:
binwalk -Me firmware.bin
find squashfs-root -type f -perm /111 -exec file {} \; | tee executables.txt
rg -n "tdp|sync|httpd|uhttpd|upnp|soap|cgi|lan|udp|tcp" squashfs-root
strings -a squashfs-root/usr/bin/* 2>/dev/null | rg "GET|POST|http|tdp|sync|system|popen|strcpy|sprintf"Then write:
Which daemon would I reverse first, and why?
What input reaches it?
What would prove exploitability?
Sources:
- EMUX: Extracting the Tenda AC15 firmware
- EMUX: Emulating Tenda AC15
- CVE-2020-10987 replication writeups around Tenda AC15 command injection
The goal was not just "extract files." It was to get the Tenda AC15 firmware far enough into a rehosted/emulated state that the web interface and vulnerable handlers could be exercised.
obtain/dump firmware
-> carve flash/rootfs
-> identify architecture and kernel/rootfs assumptions
-> start firmware under QEMU/EMUX
-> observe crashes/reboots
-> identify missing hardware/NVRAM behavior
-> stub/map vendor NVRAM functions
-> start web service
-> exercise vulnerable route
Emulation failure is usually specific:
missing NVRAM
missing device node
missing config partition
wrong kernel/machine model
service expecting board-specific behavior
The elite move is to identify the exact missing assumption, not to keep rerunning the same emulator command.
When an emulated service exits:
QEMU_STRACE=1 qemu-arm-static -L rootfs rootfs/bin/target args 2>&1 | tee qemu_strace.txt
rg -n "open|ENOENT|ioctl|nvram|mtd|proc|sys|config|not found" qemu_strace.txt
rg -n "nvram|getenv|mib|get_config|uci" rootfs 2>/dev/nullWrite:
What exactly is missing?
Can I stub it?
Is static proof enough if stubbing is too expensive?
Sources:
- Hackaday summary of reverse engineering a D-Link backdoor
- Original public work by Craig Heffner / devttys0-style firmware analysis
This is a classic example of discovering a hidden trust path/backdoor in firmware by extracting the filesystem and reversing the web server authentication logic.
download firmware
-> binwalk extraction
-> locate SquashFS/rootfs
-> identify web server binary
-> reverse authentication/HTTP handling paths
-> find special-case bypass condition
-> prove request behavior
Backdoors often do not look like "backdoor" strings. They look like:
- special user-agent handling
- magic token comparisons
- debug endpoints
- hidden accounts
- compile-time/vendor support paths
- conditions reachable only with a strange header or file
On any firmware web server binary:
strings -a httpd | rg -i "user-agent|authorization|cookie|admin|debug|backdoor|xml|soap|login|password"In Ghidra/IDA:
Find HTTP header parsing.
Find auth decision branch.
Find string comparisons.
Ask: is there any alternate path to "authenticated"?
Source:
- Check Point Research: malicious firmware implant for TP-Link routers linked to Camaro Dragon / Mustang Panda overlap
This is not a normal vulnerability-hunting writeup. It is firmware implant/malware analysis: understand what was modified, what capabilities the implant had, how it persisted, and what threat activity it supported.
obtain suspicious router firmware/image
-> identify modified components
-> reverse implant binaries/scripts
-> map command-and-control behavior
-> identify persistence and network exposure
-> compare with known router implants
-> produce detection/defensive guidance
Firmware malware/backdoor analysis asks a different question:
What changed, what persists, what communicates, and what control does the operator get?
Useful local workflow:
find rootfs -type f -perm /111 -exec file {} \; | tee executables.txt
rg -n "http|https|socket|connect|listen|shell|cmd|token|key|cron|init.d|rcS" rootfs 2>/dev/null
find rootfs/etc/init.d rootfs/etc/rc.d rootfs/etc/cron* -type f 2>/dev/nullTake two firmware versions from the same vendor:
diff -ruN old_rootfs new_rootfs > rootfs.diff
rg -n "init|cron|rcS|http|connect|shell|authorized_keys|dropbear|iptables" rootfs.diffWrite:
Which changes are expected vendor updates?
Which changes create persistence or remote control?
Source:
- Forescout Vedere Labs: New TP-Link Router Vulnerabilities: A Primer on Rooting Routers
Forescout used rooting and prior vulnerability context to inspect TP-Link Omada/Festa router internals, then found new issues including command injection and residual debug functionality after an earlier fix.
start from prior flaw / patch context
-> gain/root lab device under controlled conditions
-> inspect internals and debug behavior
-> analyze web/VPN/config handling
-> identify incomplete remediation or residual code
-> generalize to related device families
-> coordinate disclosure
The high-value move is:
patches are research maps
After a vendor patches one flaw, ask:
- Did they remove the root cause or only block one path?
- Is debug code still present?
- Is the same pattern copied into other models?
- Did the patch create a new reachable condition?
- Are private keys, credentials, or debug toggles reused?
Given old and patched firmware:
diff -ruN old_rootfs new_rootfs > patch.diff
rg -n "debug|root|shell|admin|vpn|wireguard|uci|system\\(|popen|exec|private key|authorized" patch.diffThen build a table:
changed file -> security-relevant branch -> old behavior -> new behavior -> bypass hypothesis
Source:
- Tenable Research Advisory TRA-2020-60: TP-Link Archer Routers USB Symlink Following Vulnerabilities
This case is useful because the exploitability assumptions are not purely remote. It involved physical/network positioning and symlink/path behavior around USB storage exposure.
identify feature boundary
-> USB storage / file sharing behavior
-> symlink/path handling
-> privilege and filesystem assumptions
-> demonstrate arbitrary code execution under defined preconditions
Not every strong firmware vulnerability is unauthenticated internet RCE. Real reports must state attacker position:
- remote WAN
- LAN
- authenticated admin
- physical + LAN
- local shell
- supply-chain/update path
When you find a file/path issue, score preconditions:
Can attacker place a file?
Can attacker choose a path?
Can attacker trigger the consumer service?
What privilege does the consumer run as?
What crosses from data into code?
Source:
- Nam's Journal: IoT Security Analysis: D-Link DIR-820L Router
This is a useful personal-blog example because it follows a very teachable end-to-end path: binwalk extraction, filesystem inspection, credentials, startup analysis, CGI/service analysis, command injection proof.
download firmware
-> binwalk finds SquashFS
-> extract rootfs
-> inspect shadow/config files
-> inspect startup scripts
-> identify service handling CGI requests
-> test command injection through web route
This is closest to your 48-hour assignment flow:
extract -> map startup/web -> grep sinks -> pick one route -> reproduce safely
After extraction:
rg -n "cgi|ncc|httpd|lighttpd|boa|uhttpd|REQUEST_METHOD|QUERY_STRING" rootfs 2>/dev/null
rg -n "ping|traceroute|nslookup|system\\(|popen|exec|wget|curl" rootfs 2>/dev/nullThen produce a one-page mini-report using templates/iot_firmware_case_template.md.
Sources:
- CTFtime: Grey Cat The Flag 2022 Firmware
- CTFtime: PatriotCTF Banner
These are not full vulnerability-research case studies. They are small extraction/triage drills.
Grey Cat Firmware:
firmware blob -> binwalk -> SquashFS extraction -> grep/search -> flag
PatriotCTF Banner:
pcap/TCP data -> recover binary stream -> binwalk -> SquashFS -> router banner file -> flag
CTFs teach fast mechanics:
- recognize embedded filesystems
- recover firmware from unusual containers
- use binwalk/unblob/strings quickly
- search rootfs effectively
- avoid overthinking when the answer is an artifact
They do not usually teach exploitability or responsible disclosure. Pair them with real writeups.
Seed list from the user-provided nday_blogs_scored.md:
| Source | Best use |
|---|---|
| Google Project Zero | root-cause analysis discipline, patch diffing, exploit context |
| Source Incite | full exploit chains and n-day reproduction style |
| STAR Labs | practical exploitation writeups, Pwn2Own-style chains |
| Synacktiv | deep RE/exploitation writeups |
| Quarkslab | low-level RE, firmware, hypervisor, crypto/security engineering |
| Trail of Bits | methodology, fuzzing, code review, harnesses |
| NCC Group Research | applied product/security research |
| Claroty Team82 | OT/IoT vulnerability research |
| Forescout Vedere Labs | embedded/OT/IoT device research and fleet-level implications |
| Check Point Research | malware, implants, IoT/router threat research |
| Tenable Research | advisories with clear preconditions and impact |
| PortSwigger Research | web logic, HTTP parser, and request-smuggling thinking |
| GitHub Security Lab | source-to-root-cause vulnerability research |
| CTFtime writeups | fast mechanics and puzzle-style practice |
How to consume:
1. One writeup per week.
2. Write a method card.
3. Reproduce only legal/safe parts.
4. Add one pattern to your local playbook.
5. Add one false-positive lesson.
Pick one case above and write:
Target:
Goal:
First artifact:
Attack surface:
Critical observation:
Verification method:
Exploitability argument:
What I can reuse:
What I cannot legally reproduce:
Pick a public CVE/advisory.
Do not run public exploit code first.
Instead:
1. Identify affected firmware.
2. Identify patched firmware.
3. Extract both.
4. Diff changed files.
5. Locate changed route/binary/function.
6. Explain root cause in your own words.
7. Build a safe verification request or test case.
For any firmware that fails under QEMU/EMBA:
Command:
Observed failure:
Missing file/device/config:
Evidence:
Stub attempted:
Result:
Decision: continue emulation / static proof / hardware required
On a firmware rootfs:
rg -n "debug|backdoor|support|telnet|dropbear|authorized_keys|root:|admin|magic|user-agent|shell|cmd" rootfs 2>/dev/null
strings -a rootfs/** 2>/dev/null | rg -i "debug|support|user-agent|authorization|telnet|shell|cmd"Then manually verify whether any hit is reachable and meaningful.
- User-provided blog seed list:
C:/Users/Idan/Downloads/nday_blogs_scored.md - ZDI TP-Link Archer A7 Pwn2Own: https://www.thezdi.com/blog/2020/4/6/exploiting-the-tp-link-archer-c7-at-pwn2own-tokyo
- STAR Labs TP-Link Archer A7: https://starlabs.sg/blog/2020/10-analysis-exploitation-of-a-recent-tp-link-archer-a7-vulnerability/
- Synacktiv TP-Link AC1750: https://www.synacktiv.com/publications/pwn2own-tokyo-2020-defeating-the-tp-link-ac1750.html
- Flashback TP-Link Archer C7/A7: https://www.flashback.sh/blog/lao-bomb-tplink-archer-lan-rce
- WithSecure TP-Link AC1750 advisory: https://labs.withsecure.com/advisories/tp-link-ac1750-pwn2own-2019
- EMUX Tenda AC15 extraction: https://emux.exploitlab.net/docs/extracting-tenda-ac15-firmware.html
- EMUX Tenda AC15 emulation: https://emux.exploitlab.net/docs/emulating-tenda-ac15.html
- Check Point Horse Shell firmware implant: https://blog.checkpoint.com/security/check-point-research-reveals-a-malicious-firmware-implant-for-tp-link-routers-linked-to-chinese-apt-group/
- Forescout TP-Link rooting routers: https://www.forescout.com/blog/new-tp-link-router-vulnerabilities-a-primer-on-rooting-routers/
- Tenable TP-Link Archer USB symlink advisory: https://www.tenable.com/security/research/tra-2020-60
- Hackaday D-Link backdoor summary: https://hackaday.com/2013/10/14/reverse-engineering-a-d-link-backdoor/
- Nam's Journal D-Link DIR-820L: https://namberino.github.io/posts/2025/05/iot-security-analysis-d-link-dir-820l-router/
- CTFtime Grey Cat Firmware: https://ctftime.org/writeup/34269
- CTFtime PatriotCTF Banner: https://ctftime.org/writeup/33621
- AppSec IoT firmware emulation with QEMU: https://appsec.at/blog/2022/03/15/iot-firmware-emulation-with-qemu/