Skip to main content

Identifying Access Token Escalation

Detect access token abuse that escalates attackers to SYSTEM, using event logs and DFIR artifacts.

Task 1: Introduction

Task 2: Understanding Windows Access Tokens

Task 3: Access Token Abuse from an Adversary Perspective

Task 4: Detecting Access Token Manipulation with Event Logs

Task 5: Detecting Access Token Manipulation with DFIR Artifacts

Task 6: Containment, Prevention, and Mitigation

Task 7: Real-World Challenge

Task 8: Conclusion

Back to all walkthroughs
Room Icon

Identifying Access Token Escalation

Max room.

Detect access token abuse that escalates attackers to SYSTEM, using event logs and DFIR artifacts.

medium

60 min

21

User profile photo.
User profile photo.

To access material, start machines and answer questions login.

A single web request hits one of TryHatMe Studios' internet-facing servers. Minutes later, a process owned by the low-privileged web service account spawns a command shell running as NT AUTHORITY\SYSTEM. No exploit crashed the host, no password was cracked, and there isn't a single failed logon to point at.

That's access token abuse (MITRE ATT&CK T1134), one of the most reliable ways an attacker turns a small foothold into full control of a Windows host. The attacker never had to acquire the privilege that made it possible, because Windows grants it to that service account by design, the way legitimate services need it. The technique just reuses a mechanism the operating system leans on every day, which is exactly why it blends in. We'll work it from the defender's perspective, first seeing how tokens really work, then hunting the escalation in the event logs and in the artifacts that outlive them, and finishing with an independent investigation of our own.

Learning Objectives

  • Explain what Windows access tokens are and why service accounts are such attractive escalation targets
  • Detect access token manipulation across Windows Security and Sysmon event logs
  • Recover proof that an escalation tool was present, even after the attacker deleted it
  • Reconstruct a privilege escalation timeline in UTC and map it to MITRE ATT&CK T1134
  • Contain and harden against token abuse in a way that actually invalidates stolen access

Prerequisites

  • Windows privilege escalation: how local elevation works on a single host (Identifying UAC Escalation Bypass room)
  • Windows event logs: reading Security and Sysmon events (Windows Event Logs room)
  • Endpoint triage: comfort with collected DFIR artifacts like Prefetch and the registry

Machine Access

Two machines are attached to this room. The evidence machine holds the triage the response team collected, and the DefenseBox is your analysis workstation, with the DFIR toolkit already installed. Work it the way a responder would: keep the evidence machine read-only and run every tool on the DefenseBox.

Start both machines, then move the evidence across:

  1. Connect to the evidence machine with the credentials below. It opens in the split view, or you can reach it from the DefenseBox with mstsc /v:MACHINE_IP.
  2. On the evidence machine, map the DefenseBox's Desktop share using the net use command and credentials shown on the DefenseBox's welcome page.
  3. Open the Artifacts folder on the evidence machine's desktop. Copy the Challenge folder, then open Walkthrough and copy the Walkthrough folder inside it. Paste both into a new Artifacts folder on that share.

The evidence then sits on the DefenseBox in C:\Users\DFIRUser\Desktop\Artifacts\Walkthrough and C:\Users\DFIRUser\Desktop\Artifacts\Challenge.

Set up your virtual environment

To successfully complete this room, you'll need to set up your virtual environment. This involves starting both your DefenseBox and Lab Machines, ensuring you're equipped with the necessary tools and access to tackle the challenges ahead.
Defender machine
Status:Off
Lab machine
Status:Off

Credentials

Connect to the evidence machine over using the following credentials:

Username
 
Administrator
 
Password
 
Secure!
 
IP address
 
MACHINE_IP