libgcc_backdoor

YARA-2025-0896 High general Active
No description available for this rule
libgcc_backdoor.yar Valid Syntax

rule libgcc_backdoor {
    strings:
        // Decode:
        // >>> def sar(value, n):
        //     return  value >> n if (value & 0x80000000) == 0 else (value >> n) | (0xFFFFFFFF << (32-n))
        // >>> def decode(s):
        //     key = 'BB2FA36AAA9541F0'
        //     result = ''
        //     for i in xrange(len(s)):
        //         ecx = i
        //         eax = ecx
        //         eax = sar(eax, 0x1F)
        //         eax &= 0xFFFFFFFF
        //         eax >>= 0x1C
        //         edx = ecx+eax
        //         edx &= 0x0F
        //         edx -= eax
        //         eax = ord(key[edx])
        //         result += chr(ord(s[i]) ^ eax)
        //     return result

        // File EAF2CF628D1DBC78B97BAFD7A9F4BEE4
        $decode_fn = { 89C8C1F81FC1E81C8D140183E20F29C20FB682????????30041983C10139F175DF }
        $decryption_key = "BB2FA36AAA9541F0"
        $function1 = "exec_packet"
        $function2 = "build_udphdr"
        $function3 = "build_tcphdr"
        $function4 = "http_download_mem"
        $function5 = "daemon_get_kill_process"


    condition:
        IsElfFile and ($decode_fn or $decryption_key or all of ($function*))
}

String Definitions

{"name":"$decode_fn","value":"{ 89C8C1F81FC1E81C8D140183E20F29C20FB682????????30041983C10139F175DF }"}
{"name":"$decryption_key","value":"\"BB2FA36AAA9541F0\""}
{"name":"$function1","value":"\"exec_packet\""}
{"name":"$function2","value":"\"build_udphdr\""}
{"name":"$function3","value":"\"build_tcphdr\""}
{"name":"$function4","value":"\"http_download_mem\""}
{"name":"$function5","value":"\"daemon_get_kill_process\""}

Threat Analysis

This YARA rule is designed to detect general threats.

Severity Level: High

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 libgcc_backdoor.yar /path/to/suspicious/file

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

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

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

Integration Examples

Python (yara-python)

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

ClamAV Integration

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

Rule Information

YARA ID
YARA-2025-0896
Author
Unknown
Created
August 19, 2025
Last Updated
August 19, 2025
Last Imported
Never

Threat Intelligence

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

Export Options