Working With Ghidra's P-Code To Identify Vulnerable Function Calls
This year at INFILTRATE 2019, I got together with fellow RPISEC alumnus and Boston Cybernetics Institute co-founder Jeremy Blackthorne to present “Three Heads Are Better Than One: Mastering NSA’s Ghidra Reverse Engineering Tool”.
Around 50 minutes into that presentation, I presented a demo of a proof of concept script I built to trace out how inputs to malloc
are derived.
In this blog post, we’ll take a deeper look at that script.
For those unfamiliar with the tool, Ghidra is an interactive reverse engineering tool developed by the US National Security Agency, comparable in functionality to tools such as Binary Ninja and IDA Pro. After years of development internally at NSA, Ghidra was released open source to the public in March 2019 at RSA.