Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/notdodo/localadminsharp

.NET executable to use when dealing with privilege escalation on Windows to gain local administrator access
https://github.com/notdodo/localadminsharp

backdoor csharp privesc privilege-escalation redteam

Last synced: about 9 hours ago
JSON representation

.NET executable to use when dealing with privilege escalation on Windows to gain local administrator access

Awesome Lists containing this project

README

        

# LocalAdminSharp
.NET executable to use when dealing with privilege escalation on Windows to gain local administrator access. This simple tool creates a new user adds it to the local administrator group; if the user exists it will just be added to the admin group.
You can also edit the code to add a domain user to the local administrator group editing the variable `domain`.

## Build
Open the solution in Visual Studio (tested only on Visual Studio 2019 Community Edition) and compile the EXE for the desired architecture (x86, x64); in the Release mode the PBD file is removed.

## Customize
To create custom user just edit the file `Program.cs` with the desired username, password, group and domain.

## Usage
* Standalone: `.\LocalAdminSharp.exe`
* Chain: use the EXE to be executed from another script/tool (i.e. for privescs)

## Analysis

The PBD file is removed when compiling in Release mode and Windows Defender does not detect it as malicious (yet). Obfuscation should be used after the compilation to avoid easy RE using, for example, dnSpy.