mirror of
https://github.com/yogeshojha/rengine.git
synced 2026-09-29 21:24:54 +02:00
1250 lines
60 KiB
HTML
1250 lines
60 KiB
HTML
{% extends 'base/base.html' %}
|
||
{% load static %}
|
||
{% load humanize %}
|
||
{% load custom_tags %}
|
||
{% block title %}
|
||
Target Summary for {{target.name}}
|
||
{% endblock title %}
|
||
|
||
{% block custom_js_css_link %}
|
||
<link rel="stylesheet" type="text/css" href="{% static 'plugins/table/datatable/datatables.css' %}">
|
||
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/forms/theme-checkbox-radio.css' %}">
|
||
<link rel="stylesheet" type="text/css" href="{% static 'plugins/table/datatable/dt-global_style.css' %}">
|
||
<link href="{% static 'assets/css/dashboard/dash_1.css' %}" rel="stylesheet" type="text/css" />
|
||
<link href="{% static 'plugins/apex/apexcharts.css' %}" rel="stylesheet" type="text/css">
|
||
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/widgets/modules-widgets.css' %}">
|
||
<link href="{% static 'assets/css/components/tabs-accordian/custom-accordions.css' %}" rel="stylesheet" type="text/css" />
|
||
<link href="{% static 'plugins/lightbox/css/lightbox.css' %}" rel="stylesheet" />
|
||
<link rel="stylesheet" type="text/css" href="{% static 'assets/css/custom.css' %}">
|
||
<link rel="stylesheet" type="text/css" href="{% static 'custom/timeline.css' %}">
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
|
||
<link href="{% static 'plugins/sweetalerts/sweetalert2.min.css' %}" rel="stylesheet" type="text/css" />
|
||
<link href="{% static 'plugins/sweetalerts/sweetalert.css' %}" rel="stylesheet" type="text/css" />
|
||
<script src="{% static 'plugins/gridzy/gridzy.js' %}"></script>
|
||
{% 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 main_content %}
|
||
<!-- Activity Feed -->
|
||
<!-- nav menu and contents -->
|
||
|
||
<div class="row">
|
||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
|
||
<div class="simple-pills">
|
||
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
||
<li class="nav-item">
|
||
<a class="nav-link active" id="pills-summary-tab" data-toggle="pill" href="#pills-summary" role="tab" aria-controls="pills-summary" aria-selected="true">Home</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link" id="pills-subdomain-tab" data-toggle="pill" href="#pills-subdomain" role="tab" aria-controls="pills-subdomain" aria-selected="false">Subdomains</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link" id="pills-endpoints-tab" data-toggle="pill" href="#pills-endpoints" role="tab" aria-controls="pills-directories" aria-selected="false">URLs</a>
|
||
</li>
|
||
<li class="nav-item">
|
||
<a class="nav-link" id="pills-vulnerabilities-tab" data-toggle="pill" href="#pills-vulnerabilities" role="tab" aria-controls="pills-vulnerabilities" aria-selected="false">Vulnerabilities</a>
|
||
</li>
|
||
</ul>
|
||
<input type="hidden" name="summary_identifier" value="{{target.id}}" id="summary_identifier_val">
|
||
<div class="tab-content" id="pills-tabContent">
|
||
<div class="tab-pane fade show active" id="pills-summary" role="tabpanel" aria-labelledby="pills-summary-tab">
|
||
<div class="row">
|
||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
|
||
<div class="widget widget-one">
|
||
<div class="w-chart">
|
||
<div class="w-chart-section primary-card">
|
||
<div class="w-detail">
|
||
<p class="w-stats">{{scan_count|intcomma}}
|
||
<span class="float-right">
|
||
</span>
|
||
</p>
|
||
<p class="w-title">Total Scans for Target</p>
|
||
<p class="w-title text-dark">{{this_week_scan_count}} Scans this week</p>
|
||
<br>
|
||
<br>
|
||
</div>
|
||
</div>
|
||
<div class="w-chart-section primary-card">
|
||
<div class="w-detail">
|
||
<p class="w-stats">{{subdomain_count|intcomma}}
|
||
<span class="float-right">
|
||
</span>
|
||
</p>
|
||
<p class="w-title">Subdomains Discovered</p>
|
||
<p class="w-title text-success">{{alive_count}} Alive Subdomains (HTTP Status 200)</p>
|
||
<br>
|
||
<br>
|
||
</div>
|
||
</div>
|
||
<div class="w-chart-section purple-card">
|
||
<div class="w-detail">
|
||
<p class="w-stats">{{endpoint_count|intcomma}}
|
||
<span class="float-right">
|
||
<span class="badge badge-pills badge-success bs-tooltip m-1" id="added_endpoint_badge"></span>
|
||
<span class="badge badge-pills badge-danger bs-tooltip m-1" id="removed_endpoint_badge"></span>
|
||
</span>
|
||
</p>
|
||
<p class="w-title">Endpoints Discovered</p>
|
||
<p class="w-title text-success">{{endpoint_alive_count}} Alive Endpoints</p>
|
||
<br>
|
||
<br>
|
||
</div>
|
||
</div>
|
||
<div class="w-chart-section danger-card">
|
||
<div class="w-detail">
|
||
<p class="w-stats">{{vulnerability_count|intcomma}}
|
||
<span class="float-right">
|
||
</span>
|
||
</p>
|
||
<p class="w-title">Vulnerabilities Discovered</p>
|
||
<p class="w-title text-danger">{{critical_count}} Critical, {{high_count}} High, {{medium_count}} Medium</p>
|
||
<p class="w-title text-warning">{{low_count}} Low, {{info_count}} Informational Vulnerabilities</p>
|
||
<br>
|
||
</div>
|
||
</div>
|
||
<div class="w-chart-section info-card">
|
||
<div class="w-detail">
|
||
<p class="w-stats">OSINT
|
||
<span class="float-right">
|
||
</span>
|
||
</p>
|
||
<p class="w-title">{{exposed_count}} Exposed Credentials</p>
|
||
<p class="w-title text-muted">{{email_count}} Email Address Discovered</p>
|
||
<p class="w-title text-muted">{{employees_count}} Employees Found</p>
|
||
<br>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<br>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
|
||
<div class="widget widget-one">
|
||
<div class="widget-heading">
|
||
<h6 class="">
|
||
Scan Timeline
|
||
<br>
|
||
<br>
|
||
<small>
|
||
Target <span class="badge outline-badge-info">{{target.name}}</span> has been scanned <b>{{scan_count}}</b> times.
|
||
<br>
|
||
The most recent scan was performed on <span class="text-primary"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-clock"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg> {{recent_scans.0.start_scan_date}} , {{recent_scans.0.start_scan_date|naturaltime}}</span>
|
||
</small>
|
||
</h6>
|
||
</div>
|
||
<div class="widget-content">
|
||
<div class="hori-timeline mt-4">
|
||
<ul class="timelinelist-inline events">
|
||
{% for scan in recent_scans reversed %}
|
||
<li class="timelinelist-inline-item event-list">
|
||
<div class="px-4">
|
||
<div class="event-date {% if scan.scan_status == 0 %}bg-soft-danger text-danger{% elif scan.scan_status == 1 %}bg-soft-warning text-warning{% elif scan.scan_status == 2 %}bg-soft-success text-success{% elif scan.scan_status == 3 %}bg-soft-danger text-danger{% endif %}">{{scan.start_scan_date|naturaltime}}</div>
|
||
<h6>
|
||
{% if scan.scan_status == -1 %}
|
||
<span class="text-warning">[Scan Pending]</span>
|
||
{% elif scan.scan_status == 0 %}
|
||
<span class="text-danger">[Scan Failed]</span>
|
||
{% elif scan.scan_status == 1 %}
|
||
<span class="text-info">[Currently Scanning]</span>
|
||
{% elif scan.scan_status == 2 %}
|
||
<span class="text-success">[Scan Completed]</span>
|
||
{% elif scan.scan_status == 3 %}
|
||
<span class="text-danger">[Scan Aborted]</span>
|
||
{% else %}
|
||
<span class="text-danger">[Unknown]</span>
|
||
{% endif %}
|
||
</h6>
|
||
<h6>
|
||
{{scan.get_subdomain_count}} Subdomains, {{scan.get_endpoint_count}} Endpoints Discovered
|
||
<br>
|
||
|
||
{% if scan.get_subdomain_change_count.0 %}
|
||
<span class="text-success">+{{scan.get_subdomain_change_count.0}} New Subdomains</span>
|
||
{% endif %}
|
||
{% if scan.get_subdomain_change_count.1 %}
|
||
<span class="text-danger">-{{scan.get_subdomain_change_count.1}} Removed Subdomains</span>
|
||
{% endif %}
|
||
</h6>
|
||
<div>
|
||
<a href="{% url 'detail_scan' scan.id %}" class="btn btn-primary btn-sm" target="_blank">Scan Summary</a>
|
||
</div>
|
||
</div>
|
||
</li>
|
||
{% endfor %}
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing">
|
||
<div class="widget widget-timeline-log">
|
||
<div class="widget-heading">
|
||
<h6 class="">
|
||
<span id="important-count"><span class="spinner-border text-dark align-self-center loader-sm"></span></span>
|
||
Important Subdomains
|
||
</h6>
|
||
</div>
|
||
<div class="widget-content">
|
||
<div class="w-shadow-top"></div>
|
||
<div class="mt-container mx-auto">
|
||
<div id="important-subdomains-list">
|
||
</div>
|
||
</div>
|
||
<div class="w-shadow-bottom"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-6 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing">
|
||
<div class="widget widget-timeline-log">
|
||
<div class="widget-heading">
|
||
<h6 class="">
|
||
<span id="tasks-count"><span class="spinner-border text-dark align-self-center loader-sm"></span></span>
|
||
Recon Note/Todo
|
||
<!--
|
||
<span class="text-info float-right bs-tooltip" title="Add Recon Todo" onclick="add_todo_for_scanhistory_modal({{target.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>-->
|
||
</h6>
|
||
</div>
|
||
<div class="widget-content">
|
||
<div class="w-shadow-top"></div>
|
||
<div class="mt-container mx-auto">
|
||
<div id="recon-task-list">
|
||
</div>
|
||
</div>
|
||
<div class="w-shadow-bottom"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing">
|
||
<div class="widget widget-ip">
|
||
<div class="widget-heading">
|
||
<h6 class=""><span id="ip-address-count"><span class="spinner-border text-dark align-self-center loader-sm"></span></span> IP Addresses <small id="ip-address-summary"></small></h6>
|
||
<small class="text-warning">*IP Addresses highlighted with yellow are CDN IP</small>
|
||
</div>
|
||
<div class="widget-content">
|
||
<div class="mt-container mx-auto">
|
||
<div id="ip-address">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing">
|
||
<div class="widget widget-ip">
|
||
<div class="widget-heading">
|
||
<h6 class=""><span id="ports-count"><span class="spinner-border text-dark align-self-center loader-sm"></span></span> Discovered Ports </h6>
|
||
<small class="text-danger">*Ports highlighted with red are uncommon Ports.</small>
|
||
</div>
|
||
<div class="widget-content">
|
||
<div class="mt-container mx-auto">
|
||
<div id="ports">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-4 col-lg-6 col-md-6 col-sm-12 col-12 layout-spacing">
|
||
<div class="widget widget-ip">
|
||
<div class="widget-heading">
|
||
<h6 class=""><span id="technologies-count"><span class="spinner-border text-dark align-self-center loader-sm"></span></span> Discovered Technologies </h6>
|
||
</div>
|
||
<div class="widget-content">
|
||
<div class="mt-container mx-auto">
|
||
<div id="technologies">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
|
||
{% include 'base/_items/interesting_recon.html' %}
|
||
</div>
|
||
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
|
||
<div class="widget widget-activity-four">
|
||
<div class="widget-heading">
|
||
<h6 class="">Vulnerability Scan Summary</h6>
|
||
</div>
|
||
<div class="widget-content">
|
||
<div class="row">
|
||
<div class="col-xl-5 col-lg-5 col-md-12 col-sm-12 col-12">
|
||
<div id="vulnerability-chart" class=""></div>
|
||
</div>
|
||
<div class="col-xl-7 col-lg-7 col-md-12 col-sm-12 col-12">
|
||
<div class="table-responsive mt-container mx-auto">
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<th><div class="th-content">Vulnerability</div></th>
|
||
<th><div class="th-content">Severity</div></th>
|
||
<th><div class="th-content">Vulnerable URL</div></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for vulnerability in vulnerability_list %}
|
||
<tr>
|
||
<td>{{vulnerability.name}}</td>
|
||
<td>{% if vulnerability.severity == 0 %}
|
||
<span class='badge badge-info'>Info</span>
|
||
{% elif vulnerability.severity == 1 %}
|
||
<span class='badge badge-low'>Low</span>
|
||
{% elif vulnerability.severity == 2 %}
|
||
<span class='badge badge-warning'>Medium</span>
|
||
{% elif vulnerability.severity == 3 %}
|
||
<span class='badge badge-danger'>High</span>
|
||
{% elif vulnerability.severity == 4 %}
|
||
<span class='badge badge-critical'>Critical</span>
|
||
{% endif %}</td>
|
||
<td><a href="{{vulnerability.http_url}}" target="_blank" class="text-danger bs-tooltip" title="{{vulnerability.http_url}}">{{vulnerability.http_url|truncatechars:50}}</a></td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<small class="text-muted float-right">*Vulnerability list sorted by severity</small>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane fade" id="pills-subdomain" role="tabpanel" aria-labelledby="pills-subdomain-tab">
|
||
<div class="row justify-content-center">
|
||
<div class="col-xl-8 col-lg-8 col-sm-8">
|
||
<div class="wrapper">
|
||
<div class="search-input">
|
||
<a href="" target="_blank" hidden></a>
|
||
<div class="input-group">
|
||
<input type="text" class="form-control" placeholder="Filter Subdomains" aria-label="Filter Subdomains" id="subdomains-search">
|
||
<div class="input-group-append">
|
||
<button id="subdomain-search-button" class="btn btn-primary" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" 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> Search</button>
|
||
</div>
|
||
</div>
|
||
<div class="autocom-box mt-container mx-auto" id="autocom-box">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-12 col-lg-12 col-sm-12">
|
||
<div class="widget widget-content widget-content-area">
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="task-action float-right mb-4">
|
||
<div class="dropdown">
|
||
<a class="dropdown-toggle bs-tooltip" title="Download Results" href="#" role="button" id="pendingTask" data-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-download"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
|
||
</a>
|
||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="pendingTask" style="will-change: transform;">
|
||
<a class="dropdown-item" href="javascript:download_subdomains({{scan_history_id}}, '{{history.domain.name}}')">Download All Subdomains</a>
|
||
<a class="dropdown-item" href="javascript:download_interesting_subdomains({{scan_history_id}}, '{{history.domain.name}}');">Download Interesting Subdomains</a>
|
||
<a class="dropdown-item" href="javascript:download_important_subdomains({{scan_history_id}}, '{{history.domain.name}}');">Download Important Subdomains</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-12">
|
||
<table id="subdomain_scan_results" class="table dt-table-hover" style="width:100%">
|
||
<thead>
|
||
<tr>
|
||
<th class="checkbox-column">Status</th>
|
||
<th>Subdomain</th>
|
||
<th class="text-center">Endpoints</th>
|
||
<th class="text-center">Vulnerabilities</th>
|
||
<th>Status</th>
|
||
<th class="text-center">Title</th>
|
||
<th>IP Address</th>
|
||
<th>Ports</th>
|
||
<th>Content Length</th>
|
||
<th>Screenshot</th>
|
||
<th>Response Time</th>
|
||
<th>Technology</th>
|
||
<th>Checked</th>
|
||
<th>HTTP URL</th>
|
||
<th>CNAME</th>
|
||
<th>is_interesting</th>
|
||
<th>Info</th>
|
||
<th>Low</th>
|
||
<th>Medium</th>
|
||
<th>High</th>
|
||
<th>Critical</th>
|
||
<th>Todos</th>
|
||
<th>Is Important</th>
|
||
<th>Webserver</th>
|
||
<th>Content Type</th>
|
||
</tr>
|
||
</thead>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane fade" id="pills-endpoints" role="tabpanel" aria-labelledby="pills-endpoints-tab">
|
||
<div class="row justify-content-center">
|
||
<div class="col-xl-8 col-lg-8 col-sm-8">
|
||
<div class="wrapper">
|
||
<div class="search-input" id="endpoint-search-input">
|
||
<a href="" target="_blank" hidden></a>
|
||
<div class="input-group">
|
||
<input type="text" class="form-control" placeholder="Filter Endpoints" aria-label="Filter Endpoints" id="endpoints-search">
|
||
<div class="input-group-append">
|
||
<button id="endpoint-search-button" class="btn btn-primary" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" 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> Search</button>
|
||
</div>
|
||
</div>
|
||
<div class="autocom-box mt-container mx-auto" id="autocom-box">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-12 col-lg-12 col-sm-12">
|
||
<div class="widget widget-content widget-content-area br-6">
|
||
<div class="row">
|
||
<div class="col-12">
|
||
<div class="task-action float-right mb-4">
|
||
<div class="dropdown">
|
||
<a class="dropdown-toggle bs-tooltip" title="Download Results" href="#" role="button" id="pendingTask" data-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-download"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
|
||
</a>
|
||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="pendingTask" style="will-change: transform;">
|
||
<a class="dropdown-item" href="javascript:download_endpoints({{scan_history_id}}, '{{history.domain.name}}')">Download All Endpoints</a>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-12">
|
||
<table class="multi-table table table-striped table-bordered table-hover" style="width:100%" id="endpoint_results">
|
||
<thead>
|
||
<tr>
|
||
<th>ID</th>
|
||
<th>HTTP URL</th>
|
||
<th>Status</th>
|
||
<th>Page Title</th>
|
||
<th>Tags</th>
|
||
<th>Content Type</th>
|
||
<th>Content Length</th>
|
||
<th>Technology</th>
|
||
<th>Webserver</th>
|
||
<th>Response time</th>
|
||
</tr>
|
||
</thead>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="tab-pane fade" id="pills-vulnerabilities" role="tabpanel" aria-labelledby="pills-vulnerabilities-tab">
|
||
<div class="row justify-content-center">
|
||
<div class="col-xl-8 col-lg-8 col-sm-8">
|
||
<div class="wrapper">
|
||
<div class="search-input" id="vulnerability-search-input">
|
||
<a href="" target="_blank" hidden></a>
|
||
<div class="input-group">
|
||
<input type="text" class="form-control" placeholder="Filter Vulnerabilities" aria-label="Filter Vulnerabilities" id="vulnerability-search">
|
||
<div class="input-group-append">
|
||
<button id="vulnerability-search-button" class="btn btn-primary" type="button"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" 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> Search</button>
|
||
</div>
|
||
</div>
|
||
<div class="autocom-box mt-container mx-auto" id="autocom-box">
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="col-xl-12 col-lg-12 col-sm-12">
|
||
<div class="widget">
|
||
<div class="widget-content">
|
||
<table class="multi-table table table-striped table-bordered table-hover non-hover" style="width:100%" id="vulnerability_results">
|
||
<thead>
|
||
<tr>
|
||
<th class="checkbox-column">Status</th>
|
||
<th>Title</th>
|
||
<th class="text-center">Severity</th>
|
||
<th>Vulnerable URL</th>
|
||
<th>Description</th>
|
||
<th>Status</th>
|
||
<th>Matcher Name</th>
|
||
<th>Discovered Date</th>
|
||
<th>Tags</th>
|
||
<th>Description</th>
|
||
<th>Reference</th>
|
||
<th class="text-center dt-no-sorting">Action</th>
|
||
</tr>
|
||
</thead>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{% endblock main_content %}
|
||
|
||
{% block page_level_script %}
|
||
<script src="{% static 'note/js/todo.js' %}"></script>
|
||
<script src="{% static 'plugins/table/datatable/datatables.js' %}"></script>
|
||
<script src="//cdn.datatables.net/1.10.16/js/dataTables.bootstrap4.min.js"></script>
|
||
<script src="{% static 'plugins/apex/apexchart.min.js' %}"></script>
|
||
<script src="{% static 'assets/js/dashboard/dash_1.js' %}"></script>
|
||
<script src="{% static 'assets/js/clipboard/clipboard.min.js' %}"></script>
|
||
<script src="{% static 'plugins/lightbox/js/lightbox.js' %}"></script>
|
||
<script src="{% static 'targetApp/js/target_summary.js' %}"></script>
|
||
<script src="{% static 'custom/todo.js' %}"></script>
|
||
<script src="{% static 'startScan/js/datatables-suggestions.js' %}"></script>
|
||
<script src="{% static 'startScan/js/endpoint-datatables-suggestions.js' %}"></script>
|
||
<script src="{% static 'startScan/js/vulnerability-datatables-suggestions.js' %}"></script>
|
||
<script src="{% static 'plugins/sweetalerts/sweetalert2.min.js' %}"></script>
|
||
<script src="{% static 'plugins/sweetalerts/custom-sweetalert.js' %}"></script>
|
||
<script src="{% static 'custom/custom.js' %}"></script>
|
||
<script type="text/javascript">
|
||
get_important_subdomains({{target.id}}, null)
|
||
get_recon_notes({{target.id}}, null)
|
||
// apex charts for vulnerability summary
|
||
var options = {
|
||
chart: {
|
||
type: 'donut',
|
||
width: 380
|
||
},
|
||
colors: ['#D50000', '#F44336', '#FF6D00', '#FFD600', '#2962FF'],
|
||
dataLabels: {
|
||
enabled: false
|
||
},
|
||
legend: {
|
||
position: 'bottom',
|
||
horizontalAlign: 'center',
|
||
fontSize: '14px',
|
||
markers: {
|
||
width: 10,
|
||
height: 10,
|
||
},
|
||
itemMargin: {
|
||
horizontal: 0,
|
||
vertical: 8
|
||
}
|
||
},
|
||
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}}],
|
||
labels: ['Critical', 'High', 'Medium', 'Low', 'Info'],
|
||
responsive: [{
|
||
breakpoint: 1599,
|
||
options: {
|
||
chart: {
|
||
width: '350px',
|
||
height: '400px'
|
||
},
|
||
legend: {
|
||
position: 'bottom'
|
||
}
|
||
},
|
||
breakpoint: 1439,
|
||
options: {
|
||
chart: {
|
||
width: '250px',
|
||
height: '390px'
|
||
},
|
||
legend: {
|
||
position: 'bottom'
|
||
},
|
||
plotOptions: {
|
||
pie: {
|
||
donut: {
|
||
size: '65%',
|
||
}
|
||
}
|
||
}
|
||
},
|
||
}]
|
||
}
|
||
var chart = new ApexCharts(
|
||
document.querySelector("#vulnerability-chart"),
|
||
options
|
||
);
|
||
chart.render();
|
||
// get interesting subdomain
|
||
get_interesting_subdomains({{target.id}}, null);
|
||
// get interesting endpoint
|
||
get_interesting_endpoint({{target.id}}, null);
|
||
$("#pills-subdomain-tab").click(function() {
|
||
var subdomain_datatables = $('#subdomain_scan_results').DataTable({
|
||
"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="2" 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="2" 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_",
|
||
"sLengthMenu": "Results : _MENU_",
|
||
"sProcessing": "Processing... Please wait..."
|
||
},
|
||
"stripeClasses": [],
|
||
"lengthMenu": [20, 50, 100, 500, 1000],
|
||
"pageLength": 20,
|
||
'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': 'checked'},
|
||
{'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'},
|
||
],
|
||
"columnDefs": [
|
||
{ "orderable": false, "targets": [2, 3, 6, 7, 9]},
|
||
{
|
||
"targets": [ 2, 3, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22],
|
||
"visible": false,
|
||
"searchable": false,
|
||
},
|
||
{
|
||
"targets": [ 11, 13, 22, 23, 24 ],
|
||
"visible": false,
|
||
"searchable": true,
|
||
},
|
||
{"className": "text-center", "targets": [2, 3, 4, 8, 10]},
|
||
// checkbox
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
if(row['checked']){
|
||
return `<label class="new-control new-checkbox checkbox-outline-info m-auto">
|
||
<input type="checkbox" class="new-control-input child-chk select-customers-info" checked onchange="subdomain_status_change(this, `+data+`);">
|
||
<span class="new-control-indicator"></span><span style="visibility:hidden">c</span>
|
||
</label>`;
|
||
}
|
||
else{
|
||
return `<label class="new-control new-checkbox checkbox-outline-info m-auto">
|
||
<input type="checkbox" class="new-control-input child-chk select-customers-info" onchange="subdomain_status_change(this, `+data+`);">
|
||
<span class="new-control-indicator"></span><span style="visibility:hidden">c</span>
|
||
</label>`;
|
||
}
|
||
},
|
||
"targets": 0,
|
||
},
|
||
// subdomain Name
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
badges = '';
|
||
tech_badge = '';
|
||
interesting_badge = '';
|
||
content_type = '';
|
||
web_server = '';
|
||
if (row['technologies']){
|
||
tech_badge = `</br>` + parse_technology(row['technologies'], "info", outline=true, scan_id=0);
|
||
}
|
||
if(row['is_interesting'])
|
||
{
|
||
interesting_badge = "<span class='m-1 badge badge-pills badge-danger'>Interesting</span>"
|
||
}
|
||
|
||
if (row['content_type']) {
|
||
content_type = `<span class='m-1 badge badge-pills outline-badge-warning bs-tooltip' title="Content Type">${row['content_type']}</span>`;
|
||
}
|
||
|
||
if (row['webserver']) {
|
||
web_server = `<span class='m-1 badge badge-pills outline-badge-secondary bs-tooltip' title="Web Server">${row['webserver']}</span>`;
|
||
}
|
||
|
||
badges = interesting_badge + '</br>';
|
||
|
||
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 outline-badge-danger m-1" onclick="list_subdomain_todos(${row['id']}, '${row['name']}')">${todo_icon} ${row['todos_count']} Todos </span>`
|
||
}
|
||
|
||
important_badge = '';
|
||
if (row['is_important']) {
|
||
important_badge = `
|
||
<span id="important_subdomain_${row['id']}" class="text-danger bs-tooltip" title="Important Subdomain">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-alert-triangle"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>
|
||
</span>
|
||
`;
|
||
}
|
||
|
||
endpoint_count_badge = '';
|
||
if (row['endpoint_count']) {
|
||
endpoint_count_badge = `<span class="pl-2 pr-2 ml-1 mr-1 float-right badge badge-pills badge-primary badge-link bs-tooltip" title="Endpoints" onclick="get_endpoint_modal(null, '${row['name']}')">${row['endpoint_count']}</span>`
|
||
}
|
||
|
||
vuln_count_badge = '';
|
||
info_badge = `<span class='pl-2 pr-2 ml-1 mr-1 float-right badge badge-pills badge-info bs-tooltip badge-link' title="Informational Vulnerabilities" onclick="get_vulnerability_modal(null, 0, '${row['name']}')">${row['info_count']}</span>`;
|
||
low_badge = `<span class='pl-2 pr-2 ml-1 mr-1 float-right badge badge-pills badge-low bs-tooltip badge-link' title=" Low Severity Vulnerabilities" onclick="get_vulnerability_modal(null, 1, '${row['name']}')">${row['low_count']}</span>`;
|
||
medium_badge = `<span class='pl-2 pr-2 ml-1 mr-1 float-right badge badge-pills badge-warning bs-tooltip badge-link' title="Medium Severity Vulnerabilities" onclick="get_vulnerability_modal(null, 2, '${row['name']}')">${row['medium_count']}</span>`;
|
||
high_badge = `<span class='pl-2 pr-2 ml-1 mr-1 float-right badge badge-pills badge-danger bs-tooltip badge-link' title="High Severity Vulnerabilities" onclick="get_vulnerability_modal(null, 3, '${row['name']}')">${row['high_count']}</span>`;
|
||
critical_badge = `<span class='pl-2 pr-2 ml-1 mr-1 float-right badge badge-pills badge-critical bs-tooltip badge-link' title="Critical Vulnerabilities" onclick="get_vulnerability_modal(null, 4, '${row['name']}')">${row['critical_count']}</span>`;
|
||
vuln_count_badge = (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 : '');
|
||
|
||
|
||
|
||
action_icons = `
|
||
<br />
|
||
<div class="float-left subdomain-table-action-icons mt-2">
|
||
<span class="m-1">
|
||
<a href="javascript:;" data-clipboard-action="copy" class="badge-link text-info copyable text-primary" data-toggle="tooltip" data-placement="top" title="Copy Subdomain!" data-clipboard-target="#subdomain-${row['id']}">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></span>
|
||
</a>
|
||
<!--
|
||
<span class="m-1 badge-link text-success bs-tooltip" title="Add Recon Todo/Note" onclick="add_task_for_subdomain(${row['id']}, '${data}')"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus-circle"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="16"></line><line x1="8" y1="12" x2="16" y2="12"></line></svg></span>-->
|
||
<span class="m-1 badge-link text-danger bs-tooltip" title="Mark Important" onclick="mark_important_subdomain(${row['id']}, true)">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-star"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"></polygon></svg>
|
||
</span>
|
||
</div>
|
||
`;
|
||
|
||
tech_badge += content_type;
|
||
tech_badge += web_server;
|
||
|
||
if (row['http_url']) {
|
||
if (row['cname']) {
|
||
return badges + `<div class="clipboard copy-txt"><a href="`+row['http_url']+`" class="text-info" target="_blank"><span id='subdomain-${row['id']}'>`+ important_badge + data +`</span></a>`+ endpoint_count_badge + vuln_count_badge +`<br><span class="text-dark">CNAME<br><span class="text-warning"> ❯ </span>` + row['cname'].replace(',', '<br><span class="text-warning"> ❯ </span>') + tech_badge + todo_badge + action_icons + `</div>`;
|
||
}
|
||
return badges + `<div class="clipboard copy-txt"><a href="`+row['http_url']+`" class="text-info" target="_blank"><span id='subdomain-${row['id']}'>`+ important_badge + data + `</span></a>` + endpoint_count_badge + vuln_count_badge + tech_badge + todo_badge + action_icons + `</div>`;
|
||
}
|
||
return badges + `<div class="clipboard copy-txt"><a href="https://`+data+`" class="text-info" target="_blank"><span id='subdomain-${row['id']}'>`+ important_badge + data + `</span></a>` + endpoint_count_badge + vuln_count_badge + tech_badge + todo_badge + action_icons + `</div>`;
|
||
},
|
||
"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 badge-pills badge-success'>"+data+"</span>";
|
||
}
|
||
else if (data >= 300 && data < 400) {
|
||
return "<span class='badge badge-pills badge-warning'>"+data+"</span>";
|
||
}
|
||
else if (data == 0){
|
||
// datatable throws error when no data is returned
|
||
return "";
|
||
}
|
||
return `<span class='badge badge-pills badge-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-pills outline-badge-warning badge-link' title="CDN IP Address" onclick="get_ip_details('${value.address}')">${value.address}</span>`
|
||
}
|
||
else{
|
||
ip_badge += `<span class='m-1 badge badge-pills outline-badge-info badge-link' onclick="get_ip_details('${value.address}')">${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' : 'info';
|
||
title = port_obj['is_uncommon'] ? 'Uncommon Port - ' + port_obj['description'] : port_obj['description'];
|
||
port_badge += `<span class='m-1 badge badge-pills outline-badge-${badge_color} bs-tooltip badge-link' title='${title}' onclick="get_port_details(${port_obj['number']})">${port_obj['number']}/${port_obj['service_name']}</span>`
|
||
}
|
||
}
|
||
return port_badge;
|
||
}
|
||
return "";
|
||
},
|
||
"targets": 7,
|
||
},
|
||
// 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,
|
||
},
|
||
],
|
||
"dom": "<'row'<'col-lg-12 col-md-12 col-12 mb-2'l>>" +
|
||
"<'row'<'col'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 () {
|
||
$('.t-dot').tooltip({ template: '<div class="tooltip status" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>' })
|
||
$('.badge').tooltip({ template: '<div class="tooltip status" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>' })
|
||
$('.bs-tooltip').tooltip();
|
||
var clipboard = new Clipboard('.copyable');
|
||
clipboard.on('success', function(e) {
|
||
setTooltip(e.trigger, 'Copied!');
|
||
hideTooltip(e.trigger);
|
||
});
|
||
// get screenshot size from localStorage
|
||
var elements = document.getElementsByClassName("screenshot");
|
||
screenshot_size = localStorage.getItem('screenshotSize');
|
||
if (screenshot_size){
|
||
for (index = 0; index < elements.length; ++index) {
|
||
elements[index].setAttribute("height", screenshot_size);
|
||
elements[index].setAttribute("width", screenshot_size);
|
||
}
|
||
}
|
||
else{
|
||
for (index = 0; index < elements.length; ++index) {
|
||
elements[index].setAttribute("height", "200px");
|
||
elements[index].setAttribute("width", "200px");
|
||
}
|
||
}
|
||
},
|
||
'createdRow': function( row, data, dataIndex ) {
|
||
if (data['checked']){
|
||
$(row).addClass('table-secondary text-strike');
|
||
}
|
||
},
|
||
});
|
||
// when search button pressed
|
||
$('#subdomain-search-button').click(function () {
|
||
subdomain_datatables.search($('#subdomains-search').val()).draw() ;
|
||
});
|
||
|
||
});
|
||
|
||
$("#pills-endpoints-tab").click(function() {
|
||
var endpoint_table = $('#endpoint_results').DataTable({
|
||
"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="2" 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="2" 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_",
|
||
"sLengthMenu": "Results : _MENU_",
|
||
"sProcessing": "Processing... Please wait..."
|
||
},
|
||
"dom": "<'row'<'col-lg-12 col-md-12 col-12 mb-2'l>>" +
|
||
"<'row'<'col'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": 20,
|
||
'serverSide': true,
|
||
"ajax": '/api/listEndpoints/?target_id={{target.id}}&format=datatables',
|
||
"order": [[ 6, "desc" ]],
|
||
"columns": [
|
||
{'data': 'id'},
|
||
{'data': 'http_url'},
|
||
{'data': 'http_status'},
|
||
{'data': 'page_title'},
|
||
{'data': 'matched_gf_patterns'},
|
||
{'data': 'content_type'},
|
||
{'data': 'content_length', 'searchable': false},
|
||
{'data': 'technologies'},
|
||
{'data': 'webserver'},
|
||
{'data': 'response_time', 'searchable': false},
|
||
],
|
||
"columnDefs": [
|
||
{
|
||
"targets": [ 0 ],
|
||
"visible": false,
|
||
"searchable": false,
|
||
},
|
||
{
|
||
"targets": [ 7, 8 ],
|
||
"visible": false,
|
||
"searchable": true,
|
||
},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
tech_badge = '';
|
||
web_server = '';
|
||
if (row['technologies']){
|
||
tech_badge = `</br>` + parse_technology(row['technologies'], "info", outline=true);
|
||
}
|
||
|
||
if (row['webserver']) {
|
||
web_server = `<span class='m-1 badge badge-pills outline-badge-secondary bs-tooltip' title="Web Server">${row['webserver']}</span>`;
|
||
}
|
||
|
||
var url = split(data, 70);
|
||
action_icons = `
|
||
<div class="float-left subdomain-table-action-icons mt-2">
|
||
<span class="m-1">
|
||
<a href="javascript:;" data-clipboard-action="copy" class="badge-link text-info copyable text-primary" data-toggle="tooltip" data-placement="top" title="Copy Url!" data-clipboard-target="#url-${row['id']}">
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather feather-copy"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg></span>
|
||
</a>
|
||
</div>
|
||
`;
|
||
tech_badge += web_server;
|
||
|
||
return `<div class="clipboard copy-txt">` + "<a href='"+ data +`' id="url-${row['id']}" target='_blank' class='text-info'>`+ url +"</a>" + tech_badge + "<br>" + action_icons ;
|
||
},
|
||
"targets": 1,
|
||
},
|
||
{
|
||
"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 badge-pills badge-success'>"+data+"</span>";
|
||
}
|
||
else if (data >= 300 && data < 400) {
|
||
return "<span class='badge badge-pills badge-warning'>"+data+"</span>";
|
||
}
|
||
else if (data == 0){
|
||
// datatable throws error when no data is returned
|
||
return "";
|
||
}
|
||
return "<span class='badge badge-pills badge-danger'>"+data+"</span>";
|
||
|
||
},
|
||
"targets": 2,
|
||
},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
if (data){
|
||
return parse_comma_values_into_span(data, "info");
|
||
}
|
||
return "";
|
||
},
|
||
"targets": 8,
|
||
},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
if (data){
|
||
return parse_comma_values_into_span(data, "danger", outline=true);
|
||
}
|
||
return "";
|
||
},
|
||
"targets": 4,
|
||
},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
if (data){
|
||
return get_response_time_text(data);
|
||
}
|
||
return "";
|
||
},
|
||
"targets": 9,
|
||
},
|
||
],
|
||
drawCallback: function () {
|
||
$('.t-dot').tooltip({ template: '<div class="tooltip status" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>' })
|
||
$('.dataTables_wrapper table').removeClass('table-striped');
|
||
$('.bs-tooltip').tooltip();
|
||
var clipboard = new Clipboard('.copyable');
|
||
clipboard.on('success', function(e) {
|
||
setTooltip(e.trigger, 'Copied!');
|
||
hideTooltip(e.trigger);
|
||
});
|
||
}
|
||
});
|
||
$('#endpoint-search-button').click(function () {
|
||
endpoint_table.search($('#endpoints-search').val()).draw() ;
|
||
});
|
||
});
|
||
|
||
$("#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="2" 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="2" 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_",
|
||
"sLengthMenu": "Results : _MENU_",
|
||
"sProcessing": "Processing... Please wait..."
|
||
},
|
||
"processing": true,
|
||
"dom": "<'row'<'col-lg-12 col-md-12 col-12 mb-2'l>>" +
|
||
"<'row'<'col'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": 20,
|
||
'serverSide': true,
|
||
"ajax": '/api/listVulnerability/?target_id={{target.id}}&format=datatables',
|
||
"order": [[ 2, "desc" ]],
|
||
"columns": [
|
||
{'data': 'id'},
|
||
{'data': 'name'},
|
||
{'data': 'severity'},
|
||
{'data': 'http_url'},
|
||
{'data': 'extracted_results'},
|
||
{'data': 'open_status'},
|
||
{'data': 'matcher_name'},
|
||
{'data': 'discovered_date'},
|
||
{'data': 'tags'},
|
||
{'data': 'description'},
|
||
{'data': 'reference'},
|
||
{'data': 'hackerone_report_id'},
|
||
],
|
||
"columnDefs": [
|
||
{ "orderable": false, "targets": [4, 9, 10, 11]},
|
||
{
|
||
"targets": [ 6, 7, 8, 9, 10 ],
|
||
"visible": false,
|
||
"searchable": true,
|
||
},
|
||
{"className": "text-center", "targets": [0, 2, 5, 11]},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
if(row['open_status']){
|
||
return `<label class="new-control new-checkbox checkbox-outline-info m-auto">
|
||
<input type="checkbox" class="new-control-input child-chk select-customers-info" onchange="vuln_status_change(this, `+data+`);">
|
||
<span class="new-control-indicator"></span><span style="visibility:hidden">c</span>
|
||
</label>`;
|
||
}
|
||
else{
|
||
return `<label class="new-control new-checkbox checkbox-outline-info m-auto">
|
||
<input type="checkbox" class="new-control-input child-chk select-customers-info" checked onchange="vuln_status_change(this, `+data+`);">
|
||
<span class="new-control-indicator"></span><span style="visibility:hidden">c</span>
|
||
</label>`;
|
||
}
|
||
},
|
||
"targets": 0,
|
||
},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
var tags_span ="";
|
||
switch (row['severity']) {
|
||
case 'Info':
|
||
color = 'info'
|
||
break;
|
||
case 'Low':
|
||
color = 'low'
|
||
break;
|
||
case 'Medium':
|
||
color = 'warning'
|
||
break;
|
||
case 'High':
|
||
color = 'danger'
|
||
break;
|
||
case 'Critical':
|
||
color = 'critical'
|
||
break;
|
||
default:
|
||
}
|
||
if (row['tags']) {
|
||
var badge = "<span class='badge badge-pill outline-badge-"+color+" m-1'>";
|
||
row['tags'].split(/\s*,\s*/).forEach(function(split_vals) {
|
||
tags_span+=badge + split_vals + "</span>";
|
||
});
|
||
}
|
||
hackerone_report = row['hackerone_report_id'] ? `<br><a class="badge outline-badge-danger m-2" href="https://hackerone.com/reports/${row['hackerone_report_id']}" target="_blank">Reported to hackerone</a>` : "";
|
||
return `<b class="text-${color}">` + data + `</b>` + `<br/>` + tags_span + hackerone_report + `<br><small>Last Seen:` + row['discovered_date'] + "</small>";
|
||
},
|
||
"targets": 1,
|
||
},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
switch (data) {
|
||
case 'Info':
|
||
return "<span class='badge badge-info'>Info</span>";
|
||
break;
|
||
case 'Low':
|
||
return "<span class='badge badge-low'>Low</span>";
|
||
break;
|
||
case 'Medium':
|
||
return "<span class='badge badge-warning'>Medium</span>";
|
||
break;
|
||
case 'High':
|
||
return "<span class='badge badge-danger'>High</span>";
|
||
break;
|
||
case 'Critical':
|
||
return "<span class='badge badge-critical'>Critical</span>";
|
||
break;
|
||
default:
|
||
return "";
|
||
}
|
||
},
|
||
"targets": 2,
|
||
},
|
||
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
return "<a href='"+htmlEncode(data)+"' target='_blank' class='text-danger'>"+htmlEncode(data)+"</a>";
|
||
},
|
||
"targets": 3,
|
||
},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
extracted_results = row['extracted_results'] ? row['extracted_results'] + `</br>` : "";
|
||
matcher_name = row['matcher_name'] ? row['matcher_name'] + `</br>` : "";
|
||
description = row['description'] ? row['description'] + `</br>` : "";
|
||
reference = row['reference'] ? `<a href=${row['reference']} class='text-info' target='_blank'>Read More...</a>` : "";
|
||
return extracted_results + matcher_name + description + reference;
|
||
},
|
||
"targets": 4,
|
||
},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
if (data){
|
||
return '<div class="t-dot bg-danger" data-toggle="tooltip" data-placement="top" title="" data-original-title="Open"></div>'
|
||
}
|
||
else{
|
||
return '<div class="t-dot bg-success" data-toggle="tooltip" data-placement="top" title="" data-original-title="Closed"></div>'
|
||
}
|
||
},
|
||
"targets": 5,
|
||
},
|
||
{
|
||
"render": function ( data, type, row ) {
|
||
if (!data){
|
||
return `<div class="dropdown">
|
||
<a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink${row['id']}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
|
||
<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" aria-labelledby="dropdownMenuLink6">
|
||
<a class="dropdown-item" href="javascript:report_hackerone(${row['id']}, '${row['severity']}');">Report to Hackerone</a>
|
||
</div>
|
||
</div>`;
|
||
}
|
||
else{
|
||
return '';
|
||
}
|
||
},
|
||
"targets": 11,
|
||
},
|
||
],
|
||
drawCallback: function () {
|
||
$('.t-dot').tooltip({ template: '<div class="tooltip status" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>' })
|
||
$('.dataTables_wrapper table').removeClass('table-striped');
|
||
},
|
||
createdRow: function( row, data, dataIndex ) {
|
||
if (!data['open_status']){
|
||
$(row).addClass('table-secondary text-strike');
|
||
}
|
||
},
|
||
});
|
||
$('#vulnerability-search-button').click(function () {
|
||
vulnerability_table.search($('#vulnerability-search').val()).draw() ;
|
||
});
|
||
});
|
||
|
||
$.getJSON(`/api/queryIps/?target_id={{target.id}}&format=json`, function(data) {
|
||
$('#ip-address-count').empty();
|
||
for (var val in data['ips']){
|
||
ip = data['ips'][val]
|
||
badge_color = ip['is_cdn'] ? 'warning' : 'info';
|
||
$("#ip-address").append(`<span class='badge outline-badge-${badge_color} badge-pills m-1 badge-link' data-toggle="tooltip" title="${ip['ports'].length} Ports Open." onclick="get_ip_details('${ip['address']}', {{target.id}}})">${ip['address']}</span>`);
|
||
// $("#ip-address").append(`<span class='badge outline-badge-${badge_color} badge-pills m-1' data-toggle="modal" data-target="#tabsModal">${ip['address']}</span>`);
|
||
}
|
||
$('#ip-address-count').html(`<span class="badge outline-badge-dark">${data['ips'].length}</span>`);
|
||
$("body").tooltip({ selector: '[data-toggle=tooltip]' });
|
||
});
|
||
|
||
$.getJSON(`/api/queryPorts/?target_id={{target.id}}&format=json`, function(data) {
|
||
$('#ports-count').empty();
|
||
for (var val in data['ports']){
|
||
port = data['ports'][val]
|
||
badge_color = port['is_uncommon'] ? 'danger' : 'info';
|
||
$("#ports").append(`<span class='badge outline-badge-${badge_color} badge-pills m-1 badge-link' data-toggle="tooltip" title="${port['description']}" onclick="get_port_details('${port['number']}', {{target.id}})">${port['number']}/${port['service_name']}</span>`);
|
||
}
|
||
$('#ports-count').html(`<span class="badge outline-badge-dark">${data['ports'].length}</span>`);
|
||
$("body").tooltip({ selector: '[data-toggle=tooltip]' });
|
||
});
|
||
|
||
$.getJSON(`/api/queryTechnologies/?target_id={{target.id}}&format=json`, function(data) {
|
||
$('#technologies-count').empty();
|
||
for (var val in data['technologies']){
|
||
tech = data['technologies'][val]
|
||
$("#technologies").append(`<span class='badge outline-badge-info badge-pills m-1 badge-link' data-toggle="tooltip" title="${tech['count']} Subdomains use this technology." onclick="get_tech_details('${tech['name']}', {{target.id}})">${tech['name']}</span>`);
|
||
}
|
||
$('#technologies-count').html(`<span class="badge outline-badge-dark">${data['technologies'].length}</span>`);
|
||
$("body").tooltip({ selector: '[data-toggle=tooltip]' });
|
||
});
|
||
|
||
</script>
|
||
|
||
{% endblock page_level_script %}
|