如何查找向 ProFTPD 发送密码的差异

如何查找向 ProFTPD 发送密码的差异

有一个安装了 proftpd 的 CentOS 服务器,它已经运行了很长时间。现在我按照上次的正确方法创建一个用户,并在 Windows CMD 上使用 ftp 命令检查它,它运行正常。

/etc/proftpd/ftpasswd --passwd --name newuser --uid 9999 --home /var/ftp/newuser --shell /bin/false

现在,新用户尝试使用新创建的凭据连接到服务器,但密码不正确。因此,我使用 Windows 内置的 ftp 客户端重试,可以连接到服务器。新用户使用 Windows 资源管理器连接到 FTP 服务器。我也尝试了,但密码也不正确。

可能是在将密码传输到服务器时出现编码问题。我该如何调试?proftpd 的 Auth 日志没有显示出错的提示。我尝试了多个 FTP 客户端,所有测试都运行正常,但 Explorer FTP 客户端不行。

来自 Windows 资源管理器 FTP 客户端的日志

FTP Server [18783] ::ffff:xx.xx.xx.xx [31/Jul/2015:17:53:44 +0200] "USER newuser" 331
FTP Server [18783] ::ffff:xx.xx.xx.xx [31/Jul/2015:17:53:44 +0200] "PASS (hidden)" 530

使用内置 cmd ftp 命令的同一台机器的日志:

FTP Server [19016] ::ffff:xx.xx.xx.xx [31/Jul/2015:17:55:03 +0200] "USER newuser" 331
FTP Server [19016] ::ffff:xx.xx.xx.xx [31/Jul/2015:17:55:03 +0200] "PASS (hidden)" 230

我多次输入密码都是复制粘贴和手动输入的。如何查看传输的密码?

更新:在客户端,我必须运行 wireshark 并显示密码已正确发送。在 FTP 数据包中,一切正常。这是来自 Windows 资源管理器的 Wireshark 协议。与内置 FTP 客户端的唯一区别是对匿名用户的请求。

Response: 220 ProFTPD 1.3.3g Server
Request: USER anonymous
Response: 331 Password required for anonymous
Request: PASS User@
Response: 530 Login incorrect.
Response: 220 ProFTPD 1.3.3g Server
Request: USER newuser
Response: 331 Password required for newuser
Request: PASS secret
Response: 530 Login incorrect

具有内置 ftp 客户端的同一台机器给出以下输出:

Response: 220 ProFTPD 1.3.3g Server
Request: USER newuser
Response: 331 Password required for newuser
Request: PASS secret
Response: 230 User newuser logged in

答案1

你可以使用tcpdump将数据包从线路捕获到文件中,然后对其进行分析。这样您就可以准确地知道正在发送什么。

相关内容