Skip to content

[FEATURE] Windows Security event detections (4625/4624, 4720, 1102, 7045, encoded PowerShell, Defender) #211

Backlog

Description

@OkiriGabriel

Context

Since #19 (PR #187), the server collector detects Windows targets and collects the System and Application error events. The threat detector (collectors/threat_detector.py) has no Windows rules: its brute-force, credential-access and evasion rules match Linux log formats only.

Proposed rules

Event Meaning Rule / MITRE
4625 (≥ threshold from one IP), then 4624 from it Brute force, then success brute_force / brute_force_success, T1110
4720, 4732/4728 to Administrators New account, added to an admin group account_manipulation, T1136 / T1098
1102, 104 Security or System log cleared defense_evasion, T1070.001
7045, 4697 New service installed (PsExec, persistence) persistence_service, T1543.003
4688 with -enc / IEX / DownloadString Encoded or download-and-run PowerShell download_execute, T1059.001
Defender 1116/1117 Malware detected or acted on malware_detected, high

Also needed

  • Collect the Security log for these IDs in ServerCollector.WINDOWS_COMMANDS (Get-WinEvent -FilterHashtable @{LogName='Security';Id=4625,4624,4720,4732,1102,7045,4697} -MaxEvents 200), using the same encoded-PowerShell pattern.
  • Tests with sample event text for each rule, plus negatives (a single 4625, a routine 7045 for a known agent).

Files

collectors/threat_detector.py, collectors/server.py, docs/THREAT_DETECTION.md, tests

Activity

  1. added
    enhancement
    security
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsecurity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions