Repository navigation
Home
What did this attacker IP do to your estate β and can you prove it?
v2.1.0 Β· 20 cmdlets Β· 156 catalogued events Β· 6 channels Β· 14 hunt profiles Β· MITRE ATT&CK mapped
WinSecHunter is an incident-response toolkit for Windows security events. It collects every
event that references an IP address (IPv4, IPv6 or CIDR) from local logs, remote hosts over
WinRM and offline .evtx files, then turns the result into evidence and reports.
Note
Version 2.1.0 is a production-hardening release: three defects that broke normal collection are fixed, and six reporting cmdlets were added. See What's new.
git clone https://github.com/paulmann/Get-Windows-Security-Events-By-IP.git
cd Get-Windows-Security-Events-By-IP
./build/Install-Dev.ps1 -Force
$events = Get-WinSecEventByIp 203.0.113.7 -LastDays 2 -PassHostStatus
$events | Test-WinSecBruteForce
$events | Get-WinSecIpTimeline -AsciiChart
$case = New-WinSecCase -SubjectIps 203.0.113.7 -Title 'Brute force vs VPN'
Export-WinSecInvestigation -Case $case -Event $events -Format All -PassThru
New-WinSecIncidentReport -Case $case -Event $events -Template Executive -Format Both -PassThruNeed the whole map? Show-WinSecHunterHelp prints the workflow, every cmdlet, the profiles,
configuration and troubleshooting. Show-WinSecHunterHelp -Cmdlet <name> details one cmdlet.
flowchart LR
A[Collect<br/>Get-WinSecEventByIp<br/>Trace-WinSecIp] --> B[Prove the logs<br/>Get-WinSecLogCoverage<br/>Test-WinSecAuditPolicy]
B --> C[Analyze<br/>BruteForce Β· Sessions<br/>Timeline]
C --> D[Enrich<br/>Attribution Β· CIDR]
D --> E[Report<br/>Incident Β· Abuse Β· IOC]
E --> F[Preserve<br/>Bundle Β· Manifest<br/>Integrity Β· Import]
| Area | Change |
|---|---|
| Help |
Show-WinSecHunterHelp β one-stop reference, -Cmdlet, -Markdown, -OutFile
|
| Reports |
New-WinSecIncidentReport β Executive/Technical/Full, Markdown + self-contained HTML |
| Abuse |
New-WinSecAbuseReport β RFC 5322 .eml, provider resolution, base64 evidence, redaction |
| IOC |
Export-WinSecIocList β CSV, TXT, JSON, STIX 2.1 |
| Evidence |
Test-WinSecEvidenceIntegrity, Import-WinSecCase, IOCs inside the manifest |
| Collection | Per-channel execution: a missing Sysmon/RDP/firewall log is Skipped, not fatal |
| Reliability | No crash without a time window; -ComputerName sweeps work; -PassHostStatus always arrives |
Note
The legacy Get-SecurityEventsByIP.ps1 is no longer part of main. It stays available at
tag v5.0.2
and as a release asset, and is no longer maintained. New work goes into the module.
Full list: Changelog.
| I want to⦠| Page |
|---|---|
| Install and run my first sweep | Getting Started |
| Look up a cmdlet, parameter or example | Cmdlet Reference |
| Understand detection logic and thresholds | Detection and Analysis |
| Produce an incident report or an abuse report | Reporting and Abuse |
| Preserve and verify evidence | Evidence and Reporting |
| Sweep many hosts or analyse EVTX | Remote Collection |
| Configure options and API keys | Configuration |
| Understand internals | Architecture |
| Fix a problem | Troubleshooting and FAQ |
| Decode a status code or logon type | Reference Tables |
| Build, test, contribute | Development |
| See what is planned | Roadmap |
- Collection needs Windows and, for the Security log, an elevated session.
-
Remote collection needs WinRM (
Enable-PSRemoting) or a CIM session. - Analysis, reporting, evidence verification run on any OS with PowerShell 7.6.
- No telemetry. The only outbound requests are the enrichment providers you enable and reverse DNS.
PolyForm Noncommercial License 1.0.0 β free for noncommercial use; commercial use, support and custom terms require a licence from mid1977@gmail.com. See LICENSE.
Derivative of Get-SecurityEventsByIP.ps1 by Mikhail Deynekin (mid1977@gmail.com,
https://deynekin.com). Releases up to 2.0.0 were GPL-3.0-or-later; 2.1.0 is relicensed by the
copyright holder.
WinSecHunter v2.1.0 Β· PolyForm Noncommercial 1.0.0 Β· derivative of Get-SecurityEventsByIP.ps1 by Mikhail Deynekin
Repository Β· Changelog Β· Security policy Β· Contributing
π Home
π― Problem Domain π Getting Started π§ Architecture
π Cmdlet Reference π Detection and Analysis π Remote Collection π°οΈ Threat Intel and Attribution π‘οΈ Audit Policy Guide
π Reporting and Abuse π§Ύ Evidence and Reporting π Reference Tables
π§ Configuration π©Ί Troubleshooting and FAQ π§βπ» Development πΊοΈ Roadmap