Red Teaming Tutorial: Scanning a Network to Find Local Admin Access
· 39:22 · Watch on YouTube ↗
Summary
The presenter demonstrates a custom C#/.NET utility that uses the current user's token to find domain systems where they have local-admin access, then shows executing it through Sliver and using PsExec for lateral movement.
Key points
- The presenter describes an engagement scenario with access to a compromised workstation and a C2 beacon, but no credentials or Linux system; NXC could not be run in that environment.
- The custom utility uses the current user's token, queries domain computers, and checks which systems are online.
- It tests service-manager access and writable shares to identify systems where the account may have local-admin rights; the presenter says combining checks helps reduce false positives.
- The utility is written in C# for .NET Framework 4.7 and is run as an assembly through a C2 session. The presenter warns that asynchronous scanning can consume substantial resources in large environments.
- In the lab demonstration, the tool distinguishes an account without remote admin access from one with access, and the presenter notes a bug checking the machine where the tool is running.
- The presenter demonstrates using PsExec-style service execution to move to another system. An initial attempt failed; a service-specific payload then succeeded, though one attempt did not remove the service executable.
Article Details
- Topics
- [00:13] Engagement constraints and the goal of finding local-admin access
- [01:22] Custom utility design and its relationship to PowerView
- [02:03] User-token use, domain host discovery, and admin-access checks
- [05:32] C#/.NET implementation and execution considerations
- [08:18] Demonstration comparing accounts with and without admin access
- [17:43] Sliver beacon setup and assembly execution
- [28:01] PsExec-based lateral movement and troubleshooting
