mirror of https://github.com/CIRCL/lookyloo
355 lines
17 KiB
HTML
355 lines
17 KiB
HTML
{% extends "main.html" %}
|
|
{% from "macros.html" import known_content_details %}
|
|
{% from "macros.html" import ressource_legitimacy_details %}
|
|
{% from "macros.html" import indexed_cookies %}
|
|
{% from "macros.html" import request_cookies_icon %}
|
|
{% from "macros.html" import response_cookies_icon %}
|
|
{% from "macros.html" import hash_info%}
|
|
{% from "macros.html" import redirect_response %}
|
|
{% from "macros.html" import shorten_string %}
|
|
{% from "macros.html" import other_captures_table %}
|
|
{% from "macros.html" import context_form %}
|
|
{% from "macros.html" import pandora_submit %}
|
|
|
|
{% block title %}Details for {% if hostnode.idna %}{{hostnode.idna}} {%else%} {{ hostnode.name }} {%endif%}{% endblock %}
|
|
|
|
{% block scripts %}
|
|
{{ super() }}
|
|
<script src='{{ url_for('static', filename='hostname_popup.js') }}'
|
|
{{get_sri('static', 'hostname_popup.js')}}
|
|
nonce="{{ csp_nonce() }}"
|
|
crossorigin="anonymous"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
{# Headers #}
|
|
<center>
|
|
{% if hostnode.idna %}
|
|
<h3>{{hostnode.idna}}
|
|
<br><small class="text-body-secondary">{{hostnode.name}}</small>
|
|
</h3>
|
|
{% else %}
|
|
<h3>{{hostnode.name}}</h3>
|
|
{% endif %}
|
|
<br>
|
|
<button type="button" class="btn btn-primary locateInTree" data-hostnode="{{ hostnode_uuid }}">Locate in tree</button>
|
|
{% if uwhois_available %}
|
|
<a href="{{ url_for('whois', query=hostnode.name) }}" class="btn btn-primary" role="button">
|
|
Download whois entry
|
|
</a>
|
|
{% endif %}
|
|
<a href="{{ url_for('urls_hostnode', tree_uuid=tree_uuid, node_uuid=hostnode_uuid) }}" class="btn btn-primary" role="button">
|
|
Download all URLs as text
|
|
</a>
|
|
<a href="{{ url_for('hashes_hostnode', tree_uuid=tree_uuid, node_uuid=hostnode_uuid) }}" class="btn btn-primary" role="button">
|
|
Download all Hashes as text
|
|
</a>
|
|
</center>
|
|
<br>
|
|
<div class="accordion" id="accordionDNS">
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header">
|
|
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseDNS" aria-expanded="false" aria-controls="collapseDNS">
|
|
DNS details from standalone queries
|
|
</button>
|
|
</h2>
|
|
<div id="collapseDNS" class="accordion-collapse collapse" data-bs-parent="#accordionDNS">
|
|
<div class="accordion-body">
|
|
{% if hostnode.cname %}
|
|
<h5>Chain of CNAME(s) for this domain:</h5>
|
|
<ul>
|
|
{% for cname in hostnode.cname %}
|
|
<li>{{ cname }}{% if uwhois_available %} (<a href="{{ url_for('whois', query=cname)}}">whois</a>){% endif %}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% if hostnode.resolved_ips %}
|
|
<div>
|
|
<h5>Domain IPs from a standalone DNS lookup:</h5>
|
|
{% if 'v4' in hostnode.resolved_ips and 'v6' in hostnode.resolved_ips%}
|
|
<ul>
|
|
{% for ip in hostnode.resolved_ips['v4'] %}
|
|
<li>
|
|
{{ ip }}{% if uwhois_available %} (<a href="{{ url_for('whois', query=ip)}}">whois</a>){% endif %}
|
|
{% if 'ipasn' in hostnode.features and hostnode.ipasn.get(ip) %}- AS{{ hostnode.ipasn[ip]['asn'] }} {% if uwhois_available %} (<a href="{{ url_for('whois', query='AS'+hostnode.ipasn[ip]['asn'])}}">whois</a>){% endif %}{% endif %}
|
|
{% if 'cloudflare' in hostnode.features and hostnode.cloudflare.get(ip) %} - Known Cloudflare IP{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
{% for ip in hostnode.resolved_ips['v6'] %}
|
|
<li>
|
|
{{ ip }}{% if uwhois_available %} (<a href="{{ url_for('whois', query=ip)}}">whois</a>){% endif %}
|
|
{% if 'ipasn' in hostnode.features and hostnode.ipasn.get(ip) %}- AS{{ hostnode.ipasn[ip]['asn'] }} {% if uwhois_available %} (<a href="{{ url_for('whois', query='AS'+hostnode.ipasn[ip]['asn'])}}">whois</a>){% endif %}{% endif %}
|
|
{% if 'cloudflare' in hostnode.features and hostnode.cloudflare.get(ip) %} - Known Cloudflare IP{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{%else%}
|
|
<ul>
|
|
{% for ip in hostnode.resolved_ips %}
|
|
<li>
|
|
{{ ip }}{% if uwhois_available %} (<a href="{{ url_for('whois', query=ip)}}">whois</a>){% endif %}
|
|
{% if 'ipasn' in hostnode.features and hostnode.ipasn.get(ip) %}- AS{{ hostnode.ipasn[ip]['asn'] }} {% if uwhois_available %} (<a href="{{ url_for('whois', query='AS'+hostnode.ipasn[ip]['asn'])}}">whois</a>){% endif %}{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% if hostnode.soa %}
|
|
<div>
|
|
<h5>SOA record for {{hostnode.soa[0]}}:</h5>
|
|
<ul>
|
|
<li>{{ hostnode.soa[1] }}</li>
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% if hostnode.mx %}
|
|
<div>
|
|
<h5>MX record for {{hostnode.mx[0]}}:</h5>
|
|
<ul>
|
|
{% for record in hostnode.mx[1] %}
|
|
<li>{{ record }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% if hostnode.ns %}
|
|
<div>
|
|
<h5>NS record for {{hostnode.ns[0]}}:</h5>
|
|
<ul>
|
|
{% for record in hostnode.ns[1] %}
|
|
<li>{{ record }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<br>
|
|
{# Start list of URLs #}
|
|
<ul class="list-group list-group-flush">
|
|
{% for url in urls %}
|
|
{# URL Display #}
|
|
<li class="list-group-item">
|
|
<div class="h3" title="{{ url['url_object'].name }}">
|
|
{# HTTPs or not #}
|
|
{% if url['encrypted'] %}
|
|
<img src="/static/secure.svg" title="Encrypted request" width="21" height="21"/>
|
|
{% else %}
|
|
<img src="/static/insecure.svg" title="Unencrypted request" width="21" height="21"/>
|
|
{%endif%}
|
|
{# URL #}
|
|
... /{{ shorten_string(url['url_path'], 50)}}
|
|
{# Copy full URL to clipbard #}
|
|
<button type="button" class="btn btn-default btn-copy js-copy"
|
|
data-bs-toggle="tooltip" data-bs-placement="bottom" data-copy="{{ url['url_object'].name }}" data-bs-original-title="Copy to clipboard">
|
|
<svg class="bi bi-clipboard" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
|
<path fill-rule="evenodd" d="M4 1.5H3a2 2 0 0 0-2 2V14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V3.5a2 2 0 0 0-2-2h-1v1h1a1 1 0 0 1 1 1V14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3.5a1 1 0 0 1 1-1h1v-1z"/>
|
|
<path fill-rule="evenodd" d="M9.5 1h-3a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm-3-1A1.5 1.5 0 0 0 5 1.5v1A1.5 1.5 0 0 0 6.5 4h3A1.5 1.5 0 0 0 11 2.5v-1A1.5 1.5 0 0 0 9.5 0h-3z"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
{% if url['url_object'].ip_address %}
|
|
<div>
|
|
IP from HAR: <b>{{ url['url_object'].ip_address }}</b>
|
|
{% if uwhois_available %}(<a href="{{ url_for('whois', query=url['url_object'].ip_address)}}">whois</a>){% endif %}
|
|
</div>
|
|
{% endif %}
|
|
{% if url['url_object'].security_details %}
|
|
<div class="accordion accordion" id="accordionTLS_{{url['url_object'].uuid}}">
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header">
|
|
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTLS_{{url['url_object'].uuid}}" aria-expanded="false" aria-controls="collapseTLS">
|
|
TLS certificate
|
|
</button>
|
|
</h2>
|
|
<div id="collapseTLS_{{url['url_object'].uuid}}" class="accordion-collapse collapse" data-bs-parent="#accordionTLS_{{url['url_object'].uuid}}">
|
|
<div class="accordion-body">
|
|
<ul>
|
|
{% for k, v in url['url_object'].security_details.items() %}
|
|
<li><b>{{k}}</b>: {{v}}</li>
|
|
{% endfor%}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<ul class="list-group">
|
|
<li class="list-group-item">
|
|
<p class="h4">Request ({{url['url_object'].request.get('method')}}) {{ request_cookies_icon(url['url_object'], tree_uuid) }}</p>
|
|
<hr>
|
|
<div class="accordion accordion" id="accordionRequest_{{url['url_object'].uuid}}">
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header">
|
|
<button class="accordion-button" type="button btn-sm" data-bs-toggle="collapse" data-bs-target="#collapseRequestHeaders_{{url['url_object'].uuid}}" aria-expanded="false" aria-controls="collapseRequestHeaders">
|
|
HTTP Headers
|
|
</button>
|
|
</h2>
|
|
<div id="collapseRequestHeaders_{{url['url_object'].uuid}}" class="accordion-collapse collapse" data-bs-parent="#accordionRequest_{{url['url_object'].uuid}}">
|
|
<div class="accordion-body">
|
|
<ul>
|
|
{% for h in url['url_object'].request['headers'] %}
|
|
<li><b>{{h['name']}}</b>: {{h['value']}}</li>
|
|
{% endfor%}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if url['cookies_sent'] %}
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header">
|
|
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#accordionRequestCookies_{{url['url_object'].uuid}}" aria-expanded="false" aria-controls="collapseRequestCookies">
|
|
Cookies sent
|
|
</button>
|
|
</h2>
|
|
<div id="accordionRequestCookies_{{url['url_object'].uuid}}" class="accordion-collapse collapse" data-bs-parent="#accordionRequest_{{url['url_object'].uuid}}">
|
|
<div class="accordion-body">
|
|
{{ indexed_cookies("List of cookies sent in the request", "Node setting this cookie", url['cookies_sent']) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if url['url_object'].posted_data %}
|
|
<div>This is a POST request,
|
|
<a href="{{ url_for('urlnode_post_request', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}">
|
|
download content
|
|
</a><br>
|
|
{% if url['url_object'].posted_data is string %}
|
|
Posted data size: {{ sizeof_fmt(url['url_object'].posted_data|length) }}
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
</li>
|
|
|
|
<li class="list-group-item">
|
|
{# Details of the response #}
|
|
<p class="h4">Response
|
|
<small>(Status code:
|
|
<span title="{{ http_status_description(url['url_object'].response['status']) }}">
|
|
{{ url['url_object'].response['status'] }})
|
|
</span>
|
|
-
|
|
<span>Load time: {{ url['url_object'].time.total_seconds() }}s</span>
|
|
<span>{{response_cookies_icon(url['url_object'], tree_uuid)}}</span>
|
|
</small>
|
|
</p>
|
|
<hr>
|
|
{% if url['url_object'].rendered_html %}
|
|
<div>
|
|
<a href="{{ url_for('urlnode_rendered_content', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}">
|
|
Download rendered HTML page
|
|
</a>({{ sizeof_fmt(url['url_object'].rendered_html.getbuffer().nbytes)}})
|
|
<br>
|
|
<a href="{{ url_for('urlnode_urls_in_rendered_content', tree_uuid=tree_uuid, node_uuid=url['url_object'].uuid) }}">
|
|
Download URLs in rendered HTML page
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
|
|
{{ redirect_response(url['url_object'], tree_uuid) }}
|
|
{% if url['url_object'].empty_response %}
|
|
Empty HTML body.
|
|
{% else %}
|
|
{{ hash_info(tree_uuid, url['url_object'].uuid, url['url_object'].mimetype,
|
|
url['url_object'].body_hash, url['url_object'].body.getbuffer().nbytes,
|
|
url.get('body_hash_freq', 0), has_pandora,
|
|
url.get('legitimacy'),
|
|
url.get('known_content')) }}
|
|
|
|
{% if enable_context_by_users %}
|
|
{{ context_form(tree_uuid, url['url_object'].uuid,
|
|
url['url_object'].body_hash, 'hostnode_popup') }}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
{% if url['url_object'].downloaded_filename %}
|
|
<div>
|
|
{% if has_pandora %}
|
|
<div> Downloaded file: <b>{{url['url_object'].downloaded_filename}}</b> ({{sizeof_fmt(url['url_object'].downloaded_file.getbuffer().nbytes)}})</div>
|
|
{{ pandora_submit(tree_uuid, url['url_object'].uuid) }}
|
|
{% else %}
|
|
<a href="{{ url_for('data', tree_uuid=tree_uuid)}}">
|
|
Download {{url['url_object'].downloaded_filename}}
|
|
</a> ({{sizeof_fmt(url['url_object'].downloaded_file.getbuffer().nbytes)}})
|
|
{% endif%}
|
|
</div>
|
|
{% endif%}
|
|
|
|
<div class="accordion accordion" id="accordionResponse_{{url['url_object'].uuid}}">
|
|
{% if url['embedded_ressources'] %}
|
|
{# Details on embedded resources #}
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header">
|
|
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#accordionEmbedded_{{url['url_object'].uuid}}" aria-expanded="false" aria-controls="collapseEmbedded">
|
|
Embedded resources
|
|
</button>
|
|
</h2>
|
|
<div id="accordionEmbedded_{{url['url_object'].uuid}}" class="accordion-collapse collapse" data-bs-parent="#accordionResponse_{{url['url_object'].uuid}}">
|
|
<div class="accordion-body">
|
|
{% for hash, details in url['embedded_ressources'].items() %}
|
|
<div>
|
|
{{hash_info(tree_uuid, url['url_object'].uuid, details['type'], hash,
|
|
details['body_size'], details.get('hash_freq', 0),
|
|
has_pandora,
|
|
details.get('legitimacy'),
|
|
details.get('known_content')) }}<br>
|
|
{% if enable_context_by_users %}
|
|
{{ context_form(tree_uuid, url['url_object'].uuid, hash, 'hostnode_popup') }}
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header">
|
|
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseResponseHeaders_{{url['url_object'].uuid}}" aria-expanded="false" aria-controls="collapseResponseHeaders">
|
|
HTTP Headers
|
|
</button>
|
|
</h2>
|
|
<div id="collapseResponseHeaders_{{url['url_object'].uuid}}" class="accordion-collapse collapse" data-bs-parent="#accordionResponse_{{url['url_object'].uuid}}">
|
|
<div class="accordion-body">
|
|
{% if url['url_object'].hhhash %}
|
|
<p>
|
|
<a href="{{ url_for('hhh_detail', hhh=url['url_object'].hhhash, from_popup=True) }}">
|
|
Show other captures with the same HTTP Headers Hash
|
|
</a>
|
|
</p>
|
|
{% endif %}
|
|
<ul>
|
|
{% for h in url['url_object'].response['headers'] %}
|
|
<li><b>{{h['name']}}</b>: {{h['value']}}</li>
|
|
{% endfor%}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% if url['cookies_received'] %}
|
|
<div class="accordion-item">
|
|
<h2 class="accordion-header">
|
|
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#accordionResponseCookies_{{url['url_object'].uuid}}" aria-expanded="false" aria-controls="collapseResponseCookies">
|
|
Cookies received
|
|
</button>
|
|
</h2>
|
|
<div id="accordionResponseCookies_{{url['url_object'].uuid}}" class="accordion-collapse collapse" data-bs-parent="#accordionResponse_{{url['url_object'].uuid}}">
|
|
<div class="accordion-body">
|
|
{{ indexed_cookies("This response contains 3rd party cookies:", "Node sending this cookie", url['cookies_received']['3rd_party']) }}
|
|
{{ indexed_cookies("Cookies, sent somewhere in the capture", "Node sending this cookie", url['cookies_received']['sent']) }}
|
|
{{ indexed_cookies("Cookies, never sent", "", url['cookies_received']['not_sent']) }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endblock %}
|