Basics
Located at C:\Windows\System32\cmd.exe.
Basic Commands
# clear the screen
cls
# command history
doskey /historydoskey /history
Prints the session's command history.
page up
Places the first command in our session history to the prompt.
page down
Places the last command in history to the prompt.
⇧
View previously run commands.
⇩
View most recent commands run.
⇨
Types the previous command to prompt one character at a time.
⇦
N/A
F3
Will retype the entire previous entry to our prompt.
F5
Pressing F5 multiple times will allow you to cycle through previous commands.
F7
Opens an interactive list of previous commands.
F9
Enters a command to our prompt based on the number specified. The number corresponds to the commands place in our history.
Interesting Directories
C:\Windows\Temp
Contains temp system files accessible to all users on the system. All users have full access (rwx). Useful for dropping files as a low-privilege user on the system.
C:\Users\<user>\AppData\Local\Temp
Similar to above, but accessible only to the user account that it is attached to. Useful when the attacker gains control of a local/domain joined user account.
C:\Users\Public
Allows any interactive logon account full access. Alternative to the global \Temp as it's less likely to be monitored for suspicious activity.
C:\Program Files
Contains all 64-bit applications installed on the system.
C:\Program Files (x86)
Contains all 32-bit applications installed on the system.
Navigation
Files & Dirs
Directories
Basics
Copy
xcopy has been deprecated for robocopy. xcopy resets any file attributes by default which can be useful from an attacker's perspective.
robocopy (robust file copy) is a combination of copy, xcopy, and move. It is made for large directories and drive syncing.
Files
View Content
Create & Modify
Delete
Copy & Move
I/O
Command Chaining
Resources
Last updated