| 1 | from autorecon.plugins import ServiceScan |
| 2 | |
| 3 | class DNSZoneTransfer(ServiceScan): |
| 4 | |
| 5 | def __init__(self): |
| 6 | super().__init__() |
| 7 | self.name = 'DNS Zone Transfer' |
| 8 | self.tags = ['default', 'safe', 'dns'] |
| 9 | |
| 10 | def configure(self): |
| 11 | self.match_service_name('^domain') |
| 12 | |
| 13 | async def run(self, service): |
| 14 | if self.get_global('domain'): |
| 15 | await service.execute('dig AXFR -p {port} @{address} ' + self.get_global('domain'), outfile='{protocol}_{port}_dns_zone-transfer-domain.txt') |
| 16 | if service.target.type == 'hostname': |
| 17 | await service.execute('dig AXFR -p {port} @{address} {address}', outfile='{protocol}_{port}_dns_zone-transfer-hostname.txt') |
| 18 | await service.execute('dig AXFR -p {port} @{address}', outfile='{protocol}_{port}_dns_zone-transfer.txt') |
nothing calls this directly
no outgoing calls
no test coverage detected