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 = "2026-05-04" 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 = "20260422" malpedia_hash = "a182e35da64e6d71cb55f125c4d4225196523f14" malpedia_version = "20260504" 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 = { 8b85c0000000 85c0 0f849f010000 83b8e400000000 0f8492010000 8b98e8000000 85db } // n = 7, score = 1200 // 8b85c0000000 | mov eax, dword ptr [ebp + 0xc0] // 85c0 | test eax, eax // 0f849f010000 | je 0x1a5 // 83b8e400000000 | cmp dword ptr [eax + 0xe4], 0 // 0f8492010000 | je 0x198 // 8b98e8000000 | mov ebx, dword ptr [eax + 0xe8] // 85db | test ebx, ebx $sequence_1 = { 8b7c2424 8b4f58 33c0 89811c040000 83a784010000fc } // n = 5, score = 1200 // 8b7c2424 | mov edi, dword ptr [esp + 0x24] // 8b4f58 | mov ecx, dword ptr [edi + 0x58] // 33c0 | xor eax, eax // 89811c040000 | mov dword ptr [ecx + 0x41c], eax // 83a784010000fc | and dword ptr [edi + 0x184], 0xfffffffc $sequence_2 = { 8a442430 8b4f58 888778010000 83c40c c7811c04000001000000 eb6d } // n = 6, score = 1200 // 8a442430 | mov al, byte ptr [esp + 0x30] // 8b4f58 | mov ecx, dword ptr [edi + 0x58] // 888778010000 | mov byte ptr [edi + 0x178], al // 83c40c | add esp, 0xc // c7811c04000001000000 | mov dword ptr [ecx + 0x41c], 1 // eb6d | jmp 0x6f $sequence_3 = { 8a542410 8a442414 8d7702 6a00 8d7e09 c60601 57 } // n = 7, score = 1200 // 8a542410 | mov dl, byte ptr [esp + 0x10] // 8a442414 | mov al, byte ptr [esp + 0x14] // 8d7702 | lea esi, [edi + 2] // 6a00 | push 0 // 8d7e09 | lea edi, [esi + 9] // c60601 | mov byte ptr [esi], 1 // 57 | push edi $sequence_4 = { e8???????? 99 b960000000 f7f9 } // n = 4, score = 1200 // e8???????? | // 99 | cdq // b960000000 | mov ecx, 0x60 // f7f9 | idiv ecx $sequence_5 = { 8a0c30 84c9 0f84fc010000 0fb6c9 8d440801 } // n = 5, score = 1200 // 8a0c30 | mov cl, byte ptr [eax + esi] // 84c9 | test cl, cl // 0f84fc010000 | je 0x202 // 0fb6c9 | movzx ecx, cl // 8d440801 | lea eax, [eax + ecx + 1] $sequence_6 = { 8b11 83c202 52 e8???????? } // n = 4, score = 1200 // 8b11 | mov edx, dword ptr [ecx] // 83c202 | add edx, 2 // 52 | push edx // e8???????? | $sequence_7 = { 8a0b 43 84c9 75f9 2bda 81fbff000000 0f8fb7000000 } // n = 7, score = 1200 // 8a0b | mov cl, byte ptr [ebx] // 43 | inc ebx // 84c9 | test cl, cl // 75f9 | jne 0xfffffffb // 2bda | sub ebx, edx // 81fbff000000 | cmp ebx, 0xff // 0f8fb7000000 | jg 0xbd $sequence_8 = { 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_9 = { 8a4c2410 8a542414 8d5f09 880b 885301 8b7558 } // n = 6, score = 1200 // 8a4c2410 | mov cl, byte ptr [esp + 0x10] // 8a542414 | mov dl, byte ptr [esp + 0x14] // 8d5f09 | lea ebx, [edi + 9] // 880b | mov byte ptr [ebx], cl // 885301 | mov byte ptr [ebx + 1], dl // 8b7558 | mov esi, dword ptr [ebp + 0x58] $sequence_10 = { c6421401 8b4654 c6401501 c645fc05 } // n = 4, score = 1000 // c6421401 | mov byte ptr [edx + 0x14], 1 // 8b4654 | mov eax, dword ptr [esi + 0x54] // c6401501 | mov byte ptr [eax + 0x15], 1 // c645fc05 | mov byte ptr [ebp - 4], 5 $sequence_11 = { 8b08 50 51 8d75f0 8bc3 e8???????? 8b5b04 } // n = 7, score = 1000 // 8b08 | mov ecx, dword ptr [eax] // 50 | push eax // 51 | push ecx // 8d75f0 | lea esi, [ebp - 0x10] // 8bc3 | mov eax, ebx // e8???????? | // 8b5b04 | mov ebx, dword ptr [ebx + 4] $sequence_12 = { 743a 8b4e04 894804 0fb75608 66895008 8b4e18 894818 } // n = 7, score = 1000 // 743a | je 0x3c // 8b4e04 | mov ecx, dword ptr [esi + 4] // 894804 | mov dword ptr [eax + 4], ecx // 0fb75608 | movzx edx, word ptr [esi + 8] // 66895008 | mov word ptr [eax + 8], dx // 8b4e18 | mov ecx, dword ptr [esi + 0x18] // 894818 | mov dword ptr [eax + 0x18], ecx $sequence_13 = { 50 ff15???????? 8b4b10 0fb71479 } // n = 4, score = 1000 // 50 | push eax // ff15???????? | // 8b4b10 | mov ecx, dword ptr [ebx + 0x10] // 0fb71479 | movzx edx, word ptr [ecx + edi*2] $sequence_14 = { 8b4644 894008 8b4644 c6401401 } // n = 4, score = 1000 // 8b4644 | mov eax, dword ptr [esi + 0x44] // 894008 | mov dword ptr [eax + 8], eax // 8b4644 | mov eax, dword ptr [esi + 0x44] // c6401401 | mov byte ptr [eax + 0x14], 1 $sequence_15 = { 52 51 50 e8???????? 834314fe } // n = 5, score = 1000 // 52 | push edx // 51 | push ecx // 50 | push eax // e8???????? | // 834314fe | add dword ptr [ebx + 0x14], -2 $sequence_16 = { 8d4740 89750c e8???????? 89450c 8d45f0 50 } // n = 6, score = 1000 // 8d4740 | lea eax, [edi + 0x40] // 89750c | mov dword ptr [ebp + 0xc], esi // e8???????? | // 89450c | mov dword ptr [ebp + 0xc], eax // 8d45f0 | lea eax, [ebp - 0x10] // 50 | push eax $sequence_17 = { 8b4744 894004 8b4744 8900 8b4744 } // n = 5, score = 1000 // 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 // 8b4744 | mov eax, dword ptr [edi + 0x44] $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 = { 51 e8???????? 83c404 8b4dec e8???????? 0fb6c0 } // n = 6, score = 300 // 51 | push ecx // e8???????? | // 83c404 | add esp, 4 // 8b4dec | mov ecx, dword ptr [ebp - 0x14] // e8???????? | // 0fb6c0 | movzx eax, al $sequence_20 = { 51 e8???????? 83c404 8b55f8 3b10 751d } // n = 6, score = 300 // 51 | push ecx // e8???????? | // 83c404 | add esp, 4 // 8b55f8 | mov edx, dword ptr [ebp - 8] // 3b10 | cmp edx, dword ptr [eax] // 751d | jne 0x1f $sequence_21 = { 8b4de4 51 e8???????? 83c40c 6a00 6a01 } // n = 6, score = 300 // 8b4de4 | mov ecx, dword ptr [ebp - 0x1c] // 51 | push ecx // e8???????? | // 83c40c | add esp, 0xc // 6a00 | push 0 // 6a01 | push 1 $sequence_22 = { 51 e8???????? 83c404 8b55ec 8910 8b45f8 } // n = 6, score = 300 // 51 | push ecx // e8???????? | // 83c404 | add esp, 4 // 8b55ec | mov edx, dword ptr [ebp - 0x14] // 8910 | mov dword ptr [eax], edx // 8b45f8 | mov eax, dword ptr [ebp - 8] $sequence_23 = { 51 e8???????? 83c404 8b55ac 668b00 668902 } // n = 6, score = 300 // 51 | push ecx // e8???????? | // 83c404 | add esp, 4 // 8b55ac | mov edx, dword ptr [ebp - 0x54] // 668b00 | mov ax, word ptr [eax] // 668902 | mov word ptr [edx], ax 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. Changes regarding references should be proposed on the Malpedia library page.
Your suggestion will be reviewed before being published. Thank you for contributing!
YYYY-MM-DD
YYYY-MM
YYYY