Skip to content

Introduction to Windows Command Line ​

FieldValue
Module ID167
DifficultyEasy
TierTier 0
CategoryGeneral
Estimated Time4 days
Cubes Earned0
Experience Points1935
CreatorsTreyCraf7_1, drakhaevn
Last Updated2022-12-02T00:00:00.000000Z
URLhttps://academy.hackthebox.com/app/module/167

Module Includes ​

  • 23 Sections
  • 20 Interactive Exercises
  • 1 Assessments
  • 0 Cubes

Module Description ​

As administrators and Pentesters, we may not always be able to utilize a graphical user interface for the actions we need to perform. Introduction to Windows Command Line aims to introduce students to the wide range of uses for Command Prompt and PowerShell within a Windows environment. We will cover basic usage of both key executables for administration, useful PowerShell cmdlets and modules, and different ways to leverage these tools to our benefit.

Module Summary ​

This module introduces us to the Windows Command Prompt and PowerShell in general for both offensive and defensive security practitioners. The ability to utilize the Windows command line is a must for defenders. The capability to administer hosts quickly is critical to ensuring the availability, confidentiality, and integrity of our systems and networks. From a hacking perspective, a functional understanding of CMD.exe, PowerShell, and the myriad of Windows native tools will ensure you can complete your actions on hosts while in a Windows environment. We will not always have access to a graphical user interface, primarily when operating over a tunnel or from a point where it is not feasible for us to have direct access.

In this module, we will cover the following:

  • The History of the Windows command line and PowerShell
  • Using CMD.exe basics
  • CMD for sysadmins and hackers
  • PowerShell basics
  • Navigating the Windows file structure from the command line
  • Utilizing and creating modules with PowerShell
  • PowerShell for sysadmins and hackers

CREST CPSA/CRT-related Sections:

  • All sections

CREST CCT APP-related Sections:

  • All sections

CREST CCT INF-related Sections:

  • All sections

This module is broken down into sections with accompanying hands-on exercises to practice the tactics and techniques we cover. The module ends with a practical hands-on skills assessment to gauge your understanding of the various topic areas.

As you work through the module, you will see example commands and command output for the various topics introduced. It is worth reproducing as many of these examples as possible to reinforce further the concepts introduced in each section. You can do this in the Pwnbox provided in the interactive sections or in your own virtual machine.

You can start and stop the module anytime and pick up where you left off. There is no time limit or "grading," but you must complete all of the exercises and the skills assessment to receive the maximum number of cubes and have this module marked as complete in any paths you have chosen.

The module is classified as "Easy" and only assumes the student has a foundational knowledge of Windows and the Windows file system.

A firm grasp of the following module can be considered a prerequisite for the successful completion of this module:

  • Windows Fundamentals

Sections ​

23 sections - 20 Interactive

#GroupTypeTitle
1IntroductiontheoryIntroduction
2CMDinteractiveCommand Prompt Basics
3interactiveGetting Help
4interactiveSystem Navigation
5interactiveWorking with Directories and Files - CMD
6interactiveGathering System Information
7interactiveFinding Files and Directories
8interactiveEnvironment Variables
9interactiveManaging Services
10interactiveWorking With Scheduled Tasks
11PowerShellinteractiveCMD Vs. PowerShell
12interactiveAll About Cmdlets and Modules
13interactiveUser and Group Management
14interactiveWorking with Files and Directories - PowerShell
15interactiveFinding & Filtering Content
16interactiveWorking with Services
17interactiveWorking with the Registry
18interactiveWorking with the Windows Event Log
19interactiveNetworking Management from The CLI
20theoryInteracting with The Web
21interactivePowerShell Scripting and Automation
22Finish StronginteractiveSkills Assessment
23theoryBeyond This Module

Conclusion ​

In this module, we covered the basics of using the command line on Windows hosts for day-to-day administration via CMD.exe and PowerShell.

Module Key Takeaways:

  • The importance of command line access for attackers and defenders
  • In-depth usage of both CMD.exe and PowerShell
  • Methods for administering and attacking Windows hosts
  • Basic tools and scripting methodologies for Windows hosts