mirror of
https://github.com/projectdiscovery/nuclei
synced 2026-06-08 16:50:47 +00:00
ce50479fc3
Signed-off-by: Dwi Siswanto <git@dw1.io>
40 lines
940 B
YAML
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"
|