Lifting Hermes Bytecode to P-Code: A Ghidra Extension for Reverse Engineering React Native Apps

AutorRenze, Martin; Magin, Florian
Datum2026
ArtConference Paper
AbstraktReact Native applications increasingly ship JavaScript logic as Hermes bytecode, a custom virtual-machine format that is not supported by mainstream reverse-engineering tools. We present HermesLoader, a Ghidra extension that loads Hermes bytecode, lifts it to Ghidra’s P-code intermediate representation, and exposes the resulting program through Ghidra’s standard disassembly, decompilation, navigation, and cross-reference workflows. The extension combines a SLEIGH specification for Hermes bytecode version 96 with a loader that reconstructs bytecode containers as typed program objects and a small set of Hermes-specific enrichment passes for strings, field-access chains, aggregate literals, and selected function references. We evaluate the implementation on source-generated Hermes bytecode samples compiled under multiple configurations. The lifter implements all 206 opcodes in version 96; our test corpus generates 199 of them and shows broad agreement with the reference hermesc disassembly. Remaining differences are mostly representational, with incomplete recovery of some table-driven control-flow targets as the main semantic limitation. These results show that Hermes bytecode can be integrated into Ghidra as a practical basis for interactive React Native reverse engineering.
KonferenzWorkshop on Software Understanding and Reverse Engineering 2026
Urlhttps://publica.fraunhofer.de/handle/publica/528232