windows-exe-decompiler-mcp-server 0.1.0
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.
- package/CODEX_INSTALLATION.md +69 -0
- package/COPILOT_INSTALLATION.md +77 -0
- package/LICENSE +21 -0
- package/README.md +314 -0
- package/bin/windows-exe-decompiler-mcp-server.js +3 -0
- package/dist/analysis-provenance.d.ts +184 -0
- package/dist/analysis-provenance.js +74 -0
- package/dist/analysis-task-runner.d.ts +31 -0
- package/dist/analysis-task-runner.js +160 -0
- package/dist/artifact-inventory.d.ts +23 -0
- package/dist/artifact-inventory.js +175 -0
- package/dist/cache-manager.d.ts +128 -0
- package/dist/cache-manager.js +454 -0
- package/dist/confidence-semantics.d.ts +66 -0
- package/dist/confidence-semantics.js +122 -0
- package/dist/config.d.ts +335 -0
- package/dist/config.js +193 -0
- package/dist/database.d.ts +227 -0
- package/dist/database.js +601 -0
- package/dist/decompiler-worker.d.ts +441 -0
- package/dist/decompiler-worker.js +1962 -0
- package/dist/dynamic-trace.d.ts +95 -0
- package/dist/dynamic-trace.js +629 -0
- package/dist/env-validator.d.ts +15 -0
- package/dist/env-validator.js +249 -0
- package/dist/error-handler.d.ts +28 -0
- package/dist/error-handler.example.d.ts +22 -0
- package/dist/error-handler.example.js +141 -0
- package/dist/error-handler.js +139 -0
- package/dist/ghidra-analysis-status.d.ts +49 -0
- package/dist/ghidra-analysis-status.js +178 -0
- package/dist/ghidra-config.d.ts +134 -0
- package/dist/ghidra-config.js +464 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +200 -0
- package/dist/job-queue.d.ts +169 -0
- package/dist/job-queue.js +407 -0
- package/dist/logger.d.ts +106 -0
- package/dist/logger.js +176 -0
- package/dist/policy-guard.d.ts +115 -0
- package/dist/policy-guard.js +243 -0
- package/dist/process-output.d.ts +15 -0
- package/dist/process-output.js +90 -0
- package/dist/prompts/function-explanation-review.d.ts +5 -0
- package/dist/prompts/function-explanation-review.js +64 -0
- package/dist/prompts/semantic-name-review.d.ts +5 -0
- package/dist/prompts/semantic-name-review.js +63 -0
- package/dist/runtime-correlation.d.ts +34 -0
- package/dist/runtime-correlation.js +279 -0
- package/dist/runtime-paths.d.ts +3 -0
- package/dist/runtime-paths.js +11 -0
- package/dist/selection-diff.d.ts +667 -0
- package/dist/selection-diff.js +53 -0
- package/dist/semantic-name-suggestion-artifacts.d.ts +116 -0
- package/dist/semantic-name-suggestion-artifacts.js +314 -0
- package/dist/server.d.ts +129 -0
- package/dist/server.js +578 -0
- package/dist/tools/artifact-read.d.ts +235 -0
- package/dist/tools/artifact-read.js +317 -0
- package/dist/tools/artifacts-diff.d.ts +728 -0
- package/dist/tools/artifacts-diff.js +304 -0
- package/dist/tools/artifacts-list.d.ts +515 -0
- package/dist/tools/artifacts-list.js +389 -0
- package/dist/tools/attack-map.d.ts +290 -0
- package/dist/tools/attack-map.js +519 -0
- package/dist/tools/cache-observability.d.ts +4 -0
- package/dist/tools/cache-observability.js +36 -0
- package/dist/tools/code-function-cfg.d.ts +50 -0
- package/dist/tools/code-function-cfg.js +102 -0
- package/dist/tools/code-function-decompile.d.ts +55 -0
- package/dist/tools/code-function-decompile.js +103 -0
- package/dist/tools/code-function-disassemble.d.ts +43 -0
- package/dist/tools/code-function-disassemble.js +185 -0
- package/dist/tools/code-function-explain-apply.d.ts +255 -0
- package/dist/tools/code-function-explain-apply.js +225 -0
- package/dist/tools/code-function-explain-prepare.d.ts +535 -0
- package/dist/tools/code-function-explain-prepare.js +276 -0
- package/dist/tools/code-function-explain-review.d.ts +397 -0
- package/dist/tools/code-function-explain-review.js +589 -0
- package/dist/tools/code-function-rename-apply.d.ts +248 -0
- package/dist/tools/code-function-rename-apply.js +220 -0
- package/dist/tools/code-function-rename-prepare.d.ts +506 -0
- package/dist/tools/code-function-rename-prepare.js +279 -0
- package/dist/tools/code-function-rename-review.d.ts +574 -0
- package/dist/tools/code-function-rename-review.js +761 -0
- package/dist/tools/code-functions-list.d.ts +37 -0
- package/dist/tools/code-functions-list.js +91 -0
- package/dist/tools/code-functions-rank.d.ts +34 -0
- package/dist/tools/code-functions-rank.js +90 -0
- package/dist/tools/code-functions-reconstruct.d.ts +2725 -0
- package/dist/tools/code-functions-reconstruct.js +2807 -0
- package/dist/tools/code-functions-search.d.ts +39 -0
- package/dist/tools/code-functions-search.js +90 -0
- package/dist/tools/code-reconstruct-export.d.ts +1212 -0
- package/dist/tools/code-reconstruct-export.js +4002 -0
- package/dist/tools/code-reconstruct-plan.d.ts +274 -0
- package/dist/tools/code-reconstruct-plan.js +342 -0
- package/dist/tools/dotnet-metadata-extract.d.ts +541 -0
- package/dist/tools/dotnet-metadata-extract.js +355 -0
- package/dist/tools/dotnet-reconstruct-export.d.ts +567 -0
- package/dist/tools/dotnet-reconstruct-export.js +1151 -0
- package/dist/tools/dotnet-types-list.d.ts +325 -0
- package/dist/tools/dotnet-types-list.js +201 -0
- package/dist/tools/dynamic-dependencies.d.ts +115 -0
- package/dist/tools/dynamic-dependencies.js +213 -0
- package/dist/tools/dynamic-memory-import.d.ts +10 -0
- package/dist/tools/dynamic-memory-import.js +567 -0
- package/dist/tools/dynamic-trace-import.d.ts +10 -0
- package/dist/tools/dynamic-trace-import.js +235 -0
- package/dist/tools/entrypoint-fallback-disasm.d.ts +30 -0
- package/dist/tools/entrypoint-fallback-disasm.js +89 -0
- package/dist/tools/ghidra-analyze.d.ts +88 -0
- package/dist/tools/ghidra-analyze.js +208 -0
- package/dist/tools/ghidra-health.d.ts +37 -0
- package/dist/tools/ghidra-health.js +212 -0
- package/dist/tools/ioc-export.d.ts +209 -0
- package/dist/tools/ioc-export.js +542 -0
- package/dist/tools/packer-detect.d.ts +165 -0
- package/dist/tools/packer-detect.js +284 -0
- package/dist/tools/pe-exports-extract.d.ts +175 -0
- package/dist/tools/pe-exports-extract.js +253 -0
- package/dist/tools/pe-fingerprint.d.ts +234 -0
- package/dist/tools/pe-fingerprint.js +269 -0
- package/dist/tools/pe-imports-extract.d.ts +105 -0
- package/dist/tools/pe-imports-extract.js +245 -0
- package/dist/tools/report-generate.d.ts +157 -0
- package/dist/tools/report-generate.js +457 -0
- package/dist/tools/report-summarize.d.ts +2131 -0
- package/dist/tools/report-summarize.js +596 -0
- package/dist/tools/runtime-detect.d.ts +135 -0
- package/dist/tools/runtime-detect.js +247 -0
- package/dist/tools/sample-ingest.d.ts +94 -0
- package/dist/tools/sample-ingest.js +327 -0
- package/dist/tools/sample-profile-get.d.ts +183 -0
- package/dist/tools/sample-profile-get.js +121 -0
- package/dist/tools/sandbox-execute.d.ts +441 -0
- package/dist/tools/sandbox-execute.js +392 -0
- package/dist/tools/strings-extract.d.ts +375 -0
- package/dist/tools/strings-extract.js +314 -0
- package/dist/tools/strings-floss-decode.d.ts +143 -0
- package/dist/tools/strings-floss-decode.js +259 -0
- package/dist/tools/system-health.d.ts +434 -0
- package/dist/tools/system-health.js +446 -0
- package/dist/tools/task-cancel.d.ts +21 -0
- package/dist/tools/task-cancel.js +70 -0
- package/dist/tools/task-status.d.ts +27 -0
- package/dist/tools/task-status.js +106 -0
- package/dist/tools/task-sweep.d.ts +22 -0
- package/dist/tools/task-sweep.js +77 -0
- package/dist/tools/tool-help.d.ts +340 -0
- package/dist/tools/tool-help.js +261 -0
- package/dist/tools/yara-scan.d.ts +554 -0
- package/dist/tools/yara-scan.js +313 -0
- package/dist/types.d.ts +266 -0
- package/dist/types.js +41 -0
- package/dist/worker-pool.d.ts +204 -0
- package/dist/worker-pool.js +650 -0
- package/dist/workflows/deep-static.d.ts +104 -0
- package/dist/workflows/deep-static.js +276 -0
- package/dist/workflows/function-explanation-review.d.ts +655 -0
- package/dist/workflows/function-explanation-review.js +440 -0
- package/dist/workflows/reconstruct.d.ts +2053 -0
- package/dist/workflows/reconstruct.js +666 -0
- package/dist/workflows/semantic-name-review.d.ts +2418 -0
- package/dist/workflows/semantic-name-review.js +521 -0
- package/dist/workflows/triage.d.ts +659 -0
- package/dist/workflows/triage.js +1374 -0
- package/dist/workspace-manager.d.ts +150 -0
- package/dist/workspace-manager.js +411 -0
- package/ghidra_scripts/DecompileFunction.java +487 -0
- package/ghidra_scripts/DecompileFunction.py +150 -0
- package/ghidra_scripts/ExtractCFG.java +256 -0
- package/ghidra_scripts/ExtractCFG.py +233 -0
- package/ghidra_scripts/ExtractFunctions.java +442 -0
- package/ghidra_scripts/ExtractFunctions.py +101 -0
- package/ghidra_scripts/README.md +125 -0
- package/ghidra_scripts/SearchFunctionReferences.java +380 -0
- package/helpers/DotNetMetadataProbe/DotNetMetadataProbe.csproj +9 -0
- package/helpers/DotNetMetadataProbe/Program.cs +566 -0
- package/install-to-codex.ps1 +178 -0
- package/install-to-copilot.ps1 +303 -0
- package/package.json +101 -0
- package/requirements.txt +9 -0
- package/workers/requirements-dynamic.txt +11 -0
- package/workers/requirements.txt +8 -0
- package/workers/speakeasy_compat.py +175 -0
- package/workers/static_worker.py +5183 -0
- package/workers/yara_rules/default.yar +33 -0
- package/workers/yara_rules/malware_families.yar +93 -0
- package/workers/yara_rules/packers.yar +80 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Default YARA Rule Set
|
|
3
|
+
|
|
4
|
+
This is a basic rule set for testing purposes.
|
|
5
|
+
Contains simple rules to detect common patterns.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
rule Test_Rule
|
|
9
|
+
{
|
|
10
|
+
meta:
|
|
11
|
+
description = "Test rule for YARA scanning"
|
|
12
|
+
author = "MCP Server"
|
|
13
|
+
date = "2024-01-01"
|
|
14
|
+
|
|
15
|
+
strings:
|
|
16
|
+
$test_string = "This program cannot be run in DOS mode" ascii
|
|
17
|
+
|
|
18
|
+
condition:
|
|
19
|
+
$test_string
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
rule PE_File
|
|
23
|
+
{
|
|
24
|
+
meta:
|
|
25
|
+
description = "Detects PE files"
|
|
26
|
+
author = "MCP Server"
|
|
27
|
+
|
|
28
|
+
strings:
|
|
29
|
+
$mz = "MZ"
|
|
30
|
+
|
|
31
|
+
condition:
|
|
32
|
+
$mz at 0
|
|
33
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Malware Families YARA Rule Set
|
|
3
|
+
|
|
4
|
+
Rules to detect common malware families.
|
|
5
|
+
Note: These are simplified examples for testing purposes.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
rule Generic_Trojan
|
|
9
|
+
{
|
|
10
|
+
meta:
|
|
11
|
+
description = "Generic trojan detection based on suspicious API calls"
|
|
12
|
+
author = "MCP Server"
|
|
13
|
+
severity = "high"
|
|
14
|
+
|
|
15
|
+
strings:
|
|
16
|
+
$api1 = "CreateRemoteThread" ascii
|
|
17
|
+
$api2 = "VirtualAllocEx" ascii
|
|
18
|
+
$api3 = "WriteProcessMemory" ascii
|
|
19
|
+
$api4 = "OpenProcess" ascii
|
|
20
|
+
|
|
21
|
+
condition:
|
|
22
|
+
uint16(0) == 0x5A4D and 3 of ($api*)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
rule Suspicious_Network_Activity
|
|
26
|
+
{
|
|
27
|
+
meta:
|
|
28
|
+
description = "Detects suspicious network-related strings"
|
|
29
|
+
author = "MCP Server"
|
|
30
|
+
severity = "medium"
|
|
31
|
+
|
|
32
|
+
strings:
|
|
33
|
+
$url1 = /https?:\/\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/ ascii
|
|
34
|
+
$net1 = "InternetOpenA" ascii
|
|
35
|
+
$net2 = "InternetConnectA" ascii
|
|
36
|
+
$net3 = "HttpSendRequestA" ascii
|
|
37
|
+
|
|
38
|
+
condition:
|
|
39
|
+
uint16(0) == 0x5A4D and ($url1 or 2 of ($net*))
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
rule Keylogger_Indicators
|
|
43
|
+
{
|
|
44
|
+
meta:
|
|
45
|
+
description = "Detects potential keylogger behavior"
|
|
46
|
+
author = "MCP Server"
|
|
47
|
+
severity = "high"
|
|
48
|
+
|
|
49
|
+
strings:
|
|
50
|
+
$key1 = "GetAsyncKeyState" ascii
|
|
51
|
+
$key2 = "GetKeyState" ascii
|
|
52
|
+
$key3 = "SetWindowsHookEx" ascii
|
|
53
|
+
$key4 = "WH_KEYBOARD" ascii
|
|
54
|
+
|
|
55
|
+
condition:
|
|
56
|
+
uint16(0) == 0x5A4D and 2 of ($key*)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
rule Ransomware_Indicators
|
|
60
|
+
{
|
|
61
|
+
meta:
|
|
62
|
+
description = "Detects potential ransomware indicators"
|
|
63
|
+
author = "MCP Server"
|
|
64
|
+
severity = "critical"
|
|
65
|
+
|
|
66
|
+
strings:
|
|
67
|
+
$ransom1 = "encrypted" nocase ascii
|
|
68
|
+
$ransom2 = "bitcoin" nocase ascii
|
|
69
|
+
$ransom3 = "decrypt" nocase ascii
|
|
70
|
+
$ransom4 = "ransom" nocase ascii
|
|
71
|
+
$crypto1 = "CryptEncrypt" ascii
|
|
72
|
+
$crypto2 = "CryptAcquireContext" ascii
|
|
73
|
+
|
|
74
|
+
condition:
|
|
75
|
+
uint16(0) == 0x5A4D and (2 of ($ransom*) and 1 of ($crypto*))
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
rule Persistence_Mechanism
|
|
79
|
+
{
|
|
80
|
+
meta:
|
|
81
|
+
description = "Detects persistence mechanisms"
|
|
82
|
+
author = "MCP Server"
|
|
83
|
+
severity = "medium"
|
|
84
|
+
|
|
85
|
+
strings:
|
|
86
|
+
$reg1 = "Software\\Microsoft\\Windows\\CurrentVersion\\Run" ascii
|
|
87
|
+
$reg2 = "HKEY_LOCAL_MACHINE" ascii
|
|
88
|
+
$svc1 = "CreateServiceA" ascii
|
|
89
|
+
$svc2 = "OpenSCManagerA" ascii
|
|
90
|
+
|
|
91
|
+
condition:
|
|
92
|
+
uint16(0) == 0x5A4D and (any of ($reg*) or any of ($svc*))
|
|
93
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Packers YARA Rule Set
|
|
3
|
+
|
|
4
|
+
Rules to detect common packers and protectors.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
rule UPX_Packer
|
|
8
|
+
{
|
|
9
|
+
meta:
|
|
10
|
+
description = "Detects UPX packer"
|
|
11
|
+
author = "MCP Server"
|
|
12
|
+
reference = "https://upx.github.io/"
|
|
13
|
+
|
|
14
|
+
strings:
|
|
15
|
+
$upx1 = "UPX0" ascii
|
|
16
|
+
$upx2 = "UPX1" ascii
|
|
17
|
+
$upx3 = "UPX!" ascii
|
|
18
|
+
|
|
19
|
+
condition:
|
|
20
|
+
uint16(0) == 0x5A4D and any of ($upx*)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
rule Themida_Packer
|
|
24
|
+
{
|
|
25
|
+
meta:
|
|
26
|
+
description = "Detects Themida/WinLicense packer"
|
|
27
|
+
author = "MCP Server"
|
|
28
|
+
|
|
29
|
+
strings:
|
|
30
|
+
$themida1 = "Themida" ascii
|
|
31
|
+
$themida2 = "WinLicense" ascii
|
|
32
|
+
$themida3 = { 8B 45 ?? 8B 4D ?? 51 50 E8 }
|
|
33
|
+
|
|
34
|
+
condition:
|
|
35
|
+
uint16(0) == 0x5A4D and any of ($themida*)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
rule VMProtect_Packer
|
|
39
|
+
{
|
|
40
|
+
meta:
|
|
41
|
+
description = "Detects VMProtect packer"
|
|
42
|
+
author = "MCP Server"
|
|
43
|
+
|
|
44
|
+
strings:
|
|
45
|
+
$vmp1 = ".vmp0" ascii
|
|
46
|
+
$vmp2 = ".vmp1" ascii
|
|
47
|
+
$vmp3 = "VMProtect" ascii
|
|
48
|
+
|
|
49
|
+
condition:
|
|
50
|
+
uint16(0) == 0x5A4D and any of ($vmp*)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
rule ASPack_Packer
|
|
54
|
+
{
|
|
55
|
+
meta:
|
|
56
|
+
description = "Detects ASPack packer"
|
|
57
|
+
author = "MCP Server"
|
|
58
|
+
|
|
59
|
+
strings:
|
|
60
|
+
$aspack1 = "ASPack" ascii
|
|
61
|
+
$aspack2 = ".aspack" ascii
|
|
62
|
+
$aspack3 = { 60 E8 00 00 00 00 5D }
|
|
63
|
+
|
|
64
|
+
condition:
|
|
65
|
+
uint16(0) == 0x5A4D and any of ($aspack*)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
rule PECompact_Packer
|
|
69
|
+
{
|
|
70
|
+
meta:
|
|
71
|
+
description = "Detects PECompact packer"
|
|
72
|
+
author = "MCP Server"
|
|
73
|
+
|
|
74
|
+
strings:
|
|
75
|
+
$pec1 = "PECompact2" ascii
|
|
76
|
+
$pec2 = "PEC2" ascii
|
|
77
|
+
|
|
78
|
+
condition:
|
|
79
|
+
uint16(0) == 0x5A4D and any of ($pec*)
|
|
80
|
+
}
|