eCPPT Certification Overview and Insights
eCPPT Certification Overview and Insights
📕
eCPPT Certification
Aucun accès
PowerShell for Pentesters
Client-Side attacks
Web Application Penetration Testing
Network Penetration testing
System Security & x86 Assembly Fundamentals
Exploit Development: Buffer Overflows
Privilege Escalation
Lateral Movement & Pivoting
Active Directory Penetration Testing
Command & Control (C2/C&C)
Pentest Reports
[Link] 1/77
15/04/2025 11:45 eCPPT Certification
Network mapping - Host Discovery - Port Scanning - Service Detection & OS - Detection
Active information gathering refers to the phase of assessment where the tester
actively interacts with the target system or network to collect data and identify
potential vulnerabilities
[Link] 2/77
15/04/2025 11:45 eCPPT Certification
Networking fundamentals
Network protocols ensure that different computer system, using different
hardware and sowftware can communicate with each other.
The packets are information trasferred between network computers.
Packets structure
Header → ensure that the receiving host can correctly interpret the payload and
handle the overall communication (ex. header advice that TCP transaction)
Payload → is the actual information (ex. email message, URL, etc…)
[Link] 3/77
15/04/2025 11:45 eCPPT Certification
Network layer is responsible for logical addressing, routing and forwarding data
packets between devices across different networks.
🥅 GOAL
Determine the optimal path for data to travel from the source to the
destination, even if the devices are on separate network
Network Layer
IP Header Format
IP protocol defines many different fields in the packet header.
Transport Layer
TCP - LAYER 4
[Link] 4/77
15/04/2025 11:45 eCPPT Certification
• Connection-Oriented:
TCP establishes a connection between the sender and receiver before any
data is exchanged. This connection is a virtual circuit that ensures reliable
and ordered data transfer.
• Reliability:
TCP guarantees reliable delivery of data. It achieves this through
mechanisms such as acknowledgments (ACK) and retransmission of lost or
corrupted packets. If a segment of data is not acknowledged, TCP
automatically resends the segment.
• Ordered Data Transfer:
TCP ensures that data is delivered in the correct order. If segments of data
arrive out of order, TCP reorders them before passing them to the higherlayer
application.
3306 → MySQL
3389 → RDP
8080 → HTTP alternative port
27017 → MongoDB
UDP
• Used for Real-Time Applications:
UDP is commonly used in real-time applications where low latency is crucial,
such as audio and video streaming, online gaming, and voice-over-IP (VoIP)
communication.
• Simple and Stateless:
UDP is a stateless protocol, meaning that it does not maintain any state
information about the communication.
[Link] 5/77
15/04/2025 11:45 eCPPT Certification
Host Discovery
Host discovery is a crucial phase to identify live hosts on a network before
further exploration and vulnerability assessment.
Techniques:
[Link] 6/77
15/04/2025 11:45 eCPPT Certification
[Link] 7/77
15/04/2025 11:45 eCPPT Certification
• SYN-ACK Ping
Sending TCP SYN-ACK packets to a specific port to check if a host is alive. If a
TCP RST is
received, it indicates that the host is alive.
Ping Sweeps
Ping sweep is a network scanning technique used to discover live hosts
(computers, servers, or other devices) within a specific IP address range on a
network.
💡 IDEA
Send a series of ICMP Echo Request (Ping) message to a range of IP
and observe the responses to determine with one are active or
reachable
[Link] 8/77
15/04/2025 11:45 eCPPT Certification
## You can perform it via ping or fping ## fping send ICMP Echo
Request packet fping -a -g [Link]/24 ## -a = alive ## -g =
generate target list ## in order to redirect standard error output
to dev/null use this command fping -a -g [Link]/24 2>/dev/null
[Link] 9/77
15/04/2025 11:45 eCPPT Certification
[Link] 10/77
15/04/2025 11:45 eCPPT Certification
Nothing important.
Now let we execute the same but -sV option to have more info
[Link] 11/77
15/04/2025 11:45 eCPPT Certification
[Link] 12/77
15/04/2025 11:45 eCPPT Certification
[Link] 13/77
15/04/2025 11:45 eCPPT Certification
🚨 Con questi default script non vengono eseguiti script intrusivi come
ad esempio [Link] in quanto bruteforce
[Link] 14/77
15/04/2025 11:45 eCPPT Certification
Firewall/IDS Evasion
[Link] 15/77
15/04/2025 11:45 eCPPT Certification
The -sA send ACK packet to the host. This can be used to understand if the
state is open on filtered. Filtered means that probably there is a Firewall that
filter between our machine and target.
[Link] 16/77
15/04/2025 11:45 eCPPT Certification
or
--data-length to append random data to send packets and -
D option to Cloak a scan with decoys (in fact here we have ip .4 ,
.2 and so on)
Example of --data-length = 200
[Link] 17/77
15/04/2025 11:45 eCPPT Certification
• -T<1-4> with this option the ping discovery will be lower (1) to faster
(4).
Enumeration
[Link] 18/77
15/04/2025 11:45 eCPPT Certification
After host discovery and port scanning phase the next logical phase is
Enumeration
The goal of service enumeration is to gather additional, more
specific/detailed information about the hosts/systems on a network and
the services running on said hosts.
Information like account names, shares, misconfigured services and
so on.
[Link] 19/77
15/04/2025 11:45 eCPPT Certification
📌 PORT Used
- 137 Name Service
- 138 Datagram Service
- 139 Session Service
📌 PORT
- 445 SMB traffic
- 139 when operating with NetBIOS
💡 Questo lab utile per pivoting. Una volta che troviamo servizio
esposto sulla macchina X attraverso revers shell e socks4a
riusciamo ad accedere alla seconda macchina Y pingabile solo
tramite la X
SNMP Enumeration
SNMP (Simple Network Management Protocol) is a widely used protocol
for monitoring and managing networked devices, such as routers,
switches, printers, server and more.
It allows network administrators to query devices for status information,
configure certain setting, and receive alerts or traps when specific event
occur
[Link] 20/77
15/04/2025 11:45 eCPPT Certification
📌 PORT
- 161 UDP SNMP queries
- 162 UDP SNMP traps (notification)
[Link] 21/77
15/04/2025 11:45 eCPPT Certification
Windows Exploitation
An SMB relay attack is a type of network attack where an attacker
intercepts SMB (Server Message Block) traffic, manipulates it, and relays it
to a legitimate server to gain unauthorized access to resources or perform
malicious actions.
[Link] 22/77
15/04/2025 11:45 eCPPT Certification
System
Linux
Security
Exploitation
& x86 Assembly Fundamentals
DEMO: Aucun accès
CPU Architecture
A CPU (Central Processing Unit) is often referred to as the brain of a computer,
responsible for executing instructions and performing calculations.
Post Exploitation
CPU instructions are represented in hexadecimal (HEX) format
MachineThecode
Windows OS stores
is translated intohashed user account
ASM (Assembly password locally in the SAM
Language).
(Security
Assembly Account
language Manager)programming
is a low-level database. language that is closely related
to the machine code instructions
SAM (Security of a specific
Account Manager) CPU architecture
is a database file that is responsible for
managing
user accounts and passwords on Windows. All user account passwords
stored in
the SAM database are hashed.
• Control Unit (CU): The control unit is responsible for coordinating and
Dumping & Cracking NTLM Hashes
controlling the operations of the CPU.
We can dump ntlm hash with:
• Arithmetic Logic Unit (ALU): The ALU is the component responsible for
• mimikatz
performing arithmetic and logical operations. Perform basic operation like
add,•sub, mult and AND,OR,NOT.
Meterpreter hashdump (Kiwi)
After crack them with:
• Hashcat
• John the ripper
DEMO: Aucun accès
DEMO: Aucun accès
[Link] 23/77
15/04/2025 11:45 eCPPT Certification
• Registers:
BypassingRegisters are small, high-speed storage location within the CPU
AV
used to store data temporarily during processing.
Bypass types
Common AV using combo ofinclude:
of registers reverce_tcp (to download file on target
machine and obtain access) veil and upx in order to create malicious
Program Counter (PC): Holds the memory address of the next
◦ payload and then compress executable file.
instruction to be fetched
DEMO: Aucun accès
◦ Instruction Register (IR): Holds the currently executing instruction
◦ Accumulator: Store the result of arithmetic and logic operations
◦ General-Purpose Registers: Used to store intermidiate values and
operands during instruction execution
CPU has its own ISA (Istruction set architecture). The ISA is the set of instructions
that a programmer must understand and use to write a program correctly for
that specific CPU and machine.
Registers
Registers are located withing the CPU and are used to temporarily hold data that
is being processed or manipulated by the CPU.
[Link] 24/77
15/04/2025 11:45 eCPPT Certification
💡 In the 8-bit naming convention is divided into L (low byte) and H (high
byte)
In the 16-bit naming convention combines the L and the H, and replace
it with an X
In the 32-bit representation, the register acronym/name is prefixed with
an E, meaning extended.
Whereas, in the 64-bit representation, the E is replaced with the R.
Process Memory
Process Memory is a fundamental aspect of operating systems, responsible for
organizing and managing memory resources for running programs.
Process memory is typically divided into segments:
• Code segment: Contains the executable code of the program
• Data segment: Stores initialized data, such as global variables and static
variables.
• BSS segment: Contains uninitialized data, initialized to zero during program
execution
• Heap segment: Dynamically allocated memory for program data structures
• Stack segment: Stores function call frames, local variables, and function
parameters.
[Link] 25/77
15/04/2025 11:45 eCPPT Certification
[Link] 26/77
15/04/2025 11:45 eCPPT Certification
💡 Calculator online
Decimal to Hex Converter
Example - PUSH
PUSH E → ESP - 4
Example 2 - PUSH
Example 3 - POP
[Link] 27/77
15/04/2025 11:45 eCPPT Certification
POP
Stack Frames
The Stack Frames is a data structure used by the CPU and the operating system
to manage function calls and execution flow within a program.
Functions contain tow important components, the prologue and the epilogue.
The prologue prepare the stack to be used. (Like a bookmark)
The epilogue resets the stack to the prologue settings.
When the subroutine ends, two things happen:
• The program receives the parameters passed from the subroutine.
• The Instruction Pointer (EIP) is reset to the location at the time of the initial
call.
Example
[Link] 28/77
15/04/2025 11:45 eCPPT Certification
💡 Syscall
[Link]
DEMO:
[Link] 29/77
15/04/2025 11:45 eCPPT Certification
[Link] 30/77
15/04/2025 11:45 eCPPT Certification
Example
[Link] 31/77
15/04/2025 11:45 eCPPT Certification
💡 Vulnerable functions:
○ strcpy
○ strcat
○ gets / fgets
○ vsprintf
○ printf
○ Memcpy
Fuzzing
Fuzzing is a software testing technique that provides invalid data.
Input can be in any form such as:
• Command line
• Parameters
• Network data
• File input
• Databases
• Shared memory regions
• Keyboard/mouse input
• Environment variables
Fuzzing aims to identify such vulnerabilities by systematically testing various
input combinations to see if they cause the program to crash or exhibit
unexpected behavior.
[Link] 32/77
15/04/2025 11:45 eCPPT Certification
💡 SPIKE
[Link] 33/77
15/04/2025 11:45 eCPPT Certification
Privilege Escalation
Privilege Escalation is a critical concept in penetration testing and red teaming.
It refers to the process of gaining elevated access or additional privileges in a
computer system or network.
Privilege escalation involves exploiting vulnerabilities or misconfigurations to gain
access to resources that are typically restricted to users with higher privileges.
[Link] 34/77
15/04/2025 11:45 eCPPT Certification
• Insecure DLL Search Orders: Exploitable DLL search orders that allow DLL
hijacking to gain elevated privileges.
• Stored Credentials: Credentials stored insecurely in registry keys, files, or
other locations.
PowerUp.ps1 PowerShellMafia/PowerSploit
<#
Author: @harmj0y
License: BSD 3-Clause
Required Dependencies: None
Optional Dependencies: None
#>
#Requires -Version 2
… plus
master • PowerShell
[Link] 35/77
15/04/2025 11:45 eCPPT Certification
Add Credentials
List Credentials
Delete Credentials
PowerShell History
DEMO: Aucun accès
[Link] 36/77
15/04/2025 11:45 eCPPT Certification
[Link] 37/77
15/04/2025 11:45 eCPPT Certification
Steps:
1. Identify Vulnerable Registry Autoruns
The attacker identifies registry keys that control autoruns and checks their
permissions. Tools like AccessChk or PowerUp can help locate insecure keys.
2. Exploiting Weak Permissions
If the attacker has write access to a registry key used for autoruns, they can
modify the key's value to point to a malicious executable or script. This
executable will then run with the permissions of the original autorun process,
often leading to privilege escalation.
3. Achieving Privilege Escalation
When the system restarts or the target user logs in, the malicious code runs
with elevated permissions, granting the attacker higher privileges or allowing
them to perform unauthorized actions.
[Link] 38/77
15/04/2025 11:45 eCPPT Certification
💡 Typical Registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
\Run
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\
Run HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
[Link] 39/77
15/04/2025 11:45 eCPPT Certification
Juicy Potato
Juicy Potato is a Windows Privilege escalation exploit that leverages specific
vulnerabilities related to DCOM (Distributed Component Object Model)
The exploit leverages Windows' capability to create
LocalService/NetworkService tokens and then use those tokens to impersonate
higher-privilege accounts like SYSTEM
How it Works?
Juicy Potato exploits a vulnerability in how DCOM processes and services
interact, particularly when creating tokens. It does this by leveraging the
LocalService token to get access to a higher-privilege context.
The exploit creates a fake COM server and registers it with a specific CLSID. This
allows the attacker to direct requests to their malicious COM server, enabling
them to manipulate the token used for that process.
[Link] 40/77
15/04/2025 11:45 eCPPT Certification
Once the malicious COM server is registered and the process initiated, Juicy
Potato can create a LocalService token and then manipulate it to impersonate a
high-privilege context like SYSTEM.
UAC is used to ensure that changes to the operating system require approval
from the administrator or a user account that is part of the local administrators
group.
UACMe is an open source, robust privilege escalation tool that can be used to
bypass Windows UAC by leveraging various techniques.
UACME
hfiref0x • Modifié le il y a 1 heure
DLL Hijacking
[Link] 41/77
15/04/2025 11:45 eCPPT Certification
Methodology
1. Identify Vulnerable Applications
a. Determine Privileged Application: Identify application or services that
run with elevated privileges
b. Analyze DLL Dependencies: Examine the application’s dependency on
specific DLL and check for cases where these DLLs may not be found in
their expected location.
2. Examine the DLL search order
a. Understand Default Search Order: Windows has a predefined order for
searching for DLLs. It generally starts with the application's directory,
followed by the system directories, and then other system-defined
paths.
b. Identify Potential Insertion Points: Determine where in the search order
an attacker might place a DLL so that it gets loaded by the application.
Common locations include:
i. The application's current working directory
ii. The System32 or SysWOW64 directories.
iii. Directories listed in the PATH environment variable.
iv. Other directories included in the search order.
[Link] 42/77
15/04/2025 11:45 eCPPT Certification
💡 When applied, this permission provides users with the ability to execute
a script or binary with the permissions of the file owner as opposed to
the user that is running the script or binary.
SUID permissions are typically used to provide unprivileged users with the ability
to run specific scripts or binaries with “root” permissions
[Link] 43/77
15/04/2025 11:45 eCPPT Certification
Methodology
1. Identify a Target Process
a. The attacker identifies a running process with elevated privileges, such as
a system service, daemon, or application running as root.
2. Create a Malicious Shared Library
a. The attacker creates a shared library containing the code they wish to
executed. This code include arbitrary payload, backdoor etc…
3. Inject the Shared Library into the Target Process
a. Several technique like:
Using LD_PRELOAD: This environment variable specifies a shared library
to
be loaded before any other libraries. By setting this variable, an attacker
can
preload a malicious shared library into a process.
Process Control (ptrace): The ptrace system call allows a process to
control
another process, typically used for debugging. Attackers can use ptrace
to
inject code into a running process, causing it to load a malicious shared
library.
[Link] 44/77
15/04/2025 11:45 eCPPT Certification
Lateral Movement
It is the process of moving from one compromised system to other systems
withing a network.
Pivoting
It involves using a compromised system as a “stepping store” to access other
systems or network segments that are otherwise inaccessible from the attacker’s
initial access.
[Link] 45/77
15/04/2025 11:45 eCPPT Certification
[Link] 46/77
15/04/2025 11:45 eCPPT Certification
[Link] 47/77
15/04/2025 11:45 eCPPT Certification
[Link] 48/77
15/04/2025 11:45 eCPPT Certification
[Link] 49/77
15/04/2025 11:45 eCPPT Certification
📌 PsExec
It is a utility from the Sysinternal Suite that allows administrator to
execute commands on remote systems.
How it Works?
1. Connection Over SMB
PsExec establishes a connection to a remote system using SMB.
It typically requires credentials for authentication, either as plaintext
password or NTLM hashes
2. Named Pipe
PsExec creates a named pipe on the remote system to facilitate
communication between the local PsExec client and the remote service.
3. Temporary Service
To execute commands on the remote system, PsExec creates a temporary
Windows Service. This service run with Elevated Privileges, allowing it to
execute commands or scripts as Administrator.
4. Execution and Cleanup
Once the command or script is executed, PsExec cleans up by removing the
temporary service.
[Link] 50/77
15/04/2025 11:45 eCPPT Certification
⚠️ DISCALAIMER
To authenticate via SMB and execute commands with PsExec, the user
account must have appropriate permissions.
Administrative Privileges
PsExec typically requires administrative privileges to function properly.
This means that the user account used to authenticate over SMB must
have the rights to:
• Create and start a service on the remote system.
• Access the IPC$ share, which is used to establish the SMB
connection.
• Read and write to certain directories or system areas.
• Local Users and Domain Users: PsExec can use both local and
domain-based accounts to authenticate over SMB. In domain
environments, users with administrative rights in Active Directory
may have broader access to remote systems.
SMB
SMB is a network file sharing protocol that is used to facilitate the sharing of files
and peripherals between computers on a local network.
NTLM Authentication
NTLM is a legacy authentication protocol.
[Link] 51/77
15/04/2025 11:45 eCPPT Certification
How it Works?
NTLM authentication operates using a challenge-response mechanism.
1. Connection Request
A client, such as a Windows system or an application, initiates a connection to
an SMB server.
2. Server Challenge
The SMB server responds with an NTLM challenge. This challenge is a random
value used to ensure that the authentication process involves a unique
component for each sessions.
3. Client Response
The client calculates a response to the server's challenge. This calculation
involves encrypting the challenge using the NTLM hash derived from the
user's password.
This process ensures that the client has access to the correct NTLM hash
without transmitting the plaintext password.
📌 2 Type of NTLM
• NTLMv1: Uses a DES-based mechanism to generate the
response.
It has been deprecated due to security weaknesses.
• NTLMv2: More secure, involving a combination of the server's
challenge and a client challenge (a unique value generated by
the client), providing additional security against replay attacks
[Link] 52/77
15/04/2025 11:45 eCPPT Certification
4. Server Verification
The server verifies the client’s response by comparing it to the expected
response, derived from its stored NTLM hashes.
[Link] 53/77
15/04/2025 11:45 eCPPT Certification
Metodology
1. Obtain Credentials
Attackers acquire valid credentials through methods like credential dumping,
phishing, or other means. These credentials may be plaintext passwords or
NTLM hashes.
2. Establish SMB Connection
Using PsExec, the attacker establishes a connection to the target system over
SMB. This typically involves providing a username and password, or NTLM
hash.
3. Remote Command Execution
PsExec creates a named pipe on the target system to communicate with the
PsExec client
[Link] 54/77
15/04/2025 11:45 eCPPT Certification
Use Cases:
• Network Enumeration and Reconnaissance: CME can scan networks to
identify hosts, enumerate shares, and gather other valuable information.
• Credential Testing and Brute Forcing: CME can test credentials against
network resources, checking for weak or reused passwords. This can
help penetration testers identify potential vulnerabilities.
• Lateral Movement: Using various techniques, CME can move laterally
across a network, exploiting valid credentials, hashes, or Kerberos
tickets.
• Privilege Escalation: CME can attempt to escalate privileges on remote
systems, providing deeper access to resources
• Remote Command Execution: CME can execute commands on remote
systems over SMB, WMI, or other protocols, allowing for flexible remote
management.
[Link] 55/77
15/04/2025 11:45 eCPPT Certification
Privileges
To access Windows Remote Management (WinRM), a user account requires
certain privileges and permissions. The specific privileges depend on what
operations the user is expected to perform with WinRM and whether the
environment is configured to restrict access to certain groups or users.
By default, WinRm is configured to allow access to users who belong to the local
Administrator.
💡 Tools
• Evil-WinRM: tool designed for interacting with WinRM service on
remote Windows systems. Used to execute command, transferring
files, and gather information.
• CrackMapExec: can execute PowerShell commands or scripts on
remote systems via WinRM.
• PowerShell Remoting: allows you to run PowerShell commands or
scripts on remote computers
[Link] 56/77
15/04/2025 11:45 eCPPT Certification
Pass-the-Hash (PtH)
Pass-the-Hash is a technique used in lateral movement attacks where an attacker
uses a hashed version of a password to authenticate without needing the
plaintext password.
Pass-the-Hash allows attackers to impersonate users, gain unauthorized access,
and move laterally across a network.
How it works?
Step Description Tools
Obtaining Hashes Attackers acquire NTLM hashes Mimikatz
through Hashcat
Metasploit
Using NTLM hashes for Once the attacker has an NTLM
authentication hash, they can use it to
authenticate without needing
the plaintext password.
Connecting to Remote Attackers can use the NTLM CrackMapExec
Systems hash to establish connections PsExec
with remote systems. Impacket
Common methods include
using SMB, RDP, WMI
Lateral Movement Using Pass-the-Hash, attackers
can move laterally across a
network, connecting to other
systems and performing various
tasks, such as remote command
execution, data exfiltration, or
privilege escalation.
[Link] 57/77
15/04/2025 11:45 eCPPT Certification
How it works?
WMI: is a framework that allows interaction with system components and
management of various tasks on Windows systems.
DCOM and RPC: WMI operates over Distributed Component Object Model
(DCOM) and Remote Procedure Call (RPC), allowing remote communication with
Windows systems
Remote Command Execution: wmiexec uses WMI to remotely execute
commands or scripts on a target system. It does so by sending a WMI request to
execute a command, and then retrieves the output from the remote system.
[Link] 58/77
15/04/2025 11:45 eCPPT Certification
Tools
• Impacket
• CrackMapExec
• Custom Scripts
DEMO: Aucun accès
SSH Tunneling
SSH tunneling, also known as SSH port forwarding, is a technique that uses
Secure Shell (SSH) to create encrypted tunnels for network traffic.
Remote Port Forwarding: Remote port forwarding allows traffic from a port on
the remote system to be forwarded to a specified port on the local system.
This technique is useful for enabling remote access or establishing backdoors
[Link] 59/77
15/04/2025 11:45 eCPPT Certification
[Link] 60/77
15/04/2025 11:45 eCPPT Certification
Use Cases
• User Authentication and Authorization: AD serves as a central
authentication and authorization mechanism.
Example: Users can log into their computer using AD credentials.
• Resource Management: It enables administrators to efficiently manage and
organize network resource like computer, printers, shared folder and
application.
• Group Policy Management: AD allows administrators to define and enforce
security policies, configuration and settings across all domain-joined devices
• Directory Services: It provides a hierarchical structure for organizing objects
within the network, making it easier to locate and manage resources
• Domains: A domain is a logical grouping of network objects that share a
common directory database and security policies
• Domain Controller (DCs): Domain Controllers are servers that manage
access to the resources within a domain. They store a replica of the Active
Directory database and authenticate user logins, enforce security policies,
and replicate changes to other domain controllers within the domain.
• Organizational Units: OU are containers within a domain that allow
administrators to organize and manage object more effectively
• Forest: A forest is a collection of one or more domains that share a common
schema, configuration and global catalog.
• Global Catalog (GC): GC is a distributed data repository that contains a
partial replica of all object in the forest. It facilitates cross-domain searches
and enables users to locate resources across the entire Active Directory
forest.
[Link] 61/77
15/04/2025 11:45 eCPPT Certification
[Link] 62/77
15/04/2025 11:45 eCPPT Certification
Computer represent physical or virtual devices that are joined to the Active
Directory domain. This includes workstations, servers, laptops, and other network
devices.
Organization Units
OUs are containers within an AD domain used to organize and manage object
such as user account, computer account, groups and other OUs.
Differenze between OUs & Security Group
OU Security Group
OUs are used for organizing and Security Groups are used for access
managing objects within Active control and permissions
Directory management.
OUs create a hierarchical structure Security Groups can be organized
for organizing objects, in a flat structure
OUs are containers for objects Security Groups are collections of
within Active Directory and can users, computers, or other groups
contain other OUs,
[Link] 63/77
15/04/2025 11:45 eCPPT Certification
[Link] 64/77
15/04/2025 11:45 eCPPT Certification
Kerberos authentication
KERBEROS DELEGATION
[Link] 65/77
15/04/2025 11:45 eCPPT Certification
[Link] 66/77
15/04/2025 11:45 eCPPT Certification
[Link] 67/77
15/04/2025 11:45 eCPPT Certification
Forest
[Link] 68/77
15/04/2025 11:45 eCPPT Certification
trust forest
[Link] 69/77
15/04/2025 11:45 eCPPT Certification
Killchain
Methodology
[Link] 70/77
15/04/2025 11:45 eCPPT Certification
Techniques
Breaching AD - Password Spray
- Brute Force Attack
- Phishing
- Poisoning
AD Enumeration - PowerView: AD objects, attributes, and permissions
- BloodHound: Visualize and analyze AD permissions, group
memberships, and attack paths
- LDAP Enumeration: Query the AD LDAP service to retrieve detailed
information about users, groups, computers, and OUs
Privilege Escalation - Kerberoasting: Kerberoasting is a Kerberos attack that targets service accounts
to obtain their encrypted service account passwords
- AS-REP Roasting: AS-REP roasting is a Kerberos authentication attack
that targets user accounts with the "Do not require Kerberos
preauthentication" attribute set
Lateral Movement - Pass-the-Hash: Use stolen password hashes to authenticate and gain access to
other systems without knowing the plaintext passwords.
- Pass-the-ticket (PtT) is a technique used in Active Directory
environments to authenticate to other systems or services using stolen Kerberos
ticket-granting tickets (TGTs) or service tickets without knowing the user's
plaintext password.
Persistence - Silver Ticket: A Silver Ticket attack is a technique used in Active Directory (AD)
environments to impersonate any service or computer account by forging
Kerberos service tickets without the need to obtain the account's plaintext
password.
- Golden Ticket: Golden ticket attacks involve forging Kerberos tickets for
arbitrary users, allowing attackers to impersonate any user and access any
resource within the AD environment.
💡 Important references
ocd-mindmaps Welcome to Orange Cyberdefense mindmaps
Password Spray
Password spraying is an attack technique in which an adversary attempts to
compromise user accounts by trying to authenticate with a curated list of
passwords that are either frequently used or likely to be used by their target.
[Link] 71/77
15/04/2025 11:45 eCPPT Certification
AD Enumeration: BloodHound
Active Directory (AD) reconnaissance is a crucial step in assessing the security of
an Active Directory environment.
AD Enumeration: PowerView
DEMO: Aucun accès
[Link] 72/77
15/04/2025 11:45 eCPPT Certification
💡 AS-REP Roasting takes advantage of the fact that some user accounts in
Active Directory may have the "Do not require Kerberos
preauthentication" option enabled.
Tool: Rubeus
Kerberoasting
Kerberoasting is a post-exploitation attack technique that attempts to obtain a
password hash of an Active Directory account that has a Service Principal Name
(“SPN”).
💡 The retrieved Kerberos ticket is encrypted with the hash of the service
account password affiliated with the SPN.
(An SPN is an attribute that ties a service to a user account within the
AD).
The adversary then works offline to crack the password hash, often
using brute force techniques.
Once the plaintext credentials of the service account are obtained, the
adversary can impersonate the account owner and inherit access to any
systems, assets or networks granted to the compromised account.
How it works?
1. A threat actor compromises the account of a Domain User.
2. The threat actor uses the Domain User context to request a Kerberos service
ticket from the ticket granting service (TGS) using tools like GhostPack’s
Rubeus or SecureAuth Corporation’s [Link].
[Link] 73/77
15/04/2025 11:45 eCPPT Certification
3. The threat actor receives a ticket from the Kerberos key distribution center
(KDC). The ticket is encrypted with a hashed version of the account’s
password.
4. The threat actor captures the TGS ticket and takes it offline.
5. The threat actor attempts to crack the SPN credential hash to obtain the
service account’s plaintext password using brute force techniques or tools
like Hashcat or JohnTheRipper.
6. With the service account password in hand, the threat actor attempts to
authenticate as the service account and is granted access to any service,
network or system associated with the compromised account.
7. The attacker is then able to steal data, escalate privileges or set backdoors on
the network to ensure future access.
🧱 How to prevent?
• Complex: Comprised of 25 or more characters
• Random: Do not contain any recognizable words, phrases or
patterns
• Changed frequently: Rotated every 30 days or less
• Use MFA
• Integrate IAM - Identity Access Management
Use BloodHound to identify all privileged service account.
[Link] 74/77
15/04/2025 11:45 eCPPT Certification
[Link] 75/77
15/04/2025 11:45 eCPPT Certification
[Link] 76/77
15/04/2025 11:45 eCPPT Certification
Kerberoasti E’ una tecnica di attacco molto utilizzata in ambienti L’attacco sfrutta il fatto che i ticket di servizio -
Role
ng of C2 Active Directory che sfrutta il protocollo Kerberos emessi per gli account di servizio sotto forma d
per ottenere le credenziali di servizio da un account
Centralized Coordination: C2 frameworks provide a centralized point from
• di servizio (SPN) con privilegi elevati.
which red teams can manage multiple compromised systems.
• Persistence and Remote Access: C2 allows red teams to establish and
maintain persistence on compromised systems. It enables remote access,
allowing red teams to interact with target system, execute commands and
carry out post-exploitation activities.
• Lateral Movement: C2 frameworks facilitate lateral movement across a
network.
• Complex Attack Scenarios: C2 frameworks empower red teams to execute
complex attack scenarios that span multiple stages.
• Testing Blue Team Detection and Response: C2 frameworks are instrumental
[Link] 77/77
Active Directory facilitates centralized authentication by managing user credentials and providing directory services across Windows networks . It integrates with Kerberos as the primary authentication protocol, utilizing its ticketing system for secure credential exchanges, enabling single sign-on and mutual authentication . NTLM, while less secure, is maintained for compatibility with older applications and systems, allowing Active Directory to support varied environments .
Attackers misuse SMB, a protocol designed for file sharing across networks, to facilitate lateral movement by hijacking credentials for unauthorized access to remote machines . Tools like PsExec and CrackMapExec exploit SMB to execute commands on target systems by creating connections using valid credentials. PsExec installs temporary services for command execution, while CrackMapExec tests credentials, facilitating lateral movement without creating additional services .
Kerberos is preferred over NTLM within Active Directory environments due to its enhanced security features such as mutual authentication and reduced vulnerability to replay attacks . NTLM, a legacy protocol, lacks mutual authentication and remains susceptible to pass-the-hash attacks . Despite Kerberos' reliance on encrypted tickets for secure authentication exchanges, environments using older systems often fall back on NTLM, highlighting a significant security challenge .
Pass-the-Hash (PtH) attacks involve using a hash value, typically obtained through credential dumping, to authenticate to resources without needing the plaintext password, exploiting NTLM authentication weaknesses . Pass-the-Ticket (PtT), however, involves stealing and using Kerberos tickets (either service tickets or Ticket Granting Tickets), allowing attackers to authenticate to resources under the guise of the ticket's original owner . PtH primarily targets NTLM vulnerabilities while PtT exploits Kerberos' ticket management processes .
Dynamic Port Forwarding can create a SOCKS proxy through which an attacker gains more flexible tunneling capabilities across a network . This facilitates lateral movement by allowing them to proxy traffic, effectively bypassing firewall restrictions and enabling remote access to various network resources without direct connections, thus making detection more challenging .
Security Groups in Active Directory are used to manage access permissions and are collections of user accounts or other groups specifically designed for access control . Organizational Units (OUs), on the other hand, are containers for organizing objects like user and computer accounts, serving as a means to implement group policies and structural organization within a domain . Unlike Security Groups, OUs enable the application of policies rather than direct permissions management .
To mitigate risks from techniques like Pass-the-Hash and Golden Ticket attacks, organizations should enforce strong password policies, utilize multi-factor authentication, integrate IAM solutions to detect anomalous access patterns, and frequently rotate privileged account credentials . Additionally, implementing least privilege access and monitoring for unusual Kerberos ticket requests can help detect and prevent such attacks .
PsExec facilitates lateral movement by allowing remote execution of commands through the creation of a temporary Windows Service . It operates by establishing an SMB connection using valid credentials and requires administrative privileges on the target system . The prerequisites for using PsExec include having the necessary rights to access IPC$ share, create and start a service, and execute commands with elevated privileges .
WinRM facilitates remote access and command execution on Windows systems over HTTP/HTTPS, using ports TCP 5985 and HTTPS 5986 . It extends administrative capabilities across a network, enabling remote configuration and scripting. Attackers may target WinRM to conduct unauthorized remote operations by exploiting vulnerabilities in authentication or configuration settings, emphasizing the need for secure implementation and monitoring .
Golden Ticket attacks involve forging a Ticket Granting Ticket (TGT) allowing indefinite access as an administrator to a domain . In contrast, Silver Ticket attacks forge a Ticket Granting Service (TGS) for a specific service by using the password hash of that service account . The key difference lies in the scope and the component they target within the Kerberos protocol; Golden Tickets attack the TGT level for widespread access, whereas Silver Tickets focus on service-level attacks without contacting the Key Distribution Center (KDC).