Skip to content

Instantly share code, notes, and snippets.

View wh0amitz's full-sized avatar
🌴
On vacation

WHOAMI wh0amitz

🌴
On vacation
View GitHub Profile
@wh0amitz
wh0amitz / ExploitSeCreateTokenPrivilege.cpp
Created July 6, 2023 11:17
Abuse of SeCreateTokenPrivilege for arbitrary file writing
#include <Windows.h>
#include <winternl.h>
#define _NTDEF_
#include <NTSecAPI.h>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <sddl.h>
#include <lmaccess.h>
@wh0amitz
wh0amitz / PassTheCertificate.cs
Last active August 19, 2023 05:03
Pass The Certificate to LDAPS when PKINIT Padata is "NOSUPP"
using System;
using System.Net;
using System.Text;
using System.DirectoryServices;
using System.Text.RegularExpressions;
using System.Security.Principal;
using System.Security.AccessControl;
using System.DirectoryServices.Protocols;
using System.Security.Cryptography.X509Certificates;