win_necurs_auto

YARA-2024-0179 Medium general Active

Detects win.necurs.

win_necurs_auto.yar Valid Syntax
rule win_necurs_auto {

    meta:
        author = "Felix Bilstein - yara-signator at cocacoding dot com"
        date = "2024-10-31"
        version = "1"
        description = "Detects win.necurs."
        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.necurs"
        malpedia_rule_date = "20241030"
        malpedia_hash = "26e26953c49c8efafbf72a38076855d578e0a2e4"
        malpedia_version = "20241030"
        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 = { 56 8bf2 ba06e0a636 f7e2 }
            // n = 4, score = 1300
            //   56                   | push                esi
            //   8bf2                 | mov                 esi, edx
            //   ba06e0a636           | mov                 edx, 0x36a6e006
            //   f7e2                 | mul                 edx

        $sequence_1 = { f7f6 8bc2 034508 5e 5d c3 }
            // n = 6, score = 1300
            //   f7f6                 | div                 esi
            //   8bc2                 | mov                 eax, edx
            //   034508               | add                 eax, dword ptr [ebp + 8]
            //   5e                   | pop                 esi
            //   5d                   | pop                 ebp
            //   c3                   | ret                 

        $sequence_2 = { ba06e0a636 f7e2 03c8 a1???????? 13f2 33d2 }
            // n = 6, score = 1300
            //   ba06e0a636           | mov                 edx, 0x36a6e006
            //   f7e2                 | mul                 edx
            //   03c8                 | add                 ecx, eax
            //   a1????????           |                     
            //   13f2                 | adc                 esi, edx
            //   33d2                 | xor                 edx, edx

        $sequence_3 = { 13f2 33d2 030d???????? a3???????? }
            // n = 4, score = 1300
            //   13f2                 | adc                 esi, edx
            //   33d2                 | xor                 edx, edx
            //   030d????????         |                     
            //   a3????????           |                     

        $sequence_4 = { 8bc8 a1???????? 56 8bf2 }
            // n = 4, score = 1300
            //   8bc8                 | mov                 ecx, eax
            //   a1????????           |                     
            //   56                   | push                esi
            //   8bf2                 | mov                 esi, edx

        $sequence_5 = { 8935???????? 890d???????? 8bc1 5e c3 55 8bec }
            // n = 7, score = 1300
            //   8935????????         |                     
            //   890d????????         |                     
            //   8bc1                 | mov                 eax, ecx
            //   5e                   | pop                 esi
            //   c3                   | ret                 
            //   55                   | push                ebp
            //   8bec                 | mov                 ebp, esp

        $sequence_6 = { a1???????? 13f2 a3???????? 8935???????? }
            // n = 4, score = 1300
            //   a1????????           |                     
            //   13f2                 | adc                 esi, edx
            //   a3????????           |                     
            //   8935????????         |                     

        $sequence_7 = { 8d85ecfbffff 57 50 e8???????? 83c410 }
            // n = 5, score = 1100
            //   8d85ecfbffff         | lea                 eax, [ebp - 0x414]
            //   57                   | push                edi
            //   50                   | push                eax
            //   e8????????           |                     
            //   83c410               | add                 esp, 0x10

        $sequence_8 = { 33d7 33c1 52 50 e8???????? }
            // n = 5, score = 900
            //   33d7                 | xor                 edx, edi
            //   33c1                 | xor                 eax, ecx
            //   52                   | push                edx
            //   50                   | push                eax
            //   e8????????           |                     

        $sequence_9 = { 6a7b 50 ffd6 8bf8 59 59 }
            // n = 6, score = 800
            //   6a7b                 | push                0x7b
            //   50                   | push                eax
            //   ffd6                 | call                esi
            //   8bf8                 | mov                 edi, eax
            //   59                   | pop                 ecx
            //   59                   | pop                 ecx

        $sequence_10 = { 7409 8bc1 8bd7 e9???????? }
            // n = 4, score = 800
            //   7409                 | je                  0xb
            //   8bc1                 | mov                 eax, ecx
            //   8bd7                 | mov                 edx, edi
            //   e9????????           |                     

        $sequence_11 = { 53 ff15???????? 59 33c0 5e 5b }
            // n = 6, score = 800
            //   53                   | push                ebx
            //   ff15????????         |                     
            //   59                   | pop                 ecx
            //   33c0                 | xor                 eax, eax
            //   5e                   | pop                 esi
            //   5b                   | pop                 ebx

        $sequence_12 = { 6a7d 50 ffd6 59 59 85c0 }
            // n = 6, score = 800
            //   6a7d                 | push                0x7d
            //   50                   | push                eax
            //   ffd6                 | call                esi
            //   59                   | pop                 ecx
            //   59                   | pop                 ecx
            //   85c0                 | test                eax, eax

        $sequence_13 = { 33d2 5e 5f c9 }
            // n = 4, score = 800
            //   33d2                 | xor                 edx, edx
            //   5e                   | pop                 esi
            //   5f                   | pop                 edi
            //   c9                   | leave               

        $sequence_14 = { e9???????? 83caff 8bc2 e9???????? }
            // n = 4, score = 800
            //   e9????????           |                     
            //   83caff               | or                  edx, 0xffffffff
            //   8bc2                 | mov                 eax, edx
            //   e9????????           |                     

    condition:
        7 of them and filesize < 475136
}

Rule Metadata

author
Felix Bilstein - yara-signator at cocacoding dot com
date
2024-10-31
version
1
description
Detects win.necurs.
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.necurs
malpedia_rule_date
20241030
malpedia_hash
26e26953c49c8efafbf72a38076855d578e0a2e4
malpedia_version
20241030
malpedia_license
CC BY-SA 4.0
malpedia_sharing
TLP:WHITE

String Definitions

{"name":"$sequence_0","value":"{ 56 8bf2 ba06e0a636 f7e2 }\n \/\/ n = 4, score = 1300\n \/\/ 56 | push esi\n \/\/ 8bf2 | mov esi, edx\n \/\/ ba06e0a636 | mov edx, 0x36a6e006\n \/\/ f7e2 | mul edx"}
{"name":"$sequence_1","value":"{ f7f6 8bc2 034508 5e 5d c3 }\n \/\/ n = 6, score = 1300\n \/\/ f7f6 | div esi\n \/\/ 8bc2 | mov eax, edx\n \/\/ 034508 | add eax, dword ptr [ebp + 8]\n \/\/ 5e | pop esi\n \/\/ 5d | pop ebp\n \/\/ c3 | ret"}
{"name":"$sequence_2","value":"{ ba06e0a636 f7e2 03c8 a1???????? 13f2 33d2 }\n \/\/ n = 6, score = 1300\n \/\/ ba06e0a636 | mov edx, 0x36a6e006\n \/\/ f7e2 | mul edx\n \/\/ 03c8 | add ecx, eax\n \/\/ a1???????? | \n \/\/ 13f2 | adc esi, edx\n \/\/ 33d2 | xor edx, edx"}
{"name":"$sequence_3","value":"{ 13f2 33d2 030d???????? a3???????? }\n \/\/ n = 4, score = 1300\n \/\/ 13f2 | adc esi, edx\n \/\/ 33d2 | xor edx, edx\n \/\/ 030d???????? | \n \/\/ a3???????? |"}
{"name":"$sequence_4","value":"{ 8bc8 a1???????? 56 8bf2 }\n \/\/ n = 4, score = 1300\n \/\/ 8bc8 | mov ecx, eax\n \/\/ a1???????? | \n \/\/ 56 | push esi\n \/\/ 8bf2 | mov esi, edx"}
{"name":"$sequence_5","value":"{ 8935???????? 890d???????? 8bc1 5e c3 55 8bec }\n \/\/ n = 7, score = 1300\n \/\/ 8935???????? | \n \/\/ 890d???????? | \n \/\/ 8bc1 | mov eax, ecx\n \/\/ 5e | pop esi\n \/\/ c3 | ret \n \/\/ 55 | push ebp\n \/\/ 8bec | mov ebp, esp"}
{"name":"$sequence_6","value":"{ a1???????? 13f2 a3???????? 8935???????? }\n \/\/ n = 4, score = 1300\n \/\/ a1???????? | \n \/\/ 13f2 | adc esi, edx\n \/\/ a3???????? | \n \/\/ 8935???????? |"}
{"name":"$sequence_7","value":"{ 8d85ecfbffff 57 50 e8???????? 83c410 }\n \/\/ n = 5, score = 1100\n \/\/ 8d85ecfbffff | lea eax, [ebp - 0x414]\n \/\/ 57 | push edi\n \/\/ 50 | push eax\n \/\/ e8???????? | \n \/\/ 83c410 | add esp, 0x10"}
{"name":"$sequence_8","value":"{ 33d7 33c1 52 50 e8???????? }\n \/\/ n = 5, score = 900\n \/\/ 33d7 | xor edx, edi\n \/\/ 33c1 | xor eax, ecx\n \/\/ 52 | push edx\n \/\/ 50 | push eax\n \/\/ e8???????? |"}
{"name":"$sequence_9","value":"{ 6a7b 50 ffd6 8bf8 59 59 }\n \/\/ n = 6, score = 800\n \/\/ 6a7b | push 0x7b\n \/\/ 50 | push eax\n \/\/ ffd6 | call esi\n \/\/ 8bf8 | mov edi, eax\n \/\/ 59 | pop ecx\n \/\/ 59 | pop ecx"}
{"name":"$sequence_10","value":"{ 7409 8bc1 8bd7 e9???????? }\n \/\/ n = 4, score = 800\n \/\/ 7409 | je 0xb\n \/\/ 8bc1 | mov eax, ecx\n \/\/ 8bd7 | mov edx, edi\n \/\/ e9???????? |"}
{"name":"$sequence_11","value":"{ 53 ff15???????? 59 33c0 5e 5b }\n \/\/ n = 6, score = 800\n \/\/ 53 | push ebx\n \/\/ ff15???????? | \n \/\/ 59 | pop ecx\n \/\/ 33c0 | xor eax, eax\n \/\/ 5e | pop esi\n \/\/ 5b | pop ebx"}
{"name":"$sequence_12","value":"{ 6a7d 50 ffd6 59 59 85c0 }\n \/\/ n = 6, score = 800\n \/\/ 6a7d | push 0x7d\n \/\/ 50 | push eax\n \/\/ ffd6 | call esi\n \/\/ 59 | pop ecx\n \/\/ 59 | pop ecx\n \/\/ 85c0 | test eax, eax"}
{"name":"$sequence_13","value":"{ 33d2 5e 5f c9 }\n \/\/ n = 4, score = 800\n \/\/ 33d2 | xor edx, edx\n \/\/ 5e | pop esi\n \/\/ 5f | pop edi\n \/\/ c9 | leave"}
{"name":"$sequence_14","value":"{ e9???????? 83caff 8bc2 e9???????? }\n \/\/ n = 4, score = 800\n \/\/ e9???????? | \n \/\/ 83caff | or edx, 0xffffffff\n \/\/ 8bc2 | mov eax, edx\n \/\/ e9???????? |"}

Threat Analysis

This YARA rule is designed to detect general threats.

Severity Level: Medium

The rule uses pattern matching to identify specific byte sequences, strings, or behavioral patterns associated with malicious activity.

Detection Capabilities

  • File-based detection for executables and documents
  • Memory scanning for running processes
  • Network traffic analysis support

Command Line Usage

# Scan a single file
yara win_necurs_auto.yar /path/to/suspicious/file

# Scan a directory recursively
yara -r win_necurs_auto.yar /path/to/directory/

# Scan with metadata output
yara -m win_necurs_auto.yar target_file

# Scan process memory (Linux)
yara win_necurs_auto.yar /proc/[pid]/exe

Integration Examples

Python (yara-python)

import yara
rules = yara.compile(filepath='win_necurs_auto.yar')
matches = rules.match('/path/to/file')

ClamAV Integration

clamscan --yara-rules=win_necurs_auto.yar /path/to/scan

Rule Information

YARA ID
YARA-2024-0179
Created
August 19, 2025
Last Updated
August 19, 2025
Last Imported
Never

Threat Intelligence

Risk Level Medium
Category general
Detection Confidence Analysis Pending
False Positive Rate Not Available
Last Seen in Wild No Data

Export Options