Hunt lateral movement

From op7ic/amphunt · View interactive version

Hunt lateral movement is an AI agent skill from the GitHub repository op7ic/amphunt. Detect potential lateral movement by monitoring connections on protocols commonly used for remote execution and file sharing. Monitors SMB, RDP, WinRM, and RPC/WMIC traffic between internal endpoints.

How to use this skill

Skill file

Hunt: Lateral Movement Detection

Description

Detect potential lateral movement by monitoring connections on protocols commonly used for remote execution and file sharing. Monitors SMB, RDP, WinRM, and RPC/WMIC traffic between internal endpoints.

Scripts

Monitored Ports

| Port(s) | Protocol | Technique |

|---|---|---|

| 139, 445 | SMB | File shares, PsExec, admin shares |

| 3389 | RDP | Remote Desktop |

| 5985, 5986 | WinRM | PowerShell Remoting, WinRS |

| 135 | RPC | WMIC, DCOM, scheduled tasks |

Usage

# Basic lateral movement scan
python3 lateral_movement.py -c config.txt

# With CSV export and summary statistics
python3 lateral_movement.py -c config.txt --csv lateral_movement.csv --summary

# Limit scope
python3 lateral_movement.py -c config.txt --limit 100 --csv lateral.csv

Composite Hunts

Combine with other tools for deeper investigation:

# Check for PsExec usage alongside lateral movement
python3 hash2connection.py -c config.txt hashset/psexec/psexec.exe.txt --csv psexec_connections.csv

# Search for remote service creation keywords
echo "psexesvc" > lat_keywords.txt
echo "paexec" >> lat_keywords.txt
echo "winexesvc" >> lat_keywords.txt
echo "ADMIN$" >> lat_keywords.txt
python3 multikeyword_search.py -c config.txt lat_keywords.txt --csv lat_keyword_results.csv

MITRE ATT&CK Coverage

When to Use

Follow-Up Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.