Plugin Updates

Better logic in wkhtmltoimage plugin.
New Redis plugins.
New RPCDump plugin.
Updated README for new tools.
This commit is contained in:
Tib3rius 2021-08-16 22:46:15 -04:00
parent 68d947dccf
commit a1ca13ecbe
4 changed files with 59 additions and 4 deletions

View File

@ -50,11 +50,13 @@ Additionally the following commands may need to be installed, depending on your
curl
enum4linux
feroxbuster
impacket-scripts
nbtscan
nikto
nmap
onesixtyone
oscanner
redis-tools
smbclient
smbmap
snmpwalk
@ -68,7 +70,7 @@ wkhtmltopdf
On Kali Linux, you can ensure these are all installed using the following command:
```bash
$ sudo apt install seclists curl enum4linux feroxbuster nbtscan nikto nmap onesixtyone oscanner smbclient smbmap snmp sslscan sipvicious tnscmd10g whatweb wkhtmltopdf
$ sudo apt install seclists curl enum4linux feroxbuster impacket-scripts nbtscan nikto nmap onesixtyone oscanner redis-tools smbclient smbmap snmp sslscan sipvicious tnscmd10g whatweb wkhtmltopdf
```
## Installation

View File

@ -166,8 +166,9 @@ class WkHTMLToImage(ServiceScan):
self.match_service_name('^nacn_http$', negative_match=True)
async def run(self, service):
if which('wkhtmltoimage') is not None and service.protocol == 'tcp':
await service.execute('wkhtmltoimage --format png {http_scheme}://{address}:{port}/ {scandir}/{protocol}_{port}_{http_scheme}_screenshot.png')
if which('wkhtmltoimage') is not None:
if service.protocol == 'tcp':
await service.execute('wkhtmltoimage --format png {http_scheme}://{address}:{port}/ {scandir}/{protocol}_{port}_{http_scheme}_screenshot.png')
else:
error('The wkhtmltoimage program could not be found. Make sure it is installed. (On Kali, run: sudo apt install wkhtmltopdf)')

34
plugins/redis.py Normal file
View File

@ -0,0 +1,34 @@
from autorecon import ServiceScan, error
from shutil import which
class NmapRedis(ServiceScan):
def __init__(self):
super().__init__()
self.name = 'Nmap Redis'
self.tags = ['default', 'redis']
def configure(self):
self.match_service_name('^redis$')
async def run(self, service):
await service.execute('nmap {nmap_extra} -sV -p {port} --script="banner,redis-info" -oN "{scandir}/{protocol}_{port}_redis_nmap.txt" -oX "{scandir}/xml/{protocol}_{port}_redis_nmap.xml" {address}')
class RedisCli(ServiceScan):
def __init__(self):
super().__init__()
self.name = 'Redis Cli'
self.tags = ['default', 'redis']
def configure(self):
self.match_service_name('^redis$')
async def run(self, service):
if which('redis-cli') is not None:
_, stdout, _ = await service.execute('redis-cli -p {port} -h {address} INFO', outfile='{protocol}_{port}_redis_info.txt')
if not (await stdout.readline()).startswith('NOAUTH Authentication required'):
await service.execute('redis-cli -p {port} -h {address} CONFIG GET \'*\'', outfile='{protocol}_{port}_redis_config.txt')
await service.execute('redis-cli -p {port} -h {address} CLIENT LIST', outfile='{protocol}_{port}_redis_client-list.txt')
else:
error('The redis-cli program could not be found. Make sure it is installed. (On Kali, run: sudo apt install redis-tools)')

View File

@ -1,4 +1,5 @@
from autorecon import ServiceScan
from autorecon import ServiceScan, error
from shutil import which
class NmapMSRPC(ServiceScan):
@ -25,3 +26,20 @@ class RPCClient(ServiceScan):
def manual(self, service, plugin_was_run):
service.add_manual_command('RPC Client:', 'rpcclient -p {port} -U "" {address}')
class RPCDump(ServiceScan):
def __init__(self):
super().__init__()
self.name = 'rpcdump'
self.tags = ['default', 'rpc']
def configure(self):
self.match_service_name(['^msrpc', '^rpcbind', '^erpc'])
async def run(self, service):
if which('impacket-rpcdump') is not None:
if service.protocol == 'tcp':
await service.execute('impacket-rpcdump -port {port} {address}', outfile='{protocol}_{port}_rpc_rpcdump.txt')
else:
error('The impacket-rpcdump program could not be found. Make sure it is installed. (On Kali, run: sudo apt install impacket-scripts)')