Malware Analysis IDAPython script to decode NightHawk strings

struppigel

Super Moderator
Thread author
Verified
Staff Member
Well-known
Forum Veteran
Apr 9, 2020
666
5,865
1,280
Germany
This script will search in NightHawk samples for the decode function and the substitution alphabets, then decode strings referenced by the decoder function, then add the plaintext strings as comments to IDA.

In IDA it looks like this:
nh.png


nh2.png

Tested on IDA 8.1 with the following NightHawk samples:

This article was of great help for NightHawk analysis: Nighthawk: An Up-and-Coming Pentest Tool Likely to Gain Threat Actor Notice | Proofpoint US

The IDAPython script is in my repo: hedgehog-tools/nighthawk_str_decoder.py at main · struppigel/hedgehog-tools