{% from "partials/_macros.html" import card_header, pagination_bar, verdict_pill as verdict_pill_base %} {# Row-shaped convenience wrapper over the shared pill: keeps the {{ verdict_pill(k) }} call sites tidy while the colour palette lives in one place (_macros.html). #} {% macro verdict_pill(row) %} {% if row.verdict %}{{ verdict_pill_base(row.verdict, row.confidence) }} {% else %}{% endif %} {% endmacro %} {% macro subhead(title, c) %}

{{ title }}

{{ c.total }} {% if c.malicious %}{{ c.malicious }} malicious{% endif %} {% if c.suspicious %}{{ c.suspicious }} suspicious{% endif %}
{% endmacro %}
{{ card_header("persistence & tampering — SSH keys · hosts file · privileges") }} {% if data %} {# ----- filter bar ----- #}
{% endif %} {% if data and data.any %} {# ---------- SSH authorized keys ---------- #} {{ subhead("SSH authorized keys", data.counts.ssh_keys) }} {% if data.ssh_keys %}
{% for k in data.ssh_keys %} {% endfor %}
verdict account type fingerprint comment restrictions
{{ verdict_pill(k) }} {{ k.owner }} {{ k.key_type }} {{ k.fingerprint or "—" }} {{ k.comment or "—" }} {{ k.options or "none" }}
{% if data.pagination.ssh.total_pages > 1 %}
{{ data.pagination.ssh.page }} / {{ data.pagination.ssh.total_pages }} {{ data.pagination.ssh.total }} total
{% endif %} {% else %}
no authorized keys found
{% endif %} {# ---------- /etc/hosts ---------- #} {{ subhead("/etc/hosts mappings", data.counts.hosts) }} {% if data.hosts %}
{% for hrow in data.hosts %} {% endfor %}
verdict ip hostnames why
{{ verdict_pill(hrow) }} {{ hrow.ip }} {{ hrow.hostnames }} {{ hrow.reasoning }}
{% if data.pagination.hosts.total_pages > 1 %}
{{ data.pagination.hosts.page }} / {{ data.pagination.hosts.total_pages }} {{ data.pagination.hosts.total }} total
{% endif %} {% else %}
no host mappings found
{% endif %} {# ---------- privilege config ---------- #} {{ subhead("privilege config", data.counts.privilege) }} {% if data.privilege %}
{% for p in data.privilege %} {% endfor %}
verdict kind subject detail source
{{ verdict_pill(p) }} {{ p.kind }} {{ p.subject }} {{ p.detail }} {{ p.source_path }}
{% if data.pagination.priv.total_pages > 1 %}
{{ data.pagination.priv.page }} / {{ data.pagination.priv.total_pages }} {{ data.pagination.priv.total }} total
{% endif %} {% else %}
no privilege entries found
{% endif %} {% else %}
no persistence data yet — these collectors read SSH authorized_keys, /etc/hosts and privilege config; run the monitor (with sudo for full visibility) and let a cycle complete.
{% endif %}