V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
szq8014
V2EX  ›  区块链

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

  •  
  •   szq8014 · 2018-10-10 15:13:21 +08:00 · 4486 次点击
    这是一个创建于 1996 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

    htop

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

    ps

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

    crontab

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

    xmr

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

    
    /*
     * 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",
    
    

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

    第 1 条附言  ·  2018-10-11 11:50:28 +08:00
    ![login attempts]( )

    怪不得前段时间登录的时候发现这么多失败的登录
    10 条回复    2018-10-11 11:50:55 +08:00
    szq8014
        1
    szq8014  
    OP
       2018-10-10 15:20:32 +08:00
    这里平时开发测试用的 8 台服务器近一半被感染,不知道这程序已经跑了多少久了
    frienmo
        2
    frienmo  
       2018-10-10 15:49:15 +08:00
    你电脑上没有私钥的,所以别想了
    wenbinwu
        3
    wenbinwu  
       2018-10-10 15:53:02 +08:00
    Monero 不让查别人的
    vowers
        4
    vowers  
       2018-10-10 15:59:09 +08:00
    这个人挺蠢的 物理核心挖就行了  超线程挖矿没什么大的意义 服务器一般都是双线程 cpu  所以占用 50%和 100 %区别不大,他要是用物理核心估计你都现在也不会注意
    vowers
        5
    vowers  
       2018-10-10 16:06:11 +08:00   ❤️ 1
    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
        6
    H3x  
       2018-10-10 16:12:58 +08:00
    看下服务器对外开了哪些服务
    通常都是利用一些常见的服务漏洞上传个 webshell 通过自动化脚本下载挖矿大礼包来挖矿
    szq8014
        7
    szq8014  
    OP
       2018-10-10 16:14:02 +08:00
    @vowers
    40 Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
    大约有 6 台被植入了
    vowers
        8
    vowers  
       2018-10-10 16:19:37 +08:00
    @szq8014  那你们可能没贡献多少。。。算力估计也就 3k 左右 一个月最多也就值一两百吧,
    这兄弟现在一天差不多五百块收入。。妥妥的
    zktz
        9
    zktz  
       2018-10-11 10:35:25 +08:00 via Android
    6 月的时候我公司也被挖了,查了一下服务器密码都是 123456
    szq8014
        10
    szq8014  
    OP
       2018-10-11 11:50:55 +08:00
    @zktz 23333 我这里是六个 1
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1054 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:40 · PVG 06:40 · LAX 15:40 · JFK 18:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.