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-09-17" 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 = "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 = { 8a0c30 84c9 0f84fc010000 0fb6c9 } // n = 4, score = 1200 // 8a0c30 | mov cl, byte ptr [eax + esi] // 84c9 | test cl, cl // 0f84fc010000 | je 0x202 // 0fb6c9 | movzx ecx, cl $sequence_1 = { 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_2 = { 8d642400 8a540c64 88540702 8b442410 40 49 89442410 } // n = 7, score = 1200 // 8d642400 | lea esp, [esp] // 8a540c64 | mov dl, byte ptr [esp + ecx + 0x64] // 88540702 | mov byte ptr [edi + eax + 2], dl // 8b442410 | mov eax, dword ptr [esp + 0x10] // 40 | inc eax // 49 | dec ecx // 89442410 | mov dword ptr [esp + 0x10], eax $sequence_3 = { 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_4 = { 8b7d40 68???????? e8???????? 83c404 8944240c } // n = 5, score = 1200 // 8b7d40 | mov edi, dword ptr [ebp + 0x40] // 68???????? | // e8???????? | // 83c404 | add esp, 4 // 8944240c | mov dword ptr [esp + 0xc], eax $sequence_5 = { e8???????? 99 b960000000 f7f9 } // n = 4, score = 1200 // e8???????? | // 99 | cdq // b960000000 | mov ecx, 0x60 // f7f9 | idiv ecx $sequence_6 = { 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_7 = { 8a542410 8a442414 8d7702 6a00 8d7e09 c60601 } // n = 6, 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 $sequence_8 = { 8a542414 8d5f09 880b 885301 8b7558 68???????? } // n = 6, score = 1200 // 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] // 68???????? | $sequence_9 = { 8b11 83c202 52 e8???????? } // n = 4, score = 1200 // 8b11 | mov edx, dword ptr [ecx] // 83c202 | add edx, 2 // 52 | push edx // e8???????? | $sequence_10 = { f7d8 1bc0 83e0fb 5f 5e 5b 8be5 } // n = 7, score = 1000 // f7d8 | neg eax // 1bc0 | sbb eax, eax // 83e0fb | and eax, 0xfffffffb // 5f | pop edi // 5e | pop esi // 5b | pop ebx // 8be5 | mov esp, ebp $sequence_11 = { 895018 8b11 8910 8b5114 895014 } // n = 5, score = 1000 // 895018 | mov dword ptr [eax + 0x18], edx // 8b11 | mov edx, dword ptr [ecx] // 8910 | mov dword ptr [eax], edx // 8b5114 | mov edx, dword ptr [ecx + 0x14] // 895014 | mov dword ptr [eax + 0x14], edx $sequence_12 = { 8d7340 8bc1 3b4e04 7405 3b510c } // n = 5, score = 1000 // 8d7340 | lea esi, [ebx + 0x40] // 8bc1 | mov eax, ecx // 3b4e04 | cmp ecx, dword ptr [esi + 4] // 7405 | je 7 // 3b510c | cmp edx, dword ptr [ecx + 0xc] $sequence_13 = { 894804 0fb75608 66895008 8b4e18 } // n = 4, score = 1000 // 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] $sequence_14 = { e8???????? 8bf8 83c404 897dec 33db 895dfc 3bfb } // n = 7, score = 1000 // e8???????? | // 8bf8 | mov edi, eax // 83c404 | add esp, 4 // 897dec | mov dword ptr [ebp - 0x14], edi // 33db | xor ebx, ebx // 895dfc | mov dword ptr [ebp - 4], ebx // 3bfb | cmp edi, ebx $sequence_15 = { 03d2 52 51 50 e8???????? 834314fe 8b4310 } // n = 7, score = 1000 // 03d2 | add edx, edx // 52 | push edx // 51 | push ecx // 50 | push eax // e8???????? | // 834314fe | add dword ptr [ebx + 0x14], -2 // 8b4310 | mov eax, dword ptr [ebx + 0x10] $sequence_16 = { 33c4 89442410 56 6a06 6a01 } // n = 5, score = 1000 // 33c4 | xor eax, esp // 89442410 | mov dword ptr [esp + 0x10], eax // 56 | push esi // 6a06 | push 6 // 6a01 | push 1 $sequence_17 = { c6421501 c645fc03 6a18 895e48 e8???????? } // n = 5, score = 1000 // c6421501 | mov byte ptr [edx + 0x15], 1 // c645fc03 | mov byte ptr [ebp - 4], 3 // 6a18 | push 0x18 // 895e48 | mov dword ptr [esi + 0x48], ebx // e8???????? | $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 = { 83c404 8bf0 e8???????? 99 b980969800 } // n = 5, score = 300 // 83c404 | add esp, 4 // 8bf0 | mov esi, eax // e8???????? | // 99 | cdq // b980969800 | mov ecx, 0x989680 $sequence_20 = { 83c404 b8feffffff e9???????? 8b45f0 } // n = 4, score = 300 // 83c404 | add esp, 4 // b8feffffff | mov eax, 0xfffffffe // e9???????? | // 8b45f0 | mov eax, dword ptr [ebp - 0x10] $sequence_21 = { 83c404 8b55fc 8b4a04 8908 8b45fc } // n = 5, score = 300 // 83c404 | add esp, 4 // 8b55fc | mov edx, dword ptr [ebp - 4] // 8b4a04 | mov ecx, dword ptr [edx + 4] // 8908 | mov dword ptr [eax], ecx // 8b45fc | mov eax, dword ptr [ebp - 4] $sequence_22 = { 83c404 8bf0 8b4df8 51 e8???????? 83c404 8b10 } // n = 7, score = 300 // 83c404 | add esp, 4 // 8bf0 | mov esi, eax // 8b4df8 | mov ecx, dword ptr [ebp - 8] // 51 | push ecx // e8???????? | // 83c404 | add esp, 4 // 8b10 | mov edx, dword ptr [eax] $sequence_23 = { 83c404 8bf0 8b4dec 51 e8???????? 83c404 8a16 } // n = 7, score = 300 // 83c404 | add esp, 4 // 8bf0 | mov esi, eax // 8b4dec | mov ecx, dword ptr [ebp - 0x14] // 51 | push ecx // e8???????? | // 83c404 | add esp, 4 // 8a16 | mov dl, byte ptr [esi] 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