100+ Windows CMD Commands
Become VeryLazyTech member! π
Follow us on:
β Twitter @VeryLazyTech.
πΎ Github @VeryLazyTech.
π Medium @VeryLazyTech.
πΊ YouTube @VeryLazyTech.
π© Telegram @VeryLazyTech.
π΅οΈββοΈ My Site @VeryLazyTech.
Visit our shop for e-books and courses. π
When it comes to penetration testing and ethical hacking, Windows Command Prompt (CMD) is still one of the most underrated yet powerful hacking tools. While PowerShell gets most of the attention, CMD remains a goldmine for red teamers, pentesters, and hackers who want quick, stealthy, and effective results.
In this ultimate guide, Iβll walk you through all the essential CMD commands you need to masterβββfrom system reconnaissance to domain enumeration, privilege escalation, persistence, and lateral movement.
This is your one-stop Windows CMD cheat sheet for hackers. Bookmark it, practice it, and use it in your next red team engagement.
π₯οΈ System Information (Recon)
Gathering system details is the first step in any pentest or exploit chain.
wmic os get osarchitecture || echo %PROCESSOR_ARCHITECTURE% #Get architecture
systeminfo
systeminfo | findstr /B /C:"OS Name" /C:"OS Version" #Get only OS info
wmic computersystem LIST full #PC info
wmic qfe get Caption,Description,HotFixID,InstalledOn #Patches
wmic qfe list brief #Updates
hostname #Get hostname
DRIVERQUERY #Drivers (potentially vulnerable)π Environment Variables
Environment variables can leak usernames, domains, and controllers useful for exploitation.
Important ones:
COMPUTERNAMEβ Computer nameUSERNAMEβ Current userUSERDOMAIN/USERDNSDOMAINβ Domain infoLOGONSERVERβ Domain controllerHOMEPATH/USERPROFILEβ Home directory
πΎ Mounted Disks
π‘οΈ Windows Defender & Recycle Bin
βοΈ Processes, Services & Installed Software
π’ Active Directory & Domain Enumeration
Domain Info
Users
Groups
Computers & Trusts
π Logs & Event Queries
π€ Users & Groups
Persistence tricks:
π Networking & Firewall
Firewall rules:
Enable Remote Desktop:
π‘ Shares & WiFi
π₯ File Download via LOLBAS
π Credentials & Passwords
𧨠Misc Exploitation Tricks
Hide files:
Alternate Data Streams (ADS):
Obfuscation:
Manual DNS exfil:
General commands:
Last updated