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

No interactions received over FTP 21 with TLS #748

Closed
MMquant opened this issue Dec 27, 2023 · 1 comment · Fixed by #868
Closed

No interactions received over FTP 21 with TLS #748

MMquant opened this issue Dec 27, 2023 · 1 comment · Fixed by #868
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@MMquant
Copy link

MMquant commented Dec 27, 2023

Interactsh version:

projectdiscovery/interactsh-server:v1.1.8 docker image

Current Behavior:

Go FTP server on port 21 doesn't support authentication over TLS.
No FTP interaction is received if there is an incoming FTP connection over TLS and no login credentials are collected.

Expected Behavior:

Receive an FTP interaction with the FTP credentials.

Steps To Reproduce:

The interactsh-server runs with this config file

$ fgrep -v '#' config.yaml | sort -u

cert: /etc/letsencrypt/live/<redacted>/cert.pem
debug: true
disable-version: true
dns-port: 53
domain: [<redacted>]
dynamic-resp: true
eviction: 30
ftp-port: 21
ftp: true
http-directory: /app/www/
http-port: 80
https-port: 443
ip: <redacted>
ldap-port: 389
ldap: true
listen-ip: 0.0.0.0
privkey: /etc/letsencrypt/live/<redacted>/privkey.pem
scan-everywhere: true
smb-port: 445
smb: true
smtp-autotls-port: 465
smtp-port: 25
smtps-port: 587
wildcard: true

nginx reverse proxy configuration for FTP

stream {

    # FTP port 21 interactions
    server {

        listen 21;
        listen [::]:21;

        proxy_pass interactsh:21;
    }

}

This should be ok as I suppose that TLS traffic terminates at the interactsh service.

The test FTP connection was performed using https://ftptest.net/.

FTP interaction was received only for plaintext FTP.

If you choose FTP over TLS the connection to interactsh is refused with the following error messages

Status: Resolving address of <redacted>
Status: Connecting to <redacted>
Warning: The entered address does not resolve to an IPv6 address.
Status: Connected, waiting for welcome message...
Reply: 220 Welcome to the Go FTP Server
Command: CLNT https://ftptest.net on behalf of <redacted>
Reply: 200 OK
Command: AUTH TLS
Reply: 550 Action not taken
Warning: Server refused AUTH TLS, trying deprecated AUTH SSL fallback.
Command: AUTH SSL
Reply: 550 Action not taken
Error: Server refused FTP over TLS
@MMquant MMquant added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Dec 27, 2023
@MMquant MMquant changed the title Add support for FTP interaction over TLS No interactions received over FTP 21 with TLS Dec 30, 2023
@Mzack9999 Mzack9999 linked a pull request May 8, 2024 that will close this issue
@ehsandeep ehsandeep added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label May 20, 2024
@ehsandeep
Copy link
Member

This is now fixed / supported in latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants