Introduction to Windows Command Line
| Field | Value |
|---|---|
| Module ID | 167 |
| Difficulty | Easy |
| Tier | Tier 0 |
| Category | General |
| Estimated Time | 4 days |
| Cubes Earned | 0 |
| Experience Points | 1935 |
| Creators | TreyCraf7_1, drakhaevn |
| Last Updated | 2022-12-02T00:00:00.000000Z |
| URL | https://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
| # | Group | Type | Title |
|---|---|---|---|
| 1 | Introduction | theory | Introduction |
| 2 | CMD | interactive | Command Prompt Basics |
| 3 | interactive | Getting Help | |
| 4 | interactive | System Navigation | |
| 5 | interactive | Working with Directories and Files - CMD | |
| 6 | interactive | Gathering System Information | |
| 7 | interactive | Finding Files and Directories | |
| 8 | interactive | Environment Variables | |
| 9 | interactive | Managing Services | |
| 10 | interactive | Working With Scheduled Tasks | |
| 11 | PowerShell | interactive | CMD Vs. PowerShell |
| 12 | interactive | All About Cmdlets and Modules | |
| 13 | interactive | User and Group Management | |
| 14 | interactive | Working with Files and Directories - PowerShell | |
| 15 | interactive | Finding & Filtering Content | |
| 16 | interactive | Working with Services | |
| 17 | interactive | Working with the Registry | |
| 18 | interactive | Working with the Windows Event Log | |
| 19 | interactive | Networking Management from The CLI | |
| 20 | theory | Interacting with The Web | |
| 21 | interactive | PowerShell Scripting and Automation | |
| 22 | Finish Strong | interactive | Skills Assessment |
| 23 | theory | Beyond 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