SYMBOLCOMMON_NAMEaka. SYNONYMS
win.grager (Back to overview)

Grager

VTCollection    

Grager is a backdoor deployed against three organizations in Taiwan, Hong Kong, and Vietnam in April 2024. Analysis of this backdoor revealed that it uses the Graph API to communicate with a command and control (C&C) server hosted on Microsoft OneDrive. The backdoor decrypts a client ID and refresh token for OneDrive from a blob contained within its file body. It supports the following commands:

- Retrieve machine information, including machine name, user, IP address, and machine architecture
- Download or upload a file
- Execute a file
- Gather file system information, including available drives, their sizes, and types of drives

References
2024-08-07 ⋅ Symantec ⋅ Threat Hunter Team
Cloud Cover: How Malicious Actors Are Leveraging Cloud Services
GoGra Grager MOONTAG Ondritols TONERJAM
Yara Rules
[TLP:WHITE] win_grager_auto (20260917 | Detects win.grager.)
rule win_grager_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2026-09-17"
        version = "1"
        description = "Detects win.grager."
        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.grager"
        malpedia_rule_date = "20260916"
        malpedia_hash = "53a643781c18e08f4a50949af60172d837a0b6f6"
        malpedia_version = "20260917"
        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 = { 448bca 488bcb e8???????? 8b4548 4533c9 488b4dd0 }
            // n = 6, score = 100
            //   448bca               | je                  0xa65
            //   488bcb               | inc                 cx
            //   e8????????           |                     
            //   8b4548               | mov                 dword ptr [eax], ecx
            //   4533c9               | dec                 eax
            //   488b4dd0             | add                 edx, 2

        $sequence_1 = { 4833cc e8???????? 488b9c24f0280000 4881c4b0280000 415f }
            // n = 5, score = 100
            //   4833cc               | dec                 esp
            //   e8????????           |                     
            //   488b9c24f0280000     | mov                 dword ptr [esp + 0x20], edi
            //   4881c4b0280000       | dec                 esp
            //   415f                 | lea                 ecx, [esp + 0x40]

        $sequence_2 = { 4881c108020000 41b804010000 e8???????? 33ff 4c8d0df1eb0200 8bd7 4c8d05e87d0200 }
            // n = 7, score = 100
            //   4881c108020000       | test                cx, cx
            //   41b804010000         | dec                 esp
            //   e8????????           |                     
            //   33ff                 | sub                 eax, eax
            //   4c8d0df1eb0200       | je                  0x1684
            //   8bd7                 | mov                 eax, edx
            //   4c8d05e87d0200       | dec                 eax

        $sequence_3 = { 4533c9 488b4dd0 448bc7 89442430 33d2 488d4530 }
            // n = 6, score = 100
            //   4533c9               | dec                 eax
            //   488b4dd0             | lea                 eax, [ecx - 2]
            //   448bc7               | dec                 eax
            //   89442430             | cmovne              eax, ecx
            //   33d2                 | inc                 sp
            //   488d4530             | mov                 dword ptr [eax], edi

        $sequence_4 = { 4c897c2470 48c74424780f000000 c644246000 488b5598 }
            // n = 4, score = 100
            //   4c897c2470           | dec                 eax
            //   48c74424780f000000     | mov    ecx, dword ptr [ebp + 0x27a0]
            //   c644246000           | dec                 eax
            //   488b5598             | xor                 ecx, esp

        $sequence_5 = { e8???????? 90 4c8d4580 488d542460 488bcb e8???????? 488d4c2460 }
            // n = 7, score = 100
            //   e8????????           |                     
            //   90                   | inc                 ebp
            //   4c8d4580             | xor                 edi, edi
            //   488d542460           | dec                 esp
            //   488bcb               | mov                 dword ptr [esp + 0x48], edi
            //   e8????????           |                     
            //   488d4c2460           | dec                 eax

        $sequence_6 = { 4c8bb42408030000 33ed 4c8bbc2410030000 33d2 4c894c2458 4533c9 4c89442450 }
            // n = 7, score = 100
            //   4c8bb42408030000     | dec                 eax
            //   33ed                 | cmp                 eax, -1
            //   4c8bbc2410030000     | je                  0x501
            //   33d2                 | xor                 edx, edx
            //   4c894c2458           | mov                 dword ptr [esp + 0x20], 4
            //   4533c9               | movsd               qword ptr [esp + 0x50], xmm6
            //   4c89442450           | dec                 eax

        $sequence_7 = { 488d4c2470 41b808020000 e8???????? 33db c744244004010000 488d442440 48895c2428 }
            // n = 7, score = 100
            //   488d4c2470           | je                  0x44c
            //   41b808020000         | cmp                 eax, 1
            //   e8????????           |                     
            //   33db                 | jne                 0x48e
            //   c744244004010000     | and                 cl, 0x3f
            //   488d442440           | dec                 eax
            //   48895c2428           | dec                 ebx

        $sequence_8 = { f20f1000 8b5808 e9???????? 488d05835b0100 }
            // n = 4, score = 100
            //   f20f1000             | dec                 ebp
            //   8b5808               | mov                 eax, esi
            //   e9????????           |                     
            //   488d05835b0100       | dec                 eax

        $sequence_9 = { 488d8de0160000 48c7c0ffffffff 6690 66837c410200 488d4001 75f4 }
            // n = 6, score = 100
            //   488d8de0160000       | movups              xmm0, xmmword ptr [esp + 0x40]
            //   48c7c0ffffffff       | movups              xmmword ptr [esi], xmm0
            //   6690                 | movups              xmm1, xmmword ptr [esp + 0x50]
            //   66837c410200         | ja                  0x1732
            //   488d4001             | mov                 ecx, dword ptr [esi + eax*4 + 0x209e8]
            //   75f4                 | dec                 eax

    condition:
        7 of them and filesize < 487424
}
Download all Yara Rules