πŸ–₯️RDP Attacks

🎯 Overview

This document covers exploitation techniques against RDP services, focusing on practical attack methodologies from HTB Academy's "Attacking Common Services" module. RDP attacks can lead to unauthorized remote access, privilege escalation, session hijacking, and lateral movement.

"Remote Desktop Protocol (RDP) is a proprietary protocol developed by Microsoft which provides a user with a graphical interface to connect to another computer over a network connection. Unfortunately, while RDP greatly facilitates remote administration of distributed IT systems, it also creates another gateway for attacks."

πŸ—οΈ RDP Attack Methodology

Attack Chain Overview

Service Discovery β†’ Authentication Attacks β†’ Session Exploitation β†’ Privilege Escalation β†’ Lateral Movement

Key Attack Objectives

  • Password spraying to avoid account lockouts

  • Session hijacking for privilege escalation

  • Pass-the-Hash attacks with NT hashes

  • GUI access to Windows systems

  • Credential dumping from RDP sessions


πŸ“ Service Discovery & Enumeration

Default RDP Port Detection

Advanced RDP Scanning

Key Information to Extract

  • RDP service version (Windows version identification)

  • Authentication methods supported

  • Certificate information (self-signed vs CA)

  • Encryption levels available

  • Domain membership status


βš”οΈ Authentication Attacks

1. Password Spraying Attacks

Why Password Spraying?

HTB Academy Username List

2. Crowbar Password Spraying

Basic Crowbar Usage

Advanced Crowbar Options

3. Hydra Password Spraying

HTB Academy Hydra Example

Optimized Hydra Commands


πŸ”— RDP Connection Methods

1. rdesktop Client

rdesktop Advanced Options

2. xfreerdp Client


πŸ‘€ Protocol Specific Attacks

1. RDP Session Hijacking

Attack Prerequisites

HTB Academy Session Hijacking Example

Step 1: Identify Active Sessions

Step 2: Create Hijacking Service

Step 3: Execute Session Hijack

Alternative Hijacking Methods

2. RDP Pass-the-Hash (PtH) Attack

Attack Prerequisites & Limitations

Enable Restricted Admin Mode

HTB Academy PtH Execution

Alternative PtH Tools


🎯 HTB Academy Lab Scenarios

Scenario 1: Initial RDP Access

Scenario 2: Registry Key Knowledge

Scenario 3: Administrator Access


πŸ“‹ RDP Attack Checklist

Discovery & Enumeration

Authentication Attacks

Post-Authentication

Advanced Techniques


πŸ›‘οΈ Defense & Mitigation

RDP Security Hardening

  • Network Level Authentication (NLA) - Enable for all RDP connections

  • Strong password policies - Prevent common password usage

  • Account lockout policies - Limit failed login attempts

  • IP restrictions - Whitelist authorized source IPs

  • Non-standard ports - Change from default 3389

  • VPN requirements - Require VPN for RDP access

Registry Security

  • Disable Restricted Admin - Prevent Pass-the-Hash attacks

  • Audit registry changes - Monitor security-related modifications

  • Group Policy controls - Centralized RDP security settings

Monitoring & Detection

  • Failed authentication logs - Event ID 4625 monitoring

  • Successful RDP logins - Event ID 4624 tracking

  • Session creation/termination - Event ID 4778/4779

  • Unusual source IPs - Geographic/time-based anomalies

  • Registry modifications - Monitor Lsa registry changes



πŸ“š References

  • HTB Academy - Attacking Common Services Module

  • Microsoft RDP Documentation - Official protocol specifications

  • Crowbar Tool - RDP password spraying utility

  • FreeRDP Project - Open-source RDP implementation

  • NIST Guidelines - Remote access security best practices


This document provides comprehensive RDP attack methodologies based on HTB Academy's "Attacking Common Services" module, focusing on practical exploitation techniques for penetration testing and security assessment.

Last updated