# OffSet7: HackTool - Potential Impacket Lateral Movement Activity

> Design for the QRadar Rule Wizard. Not an importable rule and not tested in QRadar.

- Rule type: Event rule (Local), create disabled
- Log source types: Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1

## Building blocks

### BB:OffSet7:HackTool Potential Impacket Lateral Movement Act:selection_other (match)
All test lines must match (AND).
- when **Parent Process Path** ends with: `\wmiprvse.exe`, `\mmc.exe`, `\explorer.exe`, `\services.exe`
- when **Command** contains: `cmd.exe`, `/Q`, `/c`, `\\\\127.0.0.1\\`, `&1`

### BB:OffSet7:HackTool Potential Impacket Lateral Movement Act:selection_atexec (match)
All test lines must match (AND).
- when **Parent Command** contains: `svchost.exe -k netsvcs`, `taskeng.exe`
- when **Command** contains: `cmd.exe`, `/C`, `Windows\Temp\`, `&1`

## Main rule — option A (building blocks)

1. when the event(s) were detected by one or more of these log source types: `Microsoft Windows Security Event Log DSM: Security 4688 (with command-line auditing) or Sysmon EID 1`
2. when an event matches the condition built from these building blocks: `(ANY of [BB:OffSet7:HackTool Potential Impacket Lateral Movement Act:selection_other, BB:OffSet7:HackTool Potential Impacket Lateral Movement Act:selection_atexec])`

## Main rule — option B (AQL filter test)

1. when the event matches this AQL filter query: `devicetype=12 AND (((LOWER("Parent Process Path") LIKE '%\wmiprvse.exe' OR LOWER("Parent Process Path") LIKE '%\mmc.exe' OR LOWER("Parent Process Path") LIKE '%\explorer.exe' OR LOWER("Parent Process Path") LIKE '%\services.exe') AND (LOWER(Command) LIKE '%cmd.exe%' AND LOWER(Command) LIKE '%/q%' AND LOWER(Command) LIKE '%/c%' AND LOWER(Command) LIKE '%\\127.0.0.1\%' AND LOWER(Command) LIKE '%&1%')) OR ((LOWER("Parent Command") LIKE '%svchost.exe -k netsvcs%' OR LOWER("Parent Command") LIKE '%taskeng.exe%') AND (LOWER(Command) LIKE '%cmd.exe%' AND LOWER(Command) LIKE '%/c%' AND LOWER(Command) LIKE '%windows\temp\%' AND LOWER(Command) LIKE '%&1%')))`

## Rule response

- Severity 7, credibility 8, relevance 7
- Ensure the detected event is part of an offense; index offense on Log Source (host) and annotate with the rule title and OffSet7 rule id
- Respond no more than once per 30 minutes per Log Source (tune per environment)

## Limitations

- QRadar AQL LIKE / CRE string tests are case-sensitive unless the property is lower-cased; the AQL option uses LOWER() where the backend applied it.

Source rule: HackTool - Potential Impacket Lateral Movement Activity (10c14723-61c7-4c75-92ca-9af245723ad2). Author: Ecco, oscd.community, Jonhnathan Ribeiro, Tim Rauch. Licence: DRL-1.1.
