mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-09-18 15:57:44 +02:00
1831 lines
76 KiB
HTML
1831 lines
76 KiB
HTML
{% extends 'base/base.html' %}
|
||
{% load static %}
|
||
{% load humanize %}
|
||
{% load custom_tags %}
|
||
{% block title %}
|
||
{% load mathfilters %}
|
||
Target Summary for {{target.name}}
|
||
{% endblock title %}
|
||
|
||
{% block custom_js_css_link %}
|
||
<link rel="stylesheet" type="text/css" href="{% static 'plugins/datatable/datatables.css' %}">
|
||
<link rel="stylesheet" type="text/css" href="{% static 'plugins/datatable/global.css' %}">
|
||
<link rel="stylesheet" type="text/css" href="{% static 'plugins/datatable/custom.css' %}">
|
||
<link href="{% static 'plugins/select2/select2.min.css' %}" rel="stylesheet" type="text/css" />
|
||
<link href="{% static 'plugins/perfect-scrollbar/perfect-scrollbar.css' %}" rel="stylesheet" type="text/css" />
|
||
<link rel="stylesheet" type="text/css" href="{% static 'plugins/j-map/jquery-jvectormap.css' %}">
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/6.6.3/css/flag-icons.min.css" integrity="sha512-uvXdJud8WaOlQFjlz9B15Yy2Au/bMAvz79F7Xa6OakCl2jvQPdHD0hb3dEqZRdSwG4/sknePXlE7GiarwA/9Wg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||
{% endblock custom_js_css_link %}
|
||
|
||
{% block breadcrumb_title %}
|
||
<li class="breadcrumb-item"><a href="{% url 'list_target' %}">Targets</a></li>
|
||
<li class="breadcrumb-item active">Target Summary</li>
|
||
<li class="breadcrumb-item active" aria-current="page">{{target.name}}</li>
|
||
{% endblock breadcrumb_title %}
|
||
|
||
{% block page_title %}
|
||
Target Summary
|
||
{% endblock page_title %}
|
||
|
||
{% block main_content %}
|
||
<span aria-current="page" style="display: none">{{target.name}}</span>
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="card">
|
||
<ul class="nav nav-tabs nav-bordered m-1">
|
||
<li class="nav-item">
|
||
<a class="nav-link active" id="pills-summary-tab" data-bs-toggle="tab" aria-expanded="false" class="nav-link" href="#summary-tab">Home</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link" id="pills-subdomain-tab" data-bs-toggle="tab" aria-expanded="false" class="nav-link" href="#subdomain-tab">Subdomains</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link" id="pills-endpoints-tab" data-bs-toggle="tab" aria-expanded="false" class="nav-link" href="#endpoints-tab">URLs</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link" id="pills-vulnerabilities-tab" data-bs-toggle="tab" aria-expanded="false" class="nav-link" href="#vulnerabilities-tab">Vulnerabilities</a>
|
||
</li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<input type="hidden" name="summary_identifier" value="{{target.id}}" id="summary_identifier_val">
|
||
|
||
<div class="tab-content no-padding-tab">
|
||
<div class="tab-pane show active" id="summary-tab">
|
||
<div class="row">
|
||
<div class="col-xl-3 col-lg-4">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<div class="d-flex align-items-start mb-3">
|
||
<div class="w-100">
|
||
<h5 class="mt-0 mb-0 font-15">
|
||
Scan Timeline
|
||
</h5>
|
||
<div class="mt-1">
|
||
<small>
|
||
Target <span class="badge badge-soft-primary">{{target.name}}</span> has been scanned <b>{{scan_count}}</b> times.
|
||
<br>
|
||
<br>
|
||
{% if scan_count %}
|
||
The most recent scan was performed on <span class="text-primary"> {{recent_scans.0.start_scan_date}} , {{recent_scans.0.start_scan_date|naturaltime}}</span>
|
||
{% endif %}
|
||
</small>
|
||
</div>
|
||
<div class="track-order-list mt-3">
|
||
<ul class="list-unstyled">
|
||
{% for scan in recent_scans %}
|
||
<li class="completed">
|
||
<a href="{% url 'detail_scan' scan.id %}">
|
||
<h5 class="mt-0 mb-1">
|
||
{{scan.scan_type.engine_name}}
|
||
{% if scan.scan_status == -1 %}
|
||
<span class="badge badge-soft-warning float-end">Pending</span>
|
||
{% elif scan.scan_status == 0 %}
|
||
<span class="badge badge-soft-danger float-end">Failed</span>
|
||
{% elif scan.scan_status == 1 %}
|
||
<span class="badge badge-soft-primary float-end">Scanning</span>
|
||
{% elif scan.scan_status == 2 %}
|
||
<span class="badge badge-soft-success float-end">Completed</span>
|
||
{% elif scan.scan_status == 3 %}
|
||
<span class="badge badge-soft-danger float-end">Aborted</span>
|
||
{% else %}
|
||
<span class="badge badge-soft-danger float-end">Unknown</span>
|
||
{% endif %}
|
||
</h5>
|
||
<p class="text-muted">{{scan.start_scan_date|naturaltime}}<br><small class="text-muted">{{scan.start_scan_date}}</small></p>
|
||
{% if scan.scan_status == 0 %}
|
||
{% if scan.error_message %}
|
||
<p class="text-danger">ERROR: {{scan.error_message}}</p>
|
||
{% endif %}
|
||
{% endif %}
|
||
<p class="text-primary">
|
||
{{scan.get_subdomain_count}} Subdomains Discovered
|
||
<span class="float-end text-dark">
|
||
{% with next_element=recent_scans|next:forloop.counter0 %}
|
||
{% if next_element.get_subdomain_count and scan.get_subdomain_count and next_element.get_subdomain_count > scan.get_subdomain_count %}
|
||
<span class="text-danger" data-toggle="tooltip" data-placement="top" title="{{scan.get_subdomain_count|sub:next_element.get_subdomain_count|abs}} subdomains missing since last scan."><i class="fa fa-caret-down text-danger me-1"></i>{{scan.get_subdomain_count|sub:next_element.get_subdomain_count}} Subdomains</span>
|
||
{% elif next_element.get_subdomain_count and scan.get_subdomain_count and next_element.get_subdomain_count < scan.get_subdomain_count %}
|
||
<span class="text-success" data-toggle="tooltip" data-placement="top" title="{{scan.get_subdomain_count|sub:next_element.get_subdomain_count}} subdomains added since last scan."><i class="fa fa-caret-up text-success me-1"></i>{{scan.get_subdomain_count|sub:next_element.get_subdomain_count}} Subdomains</span>
|
||
{% endif %}
|
||
{% endwith %}
|
||
</span>
|
||
</p>
|
||
</a>
|
||
</li>
|
||
{% endfor %}
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<div class="d-flex align-items-start mb-3">
|
||
<div class="w-100">
|
||
<h5 class="mt-0 mb-0 font-15">
|
||
<span id="sub_scan_history_count"></span> Sub Scans</span>
|
||
</h5>
|
||
<div data-simplebar style="max-height: 510px;" class="p-2">
|
||
<div id="subscan_history_widget">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-9 col-lg-8">
|
||
<div class="row">
|
||
<div class="col-xl-3 col-lg-3 col-6">
|
||
<div class="card" id="tooltip-container">
|
||
<div class="card-body">
|
||
<i class="fa fa-info-circle text-muted float-end" data-bs-container="#tooltip-container" data-bs-toggle="tooltip" data-bs-placement="bottom" title="The total times {{target.name}} is scanned."></i>
|
||
<h4 class="mt-0 font-16">Times target is scanned</h4>
|
||
<h2 class="text-primary my-3 text-center"><span data-plugin="counterup">{{scan_count|intcomma}}</span></h2>
|
||
<br>
|
||
<p class="mb-0"><span class="badge badge-soft-primary">{{this_week_scan_count}} Scans this week</span></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-xl-3 col-lg-3 col-6">
|
||
<div class="card" id="tooltip-container">
|
||
<div class="card-body">
|
||
<i class="fa fa-info-circle text-muted float-end" data-bs-container="#tooltip-container" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Total Subdomains Discovered by reNgine during this scan"></i>
|
||
<h4 class="mt-0 font-16">Subdomains Discovered</h4>
|
||
<h2 class="text-primary my-3 text-center"><span data-plugin="counterup">{{subdomain_count|intcomma}}</span></h2>
|
||
<br>
|
||
<p class="mb-0"><span class="badge badge-soft-success">Alive Subdomains: {{alive_count}}</span></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-xl-3 col-lg-3 col-6">
|
||
<div class="card" id="tooltip-container1">
|
||
<div class="card-body">
|
||
<i class="fa fa-info-circle text-muted float-end" data-bs-container="#tooltip-container1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Total Endpoints discovered for this target. This includes any URLs discovered."></i>
|
||
<h4 class="mt-0 font-16">Endpoints Discovered</h4>
|
||
<h2 class="text-primary my-3 text-center"><span data-plugin="counterup">{{endpoint_count|intcomma}}</span></h2>
|
||
<br>
|
||
<p class="text-success mb-0"><span class="badge badge-soft-success">Alive Endpoints: {{endpoint_alive_count}}</span></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col-xl-3 col-lg-3 col-6">
|
||
<div class="card" id="tooltip-container2">
|
||
<div class="card-body">
|
||
<i class="fa fa-info-circle text-muted float-end" data-bs-container="#tooltip-container2" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Total Vulnerabilities discovered for this target. This will be populated only if vulnerability scan is performed during any scan."></i>
|
||
<h4 class="mt-0 font-16">Vulnerabilities Discovered</h4>
|
||
<h2 class="text-danger my-3 text-center"><span data-plugin="counterup">{{vulnerability_count|intcomma}}</span></h2>
|
||
<p class="text-muted mb-0">
|
||
<span class="w-title text-danger">{{critical_count}} Critical, {{high_count}} High, {{medium_count}} Medium</span>
|
||
<br>
|
||
<span class="w-title text-primary">{{low_count}} Low, {{info_count}} Info Vulnerabilities</span>
|
||
</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="row">
|
||
<div class="col-xl-7 col-lg-7 col-12">
|
||
<div class="card" style="height: 95%">
|
||
<div class="card-body">
|
||
<div class="card-widgets">
|
||
<a href="javascript: fetch_whois('{{target.name}}', true);" data-toggle="tooltip" title="Reload Whois"><i class="mdi mdi-refresh"></i></a>
|
||
</div>
|
||
<h4 class="header-title mb-0"><span class="text-primary"><i class="fe-activity"></i></span> Target Information</h4>
|
||
<div class="row mt-3">
|
||
<div class="col-sm-3">
|
||
<div class="nav flex-column nav-pills nav-pills-tab" id="v-pills-tab" role="tablist" aria-orientation="vertical">
|
||
<a class="nav-link active show mb-1" id="v-pills-domain-tab" data-bs-toggle="pill" href="#v-pills-domain" role="tab" aria-controls="v-pills-domain-tab" aria-selected="true">Domain info</a>
|
||
<a class="nav-link mb-1" id="v-pills-whois-tab" data-bs-toggle="pill" href="#v-pills-whois" role="tab" aria-controls="v-pills-whois" aria-selected="false">Whois</a>
|
||
<a class="nav-link mb-1" id="v-pills-nameserver-tab" data-bs-toggle="pill" href="#v-pills-nameserver" role="tab" aria-controls="v-pills-nameserver"aria-selected="false">Nameservers</a>
|
||
<a class="nav-link mb-1" id="v-pills-history-tab" data-bs-toggle="pill" href="#v-pills-history" role="tab" aria-controls="v-pills-history"aria-selected="false">NS History</a>
|
||
</div>
|
||
</div> <!-- end col-->
|
||
<div class="col-sm-9">
|
||
<div class="tab-content pt-0">
|
||
<div class="tab-pane fade active show" id="v-pills-domain" role="tabpanel" aria-labelledby="v-pills-domain-tab" data-simplebar style="max-height: 300px; min-height: 300px;">
|
||
{% if not target.domain_info %}
|
||
<div class="alert alert-danger alert-dismissible fade show" role="alert" id="whois_not_fetched_alert">
|
||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||
WHOIS Record Has not been fetched, would you like to <a href="javascript: fetch_whois('{{target}}', true);">fetch it now?</a>
|
||
</div>
|
||
{% endif %}
|
||
<div class="alert alert-info alert-dismissible fade show" role="alert" id="whois_fetching_alert" style="display: none">
|
||
Fetching WHOIS records, Please wait...
|
||
<div class="spinner-border spinner-border-sm float-end" role="status"></div>
|
||
</div>
|
||
<div class="alert alert-success alert-dismissible fade show" role="alert" id="whois_fetched_alert" style="display: none">
|
||
WHOIS Records have been fetched, please <a href="javascript:location.reload();">reload the page.</a>
|
||
</div>
|
||
<h4 class="header-title text-primary"><span class="fe-info"></span> Contact Information</h4>
|
||
<ul class="nav nav-tabs nav-bordered nav-justified">
|
||
<li class="nav-item">
|
||
<a href="#registrant-tab" data-bs-toggle="tab" aria-expanded="false" class="nav-link active">
|
||
Registrant
|
||
</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a href="#admin-tab" data-bs-toggle="tab" aria-expanded="true" class="nav-link">
|
||
Admin
|
||
</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a href="#technical-tab" data-bs-toggle="tab" aria-expanded="false" class="nav-link">
|
||
Technical
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
<div class="tab-content">
|
||
<div class="tab-pane active" id="registrant-tab">
|
||
<div class="table-responsive">
|
||
<table class="table mb-0">
|
||
<tbody>
|
||
<tr class="">
|
||
<td><b>Name</b></td>
|
||
<td><span class="fe-user"></span> {{target.domain_info.registrant_name}}</td>
|
||
</tr>
|
||
<tr class="table-primary">
|
||
<td><b>Organization</b></td>
|
||
<td><span class="fe-briefcase"></span> {{target.domain_info.registrant_organization}}</td>
|
||
</tr>
|
||
<tr class="">
|
||
<td><b>Email</b></td>
|
||
<td><span class="fe-mail"></span> {{target.domain_info.registrant_email}}</td>
|
||
</tr>
|
||
<tr class="table-info">
|
||
<td><b>Phone/Fax</b></td>
|
||
<td>
|
||
{% if target.domain_info.registrant_phone %}
|
||
<span class="fe-phone"></span> {{target.domain_info.registrant_phone}}
|
||
{% endif %}
|
||
{% if target.domain_info.registrant_fax %}
|
||
<span class="fe-printer"></span> {{target.domain_info.registrant_fax}}
|
||
</td>
|
||
{% endif %}
|
||
</tr>
|
||
<tr class="">
|
||
<td><b>Address</b></td>
|
||
<td><span class="fe-home"></span> {{target.domain_info.registrant_address}}</td>
|
||
</tr>
|
||
<tr class="table-danger">
|
||
<td><b>Address</b></td>
|
||
<td><b>City: </b>{{target.domain_info.registrant_city}} <b>State: </b>{{target.domain_info.registrant_state}} <b>Zip Code: </b>{{target.domain_info.registrant_zip_code}} <b>Country:
|
||
</b>{{target.domain_info.registrant_country}} </td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane" id="admin-tab">
|
||
<div class="table-responsive">
|
||
<table class="table mb-0">
|
||
<tbody>
|
||
<tr class="table-primary">
|
||
<td><b>Name</b></td>
|
||
<td><span class="fe-user"></span> {{target.domain_info.admin_name}}</td>
|
||
</tr>
|
||
<tr class="">
|
||
<td><b>Organization</b></td>
|
||
<td><span class="fe-briefcase"></span> {{target.domain_info.admin_organization}}</td>
|
||
</tr>
|
||
<tr class="table-info">
|
||
<td><b>Admin ID</b></td>
|
||
<td><span class="fe-user"></span> {{target.domain_info.admin_id}}</td>
|
||
</tr>
|
||
<tr class="">
|
||
<td><b>Email</b></td>
|
||
<td><span class="fe-mail"></span> {{target.domain_info.admin_email}}</td>
|
||
</tr>
|
||
<tr class="table-success">
|
||
<td><b>Phone/Fax</b></td>
|
||
<td>
|
||
{% if target.domain_info.admin_phone %}
|
||
<span class="fe-phone"></span> {{target.domain_info.admin_phone}}
|
||
{% endif %}
|
||
{% if target.domain_info.admin_fax %}
|
||
<span class="fe-printer"></span> {{target.domain_info.admin_fax}}
|
||
</td>
|
||
{% endif %}
|
||
</tr>
|
||
<tr class="">
|
||
<td><b>Address</b></td>
|
||
<td><span class="fe-home"></span> {{target.domain_info.admin_address}}</td>
|
||
</tr>
|
||
<tr class="table-danger">
|
||
<td><b>Address</b></td>
|
||
<td><b>City: </b>{{target.domain_info.admin_city}} <b>State: </b>{{target.domain_info.admin_state}} <b>Zip Code: </b>{{target.domain_info.admin_zip_code}} <b>Country:
|
||
</b>{{target.domain_info.admin_country}} </td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane" id="technical-tab">
|
||
<div class="table-responsive">
|
||
<table class="table mb-0">
|
||
<tbody>
|
||
<tr class="table-info">
|
||
<td><b>Name</b></td>
|
||
<td><span class="fe-user"></span> {{target.domain_info.tech_name}}</td>
|
||
</tr>
|
||
<tr class="">
|
||
<td><b>Organization</b></td>
|
||
<td><span class="fe-briefcase"></span> {{target.domain_info.tech_organization}}</td>
|
||
</tr>
|
||
<tr class="table-primary">
|
||
<td><b>Tech ID</b></td>
|
||
<td><span class="fe-user"></span> {{target.domain_info.tech_id}}</td>
|
||
</tr>
|
||
<tr class="">
|
||
<td><b>Email</b></td>
|
||
<td><span class="fe-mail"></span> {{target.domain_info.tech_email}}</td>
|
||
</tr>
|
||
<tr class="table-success">
|
||
<td><b>Phone/Fax</b></td>
|
||
<td>
|
||
{% if target.domain_info.tech_phone %}
|
||
<span class="fe-phone"></span> {{target.domain_info.tech_phone}}
|
||
{% endif %}
|
||
{% if target.domain_info.tech_fax %}
|
||
<span class="fe-printer"></span> {{target.domain_info.tech_phone}}
|
||
</td>
|
||
{% endif %}
|
||
</tr>
|
||
<tr>
|
||
<td><b>Address</b></td>
|
||
<td><span class="fe-home"></span> {{target.domain_info.tech_address}}</td>
|
||
</tr>
|
||
<tr class="table-danger">
|
||
<td><b>Address</b></td>
|
||
<td><b>City: </b>{{target.domain_info.tech_city}} <b>State: </b>{{target.domain_info.tech_state}} <b>Zip Code: </b>{{target.domain_info.tech_zip_code}} <b>Country:
|
||
</b>{{target.domain_info.tech_country}} </td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane fade" id="v-pills-whois" role="tabpanel" aria-labelledby="v-pills-whois-tab">
|
||
<pre data-simplebar style="max-height: 310px; min-height: 310px;">{{target.domain_info.raw_text}}</pre>
|
||
</div>
|
||
<div class="tab-pane fade" id="v-pills-history" role="tabpanel" aria-labelledby="v-pills-history-tab" data-simplebar style="max-height: 300px; min-height: 300px;">
|
||
</div>
|
||
<div class="tab-pane fade" id="v-pills-nameserver" role="tabpanel" aria-labelledby="v-pills-nameserver-tab" data-simplebar style="max-height: 300px; min-height: 300px;">
|
||
{% for nameserver in target.domain_info.name_servers.all %}
|
||
<span class="badge badge-soft-primary me-1 ms-1">{{ nameserver}}</span>
|
||
{% endfor %}
|
||
</div>
|
||
<div class="tab-pane fade" id="v-pills-related" role="tabpanel" aria-labelledby="v-pills-related-tab" data-simplebar style="max-height: 300px; min-height: 300px;">
|
||
{% for domain in target.domain_info.associated_domains.all %}
|
||
<span class="badge badge-soft-primary badge-link waves-effect waves-light me-1" data-toggle="tooltip" title="Add {{domain}} as target." onclick="add_target('{{domain}}')">{{domain}}</span>
|
||
{% endfor %}
|
||
</div>
|
||
<div class="tab-pane fade" id="v-pills-related-tld" role="tabpanel" aria-labelledby="v-pills-related-tld-tab" data-simplebar style="max-height: 300px; min-height: 300px;">
|
||
{% for domain in target.domain_info.related_tlds.all %}
|
||
<span class="badge badge-soft-primary badge-link waves-effect waves-light me-1" data-toggle="tooltip" title="Add {{domain}} as target." onclick="add_target('{{domain}}')">{{domain}}</span>
|
||
{% endfor %}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-5 col-lg-5 col-12">
|
||
<div class="card" style="height: 95%">
|
||
<div class="card-body">
|
||
<h4 class="header-title mb-0">HTTP Status Breakdown</h4>
|
||
<div id="http_status_chart" class="apex-charts"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-12">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<div class="row">
|
||
<div class="col-9">
|
||
<h4 class="header-title mb-0">Geographical Distribution of Assets</h4>
|
||
<div id="world_map" style="height: 520px"></div>
|
||
</div>
|
||
<div class="col-3">
|
||
<div class="table-responsive" data-simplebar style="max-height: 520px;">
|
||
<table class="table table-borderless table-hover table-centered m-0">
|
||
<thead class="table-light">
|
||
<tr>
|
||
<th> </th>
|
||
<th>Country</th>
|
||
<th>Assets</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for country in asset_countries %}
|
||
<tr>
|
||
<td><span class="fi fi-{{country.iso|lower}}"></span></td>
|
||
<td>{{country.name}}</td>
|
||
<td>{{country.count}}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-6 col-lg-6 col-12 mb-2">
|
||
<div class="card" style="height: 95%">
|
||
<div class="card-body">
|
||
<h4 class="header-title mb-0"><span class="text-primary"><i class="fe-link"></i></span> <span class="badge badge-soft-primary">{{target.domain_info.associated_domains.all.count}}</span> Related Domains</h4>
|
||
<div class="row mt-3">
|
||
<div class="col-12" data-simplebar style="max-height: 250px; min-height: 10px;">
|
||
{% for domain in target.domain_info.associated_domains.all %}
|
||
<span class="badge badge-soft-primary badge-link waves-effect waves-light me-1" data-toggle="tooltip" title="Add {{domain}} as target." onclick="add_target('{{domain}}')">{{domain}}</span>
|
||
{% empty %}
|
||
<div class="alert alert-warning" role="alert">
|
||
<i class="mdi mdi-alert-outline me-2"></i> Oops! Could not find any related domains.
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-6 col-lg-6 col-12 mb-2">
|
||
<div class="card" style="height: 95%">
|
||
<div class="card-body">
|
||
<h4 class="header-title mb-0"><span class="text-primary"><i class="fe-link"></i></span> <span class="badge badge-soft-primary">{{target.domain_info.related_tlds.all.count}}</span> Related TLDs</h4>
|
||
<div class="row mt-3">
|
||
<div class="col-12" data-simplebar style="max-height: 250px; min-height: 10px;">
|
||
{% for domain in target.domain_info.related_tlds.all %}
|
||
<span class="badge badge-soft-primary badge-link waves-effect waves-light me-1" data-toggle="tooltip" title="Add {{domain}} as target." onclick="add_target('{{domain}}')">{{domain}}</span>
|
||
{% empty %}
|
||
<div class="alert alert-warning" role="alert">
|
||
<i class="mdi mdi-alert-outline me-2"></i> Oops! Could not find any related TLds.
|
||
</div>
|
||
{% endfor %}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-5 col-lg-5 col-12">
|
||
{% include 'base/_items/widgets/vulnerability_breakdown_by_severity_chart.html' %}
|
||
</div>
|
||
<div class="col-xl-7 col-lg-7 col-12">
|
||
{% include 'base/_items/widgets/vulnerability_highlights.html' %}
|
||
</div>
|
||
{% include 'base/_items/most_common_cve_cwe_tag_template.html' %}
|
||
<div class="col-xl-6 col-lg-6 col-12">
|
||
{% include 'base/_items/most_vuln_target.html' with most_vuln_widget_title='Most Vulnerable Subdomain'%}
|
||
</div>
|
||
<div class="col-xl-6 col-lg-6 col-12">
|
||
{% include 'base/_items/most_common_vuln.html' %}
|
||
</div>
|
||
<div class="col-xl-6 col-lg-6 col-12">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<h4 class="header-title mb-0"><span id="important-count"><span class="spinner-border spinner-border-sm me-1"></span></span>Important Subdomains</h4>
|
||
<div class="p-2" data-simplebar style="max-height: 235px; min-height: 235px;">
|
||
<div id="important-subdomains-list">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-6 col-lg-6 col-12">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<h4 class="header-title mb-0"><span id="tasks-count"><span class="spinner-border spinner-border-sm me-1"></span></span>
|
||
Recon Note/Todo
|
||
<!--<span class="text-primary float-end" data-toggle="tooltip" data-placement="top" title="Add Recon Todo" onclick="add_todo_for_scanhistory_modal({{history.id}})">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
|
||
</span>-->
|
||
</h4>
|
||
<div class="p-2">
|
||
<div style="max-height: 210px;min-height: 210px;" data-simplebar>
|
||
<ul class="list-group list-group-flush todo-list" id="todo-list"></ul>
|
||
</div>
|
||
</div>
|
||
<div class="modal fade" id="addTaskModal" tabindex="-1" role="dialog" aria-labelledby="addTaskModalTitle" aria-hidden="true">
|
||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||
<div class="modal-content">
|
||
<div class="modal-body">
|
||
<div class="compose-box">
|
||
<div class="compose-content" id="addTaskModalTitle">
|
||
<h4 class="header-title">Add Recon Todo</h4>
|
||
<form>
|
||
<input type="hidden" name="summary_identifier" value="{{history.id}}" id="summary_identifier_val">
|
||
|
||
<div class="mt-2">
|
||
<label for="todoTitle" class="form-label">Todo Title</label>
|
||
<input id="todoTitle" type="text" placeholder="Todo Title" class="form-control" name="task">
|
||
</div>
|
||
|
||
<div class="mt-2">
|
||
<label for="todoSubdomainDropdown" class="form-label">Select Subdomain (Optional)</label>
|
||
<span id="selectedSubdomainCount"></span>
|
||
<select class="w-100 form-control" data-toggle="select2" data-width="100%" id="todoSubdomainDropdown">
|
||
<option>Choose Subdomain...</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div class="">
|
||
<label for="todoDescription" class="form-label">Todo Description (Optional)</label>
|
||
<textarea class="form-control" id="todoDescription" rows="5" spellcheck="false" placeholder="Todo Description"></textarea>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button class="btn btn-primary add-scan-history-todo">Add Recon Todo</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-4 col-lg-4 col-12">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<h4 class="header-title mb-0"><span id="ip-address-count"><span class="spinner-border spinner-border-sm me-1"></span></span> IP Addresses</h4>
|
||
<span class="text-warning float-end">*IP Addresses highlighted with yellow are CDN IP</span>
|
||
<div class="p-2" data-simplebar style="max-height: 235px; min-height: 235px;">
|
||
<div id="ip-address" class="mt-2"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-4 col-lg-4 col-12">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<h4 class="header-title mb-0"><span id="ports-count"><span class="spinner-border spinner-border-sm me-1"></span></span> Discovered Ports</h4>
|
||
<span class="text-danger float-end">*Ports highlighted with red are uncommon Ports</span>
|
||
<div class="p-2" data-simplebar style="max-height: 235px; min-height: 235px;">
|
||
<div id="ports" class="mt-2"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-4 col-lg-4 col-12">
|
||
<div class="card">
|
||
<div class="card-body">
|
||
<h4 class="header-title mb-0"><span id="technologies-count"><span class="spinner-border spinner-border-sm me-1"></span></span> Discovered Technologies</h4>
|
||
<span class="text-warning float-end"> </span>
|
||
<div class="p-2" data-simplebar style="max-height: 235px; min-height: 235px;">
|
||
<div id="technologies" class="mt-2"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane" id="subdomain-tab">
|
||
{% include 'base/_items/subdomain_tab_content.html' with target_summary=True%}
|
||
</div>
|
||
<div class="tab-pane" id="endpoints-tab">
|
||
{% include 'base/_items/endpoint_tab_content.html' with target_summary=True%}
|
||
</div>
|
||
|
||
<div class="tab-pane" id="vulnerabilities-tab">
|
||
{% include 'base/_items/vulnerability_tab_content.html' %}
|
||
</div>
|
||
|
||
</div>
|
||
|
||
{% include "base/_items/recon_note_modal.html" %}
|
||
{% include "base/_items/subscan_modal.html" %}
|
||
|
||
{# for passing subdomain id to initiate subtask scan #}
|
||
<input type="hidden" name="subtask_subdomain_id" id="subtask_subdomain_id" value="0">
|
||
|
||
{% endblock main_content %}
|
||
|
||
{% block page_level_script %}
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/apexcharts/3.29.0/apexcharts.min.js" integrity="sha512-fe6OklXva8AWoqdwgkE7Ni4uWgHGWxFQWZx4lYehzY2Qrst5YfogjAbnLd6egsoTrnjGI9/LYt1Ont2cKNbP2A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||
<script src="https://apexcharts.com/samples/assets/irregular-data-series.js"></script>
|
||
<script src="https://apexcharts.com/samples/assets/ohlc.js"></script>
|
||
<script src="{% static 'custom/custom.js' %}"></script>
|
||
<script src="{% static 'custom/subdomain.js' %}"></script>
|
||
<script src="{% static 'custom/todo.js' %}"></script>
|
||
<script src="{% static 'note/js/todo.js' %}"></script>
|
||
<script src="{% static 'assets/js/clipboard.min.js' %}"></script>
|
||
<script src="{% static 'targetApp/js/target_summary.js' %}"></script>
|
||
<script src="{% static 'plugins/perfect-scrollbar/perfect-scrollbar.min.js' %}"></script>
|
||
<script src="{% static 'startScan/js/subdomains-suggestions.js' %}"></script>
|
||
<script src="{% static 'startScan/js/endpoint-datatables-suggestions.js' %}"></script>
|
||
<script src="{% static 'startScan/js/detail_scan.js' %}"></script>
|
||
<script src="{% static 'startScan/js/vulnerability-datatables-suggestions.js' %}"></script>
|
||
<script src="{% static 'plugins/j-map/jquery-jvectormap.min.js' %}"></script>
|
||
<script src="{% static 'plugins/j-map/maps/jquery-jvectormap-world-mill-en.js' %}"></script>
|
||
<script type="text/javascript">
|
||
$(document).ready(function(){
|
||
{% include 'base/_items/most_common_cve_cwe_tags.js' %}
|
||
const ps = new PerfectScrollbar(document.querySelector('.mt-container'));
|
||
const ps1 = new PerfectScrollbar(document.querySelector('.endpoint-search'));
|
||
const ps2 = new PerfectScrollbar(document.querySelector('.vulnerability-search'));
|
||
$('[data-toggle="tooltip"]').tooltip();
|
||
|
||
|
||
// HTTP STATUS Breakdown chart
|
||
// depending on http_status_breakdown, generate color
|
||
var colors = [
|
||
{% for status in http_status_breakdown %}
|
||
{% if status.http_status >= 200 and status.http_status < 300 %}
|
||
'#4CAF50',
|
||
{% elif status.http_status >= 300 and status.http_status < 400 %}
|
||
'#FFC107',
|
||
{% else %}
|
||
'#F44336',
|
||
{% endif %}
|
||
{% endfor %}
|
||
];
|
||
|
||
// http_status chart
|
||
var options = {
|
||
series: [{
|
||
name: 'Subdomains',
|
||
data: [{% for status in http_status_breakdown %}
|
||
{{status.http_status__count}},
|
||
{% endfor %}]
|
||
}],
|
||
chart: {
|
||
height: 350,
|
||
type: 'bar',
|
||
events: {
|
||
click: function(chart, w, e) {
|
||
// console.log(chart, w, e)
|
||
}
|
||
}
|
||
},
|
||
colors: colors,
|
||
plotOptions: {
|
||
bar: {
|
||
columnWidth: '45%',
|
||
distributed: true,
|
||
}
|
||
},
|
||
dataLabels: {
|
||
enabled: false
|
||
},
|
||
legend: {
|
||
show: false
|
||
},
|
||
xaxis: {
|
||
categories: [
|
||
{% for status in http_status_breakdown %}
|
||
'{{status.http_status}}',
|
||
{% endfor %}
|
||
],
|
||
labels: {
|
||
style: {
|
||
colors: colors,
|
||
fontSize: '12px'
|
||
}
|
||
}
|
||
}
|
||
};
|
||
|
||
var chart = new ApexCharts(document.querySelector("#http_status_chart"), options);
|
||
chart.render();
|
||
|
||
// vulnerability pie chart
|
||
var options = {
|
||
chart: {
|
||
type: 'donut',
|
||
height: 280,
|
||
},
|
||
colors: ['#D50000', '#F44336', '#FF6D00', '#FFD600', '#2962FF', '#03A9F4'],
|
||
dataLabels: {
|
||
enabled: false
|
||
},
|
||
legend: {
|
||
show: !0,
|
||
position: "bottom",
|
||
horizontalAlign: "center",
|
||
verticalAlign: "middle",
|
||
floating: !1,
|
||
fontSize: "15px",
|
||
offsetX: 0,
|
||
offsetY: 7
|
||
},
|
||
plotOptions: {
|
||
pie: {
|
||
donut: {
|
||
size: '70%',
|
||
background: 'transparent',
|
||
labels: {
|
||
show: true,
|
||
name: {
|
||
show: true,
|
||
fontSize: '29px',
|
||
fontFamily: 'Nunito, sans-serif',
|
||
color: undefined,
|
||
offsetY: -10
|
||
},
|
||
value: {
|
||
show: true,
|
||
fontSize: '26px',
|
||
fontFamily: 'Nunito, sans-serif',
|
||
color: '20',
|
||
offsetY: 16,
|
||
formatter: function (val) {
|
||
return val
|
||
}
|
||
},
|
||
total: {
|
||
show: true,
|
||
showAlways: true,
|
||
label: 'Total',
|
||
color: '#888ea8',
|
||
formatter: function (w) {
|
||
return w.globals.seriesTotals.reduce( function(a, b) {
|
||
return a + b
|
||
}, 0)
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
series: [{{critical_count}}, {{high_count}}, {{medium_count}}, {{low_count}}, {{info_count}}, {{unknown_count}}],
|
||
labels: ['Critical', 'High', 'Medium', 'Low', 'Info', 'Unknown'],
|
||
responsive: [{
|
||
breakpoint: 1599,
|
||
options: {
|
||
chart: {
|
||
height: 240
|
||
},
|
||
legend: {
|
||
position: 'bottom'
|
||
}
|
||
},
|
||
breakpoint: 1439,
|
||
options: {
|
||
chart: {
|
||
width: '250px',
|
||
height: '390px'
|
||
},
|
||
},
|
||
}],
|
||
}
|
||
|
||
var chart = new ApexCharts(
|
||
document.querySelector("#vulnerability-pie-chart"),
|
||
options
|
||
);
|
||
chart.render()
|
||
|
||
$("#pills-subdomain-tab").click(function() {
|
||
var subdomain_datatables = $('#subdomain_scan_results').DataTable({
|
||
"headerCallback": function(e, a, t, n, s) {
|
||
e.getElementsByTagName("th")[0].innerHTML = '<div class="form-check ms-1 form-check-primary"><input type="checkbox" class="float-start form-check-input chk-parent" id="head_checkbox" onclick=mainCheckBoxSelected(this)>\n<span class="new-control-indicator"></span><span style="visibility:hidden">c</span></div>\n'
|
||
},
|
||
"destroy": true,
|
||
"processing": true,
|
||
"oLanguage": {
|
||
"oPaginate": {
|
||
"sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>',
|
||
"sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>'
|
||
},
|
||
"sInfo": "Showing page _PAGE_ of _PAGES_",
|
||
"sSearch": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
|
||
"sSearchPlaceholder": "Search...",
|
||
"sLengthMenu": "Results : _MENU_",
|
||
"sProcessing": "Fetching Subdomains... Please wait..."
|
||
},
|
||
"fnCreatedRow": function(nRow, aData, iDataIndex) {
|
||
$(nRow).attr('id', 'subdomain_row_' + aData['id']);
|
||
},
|
||
"stripeClasses": [],
|
||
"lengthMenu": [50, 100, 500, 1000],
|
||
"pageLength": 50,
|
||
'serverSide': true,
|
||
"ajax": '/api/listDatatableSubdomain/?target_id={{target.id}}&format=datatables',
|
||
"order": [
|
||
[8, "desc"]
|
||
],
|
||
"columns": [{
|
||
'data': 'id'
|
||
},
|
||
{
|
||
'data': 'name'
|
||
},
|
||
{
|
||
'data': 'endpoint_count'
|
||
},
|
||
{
|
||
'data': 'endpoint_count'
|
||
},
|
||
{
|
||
'data': 'http_status'
|
||
},
|
||
{
|
||
'data': 'page_title'
|
||
},
|
||
{
|
||
'data': 'ip_addresses'
|
||
},
|
||
{
|
||
'data': 'ip_addresses'
|
||
},
|
||
{
|
||
'data': 'content_length',
|
||
'searchable': false
|
||
},
|
||
{
|
||
'data': 'screenshot_path',
|
||
'searchable': false
|
||
},
|
||
{
|
||
'data': 'response_time'
|
||
},
|
||
{
|
||
'data': 'technologies'
|
||
},
|
||
{
|
||
'data': 'http_url'
|
||
},
|
||
{
|
||
'data': 'cname'
|
||
},
|
||
{
|
||
'data': 'is_interesting'
|
||
},
|
||
{
|
||
'data': 'info_count'
|
||
},
|
||
{
|
||
'data': 'low_count'
|
||
},
|
||
{
|
||
'data': 'medium_count'
|
||
},
|
||
{
|
||
'data': 'high_count'
|
||
},
|
||
{
|
||
'data': 'critical_count'
|
||
},
|
||
{
|
||
'data': 'todos_count'
|
||
},
|
||
{
|
||
'data': 'is_important'
|
||
},
|
||
{
|
||
'data': 'webserver'
|
||
},
|
||
{
|
||
'data': 'content_type'
|
||
},
|
||
{
|
||
'data': 'id'
|
||
},
|
||
{
|
||
'data': 'directories_count'
|
||
},
|
||
{
|
||
'data': 'subscan_count'
|
||
},
|
||
{'data': 'waf'},
|
||
],
|
||
"columnDefs": [{
|
||
"orderable": false,
|
||
"targets": [2, 3, 6, 7, 9]
|
||
},
|
||
{
|
||
"targets": [2, 3, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 25, 26, 27],
|
||
"visible": false,
|
||
"searchable": false,
|
||
},
|
||
{
|
||
"targets": [11, 13, 21, 22, 23],
|
||
"visible": false,
|
||
"searchable": true,
|
||
},
|
||
{
|
||
"className": "text-center",
|
||
"targets": [2, 3, 4, 8, 10]
|
||
},
|
||
// checkbox
|
||
{
|
||
"targets": 0,
|
||
"width": "20px",
|
||
"className": "",
|
||
"orderable": !1,
|
||
render: function(e, a, t, n) {
|
||
return '<div class="form-check ms-1 form-check-primary"><input type="checkbox" name="subdomain_checkbox[' + e + ']" class="float-start form-check-input subdomain_checkbox" value="' + e + '" onchange=toggleMultipleSubdomainButton()>\n<span class="new-control-indicator"></span><span style="visibility:hidden">c</span></div>';
|
||
}
|
||
},
|
||
// subdomain Name
|
||
{
|
||
"render": function(data, type, row) {
|
||
var badges = '';
|
||
var tech_badge = '';
|
||
var interesting_badge = '';
|
||
var content_type = '';
|
||
var web_server = '';
|
||
var waf_badge = '';
|
||
if (row['technologies']) {
|
||
tech_badge = '<div>' + parse_technology(row['technologies'], "primary", scan_id = null, domain_id = {{target.id}}) + '</div>';
|
||
}
|
||
if (row['is_interesting']) {
|
||
interesting_badge = `<div><span class='me-1 badge badge-soft-danger' data-toggle="tooltip" data-placement="top" title="Interesting Subdomain">Interesting</span></div>`;
|
||
}
|
||
|
||
if (row['content_type']) {
|
||
content_type = `<div><span class='mt-1 badge badge-soft-blue bs-tooltip' title="Content Type">${row['content_type']}</span></div>`;
|
||
}
|
||
|
||
if (row['webserver']) {
|
||
web_server = `<div><span class='mt-1 badge badge-soft-info bs-tooltip' title="Web Server">${row['webserver']}</span></div>`;
|
||
}
|
||
|
||
if (interesting_badge) {
|
||
badges = interesting_badge;
|
||
}
|
||
|
||
todo_icon = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#e7515a" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>`;
|
||
todo_badge = '';
|
||
|
||
if (row['todos_count']) {
|
||
todo_badge = `<span class="text-danger badge badge-link badge-soft-danger float-end mt-1" onclick="list_subdomain_todos(${row['id']}, '${row['name']}')">${todo_icon} ${row['todos_count']} Todos </span>`
|
||
}
|
||
|
||
endpoint_count_badge = '';
|
||
if (row['endpoint_count']) {
|
||
endpoint_count_badge = `<span class="pl-2 pr-2 me-1 badge badge-soft-primary badge-link bs-tooltip" title="Endpoints" onclick="get_endpoint_modal(scan_id=null, subdomain_id=${row['id']}, '${row['name']}')">${row['endpoint_count']} <i class=" fas fa-link"></i></span>`;
|
||
}
|
||
|
||
if(row['waf'].length){
|
||
waf_badge = `<div><span class="pl-2 pr-2 my-1 badge badge-soft-danger" bs-tooltip" title="WAF Detected by wafw00f!""><i class="fe-cloud-lightning mx-1"></i>WAF Detected</span>`;
|
||
for (var waf in row['waf']) {
|
||
var waf_object = row['waf'][waf];
|
||
waf_badge += `<span class="mx-1 my-1 badge badge-soft-danger" bs-tooltip" title="WAF Manufacturer: ${waf_object.manufacturer}">${waf_object.name}</span>`;
|
||
}
|
||
waf_badge += `</div>`;
|
||
}
|
||
|
||
vuln_count_badge = '';
|
||
total_vuln_badge = `<span class='pl-2 pr-2 me-1 mt-1 badge badge-critical bs-tooltip badge-link' title="All Vulnerabilities" onclick="get_vulnerability_modal(scan_id=null, severity=null, subdomain_id=${row['id']}, subdomain_name='${row['name']}')">${row['info_count'] + row['low_count'] + row['high_count'] + row['medium_count'] + row['critical_count']} <i class="fas fa-bug"></i></span>`;
|
||
info_badge = `<span class='pl-2 pr-2 me-1 mt-1 badge badge-soft-info bs-tooltip badge-link' title="Informational Vulnerabilities" onclick="get_vulnerability_modal(scan_id=null, severity=0, subdomain_id=${row['id']}, subdomain_name='${row['name']}')">${row['info_count']} Info</span>`;
|
||
low_badge = `<span class='pl-2 pr-2 me-1 mt-1 badge badge-low bs-tooltip badge-link' title=" Low Severity Vulnerabilities" onclick="get_vulnerability_modal(scan_id=null, severity=1, subdomain_id=${row['id']}, subdomain_name='${row['name']}')">${row['low_count']} Low</span>`;
|
||
medium_badge = `<span class='pl-2 pr-2 me-1 mt-1 badge badge-soft-warning bs-tooltip badge-link' title="Medium Severity Vulnerabilities" onclick="get_vulnerability_modal(scan_id=null, severity=2, subdomain_id=${row['id']}, subdomain_name='${row['name']}')">${row['medium_count']} Med</span>`;
|
||
high_badge = `<span class='pl-2 pr-2 me-1 mt-1 badge badge-soft-danger bs-tooltip badge-link' title="High Severity Vulnerabilities" onclick="get_vulnerability_modal(scan_id=null, severity=3, subdomain_id=${row['id']}, subdomain_name='${row['name']}')">${row['high_count']} High</span>`;
|
||
critical_badge = `<span class='pl-2 pr-2 me-1 mt-1 badge badge-critical bs-tooltip badge-link' title="Critical Vulnerabilities" onclick="get_vulnerability_modal(scan_id=null, severity=4, subdomain_id=${row['id']}, subdomain_name='${row['name']}')">${row['critical_count']} Critical</span>`;
|
||
vuln_count_badge = `<div class="">` + (row['info_count'] > 0 ? info_badge : '') + (row['low_count'] > 0 ? low_badge : '') + (row['medium_count'] > 0 ? medium_badge : '') + (row['high_count'] > 0 ? high_badge : '') + (row['critical_count'] > 0 ? critical_badge : '') + `</div>`;
|
||
|
||
vuln_count_badge = (row['info_count'] + row['low_count'] + row['high_count'] + row['medium_count'] + row['critical_count'] > 0 ? total_vuln_badge : '') + vuln_count_badge;
|
||
|
||
copy_icon = `
|
||
<a href="javascript:;" data-clipboard-action="copy" class="action-icon copyable" data-toggle="tooltip" data-placement="top" title="Copy Subdomain!" data-clipboard-target="#subdomain-${row['id']}" id="#subdomain-${row['id']}" onclick="setTooltip(this.id, 'Copied!')"> <i class="text-primary mdi mdi-content-copy"></i></a>
|
||
`;
|
||
|
||
var directory_count_badge = '';
|
||
if (row['directories_count']) {
|
||
directory_count_badge = `<span class="me-1 badge badge-soft-primary badge-link bs-tooltip" title="Directories" onclick="get_directory_modal(scan_id=null, subdomain_id=${row['id']}, subdomain_name='${row['name']}')">${row['directories_count']} <i class="far fa-folder"></i></span>`;
|
||
}
|
||
|
||
var subscan_count_badge = '';
|
||
if (row['subscan_count']) {
|
||
subscan_count_badge = `<span class="badge me-1 badge-soft-blue badge-link bs-tooltip" title="SubScans" onclick="get_and_render_subscan_history(${row['id']}, '${row['name']}')">${row['subscan_count']} <i class="fas fa-history"></i></span>`;
|
||
}
|
||
|
||
tech_badge += content_type;
|
||
tech_badge += web_server;
|
||
|
||
end_vuln_badge = '<div class="">' + subscan_count_badge + endpoint_count_badge + directory_count_badge + vuln_count_badge + '</div>';
|
||
|
||
if (row['http_url']) {
|
||
if (row['cname']) {
|
||
cname_badge = `<div><span class="text-dark">CNAME<br><span class="text-warning"> ❯ </span>` + row['cname'].replace(',', '<br><span class="text-warning"> ❯ </span>') + `</div>`;
|
||
return badges + `<div class="clipboard copy-txt"><a href="` + row['http_url'] + `" class="text-primary" target="_blank"><span id='subdomain-${row['id']}'>` + data + `${copy_icon} </span></a>` + `</div>` + cname_badge + waf_badge + end_vuln_badge + tech_badge + todo_badge;
|
||
}
|
||
return badges + `<div class="clipboard copy-txt"><a href="` + row['http_url'] + `" class="text-primary" target="_blank"><span id='subdomain-${row['id']}'>` + data + `${copy_icon} </span></a>` + `</div>` + waf_badge + end_vuln_badge + tech_badge + todo_badge;
|
||
}
|
||
return badges + `<div class="clipboard copy-txt"><a href="https://` + data + `" class="text-primary" target="_blank"><span id='subdomain-${row['id']}'>` + data + `${copy_icon} </span></a>` + `</div>` + waf_badge + end_vuln_badge + tech_badge + todo_badge;
|
||
},
|
||
"targets": 1
|
||
},
|
||
// http_status
|
||
{
|
||
"render": function(data, type, row) {
|
||
// display badge based on http status
|
||
// green for http status 2XX, orange for 3XX and warning for everything else
|
||
if (data >= 200 && data < 300) {
|
||
return "<span class='badge bg-success'>" + data + "</span>";
|
||
} else if (data >= 300 && data < 400) {
|
||
return "<span class='badge bg-warning'>" + data + "</span>";
|
||
} else if (data == 0) {
|
||
// datatable throws error when no data is returned
|
||
return "";
|
||
}
|
||
return `<span class='badge bg-danger'>` + data + `</span>`;
|
||
},
|
||
"targets": 4,
|
||
},
|
||
// page title
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (data) {
|
||
return htmlEncode(data);
|
||
}
|
||
return "";
|
||
},
|
||
"targets": 5,
|
||
},
|
||
// ip address
|
||
{
|
||
"render": function(data, type, row) {
|
||
ip_badge = ''
|
||
if (data) {
|
||
Object.entries(data).forEach(([key, value]) => {
|
||
if (value['is_cdn']) {
|
||
ip_badge += `<span class='m-1 badge badge-soft-warning badge-link' title="CDN IP Address" onclick="get_ip_details('${value.address}', scan_id=null, domain_id={{target.id}})">${value.address}</span>`
|
||
} else {
|
||
ip_badge += `<span class='m-1 badge badge-soft-primary badge-link' onclick="get_ip_details('${value.address}', scan_id=null, domain_id={{target.id}})">${value.address}</span>`
|
||
}
|
||
});
|
||
return ip_badge;
|
||
}
|
||
return "";
|
||
},
|
||
"targets": 6,
|
||
},
|
||
// open ports
|
||
{
|
||
"render": function(data, type, row) {
|
||
port_badge = ''
|
||
if (data) {
|
||
for (ip in data) {
|
||
ports = data[ip]['ports']
|
||
for (port in ports) {
|
||
port_obj = data[ip]['ports'][port]
|
||
badge_color = port_obj['is_uncommon'] ? 'danger' : 'primary';
|
||
title = port_obj['is_uncommon'] ? 'Uncommon Port - ' + port_obj['description'] : port_obj['description'];
|
||
port_badge += `<span class='m-1 badge badge-soft-${badge_color} bs-tooltip badge-link' title='${title}' onclick="get_port_details(${port_obj['number']}, scan_id=null, domain_id={{target.id}})">${port_obj['number']}/${port_obj['service_name']}</span>`
|
||
}
|
||
}
|
||
return port_badge;
|
||
}
|
||
return "";
|
||
},
|
||
"targets": 7,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (data) {
|
||
//return lightbox with caption as http link
|
||
return data;
|
||
}
|
||
return 0;
|
||
},
|
||
"targets": 8,
|
||
},
|
||
// screenshot
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (data) {
|
||
//return lightbox with caption as http link
|
||
return `<a href="/media/` + data + `" data-lightbox="screenshots" data-title="<a target='_blank' href='` + row['http_url'] + `'><h3 style="color:white">` + row['name'] + `</h3></a>"><img src="/media/` + data + `" class="img-fluid rounded mb-4 mt-4 screenshot" onerror="removeImageElement(this)"></a>`;
|
||
}
|
||
return "";
|
||
},
|
||
"targets": 9,
|
||
},
|
||
// response_time
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (data) {
|
||
return get_response_time_text(data);
|
||
}
|
||
return "";
|
||
},
|
||
"targets": 10,
|
||
},
|
||
// Action
|
||
{
|
||
"render": function(data, type, row) {
|
||
const cms_detector_http_url = row['http_url'] ? row['http_url'] : 'https://' + row['name'];
|
||
return `
|
||
<div class="btn-group mt-2">
|
||
<button type="button" data-toggle="tooltip" data-placement="top" title="Further Scan Subdomain" class="btn btn-primary btn-scan-subdomain me-1" id="${row['id']}"><i class="fe-zap"></i></button>
|
||
<button type="button" data-toggle="tooltip" data-placement="top" title="Add Recon Todo/Note" class="btn btn-primary me-1" id="${row['id']}" onclick="add_note_for_subdomain(${row['id']}, '${row['name']}')"><i class="fe-file-plus"></i></button>
|
||
<button class="btn btn-primary me-1 dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></button>
|
||
<div class="dropdown-menu dropdown-menu-end">
|
||
<a class="dropdown-item" href="#" onclick="mark_important_subdomain(this, ${row['id']})" id="${row['id']}"><i class="mdi mdi-alert-rhombus-outline me-2 text-muted font-18 vertical-middle"></i>Mark Important Subdomain</a>
|
||
<a class="dropdown-item" href="#" onclick="detect_subdomain_cms('${cms_detector_http_url}', ${row['http_status']})"><i class="fe-grid me-2 text-muted font-18 vertical-middle"></i>Detect CMS</a>
|
||
<a class="text-danger dropdown-item btn-delete-subdomain" href="#" id="${row['id']}"><i class="text-danger mdi mdi-delete-forever-outline me-2 font-18 vertical-middle"></i>Delete Subdomain</a>
|
||
</div>
|
||
</div>
|
||
`;
|
||
},
|
||
"targets": 24,
|
||
},
|
||
],
|
||
"dom": "<'row'<'col-lg-12 col-md-12 col-12 mb-2'l>>" +
|
||
"<'table-responsive'tr>" +
|
||
"<'dt--bottom-section d-sm-flex justify-content-sm-between text-center'<'dt--pages-count mb-sm-0 mb-3'i><'dt--pagination'p>>",
|
||
drawCallback: function() {
|
||
$('.badge').tooltip({
|
||
template: '<div class="tooltip status" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>'
|
||
})
|
||
$('.bs-tooltip').tooltip();
|
||
|
||
if (!$('#sub_http_status_filter_checkbox').is(":checked")) {
|
||
subdomain_datatables.column(4).visible(false);
|
||
}
|
||
if (!$('#sub_page_title_filter_checkbox').is(":checked")) {
|
||
subdomain_datatables.column(5).visible(false);
|
||
}
|
||
if (!$('#sub_ip_filter_checkbox').is(":checked")) {
|
||
subdomain_datatables.column(6).visible(false);
|
||
}
|
||
if (!$('#sub_ports_filter_checkbox').is(":checked")) {
|
||
subdomain_datatables.column(7).visible(false);
|
||
}
|
||
if (!$('#sub_content_length_filter_checkbox').is(":checked")) {
|
||
subdomain_datatables.column(8).visible(false);
|
||
}
|
||
if (!$('#sub_http_status_filter_checkbox').is(":checked")) {
|
||
subdomain_datatables.column(8).visible(false);
|
||
}
|
||
if (!$('#sub_response_time_filter_checkbox').is(":checked")) {
|
||
subdomain_datatables.column(10).visible(false);
|
||
}
|
||
if (!$('#sub_screenshot_filter_checkbox').is(":checked")) {
|
||
subdomain_datatables.column(9).visible(false);
|
||
}
|
||
|
||
},
|
||
"rowCallback": function(row, data, dataIndex) {
|
||
if (data['is_important']) {
|
||
$(row).addClass('table-danger');
|
||
}
|
||
},
|
||
});
|
||
|
||
$('#reload_subdomain_table_btn').click(function() {
|
||
subdomain_datatables.ajax.reload();
|
||
});
|
||
|
||
$('#subdomain-search-button').click(function() {
|
||
subdomain_datatables.search($("#subdomains-search").val()).draw();
|
||
});
|
||
|
||
$('input[name=sub_http_status_filter_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
subdomain_datatables.column(4).visible(true);
|
||
} else {
|
||
subdomain_datatables.column(4).visible(false);
|
||
}
|
||
window.localStorage.setItem('sub_http_status_filter_checkbox', $(this).is(':checked'));
|
||
});
|
||
|
||
$('input[name=sub_page_title_filter_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
subdomain_datatables.column(5).visible(true);
|
||
} else {
|
||
subdomain_datatables.column(5).visible(false);
|
||
}
|
||
window.localStorage.setItem('sub_page_title_filter_checkbox', $(this).is(':checked'));
|
||
});
|
||
$('input[name=sub_ip_filter_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
subdomain_datatables.column(6).visible(true);
|
||
} else {
|
||
subdomain_datatables.column(6).visible(false);
|
||
}
|
||
window.localStorage.setItem('sub_ip_filter_checkbox', $(this).is(':checked'));
|
||
});
|
||
$('input[name=sub_ports_filter_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
subdomain_datatables.column(7).visible(true);
|
||
} else {
|
||
subdomain_datatables.column(7).visible(false);
|
||
}
|
||
window.localStorage.setItem('sub_ports_filter_checkbox', $(this).is(':checked'));
|
||
});
|
||
$('input[name=sub_content_length_filter_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
subdomain_datatables.column(8).visible(true);
|
||
} else {
|
||
subdomain_datatables.column(8).visible(false);
|
||
}
|
||
window.localStorage.setItem('sub_content_length_filter_checkbox', $(this).is(':checked'));
|
||
});
|
||
$('input[name=sub_response_time_filter_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
subdomain_datatables.column(10).visible(true);
|
||
} else {
|
||
subdomain_datatables.column(10).visible(false);
|
||
}
|
||
window.localStorage.setItem('sub_response_time_filter_checkbox', $(this).is(':checked'));
|
||
});
|
||
$('input[name=sub_screenshot_filter_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
subdomain_datatables.column(9).visible(true);
|
||
} else {
|
||
subdomain_datatables.column(9).visible(false);
|
||
}
|
||
window.localStorage.setItem('sub_screenshot_filter_checkbox', $(this).is(':checked'));
|
||
});
|
||
|
||
$("#subdomain_scan_results").on('click', '.btn-delete-subdomain', function() {
|
||
var subdomain_id = $(this).attr('id');
|
||
var data = {
|
||
'subdomain_ids': [subdomain_id]
|
||
};
|
||
var row = this;
|
||
Swal.fire({
|
||
showCancelButton: true,
|
||
title: 'Delete Subdomain!',
|
||
text: 'Do you really want to delete this subdomain? This action cannot be undone.',
|
||
icon: 'error',
|
||
confirmButtonText: 'Delete',
|
||
}).then((result) => {
|
||
if (result.isConfirmed) {
|
||
Swal.fire({
|
||
title: 'Deleting Subdomain...',
|
||
allowOutsideClick: false
|
||
});
|
||
swal.showLoading();
|
||
fetch('/api/action/subdomain/delete/', {
|
||
method: 'POST',
|
||
credentials: "same-origin",
|
||
headers: {
|
||
"X-CSRFToken": getCookie("csrftoken"),
|
||
'Content-Type': 'application/json'
|
||
},
|
||
body: JSON.stringify(data)
|
||
})
|
||
.then(response => response.json())
|
||
.then(function(response) {
|
||
swal.close();
|
||
if (response['status']) {
|
||
$(row).parent().parent().parent().remove();
|
||
Snackbar.show({
|
||
text: 'Subdomain successfully deleted!',
|
||
pos: 'top-right',
|
||
duration: 2500
|
||
});
|
||
} else {
|
||
Swal.fire({
|
||
title: 'Could not delete Subdomain!',
|
||
icon: 'fail',
|
||
});
|
||
}
|
||
});
|
||
}
|
||
});;
|
||
$('a[data-toggle="tooltip"]').tooltip("hide")
|
||
});
|
||
|
||
$("#subdomain_scan_results").on('click', '.btn-scan-subdomain', function() {
|
||
$('input[type=checkbox]').prop('checked', false);
|
||
$('#subscan-modal').modal('show');
|
||
var subdomain_id = $(this).attr('id');
|
||
$('a[data-toggle="tooltip"]').tooltip("hide")
|
||
$('#subtask_subdomain_id').val(subdomain_id);
|
||
// to distinguish multiple subscan or single, put a extra attribute on button
|
||
$('#btn-initiate-subtask').attr('multiple-subscan', false);
|
||
});
|
||
|
||
});
|
||
|
||
$("#pills-endpoints-tab").click(function() {
|
||
get_endpoints(scan_history=null, domain_id={{target.id}}, gf_tags=null);
|
||
});
|
||
|
||
$("#pills-vulnerabilities-tab").click(function() {
|
||
var vulnerability_table = $('#vulnerability_results').DataTable({
|
||
"destroy": true,
|
||
"oLanguage": {
|
||
"oPaginate": {
|
||
"sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>',
|
||
"sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>'
|
||
},
|
||
"sInfo": "Showing page _PAGE_ of _PAGES_",
|
||
"sSearch": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
|
||
"sSearchPlaceholder": "Search...",
|
||
"sLengthMenu": "Results : _MENU_",
|
||
},
|
||
"processing": true,
|
||
"dom": "<'row'<'col-lg-12 col-md-12 col-12 mb-2'l>>" +
|
||
"<'table-responsive'tr>" +
|
||
"<'dt--bottom-section d-sm-flex justify-content-sm-between text-center'<'dt--pages-count mb-sm-0 mb-3'i><'dt--pagination'p>>",
|
||
"stripeClasses": [],
|
||
"lengthMenu": [20, 50, 100, 500, 1000],
|
||
"pageLength": 100,
|
||
'serverSide': true,
|
||
"ajax": '/api/listVulnerability/?target_id={{target.id}}&format=datatables',
|
||
"order": [
|
||
[4, "desc"]
|
||
],
|
||
"columns": [{
|
||
'data': 'id'
|
||
},
|
||
{
|
||
'data': 'type'
|
||
},
|
||
|
||
{
|
||
'data': 'name'
|
||
},
|
||
{
|
||
'data': 'cvss_metrics'
|
||
},
|
||
{
|
||
'data': 'tags'
|
||
},
|
||
{
|
||
'data': 'hackerone_report_id'
|
||
},
|
||
|
||
{
|
||
'data': 'severity'
|
||
},
|
||
{
|
||
'data': 'cvss_score'
|
||
},
|
||
{
|
||
'data': 'cve_ids'
|
||
},
|
||
{
|
||
'data': 'cwe_ids'
|
||
},
|
||
{
|
||
'data': 'http_url'
|
||
},
|
||
|
||
{
|
||
'data': 'description'
|
||
},
|
||
{
|
||
'data': 'references'
|
||
},
|
||
|
||
{
|
||
'data': 'discovered_date'
|
||
},
|
||
|
||
{
|
||
'data': 'open_status'
|
||
},
|
||
|
||
{
|
||
'data': 'hackerone_report_id'
|
||
},
|
||
|
||
// extras
|
||
{
|
||
'data': 'extracted_results'
|
||
},
|
||
{
|
||
'data': 'curl_command'
|
||
},
|
||
{
|
||
'data': 'matcher_name'
|
||
},
|
||
],
|
||
"columnDefs": [{
|
||
"orderable": false,
|
||
"targets": [8, 11]
|
||
},
|
||
{
|
||
"targets": [3, 4, 5, 9, 12, 16, 17, 18],
|
||
"visible": false,
|
||
"searchable": true,
|
||
},
|
||
{
|
||
"className": "text-center",
|
||
"targets": []
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (row['open_status']) {
|
||
return `<div class="form-check mb-2 form-check-primary"><input type="checkbox" name="targets_checkbox['+ e + ']" class="float-start form-check-input" onchange="vuln_status_change(this, ` + data + `);">\n<span class="new-control-indicator"></span><span style="visibility:hidden">c</span></div>`;
|
||
} else {
|
||
return `<div class="form-check mb-2 form-check-primary"><input type="checkbox" checked name="targets_checkbox['+ e + ']" class="float-start form-check-input" onchange="vuln_status_change(this, ` + data + `);">\n<span class="new-control-indicator"></span><span style="visibility:hidden">c</span></div>`;
|
||
}
|
||
},
|
||
"targets": 0,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (data) {
|
||
return `<span class="badge badge-soft-primary"> ${data.toUpperCase()} </span>`;
|
||
}
|
||
},
|
||
"targets": 1,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
var tags = '';
|
||
var cvss_metrics_badge = '';
|
||
switch (row['severity']) {
|
||
case 'Info':
|
||
color = 'primary';
|
||
badge_color = 'soft-primary';
|
||
break;
|
||
case 'Low':
|
||
color = 'low';
|
||
badge_color = 'soft-warning';
|
||
break;
|
||
case 'Medium':
|
||
color = 'warning';
|
||
badge_color = 'soft-warning';
|
||
break;
|
||
case 'High':
|
||
color = 'danger';
|
||
badge_color = 'soft-danger';
|
||
break;
|
||
case 'Critical':
|
||
color = 'critical';
|
||
badge_color = 'critical';
|
||
break;
|
||
case 'Unknown':
|
||
color = 'info';
|
||
badge_color = 'soft-info';
|
||
break;
|
||
default:
|
||
}
|
||
if (row['tags']) {
|
||
tags = '<div>';
|
||
row['tags'].forEach(tag => {
|
||
tags += `<span class="badge badge-${badge_color} me-1 mb-1" data-toggle="tooltip" data-placement="top" title="Tags">${tag.name}</span>`;
|
||
});
|
||
tags += '</div>';
|
||
}
|
||
if (row['cvss_metrics']) {
|
||
cvss_metrics_badge = `<div><span class="badge badge-outline-primary my-1" data-toggle="tooltip" data-placement="top" title="CVSS Metrics">${row['cvss_metrics']}</span></div>`;
|
||
}
|
||
hackerone_report = row['hackerone_report_id'] ? `<div><a class="badge badge-soft-danger mt-1 me-1" href="https://hackerone.com/reports/${row['hackerone_report_id']}" target="_blank">Reported to hackerone</a></div>` : "";
|
||
return `<b class="text-${color}">` + data + `</b>` + cvss_metrics_badge + tags + hackerone_report;
|
||
},
|
||
"targets": 2,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
return get_severity_badge(data);
|
||
},
|
||
"targets": 6,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (data) {
|
||
if (data > 0.1 && data <= 3.9) {
|
||
badge = 'info';
|
||
} else if (data > 3.9 && data <= 6.9) {
|
||
badge = 'warning';
|
||
} else if (data > 6.9 && data <= 8.9) {
|
||
badge = 'danger';
|
||
} else {
|
||
badge = 'danger';
|
||
}
|
||
return `<span class="badge badge-outline-${badge}" data-toggle="tooltip" data-placement="top" title="CVSS Score">${data}</span>`;
|
||
}
|
||
return '';
|
||
},
|
||
"targets": 7,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
cve_cwe_badge = '<div>';
|
||
|
||
if (row['cve_ids']) {
|
||
row['cve_ids'].forEach(cve => {
|
||
cve_cwe_badge += `<a href="#" onclick="get_and_render_cve_details('${cve.name.toUpperCase()}')" class="badge badge-outline-primary me-1 mt-1" data-toggle="tooltip" data-placement="top" title="CVE ID">${cve.name.toUpperCase()}</a>`;
|
||
});
|
||
}
|
||
if (row['cwe_ids']) {
|
||
row['cwe_ids'].forEach(cwe => {
|
||
cve_cwe_badge += `<a href="https://google.com/search?q=${cwe.name.toUpperCase()}" target="_blank" class="badge badge-outline-primary me-1 mt-1" data-toggle="tooltip" data-placement="top" title="CWE ID">${cwe.name.toUpperCase()}</a>`;
|
||
});
|
||
}
|
||
return cve_cwe_badge + '</div>';
|
||
},
|
||
"targets": 8,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (data.includes('http')) {
|
||
return "<a href='" + htmlEncode(data) + "' target='_blank' class='text-danger'>" + htmlEncode(data) + "</a>";
|
||
}
|
||
return data;
|
||
},
|
||
"targets": 10,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
description = row['description'] ? `<div>${row['description']}</div>` : '';
|
||
// show extracted results, and show matcher names, matcher names can be in badges
|
||
if (row['matcher_name']) {
|
||
description += `<span class="badge badge-soft-primary" data-toggle="tooltip" data-placement="top" title="Matcher Name">${row['matcher_name']}</span>`;
|
||
}
|
||
|
||
if (row['extracted_results'] && row['extracted_results'].length > 0) {
|
||
description += `<br><a class="mt-2" data-bs-toggle="collapse" href="#results_${row['id']}" aria-expanded="false" aria-controls="results_${row['id']}">Extracted Results <i class="fe-chevron-down"></i></a>`;
|
||
description += `<div class="collapse" id="results_${row['id']}"><ul>`;
|
||
row['extracted_results'].forEach(results => {
|
||
description += `<li>${results}</li>`;
|
||
});
|
||
description += '</ul></div>';
|
||
}
|
||
|
||
if (row['references'] && row['references'].length > 0) {
|
||
description += `<br><a class="mt-2" data-bs-toggle="collapse" href="#references_${row['id']}" aria-expanded="false" aria-controls="references_${row['id']}">References <i class="fe-chevron-down"></i></a>`;
|
||
description += `<div class="collapse" id="references_${row['id']}"><ul>`;
|
||
row['references'].forEach(reference => {
|
||
description += `<li><a href="${reference.url}" target="_blank">${reference.url}</a></li>`;
|
||
});
|
||
description += '</ul></div>';
|
||
}
|
||
|
||
if (row['curl_command']) {
|
||
description += `<br><a class="mt-2" data-bs-toggle="collapse" href="#curl_command_${row['id']}" aria-expanded="false" aria-controls="curl_command_${row['id']}">CURL command <i class="fe-terminal"></i></a>`;
|
||
description += `<div class="collapse" id="curl_command_${row['id']}"><ul>`;
|
||
description += `<li><code>${htmlEncode(row['curl_command'])}</code></li>`;
|
||
description += '</ul></div>';
|
||
}
|
||
|
||
return description;
|
||
},
|
||
"targets": 11,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (data) {
|
||
return '<span class="badge badge-soft-danger"> OPEN </span>'
|
||
} else {
|
||
return '<span class="badge badge-soft-success"> RESOLVED </span>'
|
||
}
|
||
},
|
||
"targets": 14,
|
||
},
|
||
{
|
||
"render": function(data, type, row) {
|
||
if (!data) {
|
||
return `
|
||
<div class="btn-group mb-2 dropstart">
|
||
<a href="#" class="text-dark dropdown-toggle float-end" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-more-horizontal"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>
|
||
</a>
|
||
<div class="dropdown-menu" style="">
|
||
<a class="dropdown-item" href="javascript:report_hackerone(${row['id']}, '${row['severity']}');">Report to Hackerone</a>
|
||
</div>
|
||
</div>`;
|
||
} else {
|
||
return '';
|
||
}
|
||
},
|
||
"targets": 15,
|
||
},
|
||
],
|
||
drawCallback: function() {
|
||
if (!$('#vuln_type_checkbox').is(":checked")) {
|
||
vulnerability_table.column(1).visible(false);
|
||
}
|
||
|
||
if (!$('#vuln_severity_checkbox').is(":checked")) {
|
||
vulnerability_table.column(6).visible(false);
|
||
}
|
||
if (!$('#vuln_cvss_score_checkbox').is(":checked")) {
|
||
vulnerability_table.column(7).visible(false);
|
||
}
|
||
if (!$('#vuln_cve_cwe_checkbox').is(":checked")) {
|
||
vulnerability_table.column(8).visible(false);
|
||
}
|
||
if (!$('#vuln_vulnerable_url_checkbox').is(":checked")) {
|
||
vulnerability_table.column(10).visible(false);
|
||
}
|
||
if (!$('#vuln_description_checkbox').is(":checked")) {
|
||
vulnerability_table.column(11).visible(false);
|
||
}
|
||
if (!$('#vuln_discovered_on_checkbox').is(":checked")) {
|
||
vulnerability_table.column(13).visible(false);
|
||
}
|
||
if (!$('#vuln_status_checkbox').is(":checked")) {
|
||
vulnerability_table.column(14).visible(false);
|
||
}
|
||
},
|
||
createdRow: function(row, data, dataIndex) {
|
||
if (!data['open_status']) {
|
||
$(row).addClass('table-success text-strike');
|
||
}
|
||
},
|
||
});
|
||
$('#vulnerability-search-button').click(function() {
|
||
vulnerability_table.search($('#vulnerability-search').val()).draw();
|
||
});
|
||
$('#vulnerability-search-button').click(function() {
|
||
vulnerability_table.search($('#vulnerability-search').val()).draw();
|
||
});
|
||
|
||
$('input[name=vuln_type_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
vulnerability_table.column(1).visible(true);
|
||
} else {
|
||
vulnerability_table.column(1).visible(false);
|
||
}
|
||
window.localStorage.setItem('vuln_type_checkbox', $(this).is(':checked'));
|
||
});
|
||
|
||
$('input[name=vuln_severity_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
vulnerability_table.column(6).visible(true);
|
||
} else {
|
||
vulnerability_table.column(6).visible(false);
|
||
}
|
||
window.localStorage.setItem('vuln_severity_checkbox', $(this).is(':checked'));
|
||
});
|
||
|
||
$('input[name=vuln_cvss_score_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
vulnerability_table.column(7).visible(true);
|
||
} else {
|
||
vulnerability_table.column(7).visible(false);
|
||
}
|
||
window.localStorage.setItem('vuln_cvss_score_checkbox', $(this).is(':checked'));
|
||
});
|
||
|
||
$('input[name=vuln_cve_cwe_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
vulnerability_table.column(8).visible(true);
|
||
} else {
|
||
vulnerability_table.column(8).visible(false);
|
||
}
|
||
window.localStorage.setItem('vuln_cve_cwe_checkbox', $(this).is(':checked'));
|
||
});
|
||
|
||
$('input[name=vuln_vulnerable_url_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
vulnerability_table.column(10).visible(true);
|
||
} else {
|
||
vulnerability_table.column(10).visible(false);
|
||
}
|
||
window.localStorage.setItem('vuln_vulnerable_url_checkbox', $(this).is(':checked'));
|
||
});
|
||
|
||
$('input[name=vuln_description_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
vulnerability_table.column(11).visible(true);
|
||
} else {
|
||
vulnerability_table.column(11).visible(false);
|
||
}
|
||
window.localStorage.setItem('vuln_description_checkbox', $(this).is(':checked'));
|
||
});
|
||
|
||
$('input[name=vuln_discovered_on_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
vulnerability_table.column(13).visible(true);
|
||
} else {
|
||
vulnerability_table.column(13).visible(false);
|
||
}
|
||
window.localStorage.setItem('vuln_discovered_on_checkbox', $(this).is(':checked'));
|
||
});
|
||
|
||
$('input[name=vuln_status_checkbox]').change(function() {
|
||
if ($(this).is(':checked')) {
|
||
vulnerability_table.column(14).visible(true);
|
||
} else {
|
||
vulnerability_table.column(14).visible(false);
|
||
}
|
||
window.localStorage.setItem('vuln_status_checkbox', $(this).is(':checked'));
|
||
});
|
||
});
|
||
|
||
// load scan history widget
|
||
loadSubscanHistoryWidget(scan_history_id=null, domain_id={{target.id}});
|
||
|
||
get_important_subdomains(target_id={{target.id}}, scan_history_id=null);
|
||
get_recon_notes(target_id={{target.id}}, scan_history_id=null);
|
||
|
||
get_ips(scan_id=null, domain_id={{target.id}});
|
||
get_technologies(scan_id=null, domain_id={{target.id}});
|
||
get_ports(scan_id=null, domain_id={{target.id}});
|
||
|
||
var clipboard = new Clipboard('.copyable');
|
||
clipboard.on('success', function(e) {
|
||
setTooltip(e.trigger, 'Copied!');
|
||
hideTooltip(e.trigger);
|
||
});
|
||
|
||
get_most_vulnerable_target(scan_id=null, target_id={{target.id}}, ignore_info=false);
|
||
// listener for info checkbox on most vulnerable target
|
||
$('#ignore_info_most_vuln_checkbox').change(function() {
|
||
if (this.checked) {
|
||
var text_msg = 'Informational Vulnerabilities ignored in Most Vulnerable Targets.';
|
||
}
|
||
else{
|
||
var text_msg = 'Informational Vulnerabilities included in Most Vulnerable Targets.';
|
||
}
|
||
get_most_vulnerable_target(scan_id=null, target_id={{target.id}}, ignore_info=this.checked);
|
||
Snackbar.show({
|
||
text: text_msg,
|
||
pos: 'top-right',
|
||
duration: 2500
|
||
});
|
||
});
|
||
|
||
get_most_common_vulnerability(scan_id=null, target_id={{target.id}}, ignore_info=false);
|
||
// listener for info checkbox on most vulnerable target
|
||
$('#ignore_info_most_common_vuln_checkbox').change(function() {
|
||
if (this.checked) {
|
||
var text_msg = 'Informational Vulnerabilities ignored for Most Common Vulnerabilities.';
|
||
}
|
||
else{
|
||
var text_msg = 'Informational Vulnerabilities included for Most Common Vulnerabilities.';
|
||
}
|
||
get_most_common_vulnerability(scan_id=null, target_id={{target.id}}, ignore_info=this.checked);
|
||
Snackbar.show({
|
||
text: text_msg,
|
||
pos: 'top-right',
|
||
duration: 2500
|
||
});
|
||
});
|
||
|
||
|
||
var filter_cols = [
|
||
'sub_http_status_filter_checkbox',
|
||
'sub_page_title_filter_checkbox',
|
||
'sub_ip_filter_checkbox',
|
||
'sub_ports_filter_checkbox',
|
||
'sub_content_length_filter_checkbox',
|
||
'sub_response_time_filter_checkbox',
|
||
'sub_screenshot_filter_checkbox',
|
||
'vuln_type_checkbox',
|
||
'vuln_severity_checkbox',
|
||
'vuln_cvss_score_checkbox',
|
||
'vuln_cve_cwe_checkbox',
|
||
'vuln_vulnerable_url_checkbox',
|
||
'vuln_description_checkbox',
|
||
'vuln_discovered_on_checkbox',
|
||
'vuln_status_checkbox',
|
||
'end_http_status_filter_checkbox',
|
||
'end_page_title_filter_checkbox',
|
||
'end_tags_filter_checkbox',
|
||
'end_content_type_filter_checkbox',
|
||
'end_content_length_filter_checkbox',
|
||
'end_response_time_filter_checkbox',
|
||
];
|
||
|
||
for (var col in filter_cols) {
|
||
if(window.localStorage.getItem(filter_cols[col]) != null && window.localStorage.getItem(filter_cols[col]) === 'false'){
|
||
$('#' + filter_cols[col]).prop('checked', false);
|
||
}
|
||
}
|
||
|
||
var countriesData = {
|
||
{% for country in asset_countries %}
|
||
"{{country.iso}}": {{country.count}},
|
||
{% endfor %}
|
||
};
|
||
|
||
$('#world_map').vectorMap({
|
||
map: 'world_mill_en',
|
||
hoverOpacity: 0.7,
|
||
hoverColor: false,
|
||
regionStyle: {
|
||
initial: {
|
||
fill: '#d4dadd'
|
||
}
|
||
},
|
||
backgroundColor: 'transparent',
|
||
series: {
|
||
regions: [{
|
||
values: countriesData,
|
||
scale: [
|
||
{% for country in asset_countries %}
|
||
shadeColor('#2C3E50', {{country.count}}),
|
||
{% endfor %}
|
||
],
|
||
normalizeFunction: 'polynomial'
|
||
}]
|
||
},
|
||
onRegionTipShow: function(e, el, code){
|
||
if (code in countriesData) {
|
||
el.html(el.html()+' (Total Assets : '+ countriesData[code]+')');
|
||
}
|
||
else{
|
||
el.html(el.html()+' (Total Assets : 0)');
|
||
}
|
||
}
|
||
});
|
||
|
||
});
|
||
</script>
|
||
{% endblock page_level_script %}
|