win.phorpiex (Back to overview)

Phorpiex

aka: Trik
URLhaus      

Proofpoint describes Phorpiex/Trik as a SDBot fork (thus IRC-based) that has been used to distribute GandCrab, Pushdo, Pony, and coinminers. The name Trik is derived from PDB strings.

References
https://www.johannesbader.ch/2016/02/phorpiex/
https://blog.trendmicro.com/trendlabs-security-intelligence/shylock-not-the-lone-threat-targeting-skype/
https://securingtomorrow.mcafee.com/other-blogs/mcafee-labs/evolution-of-malware-sandbox-evasion-tactics-a-retrospective-study/
https://www.bleepingcomputer.com/news/security/trik-spam-botnet-leaks-43-million-email-addresses/
https://www.crowdstrike.com/blog/pinchy-spider-adopts-big-game-hunting/
https://www.proofpoint.com/us/threat-insight/post/phorpiex-decade-spamming-shadows
Yara Rules
[TLP:WHITE] win_phorpiex_auto (20190620 | autogenerated rule brought to you by yara-signator)
rule win_phorpiex_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.phorpiex"
        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 = { 6a00 ff15???????? ff15???????? 50 e8???????? 83c404 }
            // n = 6, score = 800
            //   6a00                 | push                0
            //   ff15????????         |                     
            //   ff15????????         |                     
            //   50                   | push                eax
            //   e8????????           |                     
            //   83c404               | add                 esp, 4

        $sequence_1 = { 6a00 ff15???????? ff15???????? 50 e8???????? 83c404 }
            // n = 6, score = 800
            //   6a00                 | push                0
            //   ff15????????         |                     
            //   ff15????????         |                     
            //   50                   | push                eax
            //   e8????????           |                     
            //   83c404               | add                 esp, 4

        $sequence_2 = { 6a00 ff15???????? ff15???????? 50 e8???????? }
            // n = 5, score = 800
            //   6a00                 | push                0
            //   ff15????????         |                     
            //   ff15????????         |                     
            //   50                   | push                eax
            //   e8????????           |                     

        $sequence_3 = { 6a00 ff15???????? ff15???????? 50 e8???????? }
            // n = 5, score = 800
            //   6a00                 | push                0
            //   ff15????????         |                     
            //   ff15????????         |                     
            //   50                   | push                eax
            //   e8????????           |                     

        $sequence_4 = { e8???????? ff15???????? 6a00 ff15???????? }
            // n = 4, score = 800
            //   e8????????           |                     
            //   ff15????????         |                     
            //   6a00                 | push                0
            //   ff15????????         |                     

        $sequence_5 = { e8???????? ff15???????? 6a00 ff15???????? }
            // n = 4, score = 800
            //   e8????????           |                     
            //   ff15????????         |                     
            //   6a00                 | push                0
            //   ff15????????         |                     

        $sequence_6 = { e8???????? 83c410 6a00 6a02 6a02 6a00 6a00 }
            // n = 7, score = 600
            //   e8????????           |                     
            //   83c410               | add                 esp, 0x10
            //   6a00                 | push                0
            //   6a02                 | push                2
            //   6a02                 | push                2
            //   6a00                 | push                0
            //   6a00                 | push                0

        $sequence_7 = { 83c410 6a00 6a02 6a02 }
            // n = 4, score = 600
            //   83c410               | add                 esp, 0x10
            //   6a00                 | push                0
            //   6a02                 | push                2
            //   6a02                 | push                2

        $sequence_8 = { e8???????? 83c410 6a00 6a02 6a02 6a00 }
            // n = 6, score = 600
            //   e8????????           |                     
            //   83c410               | add                 esp, 0x10
            //   6a00                 | push                0
            //   6a02                 | push                2
            //   6a02                 | push                2
            //   6a00                 | push                0

        $sequence_9 = { e8???????? 83c404 e8???????? e8???????? ff15???????? 6a00 }
            // n = 6, score = 600
            //   e8????????           |                     
            //   83c404               | add                 esp, 4
            //   e8????????           |                     
            //   e8????????           |                     
            //   ff15????????         |                     
            //   6a00                 | push                0

        $sequence_10 = { e8???????? 83c410 6a00 6a02 6a02 }
            // n = 5, score = 600
            //   e8????????           |                     
            //   83c410               | add                 esp, 0x10
            //   6a00                 | push                0
            //   6a02                 | push                2
            //   6a02                 | push                2

        $sequence_11 = { ff15???????? 50 e8???????? 83c404 e8???????? e8???????? ff15???????? }
            // n = 7, score = 600
            //   ff15????????         |                     
            //   50                   | push                eax
            //   e8????????           |                     
            //   83c404               | add                 esp, 4
            //   e8????????           |                     
            //   e8????????           |                     
            //   ff15????????         |                     

        $sequence_12 = { 83c410 6a00 6a02 6a02 6a00 6a00 6800000040 }
            // n = 7, score = 600
            //   83c410               | add                 esp, 0x10
            //   6a00                 | push                0
            //   6a02                 | push                2
            //   6a02                 | push                2
            //   6a00                 | push                0
            //   6a00                 | push                0
            //   6800000040           | push                0x40000000

        $sequence_13 = { ff15???????? 8bf0 83feff 74?? ff15???????? 3db7000000 74?? }
            // n = 7, score = 500
            //   ff15????????         |                     
            //   8bf0                 | mov                 esi, eax
            //   83feff               | cmp                 esi, -1
            //   74??                 |                     
            //   ff15????????         |                     
            //   3db7000000           | cmp                 eax, 0xb7
            //   74??                 |                     

        $sequence_14 = { 3db7000000 74?? 56 ff15???????? }
            // n = 4, score = 500
            //   3db7000000           | cmp                 eax, 0xb7
            //   74??                 |                     
            //   56                   | push                esi
            //   ff15????????         |                     

        $sequence_15 = { ff15???????? 8bf0 83feff 74?? ff15???????? 3db7000000 }
            // n = 6, score = 500
            //   ff15????????         |                     
            //   8bf0                 | mov                 esi, eax
            //   83feff               | cmp                 esi, -1
            //   74??                 |                     
            //   ff15????????         |                     
            //   3db7000000           | cmp                 eax, 0xb7

        $sequence_16 = { 8bf0 83feff 74?? ff15???????? 3db7000000 74?? 56 }
            // n = 7, score = 500
            //   8bf0                 | mov                 esi, eax
            //   83feff               | cmp                 esi, -1
            //   74??                 |                     
            //   ff15????????         |                     
            //   3db7000000           | cmp                 eax, 0xb7
            //   74??                 |                     
            //   56                   | push                esi

        $sequence_17 = { ff15???????? 3db7000000 74?? 56 ff15???????? }
            // n = 5, score = 500
            //   ff15????????         |                     
            //   3db7000000           | cmp                 eax, 0xb7
            //   74??                 |                     
            //   56                   | push                esi
            //   ff15????????         |                     

        $sequence_18 = { 83feff 74?? ff15???????? 3db7000000 74?? 56 }
            // n = 6, score = 500
            //   83feff               | cmp                 esi, -1
            //   74??                 |                     
            //   ff15????????         |                     
            //   3db7000000           | cmp                 eax, 0xb7
            //   74??                 |                     
            //   56                   | push                esi

        $sequence_19 = { 3db7000000 74?? 56 ff15???????? b001 }
            // n = 5, score = 500
            //   3db7000000           | cmp                 eax, 0xb7
            //   74??                 |                     
            //   56                   | push                esi
            //   ff15????????         |                     
            //   b001                 | mov                 al, 1

        $sequence_20 = { ff15???????? 3db7000000 74?? 56 ff15???????? b001 }
            // n = 6, score = 500
            //   ff15????????         |                     
            //   3db7000000           | cmp                 eax, 0xb7
            //   74??                 |                     
            //   56                   | push                esi
            //   ff15????????         |                     
            //   b001                 | mov                 al, 1

    condition:
        7 of them
}
Download all Yara Rules