r/ExploitDev • • Feb 01 '26

Learning Joern

This is more of a VR question, but does anyone have some good resources for learning joern to query p-code/compiled binaries? Most of the tutorials online cover source code analysis

7 Upvotes

6 comments sorted by

View all comments

Show parent comment

3

u/tenatore Feb 02 '26

A couple of fun bugs; I can't give a ton of details but some null ptr derefs that allowed a malicious client to crash a server and a pretty classic buffer overrun. For me the main advantage this bought was speed and verifying exploit ability. In retrospect, if I'd spent a fair amount of time on the codebase, I would've probably spotted these but it would've taken me way longer to find them and to trace them to some value an attacker could control.

I haven't tried this but someone made a similar project using Tree sitter, openAI and codeQL: https://github.com/noperator/slice?tab=readme-ov-file This was for Cpp though and not p-code. I'm not 100% sure you need p-code support though. You could probably decompile the code and throw this tool at it and get some decent results that would likely be close to whatever you'd get running Joern on pcode

2

u/Nlbjj91011 Feb 02 '26

Yea that’s fair. Those sound pretty cool tho :)! Thanks for the resource! I was gonna try and build something like this:

https://github.com/cyberark/Vulnhalla

Also happy cake day!