win.flawedammyy (Back to overview)

FlawedAmmyy

Actor(s): TA505

URLhaus        

There is no description at this point.

References
https://blog.trendmicro.com/trendlabs-security-intelligence/ta505-at-it-again-variety-is-the-spice-of-servhelper-and-flawedammyy/
https://github.com/Coldzer0/Ammyy-v3
https://secrary.com/ReversingMalware/AMMY_RAT_Downloader/
https://threatrecon.nshc.net/2019/08/29/sectorj04-groups-increased-activity-in-2019/
https://www.proofpoint.com/us/threat-insight/post/leaked-source-code-ammyy-admin-turned-flawedammyy-rat
https://www.proofpoint.com/us/threat-insight/post/ta505-abusing-settingcontent-ms-within-pdf-files-distribute-flawedammyy-rat
https://www.proofpoint.com/us/threat-insight/post/ta505-begins-summer-campaigns-new-pet-malware-downloader-andromut-uae-south
https://www.sans.org/reading-room/whitepapers/reverseengineeringmalware/unpacking-decrypting-flawedammyy-38930
https://www.youtube.com/watch?v=N4f2e8Mygag
Yara Rules
[TLP:WHITE] win_flawedammyy_auto (20190620 | autogenerated rule brought to you by yara-signator)
rule win_flawedammyy_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2019-07-05"
        version = "1"
        description = "autogenerated rule brought to you by yara-signator"
        tool = "yara-signator 0.2a"
        malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.flawedammyy"
        malpedia_version = "20190620"
        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 / approach 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 = { 837dfc02 7d?? 8b1d???????? 8d9b00000000 }
            // n = 4, score = 200
            //   837dfc02             | cmp                 dword ptr [ebp - 4], 2
            //   7d??                 |                     
            //   8b1d????????         |                     
            //   8d9b00000000         | lea                 ebx, [ebx]

        $sequence_1 = { ff15???????? 8bf8 8b4d08 8b01 8945ec }
            // n = 5, score = 200
            //   ff15????????         |                     
            //   8bf8                 | mov                 edi, eax
            //   8b4d08               | mov                 ecx, dword ptr [ebp + 8]
            //   8b01                 | mov                 eax, dword ptr [ecx]
            //   8945ec               | mov                 dword ptr [ebp - 0x14], eax

        $sequence_2 = { 2d2aa84100 6a03 d1f8 6808384100 2bf0 56 51 }
            // n = 7, score = 200
            //   2d2aa84100           | sub                 eax, 0x41a82a
            //   6a03                 | push                3
            //   d1f8                 | sar                 eax, 1
            //   6808384100           | push                0x413808
            //   2bf0                 | sub                 esi, eax
            //   56                   | push                esi
            //   51                   | push                ecx

        $sequence_3 = { 57 a3???????? ffd6 3305???????? 68f83b4100 57 }
            // n = 6, score = 200
            //   57                   | push                edi
            //   a3????????           |                     
            //   ffd6                 | call                esi
            //   3305????????         |                     
            //   68f83b4100           | push                0x413bf8
            //   57                   | push                edi

        $sequence_4 = { e8???????? 83c41c 8d85b4fbffff 50 ffd3 8b45fc }
            // n = 6, score = 200
            //   e8????????           |                     
            //   83c41c               | add                 esp, 0x1c
            //   8d85b4fbffff         | lea                 eax, [ebp - 0x44c]
            //   50                   | push                eax
            //   ffd3                 | call                ebx
            //   8b45fc               | mov                 eax, dword ptr [ebp - 4]

        $sequence_5 = { 85c0 74?? 897804 8b4e08 8b86e0000000 894108 }
            // n = 6, score = 200
            //   85c0                 | test                eax, eax
            //   74??                 |                     
            //   897804               | mov                 dword ptr [eax + 4], edi
            //   8b4e08               | mov                 ecx, dword ptr [esi + 8]
            //   8b86e0000000         | mov                 eax, dword ptr [esi + 0xe0]
            //   894108               | mov                 dword ptr [ecx + 8], eax

        $sequence_6 = { 8ac1 2401 d0e9 80e101 8887b5000000 888fb4000000 }
            // n = 6, score = 200
            //   8ac1                 | mov                 al, cl
            //   2401                 | and                 al, 1
            //   d0e9                 | shr                 cl, 1
            //   80e101               | and                 cl, 1
            //   8887b5000000         | mov                 byte ptr [edi + 0xb5], al
            //   888fb4000000         | mov                 byte ptr [edi + 0xb4], cl

        $sequence_7 = { e8???????? 83c41c 8d85b4fbffff 50 ffd3 8b45fc 80384d }
            // n = 7, score = 200
            //   e8????????           |                     
            //   83c41c               | add                 esp, 0x1c
            //   8d85b4fbffff         | lea                 eax, [ebp - 0x44c]
            //   50                   | push                eax
            //   ffd3                 | call                ebx
            //   8b45fc               | mov                 eax, dword ptr [ebp - 4]
            //   80384d               | cmp                 byte ptr [eax], 0x4d

        $sequence_8 = { 83c424 8d8db8fbffff 51 ffd0 803e4d 0f8????????? }
            // n = 6, score = 200
            //   83c424               | add                 esp, 0x24
            //   8d8db8fbffff         | lea                 ecx, [ebp - 0x448]
            //   51                   | push                ecx
            //   ffd0                 | call                eax
            //   803e4d               | cmp                 byte ptr [esi], 0x4d
            //   0f8?????????         |                     

        $sequence_9 = { 8d859cf5ffff 50 8d85bcfdffff 689c1c4100 }
            // n = 4, score = 200
            //   8d859cf5ffff         | lea                 eax, [ebp - 0xa64]
            //   50                   | push                eax
            //   8d85bcfdffff         | lea                 eax, [ebp - 0x244]
            //   689c1c4100           | push                0x411c9c

        $sequence_10 = { 8d9b00000000 8a1e 84db 74?? 8818 }
            // n = 5, score = 200
            //   8d9b00000000         | lea                 ebx, [ebx]
            //   8a1e                 | mov                 bl, byte ptr [esi]
            //   84db                 | test                bl, bl
            //   74??                 |                     
            //   8818                 | mov                 byte ptr [eax], bl

        $sequence_11 = { e8???????? 83c40c 33c0 68041d4100 c78548ffffff44000000 }
            // n = 5, score = 200
            //   e8????????           |                     
            //   83c40c               | add                 esp, 0xc
            //   33c0                 | xor                 eax, eax
            //   68041d4100           | push                0x411d04
            //   c78548ffffff44000000     | mov    dword ptr [ebp - 0xb8], 0x44

        $sequence_12 = { 6a02 e8???????? ff7508 8b1d???????? 8bf0 }
            // n = 5, score = 200
            //   6a02                 | push                2
            //   e8????????           |                     
            //   ff7508               | push                dword ptr [ebp + 8]
            //   8b1d????????         |                     
            //   8bf0                 | mov                 esi, eax

        $sequence_13 = { e8???????? 33ff 33f6 89742418 89b424882c0000 85ff 74?? }
            // n = 7, score = 200
            //   e8????????           |                     
            //   33ff                 | xor                 edi, edi
            //   33f6                 | xor                 esi, esi
            //   89742418             | mov                 dword ptr [esp + 0x18], esi
            //   89b424882c0000       | mov                 dword ptr [esp + 0x2c88], esi
            //   85ff                 | test                edi, edi
            //   74??                 |                     

        $sequence_14 = { 8945f8 8d9b00000000 85f6 7e?? 8b0b 8bc1 c1e80d }
            // n = 7, score = 200
            //   8945f8               | mov                 dword ptr [ebp - 8], eax
            //   8d9b00000000         | lea                 ebx, [ebx]
            //   85f6                 | test                esi, esi
            //   7e??                 |                     
            //   8b0b                 | mov                 ecx, dword ptr [ebx]
            //   8bc1                 | mov                 eax, ecx
            //   c1e80d               | shr                 eax, 0xd

        $sequence_15 = { 55 8bec 83ec08 8d55f9 56 8bf1 }
            // n = 6, score = 200
            //   55                   | push                ebp
            //   8bec                 | mov                 ebp, esp
            //   83ec08               | sub                 esp, 8
            //   8d55f9               | lea                 edx, [ebp - 7]
            //   56                   | push                esi
            //   8bf1                 | mov                 esi, ecx

        $sequence_16 = { 8945f8 74?? 6aff ff75e8 ff15???????? 8d45f8 }
            // n = 6, score = 100
            //   8945f8               | mov                 dword ptr [ebp - 8], eax
            //   74??                 |                     
            //   6aff                 | push                -1
            //   ff75e8               | push                dword ptr [ebp - 0x18]
            //   ff15????????         |                     
            //   8d45f8               | lea                 eax, [ebp - 8]

        $sequence_17 = { a1???????? 75?? b800100000 50 6a42 ff15???????? 3bc3 }
            // n = 7, score = 100
            //   a1????????           |                     
            //   75??                 |                     
            //   b800100000           | mov                 eax, 0x1000
            //   50                   | push                eax
            //   6a42                 | push                0x42
            //   ff15????????         |                     
            //   3bc3                 | cmp                 eax, ebx

        $sequence_18 = { 83f855 0f8????????? 0fb6805a213400 ff24?????????? 8b8614080000 3b45f4 7e?? }
            // n = 7, score = 100
            //   83f855               | cmp                 eax, 0x55
            //   0f8?????????         |                     
            //   0fb6805a213400       | movzx               eax, byte ptr [eax + 0x34215a]
            //   ff24??????????       |                     
            //   8b8614080000         | mov                 eax, dword ptr [esi + 0x814]
            //   3b45f4               | cmp                 eax, dword ptr [ebp - 0xc]
            //   7e??                 |                     

        $sequence_19 = { e8???????? 8bf0 59 85f6 75?? 6810403400 e8???????? }
            // n = 7, score = 100
            //   e8????????           |                     
            //   8bf0                 | mov                 esi, eax
            //   59                   | pop                 ecx
            //   85f6                 | test                esi, esi
            //   75??                 |                     
            //   6810403400           | push                0x344010
            //   e8????????           |                     

        $sequence_20 = { 55 8bec 81ec5c040000 53 56 57 6a10 }
            // n = 7, score = 100
            //   55                   | push                ebp
            //   8bec                 | mov                 ebp, esp
            //   81ec5c040000         | sub                 esp, 0x45c
            //   53                   | push                ebx
            //   56                   | push                esi
            //   57                   | push                edi
            //   6a10                 | push                0x10

        $sequence_21 = { 75?? 6818403400 56 ff15???????? eb?? 83f8ff 75?? }
            // n = 7, score = 100
            //   75??                 |                     
            //   6818403400           | push                0x344018
            //   56                   | push                esi
            //   ff15????????         |                     
            //   eb??                 |                     
            //   83f8ff               | cmp                 eax, -1
            //   75??                 |                     

        $sequence_22 = { 6a07 e9???????? 33c0 8b7df4 8b0c855c303400 c1e705 33d2 }
            // n = 7, score = 100
            //   6a07                 | push                7
            //   e9????????           |                     
            //   33c0                 | xor                 eax, eax
            //   8b7df4               | mov                 edi, dword ptr [ebp - 0xc]
            //   8b0c855c303400       | mov                 ecx, dword ptr [eax*4 + 0x34305c]
            //   c1e705               | shl                 edi, 5
            //   33d2                 | xor                 edx, edx

        $sequence_23 = { 8b7df4 8b0c855c303400 c1e705 33d2 03fe 42 }
            // n = 6, score = 100
            //   8b7df4               | mov                 edi, dword ptr [ebp - 0xc]
            //   8b0c855c303400       | mov                 ecx, dword ptr [eax*4 + 0x34305c]
            //   c1e705               | shl                 edi, 5
            //   33d2                 | xor                 edx, edx
            //   03fe                 | add                 edi, esi
            //   42                   | inc                 edx

        $sequence_24 = { eb?? 683830ca01 56 ff15???????? 85c0 75?? }
            // n = 6, score = 100
            //   eb??                 |                     
            //   683830ca01           | push                0x1ca3038
            //   56                   | push                esi
            //   ff15????????         |                     
            //   85c0                 | test                eax, eax
            //   75??                 |                     

        $sequence_25 = { 75?? ffb198140000 6804403400 56 ff15???????? 83c40c 8bc6 }
            // n = 7, score = 100
            //   75??                 |                     
            //   ffb198140000         | push                dword ptr [ecx + 0x1498]
            //   6804403400           | push                0x344004
            //   56                   | push                esi
            //   ff15????????         |                     
            //   83c40c               | add                 esp, 0xc
            //   8bc6                 | mov                 eax, esi

        $sequence_26 = { 8dbc3dcafdffff 895df4 8d7301 c60322 8975ec 803f5c 74?? }
            // n = 7, score = 100
            //   8dbc3dcafdffff       | lea                 edi, [ebp + edi - 0x236]
            //   895df4               | mov                 dword ptr [ebp - 0xc], ebx
            //   8d7301               | lea                 esi, [ebx + 1]
            //   c60322               | mov                 byte ptr [ebx], 0x22
            //   8975ec               | mov                 dword ptr [ebp - 0x14], esi
            //   803f5c               | cmp                 byte ptr [edi], 0x5c
            //   74??                 |                     

        $sequence_27 = { 8945fc 57 ff75fc ff15???????? 683430ca01 ff75fc }
            // n = 6, score = 100
            //   8945fc               | mov                 dword ptr [ebp - 4], eax
            //   57                   | push                edi
            //   ff75fc               | push                dword ptr [ebp - 4]
            //   ff15????????         |                     
            //   683430ca01           | push                0x1ca3034
            //   ff75fc               | push                dword ptr [ebp - 4]

        $sequence_28 = { 83f8ff 75?? 6810403400 eb?? 83f801 75?? ffb198140000 }
            // n = 7, score = 100
            //   83f8ff               | cmp                 eax, -1
            //   75??                 |                     
            //   6810403400           | push                0x344010
            //   eb??                 |                     
            //   83f801               | cmp                 eax, 1
            //   75??                 |                     
            //   ffb198140000         | push                dword ptr [ecx + 0x1498]

        $sequence_29 = { 40 895dec 50 6a40 }
            // n = 4, score = 100
            //   40                   | inc                 eax
            //   895dec               | mov                 dword ptr [ebp - 0x14], ebx
            //   50                   | push                eax
            //   6a40                 | push                0x40

        $sequence_30 = { ff75cc ffd7 8d46fe 3b45f4 72?? 885efe 395dec }
            // n = 7, score = 100
            //   ff75cc               | push                dword ptr [ebp - 0x34]
            //   ffd7                 | call                edi
            //   8d46fe               | lea                 eax, [esi - 2]
            //   3b45f4               | cmp                 eax, dword ptr [ebp - 0xc]
            //   72??                 |                     
            //   885efe               | mov                 byte ptr [esi - 2], bl
            //   395dec               | cmp                 dword ptr [ebp - 0x14], ebx

        $sequence_31 = { ff7508 8d45cc 6800403400 50 ff15???????? 8d45cc 50 }
            // n = 7, score = 100
            //   ff7508               | push                dword ptr [ebp + 8]
            //   8d45cc               | lea                 eax, [ebp - 0x34]
            //   6800403400           | push                0x344000
            //   50                   | push                eax
            //   ff15????????         |                     
            //   8d45cc               | lea                 eax, [ebp - 0x34]
            //   50                   | push                eax

    condition:
        7 of them
}
Download all Yara Rules