Skip to content

Conversation

decidedlygray
Copy link

This PR adds basic Telnet scanner functionality. It also adds Mirai botnet credentials as the default scan creds for telnet.

Telnetlib is not ideal for scanning, but with a little hackery it becomes a "good enough" solution for up to a few hundred hosts.

@ztgrace
Copy link
Owner

ztgrace commented Apr 22, 2018

This is awesome! I'll do a little testing merge it tonight.

wait_for_pass_prompt = int(self.cred['auth']['telnet_read_timeout'])

retval = telnet.open(str(self.target.host), int(self.target.port), timeout=timeout_allowed)
retval._has_poll = False # telnetlib hackery :)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this line do? I keep getting an error:

[21:43:45][telnet][_check] Error: 'NoneType' object has no attribute '_has_poll'

@decidedlygray
Copy link
Author

If you look into the telnetlib code, under some condition it gets put into a mode where it polls for results every so often to see if it should exit/stop blocking, and that was to prevent it from going into that mode.

Try removing it.

The reason I suggest that: it worked on Kali without that line. I moved to a clean Ubuntu environment before committing to test it further and ended up needing to add that line to prevent a complete lockup after 30 or so threasds were spun up

Another option would be to add an if statement to handle the condition where it’s None, but maybe we don’t need it at all

@ztgrace ztgrace changed the base branch from master to development August 15, 2018 02:34
@ztgrace
Copy link
Owner

ztgrace commented Aug 15, 2018

I'm pulling the changes into the development branch to clean them up.

@ztgrace ztgrace merged commit d3d45d4 into ztgrace:development Aug 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants