Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
skavngr
GitHub Repository: skavngr/rapidscan
Path: blob/master/rapidscan.py
63 views
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
# __ __
4
# /__)_ '_/( _ _
5
# / ( (//)/(/__)( (//)
6
# /
7
#
8
# Author : Shankar Narayana Damodaran
9
# Tool : RapidScan v1.2
10
# Usage : python3 rapidsan.py example.com
11
# Description: This scanner automates the process of security scanning by using a
12
# multitude of available linux security tools and some custom scripts.
13
#
14
15
# Importing the libraries
16
import sys
17
import argparse
18
import subprocess
19
import os
20
import time
21
import random
22
import threading
23
import re
24
import random
25
from urllib.parse import urlsplit
26
27
28
CURSOR_UP_ONE = '\x1b[1A'
29
ERASE_LINE = '\x1b[2K'
30
31
# Scan Time Elapser
32
intervals = (
33
('h', 3600),
34
('m', 60),
35
('s', 1),
36
)
37
def display_time(seconds, granularity=3):
38
result = []
39
seconds = seconds + 1
40
for name, count in intervals:
41
value = seconds // count
42
if value:
43
seconds -= value * count
44
result.append("{}{}".format(value, name))
45
return ' '.join(result[:granularity])
46
47
48
def terminal_size():
49
try:
50
rows, columns = subprocess.check_output(['stty', 'size']).split()
51
return int(columns)
52
except subprocess.CalledProcessError as e:
53
return int(20)
54
55
56
57
def url_maker(url):
58
if not re.match(r'http(s?)\:', url):
59
url = 'http://' + url
60
parsed = urlsplit(url)
61
host = parsed.netloc
62
if host.startswith('www.'):
63
host = host[4:]
64
return host
65
66
def check_internet():
67
os.system('ping -c1 github.com > rs_net 2>&1')
68
if "0% packet loss" in open('rs_net').read():
69
val = 1
70
else:
71
val = 0
72
os.system('rm rs_net > /dev/null 2>&1')
73
return val
74
75
76
# Initializing the color module class
77
class bcolors:
78
HEADER = '\033[95m'
79
OKBLUE = '\033[94m'
80
OKGREEN = '\033[92m'
81
WARNING = '\033[93m'
82
BADFAIL = '\033[91m'
83
ENDC = '\033[0m'
84
BOLD = '\033[1m'
85
UNDERLINE = '\033[4m'
86
87
BG_ERR_TXT = '\033[41m' # For critical errors and crashes
88
BG_HEAD_TXT = '\033[100m'
89
BG_ENDL_TXT = '\033[46m'
90
BG_CRIT_TXT = '\033[45m'
91
BG_HIGH_TXT = '\033[41m'
92
BG_MED_TXT = '\033[43m'
93
BG_LOW_TXT = '\033[44m'
94
BG_INFO_TXT = '\033[42m'
95
96
BG_SCAN_TXT_START = '\x1b[6;30;42m'
97
BG_SCAN_TXT_END = '\x1b[0m'
98
99
100
# Classifies the Vulnerability's Severity
101
def vul_info(val):
102
result =''
103
if val == 'c':
104
result = bcolors.BG_CRIT_TXT+" critical "+bcolors.ENDC
105
elif val == 'h':
106
result = bcolors.BG_HIGH_TXT+" high "+bcolors.ENDC
107
elif val == 'm':
108
result = bcolors.BG_MED_TXT+" medium "+bcolors.ENDC
109
elif val == 'l':
110
result = bcolors.BG_LOW_TXT+" low "+bcolors.ENDC
111
else:
112
result = bcolors.BG_INFO_TXT+" info "+bcolors.ENDC
113
return result
114
115
# Legends
116
proc_high = bcolors.BADFAIL + "●" + bcolors.ENDC
117
proc_med = bcolors.WARNING + "●" + bcolors.ENDC
118
proc_low = bcolors.OKGREEN + "●" + bcolors.ENDC
119
120
# Links the vulnerability with threat level and remediation database
121
def vul_remed_info(v1,v2,v3):
122
print(bcolors.BOLD+"Vulnerability Threat Level"+bcolors.ENDC)
123
print("\t"+vul_info(v2)+" "+bcolors.WARNING+str(tool_resp[v1][0])+bcolors.ENDC)
124
print(bcolors.BOLD+"Vulnerability Definition"+bcolors.ENDC)
125
print("\t"+bcolors.BADFAIL+str(tools_fix[v3-1][1])+bcolors.ENDC)
126
print(bcolors.BOLD+"Vulnerability Remediation"+bcolors.ENDC)
127
print("\t"+bcolors.OKGREEN+str(tools_fix[v3-1][2])+bcolors.ENDC)
128
129
130
# RapidScan Help Context
131
def helper():
132
print(bcolors.OKBLUE+"Information:"+bcolors.ENDC)
133
print("------------")
134
print("\t./rapidscan.py example.com: Scans the domain example.com.")
135
print("\t./rapidscan.py example.com --skip dmitry --skip theHarvester: Skip the 'dmitry' and 'theHarvester' tests.")
136
print("\t./rapidscan.py example.com --nospinner: Disable the idle loader/spinner.")
137
print("\t./rapidscan.py --update : Updates the scanner to the latest version.")
138
print("\t./rapidscan.py --help : Displays this help context.")
139
print(bcolors.OKBLUE+"Interactive:"+bcolors.ENDC)
140
print("------------")
141
print("\tCtrl+C: Skips current test.")
142
print("\tCtrl+Z: Quits RapidScan.")
143
print(bcolors.OKBLUE+"Legends:"+bcolors.ENDC)
144
print("--------")
145
print("\t["+proc_high+"]: Scan process may take longer times (not predictable).")
146
print("\t["+proc_med+"]: Scan process may take less than 10 minutes.")
147
print("\t["+proc_low+"]: Scan process may take less than a minute or two.")
148
print(bcolors.OKBLUE+"Vulnerability Information:"+bcolors.ENDC)
149
print("--------------------------")
150
print("\t"+vul_info('c')+": Requires immediate attention as it may lead to compromise or service unavailability.")
151
print("\t"+vul_info('h')+" : May not lead to an immediate compromise, but there are considerable chances for probability.")
152
print("\t"+vul_info('m')+" : Attacker may correlate multiple vulnerabilities of this type to launch a sophisticated attack.")
153
print("\t"+vul_info('l')+" : Not a serious issue, but it is recommended to tend to the finding.")
154
print("\t"+vul_info('i')+" : Not classified as a vulnerability, simply an useful informational alert to be considered.\n")
155
156
157
# Clears Line
158
def clear():
159
sys.stdout.write("\033[F")
160
sys.stdout.write("\033[K") #clears until EOL
161
162
# RapidScan Logo
163
def logo():
164
print(bcolors.WARNING)
165
logo_ascii = """
166
__ __
167
/__)_ """+bcolors.BADFAIL+" ●"+bcolors.WARNING+"""_/( _ _
168
/ ( (//)/(/__)( (//)
169
/
170
"""+bcolors.ENDC+"""(The Multi-Tool Web Vulnerability Scanner)
171
172
Check out our new software, """+bcolors.BG_LOW_TXT+"""NetBot"""+bcolors.ENDC+""" for simulating DDoS attacks - https://github.com/skavngr/netbot
173
"""
174
print(logo_ascii)
175
print(bcolors.ENDC)
176
177
178
# Initiliazing the idle loader/spinner class
179
class Spinner:
180
busy = False
181
delay = 0.005 # 0.05
182
183
@staticmethod
184
def spinning_cursor():
185
while 1:
186
#for cursor in '|/-\\/': yield cursor #←↑↓→
187
#for cursor in '←↑↓→': yield cursor
188
#for cursor in '....scanning...please..wait....': yield cursor
189
for cursor in ' ': yield cursor
190
def __init__(self, delay=None):
191
self.spinner_generator = self.spinning_cursor()
192
if delay and float(delay): self.delay = delay
193
self.disabled = False
194
195
def spinner_task(self):
196
inc = 0
197
try:
198
while self.busy:
199
if not self.disabled:
200
x = bcolors.BG_SCAN_TXT_START+next(self.spinner_generator)+bcolors.BG_SCAN_TXT_END
201
inc = inc + 1
202
print(x,end='')
203
if inc>random.uniform(0,terminal_size()): #30 init
204
print(end="\r")
205
bcolors.BG_SCAN_TXT_START = '\x1b[6;30;'+str(round(random.uniform(40,47)))+'m'
206
inc = 0
207
sys.stdout.flush()
208
time.sleep(self.delay)
209
if not self.disabled:
210
sys.stdout.flush()
211
212
except (KeyboardInterrupt, SystemExit):
213
print("\n\t"+ bcolors.BG_ERR_TXT+"RapidScan received a series of Ctrl+C hits. Quitting..." +bcolors.ENDC)
214
sys.exit(1)
215
216
def start(self):
217
self.busy = True
218
try:
219
threading.Thread(target=self.spinner_task).start()
220
except Exception as e:
221
print("\n")
222
223
def stop(self):
224
try:
225
self.busy = False
226
time.sleep(self.delay)
227
except (KeyboardInterrupt, SystemExit):
228
print("\n\t"+ bcolors.BG_ERR_TXT+"RapidScan received a series of Ctrl+C hits. Quitting..." +bcolors.ENDC)
229
sys.exit(1)
230
231
# End ofloader/spinner class
232
233
# Instantiating the spinner/loader class
234
spinner = Spinner()
235
236
237
238
# Scanners that will be used and filename rotation (default: enabled (1))
239
tool_names = [
240
#1
241
["host","Host - Checks for existence of IPV6 address.","host",1],
242
243
#2
244
["aspnet_config_err","ASP.Net Misconfiguration - Checks for ASP.Net Misconfiguration.","wget",1],
245
246
#3
247
["wp_check","WordPress Checker - Checks for WordPress Installation.","wget",1],
248
249
#4
250
["drp_check", "Drupal Checker - Checks for Drupal Installation.","wget",1],
251
252
#5
253
["joom_check", "Joomla Checker - Checks for Joomla Installation.","wget",1],
254
255
#6
256
["uniscan","Uniscan - Checks for robots.txt & sitemap.xml","uniscan",1],
257
258
#7
259
["wafw00f","Wafw00f - Checks for Application Firewalls.","wafw00f",1],
260
261
#8
262
["nmap","Nmap - Fast Scan [Only Few Port Checks]","nmap",1],
263
264
#9
265
["theHarvester","The Harvester - Scans for emails using Google's passive search.","theHarvester",1],
266
267
#10
268
["dnsrecon","DNSRecon - Attempts Multiple Zone Transfers on Nameservers.","dnsrecon",1],
269
270
#11
271
#["fierce","Fierce - Attempts Zone Transfer [No Brute Forcing]","fierce",1],
272
273
#12
274
["dnswalk","DNSWalk - Attempts Zone Transfer.","dnswalk",1],
275
276
#13
277
["whois","WHOis - Checks for Administrator's Contact Information.","whois",1],
278
279
#14
280
["nmap_header","Nmap [XSS Filter Check] - Checks if XSS Protection Header is present.","nmap",1],
281
282
#15
283
["nmap_sloris","Nmap [Slowloris DoS] - Checks for Slowloris Denial of Service Vulnerability.","nmap",1],
284
285
#16
286
["sslyze_hbleed","SSLyze - Checks only for Heartbleed Vulnerability.","sslyze",1],
287
288
#17
289
["nmap_hbleed","Nmap [Heartbleed] - Checks only for Heartbleed Vulnerability.","nmap",1],
290
291
#18
292
["nmap_poodle","Nmap [POODLE] - Checks only for Poodle Vulnerability.","nmap",1],
293
294
#19
295
["nmap_ccs","Nmap [OpenSSL CCS Injection] - Checks only for CCS Injection.","nmap",1],
296
297
#20
298
["nmap_freak","Nmap [FREAK] - Checks only for FREAK Vulnerability.","nmap",1],
299
300
#21
301
["nmap_logjam","Nmap [LOGJAM] - Checks for LOGJAM Vulnerability.","nmap",1],
302
303
#22
304
["sslyze_ocsp","SSLyze - Checks for OCSP Stapling.","sslyze",1],
305
306
#23
307
["sslyze_zlib","SSLyze - Checks for ZLib Deflate Compression.","sslyze",1],
308
309
#24
310
["sslyze_reneg","SSLyze - Checks for Secure Renegotiation Support and Client Renegotiation.","sslyze",1],
311
312
#25
313
["sslyze_resum","SSLyze - Checks for Session Resumption Support with [Session IDs/TLS Tickets].","sslyze",1],
314
315
#26
316
["lbd","LBD - Checks for DNS/HTTP Load Balancers.","lbd",1],
317
318
#27
319
["golismero_dns_malware","Golismero - Checks if the domain is spoofed or hijacked.","golismero",1],
320
321
#28
322
["golismero_heartbleed","Golismero - Checks only for Heartbleed Vulnerability.","golismero",1],
323
324
#29
325
["golismero_brute_url_predictables","Golismero - BruteForces for certain files on the Domain.","golismero",1],
326
327
#30
328
["golismero_brute_directories","Golismero - BruteForces for certain directories on the Domain.","golismero",1],
329
330
#31
331
["golismero_sqlmap","Golismero - SQLMap [Retrieves only the DB Banner]","golismero",1],
332
333
#32
334
["dirb","DirB - Brutes the target for Open Directories.","dirb",1],
335
336
#33
337
["xsser","XSSer - Checks for Cross-Site Scripting [XSS] Attacks.","xsser",1],
338
339
#34
340
["golismero_ssl_scan","Golismero SSL Scans - Performs SSL related Scans.","golismero",1],
341
342
#35
343
["golismero_zone_transfer","Golismero Zone Transfer - Attempts Zone Transfer.","golismero",1],
344
345
#36
346
["golismero_nikto","Golismero Nikto Scans - Uses Nikto Plugin to detect vulnerabilities.","golismero",1],
347
348
#37
349
["golismero_brute_subdomains","Golismero Subdomains Bruter - Brute Forces Subdomain Discovery.","golismero",1],
350
351
#38
352
["dnsenum_zone_transfer","DNSEnum - Attempts Zone Transfer.","dnsenum",1],
353
354
#39
355
["fierce_brute_subdomains","Fierce Subdomains Bruter - Brute Forces Subdomain Discovery.","fierce",1],
356
357
#40
358
["dmitry_email","DMitry - Passively Harvests Emails from the Domain.","dmitry",1],
359
360
#41
361
["dmitry_subdomains","DMitry - Passively Harvests Subdomains from the Domain.","dmitry",1],
362
363
#42
364
["nmap_telnet","Nmap [TELNET] - Checks if TELNET service is running.","nmap",1],
365
366
#43
367
["nmap_ftp","Nmap [FTP] - Checks if FTP service is running.","nmap",1],
368
369
#44
370
["nmap_stuxnet","Nmap [STUXNET] - Checks if the host is affected by STUXNET Worm.","nmap",1],
371
372
#45
373
["webdav","WebDAV - Checks if WEBDAV enabled on Home directory.","davtest",1],
374
375
#46
376
["golismero_finger","Golismero - Does a fingerprint on the Domain.","golismero",1],
377
378
#47
379
["uniscan_filebrute","Uniscan - Brutes for Filenames on the Domain.","uniscan",1],
380
381
#48
382
["uniscan_dirbrute", "Uniscan - Brutes Directories on the Domain.","uniscan",1],
383
384
#49
385
["uniscan_ministresser", "Uniscan - Stress Tests the Domain.","uniscan",1],
386
387
#50
388
["uniscan_rfi","Uniscan - Checks for LFI, RFI and RCE.","uniscan",1],
389
390
#51
391
["uniscan_xss","Uniscan - Checks for XSS, SQLi, BSQLi & Other Checks.","uniscan",1],
392
393
#52
394
["nikto_xss","Nikto - Checks for Apache Expect XSS Header.","nikto",1],
395
396
#53
397
["nikto_subrute","Nikto - Brutes Subdomains.","nikto",1],
398
399
#54
400
["nikto_shellshock","Nikto - Checks for Shellshock Bug.","nikto",1],
401
402
#55
403
["nikto_internalip","Nikto - Checks for Internal IP Leak.","nikto",1],
404
405
#56
406
["nikto_putdel","Nikto - Checks for HTTP PUT DEL.","nikto",1],
407
408
#57
409
["nikto_headers","Nikto - Checks the Domain Headers.","nikto",1],
410
411
#58
412
["nikto_ms01070","Nikto - Checks for MS10-070 Vulnerability.","nikto",1],
413
414
#59
415
["nikto_servermsgs","Nikto - Checks for Server Issues.","nikto",1],
416
417
#60
418
["nikto_outdated","Nikto - Checks if Server is Outdated.","nikto",1],
419
420
#61
421
["nikto_httpoptions","Nikto - Checks for HTTP Options on the Domain.","nikto",1],
422
423
#62
424
["nikto_cgi","Nikto - Enumerates CGI Directories.","nikto",1],
425
426
#63
427
["nikto_ssl","Nikto - Performs SSL Checks.","nikto",1],
428
429
#64
430
["nikto_sitefiles","Nikto - Checks for any interesting files on the Domain.","nikto",1],
431
432
#65
433
["nikto_paths","Nikto - Checks for Injectable Paths.","nikto",1],
434
435
#66
436
["dnsmap_brute","DNSMap - Brutes Subdomains.","dnsmap",1],
437
438
#67
439
["nmap_sqlserver","Nmap - Checks for MS-SQL Server DB","nmap",1],
440
441
#68
442
["nmap_mysql", "Nmap - Checks for MySQL DB","nmap",1],
443
444
#69
445
["nmap_oracle", "Nmap - Checks for ORACLE DB","nmap",1],
446
447
#70
448
["nmap_rdp_udp","Nmap - Checks for Remote Desktop Service over UDP","nmap",1],
449
450
#71
451
["nmap_rdp_tcp","Nmap - Checks for Remote Desktop Service over TCP","nmap",1],
452
453
#72
454
["nmap_full_ps_tcp","Nmap - Performs a Full TCP Port Scan","nmap",1],
455
456
#73
457
["nmap_full_ps_udp","Nmap - Performs a Full UDP Port Scan","nmap",1],
458
459
#74
460
["nmap_snmp","Nmap - Checks for SNMP Service","nmap",1],
461
462
#75
463
["aspnet_elmah_axd","Checks for ASP.net Elmah Logger","wget",1],
464
465
#76
466
["nmap_tcp_smb","Checks for SMB Service over TCP","nmap",1],
467
468
#77
469
["nmap_udp_smb","Checks for SMB Service over UDP","nmap",1],
470
471
#78
472
["wapiti","Wapiti - Checks for SQLi, RCE, XSS and Other Vulnerabilities","wapiti",1],
473
474
#79
475
["nmap_iis","Nmap - Checks for IIS WebDAV","nmap",1],
476
477
#80
478
["whatweb","WhatWeb - Checks for X-XSS Protection Header","whatweb",1],
479
480
#81
481
["amass","AMass - Brutes Domain for Subdomains","amass",1]
482
]
483
484
485
# Command that is used to initiate the tool (with parameters and extra params)
486
tool_cmd = [
487
#1
488
["host ",""],
489
490
#2
491
["wget -O /tmp/rapidscan_temp_aspnet_config_err --tries=1 ","/%7C~.aspx"],
492
493
#3
494
["wget -O /tmp/rapidscan_temp_wp_check --tries=1 ","/wp-admin"],
495
496
#4
497
["wget -O /tmp/rapidscan_temp_drp_check --tries=1 ","/user"],
498
499
#5
500
["wget -O /tmp/rapidscan_temp_joom_check --tries=1 ","/administrator"],
501
502
#6
503
["uniscan -e -u ",""],
504
505
#7
506
["wafw00f ",""],
507
508
#8
509
["nmap -F --open -Pn ",""],
510
511
#9
512
["theHarvester -l 50 -b censys -d ",""],
513
514
#10
515
["dnsrecon -d ",""],
516
517
#11
518
#["fierce -wordlist xxx -dns ",""],
519
520
#12
521
["dnswalk -d ","."],
522
523
#13
524
["whois ",""],
525
526
#14
527
["nmap -p80 --script http-security-headers -Pn ",""],
528
529
#15
530
["nmap -p80,443 --script http-slowloris --max-parallelism 500 -Pn ",""],
531
532
#16
533
["sslyze --heartbleed ",""],
534
535
#17
536
["nmap -p443 --script ssl-heartbleed -Pn ",""],
537
538
#18
539
["nmap -p443 --script ssl-poodle -Pn ",""],
540
541
#19
542
["nmap -p443 --script ssl-ccs-injection -Pn ",""],
543
544
#20
545
["nmap -p443 --script ssl-enum-ciphers -Pn ",""],
546
547
#21
548
["nmap -p443 --script ssl-dh-params -Pn ",""],
549
550
#22
551
["sslyze --certinfo=basic ",""],
552
553
#23
554
["sslyze --compression ",""],
555
556
#24
557
["sslyze --reneg ",""],
558
559
#25
560
["sslyze --resum ",""],
561
562
#26
563
["lbd ",""],
564
565
#27
566
["golismero -e dns_malware scan ",""],
567
568
#28
569
["golismero -e heartbleed scan ",""],
570
571
#29
572
["golismero -e brute_url_predictables scan ",""],
573
574
#30
575
["golismero -e brute_directories scan ",""],
576
577
#31
578
["golismero -e sqlmap scan ",""],
579
580
#32
581
["dirb http://"," -fi"],
582
583
#33
584
["xsser --all=http://",""],
585
586
#34
587
["golismero -e sslscan scan ",""],
588
589
#35
590
["golismero -e zone_transfer scan ",""],
591
592
#36
593
["golismero -e nikto scan ",""],
594
595
#37
596
["golismero -e brute_dns scan ",""],
597
598
#38
599
["dnsenum ",""],
600
601
#39
602
["fierce --domain ",""],
603
604
#40
605
["dmitry -e ",""],
606
607
#41
608
["dmitry -s ",""],
609
610
#42
611
["nmap -p23 --open -Pn ",""],
612
613
#43
614
["nmap -p21 --open -Pn ",""],
615
616
#44
617
["nmap --script stuxnet-detect -p445 -Pn ",""],
618
619
#45
620
["davtest -url http://",""],
621
622
#46
623
["golismero -e fingerprint_web scan ",""],
624
625
#47
626
["uniscan -w -u ",""],
627
628
#48
629
["uniscan -q -u ",""],
630
631
#49
632
["uniscan -r -u ",""],
633
634
#50
635
["uniscan -s -u ",""],
636
637
#51
638
["uniscan -d -u ",""],
639
640
#52
641
["nikto -Plugins 'apache_expect_xss' -host ",""],
642
643
#53
644
["nikto -Plugins 'subdomain' -host ",""],
645
646
#54
647
["nikto -Plugins 'shellshock' -host ",""],
648
649
#55
650
["nikto -Plugins 'cookies' -host ",""],
651
652
#56
653
["nikto -Plugins 'put_del_test' -host ",""],
654
655
#57
656
["nikto -Plugins 'headers' -host ",""],
657
658
#58
659
["nikto -Plugins 'ms10-070' -host ",""],
660
661
#59
662
["nikto -Plugins 'msgs' -host ",""],
663
664
#60
665
["nikto -Plugins 'outdated' -host ",""],
666
667
#61
668
["nikto -Plugins 'httpoptions' -host ",""],
669
670
#62
671
["nikto -Plugins 'cgi' -host ",""],
672
673
#63
674
["nikto -Plugins 'ssl' -host ",""],
675
676
#64
677
["nikto -Plugins 'sitefiles' -host ",""],
678
679
#65
680
["nikto -Plugins 'paths' -host ",""],
681
682
#66
683
["dnsmap ",""],
684
685
#67
686
["nmap -p1433 --open -Pn ",""],
687
688
#68
689
["nmap -p3306 --open -Pn ",""],
690
691
#69
692
["nmap -p1521 --open -Pn ",""],
693
694
#70
695
["nmap -p3389 --open -sU -Pn ",""],
696
697
#71
698
["nmap -p3389 --open -sT -Pn ",""],
699
700
#72
701
["nmap -p1-65535 --open -Pn ",""],
702
703
#73
704
["nmap -p1-65535 -sU --open -Pn ",""],
705
706
#74
707
["nmap -p161 -sU --open -Pn ",""],
708
709
#75
710
["wget -O /tmp/rapidscan_temp_aspnet_elmah_axd --tries=1 ","/elmah.axd"],
711
712
#76
713
["nmap -p445,137-139 --open -Pn ",""],
714
715
#77
716
["nmap -p137,138 --open -Pn ",""],
717
718
#78
719
["wapiti "," -f txt -o rapidscan_temp_wapiti"],
720
721
#79
722
["nmap -p80 --script=http-iis-webdav-vuln -Pn ",""],
723
724
#80
725
["whatweb "," -a 1"],
726
727
#81
728
["amass enum -d ",""]
729
]
730
731
732
# Tool Responses (Begins) [Responses + Severity (c - critical | h - high | m - medium | l - low | i - informational) + Reference for Vuln Definition and Remediation]
733
tool_resp = [
734
#1
735
["Does not have an IPv6 Address. It is good to have one.","i",1],
736
737
#2
738
["ASP.Net is misconfigured to throw server stack errors on screen.","m",2],
739
740
#3
741
["WordPress Installation Found. Check for vulnerabilities corresponds to that version.","i",3],
742
743
#4
744
["Drupal Installation Found. Check for vulnerabilities corresponds to that version.","i",4],
745
746
#5
747
["Joomla Installation Found. Check for vulnerabilities corresponds to that version.","i",5],
748
749
#6
750
["robots.txt/sitemap.xml found. Check those files for any information.","i",6],
751
752
#7
753
["No Web Application Firewall Detected","m",7],
754
755
#8
756
["Some ports are open. Perform a full-scan manually.","l",8],
757
758
#9
759
["Email Addresses Found.","l",9],
760
761
#10
762
["Zone Transfer Successful using DNSRecon. Reconfigure DNS immediately.","h",10],
763
764
#11
765
#["Zone Transfer Successful using fierce. Reconfigure DNS immediately.","h",10],
766
767
#12
768
["Zone Transfer Successful using dnswalk. Reconfigure DNS immediately.","h",10],
769
770
#13
771
["Whois Information Publicly Available.","i",11],
772
773
#14
774
["XSS Protection Filter is Disabled.","m",12],
775
776
#15
777
["Vulnerable to Slowloris Denial of Service.","c",13],
778
779
#16
780
["HEARTBLEED Vulnerability Found with SSLyze.","h",14],
781
782
#17
783
["HEARTBLEED Vulnerability Found with Nmap.","h",14],
784
785
#18
786
["POODLE Vulnerability Detected.","h",15],
787
788
#19
789
["OpenSSL CCS Injection Detected.","h",16],
790
791
#20
792
["FREAK Vulnerability Detected.","h",17],
793
794
#21
795
["LOGJAM Vulnerability Detected.","h",18],
796
797
#22
798
["Unsuccessful OCSP Response.","m",19],
799
800
#23
801
["Server supports Deflate Compression.","m",20],
802
803
#24
804
["Secure Client Initiated Renegotiation is supported.","m",21],
805
806
#25
807
["Secure Resumption unsupported with (Sessions IDs/TLS Tickets).","m",22],
808
809
#26
810
["No DNS/HTTP based Load Balancers Found.","l",23],
811
812
#27
813
["Domain is spoofed/hijacked.","h",24],
814
815
#28
816
["HEARTBLEED Vulnerability Found with Golismero.","h",14],
817
818
#29
819
["Open Files Found with Golismero BruteForce.","m",25],
820
821
#30
822
["Open Directories Found with Golismero BruteForce.","m",26],
823
824
#31
825
["DB Banner retrieved with SQLMap.","l",27],
826
827
#32
828
["Open Directories Found with DirB.","m",26],
829
830
#33
831
["XSSer found XSS vulnerabilities.","c",28],
832
833
#34
834
["Found SSL related vulnerabilities with Golismero.","m",29],
835
836
#35
837
["Zone Transfer Successful with Golismero. Reconfigure DNS immediately.","h",10],
838
839
#36
840
["Golismero Nikto Plugin found vulnerabilities.","m",30],
841
842
#37
843
["Found Subdomains with Golismero.","m",31],
844
845
#38
846
["Zone Transfer Successful using DNSEnum. Reconfigure DNS immediately.","h",10],
847
848
#39
849
["Found Subdomains with Fierce.","m",31],
850
851
#40
852
["Email Addresses discovered with DMitry.","l",9],
853
854
#41
855
["Subdomains discovered with DMitry.","m",31],
856
857
#42
858
["Telnet Service Detected.","h",32],
859
860
#43
861
["FTP Service Detected.","c",33],
862
863
#44
864
["Vulnerable to STUXNET.","c",34],
865
866
#45
867
["WebDAV Enabled.","m",35],
868
869
#46
870
["Found some information through Fingerprinting.","l",36],
871
872
#47
873
["Open Files Found with Uniscan.","m",25],
874
875
#48
876
["Open Directories Found with Uniscan.","m",26],
877
878
#49
879
["Vulnerable to Stress Tests.","h",37],
880
881
#50
882
["Uniscan detected possible LFI, RFI or RCE.","h",38],
883
884
#51
885
["Uniscan detected possible XSS, SQLi, BSQLi.","h",39],
886
887
#52
888
["Apache Expect XSS Header not present.","m",12],
889
890
#53
891
["Found Subdomains with Nikto.","m",31],
892
893
#54
894
["Webserver vulnerable to Shellshock Bug.","c",40],
895
896
#55
897
["Webserver leaks Internal IP.","l",41],
898
899
#56
900
["HTTP PUT DEL Methods Enabled.","m",42],
901
902
#57
903
["Some vulnerable headers exposed.","m",43],
904
905
#58
906
["Webserver vulnerable to MS10-070.","h",44],
907
908
#59
909
["Some issues found on the Webserver.","m",30],
910
911
#60
912
["Webserver is Outdated.","h",45],
913
914
#61
915
["Some issues found with HTTP Options.","l",42],
916
917
#62
918
["CGI Directories Enumerated.","l",26],
919
920
#63
921
["Vulnerabilities reported in SSL Scans.","m",29],
922
923
#64
924
["Interesting Files Detected.","m",25],
925
926
#65
927
["Injectable Paths Detected.","l",46],
928
929
#66
930
["Found Subdomains with DNSMap.","m",31],
931
932
#67
933
["MS-SQL DB Service Detected.","l",47],
934
935
#68
936
["MySQL DB Service Detected.","l",47],
937
938
#69
939
["ORACLE DB Service Detected.","l",47],
940
941
#70
942
["RDP Server Detected over UDP.","h",48],
943
944
#71
945
["RDP Server Detected over TCP.","h",48],
946
947
#72
948
["TCP Ports are Open","l",8],
949
950
#73
951
["UDP Ports are Open","l",8],
952
953
#74
954
["SNMP Service Detected.","m",49],
955
956
#75
957
["Elmah is Configured.","m",50],
958
959
#76
960
["SMB Ports are Open over TCP","m",51],
961
962
#77
963
["SMB Ports are Open over UDP","m",51],
964
965
#78
966
["Wapiti discovered a range of vulnerabilities","h",30],
967
968
#79
969
["IIS WebDAV is Enabled","m",35],
970
971
#80
972
["X-XSS Protection is not Present","m",12],
973
974
#81
975
["Found Subdomains with AMass","m",31]
976
977
978
979
]
980
981
# Tool Responses (Ends)
982
983
984
985
# Tool Status (Response Data + Response Code (if status check fails and you still got to push it + Legends + Approx Time + Tool Identification + Bad Responses)
986
tool_status = [
987
#1
988
["has IPv6",1,proc_low," < 15s","ipv6",["not found","has IPv6"]],
989
990
#2
991
["Server Error",0,proc_low," < 30s","asp.netmisconf",["unable to resolve host address","Connection timed out"]],
992
993
#3
994
["wp-login",0,proc_low," < 30s","wpcheck",["unable to resolve host address","Connection timed out"]],
995
996
#4
997
["drupal",0,proc_low," < 30s","drupalcheck",["unable to resolve host address","Connection timed out"]],
998
999
#5
1000
["joomla",0,proc_low," < 30s","joomlacheck",["unable to resolve host address","Connection timed out"]],
1001
1002
#6
1003
["[+]",0,proc_low," < 40s","robotscheck",["Use of uninitialized value in unpack at"]],
1004
1005
#7
1006
["No WAF",0,proc_low," < 45s","wafcheck",["appears to be down"]],
1007
1008
#8
1009
["tcp open",0,proc_med," < 2m","nmapopen",["Failed to resolve"]],
1010
1011
#9
1012
["No emails found",1,proc_med," < 3m","harvester",["No hosts found","No emails found"]],
1013
1014
#10
1015
["[+] Zone Transfer was successful!!",0,proc_low," < 20s","dnsreconzt",["Could not resolve domain"]],
1016
1017
#11
1018
#["Whoah, it worked",0,proc_low," < 30s","fiercezt",["none"]],
1019
1020
#12
1021
["0 errors",0,proc_low," < 35s","dnswalkzt",["!!!0 failures, 0 warnings, 3 errors."]],
1022
1023
#13
1024
["Admin Email:",0,proc_low," < 25s","whois",["No match for domain"]],
1025
1026
#14
1027
["XSS filter is disabled",0,proc_low," < 20s","nmapxssh",["Failed to resolve"]],
1028
1029
#15
1030
["VULNERABLE",0,proc_high," < 45m","nmapdos",["Failed to resolve"]],
1031
1032
#16
1033
["Server is vulnerable to Heartbleed",0,proc_low," < 40s","sslyzehb",["Could not resolve hostname"]],
1034
1035
#17
1036
["VULNERABLE",0,proc_low," < 30s","nmap1",["Failed to resolve"]],
1037
1038
#18
1039
["VULNERABLE",0,proc_low," < 35s","nmap2",["Failed to resolve"]],
1040
1041
#19
1042
["VULNERABLE",0,proc_low," < 35s","nmap3",["Failed to resolve"]],
1043
1044
#20
1045
["VULNERABLE",0,proc_low," < 30s","nmap4",["Failed to resolve"]],
1046
1047
#21
1048
["VULNERABLE",0,proc_low," < 35s","nmap5",["Failed to resolve"]],
1049
1050
#22
1051
["ERROR - OCSP response status is not successful",0,proc_low," < 25s","sslyze1",["Could not resolve hostname"]],
1052
1053
#23
1054
["VULNERABLE",0,proc_low," < 30s","sslyze2",["Could not resolve hostname"]],
1055
1056
#24
1057
["VULNERABLE",0,proc_low," < 25s","sslyze3",["Could not resolve hostname"]],
1058
1059
#25
1060
["VULNERABLE",0,proc_low," < 30s","sslyze4",["Could not resolve hostname"]],
1061
1062
#26
1063
["does NOT use Load-balancing",0,proc_med," < 4m","lbd",["NOT FOUND"]],
1064
1065
#27
1066
["No vulnerabilities found",1,proc_low," < 45s","golism1",["Cannot resolve domain name","No vulnerabilities found"]],
1067
1068
#28
1069
["No vulnerabilities found",1,proc_low," < 40s","golism2",["Cannot resolve domain name","No vulnerabilities found"]],
1070
1071
#29
1072
["No vulnerabilities found",1,proc_low," < 45s","golism3",["Cannot resolve domain name","No vulnerabilities found"]],
1073
1074
#30
1075
["No vulnerabilities found",1,proc_low," < 40s","golism4",["Cannot resolve domain name","No vulnerabilities found"]],
1076
1077
#31
1078
["No vulnerabilities found",1,proc_low," < 45s","golism5",["Cannot resolve domain name","No vulnerabilities found"]],
1079
1080
#32
1081
["FOUND: 0",1,proc_high," < 35m","dirb",["COULDNT RESOLVE HOST","FOUND: 0"]],
1082
1083
#33
1084
["Could not find any vulnerability!",1,proc_med," < 4m","xsser",["XSSer is not working propertly!","Could not find any vulnerability!"]],
1085
1086
#34
1087
["Occurrence ID",0,proc_low," < 45s","golism6",["Cannot resolve domain name"]],
1088
1089
#35
1090
["DNS zone transfer successful",0,proc_low," < 30s","golism7",["Cannot resolve domain name"]],
1091
1092
#36
1093
["Nikto found 0 vulnerabilities",1,proc_med," < 4m","golism8",["Cannot resolve domain name","Nikto found 0 vulnerabilities"]],
1094
1095
#37
1096
["Possible subdomain leak",0,proc_high," < 30m","golism9",["Cannot resolve domain name"]],
1097
1098
#38
1099
["AXFR record query failed:",1,proc_low," < 45s","dnsenumzt",["NS record query failed:","AXFR record query failed","no NS record for"]],
1100
1101
#39
1102
["Found 0 entries",1,proc_high," < 75m","fierce2",["Found 0 entries","is gimp"]],
1103
1104
#40
1105
["Found 0 E-Mail(s)",1,proc_low," < 30s","dmitry1",["Unable to locate Host IP addr","Found 0 E-Mail(s)"]],
1106
1107
#41
1108
["Found 0 possible subdomain(s)",1,proc_low," < 35s","dmitry2",["Unable to locate Host IP addr","Found 0 possible subdomain(s)"]],
1109
1110
#42
1111
["open",0,proc_low," < 15s","nmaptelnet",["Failed to resolve"]],
1112
1113
#43
1114
["open",0,proc_low," < 15s","nmapftp",["Failed to resolve"]],
1115
1116
#44
1117
["open",0,proc_low," < 20s","nmapstux",["Failed to resolve"]],
1118
1119
#45
1120
["SUCCEED",0,proc_low," < 30s","webdav",["is not DAV enabled or not accessible."]],
1121
1122
#46
1123
["No vulnerabilities found",1,proc_low," < 15s","golism10",["Cannot resolve domain name","No vulnerabilities found"]],
1124
1125
#47
1126
["[+]",0,proc_med," < 2m","uniscan2",["Use of uninitialized value in unpack at"]],
1127
1128
#48
1129
["[+]",0,proc_med," < 5m","uniscan3",["Use of uninitialized value in unpack at"]],
1130
1131
#49
1132
["[+]",0,proc_med," < 9m","uniscan4",["Use of uninitialized value in unpack at"]],
1133
1134
#50
1135
["[+]",0,proc_med," < 8m","uniscan5",["Use of uninitialized value in unpack at"]],
1136
1137
#51
1138
["[+]",0,proc_med," < 9m","uniscan6",["Use of uninitialized value in unpack at"]],
1139
1140
#52
1141
["0 item(s) reported",1,proc_low," < 35s","nikto1",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1142
1143
#53
1144
["0 item(s) reported",1,proc_low," < 35s","nikto2",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1145
1146
#54
1147
["0 item(s) reported",1,proc_low," < 35s","nikto3",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1148
1149
#55
1150
["0 item(s) reported",1,proc_low," < 35s","nikto4",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1151
1152
#56
1153
["0 item(s) reported",1,proc_low," < 35s","nikto5",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1154
1155
#57
1156
["0 item(s) reported",1,proc_low," < 35s","nikto6",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1157
1158
#58
1159
["0 item(s) reported",1,proc_low," < 35s","nikto7",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1160
1161
#59
1162
["0 item(s) reported",1,proc_low," < 35s","nikto8",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1163
1164
#60
1165
["0 item(s) reported",1,proc_low," < 35s","nikto9",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1166
1167
#61
1168
["0 item(s) reported",1,proc_low," < 35s","nikto10",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1169
1170
#62
1171
["0 item(s) reported",1,proc_low," < 35s","nikto11",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1172
1173
#63
1174
["0 item(s) reported",1,proc_low," < 35s","nikto12",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1175
1176
#64
1177
["0 item(s) reported",1,proc_low," < 35s","nikto13",["ERROR: Cannot resolve hostname","0 item(s) reported","No web server found","0 host(s) tested"]],
1178
1179
#65
1180
["0 item(s) reported",1,proc_low," < 35s","nikto14","ERROR: Cannot resolve hostname , 0 item(s) reported"],
1181
1182
#66
1183
["#1",0,proc_high," < 30m","dnsmap_brute",["[+] 0 (sub)domains and 0 IP address(es) found"]],
1184
1185
#67
1186
["open",0,proc_low," < 15s","nmapmssql",["Failed to resolve"]],
1187
1188
#68
1189
["open",0,proc_low," < 15s","nmapmysql",["Failed to resolve"]],
1190
1191
#69
1192
["open",0,proc_low," < 15s","nmaporacle",["Failed to resolve"]],
1193
1194
#70
1195
["open",0,proc_low," < 15s","nmapudprdp",["Failed to resolve"]],
1196
1197
#71
1198
["open",0,proc_low," < 15s","nmaptcprdp",["Failed to resolve"]],
1199
1200
#72
1201
["open",0,proc_high," > 50m","nmapfulltcp",["Failed to resolve"]],
1202
1203
#73
1204
["open",0,proc_high," > 75m","nmapfulludp",["Failed to resolve"]],
1205
1206
#74
1207
["open",0,proc_low," < 30s","nmapsnmp",["Failed to resolve"]],
1208
1209
#75
1210
["Microsoft SQL Server Error Log",0,proc_low," < 30s","elmahxd",["unable to resolve host address","Connection timed out"]],
1211
1212
#76
1213
["open",0,proc_low," < 20s","nmaptcpsmb",["Failed to resolve"]],
1214
1215
#77
1216
["open",0,proc_low," < 20s","nmapudpsmb",["Failed to resolve"]],
1217
1218
#78
1219
["Host:",0,proc_med," < 5m","wapiti",["none"]],
1220
1221
#79
1222
["WebDAV is ENABLED",0,proc_low," < 40s","nmapwebdaviis",["Failed to resolve"]],
1223
1224
#80
1225
["X-XSS-Protection[1",1,proc_med," < 3m","whatweb",["Timed out","Socket error","X-XSS-Protection[1"]],
1226
1227
#81
1228
["No names were discovered",1,proc_med," < 15m","amass",["The system was unable to build the pool of resolvers"]]
1229
1230
1231
1232
]
1233
1234
# Vulnerabilities and Remediation
1235
tools_fix = [
1236
[1, "Not a vulnerability, just an informational alert. The host does not have IPv6 support. IPv6 provides more security as IPSec (responsible for CIA - Confidentiality, Integrity and Availablity) is incorporated into this model. So it is good to have IPv6 Support.",
1237
"It is recommended to implement IPv6. More information on how to implement IPv6 can be found from this resource. https://www.cisco.com/c/en/us/solutions/collateral/enterprise/cisco-on-cisco/IPv6-Implementation_CS.html"],
1238
[2, "Sensitive Information Leakage Detected. The ASP.Net application does not filter out illegal characters in the URL. The attacker injects a special character (%7C~.aspx) to make the application spit sensitive information about the server stack.",
1239
"It is recommended to filter out special charaters in the URL and set a custom error page on such situations instead of showing default error messages. This resource helps you in setting up a custom error page on a Microsoft .Net Application. https://docs.microsoft.com/en-us/aspnet/web-forms/overview/older-versions-getting-started/deploying-web-site-projects/displaying-a-custom-error-page-cs"],
1240
[3, "It is not bad to have a CMS in WordPress. There are chances that the version may contain vulnerabilities or any third party scripts associated with it may possess vulnerabilities",
1241
"It is recommended to conceal the version of WordPress. This resource contains more information on how to secure your WordPress Blog. https://codex.wordpress.org/Hardening_WordPress"],
1242
[4, "It is not bad to have a CMS in Drupal. There are chances that the version may contain vulnerabilities or any third party scripts associated with it may possess vulnerabilities",
1243
"It is recommended to conceal the version of Drupal. This resource contains more information on how to secure your Drupal Blog. https://www.drupal.org/docs/7/site-building-best-practices/ensure-that-your-site-is-secure"],
1244
[5, "It is not bad to have a CMS in Joomla. There are chances that the version may contain vulnerabilities or any third party scripts associated with it may possess vulnerabilities",
1245
"It is recommended to conceal the version of Joomla. This resource contains more information on how to secure your Joomla Blog. https://www.incapsula.com/blog/10-tips-to-improve-your-joomla-website-security.html"],
1246
[6, "Sometimes robots.txt or sitemap.xml may contain rules such that certain links that are not supposed to be accessed/indexed by crawlers and search engines. Search engines may skip those links but attackers will be able to access it directly.",
1247
"It is a good practice not to include sensitive links in the robots or sitemap files."],
1248
[7, "Without a Web Application Firewall, An attacker may try to inject various attack patterns either manually or using automated scanners. An automated scanner may send hordes of attack vectors and patterns to validate an attack, there are also chances for the application to get DoS`ed (Denial of Service)",
1249
"Web Application Firewalls offer great protection against common web attacks like XSS, SQLi, etc. They also provide an additional line of defense to your security infrastructure. This resource contains information on web application firewalls that could suit your application. https://www.gartner.com/reviews/market/web-application-firewall"],
1250
[8, "Open Ports give attackers a hint to exploit the services. Attackers try to retrieve banner information through the ports and understand what type of service the host is running",
1251
"It is recommended to close the ports of unused services and use a firewall to filter the ports wherever necessary. This resource may give more insights. https://security.stackexchange.com/a/145781/6137"],
1252
[9, "Chances are very less to compromise a target with email addresses. However, attackers use this as a supporting data to gather information around the target. An attacker may make use of the username on the email address and perform brute-force attacks on not just email servers, but also on other legitimate panels like SSH, CMS, etc with a password list as they have a legitimate name. This is however a shoot in the dark scenario, the attacker may or may not be successful depending on the level of interest",
1253
"Since the chances of exploitation is feeble there is no need to take action. Perfect remediation would be choosing different usernames for different services will be more thoughtful."],
1254
[10, "Zone Transfer reveals critical topological information about the target. The attacker will be able to query all records and will have more or less complete knowledge about your host.",
1255
"Good practice is to restrict the Zone Transfer by telling the Master which are the IPs of the slaves that can be given access for the query. This SANS resource provides more information. https://www.sans.org/reading-room/whitepapers/dns/securing-dns-zone-transfer-868"],
1256
[11, "The email address of the administrator and other information (address, phone, etc) is available publicly. An attacker may use these information to leverage an attack. This may not be used to carry out a direct attack as this is not a vulnerability. However, an attacker makes use of these data to build information about the target.",
1257
"Some administrators intentionally would have made this information public, in this case it can be ignored. If not, it is recommended to mask the information. This resource provides information on this fix. http://www.name.com/blog/how-tos/tutorial-2/2013/06/protect-your-personal-information-with-whois-privacy/"],
1258
[12, "As the target is lacking this header, older browsers will be prone to Reflected XSS attacks.",
1259
"Modern browsers does not face any issues with this vulnerability (missing headers). However, older browsers are strongly recommended to be upgraded."],
1260
[13, "This attack works by opening multiple simultaneous connections to the web server and it keeps them alive as long as possible by continously sending partial HTTP requests, which never gets completed. They easily slip through IDS by sending partial requests.",
1261
"If you are using Apache Module, `mod_antiloris` would help. For other setup you can find more detailed remediation on this resource. https://www.acunetix.com/blog/articles/slow-http-dos-attacks-mitigate-apache-http-server/"],
1262
[14, "This vulnerability seriously leaks private information of your host. An attacker can keep the TLS connection alive and can retrieve a maximum of 64K of data per heartbeat.",
1263
"PFS (Perfect Forward Secrecy) can be implemented to make decryption difficult. Complete remediation and resource information is available here. http://heartbleed.com/"],
1264
[15, "By exploiting this vulnerability, an attacker will be able gain access to sensitive data in a n encrypted session such as session ids, cookies and with those data obtained, will be able to impersonate that particular user.",
1265
"This is a flaw in the SSL 3.0 Protocol. A better remediation would be to disable using the SSL 3.0 protocol. For more information, check this resource. https://www.us-cert.gov/ncas/alerts/TA14-290A"],
1266
[16, "This attacks takes place in the SSL Negotiation (Handshake) which makes the client unaware of the attack. By successfully altering the handshake, the attacker will be able to pry on all the information that is sent from the client to server and vice-versa",
1267
"Upgrading OpenSSL to latest versions will mitigate this issue. This resource gives more information about the vulnerability and the associated remediation. http://ccsinjection.lepidum.co.jp/"],
1268
[17, "With this vulnerability the attacker will be able to perform a MiTM attack and thus compromising the confidentiality factor.",
1269
"Upgrading OpenSSL to latest version will mitigate this issue. Versions prior to 1.1.0 is prone to this vulnerability. More information can be found in this resource. https://bobcares.com/blog/how-to-fix-sweet32-birthday-attacks-vulnerability-cve-2016-2183/"],
1270
[18, "With the LogJam attack, the attacker will be able to downgrade the TLS connection which allows the attacker to read and modify any data passed over the connection.",
1271
"Make sure any TLS libraries you use are up-to-date, that servers you maintain use 2048-bit or larger primes, and that clients you maintain reject Diffie-Hellman primes smaller than 1024-bit. More information can be found in this resource. https://weakdh.org/"],
1272
[19, "Allows remote attackers to cause a denial of service (crash), and possibly obtain sensitive information in applications that use OpenSSL, via a malformed ClientHello handshake message that triggers an out-of-bounds memory access.",
1273
" OpenSSL versions 0.9.8h through 0.9.8q and 1.0.0 through 1.0.0c are vulnerable. It is recommended to upgrade the OpenSSL version. More resource and information can be found here. https://www.openssl.org/news/secadv/20110208.txt"],
1274
[20, "Otherwise termed as BREACH atack, exploits the compression in the underlying HTTP protocol. An attacker will be able to obtain email addresses, session tokens, etc from the TLS encrypted web traffic.",
1275
"Turning off TLS compression does not mitigate this vulnerability. First step to mitigation is to disable Zlib compression followed by other measures mentioned in this resource. http://breachattack.com/"],
1276
[21, "Otherwise termed as Plain-Text Injection attack, which allows MiTM attackers to insert data into HTTPS sessions, and possibly other types of sessions protected by TLS or SSL, by sending an unauthenticated request that is processed retroactively by a server in a post-renegotiation context.",
1277
"Detailed steps of remediation can be found from these resources. https://securingtomorrow.mcafee.com/technical-how-to/tips-securing-ssl-renegotiation/ https://www.digicert.com/news/2011-06-03-ssl-renego/ "],
1278
[22, "This vulnerability allows attackers to steal existing TLS sessions from users.",
1279
"Better advice is to disable session resumption. To harden session resumption, follow this resource that has some considerable information. https://wiki.crashtest-security.com/display/KB/Harden+TLS+Session+Resumption"],
1280
[23, "This has nothing to do with security risks, however attackers may use this unavailability of load balancers as an advantage to leverage a denial of service attack on certain services or on the whole application itself.",
1281
"Load-Balancers are highly encouraged for any web application. They improve performance times as well as data availability on during times of server outage. To know more information on load balancers and setup, check this resource. https://www.digitalocean.com/community/tutorials/what-is-load-balancing"],
1282
[24, "An attacker can forwarded requests that comes to the legitimate URL or web application to a third party address or to the attacker's location that can serve malware and affect the end user's machine.",
1283
"It is highly recommended to deploy DNSSec on the host target. Full deployment of DNSSEC will ensure the end user is connecting to the actual web site or other service corresponding to a particular domain name. For more information, check this resource. https://www.cloudflare.com/dns/dnssec/how-dnssec-works/"],
1284
[25, "Attackers may find considerable amount of information from these files. There are even chances attackers may get access to critical information from these files.",
1285
"It is recommended to block or restrict access to these files unless necessary."],
1286
[26, "Attackers may find considerable amount of information from these directories. There are even chances attackers may get access to critical information from these directories.",
1287
"It is recommended to block or restrict access to these directories unless necessary."],
1288
[27, "May not be SQLi vulnerable. An attacker will be able to know that the host is using a backend for operation.",
1289
"Banner Grabbing should be restricted and access to the services from outside would should be made minimum."],
1290
[28, "An attacker will be able to steal cookies, deface web application or redirect to any third party address that can serve malware.",
1291
"Input validation and Output Sanitization can completely prevent Cross Site Scripting (XSS) attacks. XSS attacks can be mitigated in future by properly following a secure coding methodology. The following comprehensive resource provides detailed information on fixing this vulnerability. https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet"],
1292
[29, "SSL related vulnerabilities breaks the confidentiality factor. An attacker may perform a MiTM attack, intrepret and eavesdrop the communication.",
1293
"Proper implementation and upgraded version of SSL and TLS libraries are very critical when it comes to blocking SSL related vulnerabilities."],
1294
[30, "Particular Scanner found multiple vulnerabilities that an attacker may try to exploit the target.",
1295
"Refer to RS-Vulnerability-Report to view the complete information of the vulnerability, once the scan gets completed."],
1296
[31, "Attackers may gather more information from subdomains relating to the parent domain. Attackers may even find other services from the subdomains and try to learn the architecture of the target. There are even chances for the attacker to find vulnerabilities as the attack surface gets larger with more subdomains discovered.",
1297
"It is sometimes wise to block sub domains like development, staging to the outside world, as it gives more information to the attacker about the tech stack. Complex naming practices also help in reducing the attack surface as attackers find hard to perform subdomain bruteforcing through dictionaries and wordlists."],
1298
[32, "Through this deprecated protocol, an attacker may be able to perform MiTM and other complicated attacks.",
1299
"It is highly recommended to stop using this service and it is far outdated. SSH can be used to replace TELNET. For more information, check this resource https://www.ssh.com/ssh/telnet"],
1300
[33, "This protocol does not support secure communication and there are likely high chances for the attacker to eavesdrop the communication. Also, many FTP programs have exploits available in the web such that an attacker can directly crash the application or either get a SHELL access to that target.",
1301
"Proper suggested fix is use an SSH protocol instead of FTP. It supports secure communication and chances for MiTM attacks are quite rare."],
1302
[34, "The StuxNet is level-3 worm that exposes critical information of the target organization. It was a cyber weapon that was designed to thwart the nuclear intelligence of Iran. Seriously wonder how it got here? Hope this isn't a false positive Nmap ;)",
1303
"It is highly recommended to perform a complete rootkit scan on the host. For more information refer to this resource. https://www.symantec.com/security_response/writeup.jsp?docid=2010-071400-3123-99&tabid=3"],
1304
[35, "WebDAV is supposed to contain multiple vulnerabilities. In some case, an attacker may hide a malicious DLL file in the WebDAV share however, and upon convincing the user to open a perfectly harmless and legitimate file, execute code under the context of that user",
1305
"It is recommended to disable WebDAV. Some critical resource regarding disbling WebDAV can be found on this URL. https://www.networkworld.com/article/2202909/network-security/-webdav-is-bad---says-security-researcher.html"],
1306
[36, "Attackers always do a fingerprint of any server before they launch an attack. Fingerprinting gives them information about the server type, content- they are serving, last modification times etc, this gives an attacker to learn more information about the target",
1307
"A good practice is to obfuscate the information to outside world. Doing so, the attackers will have tough time understanding the server's tech stack and therefore leverage an attack."],
1308
[37, "Attackers mostly try to render web applications or service useless by flooding the target, such that blocking access to legitimate users. This may affect the business of a company or organization as well as the reputation",
1309
"By ensuring proper load balancers in place, configuring rate limits and multiple connection restrictions, such attacks can be drastically mitigated."],
1310
[38, "Intruders will be able to remotely include shell files and will be able to access the core file system or they will be able to read all the files as well. There are even higher chances for the attacker to remote execute code on the file system.",
1311
"Secure code practices will mostly prevent LFI, RFI and RCE attacks. The following resource gives a detailed insight on secure coding practices. https://wiki.sei.cmu.edu/confluence/display/seccode/Top+10+Secure+Coding+Practices"],
1312
[39, "Hackers will be able to steal data from the backend and also they can authenticate themselves to the website and can impersonate as any user since they have total control over the backend. They can even wipe out the entire database. Attackers can also steal cookie information of an authenticated user and they can even redirect the target to any malicious address or totally deface the application.",
1313
"Proper input validation has to be done prior to directly querying the database information. A developer should remember not to trust an end-user's input. By following a secure coding methodology attacks like SQLi, XSS and BSQLi. The following resource guides on how to implement secure coding methodology on application development. https://wiki.sei.cmu.edu/confluence/display/seccode/Top+10+Secure+Coding+Practices"],
1314
[40, "Attackers exploit the vulnerability in BASH to perform remote code execution on the target. An experienced attacker can easily take over the target system and access the internal sources of the machine",
1315
"This vulnerability can be mitigated by patching the version of BASH. The following resource gives an indepth analysis of the vulnerability and how to mitigate it. https://www.symantec.com/connect/blogs/shellshock-all-you-need-know-about-bash-bug-vulnerability https://www.digitalocean.com/community/tutorials/how-to-protect-your-server-against-the-shellshock-bash-vulnerability"],
1316
[41, "Gives attacker an idea on how the address scheming is done internally on the organizational network. Discovering the private addresses used within an organization can help attackers in carrying out network-layer attacks aiming to penetrate the organization's internal infrastructure.",
1317
"Restrict the banner information to the outside world from the disclosing service. More information on mitigating this vulnerability can be found here. https://portswigger.net/kb/issues/00600300_private-ip-addresses-disclosed"],
1318
[42, "There are chances for an attacker to manipulate files on the webserver.",
1319
"It is recommended to disable the HTTP PUT and DEL methods incase if you don't use any REST API Services. Following resources helps you how to disable these methods. http://www.techstacks.com/howto/disable-http-methods-in-tomcat.html https://docs.oracle.com/cd/E19857-01/820-5627/gghwc/index.html https://developer.ibm.com/answers/questions/321629/how-to-disable-http-methods-head-put-delete-option/"],
1320
[43, "Attackers try to learn more about the target from the amount of information exposed in the headers. An attacker may know what type of tech stack a web application is emphasizing and many other information.",
1321
"Banner Grabbing should be restricted and access to the services from outside would should be made minimum."],
1322
[44, "An attacker who successfully exploited this vulnerability could read data, such as the view state, which was encrypted by the server. This vulnerability can also be used for data tampering, which, if successfully exploited, could be used to decrypt and tamper with the data encrypted by the server.",
1323
"Microsoft has released a set of patches on their website to mitigate this issue. The information required to fix this vulnerability can be inferred from this resource. https://docs.microsoft.com/en-us/security-updates/securitybulletins/2010/ms10-070"],
1324
[45, "Any outdated web server may contain multiple vulnerabilities as their support would've been ended. An attacker may make use of such an opportunity to leverage attacks.",
1325
"It is highly recommended to upgrade the web server to the available latest version."],
1326
[46, "Hackers will be able to manipulate the URLs easily through a GET/POST request. They will be able to inject multiple attack vectors in the URL with ease and able to monitor the response as well",
1327
"By ensuring proper sanitization techniques and employing secure coding practices it will be impossible for the attacker to penetrate through. The following resource gives a detailed insight on secure coding practices. https://wiki.sei.cmu.edu/confluence/display/seccode/Top+10+Secure+Coding+Practices"],
1328
[47, "Since the attacker has knowledge about the particular type of backend the target is running, they will be able to launch a targetted exploit for the particular version. They may also try to authenticate with default credentials to get themselves through.",
1329
"Timely security patches for the backend has to be installed. Default credentials has to be changed. If possible, the banner information can be changed to mislead the attacker. The following resource gives more information on how to secure your backend. http://kb.bodhost.com/secure-database-server/"],
1330
[48, "Attackers may launch remote exploits to either crash the service or tools like ncrack to try brute-forcing the password on the target.",
1331
"It is recommended to block the service to outside world and made the service accessible only through the a set of allowed IPs only really neccessary. The following resource provides insights on the risks and as well as the steps to block the service. https://www.perspectiverisk.com/remote-desktop-service-vulnerabilities/"],
1332
[49, "Hackers will be able to read community strings through the service and enumerate quite a bit of information from the target. Also, there are multiple Remote Code Execution and Denial of Service vulnerabilities related to SNMP services.",
1333
"Use a firewall to block the ports from the outside world. The following article gives wide insight on locking down SNMP service. https://www.techrepublic.com/article/lock-it-down-dont-allow-snmp-to-compromise-network-security/"],
1334
[50, "Attackers will be able to find the logs and error information generated by the application. They will also be able to see the status codes that was generated on the application. By combining all these information, the attacker will be able to leverage an attack.",
1335
"By restricting access to the logger application from the outside world will be more than enough to mitigate this weakness."],
1336
[51, "Cyber Criminals mainly target this service as it is very easier for them to perform a remote attack by running exploits. WannaCry Ransomware is one such example.",
1337
"Exposing SMB Service to the outside world is a bad idea, it is recommended to install latest patches for the service in order not to get compromised. The following resource provides a detailed information on SMB Hardening concepts. https://kb.iweb.com/hc/en-us/articles/115000274491-Securing-Windows-SMB-and-NetBios-NetBT-Services"]
1338
]
1339
1340
# Tool Set
1341
tools_precheck = [
1342
["wapiti"], ["whatweb"], ["nmap"], ["golismero"], ["host"], ["wget"], ["uniscan"], ["wafw00f"], ["dirb"], ["davtest"], ["theHarvester"], ["xsser"], ["dnsrecon"],["fierce"], ["dnswalk"], ["whois"], ["sslyze"], ["lbd"], ["golismero"], ["dnsenum"],["dmitry"], ["davtest"], ["nikto"], ["dnsmap"], ["amass"]
1343
]
1344
1345
def get_parser():
1346
1347
parser = argparse.ArgumentParser(add_help=False)
1348
parser.add_argument('-h', '--help', action='store_true',
1349
help='Show help message and exit.')
1350
parser.add_argument('-u', '--update', action='store_true',
1351
help='Update RapidScan.')
1352
parser.add_argument('-s', '--skip', action='append', default=[],
1353
help='Skip some tools', choices=[t[0] for t in tools_precheck])
1354
parser.add_argument('-n', '--nospinner', action='store_true',
1355
help='Disable the idle loader/spinner.')
1356
parser.add_argument('target', nargs='?', metavar='URL', help='URL to scan.', default='', type=str)
1357
return parser
1358
1359
1360
# Shuffling Scan Order (starts)
1361
scan_shuffle = list(zip(tool_names, tool_cmd, tool_resp, tool_status))
1362
random.shuffle(scan_shuffle)
1363
tool_names, tool_cmd, tool_resp, tool_status = zip(*scan_shuffle)
1364
tool_checks = (len(tool_names) + len(tool_resp) + len(tool_status)) / 3 # Cross verification incase, breaks.
1365
tool_checks = round(tool_checks)
1366
# Shuffling Scan Order (ends)
1367
1368
# Tool Head Pointer: (can be increased but certain tools will be skipped)
1369
tool = 0
1370
1371
# Run Test
1372
runTest = 1
1373
1374
# For accessing list/dictionary elements
1375
arg1 = 0
1376
arg2 = 1
1377
arg3 = 2
1378
arg4 = 3
1379
arg5 = 4
1380
arg6 = 5
1381
1382
# Detected Vulnerabilities [will be dynamically populated]
1383
rs_vul_list = list()
1384
rs_vul_num = 0
1385
rs_vul = 0
1386
1387
# Total Time Elapsed
1388
rs_total_elapsed = 0
1389
1390
# Tool Pre Checker
1391
rs_avail_tools = 0
1392
1393
# Checks Skipped
1394
rs_skipped_checks = 0
1395
1396
if len(sys.argv) == 1:
1397
logo()
1398
helper()
1399
sys.exit(1)
1400
1401
args_namespace = get_parser().parse_args()
1402
1403
if args_namespace.nospinner:
1404
spinner.disabled = True
1405
1406
if args_namespace.help or (not args_namespace.update \
1407
and not args_namespace.target):
1408
logo()
1409
helper()
1410
elif args_namespace.update:
1411
logo()
1412
print("RapidScan is updating....Please wait.\n")
1413
spinner.start()
1414
# Checking internet connectivity first...
1415
rs_internet_availability = check_internet()
1416
if rs_internet_availability == 0:
1417
print("\t"+ bcolors.BG_ERR_TXT + "There seems to be some problem connecting to the internet. Please try again or later." +bcolors.ENDC)
1418
spinner.stop()
1419
sys.exit(1)
1420
cmd = 'sha1sum rapidscan.py | grep .... | cut -c 1-40'
1421
oldversion_hash = subprocess.check_output(cmd, shell=True)
1422
oldversion_hash = oldversion_hash.strip()
1423
os.system('wget -N https://raw.githubusercontent.com/skavngr/rapidscan/master/rapidscan.py -O rapidscan.py > /dev/null 2>&1')
1424
newversion_hash = subprocess.check_output(cmd, shell=True)
1425
newversion_hash = newversion_hash.strip()
1426
if oldversion_hash == newversion_hash :
1427
clear()
1428
print("\t"+ bcolors.OKBLUE +"You already have the latest version of RapidScan." + bcolors.ENDC)
1429
else:
1430
clear()
1431
print("\t"+ bcolors.OKGREEN +"RapidScan successfully updated to the latest version." +bcolors.ENDC)
1432
spinner.stop()
1433
sys.exit(1)
1434
1435
elif args_namespace.target:
1436
1437
target = url_maker(args_namespace.target)
1438
#target = args_namespace.target
1439
os.system('rm /tmp/rapidscan* > /dev/null 2>&1') # Clearing previous scan files
1440
os.system('clear')
1441
os.system('setterm -cursor off')
1442
logo()
1443
print(bcolors.BG_HEAD_TXT+"[ Checking Available Security Scanning Tools Phase... Initiated. ]"+bcolors.ENDC)
1444
1445
unavail_tools_names = list()
1446
1447
while (rs_avail_tools < len(tools_precheck)):
1448
precmd = str(tools_precheck[rs_avail_tools][arg1])
1449
try:
1450
p = subprocess.Popen([precmd], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,shell=True)
1451
output, err = p.communicate()
1452
val = output + err
1453
except:
1454
print("\t"+bcolors.BG_ERR_TXT+"RapidScan was terminated abruptly..."+bcolors.ENDC)
1455
sys.exit(1)
1456
1457
# If the tool is not found or it's part of the --skip argument(s), disabling it
1458
if b"not found" in val or tools_precheck[rs_avail_tools][arg1] in args_namespace.skip :
1459
if b"not found" in val:
1460
print("\t"+bcolors.OKBLUE+tools_precheck[rs_avail_tools][arg1]+bcolors.ENDC+bcolors.BADFAIL+"...unavailable."+bcolors.ENDC)
1461
elif tools_precheck[rs_avail_tools][arg1] in args_namespace.skip :
1462
print("\t"+bcolors.OKBLUE+tools_precheck[rs_avail_tools][arg1]+bcolors.ENDC+bcolors.BADFAIL+"...skipped."+bcolors.ENDC)
1463
1464
for scanner_index, scanner_val in enumerate(tool_names):
1465
if scanner_val[2] == tools_precheck[rs_avail_tools][arg1]:
1466
scanner_val[3] = 0 # disabling scanner as it's not available.
1467
unavail_tools_names.append(tools_precheck[rs_avail_tools][arg1])
1468
1469
else:
1470
print("\t"+bcolors.OKBLUE+tools_precheck[rs_avail_tools][arg1]+bcolors.ENDC+bcolors.OKGREEN+"...available."+bcolors.ENDC)
1471
rs_avail_tools = rs_avail_tools + 1
1472
clear()
1473
unavail_tools_names = list(set(unavail_tools_names))
1474
if len(unavail_tools_names) == 0:
1475
print("\t"+bcolors.OKGREEN+"All Scanning Tools are available. Complete vulnerability checks will be performed by RapidScan."+bcolors.ENDC)
1476
else:
1477
print("\t"+bcolors.WARNING+"Some of these tools "+bcolors.BADFAIL+str(unavail_tools_names)+bcolors.ENDC+bcolors.WARNING+" are unavailable or will be skipped. RapidScan will still perform the rest of the tests. Install these tools to fully utilize the functionality of RapidScan."+bcolors.ENDC)
1478
print(bcolors.BG_ENDL_TXT+"[ Checking Available Security Scanning Tools Phase... Completed. ]"+bcolors.ENDC)
1479
print("\n")
1480
print(bcolors.BG_HEAD_TXT+"[ Preliminary Scan Phase Initiated... Loaded "+str(tool_checks)+" vulnerability checks. ]"+bcolors.ENDC)
1481
#while (tool < 1):
1482
while(tool < len(tool_names)):
1483
print("["+tool_status[tool][arg3]+tool_status[tool][arg4]+"] Deploying "+str(tool+1)+"/"+str(tool_checks)+" | "+bcolors.OKBLUE+tool_names[tool][arg2]+bcolors.ENDC,)
1484
if tool_names[tool][arg4] == 0:
1485
print(bcolors.WARNING+"\nScanning Tool Unavailable. Skipping Test...\n"+bcolors.ENDC)
1486
rs_skipped_checks = rs_skipped_checks + 1
1487
tool = tool + 1
1488
continue
1489
try:
1490
spinner.start()
1491
except Exception as e:
1492
print("\n")
1493
scan_start = time.time()
1494
temp_file = "/tmp/rapidscan_temp_"+tool_names[tool][arg1]
1495
cmd = tool_cmd[tool][arg1]+target+tool_cmd[tool][arg2]+" > "+temp_file+" 2>&1"
1496
1497
try:
1498
subprocess.check_output(cmd, shell=True)
1499
except KeyboardInterrupt:
1500
runTest = 0
1501
except:
1502
runTest = 1
1503
1504
if runTest == 1:
1505
spinner.stop()
1506
scan_stop = time.time()
1507
elapsed = scan_stop - scan_start
1508
rs_total_elapsed = rs_total_elapsed + elapsed
1509
#print(bcolors.OKBLUE+"\b...Completed in "+display_time(int(elapsed))+bcolors.ENDC+"\n")
1510
sys.stdout.write(ERASE_LINE)
1511
print(bcolors.OKBLUE+"\nScan Completed in "+display_time(int(elapsed))+bcolors.ENDC, end='\r', flush=True)
1512
print("\n")
1513
#clear()
1514
rs_tool_output_file = open(temp_file).read()
1515
if tool_status[tool][arg2] == 0:
1516
if tool_status[tool][arg1].lower() in rs_tool_output_file.lower():
1517
#print "\t"+ vul_info(tool_resp[tool][arg2]) + bcolors.BADFAIL +" "+ tool_resp[tool][arg1] + bcolors.ENDC
1518
vul_remed_info(tool,tool_resp[tool][arg2],tool_resp[tool][arg3])
1519
rs_vul_list.append(tool_names[tool][arg1]+"*"+tool_names[tool][arg2])
1520
else:
1521
if any(i in rs_tool_output_file for i in tool_status[tool][arg6]):
1522
m = 1 # This does nothing.
1523
else:
1524
#print "\t"+ vul_info(tool_resp[tool][arg2]) + bcolors.BADFAIL +" "+ tool_resp[tool][arg1] + bcolors.ENDC
1525
vul_remed_info(tool,tool_resp[tool][arg2],tool_resp[tool][arg3])
1526
rs_vul_list.append(tool_names[tool][arg1]+"*"+tool_names[tool][arg2])
1527
else:
1528
runTest = 1
1529
spinner.stop()
1530
scan_stop = time.time()
1531
elapsed = scan_stop - scan_start
1532
rs_total_elapsed = rs_total_elapsed + elapsed
1533
#sys.stdout.write(CURSOR_UP_ONE)
1534
sys.stdout.write(ERASE_LINE)
1535
#print("-" * terminal_size(), end='\r', flush=True)
1536
print(bcolors.OKBLUE+"\nScan Interrupted in "+display_time(int(elapsed))+bcolors.ENDC, end='\r', flush=True)
1537
print("\n"+bcolors.WARNING + "\tTest Skipped. Performing Next. Press Ctrl+Z to Quit RapidScan.\n" + bcolors.ENDC)
1538
rs_skipped_checks = rs_skipped_checks + 1
1539
1540
tool=tool+1
1541
1542
print(bcolors.BG_ENDL_TXT+"[ Preliminary Scan Phase Completed. ]"+bcolors.ENDC)
1543
print("\n")
1544
1545
#################### Report & Documentation Phase ###########################
1546
date = subprocess.Popen(["date", "+%Y-%m-%d"],stdout=subprocess.PIPE).stdout.read()[:-1].decode("utf-8")
1547
debuglog = "rs.dbg.%s.%s" % (target, date)
1548
vulreport = "rs.vul.%s.%s" % (target, date)
1549
print(bcolors.BG_HEAD_TXT+"[ Report Generation Phase Initiated. ]"+bcolors.ENDC)
1550
if len(rs_vul_list)==0:
1551
print("\t"+bcolors.OKGREEN+"No Vulnerabilities Detected."+bcolors.ENDC)
1552
else:
1553
with open(vulreport, "a") as report:
1554
while(rs_vul < len(rs_vul_list)):
1555
vuln_info = rs_vul_list[rs_vul].split('*')
1556
report.write(vuln_info[arg2])
1557
report.write("\n------------------------\n\n")
1558
temp_report_name = "/tmp/rapidscan_temp_"+vuln_info[arg1]
1559
with open(temp_report_name, 'r') as temp_report:
1560
data = temp_report.read()
1561
report.write(data)
1562
report.write("\n\n")
1563
temp_report.close()
1564
rs_vul = rs_vul + 1
1565
1566
print("\tComplete Vulnerability Report for "+bcolors.OKBLUE+target+bcolors.ENDC+" named "+bcolors.OKGREEN+vulreport+bcolors.ENDC+" is available under the same directory RapidScan resides.")
1567
1568
report.close()
1569
# Writing all scan files output into RS-Debug-ScanLog for debugging purposes.
1570
for file_index, file_name in enumerate(tool_names):
1571
with open(debuglog, "a") as report:
1572
try:
1573
with open("/tmp/rapidscan_temp_"+file_name[arg1], 'r') as temp_report:
1574
data = temp_report.read()
1575
report.write(file_name[arg2])
1576
report.write("\n------------------------\n\n")
1577
report.write(data)
1578
report.write("\n\n")
1579
temp_report.close()
1580
except:
1581
break
1582
report.close()
1583
1584
print("\tTotal Number of Vulnerability Checks : "+bcolors.BOLD+bcolors.OKGREEN+str(len(tool_names))+bcolors.ENDC)
1585
print("\tTotal Number of Vulnerability Checks Skipped: "+bcolors.BOLD+bcolors.WARNING+str(rs_skipped_checks)+bcolors.ENDC)
1586
print("\tTotal Number of Vulnerabilities Detected : "+bcolors.BOLD+bcolors.BADFAIL+str(len(rs_vul_list))+bcolors.ENDC)
1587
print("\tTotal Time Elapsed for the Scan : "+bcolors.BOLD+bcolors.OKBLUE+display_time(int(rs_total_elapsed))+bcolors.ENDC)
1588
print("\n")
1589
print("\tFor Debugging Purposes, You can view the complete output generated by all the tools named "+bcolors.OKBLUE+debuglog+bcolors.ENDC+" under the same directory.")
1590
print(bcolors.BG_ENDL_TXT+"[ Report Generation Phase Completed. ]"+bcolors.ENDC)
1591
1592
os.system('setterm -cursor on')
1593
os.system('rm /tmp/rapidscan_te* > /dev/null 2>&1') # Clearing previous scan files
1594
1595