Detectionhightest

Powershell Add Name Resolution Policy Table Rule

Detects powershell scripts that adds a Name Resolution Policy Table (NRPT) rule for the specified namespace. This will bypass the default DNS server and uses a specified server for answering the query.

Open in Detection LabConvert ruleBuild Package
Borna TalebiCreated 2021-09-14Updated 2022-10-094368354e-1797-463c-bc39-a309effbe8d7windows
Log Source
WindowsPowerShell Script
ProductWindows← raw: windows
CategoryPowerShell Script← raw: ps_script

Definition

Requirements: Script Block Logging must be enabled

Detection Logic
Detection Logic1 selector
detection:
    selection:
        ScriptBlockText|contains|all:
            - 'Add-DnsClientNrptRule'
            - '-Namesp'
            - '-NameSe'
    condition: selection
False Positives
Unknown

False positive likelihood has not been assessed. Additional context may be needed during triage.

MITRE ATT&CK
Rule Metadata
Rule ID
4368354e-1797-463c-bc39-a309effbe8d7
Status
test
Level
high
Type
Detection
Created
2021-09-14
Modified
2022-10-09
Path
rules/windows/powershell/powershell_script/posh_ps_add_dnsclient_rule.yml
Raw Tags
attack.impactattack.t1565
View on GitHub