[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F7K6QG3NJG4S34YCYNANM7":3,"skill-same:01M7F7K6QG3NJG4S34YCYNANM7":58},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":14,"repositoryHtmlUrl":39,"repositoryHomepageUrl":6,"ownerHtmlUrl":40,"ownerBlogUrl":41,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M7F7K6QG3NJG4S34YCYNANM7","windows-pe-dll-static-analysis",null,"Use when analyzing a Windows PE or DLL in Ghidra.","chaorenex1\u002Fhermes-home-content","chaorenex1","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F23194925?v=4","01M7F5NA1D1D02R2MEMYQN2NZT","chan chan","01M7F5NA20KTHMTY2015CYM1TZ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Freverse-engineering\u002Fwindows-pe-dll-static-analysis\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\r\nname: windows-pe-dll-static-analysis\r\ndescription: Use when analyzing a Windows PE or DLL in Ghidra.\r\nversion: 1.0.0\r\nauthor: Masia\r\nlicense: MIT\r\nmetadata:\r\n  hermes:\r\n    tags: [reverse-engineering, ghidra, pe, pdb, windows]\r\n    related_skills: [reverse-skill]\r\n---\r\n\r\n# Windows PE \u002F DLL 静态分析\r\n\r\n实测流程：Windows + Ghidra 12.1.4 + JDK 25。\r\n\r\n## When to Use\r\n\r\n- 拿到不熟悉的 exe\u002Fdll，需要看导入导出、定位函数、反编译。\r\n- 手上有 PDB，想把符号与签名回填到反汇编视图。\r\n\r\n## 1. 侦察先行\r\n\r\n- 用 pefile 读 machine、ImageBase、节表、导出、导入：判断架构、是否加壳、是否托管。\r\n- 导出名与 Address Library ID 是后续定位函数的锚点；先把导出表存下来。\r\n- 样本先算哈希再分析，能和发布页的校验值对上才继续。\r\n\r\n## 2. 后端选择\r\n\r\n- REA 的 Windows Ghidra provider 是 P0，只接受 executable 角色；DLL 会返回\r\n  `target_role_unsupported`。不要在这条路上重试，直接 Ghidra headless。\r\n- analyzeHeadless 要求项目目录已存在，否则抛 FileNotFoundException；先 mkdir。\r\n\r\n## 3. headless 惯例\r\n\r\n- 首次 `-import` 做全量分析；几百 KB 的 C++ DLL 约 3 分钟。\r\n- 之后一律 `-process \u003Cname> -noanalysis` 复用工程，秒级。\r\n- `-process` 不接受 `-save`（那是 `-import` 的参数）；脚本参数会吞掉它后面的 token。\r\n\r\n## 4. Ghidra 脚本编译陷阱\r\n\r\nGhidra 把 deprecation 当错误，警告会表现成 ClassNotFoundException。\r\n\r\n- `DemanglerUtil.demangle(Program,String)` 已废弃 → 用 `demangle(Program,String,Address)`。\r\n- GhidraScript 没有 `setFunctionName(Function,String,SourceType)` → 用 `f.setName(name, SourceType)`。\r\n- Function 没有 `getFullName()` → 用 `f.getSymbol().getName(true)`。\r\n\r\n## 5. PDB 符号\r\n\r\n- llvm-pdbutil 最稳：`dump -summary` 看是否剥离，`dump -publics` 取 S_PUB32。\r\n- pdbparse PyPI 1.5 在现代 PDB 上崩（'NoneType' has no attribute 'name'）；用 moyix\u002Fpdbparse 的 git master。\r\n- RVA = 段头 VirtualAddress + 符号 offset；先拿一个已知导出验证映射，再批量回填。\r\n- 回填后用同一函数对比签名，确认 applyTo 是否套上了参数类型。\r\n\r\n## 6. 行为地图\r\n\r\n- 先按命名空间筛出目标自己的符号，再逐函数反编译串时序。\r\n- 用字符串（日志、配置路径、构建机路径）交叉印证调用顺序。\r\n- 依赖与兼容性判断通常在 GetModuleHandleW 里，能直接读出。\r\n","# Windows PE \u002F DLL 静态分析\r\n\r\n实测流程：Windows + Ghidra 12.1.4 + JDK 25。\r\n\r\n## When to Use\r\n\r\n- 拿到不熟悉的 exe\u002Fdll，需要看导入导出、定位函数、反编译。\r\n- 手上有 PDB，想把符号与签名回填到反汇编视图。\r\n\r\n## 1. 侦察先行\r\n\r\n- 用 pefile 读 machine、ImageBase、节表、导出、导入：判断架构、是否加壳、是否托管。\r\n- 导出名与 Address Library ID 是后续定位函数的锚点；先把导出表存下来。\r\n- 样本先算哈希再分析，能和发布页的校验值对上才继续。\r\n\r\n## 2. 后端选择\r\n\r\n- REA 的 Windows Ghidra provider 是 P0，只接受 executable 角色；DLL 会返回\r\n  `target_role_unsupported`。不要在这条路上重试，直接 Ghidra headless。\r\n- analyzeHeadless 要求项目目录已存在，否则抛 FileNotFoundException；先 mkdir。\r\n\r\n## 3. headless 惯例\r\n\r\n- 首次 `-import` 做全量分析；几百 KB 的 C++ DLL 约 3 分钟。\r\n- 之后一律 `-process \u003Cname> -noanalysis` 复用工程，秒级。\r\n- `-process` 不接受 `-save`（那是 `-import` 的参数）；脚本参数会吞掉它后面的 token。\r\n\r\n## 4. Ghidra 脚本编译陷阱\r\n\r\nGhidra 把 deprecation 当错误，警告会表现成 ClassNotFoundException。\r\n\r\n- `DemanglerUtil.demangle(Program,String)` 已废弃 → 用 `demangle(Program,String,Address)`。\r\n- GhidraScript 没有 `setFunctionName(Function,String,SourceType)` → 用 `f.setName(name, SourceType)`。\r\n- Function 没有 `getFullName()` → 用 `f.getSymbol().getName(true)`。\r\n\r\n## 5. PDB 符号\r\n\r\n- llvm-pdbutil 最稳：`dump -summary` 看是否剥离，`dump -publics` 取 S_PUB32。\r\n- pdbparse PyPI 1.5 在现代 PDB 上崩（'NoneType' has no attribute 'name'）；用 moyix\u002Fpdbparse 的 git master。\r\n- RVA = 段头 VirtualAddress + 符号 offset；先拿一个已知导出验证映射，再批量回填。\r\n- 回填后用同一函数对比签名，确认 applyTo 是否套上了参数类型。\r\n\r\n## 6. 行为地图\r\n\r\n- 先按命名空间筛出目标自己的符号，再逐函数反编译串时序。\r\n- 用字符串（日志、配置路径、构建机路径）交叉印证调用顺序。\r\n- 依赖与兼容性判断通常在 GetModuleHandleW 里，能直接读出。\r\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"description":7},"Masia","1.0.0",{"hermes":27},{"tags":28,"related_skills":34},[29,30,31,32,33],"reverse-engineering","ghidra","pe","pdb","windows",[35],"reverse-skill","main","a3f3199bb87ec3c91248f68a39d88527e1847ae9","skills\u002Freverse-engineering\u002Fwindows-pe-dll-static-analysis","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content","https:\u002F\u002Fgithub.com\u002Fchaorenex1","https:\u002F\u002Fblog.aduib.com","A programmer whose only hobby in life is coding","2026-10-20 00:34:32",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add chaorenex1\u002Fhermes-home-content --skill windows-pe-dll-static-analysis",{"tool":50,"command":51},"bunx","bunx skills add chaorenex1\u002Fhermes-home-content --skill windows-pe-dll-static-analysis",{"tool":53,"command":54},"pnpm","pnpm dlx skills add chaorenex1\u002Fhermes-home-content --skill windows-pe-dll-static-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Freverse-engineering\u002Fwindows-pe-dll-static-analysis\u002FSKILL.md",true,[],[59,66,73,80,87,94],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7F8GF32YD5MBQW2TGSRH1YP","web-retrieval-resilience","Web tools fail or search rules break: repair or fall back.","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fweb-retrieval-resilience\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7F8FP46QESQMCZ1KBT3TW3R","blocked-page-recovery","Use when a fetch fails: 403\u002F429, paywall, WAF, bot wall.","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fweb\u002Fblocked-page-recovery\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7F8ER6VXHBNVRQBZS7X08SE","verification-loop","Run a six-phase verification of a Claude Code session's work — build, type check, lint, tests with coverage, security grep, and diff review — then produce a PASS\u002FFAIL verification report. Use when verifying work after completing a feature or refactor, before creating a PR, or when quality gates must pass.","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Fverification-loop\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7F8E4BQJ38KVQVM3MT20PYV","unreal-world-builder","开放世界与环境专家——精通 UE5 World Partition、Landscape、程序化植被、HLOD 和大规模关卡流式加载，打造无缝开放世界体验","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Funreal-engine\u002Funreal-world-builder\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7F8D747SQW2FTP7GBSX38BR","unreal-technical-artist","Unreal Engine 视觉管线专家——精通材质编辑器、Niagara 特效、程序化内容生成和 UE5 项目的美术到引擎管线","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Funreal-engine\u002Funreal-technical-artist\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":19},"01M7F8CKHYJVZVBTN0321J88T2","unreal-systems-engineer","性能与混合架构专家——精通 C++\u002FBlueprint 边界、Nanite 几何体、Lumen GI 和 Gameplay Ability System，面向 AAA 级 Unreal Engine 项目","https:\u002F\u002Fgithub.com\u002Fchaorenex1\u002Fhermes-home-content\u002Fblob\u002Fmain\u002Fskills\u002Funreal-engine\u002Funreal-systems-engineer\u002FSKILL.md",[],[]]