[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M738RF5Q784F3BN6GCFGRYF4":3,"skill-same:01M738RF5Q784F3BN6GCFGRYF4":90},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":57,"ownerDescription":58,"updatedAt":59,"install":60,"resources":73},"01M738RF5Q784F3BN6GCFGRYF4","analyzing-bootkit-and-rootkit-samples",null,"Analyzes bootkit and advanced rootkit malware that infects the Master Boot Record (MBR), Volume Boot Record (VBR), or UEFI firmware to gain persistence below the operating system. Covers boot sector analysis, UEFI module inspection, and anti-rootkit detection techniques. Activates for requests involving bootkit analysis, MBR malware investigation, UEFI persistence analysis, or pre-OS malware detection.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fanalyzing-bootkit-and-rootkit-samples\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fanalyzing-bootkit-and-rootkit-samples\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: analyzing-bootkit-and-rootkit-samples\ndescription: 'Analyzes bootkit and advanced rootkit malware that infects the Master\n  Boot Record (MBR), Volume Boot Record (VBR), or UEFI firmware to gain persistence\n  below the operating system. Covers boot sector analysis, UEFI module inspection,\n  and anti-rootkit detection techniques. Activates for requests involving bootkit\n  analysis, MBR malware investigation, UEFI persistence analysis, or pre-OS malware\n  detection.\n\n  '\ndomain: cybersecurity\nsubdomain: malware-analysis\ntags:\n- malware\n- bootkit\n- rootkit\n- UEFI\n- MBR-analysis\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.AE-02\n- RS.AN-03\n- ID.RA-01\n- DE.CM-01\nmitre_attack:\n- T1542.003\n- T1542.001\n- T1542.002\n- T1014\n- T1547.006\nsource: https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills\nsource_commit: 04450304b12645cb2b974ab96d28c0664758a88d\nnote: \"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.\"\n---\n\n# Analyzing Bootkit and Rootkit Samples\n\n## When to Use\n\n- A system shows signs of compromise that persist through OS reinstallation\n- Antivirus and EDR are unable to detect malware despite clear evidence of compromise\n- UEFI Secure Boot has been disabled or shows integrity violations\n- Memory forensics reveals rootkit behavior (hidden processes, hooked system calls)\n- Investigating nation-state level threats known to deploy bootkits (APT28, APT41, Equation Group)\n\n**Do not use** for standard user-mode malware; bootkits and rootkits operate at a fundamentally different level requiring specialized analysis techniques.\n\n## Prerequisites\n\n- Disk imaging tools (dd, FTK Imager) for acquiring MBR\u002FVBR sectors\n- UEFITool for UEFI firmware volume analysis and module extraction\n- chipsec for hardware-level firmware security assessment\n- Ghidra with x86 real-mode and 16-bit support for MBR code analysis\n- Volatility 3 for kernel-level rootkit artifact detection\n- Bootable Linux live USB for offline system analysis\n\n## Workflow\n\n### Step 1: Acquire Boot Sectors and Firmware\n\nExtract MBR, VBR, and UEFI firmware for offline analysis:\n\n```bash\n# Acquire MBR (first 512 bytes of disk)\ndd if=\u002Fdev\u002Fsda of=mbr.bin bs=512 count=1\n\n# Acquire first track (usually contains bootkit code beyond MBR)\ndd if=\u002Fdev\u002Fsda of=first_track.bin bs=512 count=63\n\n# Acquire VBR (Volume Boot Record - first sector of partition)\ndd if=\u002Fdev\u002Fsda1 of=vbr.bin bs=512 count=1\n\n# Acquire UEFI System Partition\nmkdir \u002Fmnt\u002Fefi\nmount \u002Fdev\u002Fsda1 \u002Fmnt\u002Fefi\ncp -r \u002Fmnt\u002Fefi\u002FEFI \u002Fanalysis\u002Fefi_backup\u002F\n\n# Dump UEFI firmware (requires chipsec or flashrom)\n# Using chipsec:\npython chipsec_util.py spi dump firmware.rom\n\n# Using flashrom:\nflashrom -p internal -r firmware.rom\n\n# Verify firmware dump integrity\nsha256sum firmware.rom\n```\n\n### Step 2: Analyze MBR\u002FVBR for Bootkit Code\n\nExamine boot sector code for malicious modifications:\n\n```bash\n# Disassemble MBR code (16-bit real mode)\nndisasm -b16 mbr.bin > mbr_disasm.txt\n\n# Compare MBR with known-good Windows MBR\n# Standard Windows MBR begins with: EB 5A 90 (JMP 0x5C, NOP)\n# Standard Windows 10 MBR: 33 C0 8E D0 BC 00 7C (XOR AX,AX; MOV SS,AX; MOV SP,7C00h)\n\npython3 \u003C\u003C 'PYEOF'\nwith open(\"mbr.bin\", \"rb\") as f:\n    mbr = f.read()\n\n# Check MBR signature (bytes 510-511 should be 0x55AA)\nif mbr[510:512] == b'\\x55\\xAA':\n    print(\"[*] Valid MBR signature (0x55AA)\")\nelse:\n    print(\"[!] Invalid MBR signature\")\n\n# Check for known bootkit signatures\nbootkit_sigs = {\n    b'\\xE8\\x00\\x00\\x5E\\x81\\xEE': \"TDL4\u002FAlureon bootkit\",\n    b'\\xFA\\x33\\xC0\\x8E\\xD0\\xBC\\x00\\x7C\\x8B\\xF4\\x50\\x07': \"Standard Windows MBR (clean)\",\n    b'\\xEB\\x5A\\x90\\x4E\\x54\\x46\\x53': \"Standard NTFS VBR (clean)\",\n}\n\nfor sig, name in bootkit_sigs.items():\n    if sig in mbr:\n        print(f\"[{'!' if 'clean' not in name else '*'}] Signature match: {name}\")\n\n# Check partition table entries\nprint(\"\\nPartition Table:\")\nfor i in range(4):\n    offset = 446 + (i * 16)\n    entry = mbr[offset:offset+16]\n    if entry != b'\\x00' * 16:\n        boot_flag = \"Active\" if entry[0] == 0x80 else \"Inactive\"\n        part_type = entry[4]\n        start_lba = int.from_bytes(entry[8:12], 'little')\n        size_lba = int.from_bytes(entry[12:16], 'little')\n        print(f\"  Partition {i+1}: Type=0x{part_type:02X} {boot_flag} Start=LBA {start_lba} Size={size_lba} sectors\")\nPYEOF\n```\n\n### Step 3: Analyze UEFI Firmware for Implants\n\nInspect UEFI firmware volumes for unauthorized modules:\n\n```bash\n# Extract UEFI firmware components with UEFITool\n# GUI: Open firmware.rom -> Inspect firmware volumes\n# CLI:\nUEFIExtract firmware.rom all\n\n# List all DXE drivers (most common target for UEFI implants)\nfind firmware.rom.dump -name \"*.efi\" -exec file {} \\;\n\n# Compare against known-good firmware module list\n# Each UEFI module has a GUID - compare against vendor baseline\n\n# Verify Secure Boot configuration\npython chipsec_main.py -m common.secureboot.variables\n\n# Check SPI flash write protection\npython chipsec_main.py -m common.bios_wp\n\n# Check for known UEFI malware patterns\nyara -r uefi_malware.yar firmware.rom\n```\n\n```\nKnown UEFI Bootkit Detection Points:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nLoJax (APT28):\n  - Modified SPI flash\n  - Added DXE driver that drops agent to Windows\n  - Persists through OS reinstall and disk replacement\n\nBlackLotus:\n  - Exploits CVE-2022-21894 to bypass Secure Boot\n  - Modifies EFI System Partition bootloader\n  - Installs kernel driver during boot\n\nCosmicStrand:\n  - Modifies CORE_DXE firmware module\n  - Hooks kernel initialization during boot\n  - Drops shellcode into Windows kernel memory\n\nMoonBounce:\n  - SPI flash implant in CORE_DXE module\n  - Modified GetVariable() function\n  - Deploys user-mode implant through boot chain\n\nESPecter:\n  - Modifies Windows Boot Manager on ESP\n  - Patches winload.efi to disable DSE\n  - Loads unsigned kernel driver\n```\n\n### Step 4: Detect Kernel-Level Rootkit Behavior\n\nAnalyze the running system for rootkit artifacts:\n\n```bash\n# Memory forensics for rootkit detection\n# SSDT hook detection\nvol3 -f memory.dmp windows.ssdt | grep -v \"ntoskrnl\\|win32k\"\n\n# Hidden processes (DKOM)\nvol3 -f memory.dmp windows.psscan > psscan.txt\nvol3 -f memory.dmp windows.pslist > pslist.txt\n# Diff to find hidden processes\n\n# Kernel callback registration (rootkits register callbacks for filtering)\nvol3 -f memory.dmp windows.callbacks\n\n# Driver analysis\nvol3 -f memory.dmp windows.driverscan\nvol3 -f memory.dmp windows.modules\n\n# Check for unsigned drivers\nvol3 -f memory.dmp windows.driverscan | while read line; do\n    driver_path=$(echo \"$line\" | awk '{print $NF}')\n    if [ -f \"$driver_path\" ]; then\n        sigcheck -nobanner \"$driver_path\" 2>\u002Fdev\u002Fnull | grep \"Unsigned\"\n    fi\ndone\n\n# IDT hook detection\nvol3 -f memory.dmp windows.idt\n```\n\n### Step 5: Boot Process Integrity Verification\n\nVerify the integrity of the entire boot chain:\n\n```bash\n# Verify Windows Boot Manager signature\nsigcheck -a C:\\Windows\\Boot\\EFI\\bootmgfw.efi\n\n# Verify winload.efi\nsigcheck -a C:\\Windows\\System32\\winload.efi\n\n# Verify ntoskrnl.exe\nsigcheck -a C:\\Windows\\System32\\ntoskrnl.exe\n\n# Check Measured Boot logs (if TPM is available)\n# Windows: BCDEdit \u002Fenum firmware\nbcdedit \u002Fenum firmware\n\n# Verify Secure Boot state\nConfirm-SecureBootUEFI  # PowerShell cmdlet\n\n# Check boot configuration for tampering\nbcdedit \u002Fv\n\n# Look for boot configuration changes\n# testsigning: should be No\n# nointegritychecks: should be No\n# debug: should be No\nbcdedit | findstr \u002Fi \"testsigning nointegritychecks debug\"\n```\n\n### Step 6: Document Bootkit\u002FRootkit Analysis\n\nCompile comprehensive analysis findings:\n\n```\nAnalysis should document:\n- Boot sector (MBR\u002FVBR) integrity status with hex comparison\n- UEFI firmware module inventory and integrity verification\n- Secure Boot status and any bypass mechanisms detected\n- Kernel-level hooks (SSDT, IDT, IRP, inline) identified\n- Hidden processes, drivers, and files discovered\n- Persistence mechanism (SPI flash, ESP, MBR, kernel driver)\n- Boot chain integrity verification results\n- Attribution to known bootkit families if possible\n- Remediation steps (reflash firmware, rebuild MBR, replace hardware)\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Bootkit** | Malware that infects the boot process (MBR, VBR, UEFI) to execute before the operating system loads, gaining persistent low-level control |\n| **MBR (Master Boot Record)** | First 512 bytes of a disk containing bootstrap code and partition table; MBR bootkits replace this code with malicious loaders |\n| **UEFI (Unified Extensible Firmware Interface)** | Modern firmware interface replacing BIOS; UEFI bootkits implant malicious modules in firmware volumes or modify the ESP |\n| **Secure Boot** | UEFI security feature verifying digital signatures of boot components; bootkits like BlackLotus exploit vulnerabilities to bypass it |\n| **SPI Flash** | Flash memory chip storing UEFI firmware; advanced bootkits like LoJax and MoonBounce modify SPI flash for firmware-level persistence |\n| **DKOM (Direct Kernel Object Manipulation)** | Rootkit technique modifying kernel structures to hide processes, files, and network connections without hooking functions |\n| **Driver Signature Enforcement (DSE)** | Windows security feature requiring kernel drivers to be digitally signed; bootkits disable DSE during boot to load unsigned rootkit drivers |\n\n## Tools & Systems\n\n- **UEFITool**: Open-source UEFI firmware image editor and parser for inspecting firmware volumes, drivers, and modules\n- **chipsec**: Intel hardware security assessment framework for verifying SPI flash protection, Secure Boot, and UEFI configuration\n- **Volatility**: Memory forensics framework with SSDT, IDT, callback, and driver analysis plugins for kernel rootkit detection\n- **GMER**: Windows rootkit detection tool scanning for SSDT hooks, IDT hooks, hidden processes, and modified kernel modules\n- **Bootkits Analyzer**: Specialized tool for analyzing MBR\u002FVBR code including disassembly and comparison against known-good baselines\n\n## Common Scenarios\n\n### Scenario: Investigating Persistent Compromise Surviving OS Reinstallation\n\n**Context**: An organization reimaged a compromised workstation, but the same C2 beaconing resumed within hours. Standard disk forensics finds no malware. UEFI bootkit is suspected.\n\n**Approach**:\n1. Boot from a Linux live USB to avoid executing any compromised OS components\n2. Dump the SPI flash firmware using chipsec or flashrom for offline analysis\n3. Dump the MBR and VBR sectors with dd for boot sector analysis\n4. Copy the EFI System Partition for bootloader integrity verification\n5. Open the SPI dump in UEFITool and compare module GUIDs against vendor-provided firmware\n6. Look for additional or modified DXE drivers that should not be present\n7. Analyze any suspicious modules with Ghidra (x86_64 UEFI module format)\n8. Verify Secure Boot configuration and check for exploit-based bypasses\n\n**Pitfalls**:\n- Analyzing the system while the compromised OS is running (rootkit may hide from live analysis)\n- Not checking SPI flash (only analyzing disk-based boot components misses firmware-level implants)\n- Assuming Secure Boot prevents all bootkits (known bypasses exist, e.g., CVE-2022-21894)\n- Not preserving the original firmware dump before reflashing (critical evidence for attribution)\n\n## Output Format\n\n```\nBOOTKIT \u002F ROOTKIT ANALYSIS REPORT\n====================================\nSystem:           Dell OptiPlex 7090 (UEFI, TPM 2.0)\nFirmware Version: 1.15.0 (Dell)\nSecure Boot:      ENABLED (but bypassed)\nCapture Method:   Linux Live USB + chipsec SPI dump\n\nMBR\u002FVBR ANALYSIS\nMBR Signature:    Valid (0x55AA)\nMBR Code:         MATCHES standard Windows 10 MBR (clean)\nVBR Code:         MATCHES standard NTFS VBR (clean)\n\nUEFI FIRMWARE ANALYSIS\nTotal Modules:    287\nVendor Expected:  285\nExtra Modules:    2 UNAUTHORIZED\n  [!] DXE Driver GUID: {ABCD1234-...} \"SmmAccessDxe_mod\" (MODIFIED)\n      Original Size: 12,288 bytes\n      Current Size:  45,056 bytes (32KB ADDED)\n      Entropy: 7.82 (HIGH - encrypted payload)\n\n  [!] DXE Driver GUID: {EFGH5678-...} \"UefiPayloadDxe\" (NEW - not in vendor firmware)\n      Size: 28,672 bytes\n      Function: Drops persistence agent during boot\n\nBOOT CHAIN INTEGRITY\nbootmgfw.efi:     MODIFIED (hash mismatch, Secure Boot bypass via CVE-2022-21894)\nwinload.efi:      MODIFIED (DSE disabled at load time)\nntoskrnl.exe:     CLEAN (but unsigned driver loaded after boot)\n\nKERNEL ROOTKIT COMPONENTS\nDriver:           C:\\Windows\\System32\\drivers\\null_mod.sys (unsigned, hidden)\nSSDT Hooks:       3 (NtQuerySystemInformation, NtQueryDirectoryFile, NtDeviceIoControlFile)\nHidden Processes: 2 (PID 6784: beacon.exe, PID 6812: keylog.exe)\nHidden Files:     C:\\Windows\\System32\\drivers\\null_mod.sys\n\nATTRIBUTION\nFamily:           BlackLotus variant\nConfidence:       HIGH (CVE-2022-21894 exploit, ESP modification pattern matches)\n\nREMEDIATION\n1. Reflash SPI firmware with clean vendor image via hardware programmer\n2. Rebuild EFI System Partition from clean Windows installation media\n3. Reinstall OS from verified media\n4. Enable all firmware write protections\n5. Update firmware to latest version (patches CVE-2022-21894)\n```\n","# Analyzing Bootkit and Rootkit Samples\n\n## When to Use\n\n- A system shows signs of compromise that persist through OS reinstallation\n- Antivirus and EDR are unable to detect malware despite clear evidence of compromise\n- UEFI Secure Boot has been disabled or shows integrity violations\n- Memory forensics reveals rootkit behavior (hidden processes, hooked system calls)\n- Investigating nation-state level threats known to deploy bootkits (APT28, APT41, Equation Group)\n\n**Do not use** for standard user-mode malware; bootkits and rootkits operate at a fundamentally different level requiring specialized analysis techniques.\n\n## Prerequisites\n\n- Disk imaging tools (dd, FTK Imager) for acquiring MBR\u002FVBR sectors\n- UEFITool for UEFI firmware volume analysis and module extraction\n- chipsec for hardware-level firmware security assessment\n- Ghidra with x86 real-mode and 16-bit support for MBR code analysis\n- Volatility 3 for kernel-level rootkit artifact detection\n- Bootable Linux live USB for offline system analysis\n\n## Workflow\n\n### Step 1: Acquire Boot Sectors and Firmware\n\nExtract MBR, VBR, and UEFI firmware for offline analysis:\n\n```bash\n# Acquire MBR (first 512 bytes of disk)\ndd if=\u002Fdev\u002Fsda of=mbr.bin bs=512 count=1\n\n# Acquire first track (usually contains bootkit code beyond MBR)\ndd if=\u002Fdev\u002Fsda of=first_track.bin bs=512 count=63\n\n# Acquire VBR (Volume Boot Record - first sector of partition)\ndd if=\u002Fdev\u002Fsda1 of=vbr.bin bs=512 count=1\n\n# Acquire UEFI System Partition\nmkdir \u002Fmnt\u002Fefi\nmount \u002Fdev\u002Fsda1 \u002Fmnt\u002Fefi\ncp -r \u002Fmnt\u002Fefi\u002FEFI \u002Fanalysis\u002Fefi_backup\u002F\n\n# Dump UEFI firmware (requires chipsec or flashrom)\n# Using chipsec:\npython chipsec_util.py spi dump firmware.rom\n\n# Using flashrom:\nflashrom -p internal -r firmware.rom\n\n# Verify firmware dump integrity\nsha256sum firmware.rom\n```\n\n### Step 2: Analyze MBR\u002FVBR for Bootkit Code\n\nExamine boot sector code for malicious modifications:\n\n```bash\n# Disassemble MBR code (16-bit real mode)\nndisasm -b16 mbr.bin > mbr_disasm.txt\n\n# Compare MBR with known-good Windows MBR\n# Standard Windows MBR begins with: EB 5A 90 (JMP 0x5C, NOP)\n# Standard Windows 10 MBR: 33 C0 8E D0 BC 00 7C (XOR AX,AX; MOV SS,AX; MOV SP,7C00h)\n\npython3 \u003C\u003C 'PYEOF'\nwith open(\"mbr.bin\", \"rb\") as f:\n    mbr = f.read()\n\n# Check MBR signature (bytes 510-511 should be 0x55AA)\nif mbr[510:512] == b'\\x55\\xAA':\n    print(\"[*] Valid MBR signature (0x55AA)\")\nelse:\n    print(\"[!] Invalid MBR signature\")\n\n# Check for known bootkit signatures\nbootkit_sigs = {\n    b'\\xE8\\x00\\x00\\x5E\\x81\\xEE': \"TDL4\u002FAlureon bootkit\",\n    b'\\xFA\\x33\\xC0\\x8E\\xD0\\xBC\\x00\\x7C\\x8B\\xF4\\x50\\x07': \"Standard Windows MBR (clean)\",\n    b'\\xEB\\x5A\\x90\\x4E\\x54\\x46\\x53': \"Standard NTFS VBR (clean)\",\n}\n\nfor sig, name in bootkit_sigs.items():\n    if sig in mbr:\n        print(f\"[{'!' if 'clean' not in name else '*'}] Signature match: {name}\")\n\n# Check partition table entries\nprint(\"\\nPartition Table:\")\nfor i in range(4):\n    offset = 446 + (i * 16)\n    entry = mbr[offset:offset+16]\n    if entry != b'\\x00' * 16:\n        boot_flag = \"Active\" if entry[0] == 0x80 else \"Inactive\"\n        part_type = entry[4]\n        start_lba = int.from_bytes(entry[8:12], 'little')\n        size_lba = int.from_bytes(entry[12:16], 'little')\n        print(f\"  Partition {i+1}: Type=0x{part_type:02X} {boot_flag} Start=LBA {start_lba} Size={size_lba} sectors\")\nPYEOF\n```\n\n### Step 3: Analyze UEFI Firmware for Implants\n\nInspect UEFI firmware volumes for unauthorized modules:\n\n```bash\n# Extract UEFI firmware components with UEFITool\n# GUI: Open firmware.rom -> Inspect firmware volumes\n# CLI:\nUEFIExtract firmware.rom all\n\n# List all DXE drivers (most common target for UEFI implants)\nfind firmware.rom.dump -name \"*.efi\" -exec file {} \\;\n\n# Compare against known-good firmware module list\n# Each UEFI module has a GUID - compare against vendor baseline\n\n# Verify Secure Boot configuration\npython chipsec_main.py -m common.secureboot.variables\n\n# Check SPI flash write protection\npython chipsec_main.py -m common.bios_wp\n\n# Check for known UEFI malware patterns\nyara -r uefi_malware.yar firmware.rom\n```\n\n```\nKnown UEFI Bootkit Detection Points:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\nLoJax (APT28):\n  - Modified SPI flash\n  - Added DXE driver that drops agent to Windows\n  - Persists through OS reinstall and disk replacement\n\nBlackLotus:\n  - Exploits CVE-2022-21894 to bypass Secure Boot\n  - Modifies EFI System Partition bootloader\n  - Installs kernel driver during boot\n\nCosmicStrand:\n  - Modifies CORE_DXE firmware module\n  - Hooks kernel initialization during boot\n  - Drops shellcode into Windows kernel memory\n\nMoonBounce:\n  - SPI flash implant in CORE_DXE module\n  - Modified GetVariable() function\n  - Deploys user-mode implant through boot chain\n\nESPecter:\n  - Modifies Windows Boot Manager on ESP\n  - Patches winload.efi to disable DSE\n  - Loads unsigned kernel driver\n```\n\n### Step 4: Detect Kernel-Level Rootkit Behavior\n\nAnalyze the running system for rootkit artifacts:\n\n```bash\n# Memory forensics for rootkit detection\n# SSDT hook detection\nvol3 -f memory.dmp windows.ssdt | grep -v \"ntoskrnl\\|win32k\"\n\n# Hidden processes (DKOM)\nvol3 -f memory.dmp windows.psscan > psscan.txt\nvol3 -f memory.dmp windows.pslist > pslist.txt\n# Diff to find hidden processes\n\n# Kernel callback registration (rootkits register callbacks for filtering)\nvol3 -f memory.dmp windows.callbacks\n\n# Driver analysis\nvol3 -f memory.dmp windows.driverscan\nvol3 -f memory.dmp windows.modules\n\n# Check for unsigned drivers\nvol3 -f memory.dmp windows.driverscan | while read line; do\n    driver_path=$(echo \"$line\" | awk '{print $NF}')\n    if [ -f \"$driver_path\" ]; then\n        sigcheck -nobanner \"$driver_path\" 2>\u002Fdev\u002Fnull | grep \"Unsigned\"\n    fi\ndone\n\n# IDT hook detection\nvol3 -f memory.dmp windows.idt\n```\n\n### Step 5: Boot Process Integrity Verification\n\nVerify the integrity of the entire boot chain:\n\n```bash\n# Verify Windows Boot Manager signature\nsigcheck -a C:\\Windows\\Boot\\EFI\\bootmgfw.efi\n\n# Verify winload.efi\nsigcheck -a C:\\Windows\\System32\\winload.efi\n\n# Verify ntoskrnl.exe\nsigcheck -a C:\\Windows\\System32\\ntoskrnl.exe\n\n# Check Measured Boot logs (if TPM is available)\n# Windows: BCDEdit \u002Fenum firmware\nbcdedit \u002Fenum firmware\n\n# Verify Secure Boot state\nConfirm-SecureBootUEFI  # PowerShell cmdlet\n\n# Check boot configuration for tampering\nbcdedit \u002Fv\n\n# Look for boot configuration changes\n# testsigning: should be No\n# nointegritychecks: should be No\n# debug: should be No\nbcdedit | findstr \u002Fi \"testsigning nointegritychecks debug\"\n```\n\n### Step 6: Document Bootkit\u002FRootkit Analysis\n\nCompile comprehensive analysis findings:\n\n```\nAnalysis should document:\n- Boot sector (MBR\u002FVBR) integrity status with hex comparison\n- UEFI firmware module inventory and integrity verification\n- Secure Boot status and any bypass mechanisms detected\n- Kernel-level hooks (SSDT, IDT, IRP, inline) identified\n- Hidden processes, drivers, and files discovered\n- Persistence mechanism (SPI flash, ESP, MBR, kernel driver)\n- Boot chain integrity verification results\n- Attribution to known bootkit families if possible\n- Remediation steps (reflash firmware, rebuild MBR, replace hardware)\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Bootkit** | Malware that infects the boot process (MBR, VBR, UEFI) to execute before the operating system loads, gaining persistent low-level control |\n| **MBR (Master Boot Record)** | First 512 bytes of a disk containing bootstrap code and partition table; MBR bootkits replace this code with malicious loaders |\n| **UEFI (Unified Extensible Firmware Interface)** | Modern firmware interface replacing BIOS; UEFI bootkits implant malicious modules in firmware volumes or modify the ESP |\n| **Secure Boot** | UEFI security feature verifying digital signatures of boot components; bootkits like BlackLotus exploit vulnerabilities to bypass it |\n| **SPI Flash** | Flash memory chip storing UEFI firmware; advanced bootkits like LoJax and MoonBounce modify SPI flash for firmware-level persistence |\n| **DKOM (Direct Kernel Object Manipulation)** | Rootkit technique modifying kernel structures to hide processes, files, and network connections without hooking functions |\n| **Driver Signature Enforcement (DSE)** | Windows security feature requiring kernel drivers to be digitally signed; bootkits disable DSE during boot to load unsigned rootkit drivers |\n\n## Tools & Systems\n\n- **UEFITool**: Open-source UEFI firmware image editor and parser for inspecting firmware volumes, drivers, and modules\n- **chipsec**: Intel hardware security assessment framework for verifying SPI flash protection, Secure Boot, and UEFI configuration\n- **Volatility**: Memory forensics framework with SSDT, IDT, callback, and driver analysis plugins for kernel rootkit detection\n- **GMER**: Windows rootkit detection tool scanning for SSDT hooks, IDT hooks, hidden processes, and modified kernel modules\n- **Bootkits Analyzer**: Specialized tool for analyzing MBR\u002FVBR code including disassembly and comparison against known-good baselines\n\n## Common Scenarios\n\n### Scenario: Investigating Persistent Compromise Surviving OS Reinstallation\n\n**Context**: An organization reimaged a compromised workstation, but the same C2 beaconing resumed within hours. Standard disk forensics finds no malware. UEFI bootkit is suspected.\n\n**Approach**:\n1. Boot from a Linux live USB to avoid executing any compromised OS components\n2. Dump the SPI flash firmware using chipsec or flashrom for offline analysis\n3. Dump the MBR and VBR sectors with dd for boot sector analysis\n4. Copy the EFI System Partition for bootloader integrity verification\n5. Open the SPI dump in UEFITool and compare module GUIDs against vendor-provided firmware\n6. Look for additional or modified DXE drivers that should not be present\n7. Analyze any suspicious modules with Ghidra (x86_64 UEFI module format)\n8. Verify Secure Boot configuration and check for exploit-based bypasses\n\n**Pitfalls**:\n- Analyzing the system while the compromised OS is running (rootkit may hide from live analysis)\n- Not checking SPI flash (only analyzing disk-based boot components misses firmware-level implants)\n- Assuming Secure Boot prevents all bootkits (known bypasses exist, e.g., CVE-2022-21894)\n- Not preserving the original firmware dump before reflashing (critical evidence for attribution)\n\n## Output Format\n\n```\nBOOTKIT \u002F ROOTKIT ANALYSIS REPORT\n====================================\nSystem:           Dell OptiPlex 7090 (UEFI, TPM 2.0)\nFirmware Version: 1.15.0 (Dell)\nSecure Boot:      ENABLED (but bypassed)\nCapture Method:   Linux Live USB + chipsec SPI dump\n\nMBR\u002FVBR ANALYSIS\nMBR Signature:    Valid (0x55AA)\nMBR Code:         MATCHES standard Windows 10 MBR (clean)\nVBR Code:         MATCHES standard NTFS VBR (clean)\n\nUEFI FIRMWARE ANALYSIS\nTotal Modules:    287\nVendor Expected:  285\nExtra Modules:    2 UNAUTHORIZED\n  [!] DXE Driver GUID: {ABCD1234-...} \"SmmAccessDxe_mod\" (MODIFIED)\n      Original Size: 12,288 bytes\n      Current Size:  45,056 bytes (32KB ADDED)\n      Entropy: 7.82 (HIGH - encrypted payload)\n\n  [!] DXE Driver GUID: {EFGH5678-...} \"UefiPayloadDxe\" (NEW - not in vendor firmware)\n      Size: 28,672 bytes\n      Function: Drops persistence agent during boot\n\nBOOT CHAIN INTEGRITY\nbootmgfw.efi:     MODIFIED (hash mismatch, Secure Boot bypass via CVE-2022-21894)\nwinload.efi:      MODIFIED (DSE disabled at load time)\nntoskrnl.exe:     CLEAN (but unsigned driver loaded after boot)\n\nKERNEL ROOTKIT COMPONENTS\nDriver:           C:\\Windows\\System32\\drivers\\null_mod.sys (unsigned, hidden)\nSSDT Hooks:       3 (NtQuerySystemInformation, NtQueryDirectoryFile, NtDeviceIoControlFile)\nHidden Processes: 2 (PID 6784: beacon.exe, PID 6812: keylog.exe)\nHidden Files:     C:\\Windows\\System32\\drivers\\null_mod.sys\n\nATTRIBUTION\nFamily:           BlackLotus variant\nConfidence:       HIGH (CVE-2022-21894 exploit, ESP modification pattern matches)\n\nREMEDIATION\n1. Reflash SPI firmware with clean vendor image via hardware programmer\n2. Rebuild EFI System Partition from clean Windows installation media\n3. Reinstall OS from verified media\n4. Enable all firmware write protections\n5. Update firmware to latest version (patches CVE-2022-21894)\n```\n",{"name":5,"note":25,"tags":26,"author":32,"domain":33,"source":34,"license":15,"version":35,"nist_csf":36,"subdomain":41,"description":42,"mitre_attack":43,"source_commit":49},"Vendored verbatim from an external Apache-2.0 security-skill library, pinned by commit. Exceeds the internal 300-line skill guideline (agent-code-constraints.md) -- kept as-is because this is vendored reference material (forensics\u002Fthreat-intel procedure), not Yana AI-authored content, and trimming would damage technical accuracy.",[27,28,29,30,31],"malware","bootkit","rootkit","UEFI","MBR-analysis","mahipal","cybersecurity","https:\u002F\u002Fgithub.com\u002Fmukul975\u002FAnthropic-Cybersecurity-Skills","1.0.0",[37,38,39,40],"DE.AE-02","RS.AN-03","ID.RA-01","DE.CM-01","malware-analysis","Analyzes bootkit and advanced rootkit malware that infects the Master Boot Record (MBR), Volume Boot Record (VBR), or UEFI firmware to gain persistence below the operating system. Covers boot sector analysis, UEFI module inspection, and anti-rootkit detection techniques. Activates for requests involving bootkit analysis, MBR malware investigation, UEFI persistence analysis, or pre-OS malware detection.\n",[44,45,46,47,48],"T1542.003","T1542.001","T1542.002","T1014","T1547.006","04450304b12645cb2b974ab96d28c0664758a88d","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Fanalyzing-bootkit-and-rootkit-samples",2,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-14 13:24:09",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill analyzing-bootkit-and-rootkit-samples",{"tool":66,"command":67},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill analyzing-bootkit-and-rootkit-samples",{"tool":69,"command":70},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill analyzing-bootkit-and-rootkit-samples","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fanalyzing-bootkit-and-rootkit-samples\u002FSKILL.md",true,[74,78,84],{"path":75,"resourceType":75,"resourceTypeDesc":76,"sizeBytes":77,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"references\u002Fapi-reference.md","REFERENCE","参考文档",2798,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fanalyzing-bootkit-and-rootkit-samples\u002Freferences\u002Fapi-reference.md",{"path":85,"resourceType":86,"resourceTypeDesc":87,"sizeBytes":88,"sourceHtmlUrl":89},"scripts\u002Fagent.py","SCRIPT","脚本",7136,"https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fanalyzing-bootkit-and-rootkit-samples\u002Fscripts\u002Fagent.py",[91,99,106,114,122,130],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":95,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":20},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":110,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":20},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":118,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":126,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":20},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":131,"name":132,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":135,"publishedAt":20},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]