我们公司的服务器被用来挖矿了 0_0

2018-10-10 15:13:21 +08:00
 szq8014

前两天操作服务器发现服务器巨慢,以为是磁盘或内存满了,查了一圈发现都没问题,那就只能看看 CPU 了,htop 一看都是 100%

刚开始简单以为服务器出问题了,发现前面那些进程非常奇怪,竟然只是简单的 -bash 才想到难道是被用来挖矿了?

看了一下详细命令就看到了 xmr-stak, 顺便上网搜了一下,果然不出所料是 门罗币, 也不知道程序目录是啥 kill 掉以后一会就又起来了,就看了一下 crontab 顺便找到了程序目录

crontab -r 去掉定时任务,再看看程序目录

然后看到了类似钱包地址的配置文件,有没有玩币的大神看看这钱包里面有多少币了


/*
 * pool_address    - Pool address should be in the form "pool.supportxmr.com:3333". Only stratum pools are supported.
 * wallet_address  - Your wallet, or pool login.
 * rig_id          - Rig identifier for pool-side statistics (needs pool support).
 * pool_password   - Can be empty in most cases or "x".
 * use_nicehash    - Limit the nonce to 3 bytes as required by nicehash.
 * use_tls         - This option will make us connect using Transport Layer Security.
 * tls_fingerprint - Server's SHA256 fingerprint. If this string is non-empty then we will check the server's cert against it.
 * pool_weight     - Pool weight is a number telling the miner how important the pool is. Miner will mine mostly at the pool 
 *                   with the highest weight, unless the pool fails. Weight must be an integer larger than 0.
 *
 * We feature pools up to 1MH/s. For a more complete list see M5M400's pool list at www.moneropools.com
 */
 

"pool_list" :
[
        {"pool_address" : "107.191.99.227:80", "wallet_address" : "41pfDaqsDe11MH28Y2PggiRRtQNUvFL22eYdjacm5ZrGWBoVxAP52me2Bd7Z77BBfGWtcyT4uwiPpVBGp7Huq125JBXihUj", "pool_password" : "x", "use_nicehash" : false, "rig_id" : "", "use_tls" : false, "tls_fingerprint" : "", "pool_weight" : 1 },
],




/*
 * Currency to mine. Supported values:
 *
 *    aeon7 (use this for Aeon's new PoW)
 *    cryptonight (try this if your coin is not listed)
 *    cryptonight_lite
 *    edollar
 *    electroneum
 *    graft
 *    intense
 *    karbo
 *    monero7 (use this for Monero's new PoW)
 *    sumokoin
 *
 */

"currency" : "monero7",

最后,为啥服务器被植入了挖矿程序呢? 因为 [服务器密码太简单] 了。。

4530 次点击
所在节点    区块链
10 条回复
szq8014
2018-10-10 15:20:32 +08:00
这里平时开发测试用的 8 台服务器近一半被感染,不知道这程序已经跑了多少久了
frienmo
2018-10-10 15:49:15 +08:00
你电脑上没有私钥的,所以别想了
wenbinwu
2018-10-10 15:53:02 +08:00
Monero 不让查别人的
vowers
2018-10-10 15:59:09 +08:00
这个人挺蠢的 物理核心挖就行了  超线程挖矿没什么大的意义 服务器一般都是双线程 cpu  所以占用 50%和 100 %区别不大,他要是用物理核心估计你都现在也不会注意
vowers
2018-10-10 16:06:11 +08:00
Pending Balance: 0.280132798887 XMR
Total Paid: 53.773662303769 XMR
Last Share Submitted: less than a minute ago
Hash Rate: 155.06 KH/sec
Total Hashes Submitted: 918181397759
这货光着一个地址累计挖了 53 门罗币了,最新行情大概 768 人民币,4w 多人民币了
而且现在算力还有 155,应该还有很多服务器不光你们遭殃,不知道你们几台服务器什么配置
H3x
2018-10-10 16:12:58 +08:00
看下服务器对外开了哪些服务
通常都是利用一些常见的服务漏洞上传个 webshell 通过自动化脚本下载挖矿大礼包来挖矿
szq8014
2018-10-10 16:14:02 +08:00
@vowers
40 Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
大约有 6 台被植入了
vowers
2018-10-10 16:19:37 +08:00
@szq8014  那你们可能没贡献多少。。。算力估计也就 3k 左右 一个月最多也就值一两百吧,
这兄弟现在一天差不多五百块收入。。妥妥的
zktz
2018-10-11 10:35:25 +08:00
6 月的时候我公司也被挖了,查了一下服务器密码都是 123456
szq8014
2018-10-11 11:50:55 +08:00
@zktz 23333 我这里是六个 1

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/496336

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX