Hawk is a lightweight Golang tool designed to monitor the sshd
, sudo
and su
services for passwords on Linux systems. It reads the content of the proc directory to capture events, and ptrace to trace syscalls related to password-based authentication.
https://www.prodefense.io/blog/hawks-prey-snatching-ssh-credentials
- Monitors SSH, SUDO and SU commands for passwords
- Reads memory from sshd, sudo and sudo syscalls without writing to traced processes
- Exfiltrates passwords via HTTP/S requests to a specified web server
- Inspired by 3snake
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o hawk
- Adjust the HTTP Server location in the main.go file.
- Build Hawk using the provided command.
- Run Hawk with ./hawk.
- Linux systems with ptrace enabled
/proc
filesystem must be mounted
This tool is intended for ethical and educational purposes only. Unauthorized use is prohibited. Use at your own risk.
Hawk is inspired by the work of blendin and their tool 3snake.