guardicore / guardicore/monkey

SSH fingerprinter crash

Open
#1,398 0 comments 0 reactions 0 assignees View on GitHub
Bug Complexity: Medium Impact: Medium
Dominant language
Python
Stars
7.1k
Forks
830
PR merge metrics
No merged PRs in 30d

Description

## Describe the bug
Under some circumstances, the SSH fingerprinter crashes. More specifically (but not specific enough), some data (or lack of data?) Could cause a call to `sock.recv()` to fail in `check_tcp_port()`. This failure is not caught, causes monkey to exit, effectively aborting the network scan. The culprit is https://github.com/guardicore/monkey/blob/fa9fae1d69f3a9ff9d8113bf1e5698623eb7aeb4/monkey/infection_monkey/network/tools.py#L71

## Reproducing
I haven't yet tracked down the root cause of the issue, though I can reproduce it in my environment.

## Screenshots
![image](https://user-images.githubusercontent.com/19957806/128099437-c4b83c8f-7672-4dd2-8a87-7d54042867f2.png)

## Machine version (please complete the following information):
- OS: Windows or Linux

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.