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:
Learn & practice For the Bug Bounty
Last updated
Was this helpful?