mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-20 06:56:17 -05:00
feat: prepare 3.0.0 release
This commit is contained in:
252 files changed
+26210
-7457
No files matched your search
@@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "gphip"
|
||||
rust-version.workspace = true
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
|
||||
[dependencies]
|
||||
gpapi = { path = "../gpapi" }
|
||||
anyhow.workspace = true
|
||||
askama.workspace = true
|
||||
chrono.workspace = true
|
||||
netdev.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
serde_urlencoded.workspace = true
|
||||
uuid = { workspace = true, features = ["v5"] }
|
||||
uzers.workspace = true
|
||||
xmltree.workspace = true
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,149 @@
|
||||
use std::{
|
||||
fs, io,
|
||||
os::unix::fs::{MetadataExt, PermissionsExt},
|
||||
path::Path,
|
||||
};
|
||||
|
||||
use gpapi::process::collection::CollectorCommands;
|
||||
|
||||
use super::SentinelInfo;
|
||||
|
||||
const SENTINELCTL: &str = "/Library/Sentinel/sentinel-agent.bundle/Contents/MacOS/sentinelctl";
|
||||
|
||||
pub(super) fn detect(commands: &CollectorCommands<'_>) -> io::Result<Option<SentinelInfo>> {
|
||||
if !trusted_cli(Path::new(SENTINELCTL)) {
|
||||
return Ok(None);
|
||||
}
|
||||
let Some(status) = run(commands, &["status"])? else {
|
||||
return Ok(None);
|
||||
};
|
||||
let Some(status) = parse_status(&status) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let real_time_protection = if status.active {
|
||||
let Some(scan_status) = run(commands, &["scan-on-write"])? else {
|
||||
return Ok(None);
|
||||
};
|
||||
let Some(enabled) = scan_status.trim().strip_prefix("scan-on-write:").and_then(parse_yes_no) else {
|
||||
return Ok(None);
|
||||
};
|
||||
enabled
|
||||
} else {
|
||||
false
|
||||
};
|
||||
let firewall_enabled = run(commands, &["firewall", "enabled"])?
|
||||
.as_deref()
|
||||
.and_then(parse_yes_no);
|
||||
Ok(Some(SentinelInfo {
|
||||
version: status.version,
|
||||
real_time_protection,
|
||||
firewall_enabled,
|
||||
}))
|
||||
}
|
||||
|
||||
fn trusted_cli(path: &Path) -> bool {
|
||||
path.ancestors().take_while(|part| part.as_os_str() != "/").all(|part| {
|
||||
let Ok(metadata) = fs::symlink_metadata(part) else {
|
||||
return false;
|
||||
};
|
||||
if metadata.uid() != 0 || metadata.permissions().mode() & 0o022 != 0 || metadata.file_type().is_symlink() {
|
||||
return false;
|
||||
}
|
||||
if part == path {
|
||||
metadata.is_file()
|
||||
} else {
|
||||
metadata.is_dir()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fn run(commands: &CollectorCommands<'_>, args: &[&str]) -> io::Result<Option<String>> {
|
||||
Ok(
|
||||
commands
|
||||
.run_path(Path::new(SENTINELCTL), args)?
|
||||
.filter(|output| output.status.success())
|
||||
.and_then(|output| String::from_utf8(output.stdout).ok()),
|
||||
)
|
||||
}
|
||||
|
||||
struct AgentStatus {
|
||||
version: String,
|
||||
active: bool,
|
||||
}
|
||||
|
||||
fn parse_status(output: &str) -> Option<AgentStatus> {
|
||||
let version = status_value(output, "Version:")?;
|
||||
if version.is_empty()
|
||||
|| version.len() > 64
|
||||
|| !version
|
||||
.chars()
|
||||
.all(|ch| ch.is_ascii_alphanumeric() || matches!(ch, '.' | '-' | '_'))
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
||||
let operational = parse_status_bool(output, "Agent Operational State:", "enabled", "disabled")?;
|
||||
let ready = parse_status_bool(output, "Ready:", "yes", "no")?;
|
||||
let protected = parse_status_bool(output, "Protection:", "enabled", "disabled")?;
|
||||
Some(AgentStatus {
|
||||
version: version.to_string(),
|
||||
active: operational && ready && protected,
|
||||
})
|
||||
}
|
||||
|
||||
fn status_value<'a>(output: &'a str, label: &str) -> Option<&'a str> {
|
||||
output
|
||||
.lines()
|
||||
.find_map(|line| line.trim().strip_prefix(label).map(str::trim))
|
||||
}
|
||||
|
||||
fn parse_status_bool(output: &str, label: &str, yes: &str, no: &str) -> Option<bool> {
|
||||
match status_value(output, label)? {
|
||||
value if value == yes => Some(true),
|
||||
value if value == no => Some(false),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn parse_yes_no(output: &str) -> Option<bool> {
|
||||
match output.trim() {
|
||||
"yes" => Some(true),
|
||||
"no" => Some(false),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn parses_running_agent_status() {
|
||||
let status = parse_status(
|
||||
"Agent\n Version: 25.3.4.8365\n Agent Operational State: enabled\n Ready: yes\n Protection: enabled\n",
|
||||
)
|
||||
.unwrap();
|
||||
assert_eq!(status.version, "25.3.4.8365");
|
||||
assert!(status.active);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rejects_unknown_agent_state() {
|
||||
assert!(parse_status("Version: 25.3.4.8365\nProtection: maybe\n").is_none());
|
||||
assert!(
|
||||
!parse_status("Version: 25.3.4.8365\nAgent Operational State: disabled\nReady: yes\nProtection: enabled\n")
|
||||
.unwrap()
|
||||
.active
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn parses_scan_and_firewall_states() {
|
||||
assert_eq!(
|
||||
parse_yes_no("scan-on-write:\tyes\n".trim().strip_prefix("scan-on-write:").unwrap()),
|
||||
Some(true)
|
||||
);
|
||||
assert_eq!(parse_yes_no("no\n"), Some(false));
|
||||
assert_eq!(parse_yes_no("unknown\n"), None);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
use std::{
|
||||
fs, io,
|
||||
os::unix::fs::{MetadataExt, PermissionsExt},
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
|
||||
use gpapi::process::collection::CollectorCommands;
|
||||
|
||||
use super::SentinelInfo;
|
||||
|
||||
const SENTINEL_DIR: &str = "/opt/sentinelone";
|
||||
|
||||
pub(super) fn detect(commands: &CollectorCommands<'_>) -> io::Result<Option<SentinelInfo>> {
|
||||
let Some(cli) = trusted_cli() else {
|
||||
return Ok(None);
|
||||
};
|
||||
let Some(version) = run(commands, &cli, &["version"])?.as_deref().and_then(parse_version) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let Some(agent_enabled) = run(commands, &cli, &["control", "status"])?
|
||||
.as_deref()
|
||||
.and_then(|status| parse_enabled(status, "Agent state"))
|
||||
else {
|
||||
return Ok(None);
|
||||
};
|
||||
let real_time_protection = if agent_enabled {
|
||||
let Some(policy) = run(commands, &cli, &["policy", "status"])? else {
|
||||
return Ok(None);
|
||||
};
|
||||
let (Some(on_write), Some(on_execute)) = (
|
||||
parse_enabled(&policy, "On-Write:"),
|
||||
parse_enabled(&policy, "On-Execute:"),
|
||||
) else {
|
||||
return Ok(None);
|
||||
};
|
||||
on_write || on_execute
|
||||
} else {
|
||||
false
|
||||
};
|
||||
Ok(Some(SentinelInfo {
|
||||
version,
|
||||
real_time_protection,
|
||||
firewall_enabled: None,
|
||||
}))
|
||||
}
|
||||
|
||||
fn trusted_cli() -> Option<PathBuf> {
|
||||
let agent_uid = uzers::get_user_by_name("sentinelone")?.uid();
|
||||
let agent_dir = Path::new(SENTINEL_DIR);
|
||||
if !trusted_dir(Path::new("/opt"), 0) {
|
||||
return None;
|
||||
}
|
||||
|
||||
let link = fs::symlink_metadata(agent_dir).ok()?;
|
||||
if link.file_type().is_symlink() && link.uid() != 0 {
|
||||
return None;
|
||||
}
|
||||
let resolved_dir = fs::canonicalize(agent_dir).ok()?;
|
||||
for ancestor in resolved_dir.ancestors().skip(1) {
|
||||
if !trusted_dir(ancestor, 0) {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
if !(trusted_dir(&resolved_dir, 0) || trusted_dir(&resolved_dir, agent_uid))
|
||||
|| !trusted_dir(&resolved_dir.join("bin"), 0)
|
||||
{
|
||||
return None;
|
||||
}
|
||||
|
||||
let cli = resolved_dir.join("bin/sentinelctl");
|
||||
let metadata = fs::symlink_metadata(&cli).ok()?;
|
||||
if !metadata.is_file()
|
||||
|| metadata.uid() != 0
|
||||
|| metadata.permissions().mode() & 0o022 != 0
|
||||
|| metadata.permissions().mode() & 0o111 == 0
|
||||
{
|
||||
return None;
|
||||
}
|
||||
Some(cli)
|
||||
}
|
||||
|
||||
fn trusted_dir(path: &Path, owner: u32) -> bool {
|
||||
let Ok(metadata) = fs::symlink_metadata(path) else {
|
||||
return false;
|
||||
};
|
||||
metadata.is_dir() && metadata.uid() == owner && metadata.permissions().mode() & 0o022 == 0
|
||||
}
|
||||
|
||||
fn run(commands: &CollectorCommands<'_>, cli: &Path, args: &[&str]) -> io::Result<Option<String>> {
|
||||
Ok(
|
||||
commands
|
||||
.run_path(cli, args)?
|
||||
.filter(|output| output.status.success())
|
||||
.and_then(|output| String::from_utf8(output.stdout).ok()),
|
||||
)
|
||||
}
|
||||
|
||||
fn parse_version(output: &str) -> Option<String> {
|
||||
let version = value(output, "Agent version:")?;
|
||||
if version.is_empty()
|
||||
|| version.len() > 64
|
||||
|| !version
|
||||
.chars()
|
||||
.all(|ch| ch.is_ascii_alphanumeric() || matches!(ch, '.' | '-' | '_'))
|
||||
{
|
||||
return None;
|
||||
}
|
||||
Some(version.to_string())
|
||||
}
|
||||
|
||||
fn parse_enabled(output: &str, label: &str) -> Option<bool> {
|
||||
match value(output, label)? {
|
||||
"Enabled" => Some(true),
|
||||
"Disabled" => Some(false),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
fn value<'a>(output: &'a str, label: &str) -> Option<&'a str> {
|
||||
output
|
||||
.lines()
|
||||
.find_map(|line| line.trim().strip_prefix(label).map(str::trim))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn parses_observed_agent_and_policy_status() {
|
||||
assert_eq!(
|
||||
parse_version("Agent version: 25.2.2.14\nSentinelCTL version: 25.2.2.14\n"),
|
||||
Some("25.2.2.14".into())
|
||||
);
|
||||
assert_eq!(parse_enabled("Agent state Enabled\n", "Agent state"), Some(true));
|
||||
assert_eq!(
|
||||
parse_enabled("On-Write: Enabled\nOn-Execute: Disabled\n", "On-Write:"),
|
||||
Some(true)
|
||||
);
|
||||
assert_eq!(
|
||||
parse_enabled("On-Write: Enabled\nOn-Execute: Disabled\n", "On-Execute:"),
|
||||
Some(false)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn rejects_unknown_or_invalid_status() {
|
||||
assert_eq!(parse_version("Agent version: 25.2.2.14\"/>\n"), None);
|
||||
assert_eq!(parse_enabled("Agent state Unknown\n", "Agent state"), None);
|
||||
assert_eq!(parse_enabled("On-Write: Unknown\n", "On-Write:"), None);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,333 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<hip-report name="hip-report">
|
||||
<md5-sum>{{ md5 }}</md5-sum>
|
||||
<user-name>{{ user_name }}</user-name>
|
||||
<domain>{{ host_info.domain }}.internal</domain>
|
||||
<host-name>{{ host_info.host_name }}</host-name>
|
||||
<host-id>{{ host_info.host_id }}</host-id>
|
||||
<ip-address>{{ host_info.default_ipv4() }}</ip-address>
|
||||
<ipv6-address>{{ host_info.default_ipv6() }}</ipv6-address>
|
||||
<generate-time>{{ generate_time }}</generate-time>
|
||||
<hip-report-version>4</hip-report-version>
|
||||
<categories>
|
||||
<entry name="host-info">
|
||||
<client-version>{{ client_version }}</client-version>
|
||||
<os>{{ host_info.os_version }}</os>
|
||||
<os-vendor>{{ host_info.os_vendor }}</os-vendor>
|
||||
<domain>{{ host_info.domain }}.internal</domain>
|
||||
<host-name>{{ host_info.host_name }}</host-name>
|
||||
<host-id>{{ host_info.host_id }}</host-id>
|
||||
<network-interface>
|
||||
{% for iface in host_info.network_interfaces.iter() -%}
|
||||
<entry name="{{ iface.name }}">
|
||||
<description>{{ iface.description }}</description>
|
||||
{% if let Some(mac) = iface.mac_address -%}
|
||||
<mac-address>{{ mac }}</mac-address>
|
||||
{% endif -%}
|
||||
{% if let Some(ipv4) = iface.ipv4 -%}
|
||||
<ip-address>
|
||||
<entry name="{{ ipv4 }}"/>
|
||||
</ip-address>
|
||||
{% endif -%}
|
||||
{% if let Some(ipv6) = iface.ipv6 -%}
|
||||
<ipv6-address>
|
||||
<entry name="{{ ipv6 }}"/>
|
||||
</ipv6-address>
|
||||
{% endif -%}
|
||||
</entry>
|
||||
{% endfor -%}
|
||||
</network-interface>
|
||||
</entry>
|
||||
{% if host_info.os_vendor == "Microsoft" -%}
|
||||
<entry name="antivirus">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="McAfee VirusScan Enterprise" version="8.8.0.1804" defver="8682.0" prodType="1" engver="5900.7806" osType="1" vendor="McAfee, Inc." dateday="{{ day }}" dateyear="{{ year }}" datemon="{{ month }}">
|
||||
</Prod>
|
||||
<real-time-protection>yes</real-time-protection>
|
||||
<last-full-scan-time>{{ generate_time }}</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="Windows Defender" version="4.11.15063.332" defver="1.245.683.0" prodType="1" engver="1.1.13804.0" osType="1" vendor="Microsoft Corp." dateday="{{ day }}" dateyear="{{ year }}" datemon="{{ month }}">
|
||||
</Prod>
|
||||
<real-time-protection>no</real-time-protection>
|
||||
<last-full-scan-time>n/a</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="anti-spyware">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="McAfee VirusScan Enterprise" version="8.8.0.1804" defver="8682.0" prodType="2" engver="5900.7806" osType="1" vendor="McAfee, Inc." dateday="{{ day }}" dateyear="{{ year }}" datemon="{{ month }}">
|
||||
</Prod>
|
||||
<real-time-protection>yes</real-time-protection>
|
||||
<last-full-scan-time>{{ generate_time }}</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="Windows Defender" version="4.11.15063.332" defver="1.245.683.0" prodType="2" engver="1.1.13804.0" osType="1" vendor="Microsoft Corp." dateday="{{ day }}" dateyear="{{ year }}" datemon="{{ month }}">
|
||||
</Prod>
|
||||
<real-time-protection>no</real-time-protection>
|
||||
<last-full-scan-time>n/a</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="disk-backup">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="Windows Backup and Restore" version="{{ host_info.software_version }}" vendor="Microsoft Corp.">
|
||||
</Prod>
|
||||
<last-backup-time>n/a</last-backup-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="disk-encryption">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="Windows Drive Encryption" version="{{ host_info.software_version }}" vendor="Microsoft Corp.">
|
||||
</Prod>
|
||||
<drives>
|
||||
<entry>
|
||||
<drive-name>C:\\</drive-name>
|
||||
<enc-state>full</enc-state>
|
||||
</entry>
|
||||
</drives>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="firewall">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="Microsoft Windows Firewall" version="10.0.22621.4830" vendor="Microsoft Corp.">
|
||||
</Prod>
|
||||
<is-enabled>yes</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="patch-management">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="McAfee ePolicy Orchestrator Agent" version="5.0.5.658" vendor="McAfee, Inc.">
|
||||
</Prod>
|
||||
<is-enabled>yes</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="Microsoft Windows Update Agent" version="{{ host_info.software_version }}" vendor="Microsoft Corp.">
|
||||
</Prod>
|
||||
<is-enabled>yes</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
<missing-patches/>
|
||||
</entry>
|
||||
{% elif host_info.os_vendor == "Apple" -%}
|
||||
<entry name="anti-malware">
|
||||
<list>
|
||||
{% if let Some(sentinel) = &host_info.sentinel %}
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="SentinelOne" name="Sentinel Agent" version="{{ sentinel.version }}" engver="" datemon="{{ month }}" dateday="{{ day }}" dateyear="{{ year }}" prodType="3" osType="4"/>
|
||||
<real-time-protection>{% if sentinel.real_time_protection %}yes{% else %}no{% endif %}</real-time-protection>
|
||||
<last-full-scan-time>n/a</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
{% endif -%}
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="Apple Inc." name="Xprotect" version="2167" defver="235000000000000" engver="" datemon="{{ month }}" dateday="{{ day }}" dateyear="{{ year }}" prodType="3" osType="4"/>
|
||||
<real-time-protection>yes</real-time-protection>
|
||||
<last-full-scan-time>n/a</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="Apple Inc." name="Gatekeeper" version="{{ host_info.software_version }}" defver="" engver="" datemon="{{ month }}" dateday="{{ day }}" dateyear="{{ year }}" prodType="3" osType="4"/>
|
||||
<real-time-protection>yes</real-time-protection>
|
||||
<last-full-scan-time>n/a</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="disk-backup">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="Apple Inc." name="Time Machine" version="1.3"/>
|
||||
<last-backup-time>n/a</last-backup-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="disk-encryption">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="Apple Inc." name="FileVault" version="{{ host_info.software_version }}"/>
|
||||
<drives>
|
||||
<entry>
|
||||
<drive-name>Macintosh HD</drive-name>
|
||||
<enc-state>encrypted</enc-state>
|
||||
</entry>
|
||||
<entry>
|
||||
<drive-name>Data</drive-name>
|
||||
<enc-state>encrypted</enc-state>
|
||||
</entry>
|
||||
<entry>
|
||||
<drive-name>All</drive-name>
|
||||
<enc-state>encrypted</enc-state>
|
||||
</entry>
|
||||
</drives>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="firewall">
|
||||
<list>
|
||||
{% if let Some(sentinel) = &host_info.sentinel %}
|
||||
{% if let Some(firewall_enabled) = sentinel.firewall_enabled %}
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="SentinelOne" name="Sentinel Agent" version="{{ sentinel.version }}"/>
|
||||
<is-enabled>{% if firewall_enabled %}yes{% else %}no{% endif %}</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
{% endif -%}
|
||||
{% endif -%}
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="Apple Inc." name="Mac OS X Builtin Firewall" version="{{ host_info.software_version }}"/>
|
||||
<is-enabled>yes</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="OpenBSD" name="Packet Filter" version="{{ host_info.software_version }}"/>
|
||||
<is-enabled>no</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="patch-management">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="Apple Inc." name="Software Update" version="3.0"/>
|
||||
<is-enabled>yes</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
<missing-patches>
|
||||
</missing-patches>
|
||||
</entry>
|
||||
{% elif host_info.os_vendor == "Linux" -%}
|
||||
<entry name="anti-malware">
|
||||
<list>
|
||||
{% if let Some(sentinel) = &host_info.sentinel %}
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="SentinelOne" name="Sentinel Agent" version="{{ sentinel.version }}" engver="" datemon="{{ month }}" dateday="{{ day }}" dateyear="{{ year }}" prodType="3" osType="1"/>
|
||||
<real-time-protection>{% if sentinel.real_time_protection %}yes{% else %}no{% endif %}</real-time-protection>
|
||||
<last-full-scan-time>n/a</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
{% endif -%}
|
||||
{% if let Some(defender) = &host_info.defender %}
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="Microsoft Defender ATP" version="{{ defender.app_version }}" defver="{{ defender.definitions_version }}" prodType="3" engver="{{ defender.engine_version }}" osType="1" vendor="Microsoft Corporation" dateday="{{ day }}" dateyear="{{ year }}" datemon="{{ month }}">
|
||||
</Prod>
|
||||
<real-time-protection>{% if defender.real_time_protection_enabled.value %}yes{% else %}no{% endif %}</real-time-protection>
|
||||
<last-full-scan-time>n/a</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
{% endif -%}
|
||||
{% if let Some(clamav) = &host_info.clamav %}
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="Cisco Systems, Inc." name="ClamAV" version="{{ clamav.version }}"{% if let Some(definitions_version) = &clamav.definitions_version %} defver="{{ definitions_version }}"{% endif %} engver="" datemon="{{ month }}" dateday="{{ day }}" dateyear="{{ year }}" prodType="3" osType="1"/>
|
||||
<real-time-protection>{% if clamav.real_time_protection %}yes{% else %}no{% endif %}</real-time-protection>
|
||||
<last-full-scan-time>n/a</last-full-scan-time>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
{% endif -%}
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="disk-backup">
|
||||
<list/>
|
||||
</entry>
|
||||
<entry name="disk-encryption">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="cryptsetup" version="2.3.3" vendor="GitLab Inc.">
|
||||
</Prod>
|
||||
<drives>
|
||||
<entry>
|
||||
<drive-name>/</drive-name>
|
||||
<enc-state>encrypted</enc-state>
|
||||
</entry>
|
||||
</drives>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="firewall">
|
||||
<list>
|
||||
{% if let Some(ufw) = &host_info.ufw %}
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod vendor="Canonical Ltd." name="UFW" version="{{ ufw.version }}"/>
|
||||
<is-enabled>{% if ufw.is_enabled %}yes{% else %}no{% endif %}</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
{% endif -%}
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="IPTables" version="1.8.4" vendor="IPTables">
|
||||
</Prod>
|
||||
<is-enabled>no</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="nftables" version="0.9.3" vendor="The Netfilter Project">
|
||||
</Prod>
|
||||
<is-enabled>n/a</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
</entry>
|
||||
<entry name="patch-management">
|
||||
<list>
|
||||
<entry>
|
||||
<ProductInfo>
|
||||
<Prod name="Dandified Yum" version="4.2.23" vendor="Red Hat, Inc.">
|
||||
</Prod>
|
||||
<is-enabled>yes</is-enabled>
|
||||
</ProductInfo>
|
||||
</entry>
|
||||
</list>
|
||||
<missing-patches/>
|
||||
</entry>
|
||||
{% endif -%}
|
||||
<entry name="data-loss-prevention">
|
||||
<list/>
|
||||
</entry>
|
||||
</categories>
|
||||
</hip-report>
|
||||
Reference in new issue
Block a user