Updated dnsrecon plugins.
Fixed a few formatting issues and typos.
This commit is contained in:
parent
f18fce4487
commit
b70f84c48b
|
|
@ -1,5 +1,5 @@
|
||||||
from autorecon.plugins import ServiceScan
|
from autorecon.plugins import ServiceScan
|
||||||
from autorecon.io import error, info, fformat
|
from autorecon.io import error
|
||||||
from shutil import which
|
from shutil import which
|
||||||
|
|
||||||
class NmapDNS(ServiceScan):
|
class NmapDNS(ServiceScan):
|
||||||
|
|
@ -59,7 +59,8 @@ class NmapMulticastDNS(ServiceScan):
|
||||||
await service.execute('nmap {nmap_extra} -sV -p {port} --script="banner,(dns* or ssl*) and not (brute or broadcast or dos or external or fuzzer)" -oN "{scandir}/{protocol}_{port}_multicastdns_nmap.txt" -oX "{scandir}/xml/{protocol}_{port}_multicastdns_nmap.xml" {address}')
|
await service.execute('nmap {nmap_extra} -sV -p {port} --script="banner,(dns* or ssl*) and not (brute or broadcast or dos or external or fuzzer)" -oN "{scandir}/{protocol}_{port}_multicastdns_nmap.txt" -oX "{scandir}/xml/{protocol}_{port}_multicastdns_nmap.xml" {address}')
|
||||||
|
|
||||||
|
|
||||||
class DnsReconDefault (ServiceScan):
|
class DnsReconDefault(ServiceScan):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.name = "DnsRecon Default Scan"
|
self.name = "DnsRecon Default Scan"
|
||||||
|
|
@ -71,22 +72,22 @@ class DnsReconDefault (ServiceScan):
|
||||||
self.match_service_name('^domain')
|
self.match_service_name('^domain')
|
||||||
|
|
||||||
def check(self):
|
def check(self):
|
||||||
tool = 'dnsrecon'
|
if which('dnsrecon') is None:
|
||||||
if which('gobuster') is None:
|
|
||||||
error('The program dnsrecon could not be found. Make sure it is installed. (On Kali, run: sudo apt install dnsrecon)')
|
error('The program dnsrecon could not be found. Make sure it is installed. (On Kali, run: sudo apt install dnsrecon)')
|
||||||
|
|
||||||
def manual(self, service, plugin_was_run):
|
def manual(self, service, plugin_was_run):
|
||||||
service.add_manual_command('Use dnsrecon to automatically query data from the DNS server. You must specify the target domain name.', [
|
service.add_manual_command('Use dnsrecon to automatically query data from the DNS server. You must specify the target domain name.', [
|
||||||
'dnsrecon -n {address} -d <DOMAIN-NAME> | tee {scandir}/{protocol}_{port}_dnsrecon_default_manual.txt'
|
'dnsrecon -n {address} -d <DOMAIN-NAME> 2>&1 | tee {scandir}/{protocol}_{port}_dnsrecon_default_manual.txt'
|
||||||
])
|
])
|
||||||
|
|
||||||
async def run(self, service):
|
async def run(self, service):
|
||||||
if self.get_global('domain'):
|
if self.get_global('domain'):
|
||||||
await service.execute('dnsrecon -n {address} -d ' + self.get_global('domain'), outfile='{protocol}_{port}_dnsrecon_default.txt')
|
await service.execute('dnsrecon -n {address} -d ' + self.get_global('domain') + ' 2>&1', outfile='{protocol}_{port}_dnsrecon_default.txt')
|
||||||
else:
|
else:
|
||||||
await service.execute('echo "Domain name was not specified in the command line options. If you know the domain name, then look in the manual commands file for the dnsrecon command."', outfile='{scandir}/{protocol}_{port}_dnsrecon_default.txt')
|
error('A domain name was not specified in the command line options (--global.domain). If you know the domain name, look in the _manual_commands.txt file for the dnsrecon command.')
|
||||||
|
|
||||||
|
class DnsReconSubdomainBruteforce(ServiceScan):
|
||||||
|
|
||||||
class DnsReconSubdomainBruteforce (ServiceScan):
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.name = "DnsRecon Bruteforce Subdomains"
|
self.name = "DnsRecon Bruteforce Subdomains"
|
||||||
|
|
@ -98,8 +99,7 @@ class DnsReconSubdomainBruteforce (ServiceScan):
|
||||||
self.match_service_name('^domain')
|
self.match_service_name('^domain')
|
||||||
|
|
||||||
def check(self):
|
def check(self):
|
||||||
tool = 'dnsrecon'
|
if which('dnsrecon') is None:
|
||||||
if which('gobuster') is None:
|
|
||||||
error('The program dnsrecon could not be found. Make sure it is installed. (On Kali, run: sudo apt install dnsrecon)')
|
error('The program dnsrecon could not be found. Make sure it is installed. (On Kali, run: sudo apt install dnsrecon)')
|
||||||
|
|
||||||
def manual(self, service, plugin_was_run):
|
def manual(self, service, plugin_was_run):
|
||||||
|
|
@ -107,6 +107,5 @@ class DnsReconSubdomainBruteforce (ServiceScan):
|
||||||
if self.get_global('domain'):
|
if self.get_global('domain'):
|
||||||
domain_name = self.get_global('domain')
|
domain_name = self.get_global('domain')
|
||||||
service.add_manual_command('Use dnsrecon to bruteforce subdomains of a DNS domain.', [
|
service.add_manual_command('Use dnsrecon to bruteforce subdomains of a DNS domain.', [
|
||||||
'dnsrecon -n {address} -d ' + domain_name + ' -D /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -t brt | tee {scandir}/{protocol}_{port}_dnsrecon_subdomain_bruteforce.txt',
|
'dnsrecon -n {address} -d ' + domain_name + ' -D /usr/share/seclists/Discovery/DNS/subdomains-top1million-110000.txt -t brt 2>&1 | tee {scandir}/{protocol}_{port}_dnsrecon_subdomain_bruteforce.txt',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ from autorecon.io import slugify, e, fformat, cprint, debug, info, warn, error,
|
||||||
from autorecon.plugins import Pattern, PortScan, ServiceScan, Report, AutoRecon
|
from autorecon.plugins import Pattern, PortScan, ServiceScan, Report, AutoRecon
|
||||||
from autorecon.targets import Target, Service
|
from autorecon.targets import Target, Service
|
||||||
|
|
||||||
VERSION = "2.0.4"
|
VERSION = "2.0.7"
|
||||||
|
|
||||||
if not os.path.exists(config['config_dir']):
|
if not os.path.exists(config['config_dir']):
|
||||||
shutil.rmtree(config['config_dir'], ignore_errors=True, onerror=None)
|
shutil.rmtree(config['config_dir'], ignore_errors=True, onerror=None)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "autorecon"
|
name = "autorecon"
|
||||||
version = "2.0.4"
|
version = "2.0.7"
|
||||||
description = "A multi-threaded network reconnaissance tool which performs automated enumeration of services."
|
description = "A multi-threaded network reconnaissance tool which performs automated enumeration of services."
|
||||||
authors = ["Tib3rius"]
|
authors = ["Tib3rius"]
|
||||||
license = "GNU GPL v3"
|
license = "GNU GPL v3"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue