File: wmi-exec.nasl

package info (click to toggle)
openvas-scanner 23.40.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 22,692 kB
  • sloc: ansic: 41,669; xml: 6,251; pascal: 3,723; yacc: 1,287; sh: 1,101; makefile: 333; sql: 282; javascript: 12
file content (13 lines) | stat: -rw-r--r-- 566 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
# SPDX-FileCopyrightText: 2025 Greenbone AG
#
# SPDX-License-Identifier: GPL-2.0-or-later WITH x11vnc-openssl-exception

login       = string( get_kb_item( "KRB5/login_filled/0" ) );
password    = string( get_kb_item( "KRB5/password_filled/0" ) );
realm = string( get_kb_item( "KRB5/realm_filled/0" ) );
kdc         = string( get_kb_item( "KRB5/kdc_filled/0" ) );
host        = ip_reverse_lookup();
cmd = 'powershell -Command "& {Get-Process}"';

result = win_cmd_exec(cmd:cmd, password:password, username:login, realm: realm, kdc: kdc, host:host);
display(result);