qeeqbox / honeypots

30 different honeypots in one package! (dhcp, dns, elastic, ftp, http proxy, https proxy, http, https, imap, ipp, irc, ldap, memcache, mssql, mysql, ntp, oracle, pjl, pop3, postgres, rdp, redis, sip, smb, smtp, snmp, socks5, ssh, telnet, vnc)
GNU Affero General Public License v3.0
697 stars 111 forks source link

Traceback complaining about gentoo USE flag when testing ssh connection to ssh_server on random port #75

Open sysfu opened 2 months ago

sysfu commented 2 months ago

Command to start ssh server

$ honeypots --setup ssh --auto                                                                                                
[INFO] For updates, check https://github.com/qeeqbox/honeypots
[WARNING] Using system or well-known ports requires higher privileges (E.g. sudo -E)                                  
[INFO] Use [Enter] to exit or python3 -m honeypots --kill
[INFO] Parsing honeypot [normal]                                                                                                         
{"action": "process", "dest_ip": "0.0.0.0", "dest_port": "34877", "server": "ssh_server", "src_ip": "0.0.0.0", "src_port": "34877", "stat
us": "success", "timestamp": "2024-09-26T22:21:24.306890"}                                                                               
[INFO] servers ssh running...                                                                                                            
[INFO] Everything looks good!      

SSH command from test client

$ ssh -p 34877 -v root@honeypot.host
OpenSSH_9.2p1 Debian-2+deb12u2, OpenSSL 3.0.11 19 Sep 2023
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to honeypot.host port 34877.
debug1: Connection established.
<snipped>
debug1: Local version string SSH-2.0-OpenSSH_9.2p1 Debian-2+deb12u2

Console output after connecting to honeypot from client:

{"action": "connection", "dest_ip": "0.0.0.0", "dest_port": "34877", "server": "ssh_server", "src_ip": "999.999.999.999", "src_port": "55094", "timestamp": "2024-09-26T22:21:38.737264"}
Exception ignored in thread started by: <function QSSHServer.server_main.<locals>.handle_connection at 0x7ca7d85cb060>
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/honeypots/ssh_server.py", line 166, in handle_connection
    session.start_server(server=ssh_handle)
  File "/usr/lib/python3.12/site-packages/paramiko/transport.py", line 804, in start_server
    raise Exception("Disabled by Gentoo for security reasons. Enable with 'server' USE flag")
Exception: Disabled by Gentoo for security reasons. Enable with 'server' USE flag
{"action": "connection", "dest_ip": "0.0.0.0", "dest_port": "34877", "server": "ssh_server", "src_ip": "999.999.999.999", "src_port": "55098", "timestamp": "2024-09-26T22:21:43.399479"}
Exception ignored in thread started by: <function QSSHServer.server_main.<locals>.handle_connection at 0x7ca7d85cb060>
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/honeypots/ssh_server.py", line 166, in handle_connection
    session.start_server(server=ssh_handle)
  File "/usr/lib/python3.12/site-packages/paramiko/transport.py", line 804, in start_server
    raise Exception("Disabled by Gentoo for security reasons. Enable with 'server' USE flag")
Exception: Disabled by Gentoo for security reasons. Enable with 'server' USE flag
{"action": "connection", "dest_ip": "0.0.0.0", "dest_port": "34877", "server": "ssh_server", "src_ip": "999.999.999.999", "src_port": "42550", "timestamp": "2024-09-26T22:21:59.166838"}
Exception ignored in thread started by: <function QSSHServer.server_main.<locals>.handle_connection at 0x7ca7d85cb060>
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/honeypots/ssh_server.py", line 166, in handle_connection
    session.start_server(server=ssh_handle)
  File "/usr/lib/python3.12/site-packages/paramiko/transport.py", line 804, in start_server
    raise Exception("Disabled by Gentoo for security reasons. Enable with 'server' USE flag")
Exception: Disabled by Gentoo for security reasons. Enable with 'server' USE flag
giga-a commented 1 month ago

@sysfu I'm going to remove paramiko and use twsited