{% from "partials/_macros.html" import card_header %} {% set verdict_cls = { 'malicious': 'bg-red-900/40 text-red-300 border border-red-900/60', 'suspicious': 'bg-amber-900/40 text-amber-300 border border-amber-900/60', 'unknown': 'bg-slate-700/40 text-slate-300 border border-slate-600', 'benign': 'bg-emerald-900/30 text-emerald-300 border border-emerald-900/50', } %} {% macro verdict_pill(row) %} {% if row.verdict %} {{ row.verdict }}{% if row.confidence is not none %} {{ "%.0f"|format(row.confidence * 100) }}% {% endif %} {% 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 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" }}
{% 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 }}
{% 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 }}
{% 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 %}