active-directory-attac…
Use when attacking a Windows Active Directory domain — Kerberos roasting/delegation, coercion + NTLM/Kerberos relay (CVE-2025-33073), ADCS ESC1-16 (EKUwu),…
Use when writing security tooling, exploits, scanners, or C2 in Python/C/Go/Rust/ASM — systems & network programming, automation, cryptography implementation
$ npx -y skills add hypnguyen1209/offensive-claude --skill coding-mastery --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/coding-masteryContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when writing security tooling, exploits, scanners, or C2 in Python/C/Go/Rust/ASM — systems & network programming, automation, cryptography implementation
name: coding-mastery description: Use when writing security tooling, exploits, scanners, or C2 in Python/C/Go/Rust/ASM — systems & network programming, automation, cryptography implementation metadata: type: utility phase: any kill_chain: phase: [weaponize] step: [2] attck_tactics: [TA0042] depends_on: [] feeds_into: [exploit-development, shellcode-dev, edr-evasion] inputs: [tool_requirements] outputs: [custom_tooling, exploit_code]
# Exploit development with pwntools from pwn import * context(arch='amd64', os='linux') # Network programming import socket, ssl, struct import asyncio, aiohttp # async operations # Web exploitation import requests, urllib3 from bs4 import BeautifulSoup # Crypto from Crypto.Cipher import AES, DES from Crypto.PublicKey import RSA import hashlib, hmac # Binary analysis import struct, ctypes from capstone import * # disassembly from unicorn import * # emulation from keystone import * # assembly
// Shellcode development // Position-independent code, null-free // Syscall-based (avoid libc dependency) // Kernel module development #include <linux/module.h> #include <linux/kernel.h> // Windows API abuse #include <windows.h> #include <winternl.h> // Direct syscalls, NTAPI // Memory manipulation // Custom allocators, heap spray, ROP gadget finders
// Implant development (cross-compile, static binary) // C2 communication (HTTP/DNS/named pipes) // Network scanning and enumeration // Proxy/tunnel tools (chisel-like) // Advantages: single binary, cross-platform, fast, good crypto stdlib
// Memory-safe exploit tooling // High-performance scanners // Custom protocol implementations // Fuzzing harnesses
# AMSI bypass, ETW patching # In-memory execution (reflection) # AD enumeration and exploitation # Fileless malware techniques
; Shellcode ; ROP gadgets ; Anti-debugging ; Kernel exploitation ; Architecture-specific tricks
import asyncio
from dataclasses import dataclass
from typing import AsyncIterator
@dataclass
class Finding:
severity: str
target: str
vulnerability: str
evidence: str
class Scanner:
def __init__(self, targets: list[str], concurrency: int = 50):
self.targets = targets
self.semaphore = asyncio.Semaphore(concurrency)
async def scan_target(self, target: str) -> list[Finding]:
async with self.semaphore:
# Implement scan logic
pass
async def run(self) -> AsyncIterator[Finding]:
tasks = [self.scan_target(t) for t in self.targets]
for coro in asyncio.as_completed(tasks):
findings = await coro
for f in findings:
yield fimport base64, json, time, random
from cryptography.fernet import Fernet
class Beacon:
def __init__(self, server: str, key: bytes, jitter: float = 0.3):
self.server = server
self.cipher = Fernet(key)
self.jitter = jitter
self.sleep_time = 60
def encrypt(self, data: bytes) -> str:
return base64.b64encode(self.cipher.encrypt(data)).decode()
def decrypt(self, data: str) -> bytes:
return self.cipher.decrypt(base64.b64decode(data))
def sleep(self):
jitter = random.uniform(1 - self.jitter, 1 + self.jitter)
time.sleep(self.sleep_time * jitter)
def checkin(self) -> dict:
# POST encrypted system info, receive tasking
passimport struct
class ProtocolParser:
def __init__(self, data: bytes):
self.data = data
self.offset = 0
def read_u8(self) -> int:
val = struct.unpack_from('B', self.data, self.offset)[0]
self.offset += 1
return val
def read_u16(self) -> int:
val = struct.unpack_from('>H', self.data, self.offset)[0]
self.offset += 2
return val
def read_u32(self) -> int:
val = struct.unpack_from('>I', self.data, self.offset)[0]
self.offset += 4
return val
def read_bytes(self, n: int) -> bytes:
val = self.data[self.offset:self.offset + n]
self.offset += n
return val
def read_string(self) -> str:
length = self.read_u16()
return self.read_bytes(length).decode()# AES-GCM (authenticated encryption)
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
import os
key = AESGCM.generate_key(bit_length=256)
aes = AESGCM(key)
nonce = os.urandom(12)
ct = aes.encrypt(nonce, plaintext, associated_data)
pt = aes.decrypt(nonce, ct, associated_data)
# RSA key generation and usage
from cryptography.hazmat.primitives.asymmetric import rsa, padding
from cryptography.hazmat.primitives import hashes
private_key = rsa.generate_private_key(public_exponent=65537, key_size=4096)
public_key = private_key.public_key()
# Encrypt
ct = public_key.encrypt(plaintext, padding.OAEP(
mgf=padding.MGF1(algorithm=hashes.SHA256()),
algorithm=hashes.SHA256(), label=None))
# HMAC for integrity
import hmac, hashlib
mac = hmac.new(key, message, hashlib.sha256).digest()
# Key derivation
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
kdf = PBKDF2HMAC(algorithm=hashes.SA spec-driven offensive security framework for Claude Code — structured engagement workflows based on the Cyber Kill Chain, 31 kill-chain skills (multi-file progressive-disclosure) plus a discipline layer (a SessionStart dispatcher + 6 process/discipline
Repo: hypnguyen1209/offensive-claude
Use when attacking a Windows Active Directory domain — Kerberos roasting/delegation, coercion + NTLM/Kerberos relay (CVE-2025-33073), ADCS ESC1-16 (EKUwu),…
--- name: advanced-redteam-ops description: Use when designing C2 infrastructure or OPSEC for a long-haul red-team op — redirectors, malleable profiles,…
Use when red-teaming an agentic AI / LLM application — indirect & zero-click prompt injection, MCP tool poisoning, persistent memory poisoning,…
Use when attacking an AI/ML system or model — prompt injection & jailbreaks (Crescendo, Skeleton Key, Best-of-N), RAG/vector poisoning, agentic/MCP…
Use when building a client-side browser exploit — V8/JSC JIT type confusion to renderer R/W, V8 heap-sandbox escape, renderer-to-browser sandbox escape (Mojo…
Use when attacking or auditing a CI/CD pipeline or software supply chain — pwn requests, poisoned pipeline execution, compromised/mutable-tag actions,…