Skip to content
Access control Write-up Advanced

Using A C# Shellcode Runner And Confuserex To Bypass UAC While Evading AV

The author describes a method to bypass User Account Control (UAC) on Windows by using a custom C# shellcode runner compiled as a DLL, obfuscated with ConfuserEx to evade antivirus, and then leveraged via a known UAC bypass technique (SilentCleanup scheduled task DLL hijacking). An attacker with medium integrity administrative access could elevate to high integrity without triggering the UAC prompt, while evading Defender.

hausec.com

Published on hausec.com

I was recently on an engagement where we phished in and ran into UAC which gave me more trouble than I expected. When a user logs onto Windows, a logon session is created and the credentials are tied into an authentication package inside of the logon session.

The author, on hausec.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

What the attacker needed

Administrative user with medium integrity; Ability to upload files to user directory; Windows target with UAC enabled; Antivirus evasion via ConfuserEx

How it was found

  1. Generate a stageless payload using Cobalt Strike (or another C2) in .bin format.
  2. Follow instructions to create an encrypted.bin file and build the C# shellcode runner as an EXE to verify it works.
  3. Install the DllExport NuGet package and configure it to export the Main function.
  4. Change the build configuration to x64 and Release, set output type to Class Library, and build the DLL.
  5. Run the DLL with rundll32.exe to confirm it executes and establishes a beacon.
  6. Obfuscate the DLL with ConfuserEx to evade antivirus.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This post explains how an attacker who already has some admin rights on a Windows machine can silently gain full administrator privileges without the usual pop-up warning. It uses a custom program that runs malicious code and is disguised to avoid antivirus detection, then abuses a scheduled task to elevate privileges.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.