| 1 | from autorecon.plugins import ServiceScan |
| 2 | |
| 3 | class SMTPUserEnum(ServiceScan): |
| 4 | |
| 5 | def __init__(self): |
| 6 | super().__init__() |
| 7 | self.name = 'SMTP-User-Enum' |
| 8 | self.tags = ['default', 'safe', 'smtp', 'email'] |
| 9 | |
| 10 | def configure(self): |
| 11 | self.match_service_name('^smtp') |
| 12 | |
| 13 | async def run(self, service): |
| 14 | await service.execute('hydra smtp-enum://{addressv6}:{port}/vrfy -L "' + self.get_global('username_wordlist', default='/usr/share/seclists/Usernames/top-usernames-shortlist.txt') + '" 2>&1', outfile='{protocol}_{port}_smtp_user-enum_hydra_vrfy.txt') |
| 15 | await service.execute('hydra smtp-enum://{addressv6}:{port}/expn -L "' + self.get_global('username_wordlist', default='/usr/share/seclists/Usernames/top-usernames-shortlist.txt') + '" 2>&1', outfile='{protocol}_{port}_smtp_user-enum_hydra_expn.txt') |
| 16 | |
| 17 | def manual(self, service, plugin_was_run): |
| 18 | service.add_manual_command('Try User Enumeration using "RCPT TO". Replace <TARGET-DOMAIN> with the target\'s domain name:', [ |
| 19 | 'hydra smtp-enum://{addressv6}:{port}/rcpt -L "' + self.get_global('username_wordlist', default='/usr/share/seclists/Usernames/top-usernames-shortlist.txt') + '" -o "{scandir}/{protocol}_{port}_smtp_user-enum_hydra_rcpt.txt" -p <TARGET-DOMAIN>' |
| 20 | ]) |
nothing calls this directly
no outgoing calls
no test coverage detected