Files
Dwi Siswanto ce50479fc3 test(js): add goexec tests
Signed-off-by: Dwi Siswanto <git@dw1.io>
2026-05-11 03:58:16 +07:00

40 lines
940 B
YAML

id: javascript-wmi-command
info:
name: JavaScript WMI Helper Command
author: pdteam
severity: info
javascript:
- code: |
const wmi = require("nuclei/wmi");
const auth = wmi.Auth.password("CORP\\auditor", "wmi-command-secret");
const client = new wmi.Client("203.0.113.10", auth);
const result = client.command("whoami", { timeout: 1, output: false });
Export(to_json(result));
args:
Host: "{{Host}}"
matchers-condition: and
matchers:
- type: dsl
dsl:
- success == true
- type: word
part: response
condition: and
words:
- "module"
- "wmi"
- "method"
- "command"
- "target"
- "203.0.113.10"
- "ok"
- "false"
- "network policy"
- type: word
part: response
negative: true
words:
- "wmi-command-secret"