SYMBOLCOMMON_NAMEaka. SYNONYMS
win.royalcli (Back to overview)

RoyalCli

Actor(s): Mirage


RoyalCli is a backdoor which appears to be an evolution of BS2005 and uses familiar encryption and encoding routines. The name RoyalCli was chosen by us due to a debugging path left in the binary. RoyalCli and BS2005 both communicate with the attacker's command and control (C2) through Internet Explorer (IE) by using the COM interface IWebBrowser2.

References
2020SecureworksSecureWorks
@online{secureworks:2020:bronze:134ec2b, author = {SecureWorks}, title = {{BRONZE PALACE}}, date = {2020}, organization = {Secureworks}, url = {https://www.secureworks.com/research/threat-profiles/bronze-palace}, language = {English}, urldate = {2020-05-23} } BRONZE PALACE
BS2005 Enfal Mirage RoyalCli Royal DNS Mirage
2018-03-16Github (nccgroup)NCC Group PLC
@online{plc:20180316:royal:7ff57f8, author = {NCC Group PLC}, title = {{Royal APT - APT15 Repository}}, date = {2018-03-16}, organization = {Github (nccgroup)}, url = {https://github.com/nccgroup/Royal_APT}, language = {English}, urldate = {2020-01-09} } Royal APT - APT15 Repository
BS2005 MS Exchange Tool RoyalCli Royal DNS Mirage
2018-03-10NCC GroupRob Smallridge
@online{smallridge:20180310:apt15:e5e7ef0, author = {Rob Smallridge}, title = {{APT15 is alive and strong: An analysis of RoyalCli and RoyalDNS}}, date = {2018-03-10}, organization = {NCC Group}, url = {https://www.nccgroup.trust/uk/about-us/newsroom-and-events/blogs/2018/march/apt15-is-alive-and-strong-an-analysis-of-royalcli-and-royaldns/}, language = {English}, urldate = {2019-12-19} } APT15 is alive and strong: An analysis of RoyalCli and RoyalDNS
BS2005 MS Exchange Tool RoyalCli Royal DNS Mirage
Yara Rules
[TLP:WHITE] win_royalcli_auto (20201014 | autogenerated rule brought to you by yara-signator)
rule win_royalcli_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2020-10-14"
        version = "1"
        description = "autogenerated rule brought to you by yara-signator"
        tool = "yara-signator v0.5.0"
        tool_config = "callsandjumps;datarefs;binvalue"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.royalcli"
        malpedia_rule_date = "20201014"
        malpedia_hash = "a7e3bd57eaf12bf3ea29a863c041091ba3af9ac9"
        malpedia_version = "20201014"
        malpedia_license = "CC BY-SA 4.0"
        malpedia_sharing = "TLP:WHITE"

    /* DISCLAIMER
     * The strings used in this rule have been automatically selected from the
     * disassembly of memory dumps and unpacked files, using YARA-Signator.
     * The code and documentation is published here:
     * https://github.com/fxb-cocacoding/yara-signator
     * As Malpedia is used as data source, please note that for a given
     * number of families, only single samples are documented.
     * This likely impacts the degree of generalization these rules will offer.
     * Take the described generation method also into consideration when you
     * apply the rules in your use cases and assign them confidence levels.
     */


    strings:
        $sequence_0 = { 8b0d???????? 668b15???????? 8908 8a0d???????? 66895004 884806 33ff }
            // n = 7, score = 100
            //   8b0d????????         |                     
            //   668b15????????       |                     
            //   8908                 | mov                 dword ptr [eax], ecx
            //   8a0d????????         |                     
            //   66895004             | mov                 word ptr [eax + 4], dx
            //   884806               | mov                 byte ptr [eax + 6], cl
            //   33ff                 | xor                 edi, edi

        $sequence_1 = { 8d4602 83c40c 8bc8 8d4900 8a10 }
            // n = 5, score = 100
            //   8d4602               | lea                 eax, [esi + 2]
            //   83c40c               | add                 esp, 0xc
            //   8bc8                 | mov                 ecx, eax
            //   8d4900               | lea                 ecx, [ecx]
            //   8a10                 | mov                 dl, byte ptr [eax]

        $sequence_2 = { 3b04cd18304100 7413 41 83f92d }
            // n = 4, score = 100
            //   3b04cd18304100       | cmp                 eax, dword ptr [ecx*8 + 0x413018]
            //   7413                 | je                  0x15
            //   41                   | inc                 ecx
            //   83f92d               | cmp                 ecx, 0x2d

        $sequence_3 = { 8b5108 8bbd54f7ffff 50 ffd2 eb06 }
            // n = 5, score = 100
            //   8b5108               | mov                 edx, dword ptr [ecx + 8]
            //   8bbd54f7ffff         | mov                 edi, dword ptr [ebp - 0x8ac]
            //   50                   | push                eax
            //   ffd2                 | call                edx
            //   eb06                 | jmp                 8

        $sequence_4 = { ebec ff45e4 43 3b5ddc 7cd3 }
            // n = 5, score = 100
            //   ebec                 | jmp                 0xffffffee
            //   ff45e4               | inc                 dword ptr [ebp - 0x1c]
            //   43                   | inc                 ebx
            //   3b5ddc               | cmp                 ebx, dword ptr [ebp - 0x24]
            //   7cd3                 | jl                  0xffffffd5

        $sequence_5 = { 6800000080 50 897de8 8955f4 66894df8 }
            // n = 5, score = 100
            //   6800000080           | push                0x80000000
            //   50                   | push                eax
            //   897de8               | mov                 dword ptr [ebp - 0x18], edi
            //   8955f4               | mov                 dword ptr [ebp - 0xc], edx
            //   66894df8             | mov                 word ptr [ebp - 8], cx

        $sequence_6 = { 7d21 8bca 83c720 c1e106 2bcf }
            // n = 5, score = 100
            //   7d21                 | jge                 0x23
            //   8bca                 | mov                 ecx, edx
            //   83c720               | add                 edi, 0x20
            //   c1e106               | shl                 ecx, 6
            //   2bcf                 | sub                 ecx, edi

        $sequence_7 = { 33c0 0fbe84c150f24000 6a07 c1f804 59 8985a4fbffff 3bc1 }
            // n = 7, score = 100
            //   33c0                 | xor                 eax, eax
            //   0fbe84c150f24000     | movsx               eax, byte ptr [ecx + eax*8 + 0x40f250]
            //   6a07                 | push                7
            //   c1f804               | sar                 eax, 4
            //   59                   | pop                 ecx
            //   8985a4fbffff         | mov                 dword ptr [ebp - 0x45c], eax
            //   3bc1                 | cmp                 eax, ecx

        $sequence_8 = { 56 ffd2 8b442414 8b08 8b5108 }
            // n = 5, score = 100
            //   56                   | push                esi
            //   ffd2                 | call                edx
            //   8b442414             | mov                 eax, dword ptr [esp + 0x14]
            //   8b08                 | mov                 ecx, dword ptr [eax]
            //   8b5108               | mov                 edx, dword ptr [ecx + 8]

        $sequence_9 = { 8d8df4fdffff 68???????? 51 e8???????? 8bf0 83c408 }
            // n = 6, score = 100
            //   8d8df4fdffff         | lea                 ecx, [ebp - 0x20c]
            //   68????????           |                     
            //   51                   | push                ecx
            //   e8????????           |                     
            //   8bf0                 | mov                 esi, eax
            //   83c408               | add                 esp, 8

    condition:
        7 of them and filesize < 204800
}
[TLP:WHITE] win_royalcli_w0   (20180312 | Detects malware from APT 15 report by NCC Group)
import "pe"

rule win_royalcli_w0 {
    meta:
        description = "Detects malware from APT 15 report by NCC Group"
        author = "Florian Roth"
        reference = "https://goo.gl/HZ5XMN"
        date = "2018-03-10"
        hash1 = "6df9b712ff56009810c4000a0ad47e41b7a6183b69416251e060b5c80cd05785"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.royalcli"
        malpedia_version = "20180312"
        malpedia_license = "CC BY-NC-SA 4.0"
        malpedia_sharing = "TLP:WHITE"
    strings:
        $s1 = "\\Release\\RoyalCli.pdb" ascii
        $s2 = "%snewcmd.exe" fullword ascii
        $s3 = "Run cmd error %d" fullword ascii
        $s4 = "%s~clitemp%08x.ini" fullword ascii
        $s5 = "run file failed" fullword ascii
        $s6 = "Cmd timeout %d" fullword ascii
        $s7 = "2 %s  %d 0 %d" fullword ascii
    condition:
        2 of them
}
Download all Yara Rules