Slayer Labs

Cyber Range Platform

Windows Persistence via Port Monitors

This post will cover some quick research done by poking around the Windows persistence technique of Port Monitors aka Mitre technique T1547.010. This method can also be used to escalate privileges from Administrator(in most cases) to SYSTEM.

Port Monitors have been documented in the past but I wanted to dive a little deeper and post couple extra trinkets.

What’s a Port Monitor?

The context of a Port Monitor (in this post) is related to the Windows Print Spooler Service or spoolsv.exe. When adding a printer port monitor a user (or attacker😈) has the ability to add an arbitrary dll that acts as the “monitor”.

There are basically two ways to add a port monitor aka your evil dll: via Registry for persistence or via a custom Windows app (AddMonitor function) for immediate dll execution.

A nice bonus is your dll will be executed as NT AUTHORITY/SYSTEM since this is what the parent spoolsv.exe is run as. The catch is you need local admin privs or at least the ability to write to the registry.

First, onto persistence…

Read more

Kerberos Double-Hop Workarounds

This post will cover some quick and dirty work-arounds to overcome the dreaded double-hop issue when conducting red team activities on Windows environments. Methods covered in this post also bleed into general Windows lateral movement techniques - not just double-hopping solutions.

If you’ve had to move laterally or conduct general systems administration on Windows environments then you’ve probably come across this obstacle - specifically with Powershell Remoting/WinRM. If you’re unsure what the double-hop issue is, it’ll be briefly covered below. Otherwise checkout this Microsoft article to get a better idea.

This post will follow a scenario (from the viewpoint of a red teamer) when your attacking box has internal network access, but is NOT joined to the domain. It’s also assuming you as the attacker just have CLI access, with Local Admin creds - also WinRM is enabled throughout the domain.

Read more