Skip to content

Shells & Payloads ​

FieldValue
Module ID115
DifficultyMedium
TierTier 0
CategoryOffensive
Estimated Time2 days
Cubes Earned0
Experience Points1380
CreatorsLTNB0B, TreyCraf7_1
Last Updated2022-10-28T00:00:00.000000Z
URLhttps://academy.hackthebox.com/app/module/115

Module Includes ​

  • 17 Sections
  • 10 Interactive Exercises
  • 0 Assessments
  • 0 Cubes

Module Description ​

Gain the knowledge and skills to identify and use shells & payloads to establish a foothold on vulnerable Windows & Linux systems. This module utilizes a fictitious scenario where the learner will place themselves in the perspective of a sysadmin trying out for a position on CAT5 Security's network penetration testing team.

Module Summary ​

Understanding the correct type of payload to use or the functions of different shells can be the difference between getting discovered during a penetration test or moving on undetected. This module will cover many different methods of establishing a shell on a host and creating payloads to match our target applications and architecture.

We will:

  • Understand the purpose of a shell (Bind & Reverse)
  • Experiment with different types of shells on Windows & Linux systems (Bash,Zsh,Powershell,cmd, and more...)
  • Practice with common Web shells (PHP, Java, Tiny web shell, Aspx, and more...)
  • Use Metasploit and MSFvenom to quickly craft payloads and launch exploits to help us gain shell sessions
  • Identify strategies to detect and prevent reverse shells & payloads from being used to compromise a network environment

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 into sections with accompanying hands-on exercises to practice each of 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 presented in each section. You can do this in the target host provided in the interactive sections or your virtual machine.

You can start and stop the module at any time 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 "Medium" and assumes a working knowledge of the Windows command line and operating system fundamentals and a fundamental understanding of information security principles.

A firm grasp of the following modules can be considered prerequisites for successful completion of this module:

  • Introduction to Academy
  • Getting Started
  • Introduction to Networking
  • Windows Fundamentals
  • Linux Fundamentals
  • Introduction to Web Applications
  • Web Requests

Sections ​

17 sections - 10 Interactive

#GroupTypeTitle
1IntroductiontheoryShells Jack Us In, Payloads Deliver Us Shells
2theoryCAT5 Security's Engagement Preparation
3Shell BasicsinteractiveAnatomy of a Shell
4interactiveBind Shells
5interactiveReverse Shells
6PayloadstheoryIntroduction to Payloads
7interactiveAutomating Payloads & Delivery with Metasploit
8theoryCrafting payloads with MSFvenom
9Windows ShellsinteractiveInfiltrating Windows
10NIX ShellsinteractiveInfiltrating Unix/Linux
11theorySpawning Interactive Shells
12Web ShellstheoryIntroduction to Web Shells
13interactiveLaudanum, One Webshell to Rule Them All
14interactiveAntak Webshell
15interactivePHP Web Shells
16Skills AssessmentinteractiveThe Live Engagement
17Additional ConsiderationstheoryDetection & Prevention

Conclusion ​

This module covered the basics of shells & payloads, ways to transfer & execute payloads to gain a shell on Windows & Linux systems. It introduced detection & prevention methods that can be implemented in any network environment.

Module Key Takeaways ​

  • Established an understanding of the difference between Bind & Reverse shells
  • Experimented with common one-liners and studied them at a detailed level
  • Used Metasploit to deploy a payload and establish a shell session
  • Used MSFvenom to craft a payload
  • Identified various methods of spawning interactive shells
  • Experimented with various methods of gaining web shell sessions on web servers
  • Applied an enumeration methodology to identify payloads & shells that would be useful in different situations
  • Explored detection and prevention techniques