Actor(s): APT28
There is no description at this point.
rule win_xagent_auto { meta: author = "Felix Bilstein - yara-signator at cocacoding dot com" date = "2023-01-25" version = "1" description = "Detects win.xagent." 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.xagent" malpedia_rule_date = "20230124" malpedia_hash = "2ee0eebba83dce3d019a90519f2f972c0fcf9686" malpedia_version = "20230125" 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 = { c1ea02 6bd20d b801000000 2bc2 } // n = 4, score = 3100 // c1ea02 | shr edx, 2 // 6bd20d | imul edx, edx, 0xd // b801000000 | mov eax, 1 // 2bc2 | sub eax, edx $sequence_1 = { ff15???????? 8bd8 e8???????? 03d8 } // n = 4, score = 3100 // ff15???????? | // 8bd8 | mov ebx, eax // e8???????? | // 03d8 | add ebx, eax $sequence_2 = { c20400 8d4de4 e8???????? b8???????? c3 83c8ff 8b4df4 } // n = 7, score = 2600 // c20400 | ret 4 // 8d4de4 | lea ecx, [ebp - 0x1c] // e8???????? | // b8???????? | // c3 | ret // 83c8ff | or eax, 0xffffffff // 8b4df4 | mov ecx, dword ptr [ebp - 0xc] $sequence_3 = { 8b7a08 c1e802 83e103 3bf8 7702 2bc7 8b5204 } // n = 7, score = 2600 // 8b7a08 | mov edi, dword ptr [edx + 8] // c1e802 | shr eax, 2 // 83e103 | and ecx, 3 // 3bf8 | cmp edi, eax // 7702 | ja 4 // 2bc7 | sub eax, edi // 8b5204 | mov edx, dword ptr [edx + 4] $sequence_4 = { 49 894e10 7507 c7460c00000000 5f } // n = 5, score = 2600 // 49 | dec ecx // 894e10 | mov dword ptr [esi + 0x10], ecx // 7507 | jne 9 // c7460c00000000 | mov dword ptr [esi + 0xc], 0 // 5f | pop edi $sequence_5 = { 03ff 3b7e0c 7707 c7460c00000000 49 } // n = 5, score = 2600 // 03ff | add edi, edi // 3b7e0c | cmp edi, dword ptr [esi + 0xc] // 7707 | ja 9 // c7460c00000000 | mov dword ptr [esi + 0xc], 0 // 49 | dec ecx $sequence_6 = { 7702 2bc7 8b5204 8b0482 8b0488 8b4e10 } // n = 6, score = 2600 // 7702 | ja 4 // 2bc7 | sub eax, edi // 8b5204 | mov edx, dword ptr [edx + 4] // 8b0482 | mov eax, dword ptr [edx + eax*4] // 8b0488 | mov eax, dword ptr [eax + ecx*4] // 8b4e10 | mov ecx, dword ptr [esi + 0x10] $sequence_7 = { 8b0488 8b4e10 85c9 7423 8b7e08 } // n = 5, score = 2600 // 8b0488 | mov eax, dword ptr [eax + ecx*4] // 8b4e10 | mov ecx, dword ptr [esi + 0x10] // 85c9 | test ecx, ecx // 7423 | je 0x25 // 8b7e08 | mov edi, dword ptr [esi + 8] $sequence_8 = { 8bce e8???????? 8b08 85c9 7504 } // n = 5, score = 2600 // 8bce | mov ecx, esi // e8???????? | // 8b08 | mov ecx, dword ptr [eax] // 85c9 | test ecx, ecx // 7504 | jne 6 $sequence_9 = { 33d2 eb02 8b11 8b4808 8bc1 57 } // n = 6, score = 2600 // 33d2 | xor edx, edx // eb02 | jmp 4 // 8b11 | mov edx, dword ptr [ecx] // 8b4808 | mov ecx, dword ptr [eax + 8] // 8bc1 | mov eax, ecx // 57 | push edi $sequence_10 = { 4889542410 57 4883ec60 48c7442420feffffff 48895c2470 } // n = 5, score = 1500 // 4889542410 | cmp al, 1 // 57 | jne 6 // 4883ec60 | mov al, 1 // 48c7442420feffffff | jmp 6 // 48895c2470 | xor al, al $sequence_11 = { e8???????? 90 0fb705???????? 6689442420 } // n = 4, score = 1500 // e8???????? | // 90 | je 0xe // 0fb705???????? | // 6689442420 | dec eax $sequence_12 = { e8???????? 488b4328 4c8bcf 4c8bc6 } // n = 4, score = 1500 // e8???????? | // 488b4328 | dec eax // 4c8bcf | mov eax, dword ptr [edi] // 4c8bc6 | dec esp $sequence_13 = { 740c 488b07 488b0b 488903 } // n = 4, score = 1500 // 740c | mov eax, dword ptr [edi] // 488b07 | dec esp // 488b0b | mov edx, dword ptr [ebx] // 488903 | dec eax $sequence_14 = { e8???????? 48833b00 740a 488b4308 } // n = 4, score = 1500 // e8???????? | // 48833b00 | dec eax // 740a | mov dword ptr [ebx], eax // 488b4308 | je 0xe $sequence_15 = { e8???????? 498bce 4e8d0437 482bcf } // n = 4, score = 1500 // e8???????? | // 498bce | mov eax, dword ptr [edi] // 4e8d0437 | dec esp // 482bcf | mov edx, dword ptr [ebx] $sequence_16 = { 84c0 740c 488b07 4c8b13 } // n = 4, score = 1500 // 84c0 | test al, al // 740c | je 0xe // 488b07 | dec eax // 4c8b13 | mov eax, dword ptr [edi] $sequence_17 = { ff15???????? baf4010000 488bcb ff15???????? } // n = 4, score = 600 // ff15???????? | // baf4010000 | cmp al, 1 // 488bcb | jne 6 // ff15???????? | $sequence_18 = { b803b57ea5 f7e6 c1ea06 6bd263 } // n = 4, score = 500 // b803b57ea5 | mov al, 1 // f7e6 | jmp 6 // c1ea06 | xor al, al // 6bd263 | cmp al, 1 $sequence_19 = { c1ea07 69d295000000 2bca 8bd1 } // n = 4, score = 400 // c1ea07 | mov al, 1 // 69d295000000 | jmp 6 // 2bca | xor al, al // 8bd1 | cmp al, 1 $sequence_20 = { 75f8 488bf8 482bfa 488b4b28 } // n = 4, score = 200 // 75f8 | jmp 6 // 488bf8 | xor al, al // 482bfa | cmp al, 1 // 488b4b28 | jne 6 $sequence_21 = { 75f8 488bf9 482bfb 448bcf } // n = 4, score = 200 // 75f8 | dec eax // 488bf9 | mov ecx, ebx // 482bfb | mov eax, 0xa57eb503 // 448bcf | mul esi $sequence_22 = { 75f8 488bf9 482bfe 2bfb } // n = 4, score = 200 // 75f8 | sub edi, ecx // 488bf9 | dec eax // 482bfe | add ecx, edi // 2bfb | dec esp $sequence_23 = { 75f8 488bf9 482bfa 4c8bc7 } // n = 4, score = 200 // 75f8 | mov al, 1 // 488bf9 | jmp 6 // 482bfa | xor al, al // 4c8bc7 | cmp al, 1 $sequence_24 = { 75f8 488bf8 482bf9 4803cf 4c8bc3 488bd6 e8???????? } // n = 7, score = 200 // 75f8 | mov al, 1 // 488bf8 | jmp 4 // 482bf9 | xor al, al // 4803cf | cmp al, 1 // 4c8bc3 | jne 6 // 488bd6 | mov al, 1 // e8???????? | condition: 7 of them and filesize < 729088 }
rule win_xagent_w0 { meta: description = "Sofacy Group Malware Sample 3" author = "Florian Roth" reference = "http://dokumente.linksfraktion.de/inhalt/report-orig.pdf" date = "2015-06-19" hash = "5f6b2a0d1d966fc4f1ed292b46240767f4acb06c13512b0061b434ae2a692fa1" source = "https://github.com/mattulm/sfiles_yara/blob/master/malware/sofacy_xtunnel_bundestag.yar" malpedia_reference = "https://malpedia.caad.fkie.fraunhofer.de/details/win.xagent" malpedia_version = "20170517" malpedia_license = "CC BY-NC-SA 4.0" malpedia_sharing = "TLP:WHITE" strings: $s1 = "shell\\open\\command=\"System Volume Information\\USBGuard.exe\" install" fullword ascii $s2 = ".?AVAgentModuleRemoteKeyLogger@@" fullword ascii $s3 = "<font size=4 color=red>process isn't exist</font>" fullword ascii $s4 = "<font size=4 color=red>process is exist</font>" fullword ascii $s5 = ".winnt.check-fix.com" fullword ascii $s6 = ".update.adobeincorp.com" fullword ascii $s7 = ".microsoft.checkwinframe.com" fullword ascii $s8 = "adobeincorp.com" fullword wide $s9 = "# EXC: HttpSender - Cannot create Get Channel!" fullword ascii $x1 = "User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:20.0) Gecko/20100101 Firefox/" wide $x2 = "User-Agent: Mozilla/5.0 (Windows NT 6.; WOW64; rv:20.0) Gecko/20100101 Firefox/2" wide $x3 = "C:\\Windows\\System32\\cmd.exe" fullword wide condition: uint16(0) == 0x5a4d and filesize < 300KB and ( 2 of ($s*) or ( 1 of ($s*) and all of ($x*) ) ) }
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