abusing-dpapi-for-cred…
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using…
Analyzes UEFI bootkit persistence (SPI flash implants, ESP modifications,
$ npx -y skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-uefi-bootkit-persistence --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/analyzing-uefi-bootkit-persistenceContext preview
The summary Claude sees to decide when to auto-load this skill.
Analyzes UEFI bootkit persistence (SPI flash implants, ESP modifications,
name: analyzing-uefi-bootkit-persistence description: 'Analyzes UEFI bootkit persistence (SPI flash implants, ESP modifications, Secure Boot bypass, UEFI variable manipulation) using chipsec for firmware integrity verification, detecting known families like BlackLotus, LoJax, and MoonBounce. Use for UEFI malware analysis, firmware persistence investigation, or Secure Boot bypass detection. ' domain: cybersecurity subdomain: firmware-security tags: - UEFI - bootkit - firmware - Secure-Boot - chipsec - ESP - persistence version: 1.0.0 author: mukul975 license: Apache-2.0 d3fend_techniques: - Platform Hardening - Restore Object - Platform Monitoring - Firmware Verification - Firmware Embedded Monitoring Code nist_csf: - ID.RA-01 - PR.PS-01 - PR.PS-02 mitre_attack: - T1542.001 - T1542.003 - T1553.006 - T1542 - T1014
**Do not use** for standard MBR-based bootkits on legacy BIOS systems without UEFI; use MBR/VBR bootkit analysis instead.
Acquire the UEFI firmware from the SPI flash chip for offline analysis:
# Using chipsec to dump SPI flash contents python chipsec_util.py spi dump firmware_dump.rom # Using flashrom as an alternative flashrom -p internal -r firmware_dump.rom # Verify dump integrity sha256sum firmware_dump.rom # Read SPI flash descriptor information python chipsec_util.py spi info # Check SPI flash region access permissions python chipsec_main.py -m common.spi_access # Verify BIOS write protection is enabled python chipsec_main.py -m common.bios_wp # Check SPI flash controller lock python chipsec_main.py -m common.spi_lock
Enumerate and analyze UEFI variables for unauthorized modifications:
# List all UEFI variables on a live system python chipsec_util.py uefi var-list # List UEFI variables from a SPI flash dump python chipsec_util.py uefi var-list-spi firmware_dump.rom # Read specific Secure Boot variables python chipsec_util.py uefi var-read SecureBoot 8BE4DF61-93CA-11D2-AA0D-00E098032B8C python chipsec_util.py uefi var-read SetupMode 8BE4DF61-93CA-11D2-AA0D-00E098032B8C python chipsec_util.py uefi var-read PK 8BE4DF61-93CA-11D2-AA0D-00E098032B8C python chipsec_util.py uefi var-read KEK 8BE4DF61-93CA-11D2-AA0D-00E098032B8C python chipsec_util.py uefi var-read db D719B2CB-3D3A-4596-A3BC-DAD00E67656F # Dump UEFI key databases for analysis python chipsec_util.py uefi keys # Check Secure Boot configuration module python chipsec_main.py -m common.secureboot.variables
Inspect the ESP for unauthorized or modified boot components:
# Mount ESP (typically the first FAT32 partition, ~100-500MB)
mkdir /mnt/esp
mount /dev/sda1 /mnt/esp
# List all files on ESP with timestamps
find /mnt/esp -type f -exec ls -la {} \;
# Check for BlackLotus indicators - custom directory under ESP:/system32/
ls -la /mnt/esp/system32/ 2>/dev/null
# Verify Windows Boot Manager signature
sigcheck -a /mnt/esp/EFI/Microsoft/Boot/bootmgfw.efi
# Hash all EFI binaries for comparison against known-good values
find /mnt/esp -name "*.efi" -exec sha256sum {} \;
# Check for unauthorized .efi files outside standard directories
find /mnt/esp -name "*.efi" | grep -v "Microsoft\|Boot\|ubuntu\|grub"
# Look for grubx64.efi planted by BlackLotus
find /mnt/esp -name "grubx64.efi" -exec sha256sum {} \;
# Examine MeasuredBoot logs for anomalies (Windows)
# Logs located at C:\Windows\Logs\MeasuredBoot\Analyze the firmware dump for known UEFI malware patterns:
# Extract all firmware modules with UEFIExtract
UEFIExtract firmware_dump.rom all
# Generate firmware module whitelist from vendor baseline
python chipsec_main.py -m tools.uefi.whitelist -a generate,baseline.json,firmware_vendor.rom
# Compare current firmware against whitelist
python chipsec_main.py -m tools.uefi.whitelist -a check,baseline.json,firmware_dump.rom
# Scan firmware with UEFI-specific YARA rules
yara -r uefi_bootkits.yar firmware_dump.rom
# Scan extracted modules individually
find firmware_dump.rom.dump -name "*.efi" -exec yara -r uefi_bootkits.yar {} \;
# Check for modified CORE_DXE module (targeted by MoonBounce, CosmicStrand)
# Compare GUID and hash against vendor baselineCheck for known Secure Boot bypass techniques:
# Check if Secure Boot is enabled python chipsec_main.py -m common.secureboot.variables # Verify SMM (System Management Mode) protections python chipsec_main.py -m common.smm # Check SMM BIOS write protection python chipsec_main.py -m common.bios_smi # On Windows - check boot configuration for bypass indicators bcdedit /enum firmware bcdedit /v # Check for testsigning/nointegritychecks/debug flags bcdedit | findstr /i "testsignin
817 structured cybersecurity skills for AI agents · Mapped to 6 frameworks: MITRE ATT&CK, NIST CSF 2.0, MITRE ATLAS, D3FEND, NIST AI RMF & MITRE F3 (Fight Fraud) · agentskills.io standard · Works with Claude Code, GitHub Copilot, Codex CLI, Cursor, Gemini CLI & 20+ platforms · 29 security domains · Apache 2.0
Repo: mukul975/Anthropic-Cybersecurity-Skills
Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using…
Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or…
Prepare a defense-contractor environment for CMMC Level 2 certification: scope CUI and FCI, implement the 110 NIST SP 800-171 Rev 2 security requirements…
Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification…
Detect dangerous ACL misconfigurations in Active Directory using ldap3
Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection,…