> For the complete documentation index, see [llms.txt](https://tenaka.gitbook.io/pentesting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tenaka.gitbook.io/pentesting/enumeration/smb/crackmapexec.md).

# crackmapexec

#### #Legacy Anonymous is enabled or DC upgraded from 2003

crackmapexec smb 10.0.10.1 -u ' ' -p ' '

crackmapexec smb 10.0.10.1 --pass-pol -u ' ' -p ' '

#### #with valid creds

crackmapexec smb smb --pass-pol -u 'administrator' -p 'Password1'

#### #Account and password spraying

crackmapexec smb 10.0.0.1 -u userAccounts.txt -p rockyou.txt

#### #With known account and password

crackmapexec smb 10.0.0.1 -u administrator -p Password1 --shares

#### #pass the hash with crackmapexec

crackmapexec smb 10.0.0.1 -u Administrator -H 'Password hash'
