scheduling and jobs, new dataclasses and such better UDP handling

This commit is contained in:
2025-10-17 16:49:30 -05:00
parent 9956667c8f
commit 41306801ae
13 changed files with 771 additions and 169 deletions

View File

@@ -11,7 +11,7 @@
<tr>
<td style="padding:10px;background:#0f172a;border-radius:10px;color:#e2e8f0">
<div style="font-size:18px;font-weight:700;margin-bottom:4px">Compliance Report</div>
<div style="font-size:12px;color:#94a3b8">Generated: 2025-10-17 17:19:25</div>
<div style="font-size:12px;color:#94a3b8">Generated: 2025-10-17 21:42:08</div>
</td>
</tr>
</table>
@@ -19,20 +19,23 @@
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="margin:0 0 16px 0">
<tr>
<td style="padding:10px;border:1px solid #e5e7eb;border-radius:8px">
Total hosts: <strong>3</strong>&nbsp;
Total hosts: <strong>2</strong>&nbsp;
Matching expected: <strong>2</strong>&nbsp;
With issues: <strong>1</strong>
With issues: <strong>0</strong>
</td>
</tr>
</table>
<div style="margin:8px 0;color:#64748b">
No hosts with issues found. ✅
</div>
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="margin:0 0 18px 0">
<tr>
<td colspan="4" style="padding:12px 10px;background:#0f172a;color:#e2e8f0;font-weight:600;font-size:14px;border-radius:8px">
10.10.99.10 (git.sneakygeek.net) <span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#16a34a;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">OK</span> </td>
10.10.20.4 <span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#16a34a;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">OK</span> </td>
</tr>
<tr>
@@ -45,67 +48,7 @@
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="margin:0 0 18px 0">
<tr>
<td colspan="4" style="padding:12px 10px;background:#0f172a;color:#e2e8f0;font-weight:600;font-size:14px;border-radius:8px">
10.10.99.2 <span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#ef4444;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">ISSUES</span> </td>
</tr>
<tr>
<td colspan="4" style="padding:10px 10px 6px 10px;font-size:13px">
<span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#ef4444;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">ISSUES</span>
</td>
</tr>
<tr>
<td colspan="4" style="padding:4px 10px 6px 10px;font-size:13px">
<strong>Unexpected TCP open ports:</strong> 80
</td>
</tr>
<tr>
<td colspan="4" style="padding:4px 10px 6px 10px;font-size:13px">
<strong>Expected TCP ports not seen:</strong> 222, 3000
</td>
</tr>
<tr>
<td colspan="4" style="padding:4px 10px 6px 10px;font-size:13px">
<strong>Unexpected UDP open ports:</strong> none
</td>
</tr>
<tr>
<td colspan="4" style="padding:4px 10px 6px 10px;font-size:13px">
<strong>Expected UDP ports not seen:</strong> none
</td>
</tr>
<tr>
<td colspan="4" style="padding:8px 10px 6px 10px;font-size:13px">
<div style="font-weight:600;margin:8px 0">Discovered Ports</div>
</td>
</tr>
<tr>
<td style="padding:8px 10px;border:1px solid #e5e7eb;background:#f8fafc;font-weight:600">Protocol</td>
<td style="padding:8px 10px;border:1px solid #e5e7eb;background:#f8fafc;font-weight:600">Port</td>
<td style="padding:8px 10px;border:1px solid #e5e7eb;background:#f8fafc;font-weight:600">State</td>
<td style="padding:8px 10px;border:1px solid #e5e7eb;background:#f8fafc;font-weight:600">Service</td>
</tr>
<tr>
<td style="padding:6px 10px;border:1px solid #e5e7eb"><span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#334155;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">tcp</span></td>
<td style="padding:6px 10px;border:1px solid #e5e7eb">22</td>
<td style="padding:6px 10px;border:1px solid #e5e7eb"><span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#16a34a;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">open</span></td>
<td style="padding:6px 10px;border:1px solid #e5e7eb">ssh</td>
</tr>
<tr>
<td style="padding:6px 10px;border:1px solid #e5e7eb"><span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#334155;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">tcp</span></td>
<td style="padding:6px 10px;border:1px solid #e5e7eb">80</td>
<td style="padding:6px 10px;border:1px solid #e5e7eb"><span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#16a34a;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">open</span></td>
<td style="padding:6px 10px;border:1px solid #e5e7eb">http</td>
</tr>
</table>
<table role="presentation" cellpadding="0" cellspacing="0" width="100%" style="margin:0 0 18px 0">
<tr>
<td colspan="4" style="padding:12px 10px;background:#0f172a;color:#e2e8f0;font-weight:600;font-size:14px;border-radius:8px">
10.10.99.6 <span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#16a34a;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">OK</span> </td>
10.10.20.5 <span style="display:inline-block;padding:2px 6px;border-radius:12px;font-size:12px;line-height:16px;background:#16a34a;color:#ffffff;font-family:Segoe UI,Arial,sans-serif">OK</span> </td>
</tr>
<tr>
@@ -117,5 +60,5 @@
<div style="margin-top:18px;font-size:11px;color:#94a3b8">
Report generated by mass-scan-v2 • 2025-10-17 17:19:25
Report generated by mass-scan-v2 • 2025-10-17 21:42:08
</div>

View File

@@ -1,5 +1,6 @@
name: Corp WAN
scan_options:
cron: 5 3 * * *
udp_scan: true
tls_security_scan: false
tls_exp_check: false
@@ -8,8 +9,14 @@ reporting:
report_name: Corporate WAN Perimeter
report_filename: corp-wan.html
full_details: true
email_to: soc@example.com # single string is fine; or a list
email_cc: [] # explicitly none
scan_targets:
- ip: 10.10.20.4
expected_tcp: [22, 53, 80]
expected_udp: [53]
- ip: 10.10.20.5
expected_tcp: [22, 80]
expected_tcp: [22, 53, 80]
expected_udp: [53]

View File

@@ -1,5 +1,7 @@
name: DMZ
scan_options:
cron: 5 4 * * *
udp_scan: false
tls_security_scan: true
tls_exp_check: true
@@ -8,6 +10,10 @@ reporting:
report_name: Sneaky Geek Labs DMZ Report
report_filename: dmz-report.html
full_details: false
email_to:
- ptarrant@gmail.com
email_cc:
- matarrant@gmail.com
scan_targets:
- ip: 10.10.99.6

View File

@@ -0,0 +1,142 @@
name: Corp WAN
scan_options:
cron: 5 3 * * *
udp_scan: true
tls_security_scan: false
tls_exp_check: false
reporting:
report_name: RWEU
report_filename: RW-EU.html
full_details: true
email_to: soc@example.com # single string is fine; or a list
email_cc: [] # explicitly none
scan_targets:
- ip: 81.246.102.192
expected_tcp: []
expected_udp: []
- ip: 81.246.102.193
expected_tcp: []
expected_udp: []
- ip: 81.246.102.194
expected_tcp: []
expected_udp: []
- ip: 81.246.102.195
expected_tcp: []
expected_udp: []
- ip: 81.246.102.196
expected_tcp: []
expected_udp: []
- ip: 81.246.102.197
expected_tcp: []
expected_udp: []
- ip: 81.246.102.198
expected_tcp: []
expected_udp: []
- ip: 81.246.102.199
expected_tcp: []
expected_udp: []
- ip: 81.246.102.200
expected_tcp: []
expected_udp: []
- ip: 81.246.102.201
expected_tcp: []
expected_udp: []
- ip: 81.246.102.202
expected_tcp: []
expected_udp: []
- ip: 81.246.102.203
expected_tcp: []
expected_udp: []
- ip: 81.246.102.204
expected_tcp: []
expected_udp: []
- ip: 81.246.102.205
expected_tcp: []
expected_udp: []
- ip: 81.246.102.206
expected_tcp: []
expected_udp: []
- ip: 81.246.102.207
expected_tcp: []
expected_udp: []
- ip: 81.246.102.208
expected_tcp: []
expected_udp: []
- ip: 81.246.102.209
expected_tcp: []
expected_udp: []
- ip: 81.246.102.210
expected_tcp: []
expected_udp: []
- ip: 81.246.102.211
expected_tcp: []
expected_udp: []
- ip: 81.246.102.212
expected_tcp: []
expected_udp: []
- ip: 81.246.102.213
expected_tcp: []
expected_udp: []
- ip: 81.246.102.214
expected_tcp: []
expected_udp: []
- ip: 81.246.102.215
expected_tcp: []
expected_udp: []
- ip: 81.246.102.216
expected_tcp: []
expected_udp: []
- ip: 81.246.102.217
expected_tcp: []
expected_udp: []
- ip: 81.246.102.218
expected_tcp: []
expected_udp: []
- ip: 81.246.102.219
expected_tcp: []
expected_udp: []
- ip: 81.246.102.220
expected_tcp: []
expected_udp: []
- ip: 81.246.102.221
expected_tcp: []
expected_udp: []
- ip: 81.246.102.222
expected_tcp: []
expected_udp: []
- ip: 81.246.102.223
expected_tcp: []
expected_udp: []

View File

@@ -0,0 +1,17 @@
name: Corp WAN
scan_options:
udp_scan: true # if UDP ports are configured for a host, we will scan those ports.
tls_security_scan: false # if 443 is found, we will attempt TLS probes to check TLS versions.
tls_exp_check: false # if a cert is found, we will check and report the cert expiration date.
reporting:
report_name: Corporate WAN Perimeter # Report Name
report_filename: corp-wan.html # Report Filename
full_details: true # Show full details for ALL hosts (if nothing out of the ordinary is expected, still show ports)
email_to: soc@example.com # single string is fine; or a list
email_cc: [] # explicitly none
scan_targets: # a list of hosts to scan
- ip: 10.10.20.5
expected_tcp: [22, 80]
expected_udp: [53]

View File

@@ -1,11 +1,3 @@
app:
scan_options:
targets_filename: expected.json
tcp_scan_type: all
udp_scan: false
reporting:
report_name: Compliance Report
report_filename: report.html
full_details: false
production: false
timezone: "America/Chicago"