大网数据广告活动
服务器运维问答

Will preventing POST requests stop the spread of a remote access trojan?

· 52CE 我爱测

I like the acronym RAT (remote access trojan), because it resembles another type of thing you need to get rid of from your kitchen, and because when you get rid of one and find the hole it made and fix the hole and set traps and …

问题原文

原帖链接 · hazymat · CC BY-SA 3.0

I like the acronym RAT (remote access trojan), because it resembles another type of thing you need to get rid of from your kitchen, and because when you get rid of one and find the hole it made and fix the hole and set traps and invest your time getting into the mind of the rat, you still can't truly rid yourself of all until you rebuild your house out of concrete.

In .htaccess, a proposed temporary measure to deal with a compromised server might be;

RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REMOTE_ADDR} !123.456.789.000
RewriteRule .* /nopost.html [R=301,L]

Some rats poo on your kitchen, some rats help other rats, and some steal your food.

Given access.log shows a whole load of POST requests taking place on these injected base64 encoded files, is it correct to assume that preventing POST requests as above will resolve the problem of those pests breeding further, not to mention they will not be allowed to POST poo on the kitchen floor in the meantime?

Or will it just stop the rats' deposits?

已采纳解答

原帖链接 · Dominik R · CC BY-SA 3.0

This might stop some specific backdoors that only accept POST requests. But it will not stop backdoors in general.

A backdoor might accept parameters via GET request, e.g. bad.php?command=somecommand. Or it might execute commands sent via a custom HTTP Header.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-01-03)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。