@eyeauras/insight-cli 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/.cli-package-build.json +1 -1
  2. package/README.md +33 -2
  3. package/SKILL.md +38 -51
  4. package/dist/src/administration-results.js +1 -1
  5. package/dist/src/administration.d.ts +1 -1
  6. package/dist/src/administration.js +16 -2
  7. package/dist/src/binary.d.ts +3 -0
  8. package/dist/src/binary.js +74 -0
  9. package/dist/src/capture.d.ts +3 -0
  10. package/dist/src/capture.js +220 -0
  11. package/dist/src/cli.js +91 -14
  12. package/dist/src/contexts.d.ts +5 -0
  13. package/dist/src/contexts.js +54 -18
  14. package/dist/src/debugger-caller.d.ts +17 -0
  15. package/dist/src/debugger-caller.js +129 -0
  16. package/dist/src/debugger-launch.d.ts +2 -0
  17. package/dist/src/debugger-launch.js +17 -0
  18. package/dist/src/debugger-results.d.ts +1 -0
  19. package/dist/src/debugger-results.js +8 -0
  20. package/dist/src/debugger-supervisor.js +56 -13
  21. package/dist/src/debugger.js +16 -7
  22. package/dist/src/die.d.ts +12 -0
  23. package/dist/src/die.js +127 -0
  24. package/dist/src/dnspy-runtime.d.ts +8 -0
  25. package/dist/src/dnspy-runtime.js +46 -0
  26. package/dist/src/dnspy.d.ts +22 -0
  27. package/dist/src/dnspy.js +160 -0
  28. package/dist/src/dotnet-diagnostics.d.ts +13 -0
  29. package/dist/src/dotnet-diagnostics.js +101 -0
  30. package/dist/src/frida-worker.d.ts +1 -0
  31. package/dist/src/frida-worker.js +125 -0
  32. package/dist/src/frida.d.ts +16 -0
  33. package/dist/src/frida.js +125 -0
  34. package/dist/src/ghidra-debugger-runtime.d.ts +7 -0
  35. package/dist/src/ghidra-debugger-runtime.js +31 -0
  36. package/dist/src/ghidra-processes.d.ts +6 -0
  37. package/dist/src/ghidra-processes.js +121 -0
  38. package/dist/src/ghidra.js +6 -6
  39. package/dist/src/ilspy.d.ts +7 -0
  40. package/dist/src/ilspy.js +122 -0
  41. package/dist/src/lifecycle.d.ts +1 -1
  42. package/dist/src/lifecycle.js +8 -2
  43. package/dist/src/lldb.d.ts +10 -0
  44. package/dist/src/lldb.js +99 -0
  45. package/dist/src/llvm.d.ts +6 -0
  46. package/dist/src/llvm.js +133 -0
  47. package/dist/src/managed-heap.d.ts +4 -0
  48. package/dist/src/managed-heap.js +73 -0
  49. package/dist/src/managed-metadata.d.ts +11 -0
  50. package/dist/src/managed-metadata.js +66 -0
  51. package/dist/src/mitmproxy.d.ts +55 -0
  52. package/dist/src/mitmproxy.js +172 -0
  53. package/dist/src/native-inputs.d.ts +3 -2
  54. package/dist/src/native-inputs.js +21 -5
  55. package/dist/src/package-version.d.ts +1 -0
  56. package/dist/src/package-version.js +3 -0
  57. package/dist/src/procmon-config.d.ts +2 -0
  58. package/dist/src/procmon-config.js +15 -0
  59. package/dist/src/procmon-events.d.ts +13 -0
  60. package/dist/src/procmon-events.js +82 -0
  61. package/dist/src/procmon.d.ts +4 -0
  62. package/dist/src/procmon.js +107 -0
  63. package/dist/src/research.d.ts +11 -2
  64. package/dist/src/research.js +5 -3
  65. package/dist/src/runtime-catalog.d.ts +13 -0
  66. package/dist/src/runtime-catalog.js +26 -0
  67. package/dist/src/runtime-manager.d.ts +125 -0
  68. package/dist/src/runtime-manager.js +385 -0
  69. package/dist/src/runtime-selection.d.ts +13 -0
  70. package/dist/src/runtime-selection.js +42 -0
  71. package/dist/src/server.d.ts +15 -0
  72. package/dist/src/server.js +77 -96
  73. package/dist/src/sevenzip.d.ts +15 -0
  74. package/dist/src/sevenzip.js +119 -0
  75. package/dist/src/strace.d.ts +10 -0
  76. package/dist/src/strace.js +71 -0
  77. package/dist/src/text-window.d.ts +11 -0
  78. package/dist/src/text-window.js +6 -0
  79. package/dist/src/tool-runtime/archives.d.ts +10 -0
  80. package/dist/src/tool-runtime/archives.js +194 -0
  81. package/dist/src/tool-runtime/catalog.d.ts +3 -0
  82. package/dist/src/tool-runtime/catalog.js +13 -0
  83. package/dist/src/tool-runtime/commands.d.ts +9 -0
  84. package/dist/src/tool-runtime/commands.js +39 -0
  85. package/dist/src/tool-runtime/deadline.d.ts +11 -0
  86. package/dist/src/tool-runtime/deadline.js +32 -0
  87. package/dist/src/tool-runtime/definition.d.ts +73 -0
  88. package/dist/src/tool-runtime/definition.js +49 -0
  89. package/dist/src/tool-runtime/dotnet.d.ts +4 -0
  90. package/dist/src/tool-runtime/dotnet.js +22 -0
  91. package/dist/src/tool-runtime/identity.d.ts +6 -0
  92. package/dist/src/tool-runtime/identity.js +50 -0
  93. package/dist/src/tool-runtime/installer.d.ts +101 -0
  94. package/dist/src/tool-runtime/installer.js +180 -0
  95. package/dist/src/tool-runtime/launch-worker.d.ts +1 -0
  96. package/dist/src/tool-runtime/launch-worker.js +58 -0
  97. package/dist/src/tool-runtime/run.d.ts +51 -0
  98. package/dist/src/tool-runtime/run.js +159 -0
  99. package/dist/src/tool-runtime/store.d.ts +15 -0
  100. package/dist/src/tool-runtime/store.js +219 -0
  101. package/dist/src/tool-runtime/supervisor.d.ts +57 -0
  102. package/dist/src/tool-runtime/supervisor.js +266 -0
  103. package/dist/src/tool-runtime/windows-job.d.ts +22 -0
  104. package/dist/src/tool-runtime/windows-job.js +43 -0
  105. package/dist/src/toolbox.d.ts +84 -0
  106. package/dist/src/toolbox.js +35 -0
  107. package/dist/src/tshark.d.ts +23 -0
  108. package/dist/src/tshark.js +174 -0
  109. package/dist/src/windbg.d.ts +14 -0
  110. package/dist/src/windbg.js +119 -0
  111. package/dist/src/workspace.d.ts +1 -0
  112. package/dist/src/workspace.js +6 -0
  113. package/package.json +7 -4
  114. package/references/administration.md +2 -1
  115. package/references/agent-execution.md +36 -0
  116. package/references/agent-setup.md +61 -0
  117. package/references/artifacts.md +5 -0
  118. package/references/debugger.md +22 -0
  119. package/references/ilspy.md +33 -0
  120. package/references/managed-runtime.md +157 -0
  121. package/references/native/InsightPythonWheels.java +283 -2
  122. package/references/native/InsightRuntimeDoctor.java +33 -0
  123. package/references/native/InsightTraceState.java +28 -13
  124. package/references/setup.md +6 -3
  125. package/runtime/managed/insight-heap/Azure.Core.dll +0 -0
  126. package/runtime/managed/insight-heap/Azure.Identity.dll +0 -0
  127. package/runtime/managed/insight-heap/Insight.Heap.csproj +1 -0
  128. package/runtime/managed/insight-heap/Insight.Heap.deps.json +391 -0
  129. package/runtime/managed/insight-heap/Insight.Heap.dll +0 -0
  130. package/runtime/managed/insight-heap/Insight.Heap.runtimeconfig.json +13 -0
  131. package/runtime/managed/insight-heap/Microsoft.Bcl.AsyncInterfaces.dll +0 -0
  132. package/runtime/managed/insight-heap/Microsoft.Diagnostics.NETCore.Client.dll +0 -0
  133. package/runtime/managed/insight-heap/Microsoft.Diagnostics.Runtime.dll +0 -0
  134. package/runtime/managed/insight-heap/Microsoft.Extensions.Configuration.Abstractions.dll +0 -0
  135. package/runtime/managed/insight-heap/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
  136. package/runtime/managed/insight-heap/Microsoft.Extensions.Diagnostics.Abstractions.dll +0 -0
  137. package/runtime/managed/insight-heap/Microsoft.Extensions.FileProviders.Abstractions.dll +0 -0
  138. package/runtime/managed/insight-heap/Microsoft.Extensions.Hosting.Abstractions.dll +0 -0
  139. package/runtime/managed/insight-heap/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
  140. package/runtime/managed/insight-heap/Microsoft.Extensions.Options.dll +0 -0
  141. package/runtime/managed/insight-heap/Microsoft.Extensions.Primitives.dll +0 -0
  142. package/runtime/managed/insight-heap/Microsoft.Identity.Client.Extensions.Msal.dll +0 -0
  143. package/runtime/managed/insight-heap/Microsoft.Identity.Client.dll +0 -0
  144. package/runtime/managed/insight-heap/Microsoft.IdentityModel.Abstractions.dll +0 -0
  145. package/runtime/managed/insight-heap/Microsoft.Security.AntiSSRF.dll +0 -0
  146. package/runtime/managed/insight-heap/NuGet.Config +1 -0
  147. package/runtime/managed/insight-heap/Program.cs +20 -0
  148. package/runtime/managed/insight-heap/README.md +16 -0
  149. package/runtime/managed/insight-heap/System.ClientModel.dll +0 -0
  150. package/runtime/managed/insight-heap/System.Memory.Data.dll +0 -0
  151. package/runtime/managed/insight-heap/System.Security.Cryptography.ProtectedData.dll +0 -0
  152. package/runtime/managed/insight-heap/dependencies.json +436 -0
  153. package/runtime/managed/insight-heap/notices/Azure.Core-LICENSE.txt +21 -0
  154. package/runtime/managed/insight-heap/notices/Azure.Identity-LICENSE.txt +21 -0
  155. package/runtime/managed/insight-heap/notices/Microsoft.Bcl.AsyncInterfaces-LICENSE.txt +23 -0
  156. package/runtime/managed/insight-heap/notices/Microsoft.Bcl.AsyncInterfaces-THIRD-PARTY-NOTICES.TXT +1418 -0
  157. package/runtime/managed/insight-heap/notices/Microsoft.Diagnostics.NETCore.Client-LICENSE.txt +23 -0
  158. package/runtime/managed/insight-heap/notices/Microsoft.Diagnostics.Runtime-LICENSE.txt +23 -0
  159. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Configuration.Abstractions-LICENSE.txt +23 -0
  160. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Configuration.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  161. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.DependencyInjection.Abstractions-LICENSE.txt +23 -0
  162. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.DependencyInjection.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  163. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Diagnostics.Abstractions-LICENSE.txt +23 -0
  164. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Diagnostics.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  165. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.FileProviders.Abstractions-LICENSE.txt +23 -0
  166. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.FileProviders.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  167. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Hosting.Abstractions-LICENSE.txt +23 -0
  168. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Hosting.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  169. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Logging.Abstractions-LICENSE.txt +23 -0
  170. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Logging.Abstractions-THIRD-PARTY-NOTICES.TXT +1418 -0
  171. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Options-LICENSE.txt +23 -0
  172. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Options-THIRD-PARTY-NOTICES.TXT +1418 -0
  173. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Primitives-LICENSE.txt +23 -0
  174. package/runtime/managed/insight-heap/notices/Microsoft.Extensions.Primitives-THIRD-PARTY-NOTICES.TXT +1418 -0
  175. package/runtime/managed/insight-heap/notices/Microsoft.Identity.Client-LICENSE.txt +21 -0
  176. package/runtime/managed/insight-heap/notices/Microsoft.Identity.Client.Extensions.Msal-LICENSE.txt +21 -0
  177. package/runtime/managed/insight-heap/notices/Microsoft.IdentityModel.Abstractions-LICENSE.txt +21 -0
  178. package/runtime/managed/insight-heap/notices/Microsoft.Security.AntiSSRF-LICENSE.txt +21 -0
  179. package/runtime/managed/insight-heap/notices/System.ClientModel-LICENSE.txt +21 -0
  180. package/runtime/managed/insight-heap/notices/System.Memory.Data-LICENSE.txt +23 -0
  181. package/runtime/managed/insight-heap/notices/System.Memory.Data-THIRD-PARTY-NOTICES.TXT +1418 -0
  182. package/runtime/managed/insight-heap/notices/System.Security.Cryptography.ProtectedData-LICENSE.TXT +23 -0
  183. package/runtime/managed/insight-heap/notices/System.Security.Cryptography.ProtectedData-THIRD-PARTY-NOTICES.TXT +309 -0
  184. package/runtime/managed/insight-heap/packages.lock.json +165 -0
  185. package/runtime/managed/insight-heap/provenance.json +146 -0
  186. package/runtime/managed/insight-heap/runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll +0 -0
  187. package/runtime/managed/insight-managed/Insight.Managed.csproj +4 -0
  188. package/runtime/managed/insight-managed/Insight.Managed.deps.json +41 -0
  189. package/runtime/managed/insight-managed/Insight.Managed.dll +0 -0
  190. package/runtime/managed/insight-managed/Insight.Managed.runtimeconfig.json +13 -0
  191. package/runtime/managed/insight-managed/LICENSE.dnlib.txt +20 -0
  192. package/runtime/managed/insight-managed/NuGet.Config +1 -0
  193. package/runtime/managed/insight-managed/Program.cs +31 -0
  194. package/runtime/managed/insight-managed/README.md +16 -0
  195. package/runtime/managed/insight-managed/dnlib.dll +0 -0
  196. package/runtime/managed/insight-managed/packages.lock.json +13 -0
  197. package/runtime/managed/insight-managed/provenance.json +40 -0
  198. package/runtime/native/binary/README.md +22 -0
  199. package/runtime/native/binary/dependencies.json +166 -0
  200. package/runtime/native/binary/helper.cpp +44 -0
  201. package/runtime/native/binary/insight-binary-darwin-arm64 +0 -0
  202. package/runtime/native/binary/notices/Catch2-3.12.0--Catch2-3.12.0__LICENSE.txt +23 -0
  203. package/runtime/native/binary/notices/LIEF-LICENSE.txt +202 -0
  204. package/runtime/native/binary/notices/LIEF-attribution.txt +37 -0
  205. package/runtime/native/binary/notices/Melkor_ELF_Fuzzer-ac2495b--elf_fuzzer-master__LICENSE.txt +674 -0
  206. package/runtime/native/binary/notices/expected-1.3.1--expected-1.3.1__COPYING +121 -0
  207. package/runtime/native/binary/notices/frozen-61dce5a--frozen-61dce5ae18ca59931e27675c468e64118aba8744__AUTHORS +3 -0
  208. package/runtime/native/binary/notices/frozen-61dce5a--frozen-61dce5ae18ca59931e27675c468e64118aba8744__LICENSE +202 -0
  209. package/runtime/native/binary/notices/json-LICENSE.MIT +21 -0
  210. package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--LICENSE +553 -0
  211. package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--framework__LICENSE +553 -0
  212. package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--tf-psa-crypto__LICENSE +552 -0
  213. package/runtime/native/binary/notices/mbedtls-4.0.0.r0.gec4044008d--tf-psa-crypto__framework__LICENSE +553 -0
  214. package/runtime/native/binary/notices/nanobind-2.13.0.r18.g4db9ed3f--LICENSE +26 -0
  215. package/runtime/native/binary/notices/nanobind-2.13.0.r18.g4db9ed3f--ext__robin_map__LICENSE +21 -0
  216. package/runtime/native/binary/notices/span-LICENSE_1_0.txt +23 -0
  217. package/runtime/native/binary/notices/span-attribution.txt +11 -0
  218. package/runtime/native/binary/notices/spdlog-1.17.0--spdlog-1.17.0__LICENSE +25 -0
  219. package/runtime/native/binary/notices/utfcpp-4.0.9--utfcpp-4.0.9__LICENSE +23 -0
  220. package/runtime/native/binary/provenance.json +48 -0
  221. package/runtime/native/child-deadline-linux-x64 +0 -0
  222. package/runtime/native/child-deadline-linux.c +24 -0
  223. package/runtime/native/child-deadline-linux.provenance.json +17 -0
  224. package/runtime/native/deadline-alarm-darwin-universal.dylib +0 -0
  225. package/runtime/native/deadline-alarm.c +33 -0
  226. package/runtime/native/deadline-alarm.provenance.json +22 -0
  227. package/runtime/native/deadline-exec-darwin-arm64 +0 -0
  228. package/runtime/native/deadline-exec.c +24 -0
  229. package/runtime/native/deadline-exec.provenance.json +17 -0
  230. package/runtime/native/dnspy-extension/Bridge.cs +58 -0
  231. package/runtime/native/dnspy-extension/Insight.DnSpy.csproj +13 -0
  232. package/runtime/native/dnspy-extension/Insight.DnSpy.x.dll +0 -0
  233. package/runtime/native/dnspy-extension/NuGet.Config +1 -0
  234. package/runtime/native/dnspy-extension/UNICODE-LOADER.md +26 -0
  235. package/runtime/native/dnspy-extension/packages.lock.json +6 -0
  236. package/runtime/native/dnspy-extension/provenance.json +27 -0
  237. package/runtime/native/dnspy-extension/upstream-public-build.snk +0 -0
  238. package/runtime/native/dnspy-extension/vendor-files.json +4341 -0
  239. package/runtime/native/file-version.ps1 +7 -0
  240. package/runtime/native/insight-registry-win-x64.dll +0 -0
  241. package/runtime/native/mitmproxy/bridge.py +180 -0
  242. package/runtime/native/mitmproxy/notices.json +476 -0
  243. package/runtime/native/sources/detours-LICENSE.md +23 -0
  244. package/runtime/native/sources/detours-e4bfd6b.tar.gz +0 -0
  245. package/runtime/native/sources/detours-provenance.json +10 -0
  246. package/runtime/native/tshark-layout.json +2247 -0
  247. package/runtime/native/windows-job/DirectoryAlias.cs +24 -0
  248. package/runtime/native/windows-job/Insight.WindowsJob.csproj +1 -0
  249. package/runtime/native/windows-job/Insight.WindowsJob.dll +0 -0
  250. package/runtime/native/windows-job/NuGet.Config +1 -0
  251. package/runtime/native/windows-job/OwnedJob.cs +79 -0
  252. package/runtime/native/windows-job/RegistryRedirect.cs +45 -0
  253. package/runtime/native/windows-job/packages.lock.json +21 -0
  254. package/runtime/native/windows-job/provenance.json +16 -0
  255. package/runtime/native/windows-job/windows-job.ps1 +8 -0
  256. package/runtime/native/windows-registry.c +21 -0
  257. package/runtime/native/windows-registry.def +3 -0
  258. package/runtime/native/windows-registry.provenance.json +14 -0
  259. package/runtime/notices/diagnostics-10.0.750501.txt +23 -0
  260. package/runtime/tool-catalog.json +290 -0
  261. package/runtime/toolbox.json +1401 -0
  262. package/skill-bundle/insight-artifacts/SKILL.md +30 -0
  263. package/skill-bundle/insight-artifacts/references/agent-execution.md +36 -0
  264. package/skill-bundle/insight-artifacts/references/artifacts.md +52 -0
  265. package/skill-bundle/insight-binary/SKILL.md +46 -0
  266. package/skill-bundle/insight-binary/references/agent-execution.md +36 -0
  267. package/skill-bundle/insight-capture/SKILL.md +56 -0
  268. package/skill-bundle/insight-capture/references/agent-execution.md +36 -0
  269. package/skill-bundle/insight-cli/SKILL.md +42 -0
  270. package/skill-bundle/insight-cli/references/agent-execution.md +36 -0
  271. package/skill-bundle/insight-cli/references/agent-setup.md +61 -0
  272. package/skill-bundle/insight-die/SKILL.md +49 -0
  273. package/skill-bundle/insight-die/references/agent-execution.md +36 -0
  274. package/skill-bundle/insight-dnspy/SKILL.md +65 -0
  275. package/skill-bundle/insight-dnspy/references/agent-execution.md +36 -0
  276. package/skill-bundle/insight-dotnet-dump/SKILL.md +46 -0
  277. package/skill-bundle/insight-dotnet-dump/references/agent-execution.md +36 -0
  278. package/skill-bundle/insight-dotnet-stack/SKILL.md +39 -0
  279. package/skill-bundle/insight-dotnet-stack/references/agent-execution.md +36 -0
  280. package/skill-bundle/insight-dotnet-trace/SKILL.md +45 -0
  281. package/skill-bundle/insight-dotnet-trace/references/agent-execution.md +36 -0
  282. package/skill-bundle/insight-frida/SKILL.md +67 -0
  283. package/skill-bundle/insight-frida/references/agent-execution.md +36 -0
  284. package/skill-bundle/insight-ghidra/SKILL.md +91 -0
  285. package/skill-bundle/insight-ghidra/references/administration.md +34 -0
  286. package/skill-bundle/insight-ghidra/references/agent-execution.md +36 -0
  287. package/skill-bundle/insight-ghidra/references/archive.md +32 -0
  288. package/skill-bundle/insight-ghidra/references/artifacts.md +52 -0
  289. package/skill-bundle/insight-ghidra/references/debugger.md +62 -0
  290. package/skill-bundle/insight-ghidra/references/extensions-and-sync.md +124 -0
  291. package/skill-bundle/insight-ghidra/references/managed-runtime.md +157 -0
  292. package/skill-bundle/insight-ghidra/references/native-workflows.md +112 -0
  293. package/skill-bundle/insight-ghidra/references/query-semantics.md +96 -0
  294. package/skill-bundle/insight-ghidra/references/recovery.md +53 -0
  295. package/skill-bundle/insight-ghidra/references/research.md +101 -0
  296. package/skill-bundle/insight-ghidra/references/setup.md +50 -0
  297. package/skill-bundle/insight-ilspy/SKILL.md +45 -0
  298. package/skill-bundle/insight-ilspy/references/agent-execution.md +36 -0
  299. package/skill-bundle/insight-ilspy/references/ilspy.md +33 -0
  300. package/skill-bundle/insight-interop/SKILL.md +54 -0
  301. package/skill-bundle/insight-interop/references/agent-execution.md +36 -0
  302. package/skill-bundle/insight-lldb/SKILL.md +54 -0
  303. package/skill-bundle/insight-lldb/references/agent-execution.md +36 -0
  304. package/skill-bundle/insight-llvm/SKILL.md +56 -0
  305. package/skill-bundle/insight-llvm/references/agent-execution.md +36 -0
  306. package/skill-bundle/insight-managed-heap/SKILL.md +43 -0
  307. package/skill-bundle/insight-managed-heap/references/agent-execution.md +36 -0
  308. package/skill-bundle/insight-managed-metadata/SKILL.md +52 -0
  309. package/skill-bundle/insight-managed-metadata/references/agent-execution.md +36 -0
  310. package/skill-bundle/insight-mitmproxy/SKILL.md +62 -0
  311. package/skill-bundle/insight-mitmproxy/references/agent-execution.md +36 -0
  312. package/skill-bundle/insight-overview/SKILL.md +79 -0
  313. package/skill-bundle/insight-overview/references/agent-execution.md +36 -0
  314. package/skill-bundle/insight-procmon/SKILL.md +49 -0
  315. package/skill-bundle/insight-procmon/references/agent-execution.md +36 -0
  316. package/skill-bundle/insight-re/SKILL.md +121 -0
  317. package/skill-bundle/insight-re/references/agent-execution.md +36 -0
  318. package/skill-bundle/insight-re/references/artifacts.md +52 -0
  319. package/skill-bundle/insight-re/references/recovery.md +53 -0
  320. package/skill-bundle/insight-sevenzip/SKILL.md +42 -0
  321. package/skill-bundle/insight-sevenzip/references/agent-execution.md +36 -0
  322. package/skill-bundle/insight-strace/SKILL.md +46 -0
  323. package/skill-bundle/insight-strace/references/agent-execution.md +36 -0
  324. package/skill-bundle/insight-tshark/SKILL.md +49 -0
  325. package/skill-bundle/insight-tshark/references/agent-execution.md +36 -0
  326. package/skill-bundle/insight-windbg/SKILL.md +46 -0
  327. package/skill-bundle/insight-windbg/references/agent-execution.md +36 -0
  328. package/skill-bundle/manifest.json +32 -0
  329. package/skills/insight-artifacts/SKILL.md +30 -0
  330. package/skills/insight-artifacts/references/agent-execution.md +36 -0
  331. package/skills/insight-artifacts/references/artifacts.md +52 -0
  332. package/skills/insight-binary/SKILL.md +46 -0
  333. package/skills/insight-binary/references/agent-execution.md +36 -0
  334. package/skills/insight-capture/SKILL.md +56 -0
  335. package/skills/insight-capture/references/agent-execution.md +36 -0
  336. package/skills/insight-die/SKILL.md +49 -0
  337. package/skills/insight-die/references/agent-execution.md +36 -0
  338. package/skills/insight-dnspy/SKILL.md +65 -0
  339. package/skills/insight-dnspy/references/agent-execution.md +36 -0
  340. package/skills/insight-dotnet-dump/SKILL.md +46 -0
  341. package/skills/insight-dotnet-dump/references/agent-execution.md +36 -0
  342. package/skills/insight-dotnet-stack/SKILL.md +39 -0
  343. package/skills/insight-dotnet-stack/references/agent-execution.md +36 -0
  344. package/skills/insight-dotnet-trace/SKILL.md +45 -0
  345. package/skills/insight-dotnet-trace/references/agent-execution.md +36 -0
  346. package/skills/insight-frida/SKILL.md +67 -0
  347. package/skills/insight-frida/references/agent-execution.md +36 -0
  348. package/skills/insight-ghidra/SKILL.md +91 -0
  349. package/skills/insight-ghidra/references/administration.md +34 -0
  350. package/skills/insight-ghidra/references/agent-execution.md +36 -0
  351. package/skills/insight-ghidra/references/archive.md +32 -0
  352. package/skills/insight-ghidra/references/artifacts.md +52 -0
  353. package/skills/insight-ghidra/references/debugger.md +62 -0
  354. package/skills/insight-ghidra/references/extensions-and-sync.md +124 -0
  355. package/skills/insight-ghidra/references/managed-runtime.md +157 -0
  356. package/skills/insight-ghidra/references/native-workflows.md +112 -0
  357. package/skills/insight-ghidra/references/query-semantics.md +96 -0
  358. package/skills/insight-ghidra/references/recovery.md +53 -0
  359. package/skills/insight-ghidra/references/research.md +101 -0
  360. package/skills/insight-ghidra/references/setup.md +50 -0
  361. package/skills/insight-ilspy/SKILL.md +45 -0
  362. package/skills/insight-ilspy/references/agent-execution.md +36 -0
  363. package/skills/insight-ilspy/references/ilspy.md +33 -0
  364. package/skills/insight-interop/SKILL.md +54 -0
  365. package/skills/insight-interop/references/agent-execution.md +36 -0
  366. package/skills/insight-lldb/SKILL.md +54 -0
  367. package/skills/insight-lldb/references/agent-execution.md +36 -0
  368. package/skills/insight-llvm/SKILL.md +56 -0
  369. package/skills/insight-llvm/references/agent-execution.md +36 -0
  370. package/skills/insight-managed-heap/SKILL.md +43 -0
  371. package/skills/insight-managed-heap/references/agent-execution.md +36 -0
  372. package/skills/insight-managed-metadata/SKILL.md +52 -0
  373. package/skills/insight-managed-metadata/references/agent-execution.md +36 -0
  374. package/skills/insight-mitmproxy/SKILL.md +62 -0
  375. package/skills/insight-mitmproxy/references/agent-execution.md +36 -0
  376. package/skills/insight-overview/SKILL.md +79 -0
  377. package/skills/insight-overview/references/agent-execution.md +36 -0
  378. package/skills/insight-procmon/SKILL.md +49 -0
  379. package/skills/insight-procmon/references/agent-execution.md +36 -0
  380. package/skills/insight-re/SKILL.md +22 -9
  381. package/skills/insight-re/references/agent-execution.md +36 -0
  382. package/skills/insight-re/references/artifacts.md +52 -0
  383. package/skills/insight-re/references/recovery.md +53 -0
  384. package/skills/insight-sevenzip/SKILL.md +42 -0
  385. package/skills/insight-sevenzip/references/agent-execution.md +36 -0
  386. package/skills/insight-strace/SKILL.md +46 -0
  387. package/skills/insight-strace/references/agent-execution.md +36 -0
  388. package/skills/insight-tshark/SKILL.md +49 -0
  389. package/skills/insight-tshark/references/agent-execution.md +36 -0
  390. package/skills/insight-windbg/SKILL.md +46 -0
  391. package/skills/insight-windbg/references/agent-execution.md +36 -0
@@ -0,0 +1,23 @@
1
+ Boost Software License - Version 1.0 - August 17th, 2003
2
+
3
+ Permission is hereby granted, free of charge, to any person or organization
4
+ obtaining a copy of the software and accompanying documentation covered by
5
+ this license (the "Software") to use, reproduce, display, distribute,
6
+ execute, and transmit the Software, and to prepare derivative works of the
7
+ Software, and to permit third-parties to whom the Software is furnished to
8
+ do so, all subject to the following:
9
+
10
+ The copyright notices in the Software and this entire statement, including
11
+ the above license grant, this restriction and the following disclaimer,
12
+ must be included in all copies of the Software, in whole or in part, and
13
+ all derivative works of the Software, unless such copies or derivative
14
+ works are solely in the form of machine-executable object code generated by
15
+ a source language processor.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20
+ SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21
+ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23
+ DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,48 @@
1
+ {
2
+ "schema": 1,
3
+ "compiler": "Apple clang version 17.0.0 (clang-1700.3.19.1)",
4
+ "platform": "darwin-arm64",
5
+ "minimumSystem": "macOS14+",
6
+ "sdkVersion": "26.0",
7
+ "inputs": {
8
+ "helper.cpp": "2350499d7db21318791027cc859c714d9902cc746525cf5e2b9a560285ec69fe",
9
+ "dependencies.json": "e9d5960a2d4920ca442df3ecc77730588708fc7e934ba4a6831a1cc6ed4f6819",
10
+ "notices/LIEF-LICENSE.txt": "998dc6a9d251b4d9d4274d8a7e121fe20c33b1dfd4300bca276e87da23dc582e",
11
+ "notices/LIEF-attribution.txt": "14353f94305648fa88cf28a78fe92ea24420e7851802b8f01930b3f09eee2656",
12
+ "notices/Catch2-3.12.0--Catch2-3.12.0__LICENSE.txt": "c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566",
13
+ "notices/Melkor_ELF_Fuzzer-ac2495b--elf_fuzzer-master__LICENSE.txt": "8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903",
14
+ "notices/expected-1.3.1--expected-1.3.1__COPYING": "a2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499",
15
+ "notices/frozen-61dce5a--frozen-61dce5ae18ca59931e27675c468e64118aba8744__AUTHORS": "e87cb6aaac199b412d4a0c85b3507891dfa5054a5b80169b07e39142a9226264",
16
+ "notices/frozen-61dce5a--frozen-61dce5ae18ca59931e27675c468e64118aba8744__LICENSE": "f6099ed23682840ae60a76fce378faae9b5c75f7d162188883e13b790ca18b98",
17
+ "notices/mbedtls-4.0.0.r0.gec4044008d--LICENSE": "9b405ef4c89342f5eae1dd828882f931747f71001cfba7d114801039b52ad09b",
18
+ "notices/mbedtls-4.0.0.r0.gec4044008d--framework__LICENSE": "11402351e38392230bb8934ba1095c0c0049a296c0f8821f76e4672dff54b490",
19
+ "notices/mbedtls-4.0.0.r0.gec4044008d--tf-psa-crypto__framework__LICENSE": "11402351e38392230bb8934ba1095c0c0049a296c0f8821f76e4672dff54b490",
20
+ "notices/mbedtls-4.0.0.r0.gec4044008d--tf-psa-crypto__LICENSE": "da8c58f05f135a9d15e9ffad4ecf854cfcc1f014c8abfd75ba05f62630ccc118",
21
+ "notices/nanobind-2.13.0.r18.g4db9ed3f--LICENSE": "f305091a4e57805870b217a28ea4b1f16610eece8457d2370f822a9696b75836",
22
+ "notices/nanobind-2.13.0.r18.g4db9ed3f--ext__robin_map__LICENSE": "11f2c685ba565a31aef1219f63a7a8845602c97bff70016b9e3278dfe51a2ec5",
23
+ "notices/spdlog-1.17.0--spdlog-1.17.0__LICENSE": "d678c20826e1392578508e1c78649a1e3c31bda05ef4388d967dbd654461b140",
24
+ "notices/span-attribution.txt": "2bb98c5155725644491fe894aa468d0b76f17b90d378d0990d723b36e17cab85",
25
+ "notices/utfcpp-4.0.9--utfcpp-4.0.9__LICENSE": "c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566",
26
+ "notices/json-LICENSE.MIT": "46a65cffd1ea955132d95a8dd921640714a8d6b537d2e4e482d31145ae95b603",
27
+ "notices/span-LICENSE_1_0.txt": "c9bff75738922193e67fa726fa225535870d2aa1059f91452c411736284ad566"
28
+ },
29
+ "files": {
30
+ "insight-binary-darwin-arm64": {
31
+ "size": 3038984,
32
+ "sha256": "ffbe5f37ec336a96fe4e885247e321b63cbd5b8f5d7809d8fa00f812ac0d25b9"
33
+ }
34
+ },
35
+ "sourceLicense": "MIT",
36
+ "dependencies": "dependencies.json",
37
+ "reproducible": true,
38
+ "staticLibrary": {
39
+ "name": "LIEF-1.0.0-Darwin-arm64.tar.gz",
40
+ "sha256": "c7bedf2e2acab9bced1c8701b06261fc6f4eba1957f80cbf86323a3f5e172167",
41
+ "url": "https://github.com/lief-project/LIEF/releases/download/1.0.0/LIEF-1.0.0-Darwin-arm64.tar.gz",
42
+ "mirror": "https://github.com/iXab3r/insight-cli/releases/download/tool-lief-1.0.0-r1/LIEF-1.0.0-Darwin-arm64.tar.gz"
43
+ },
44
+ "linkedSystemLibraries": [
45
+ "/usr/lib/libc++.1.dylib",
46
+ "/usr/lib/libSystem.B.dylib"
47
+ ]
48
+ }
@@ -0,0 +1,24 @@
1
+ /* MIT; first-party owned Linux launcher. PDEATHSIG also bounds tools that replace SIGALRM. */
2
+ #define _GNU_SOURCE
3
+ #include <errno.h>
4
+ #include <signal.h>
5
+ #include <stdio.h>
6
+ #include <stdlib.h>
7
+ #include <sys/prctl.h>
8
+ #include <sys/types.h>
9
+ #include <sys/wait.h>
10
+ #include <unistd.h>
11
+ static long integer(const char *s,long maximum){char *end=NULL;errno=0;long v=strtol(s,&end,10);return errno||!end||*end||v<1||v>maximum?-1:v;}
12
+ int main(int argc,char **argv){
13
+ if(argc<4||argv[3][0]!='/')return 64;
14
+ long seconds=integer(argv[1],600),owner=integer(argv[2],2147483647);if(seconds<0||owner<0)return 64;
15
+ if(prctl(PR_SET_PDEATHSIG,SIGKILL)||getppid()!=(pid_t)owner)return 70;
16
+ sigset_t signals;sigemptyset(&signals);sigaddset(&signals,SIGALRM);sigaddset(&signals,SIGTERM);sigaddset(&signals,SIGINT);
17
+ if(sigprocmask(SIG_UNBLOCK,&signals,NULL)||signal(SIGALRM,SIG_DFL)==SIG_ERR)return 70;
18
+ alarm((unsigned)seconds);pid_t parent=getpid(),child=fork();if(child<0)return 70;
19
+ if(!child){if(prctl(PR_SET_PDEATHSIG,SIGKILL)||getppid()!=parent)_exit(70);alarm(0);execv(argv[3],argv+3);perror("Owned native executable could not start");_exit(127);}
20
+ int status;while(waitpid(child,&status,0)<0){if(errno!=EINTR)return 70;}
21
+ if(WIFEXITED(status))return WEXITSTATUS(status);
22
+ if(WIFSIGNALED(status)){int sig=WTERMSIG(status);signal(sig,SIG_DFL);kill(getpid(),sig);return 128+sig;}
23
+ return 70;
24
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "schema": 1,
3
+ "sourceSha256": "bc2a95954cdd1d1bb4851228ea93ca2719bc3be84b1a7eaba2e3127a9db0bd15",
4
+ "sha256": "e070e2de9a21aea78f224062877cdc0264be11229af314d3b88ff3b6bd77e26f",
5
+ "size": 16720,
6
+ "compiler": "cc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0",
7
+ "libc": "glibc 2.35",
8
+ "nativeVerification": "https://github.com/iXab3r/insight-cli/actions/runs/39050776071",
9
+ "checks": {
10
+ "actualOwnedConfigRead": true,
11
+ "killOnExitTerminatesDescendants": true,
12
+ "systemLibcOnly": true,
13
+ "launcherKillBounded": true,
14
+ "timeoutBounded": true,
15
+ "ownerLossBounded": true
16
+ }
17
+ }
@@ -0,0 +1,33 @@
1
+ /* MIT; first-party constructor for owned Frida helper execs, never injected into the target. */
2
+ #include <errno.h>
3
+ #include <fcntl.h>
4
+ #include <libproc.h>
5
+ #include <signal.h>
6
+ #include <stdio.h>
7
+ #include <stdlib.h>
8
+ #include <string.h>
9
+ #include <time.h>
10
+ #include <unistd.h>
11
+ __attribute__((constructor)) static void arm_owned_deadline(void) {
12
+ const char *raw = getenv("INSIGHT_NATIVE_DEADLINE_UNIX_SECONDS");
13
+ const char *directory = getenv("INSIGHT_NATIVE_DEADLINE_RECEIPTS");
14
+ if (!raw || !directory || directory[0] != '/') _exit(70);
15
+ errno = 0; char *end = NULL;
16
+ long long deadline = strtoll(raw, &end, 10), now = (long long)time(NULL);
17
+ if (errno || !end || *end || deadline <= now || deadline - now > 600) _exit(70);
18
+ sigset_t signals;
19
+ if (sigemptyset(&signals) || sigaddset(&signals, SIGALRM) ||
20
+ sigprocmask(SIG_UNBLOCK, &signals, NULL) || signal(SIGALRM, SIG_DFL) == SIG_ERR) _exit(70);
21
+ alarm((unsigned int)(deadline - now));
22
+ struct proc_bsdinfo info;
23
+ if (proc_pidinfo(getpid(), PROC_PIDTBSDINFO, 0, &info, sizeof(info)) != sizeof(info)) _exit(70);
24
+ char path[4096], body[512];
25
+ int length = snprintf(path, sizeof(path), "%s/%d.json", directory, getpid());
26
+ if (length < 0 || length >= (int)sizeof(path)) _exit(70);
27
+ int fd = open(path, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, 0600);
28
+ if (fd < 0) _exit(70);
29
+ length = snprintf(body, sizeof(body), "{\"protocol\":1,\"pid\":%d,\"parentPid\":%d,\"birthSeconds\":%llu,\"birthMicroseconds\":%llu,\"deadlineUnixSeconds\":%lld}\n",
30
+ getpid(), getppid(), info.pbi_start_tvsec, info.pbi_start_tvusec, deadline);
31
+ if (length < 0 || length >= (int)sizeof(body) || write(fd, body, (size_t)length) != length || fsync(fd)) _exit(70);
32
+ close(fd);
33
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "platform": "darwin-arm64-and-arm64e",
3
+ "compiler": "Apple clang version 17.0.0 (clang-1700.3.19.1)",
4
+ "sdk": "26.0",
5
+ "sourceSha256": "8c0673605c86736c2a694fbb344bcc1dee136ee68aa042ebd889eb84572bc635",
6
+ "sha256": "cd5ebd65aa419b79cb327f2ae872f98f3fd222b93049c909e409776eab65b8ef",
7
+ "size": 99648,
8
+ "flags": [
9
+ "-arch",
10
+ "arm64",
11
+ "-arch",
12
+ "arm64e",
13
+ "-mmacosx-version-min=13.0",
14
+ "-dynamiclib",
15
+ "-Oz",
16
+ "-g0",
17
+ "-fno-ident",
18
+ "-fno-stack-protector",
19
+ "-Wl,-install_name,@rpath/insight-deadline-alarm.dylib"
20
+ ],
21
+ "reproducibility": "Two independent builds in different temporary directories produced identical bytes. ARM64e requires the Apple ABI and LC_UUID; both slices only link system libSystem."
22
+ }
@@ -0,0 +1,24 @@
1
+ /* MIT; first-party internal exec helper. A kernel alarm survives exec and owner loss. */
2
+ #include <errno.h>
3
+ #include <signal.h>
4
+ #include <stdio.h>
5
+ #include <stdlib.h>
6
+ #include <string.h>
7
+ #include <unistd.h>
8
+ int main(int argc, char **argv) {
9
+ if (argc == 2 && strcmp(argv[1], "--version") == 0) {
10
+ puts("insight-deadline-exec 1"); return 0;
11
+ }
12
+ if (argc < 4 || strcmp(argv[2], "--") != 0 || argv[3][0] != '/') return 64;
13
+ char *end = NULL;
14
+ errno = 0;
15
+ long seconds = strtol(argv[1], &end, 10);
16
+ if (errno || !end || *end || seconds < 1 || seconds > 600) return 64;
17
+ sigset_t signals;
18
+ if (sigemptyset(&signals) || sigaddset(&signals, SIGALRM) ||
19
+ sigprocmask(SIG_UNBLOCK, &signals, NULL) || signal(SIGALRM, SIG_DFL) == SIG_ERR) return 70;
20
+ alarm((unsigned int)seconds);
21
+ execv(argv[3], &argv[3]);
22
+ perror("Owned deadline executable could not start");
23
+ return 127;
24
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "platform": "darwin-arm64",
3
+ "compiler": "LLVM 22.1.8",
4
+ "sourceSha256": "d4f17b44fe6703073fd090aff5a2770441e185c1ece07f06228ee0f21dbec47e",
5
+ "sha256": "32c146075d1c83422b068eeedd4a244d5e30cb768b279b185756c5d3b8008d88",
6
+ "size": 33824,
7
+ "flags": [
8
+ "--target=arm64-apple-macos13.0",
9
+ "-Oz",
10
+ "-g0",
11
+ "-fno-ident",
12
+ "-fno-stack-protector",
13
+ "-Wl,-no_uuid",
14
+ "-Wl,-platform_version,macos,13.0,13.0"
15
+ ],
16
+ "reproducibility": "Two builds in different temporary directories produced identical bytes. Ad-hoc signature verified; only libSystem is dynamically linked."
17
+ }
@@ -0,0 +1,58 @@
1
+ // MIT; first-party typed extension. No user C# expression or arbitrary command is evaluated.
2
+ using System.ComponentModel.Composition;using System.Globalization;using System.IO;using System.Text;using System.Text.Json;using System.Windows;using dnSpy.Contracts.App;using dnSpy.Contracts.Documents;using dnSpy.Contracts.Debugger;using dnSpy.Contracts.Debugger.Breakpoints.Code;using dnSpy.Contracts.Debugger.DotNet.Code;using dnSpy.Contracts.Debugger.DotNet.CorDebug;using dnSpy.Contracts.Debugger.DotNet.Evaluation;using dnSpy.Contracts.Debugger.Evaluation;using dnSpy.Contracts.Metadata;using dnlib.DotNet;using dnlib.DotNet.Emit;using dnlib.DotNet.Writer;using System.Security.Cryptography;using System.Runtime.InteropServices;using Microsoft.Win32.SafeHandles;
3
+ namespace Insight.DnSpy;
4
+ public sealed class Plan {public int Schema{get;set;}public string Nonce{get;set;}="";public string Mode{get;set;}="";public string Input{get;set;}="";public string Result{get;set;}="";public string Module{get;set;}="";public string Output{get;set;}="";public string BuildKey{get;set;}="";public string Runtime{get;set;}="framework";public uint Token{get;set;}public uint Offset{get;set;}public uint[] Parameters{get;set;}=[];public string[] Arguments{get;set;}=[];public int? ExpectedConstant{get;set;}public int? ReplacementConstant{get;set;}}
5
+ [Export(typeof(IAppCommandLineArgsHandler))]
6
+ sealed class Bridge:IAppCommandLineArgsHandler {
7
+ readonly Lazy<DbgManager> manager;readonly Lazy<DbgCodeBreakpointsService> breakpoints;readonly Lazy<DbgDotNetCodeLocationFactory> locations;readonly Lazy<DbgLanguageService> languages;readonly Lazy<IDsDocumentService> documents;readonly Queue<string> messages=new();Plan? plan;DbgCodeBreakpoint? breakpoint;DbgThread? paused;bool done,started;System.Threading.Timer? deadline;
8
+ [ImportingConstructor] public Bridge(Lazy<DbgManager> manager,Lazy<DbgCodeBreakpointsService> breakpoints,Lazy<DbgDotNetCodeLocationFactory> locations,Lazy<DbgLanguageService> languages,Lazy<IDsDocumentService> documents){this.manager=manager;this.breakpoints=breakpoints;this.locations=locations;this.languages=languages;this.documents=documents;}
9
+ public double Order=>10000;
10
+ [DllImport("kernel32.dll",EntryPoint="GetFinalPathNameByHandleW",CharSet=CharSet.Unicode,SetLastError=true)]static extern uint FinalPath(SafeFileHandle handle,StringBuilder path,uint length,uint flags);
11
+ static string CanonicalFile(string path){using var handle=File.OpenHandle(path,FileMode.Open,FileAccess.Read,FileShare.ReadWrite|FileShare.Delete);var name=new StringBuilder(32768);uint length=FinalPath(handle,name,(uint)name.Capacity,0);if(length==0||length>=name.Capacity)throw new IOException("Could not authenticate the managed module's native path");return name.ToString();}
12
+ static bool SameFile(string? left,string right)=>left!=null&&string.Equals(CanonicalFile(left),CanonicalFile(right),StringComparison.OrdinalIgnoreCase);
13
+ static string Quote(string text){var b=new StringBuilder("\"");int slashes=0;foreach(char c in text){if(c=='\\'){slashes++;continue;}b.Append('\\',c=='"'?slashes*2+1:slashes);b.Append(c);slashes=0;}return b.Append('\\',slashes*2).Append('"').ToString();}
14
+ public void OnNewArgs(IAppCommandLineArgs args){var path=args.GetArgumentValue("--insight-plan");if(path is null)return;if(plan!=null)throw new InvalidOperationException("A private bridge accepts one operation");try{
15
+ if(new FileInfo(path).Length>16384)throw new InvalidOperationException("Plan exceeds its bound");plan=JsonSerializer.Deserialize<Plan>(File.ReadAllText(path))??throw new InvalidOperationException("Plan is missing");if(plan.Schema!=1)throw new InvalidOperationException("Private plan schema differs");if(!Guid.TryParse(plan.Nonce,out _))throw new InvalidOperationException("Private plan nonce is invalid");if(!Path.IsPathFullyQualified(plan.Input))throw new InvalidOperationException("Private plan input must be absolute");if(!Path.IsPathFullyQualified(plan.Result))throw new InvalidOperationException("Private plan result must be absolute");if(!string.Equals(Path.GetDirectoryName(Path.GetFullPath(plan.Result)),Path.GetDirectoryName(Path.GetFullPath(path)),StringComparison.OrdinalIgnoreCase))throw new InvalidOperationException("Private plan result must remain beside its plan");if(plan.Parameters.Length>32||plan.Arguments.Length>64)throw new InvalidOperationException("Private plan arrays exceed their bounds");
16
+ if(plan.Mode=="patch-engine"){PatchEngine();return;}if(plan.Mode=="edit-constant"){Edit();return;}if(plan.Mode!="debug")throw new InvalidOperationException("Unknown typed operation");
17
+ if(string.IsNullOrEmpty(plan.Module))plan.Module=plan.Input;if(!Path.IsPathFullyQualified(plan.Module)||Path.GetDirectoryName(plan.Module)!=Path.GetDirectoryName(plan.Input))throw new InvalidOperationException("The selected managed module must be a captured input companion");
18
+ var m=manager.Value;if(m.IsDebugging)throw new InvalidOperationException("A private debugger must start empty");
19
+ breakpoint=breakpoints.Value.Add(new DbgCodeBreakpointInfo(locations.Value.Create(ModuleId.Create(plan.Module),plan.Token,plan.Offset),new DbgCodeBreakpointSettings{IsEnabled=true}));if(breakpoint==null)throw new InvalidOperationException("Breakpoint could not be reserved");
20
+ m.MessageProcessExited+=(_,e)=>Note("process_exit:0x"+unchecked((uint)e.ExitCode).ToString("x8"));m.MessageModuleLoaded+=(_,e)=>Note("module:"+e.Module.Filename);m.MessageUserMessage+=(_,e)=>Note("engine:"+e.Message);m.MessageProgramMessage+=(_,e)=>Note("program:"+e.Message);m.DbgManagerMessage+=(_,e)=>Note(e.MessageKind+":"+e.Message);
21
+ m.MessageBoundBreakpoint+=(_,e)=>{if(e.BoundBreakpoint.Breakpoint==breakpoint){paused=e.Thread;e.Pause=true;}};
22
+ m.ProcessPaused+=(_,e)=>{if(paused!=null&&!done){var thread=paused;paused=null;try{Snapshot(thread);}catch(Exception error){Fail(error);}}};
23
+ m.IsDebuggingChanged+=(_,_)=>{if(!m.IsDebugging&&started){if(!done)Fail(new InvalidOperationException("Debuggee exited before the selected breakpoint"));Quit(done?0:70);}};
24
+ deadline=new System.Threading.Timer(_=>m.Dispatcher.BeginInvoke(()=>Fail(new TimeoutException("Private debugger deadline exceeded"))),null,TimeSpan.FromSeconds(45),Timeout.InfiniteTimeSpan);
25
+ CorDebugStartDebuggingOptions options=plan.Runtime=="framework"?new DotNetFrameworkStartDebuggingOptions():plan.Runtime=="core"?new DotNetStartDebuggingOptions{UseHost=false}:throw new InvalidOperationException("Select framework or core runtime");options.Filename=plan.Input;options.CommandLine=string.Join(" ",plan.Arguments.Select(Quote));options.WorkingDirectory=Path.GetDirectoryName(plan.Input);options.BreakKind=PredefinedBreakKinds.DontBreak;started=true;var error=m.Start(options);if(error!=null)throw new InvalidOperationException(error);
26
+ }catch(Exception error){Console.Error.WriteLine(error.ToString());try{if(Path.IsPathFullyQualified(path))File.WriteAllText(path+".bridge-error.txt",error.ToString());}catch{}Fail(error);}}
27
+ void PatchEngine(){var p=plan!;const string original="13e0c4ea5396d071cdc7e31f0e5e9036c51da734a00b27d9d3dfeda9fa5b722f";
28
+ string Hash(string file)=>Convert.ToHexStringLower(SHA256.HashData(File.ReadAllBytes(file)));
29
+ if(Hash(p.Input)!=original||!Path.IsPathFullyQualified(p.Output)||File.Exists(p.Output)||!Path.IsPathFullyQualified(p.BuildKey)||Hash(p.BuildKey)!="6f84725f0755f4428cc8c95c5d1d0997445a057266bf810dc090607d4a2d0ae6")throw new InvalidOperationException("Pinned engine, public upstream build key and a new output are required");
30
+ using(var module=ModuleDefMD.Load(p.Input)){var key=new StrongNameKey(File.ReadAllBytes(p.BuildKey));if(!module.IsStrongNameSigned||!module.Assembly.PublicKey.Data.SequenceEqual(key.PublicKey))throw new InvalidOperationException("Upstream public build key does not match the engine identity");
31
+ var method=module.GetTypes().Single(t=>t.FullName=="dndbg.Engine.NativeMethods").Methods.Single(m=>m.Name=="LoadLibraryEx");var map=method.ImplMap??throw new InvalidOperationException("Native loader import is absent");
32
+ if(map.Name!="LoadLibraryEx"||map.Module.Name!="kernel32"||!map.IsCharSetAnsi||method.ParamDefs.Single(d=>d.Sequence==1).MarshalType?.NativeType!=NativeType.LPStr)throw new InvalidOperationException("Upstream native loader declaration changed");
33
+ map.Name="LoadLibraryExW";map.Attributes=(map.Attributes&~PInvokeAttributes.CharSetMask)|PInvokeAttributes.CharSetUnicode|PInvokeAttributes.NoMangle;method.ParamDefs.Single(d=>d.Sequence==1).MarshalType=new MarshalType(NativeType.LPWStr);
34
+ var options=new ModuleWriterOptions(module);options.MetadataOptions.Flags|=MetadataFlags.PreserveAll;options.PEHeadersOptions.TimeDateStamp=0;options.InitializeStrongNameSigning(module,key);module.Write(p.Output,options);
35
+ using(var check=ModuleDefMD.Load(p.Output)){var rewritten=check.ResolveToken(method.MDToken) as MethodDef;if(check.Assembly.FullName!=module.Assembly.FullName||!check.IsStrongNameSigned||rewritten?.ImplMap?.Name!="LoadLibraryExW"||rewritten.ParamDefs.Single(d=>d.Sequence==1).MarshalType?.NativeType!=NativeType.LPWStr)throw new InvalidOperationException("Rewritten native loader failed identity/readback verification");}
36
+ }Save(new{state="completed",mode=p.Mode,beforeSha256=original,afterSha256=Hash(p.Output),unicodeLoader=true,strongNameIdentityPreserved=true});Quit(0);
37
+ }
38
+ void Edit(){var p=plan!;if(p.ExpectedConstant is null||p.ReplacementConstant is null||!Path.IsPathFullyQualified(p.Output)||File.Exists(p.Output)||Path.GetFullPath(p.Output)==Path.GetFullPath(p.Input))throw new InvalidOperationException("A new output and explicit expected/replacement constants are required");
39
+ var document=documents.Value.TryGetOrCreate(DsDocumentInfo.CreateDocument(p.Input))??throw new InvalidOperationException("dnSpy could not load the document");var module=document.ModuleDef??throw new InvalidOperationException("No managed module");var method=module.ResolveToken(p.Token) as MethodDef??throw new InvalidOperationException("Token is not a method");var instruction=method.Body?.Instructions.SingleOrDefault(i=>i.Offset==p.Offset)??throw new InvalidOperationException("No IL instruction at the selected offset");if(!instruction.IsLdcI4()||instruction.GetLdcI4Value()!=p.ExpectedConstant)throw new InvalidOperationException("Expected IL constant changed");instruction.OpCode=OpCodes.Ldc_I4;instruction.Operand=p.ReplacementConstant.Value;module.Write(p.Output);Save(new{state="completed",mode=p.Mode,method=method.FullName,token=p.Token,offset=p.Offset,before=p.ExpectedConstant,after=p.ReplacementConstant,editorDocumentLoaded=true});Quit(0);
40
+ }
41
+ void Snapshot(DbgThread thread){var p=plan!;var frames=thread.GetFrames(64);try{var frame=frames.FirstOrDefault(f=>f.FunctionToken==p.Token&&SameFile(f.Module?.Filename,p.Module))??throw new InvalidOperationException("Selected breakpoint frame is unavailable");var runtime=frame.Runtime.GetDotNetRuntime();var values=runtime.Dispatcher.Invoke(()=>{
42
+ var context=languages.Value.GetCurrentLanguage(frame.Runtime.RuntimeKindGuid).CreateContext(frame);try{var info=new DbgEvaluationInfo(context,frame);return p.Parameters.Select(index=>{var value=runtime.GetParameterValue(info,index);if(!value.IsNormalResult||value.Value==null)throw new InvalidOperationException(value.ErrorMessage??"Parameter unavailable");using(value.Value){var raw=value.Value.GetRawValue();if(!raw.HasRawValue)throw new InvalidOperationException("Parameter has no primitive raw value");var text=Convert.ToString(raw.RawValue,CultureInfo.InvariantCulture)??"";if(text.Length>4096)throw new InvalidOperationException("Parameter value exceeds its bound");return new{index,type=value.Value.Type.FullName,value=text};}}).ToArray();}finally{context.Close();}});
43
+ Save(new{state="completed",mode=p.Mode,pid=thread.Process.Id,thread=thread.Id,token=p.Token,offset=frame.FunctionOffset,parameters=values,nativeMessages=Messages(),frames=frames.Select(f=>new{token=f.FunctionToken,offset=f.FunctionOffset,module=f.Module?.Filename}).ToArray()});Quit(0);
44
+ }finally{foreach(var frame in frames)frame.Close();}}
45
+ void Note(string value){lock(messages){if(messages.Count==64)messages.Dequeue();messages.Enqueue(value.Length>4096?value.Substring(0,4096):value);}}
46
+ string[] Messages(){lock(messages)return messages.ToArray();}
47
+ void Save(object data){if(done)return;using(var file=new FileStream(plan!.Result,FileMode.CreateNew,FileAccess.Write,FileShare.Read)){JsonSerializer.Serialize(file,new{schema=1,nonce=plan.Nonce,data});file.Flush(true);}done=true;deadline?.Dispose();}
48
+ void Fail(Exception error){if(done)return;try{if(plan!=null)Save(new{state="failed",error=error.Message,nativeMessages=Messages()});}finally{Quit(70);}}
49
+ // One-shot results are flushed first. The native owned Job Object terminates remaining debuggees.
50
+ // Avoid upstream asynchronous UI teardown reading metadata after the engine has disposed it.
51
+ static void Quit(int code)=>Environment.Exit(code);
52
+ }
53
+ [dnSpy.Contracts.Extension.ExportExtension]
54
+ sealed class ExtensionEntry:dnSpy.Contracts.Extension.IExtension {
55
+ public IEnumerable<string> MergedResourceDictionaries=>[];
56
+ public dnSpy.Contracts.Extension.ExtensionInfo ExtensionInfo=>new(){ShortDescription="Insight typed managed debugger and copy editor"};
57
+ public void OnEvent(dnSpy.Contracts.Extension.ExtensionEvent value,object? argument){}
58
+ }
@@ -0,0 +1,13 @@
1
+ <Project Sdk="Microsoft.NET.Sdk">
2
+ <PropertyGroup><TargetFramework>net10.0-windows</TargetFramework><UseWPF>true</UseWPF><EnableWindowsTargeting>true</EnableWindowsTargeting><AssemblyName>Insight.DnSpy.x</AssemblyName><Nullable>enable</Nullable><ImplicitUsings>enable</ImplicitUsings><Deterministic>true</Deterministic><DebugType>none</DebugType><RestorePackagesWithLockFile>true</RestorePackagesWithLockFile></PropertyGroup>
3
+ <ItemGroup>
4
+ <Reference Include="dnSpy.Contracts.DnSpy"><HintPath>$(DnSpyRuntime)/dnSpy.Contracts.DnSpy.dll</HintPath><Private>false</Private></Reference>
5
+ <Reference Include="dnSpy.Contracts.Logic"><HintPath>$(DnSpyRuntime)/dnSpy.Contracts.Logic.dll</HintPath><Private>false</Private></Reference>
6
+ <Reference Include="dnSpy.Contracts.Debugger"><HintPath>$(DnSpyRuntime)/dnSpy.Contracts.Debugger.dll</HintPath><Private>false</Private></Reference>
7
+ <Reference Include="dnSpy.Contracts.Debugger.DotNet"><HintPath>$(DnSpyRuntime)/dnSpy.Contracts.Debugger.DotNet.dll</HintPath><Private>false</Private></Reference>
8
+ <Reference Include="dnSpy.Contracts.Debugger.DotNet.CorDebug"><HintPath>$(DnSpyRuntime)/dnSpy.Contracts.Debugger.DotNet.CorDebug.dll</HintPath><Private>false</Private></Reference>
9
+ <Reference Include="dnSpy.Debugger.DotNet.Metadata"><HintPath>$(DnSpyRuntime)/dnSpy.Debugger.DotNet.Metadata.dll</HintPath><Private>false</Private></Reference>
10
+ <Reference Include="dnlib"><HintPath>$(DnSpyRuntime)/dnlib.dll</HintPath><Private>false</Private></Reference>
11
+ <Reference Include="System.ComponentModel.Composition"><HintPath>$(DnSpyRuntime)/System.ComponentModel.Composition.dll</HintPath><Private>false</Private></Reference>
12
+ </ItemGroup>
13
+ </Project>
@@ -0,0 +1 @@
1
+ <configuration><packageSources><clear/><add key="nuget.org" value="https://api.nuget.org/v3/index.json" /></packageSources></configuration>
@@ -0,0 +1,26 @@
1
+ # Local Unicode loader correction
2
+
3
+ Pinned dnSpyEx 6.6.0 (`e2bada24b1c63683f41bdc0ae2b0119c686ce88a`)
4
+ uses an ANSI `LoadLibraryEx` declaration in
5
+ `Extensions/dnSpy.Debugger/dnSpy.Debugger.DotNet.CorDebug/dndbg/Engine/NativeMethods.cs`.
6
+ Its Core debugger consequently cannot load dbgshim from a Unicode installation path.
7
+
8
+ The first-party typed extension locally rewrites only the pinned GPL engine's import
9
+ into `LoadLibraryExW`, Unicode charset, exact spelling and LPWStr first argument.
10
+ It preserves metadata tokens, assembly identity and strong-name signing. The bundled
11
+ 596-byte `upstream-public-build.snk` is dnSpy's intentionally public reproducible source
12
+ build key, NOT a secret credential. Original source:
13
+ https://github.com/dnSpyEx/dnSpy/blob/e2bada24b1c63683f41bdc0ae2b0119c686ce88a/dnSpy.snk
14
+ SHA256: 6f84725f0755f4428cc8c95c5d1d0997445a057266bf810dc090607d4a2d0ae6.
15
+ The readback verifies the original public key matches before signing and the assembly
16
+ identity/import after writing. A different input engine or key is refused.
17
+
18
+ Preparation executes once under the native owned Job; the original engine is replaced
19
+ only after that bootstrap process exits. Managed software is prepared in installation
20
+ staging. External software remains byte-for-byte unchanged: only the 867 known pinned
21
+ vendor files are copied into owned installation storage, prepared and fingerprinted.
22
+ Both external originals and the owned execution tree are checked before every use.
23
+ Uninstall removes the owned copy and preserves the external original and research.
24
+ The upstream archive is cached unmodified. No modified vendor DLL is redistributed.
25
+ The upstream GPL text and corresponding source remain identified by the vendor bundle
26
+ and the pinned source repository. The patch logic itself is supplied as Bridge.cs.
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 1,
3
+ "dependencies": {
4
+ "net10.0-windows7.0": {}
5
+ }
6
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "schema": 1,
3
+ "sdk": "10.0.303",
4
+ "target": "net10.0-windows",
5
+ "sourceLicense": "MIT",
6
+ "inputs": {
7
+ "Bridge.cs": "09b58439dc85dfdc15a1c0d578e133d8a43383929b39ee29f1c83937fcb4b1cb",
8
+ "Insight.DnSpy.csproj": "006adc7b2b8090d6a7273a00805aab82b1d496f33542d8cdf6216412018801e9",
9
+ "NuGet.Config": "17f8588bd0874138a10e92eb9efee6e346a173591124ab57872f019475f8f81a",
10
+ "packages.lock.json": "3ea8c3864c8f23b39364f9f40beb868ce4d8ecb62c5a25188dca037417beed3b",
11
+ "upstream-public-build.snk": "6f84725f0755f4428cc8c95c5d1d0997445a057266bf810dc090607d4a2d0ae6",
12
+ "vendor-files.json": "692277fde179ae44574ec115cdfdbb685fccbb1c2a489117d26993c413a90d1a"
13
+ },
14
+ "contracts": {
15
+ "dnSpy.Contracts.DnSpy.dll": "1b883b87bb52dad1b1ef677ad7e80e288df2cdf913c791f7bd3072a36e2839e2",
16
+ "dnSpy.Contracts.Logic.dll": "871b92de3f8dbde673c2a97a0644711acc200b36f5047479e379cc1b2877e56d",
17
+ "dnSpy.Contracts.Debugger.dll": "ae4959c879de0542a3da9fc41038799ab8b3f5a49a9b196aa93592f6a170121d",
18
+ "dnSpy.Contracts.Debugger.DotNet.dll": "d646e9daa14f6013bbdcaa3527b14e71da5a046e03a50cfd067d77f493bc0637",
19
+ "dnSpy.Contracts.Debugger.DotNet.CorDebug.dll": "a719d08143b03e327eb98618e209efdfd790ec611a91f89429d85e647f36e755",
20
+ "dnSpy.Debugger.DotNet.Metadata.dll": "360ef98e9d0c222d6c52c2c4573ea09098dad147f59208e60a9eb94267959f57",
21
+ "dnlib.dll": "3b88e0948e2a6c49e5372c7e7d27817f5d2fb7ffed949b40cc98a2e5037b73ef",
22
+ "System.ComponentModel.Composition.dll": "b2365dd9e0ced7cfa274d44ff668b8b0df28d4417b8e5e660e1c82df1239d7d8"
23
+ },
24
+ "sha256": "99bb8ddb2c771d68d6d95beb0b90bc69188a22d42556663929bf9d24b5dc61b8",
25
+ "size": 37376,
26
+ "reproducible": true
27
+ }