← {{ _('Back to Profiles') }} {{ _('CRITICAL') if profile.risk_score > 0.8 else _('HIGH') if profile.risk_score > 0.5 else _('MEDIUM') }}
{{ _('PROFILE ID') }}
{{ profile.profile_id }}
{{ _('RISK SCORE') }}
{{ "%.0f"|format(profile.risk_score * 100) }}
{{ _('TOOL FINGERPRINT') }}
{{ profile.ua_fingerprint or _('Unknown') }}
{{ _('STATUS') }}
{{ profile.status.upper() }}
{{ _('IP POOL') }}
{{ profile.ip_pool|length }} {{ _('IPs') }}
{{ _('TARGET FILES') }}
{{ profile.target_files|length }}
{{ _('TARGET URLs') }}
{{ profile.target_urls|length }}
{{ _('FILE CLUSTERS') }}
{{ _('LAST SEEN') }}
{{ profile.last_seen.strftime('%m-%d %H:%M') if profile.last_seen else _('N/A') }}

{{ _('ATTACK CHAIN') }}

{% if events %}
{% for evt in events|reverse %}
{{ evt.timestamp.strftime('%H:%M:%S') if evt.timestamp else _('N/A') }} {{ evt.event_type.upper() }} {{ evt.waf_rule_id or _('detection') }} {{ _('score: ') }}{{ "%.2f"|format(evt.waf_score) }}
{{ _('IP:') }} {{ evt.src_ip }} {{ _('URL:') }} {{ evt.url[:60] }}
{% endfor %}
{% else %}

{{ _('No attack events recorded yet') }}

{% endif %}
{% if file_clusters %}

{{ _('FILE CLUSTERS') }} ({{ file_clusters|length }})

{% for fc in file_clusters %}
{{ fc.cluster_id[:10] }} {{ fc.cluster_size }} {{ _('files') }}
{{ fc.file[:55] }}
{% if fc.quarantined %}
{{ _('Quarantined') }} → {{ fc.quarantine_path[:40] }}
{% else %}
{{ _('Active') }}
{% endif %} {% for s in fc.samples[:3] %} {% if s != fc.file %}
{{ s[:50] }}
{% endif %} {% endfor %}
{% endfor %}
{% endif %} {% if linked_records %}

{{ _('LINKED DETECTION RECORDS') }} ({{ linked_records|length }})

{% for lr in linked_records[:20] %}
{{ lr.display_name }} {{ lr.detected_at }} {% if lr.quarantine_id %}Q{% endif %} {% for f in lr.features[:2] %}{{ f[:20] }}{% endfor %}
{% endfor %} {% if linked_records|length > 20 %} {{ _('... and ') }}{{ linked_records|length - 20 }}{{ _(' more') }} {% endif %}
{% endif %}

{{ _('ASSOCIATED IPs') }} ({{ ip_total }})

{{ _('0 selected') }}
{% for ipd in ip_details %} {% endfor %}
{{ _('IP Address') }} {{ _('Events') }} {{ _('WAF Score') }} {{ _('Level') }} {{ _('First Seen') }} {{ _('Last Seen') }}
{{ ipd.ip }} {{ ipd.event_count }} {{ "%.2f"|format(ipd.waf_score_avg) }} {{ ipd.cluster_level }} {{ ipd.first_seen.strftime('%m-%d %H:%M') if ipd.first_seen else _('N/A') }} {{ ipd.last_seen.strftime('%m-%d %H:%M') if ipd.last_seen else _('N/A') }}
{% if ip_total_pages > 1 %}
{{ _('Page') }} {{ ip_page }} / {{ ip_total_pages }}
{% endif %}