Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cowrie ssh service is blocked while trying to connect using ftpget. #1674

Open
christianbeland opened this issue Jan 3, 2022 · 1 comment

Comments

@christianbeland
Copy link

Describe the bug
cowrie ssh service is blocked while trying to connect using ftpget.

To Reproduce
Steps to reproduce the behavior:

  1. Run cowrie ssh service
  2. Connect 2 terminals to cowrie ssh
  3. In one terminal, type: ftpget -v -u anonymous -p anonymous -P 21 greektaverna.tk .sh .sh
  4. See that the other terminal connected through ssh is blocked until the ftpget comamnd times out in the first terminal.
  5. See that no new connection is accepted until the ftpget comamnd times out in the first terminal.
  6. Once the ftpget command times out, see all other active connection timing out.

Expected behavior
Other connections not affected by the ftpget command in another cowrie ssh session.

Is there configuration settings to avoid this behaviour?

@micheloosterhof
Copy link
Member

Yes, so this is a side effect of the ftpget command using ftplib and now Twisted asynchronous functionality to do networking. This means that while the ftpget is in progress, it will run in the only thread available and all other ones are not active. The solution would be to rewrite ftpget using Twisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants