Nighthawk 0.4 introduced a powerful Python module system that allows operators to extend the implant’s capabilities using pure Python without modifying the core codebase.
Python modules run within an embedded interpreter inside the agent, enabling rapid development of custom post-exploitation capabilities while maintaining the operational security guarantees of the core framework.
Usage
Modules can interact with the Nighthawk API surface to perform tasks such as credential harvesting, lateral movement, and situational awareness — all within the existing C2 channel.
import nighthawk
def run(agent):
results = agent.shell("whoami")
agent.log(results)
Loading Modules
Modules are loaded via the operator console using the python-load command, followed by the path to the module file.