[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HBW2D3TBMEVHHHRHARJMQ1":3,"skill-same:01M6HBW2D3TBMEVHHHRHARJMQ1":99},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":60,"commitSha":61,"skillDirectory":62,"forksCount":63,"repositoryHtmlUrl":64,"repositoryHomepageUrl":6,"ownerHtmlUrl":65,"ownerBlogUrl":6,"ownerDescription":66,"updatedAt":67,"install":68,"resources":81},"01M6HBW2D3TBMEVHHHRHARJMQ1","analyzing-powershell-script-block-logging",null,"Parse Windows PowerShell Script Block Logs (Event ID 4104) from EVTX files to detect obfuscated commands, encoded payloads, and living-off-the-land techniques. Uses python-evtx to extract and reconstruct multi-block scripts, applies entropy...","HenriqueMC17\u002Fagente-core","HenriqueMC17","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F206460478?v=4","01M6HB63HBBF18AC4H09XTB549","Henrique Monteiro Cardoso","01M6HB63NGSQXWKWCFWW2B20W0",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Fanalyzing-powershell-script-block-logging\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"logging","analyzing","block","script","powershell","analyzing powershell script block logging","techniques","python","event","files","cm","payloads","t1059","entropy","endpoint-security","obfuscation-detection","event-id-4104","T1059.001","Script-Block-Logging","windows","2026-11-10 10:12:30",false,"---\nname: analyzing-powershell-script-block-logging\ndescription: Parse Windows PowerShell Script Block Logs (Event ID 4104) from EVTX files to detect obfuscated commands, encoded payloads, and living-off-the-land techniques. Uses python-evtx to extract and reconstruct multi-block scripts, applies entropy...\ndomain: cybersecurity\nsubdomain: security-operations\ntags:\n- powershell\n- script-block-logging\n- event-id-4104\n- obfuscation-detection\n- windows-forensics\n- endpoint-security\nversion: '1.0'\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.CM-01\n- RS.MA-01\n- GV.OV-01\n- DE.AE-02\nmitre_attack:\n- T1059.001\n- T1027.010\n- T1140\n- T1105\ncategory: analyzing-powershell-script-block-logging\n---\n# Analyzing-Powershell-Script-Block-Logging\n\n## Overview\nParse Windows PowerShell Script Block Logs (Event ID 4104) from EVTX files to detect obfuscated commands, encoded payloads, and living-off-the-land techniques. Uses python-evtx to extract and reconstruct multi-block scripts, applies entropy analysis and pattern matching for Base64-encoded commands, Invoke-Expression abuse, download cradles, and AMSI bypass attempts.\n\n\n\n# Analyzing PowerShell Script Block Logging\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing powershell script block logging\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Familiarity with security operations concepts and tools\n- Access to a test or lab environment for safe execution\n- Python 3.8+ with required dependencies installed\n- Appropriate authorization for any testing activities\n\n## Instructions\n\n1. Install dependencies: `pip install python-evtx lxml`\n2. Collect PowerShell Operational logs: `Microsoft-Windows-PowerShell%4Operational.evtx`\n3. Parse Event ID 4104 entries using python-evtx to extract ScriptBlockText, ScriptBlockId, and MessageNumber\u002FMessageTotal for multi-part script reconstruction.\n4. Apply detection heuristics:\n   - Base64-encoded commands (`-EncodedCommand`, `FromBase64String`)\n   - Download cradles (`DownloadString`, `DownloadFile`, `Invoke-WebRequest`, `Net.WebClient`)\n   - AMSI bypass patterns (`AmsiUtils`, `amsiInitFailed`)\n   - Obfuscation indicators (high entropy, tick-mark insertion, string concatenation)\n5. Generate a report with reconstructed scripts, risk scores, and MITRE ATT&CK mappings.\n\n```bash\npython scripts\u002Fagent.py --evtx-file \u002Fpath\u002Fto\u002FPowerShell-Operational.evtx --output ps_analysis.json\n```\n\n## Examples\n\n### Detect Encoded Command Execution\n```python\nimport base64\nif \"-encodedcommand\" in script_text.lower():\n    encoded = script_text.split()[-1]\n    decoded = base64.b64decode(encoded).decode(\"utf-16-le\")\n```\n\n### Reconstruct Multi-Block Script\nScripts split across multiple 4104 events share a `ScriptBlockId`. Concatenate blocks ordered by `MessageNumber` to recover the full script.\n","# Analyzing-Powershell-Script-Block-Logging\n\n## Overview\nParse Windows PowerShell Script Block Logs (Event ID 4104) from EVTX files to detect obfuscated commands, encoded payloads, and living-off-the-land techniques. Uses python-evtx to extract and reconstruct multi-block scripts, applies entropy analysis and pattern matching for Base64-encoded commands, Invoke-Expression abuse, download cradles, and AMSI bypass attempts.\n\n\n\n# Analyzing PowerShell Script Block Logging\n\n\n## When to Use\n\n- When investigating security incidents that require analyzing powershell script block logging\n- When building detection rules or threat hunting queries for this domain\n- When SOC analysts need structured procedures for this analysis type\n- When validating security monitoring coverage for related attack techniques\n\n## Prerequisites\n\n- Familiarity with security operations concepts and tools\n- Access to a test or lab environment for safe execution\n- Python 3.8+ with required dependencies installed\n- Appropriate authorization for any testing activities\n\n## Instructions\n\n1. Install dependencies: `pip install python-evtx lxml`\n2. Collect PowerShell Operational logs: `Microsoft-Windows-PowerShell%4Operational.evtx`\n3. Parse Event ID 4104 entries using python-evtx to extract ScriptBlockText, ScriptBlockId, and MessageNumber\u002FMessageTotal for multi-part script reconstruction.\n4. Apply detection heuristics:\n   - Base64-encoded commands (`-EncodedCommand`, `FromBase64String`)\n   - Download cradles (`DownloadString`, `DownloadFile`, `Invoke-WebRequest`, `Net.WebClient`)\n   - AMSI bypass patterns (`AmsiUtils`, `amsiInitFailed`)\n   - Obfuscation indicators (high entropy, tick-mark insertion, string concatenation)\n5. Generate a report with reconstructed scripts, risk scores, and MITRE ATT&CK mappings.\n\n```bash\npython scripts\u002Fagent.py --evtx-file \u002Fpath\u002Fto\u002FPowerShell-Operational.evtx --output ps_analysis.json\n```\n\n## Examples\n\n### Detect Encoded Command Execution\n```python\nimport base64\nif \"-encodedcommand\" in script_text.lower():\n    encoded = script_text.split()[-1]\n    decoded = base64.b64decode(encoded).decode(\"utf-16-le\")\n```\n\n### Reconstruct Multi-Block Script\nScripts split across multiple 4104 events share a `ScriptBlockId`. Concatenate blocks ordered by `MessageNumber` to recover the full script.\n",{"name":5,"tags":44,"author":47,"domain":48,"license":15,"version":49,"category":5,"nist_csf":50,"subdomain":55,"description":7,"mitre_attack":56},[23,45,35,34,46,33],"script-block-logging","windows-forensics","mahipal","cybersecurity","1.0",[51,52,53,54],"DE.CM-01","RS.MA-01","GV.OV-01","DE.AE-02","security-operations",[36,57,58,59],"T1027.010","T1140","T1105","main","5eea5b3296f4673b5f481e8bcc1ba76281149f16","modules\u002Fanalyzing-powershell-script-block-logging",0,"https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core","https:\u002F\u002Fgithub.com\u002FHenriqueMC17","Qualquer tecnologia suficientemente avançada é indistinguível da mágica.","2026-09-28 22:40:38",{"source":8,"skillName":5,"commands":69,"prompt":79,"zipAvailable":80},[70,73,76],{"tool":71,"command":72},"npx","npx skills add HenriqueMC17\u002Fagente-core --skill analyzing-powershell-script-block-logging",{"tool":74,"command":75},"bunx","bunx skills add HenriqueMC17\u002Fagente-core --skill analyzing-powershell-script-block-logging",{"tool":77,"command":78},"pnpm","pnpm dlx skills add HenriqueMC17\u002Fagente-core --skill analyzing-powershell-script-block-logging","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Fanalyzing-powershell-script-block-logging\u002FSKILL.md",true,[82,87,93],{"path":83,"resourceType":83,"resourceTypeDesc":84,"sizeBytes":85,"sourceHtmlUrl":86},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Fanalyzing-powershell-script-block-logging\u002FLICENSE",{"path":88,"resourceType":89,"resourceTypeDesc":90,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Fapi-reference.md","REFERENCE","参考文档",1866,"https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Fanalyzing-powershell-script-block-logging\u002Freferences\u002Fapi-reference.md",{"path":94,"resourceType":95,"resourceTypeDesc":96,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Fagent.py","SCRIPT","脚本",8048,"https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Fanalyzing-powershell-script-block-logging\u002Fscripts\u002Fagent.py",[100,131,157,180,196,216],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":111,"publishedAt":39},"01M6HPFF0RCN0X6WT5EBSV71GY","validating-backup-integrity-for-recovery","Validate backup integrity through cryptographic hash verification, automated restore testing, corruption detection, and recoverability checks to ensure backups are reliable for disaster recovery and ransomware response scenarios.","https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Fvalidating-backup-integrity-for-recovery\u002FSKILL.md",[106],{"categoryNo":107,"categoryName":108,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[112,113,114,115,116,117,48,118,119,120,121,122,123,124,125,126,127,128,129,130],"integrity","backup","recovery","validating backup integrity for recovery","for","testing","validate","verification","hash-verification","incident-response","ransomware","detection","t1078","t1490","disaster-recovery","restore","incident","disaster recovery","ransomware response",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":39},"01M6HPFAWJVFK25Q33K3T7WQ8G","triaging-vulnerabilities-with-ssvc-framework","Triage and prioritize vulnerabilities using CISA's Stakeholder-Specific Vulnerability Categorization (SSVC) decision tree framework to produce actionable remediation priorities.","https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Ftriaging-vulnerabilities-with-ssvc-framework\u002FSKILL.md",[],[138,139,140,141,142,48,143,144,145,146,147,148,149,150,151,152,153,154,155,156],"vulnerabilities","framework","ssvc","triaging vulnerabilities with ssvc framework","with","triage and prioritize","CISA","vulnerability-management","risk-management","cvss","remediation","vulnerability","prioritization","decision-tree","prioritize","decision","priorities","actionable","tree",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":39},"01M6HPF6JS9X72WP59094H3ASQ","triaging-security-incident","Performs initial triage of security incidents to determine severity, scope, and required response actions using the NIST SP 800-61r3 and SANS PICERL frameworks. Classifies incidents by type, assigns priority based on business impact, and routes...","https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Ftriaging-security-incident\u002FSKILL.md",[],[164,165,128,48,166,167,168,124,125,169,170,171,172,173,174,175,176,177,178,179],"security","triaging security incident","actions","soc","NIST","analysis","severity-classification","incident-triage","SANS-PICERL","SOC-operations","picerl","conversion","isolation","scope","impact","consistency",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":186,"publishedAt":39},"01M6HPF2EX6ZYNYYHKBRJN7GEF","triaging-security-incident-with-ir-playbook","Classify and prioritize security incidents using structured IR playbooks to determine severity, assign response teams, and initiate appropriate response procedures.","https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Ftriaging-security-incident-with-ir-playbook\u002FSKILL.md",[],[164,187,188,165,128,142,48,189,167,121,190,191,124,125,192,170,152,193,194,195],"playbook","triaging security incident with ir playbook","teams","IR-playbook","severity","classification","classify","incidents","initiate",{"skillNo":197,"name":198,"nameZh":6,"description":199,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":200,"categories":201,"keywords":202,"publishedAt":39},"01M6HPEY9XPGE7X95AG4XJFQAW","triaging-security-alerts-in-splunk","Triages security alerts in Splunk Enterprise Security by classifying severity, investigating notable events, correlating related telemetry, and making escalation or closure decisions using SPL queries and the Incident Review dashboard. Use when...","https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Ftriaging-security-alerts-in-splunk\u002FSKILL.md",[],[164,203,204,205,206,207,48,208,209,210,167,211,124,212,213,214,173,29,128,215],"security alerts","splunk","triaging security alerts in splunk","alerts","review","siem","dashboard","search","correlation-search","t1566","notable-events","incident-review","de",{"skillNo":217,"name":218,"nameZh":6,"description":219,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":220,"categories":221,"keywords":222,"publishedAt":39},"01M6HPET6XGEPEJPN7V032JGZ0","tracking-threat-actor-infrastructure","Threat actor infrastructure tracking involves monitoring and mapping adversary-controlled assets including command-and-control (C2) servers, phishing domains, exploit kit hosts, bulletproof hosting, a","https:\u002F\u002Fgithub.com\u002FHenriqueMC17\u002Fagente-core\u002Fblob\u002Fmain\u002Fmodules\u002Ftracking-threat-actor-infrastructure\u002FSKILL.md",[],[223,224,225,226,48,227,228,229,230,231,232,212,233,234,29,235,215,236,237,238],"infrastructure","tracking threat actor infrastructure","tracking","threat","monitoring","mitre-attack","threat-actor","threat-intelligence","command-and-control","dns","command","exploit","intelligence","domains","kit","hosts"]