Editing
Basic Windows Commands
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span id="commands"></span>Common Commands == === Navigation & File Management === {| class="wikitable sortable" ! Command !! Description !! Usage |- | [[#ex-dir|<code>dir</code>]] || List directory contents || <code>dir C:\Users</code> |- | [[#ex-cd|<code>cd</code>]] || Change directory || <code>cd C:\Windows\System32</code> |- | [[#ex-mkdir|<code>mkdir</code>]] || Create a folder || <code>mkdir backdoor</code> |- | [[#ex-del|<code>del</code>]] || Delete file(s) || <code>del secret.txt</code> |- | [[#ex-copy|<code>copy</code>]] || Copy files || <code>copy payload.exe D:\payload.exe</code> |- | [[#ex-move|<code>move</code>]] || Move or rename files || <code>move key.txt ..\keys.txt</code> |- | [[#ex-robocopy|<code>robocopy</code>]] || Robust file copy with options || <code>robocopy C:\data D:\backup /MIR</code> |- | [[#ex-type|<code>type</code>]] || View file content || <code>type C:\Windows\win.ini</code> |} === System Information & Monitoring === {| class="wikitable sortable" ! Command !! Description !! Usage |- | [[#ex-whoami|<code>whoami</code>]] || Show current user || <code>whoami</code> |- | [[#ex-hostname|<code>hostname</code>]] || Show computer name || <code>hostname</code> |- | [[#ex-systeminfo|<code>systeminfo</code>]] || Detailed OS & hardware info || <code>systeminfo</code> |- | [[#ex-tasklist|<code>tasklist</code>]] || List running processes || <code>tasklist</code> |- | [[#ex-taskkill|<code>taskkill</code>]] || Kill a process by PID || <code>taskkill /PID 1234 /F</code> |- | [[#ex-ver|<code>ver</code>]] || Display OS version || <code>ver</code> |- | [[#ex-driverquery|<code>driverquery</code>]] || List installed drivers || <code>driverquery /V</code> |} === User & Privilege Enumeration === {| class="wikitable sortable" ! Command !! Description !! Usage |- | [[#ex-net-user|<code>net user</code>]] || List or modify user accounts || <code>net user</code> |- | [[#ex-net-localgroup|<code>net localgroup</code>]] || List or modify groups || <code>net localgroup administrators</code> |- | [[#ex-wmic-useraccount|<code>wmic useraccount</code>]] || Detailed user data || <code>wmic useraccount get name,sid,status</code> |} === Networking & Connections === {| class="wikitable sortable" ! Command !! Description !! Usage |- | [[#ex-ipconfig|<code>ipconfig</code>]] || Show IP/network config || <code>ipconfig /all</code> |- | [[#ex-ping|<code>ping</code>]] || Test network reachability || <code>ping 8.8.8.8</code> |- | [[#ex-tracert|<code>tracert</code>]] || Show packet path || <code>tracert example.com</code> |- | [[#ex-netstat|<code>netstat</code>]] || Show active network connections || <code>netstat -ano</code> |- | [[#ex-arp|<code>arp</code>]] || View ARP cache || <code>arp -a</code> |- | [[#ex-nslookup|<code>nslookup</code>]] || Resolve domain to IP || <code>nslookup google.com</code> |} === Persistence & Control === {| class="wikitable sortable" ! Command !! Description !! Usage |- | [[#ex-schtasks|<code>schtasks</code>]] || Schedule tasks (persistence) || <code>schtasks /Create /SC minute /TN backdoor /TR C:\payload.exe</code> |- | [[#ex-sc|<code>sc</code>]] || Service control manager || <code>sc qc wuauserv</code> |- | [[#ex-runas|<code>runas</code>]] || Run as another user || <code>runas /user:Administrator cmd</code> |} === Registry & System Internals === {| class="wikitable sortable" ! Command !! Description !! Usage |- | [[#ex-reg|<code>reg</code>]] || Query/edit Windows registry || <code>reg query HKCU\Software</code> |} === Helpful CMD Operations === {| class="wikitable sortable" ! Command !! Description !! Usage |- | [[#ex-help|<code>help</code>]] || Show available commands || <code>help</code> |- | [[#ex-command-help|<code>command /?</code>]] || Help for any command || <code>netstat /?</code> |}
Summary:
Please note that all contributions to HackOps may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
HackOps:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Tools
What links here
Related changes
Special pages
Page information