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

[Security] chroot #106

Closed
Ecklory opened this Issue Mar 4, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@Ecklory
Copy link

Ecklory commented Mar 4, 2019

Beyond chroot:

useradd test_ftp -s /bin/bash -m
passwd test_ftp
mkdir /home/test && cd /home/test && touch 1
mount -B /home/test /home/test_ftp
rm -r /home/test

Welcome to the root.

Configuration:

AltLog clf:/var/log/pure-ftpd/transfer.log
ChrootEveryone yes
DontResolve yes
ForcePassiveIP 192.168.1.15
FSCharset UTF-8
MinUID 1000
NoAnonymous yes
PAMAuthentication yes
PassivePortRange 17300 17400
PureDB /etc/pure-ftpd/pureftpd.pdb
TLS 2
TLSCipherSuite HIGH
UnixAuthentication no

vsftpd has no such problem.
Answer when connecting to FTP:

Status: Connecting to 127.0.0.1:21...
Status: Connection established, waiting for welcome message...
Status: Insecure server, it does not support FTP over TLS.
Status: Server does not support non-ASCII characters.
Status: Logged in
Status: Retrieving directory listing...
Command: PWD
Response: 257 "" is the current directory
**Error: Server returned empty path.
Error: Failed to retrieve directory listing**

Configuration:

allow_writeable_chroot=YES
chroot_local_user=YES
pasv_enable=YES
pasv_min_port=17300
pasv_max_port=17400
pasv_address=192.168.1.15

proftpd has no such problem.

Configuration:

DefaultRoot ~
PassivePorts                  17300 17400
MasqueradeAddress               192.168.1.15

Thanks for the compromised server :)

@Ecklory

This comment has been minimized.

Copy link
Author

Ecklory commented Mar 4, 2019

@jedisct1
ping

p.s. I can not write to the list, sorry.

@jedisct1 jedisct1 closed this Mar 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.