Credential Database Copy via Ninja-Copy Technique

Last updated on:

Rule name

Rule type

Log sources

MITRE ATT&CK tags

Severity

Credential Database Copy via Ninja-Copy Technique

Standard

Windows

Credential Access: OS Credential Dumping - NTDS (T1003.003)

Critical

About the rule

Rule Type

Standard

Rule Description

Identifies use of Ninja-Copy techniques to duplicate protected credential databases.

Why this rule?

Ninja-Copy is an advanced credential theft technique that bypasses Windows file system protections and Volume Shadow Copy restrictions to directly read locked files like NTDS.dit (Active Directory database), SAM (local account database), and SYSTEM registry hives that contain password hashes and encryption keys, enabling attackers to steal credentials even when standard file access methods fail due to file locks or permissions.

Severity

Critical

Rule journey

Attack chain scenario

Credential Access → Ninja-Copy Execution → Protected File Access → Credential Database Theft → Password Hash Extraction.

Impact

Critical credential theft enabling attackers to obtain password hashes from protected databases like SAM, NTDS.dit, bypassing file system protections.

Rule Requirement

Prerequisites

Enable PowerShell Script Block Logging (Event ID 4104).

Criteria

Action1: actionname = "PowerShell Script Block Logged" AND (SCRIPTEXECUTED contains "Invoke-Ninjacopy" OR SCRIPTEXECUTED contains "StealthOpenFile" OR SCRIPTEXECUTED contains "StealthReadFile" OR SCRIPTEXECUTED contains "StealthCloseFile") select Action1.HOSTNAME,Action1.MESSAGE,Action1.SCRIPTEXECUTED,Action1.DOMAIN,Action1.PATH,Action1.USERNAME

Detection

Execution Mode

realtime

Log Sources

Windows

MITRE ATT&CK

Credential Access: OS Credential Dumping - NTDS (T1003.003)

Future actions

Known False Positives

Backup, forensic acquisition, or approved administrative scripts accessing system files for recovery or auditing purposes.

Next Steps

  1. Identification: Identify the PowerShell script and user executing Ninja-Copy technique.
  2. Analysis: Determine which credential databases were targeted and copied.
  3. Response: Investigate credential theft, rotate all domain and local passwords, review access controls.

Mitigation

ID

Mitigation

Description

M1041

Encrypt Sensitive Information

Ensure Domain Controller backups are properly secured.[2]

M1027

Password Policies

Ensure that local administrator accounts have complex, unique passwords across all systems on the network.

M1026

Privileged Account Management

Do not put user or admin domain accounts in the local administrator groups across systems unless they are tightly controlled, as this is often equivalent to having a local administrator account with the same password on all systems. Follow best practices for design and administration of an enterprise network to limit privileged account use across administrative tiers.

M1017

User Training

Limit credential overlap across accounts and systems by training users and administrators not to use the same password for multiple accounts.