guardicore / monkey

Infection Monkey - An open-source adversary emulation platform
https://www.guardicore.com/infectionmonkey/
GNU General Public License v3.0
6.65k stars 778 forks source link

Paramiko gets stuck sometimes #864

Closed VakarisZ closed 1 year ago

VakarisZ commented 3 years ago

Describe the bug

Observed monkey getting stuck when switching keys (paramiko module). Stuck at "Switch to new keys ..." Might be related: https://github.com/paramiko/paramiko/issues/1022

2020-10-16 06:56:13,302 [2668:5688:DEBUG] transport._log.1819: Kex agreed: curve25519-sha256@libssh.org
2020-10-16 06:56:13,303 [2668:5688:DEBUG] transport._log.1819: HostKey agreed: ssh-ed25519
2020-10-16 06:56:13,306 [2668:5688:DEBUG] transport._log.1819: Cipher agreed: aes128-ctr
2020-10-16 06:56:13,306 [2668:5688:DEBUG] transport._log.1819: MAC agreed: hmac-sha2-256
2020-10-16 06:56:13,307 [2668:5688:DEBUG] transport._log.1819: Compression agreed: none
2020-10-16 06:56:13,314 [2668:5688:DEBUG] transport._log.1819: kex engine KexCurve25519 specified hash_algo <built-in function openssl_sha256>
2020-10-16 06:56:13,315 [2668:5688:DEBUG] transport._log.1819: Switch to new keys ...
2020-10-16 06:56:13,358 [2668:5688:DEBUG] transport._log.1819: userauth is OK
2020-10-16 06:56:15,224 [2668:5688:INFO] transport._log.1819: Authentication (password) failed.
2020-10-16 06:56:43,397 [2668:5176:DEBUG] sshexec.exploit_with_login_creds.97: Error logging into victim VictimHost('10.2.2.11') with user root and password (SHA-512) '50e0dc4455bcb1ee80adb942d153c6b0eb17b31d603b017fa77f60f60f68fd7d0565cb486783f29cea210313c97f0f9d49e64e6730053bfa1448d5b826309184': (Authentication timeout.)
2020-10-16 06:56:18,158 - wsgi.py:196 -       _log() - INFO - 200 GET /api/netmap (10.2.2.251) 29.30ms
2020-10-16 07:06:57,970 [2668:5688:DEBUG] transport._log.1819: EOF in transport thread
2020-10-16 07:06:57,973 [2668:3716:DEBUG] transport._log.1819: starting thread (client mode): 0x4d8e4448
2020-10-16 07:06:57,973 [2668:3716:DEBUG] transport._log.1819: Local version/idstring: SSH-2.0-paramiko_2.7.1
2020-10-16 07:06:57,979 [2668:3716:DEBUG] transport._log.1819: Remote version/idstring: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
2020-10-16 07:06:57,980 [2668:3716:INFO] transport._log.1819: Connected (version 2.0, client OpenSSH_7.2p2)

To Reproduce

Steps to reproduce the behavior:

  1. Ran monkey island 1.9 production version in monkeyzoo.
  2. Configured to scan machines: 10.2.2.4 10.2.2.11 10.2.2.12 10.2.1.10, else is default.
  3. Monkey (and island) gets stuck at "Switch to new keys ..."

Screenshots

If applicable, add screenshots to help explain your problem.

Machine version (please complete the following information):

mssalvatore commented 1 year ago

Is this still an issue?

mssalvatore commented 1 year ago

I don't think we've witnessed this issue for years. We're also on a much newer version of Paramiko than when this issue was created. Closing this for now. We can reopen it if we see. the issue again.