# OffSet7: Potential Recon Activity Via Nltest.EXE

> 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:Potential Recon Activity Via Nltest EXE:selection_nltest (match)
Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.
- when **Process Path / Process Name** ends with: `\nltest.exe`
- when **Filename** is equal to (case-insensitive): `nltestrk.exe`

### BB:OffSet7:Potential Recon Activity Via Nltest EXE:selection_recon (match)
Any of the groups matches (OR): build one BB per group and a parent BB "when an event matches any of" them.
- when **Command** contains: `server`, `query`
- when **Command** contains: `/user`, `all_trusts`, `dclist:`, `dnsgetdc:`, `domain_trusts`, `dsgetdc:`, `parentdomain`, `trusted_domains`

## 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: `(ALL of [BB:OffSet7:Potential Recon Activity Via Nltest EXE:selection_nltest, BB:OffSet7:Potential Recon Activity Via Nltest EXE:selection_recon])`

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

1. when the event matches this AQL filter query: `devicetype=12 AND ((LOWER("Process Path") LIKE '%\nltest.exe' OR LOWER("Process Name") LIKE '%\nltest.exe') OR Filename='nltestrk.exe') AND ((LOWER(Command) LIKE '%server%' AND LOWER(Command) LIKE '%query%') OR (LOWER(Command) LIKE '%/user%' OR LOWER(Command) LIKE '%all_trusts%' OR LOWER(Command) LIKE '%dclist:%' OR LOWER(Command) LIKE '%dnsgetdc:%' OR LOWER(Command) LIKE '%domain_trusts%' OR LOWER(Command) LIKE '%dsgetdc:%' OR LOWER(Command) LIKE '%parentdomain%' OR LOWER(Command) LIKE '%trusted_domains%'))`

## Rule response

- Severity 5, credibility 6, 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: Potential Recon Activity Via Nltest.EXE (5cc90652-4cbd-4241-aa3b-4b462fa5a248). Author: Craig Young, oscd.community, Georg Lauenstein. Licence: DRL-1.1.
