SYMBOLCOMMON_NAMEaka. SYNONYMS
win.royalcli (Back to overview)

RoyalCli

Actor(s): Mirage

VTCollection    

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
2020-01-01SecureworksSecureWorks
BRONZE PALACE
BS2005 Enfal Mirage RoyalCli Royal DNS APT15
2018-03-16Github (nccgroup)NCC Group PLC
Royal APT - APT15 Repository
BS2005 MS Exchange Tool RoyalCli Royal DNS APT15
2018-03-10NCC GroupRob Smallridge
APT15 is alive and strong: An analysis of RoyalCli and RoyalDNS
BS2005 MS Exchange Tool RoyalCli Royal DNS APT15
Yara Rules
[TLP:WHITE] win_royalcli_auto (20230808 | Detects win.royalcli.)
rule win_royalcli_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2023-12-06"
        version = "1"
        description = "Detects win.royalcli."
        info = "autogenerated rule brought to you by yara-signator"
        tool = "yara-signator v0.6.0"
        signator_config = "callsandjumps;datarefs;binvalue"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.royalcli"
        malpedia_rule_date = "20231130"
        malpedia_hash = "fc8a0e9f343f6d6ded9e7df1a64dac0cc68d7351"
        malpedia_version = "20230808"
        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 = { 41 3bcf 7cb5 56 }
            // n = 4, score = 100
            //   41                   | inc                 ecx
            //   3bcf                 | cmp                 ecx, edi
            //   7cb5                 | jl                  0xffffffb7
            //   56                   | push                esi

        $sequence_1 = { e8???????? 33f6 83c42c 3bc6 0f8c19050000 83bda4feffff1c 0f8c0c050000 }
            // n = 7, score = 100
            //   e8????????           |                     
            //   33f6                 | xor                 esi, esi
            //   83c42c               | add                 esp, 0x2c
            //   3bc6                 | cmp                 eax, esi
            //   0f8c19050000         | jl                  0x51f
            //   83bda4feffff1c       | cmp                 dword ptr [ebp - 0x15c], 0x1c
            //   0f8c0c050000         | jl                  0x512

        $sequence_2 = { 5d c3 56 ff15???????? 5b 5f 33c0 }
            // n = 7, score = 100
            //   5d                   | pop                 ebp
            //   c3                   | ret                 
            //   56                   | push                esi
            //   ff15????????         |                     
            //   5b                   | pop                 ebx
            //   5f                   | pop                 edi
            //   33c0                 | xor                 eax, eax

        $sequence_3 = { 898dccf9ffff 7d10 33c0 8b4dfc }
            // n = 4, score = 100
            //   898dccf9ffff         | mov                 dword ptr [ebp - 0x634], ecx
            //   7d10                 | jge                 0x12
            //   33c0                 | xor                 eax, eax
            //   8b4dfc               | mov                 ecx, dword ptr [ebp - 4]

        $sequence_4 = { 8b08 8d954cf7ffff 52 68???????? }
            // n = 4, score = 100
            //   8b08                 | mov                 ecx, dword ptr [eax]
            //   8d954cf7ffff         | lea                 edx, [ebp - 0x8b4]
            //   52                   | push                edx
            //   68????????           |                     

        $sequence_5 = { 33f6 ff15???????? e9???????? 8b4708 }
            // n = 4, score = 100
            //   33f6                 | xor                 esi, esi
            //   ff15????????         |                     
            //   e9????????           |                     
            //   8b4708               | mov                 eax, dword ptr [edi + 8]

        $sequence_6 = { 6a01 50 e8???????? 56 8945dc e8???????? 8b55e0 }
            // n = 7, score = 100
            //   6a01                 | push                1
            //   50                   | push                eax
            //   e8????????           |                     
            //   56                   | push                esi
            //   8945dc               | mov                 dword ptr [ebp - 0x24], eax
            //   e8????????           |                     
            //   8b55e0               | mov                 edx, dword ptr [ebp - 0x20]

        $sequence_7 = { 83c414 8955e4 2bd0 8d9b00000000 }
            // n = 4, score = 100
            //   83c414               | add                 esp, 0x14
            //   8955e4               | mov                 dword ptr [ebp - 0x1c], edx
            //   2bd0                 | sub                 edx, eax
            //   8d9b00000000         | lea                 ebx, [ebx]

        $sequence_8 = { 8bbdd4f9ffff 8b9dc4f9ffff 807c3b0f00 751c 8b4b08 8b5508 }
            // n = 6, score = 100
            //   8bbdd4f9ffff         | mov                 edi, dword ptr [ebp - 0x62c]
            //   8b9dc4f9ffff         | mov                 ebx, dword ptr [ebp - 0x63c]
            //   807c3b0f00           | cmp                 byte ptr [ebx + edi + 0xf], 0
            //   751c                 | jne                 0x1e
            //   8b4b08               | mov                 ecx, dword ptr [ebx + 8]
            //   8b5508               | mov                 edx, dword ptr [ebp + 8]

        $sequence_9 = { 50 e8???????? 6820010000 8d8dc0fdffff 56 51 e8???????? }
            // n = 7, score = 100
            //   50                   | push                eax
            //   e8????????           |                     
            //   6820010000           | push                0x120
            //   8d8dc0fdffff         | lea                 ecx, [ebp - 0x240]
            //   56                   | push                esi
            //   51                   | push                ecx
            //   e8????????           |                     

    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"
        hash = "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