What firmware artefacts reveal about device internals
Firmware artefacts can disclose implementation details and privileged ecosystem relationships. Understanding firmware artefacts reveal about device internals helps establish which security property the feature needs and where that property is actually enforced.
What does this involve?
Firmware security depends on the relationship between the distributed image, installed configuration and code that actually executes. Offline analysis, emulation and real-device testing provide different kinds of evidence and should be connected before a strong impact claim is made.
The disclosure of uncompiled source code could accelerate the exploitation of the software implementation since vulnerabilities can be directly identified in the code without the need to perform tests in a trial and error manner. Furthermore, left-over source code might include internal development information, developer comments or hard-coded sensitive data, which were not intended for productive use.
Similar to uncompiled source code, compiled binaries might also disclose relevant information. However, reverse-engineering might be required to retrieve useful data, which could take a considerable amount of time. Thus, the tester has to assess which binaries might be worth analyzing, ideally in coordination with the firmware manufacturer.
Why it matters
Consider a realistic failure: a downloadable release contains internal endpoints and a shared service credential.
A firmware weakness may expose device credentials, permit privileged actions or affect availability. The practical consequence depends on reachable services, execution privileges and the trust placed in the device by other components.
Firmware evidence should identify the image, installed configuration and execution conditions. Static analysis, emulation and hardware testing answer different questions and should support a consistent conclusion.
How penetration testers check for it
Inspect binaries, scripts, resources and configuration and establish what exposed values allow.
- It must be checked if uncompiled source code can be identified within the firmware.
- If uncompiled source code is detected, its content must be analysed for the presence of sensitive data, which might be useful for potential attackers (also see ISTG-FW-SCRT-003).
- Reverse-engineering of selected binaries should be performed in order to obtain useful information regarding the firmware implementation and the processing of sensitive data.
- Accessible details regarding the implementation must be assessed in order to prepare further tests. For example, this includes.
- Review privileges and externally influenced inputs.
- Preserve reproducible evidence and representative recovery conditions.
How to fix it
Remove privileged secrets and reduce unnecessary internal information in distributed releases.
- Remove unnecessary code, accounts and capabilities.
- Use safe input handling and narrow privileged interfaces.
- Protect secrets and authenticate relevant executable content.
- Verify fixes in the actual production and recovery artefacts.
A suspicious string or an emulation result is not enough to establish a working compromise. Validate the path and explain any environmental assumptions that affect the conclusion.
Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.
Related issues
- Firmware assessment scope, device models and trust boundaries
- Chaining firmware weaknesses across device trust boundaries
- Extracting embedded filesystems from firmware images
Read about our methodology or contact pentested.com to discuss your firmware and embedded systems.