Actor(s): APT28
X-Tunnel is a network proxy tool that implements a custom network protocol encapsulated in the TLS protocol.
rule win_xtunnel_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-12-06" version = "1" description = "Detects win.xtunnel." 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.xtunnel" 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 = { 0f84d9000000 8b442414 3bc3 729b 8b4c2428 } // n = 5, score = 1200 // 0f84d9000000 | je 0xdf // 8b442414 | mov eax, dword ptr [esp + 0x14] // 3bc3 | cmp eax, ebx // 729b | jb 0xffffff9d // 8b4c2428 | mov ecx, dword ptr [esp + 0x28] $sequence_1 = { 8b85c0000000 85c0 0f849f010000 83b8e400000000 } // n = 4, score = 1200 // 8b85c0000000 | mov eax, dword ptr [ebp + 0xc0] // 85c0 | test eax, eax // 0f849f010000 | je 0x1a5 // 83b8e400000000 | cmp dword ptr [eax + 0xe4], 0 $sequence_2 = { eb67 8b7740 0fb60e 8b97c0000000 c1e118 898aec000000 } // n = 6, score = 1200 // eb67 | jmp 0x69 // 8b7740 | mov esi, dword ptr [edi + 0x40] // 0fb60e | movzx ecx, byte ptr [esi] // 8b97c0000000 | mov edx, dword ptr [edi + 0xc0] // c1e118 | shl ecx, 0x18 // 898aec000000 | mov dword ptr [edx + 0xec], ecx $sequence_3 = { 03d6 3b542414 7439 6a32 6a02 55 } // n = 6, score = 1200 // 03d6 | add edx, esi // 3b542414 | cmp edx, dword ptr [esp + 0x14] // 7439 | je 0x3b // 6a32 | push 0x32 // 6a02 | push 2 // 55 | push ebp $sequence_4 = { 0f8e760a0000 8b96c0000000 c7421030000000 813e00030000 8bef 7e03 83c702 } // n = 7, score = 1200 // 0f8e760a0000 | jle 0xa7c // 8b96c0000000 | mov edx, dword ptr [esi + 0xc0] // c7421030000000 | mov dword ptr [edx + 0x10], 0x30 // 813e00030000 | cmp dword ptr [esi], 0x300 // 8bef | mov ebp, edi // 7e03 | jle 5 // 83c702 | add edi, 2 $sequence_5 = { 8b11 83c202 52 e8???????? } // n = 4, score = 1200 // 8b11 | mov edx, dword ptr [ecx] // 83c202 | add edx, 2 // 52 | push edx // e8???????? | $sequence_6 = { e8???????? 99 b960000000 f7f9 } // n = 4, score = 1200 // e8???????? | // 99 | cdq // b960000000 | mov ecx, 0x60 // f7f9 | idiv ecx $sequence_7 = { 0f850a030000 c744241001000000 e9???????? 83fb0b 0f859a000000 } // n = 5, score = 1200 // 0f850a030000 | jne 0x310 // c744241001000000 | mov dword ptr [esp + 0x10], 1 // e9???????? | // 83fb0b | cmp ebx, 0xb // 0f859a000000 | jne 0xa0 $sequence_8 = { 0f85d1000000 50 8b442414 50 e8???????? 83c408 85c0 } // n = 7, score = 1200 // 0f85d1000000 | jne 0xd7 // 50 | push eax // 8b442414 | mov eax, dword ptr [esp + 0x14] // 50 | push eax // e8???????? | // 83c408 | add esp, 8 // 85c0 | test eax, eax $sequence_9 = { 0f849b010000 8b4f58 8b9140030000 83fa14 750f c7815403000001000000 8d42ed } // n = 7, score = 1200 // 0f849b010000 | je 0x1a1 // 8b4f58 | mov ecx, dword ptr [edi + 0x58] // 8b9140030000 | mov edx, dword ptr [ecx + 0x340] // 83fa14 | cmp edx, 0x14 // 750f | jne 0x11 // c7815403000001000000 | mov dword ptr [ecx + 0x354], 1 // 8d42ed | lea eax, [edx - 0x13] $sequence_10 = { 8b5120 895020 8b4910 894810 eb02 } // n = 5, score = 1000 // 8b5120 | mov edx, dword ptr [ecx + 0x20] // 895020 | mov dword ptr [eax + 0x20], edx // 8b4910 | mov ecx, dword ptr [ecx + 0x10] // 894810 | mov dword ptr [eax + 0x10], ecx // eb02 | jmp 4 $sequence_11 = { 6689500a 8b4e0c 89480c 8b5620 895020 8b4e10 894810 } // n = 7, score = 1000 // 6689500a | mov word ptr [eax + 0xa], dx // 8b4e0c | mov ecx, dword ptr [esi + 0xc] // 89480c | mov dword ptr [eax + 0xc], ecx // 8b5620 | mov edx, dword ptr [esi + 0x20] // 895020 | mov dword ptr [eax + 0x20], edx // 8b4e10 | mov ecx, dword ptr [esi + 0x10] // 894810 | mov dword ptr [eax + 0x10], ecx $sequence_12 = { 8b7d08 0fb7f6 c745fcffffffff 8d4750 8d550c 89750c } // n = 6, score = 1000 // 8b7d08 | mov edi, dword ptr [ebp + 8] // 0fb7f6 | movzx esi, si // c745fcffffffff | mov dword ptr [ebp - 4], 0xffffffff // 8d4750 | lea eax, [edi + 0x50] // 8d550c | lea edx, [ebp + 0xc] // 89750c | mov dword ptr [ebp + 0xc], esi $sequence_13 = { 8b4310 8b4b14 33ff 2bc8 d1f9 } // n = 5, score = 1000 // 8b4310 | mov eax, dword ptr [ebx + 0x10] // 8b4b14 | mov ecx, dword ptr [ebx + 0x14] // 33ff | xor edi, edi // 2bc8 | sub ecx, eax // d1f9 | sar ecx, 1 $sequence_14 = { 8975f0 74dd 8b4744 894004 8b4744 8900 } // n = 6, score = 1000 // 8975f0 | mov dword ptr [ebp - 0x10], esi // 74dd | je 0xffffffdf // 8b4744 | mov eax, dword ptr [edi + 0x44] // 894004 | mov dword ptr [eax + 4], eax // 8b4744 | mov eax, dword ptr [edi + 0x44] // 8900 | mov dword ptr [eax], eax $sequence_15 = { 83c404 56 e8???????? 8b4310 8b5314 8d0478 } // n = 6, score = 1000 // 83c404 | add esp, 4 // 56 | push esi // e8???????? | // 8b4310 | mov eax, dword ptr [ebx + 0x10] // 8b5314 | mov edx, dword ptr [ebx + 0x14] // 8d0478 | lea eax, [eax + edi*2] $sequence_16 = { 8b4d0c 8b5104 895004 0fb75108 66895008 8b5118 } // n = 6, score = 1000 // 8b4d0c | mov ecx, dword ptr [ebp + 0xc] // 8b5104 | mov edx, dword ptr [ecx + 4] // 895004 | mov dword ptr [eax + 4], edx // 0fb75108 | movzx edx, word ptr [ecx + 8] // 66895008 | mov word ptr [eax + 8], dx // 8b5118 | mov edx, dword ptr [ecx + 0x18] $sequence_17 = { 895dec c645fc0b 8b4304 8b08 } // n = 4, score = 1000 // 895dec | mov dword ptr [ebp - 0x14], ebx // c645fc0b | mov byte ptr [ebp - 4], 0xb // 8b4304 | mov eax, dword ptr [ebx + 4] // 8b08 | mov ecx, dword ptr [eax] $sequence_18 = { e8???????? 83c404 8945b0 8b45b4 50 6a00 } // n = 6, score = 500 // e8???????? | // 83c404 | add esp, 4 // 8945b0 | mov dword ptr [ebp - 0x50], eax // 8b45b4 | mov eax, dword ptr [ebp - 0x4c] // 50 | push eax // 6a00 | push 0 $sequence_19 = { 0f85c0020000 c785ccfcffff00000000 c785c8fbffff00000000 8b45f4 0fbf4804 83e101 } // n = 6, score = 300 // 0f85c0020000 | jne 0x2c6 // c785ccfcffff00000000 | mov dword ptr [ebp - 0x334], 0 // c785c8fbffff00000000 | mov dword ptr [ebp - 0x438], 0 // 8b45f4 | mov eax, dword ptr [ebp - 0xc] // 0fbf4804 | movsx ecx, word ptr [eax + 4] // 83e101 | and ecx, 1 $sequence_20 = { 83c404 8b45f0 8b88a4000000 894dac } // n = 4, score = 300 // 83c404 | add esp, 4 // 8b45f0 | mov eax, dword ptr [ebp - 0x10] // 8b88a4000000 | mov ecx, dword ptr [eax + 0xa4] // 894dac | mov dword ptr [ebp - 0x54], ecx $sequence_21 = { 56 57 894dfc 837d0800 7452 837d0c00 744c } // n = 7, score = 300 // 56 | push esi // 57 | push edi // 894dfc | mov dword ptr [ebp - 4], ecx // 837d0800 | cmp dword ptr [ebp + 8], 0 // 7452 | je 0x54 // 837d0c00 | cmp dword ptr [ebp + 0xc], 0 // 744c | je 0x4e $sequence_22 = { 83c404 8b16 8910 8b4dfc e8???????? 8b4d08 } // n = 6, score = 300 // 83c404 | add esp, 4 // 8b16 | mov edx, dword ptr [esi] // 8910 | mov dword ptr [eax], edx // 8b4dfc | mov ecx, dword ptr [ebp - 4] // e8???????? | // 8b4d08 | mov ecx, dword ptr [ebp + 8] $sequence_23 = { 83c404 8b16 8910 8b45f8 50 e8???????? 83c404 } // n = 7, score = 300 // 83c404 | add esp, 4 // 8b16 | mov edx, dword ptr [esi] // 8910 | mov dword ptr [eax], edx // 8b45f8 | mov eax, dword ptr [ebp - 8] // 50 | push eax // e8???????? | // 83c404 | add esp, 4 condition: 7 of them and filesize < 4634440 }
rule win_xtunnel_w0 { meta: author = "Claudio Guarnieri" source = "https://netzpolitik.org/2015/digital-attack-on-german-parliament-investigative-report-on-the-hack-of-the-left-party-infrastructure-in-bundestag/" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.xtunnel" malpedia_version = "20170410" malpedia_license = "CC BY-NC-SA 4.0" malpedia_sharing = "TLP:WHITE" strings: $xaps = ":\\PROJECT\\XAPS_" $variant11 = "XAPS_OBJECTIVE.dll" $variant12 = "start" $variant21 = "User-Agent: Mozilla/5.0 (Windows NT 6.3;WOW64; rv:28.0) Gecko/20100101 Firefox/28.0" $variant22 = "is you live?" $mix1 = "176.31.112.10" $mix2 = "error in select, errno %d" $mix3 = "no msg" $mix4 = "is you live?" $mix5 = "127.0.0.1" $mix6 = "err %d" $mix7 = "i`m wait" $mix8 = "hello" $mix9 = "OpenSSL 1.0.1e 11 Feb 2013" $mix10 = "Xtunnel.exe" condition: ((uint16(0) == 0x5A4D) or (uint16(0) == 0xCFD0)) and (($xaps) or (all of ($variant1*)) or (all of ($variant2*)) or (6 of ($mix*))) }
If your designated proposal does not fit in any other category, feel free to write a free-text in the comment field below.
Please propose all changes regarding references on the Malpedia library page
Your suggestion will be reviewed before being published. Thank you for contributing!
YYYY-MM-DD
YYYY-MM
YYYY