Skip to content

Instantly share code, notes, and snippets.

@hadrian3689
hadrian3689 / kerberos_relaying_clsids.txt
Created May 1, 2025 02:36
Kerberos Relaying CLSIDs. For Windows Server 2019/2022 with ADCS installed.
c980e4c2-c178-4572-935d-a8a429884806
90f18417-f0f1-484e-9d3c-59dceee5dbd8
03ca98d6-ff5d-49b8-abc6-03dd84127020
d99e6e73-fc88-11d0-b498-00a0c90312f3 (certsrv.exe)
42cbfaa7-a4a7-47bb-b422-bd10e9d02700
000c101c-0000-0000-c000-000000000046
1b48339c-d15e-45f3-ad55-a851cb66be6b
49e6370b-ab71-40ab-92f4-b009593e4518
50d185b9-fff3-4656-92c7-e4018da4361d
3c6859ce-230b-48a4-be6c-932c0c202048 (trusted installer service)
@hadrian3689
hadrian3689 / powashell.csproj
Created April 2, 2025 03:43 — forked from egre55/powashell.csproj
powashell.csproj by Casey Smith @subTee
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This inline task executes c# code. -->
<!-- C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe powaShell.csproj -->
<Target Name="Hello">
<ClassExample />
</Target>
<UsingTask
TaskName="ClassExample"
TaskFactory="CodeTaskFactory"
AssemblyFile="C:\Windows\Microsoft.Net\Framework\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll" >
@hadrian3689
hadrian3689 / pwm_decrypt.py
Created December 11, 2024 03:45
A PwmConfiguration.xml decryptor in Python
import base64
import hashlib
from Crypto.Cipher import AES #pip install pycryptodome
def pwm_cipher():
#Create a new AES cipher object using AES-128 in ECB mode.
return AES.new(key=b'0'*16, mode=AES.MODE_ECB) # Placeholder key, actual key will be set later
def pwm_make_key(key: str) -> bytes:
#Derive a 16-byte AES key from the given input key.
@hadrian3689
hadrian3689 / procmon.ps1
Created November 24, 2024 23:40 — forked from egre55/procmon.ps1
procmon.ps1
# Simple PowerShell process monitor
while($true)
{
$process = Get-WmiObject Win32_Process | Select-Object CommandLine
Start-Sleep 1
$process2 = Get-WmiObject Win32_Process | Select-Object CommandLine
Compare-Object -ReferenceObject $process -DifferenceObject $process2
@hadrian3689
hadrian3689 / winrm_decrypt.py
Created October 14, 2023 04:24 — forked from jborean93/winrm_decrypt.py
A script that can be used to decrypt WinRM exchanges using NTLM over http
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# PYTHON_ARGCOMPLETE_OK
# Copyright: (c) 2020 Jordan Borean (@jborean93) <[email protected]>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
"""
Script that can read a Wireshark capture .pcapng for a WinRM exchange and decrypt the messages. Currently only supports
exchanges that were authenticated with NTLM. This is really a POC, a lot of things are missing like NTLMv1 support,
@hadrian3689
hadrian3689 / random_session_key_calc.py
Last active June 2, 2023 03:59 — forked from h4sh5/random_session_key_calc.py
Random Session Key calculator based off of data from a packet capture
import hashlib
import hmac
import argparse
#stolen from impacket. Thank you all for your wonderful contributions to the community
try:
from Cryptodome.Cipher import ARC4
from Cryptodome.Cipher import DES
from Cryptodome.Hash import MD4
except Exception: