Microsoft Windows Logged On Users Reporter
Microsoft Windows Logged On Users Reporter reports users as internal host tags.
#%NASL_MIN_LEVEL 80900
##
# (C) Tenable, Inc.
##
include('compat.inc');
if (description)
{
script_id(382036);
script_version("1.2");
script_set_attribute(attribute:"plugin_modification_date", value:"2026/11/24");
script_name(english:"Microsoft Windows Logged On Users Reporter");
script_set_attribute(attribute:"synopsis", value:
"Reports Windows logged on users as internal host tags.");
script_set_attribute(attribute:"description", value:
"This plugin reports Windows logged on users as a structured internal host tag, as collected by a separate plugin.");
script_set_attribute(attribute:"solution", value:"n/a");
script_set_attribute(attribute:"plugin_publication_date", value:"2026/11/17");
script_set_attribute(attribute:"plugin_type", value:"summary");
script_set_attribute(attribute:"agent", value:"windows");
script_set_attribute(attribute:"always_run", value:TRUE);
script_end_attributes();
script_category(ACT_END);
script_family(english:"Windows");
script_copyright(english:"This script is Copyright (C) 2026 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_require_keys("SMB/loggedon_users");
exit(0);
}
include('debug.inc');
include('structured_data_credential_exposure.inc');
var exposure, identity, match, sid, domain, username, has_domain, has_username;
var users = get_kb_list('SMB/loggedon_users/*/logged_on');
structured_data_credential_exposure.set('exposures', []);
if (!empty_or_null(users))
{
foreach var key (sort(keys(users)))
{
# this plugin consumes KB entries set by smb_loggedon_users.nasl
match = pregmatch(pattern:'^SMB/loggedon_users/([^/]+)/logged_on$', string:key);
if (isnull(match) || isnull(match[1])) continue;
sid = match[1];
exposure = {
'source' : 'lsass.exe',
'source_type' : 'PROCESS_MEMORY',
'scope' : 'USER',
'user' : sid
};
domain = get_kb_item('SMB/loggedon_users/' + sid + '/domain');
username = get_kb_item('SMB/loggedon_users/' + sid + '/username');
has_domain = !empty_or_null(domain);
has_username = !empty_or_null(username);
if (has_domain || has_username)
{
identity = {};
if (has_domain) identity['domain'] = domain;
if (has_username) identity['username'] = username;
exposure['associated_identity'] = identity;
}
structured_data_credential_exposure.append('exposures', exposure);
}
}
structured_data_credential_exposure.report_internal();
security_report_v4(port:0, severity:SECURITY_NOTE);
var FLATLINE_TEST = !isnull(get_kb_item('flatline/TEST'));
if (FLATLINE_TEST)
{
dbg::enable();
dbg::set_log_level(1);
var sd_data = structured_data_credential_exposure.data;
var output = '';
foreach var exposure_entry (sd_data['exposures'])
{
output += 'source_type: ' + string(exposure_entry['source_type']) + '.\n';
output += 'source: ' + string(exposure_entry['source']) + '.\n';
output += 'scope: ' + string(exposure_entry['scope']) + '.\n';
output += 'user: ' + string(exposure_entry['user']) + '.\n';
output += 'domain: ' + string(exposure_entry['associated_identity']['domain']) + '.\n';
output += 'username: ' + string(exposure_entry['associated_identity']['username']) + '.\n';
}
dbg::detailed_log(lvl:1, src:SCRIPT_NAME, msg:output);
}
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
24 Nov 2026 00:00Current
5.9Medium risk
Vulners AI Score5.9