Can't upload (FTP) PHP file containing base64_

2019-07-07 06:55发布

I have a plain server running CentOS 7.2 and Virtualmin, with FTP access via ProFTPD 1.3.5, and when I try to upload a PHP file containing the string base64_decode the transfer hangs until time-out. I have verified by editing the function out, and the exact same file uploads near-instantly. Put the function back in and the upload times-out. I can even just remove the '64' from the function name and the file uploads successfully.

So it appears to be some kind of security, but from where? Surely someone has seen this before? Or is my diagnosis completely off?

标签: php security ftp
2条回答
女痞
2楼-- · 2019-07-07 07:20

This is probably not related to FTP, but to some Intrusion Detection System (IDS) which tries to block transfer of suspicious files. This IDS might run at the host or somewhere in the network.

查看更多
等我变得足够好
3楼-- · 2019-07-07 07:33

It is blocked to prevent malicious code tranfer.

To circumvent this:

sed 's/base64_decode/QQQQQ_decode/g' YOUR_FILE > NEW_FILE

transfer NEW_FILE via FTP

On the target computer:

sed 's/QQQQQ_decode/base64_decode/g' NEW_FILE > YOUR_FILE
查看更多
登录 后发表回答