APT_Backdoor_Win_GORAT_4

YARA-2025-1007 High general Active
No description available for this rule
APT_Backdoor_Win_GORAT_4.yar Valid Syntax
// Copyright 2020 by FireEye, Inc.
// You may not use this file except in compliance with the license. The license should have been received with this file. You may obtain a copy of the license at:
// https://github.com/fireeye/red_team_tool_countermeasures/blob/master/LICENSE.txt
import "pe"
rule APT_Backdoor_Win_GORAT_4
{
    meta:
        description = "Verifies that the sample is a Windows PE that is less than 10MB in size and exports numerous functions that are known to be exported by the Gorat implant. This is done in an effort to provide detection for packed samples that may not have other strings but will need to replicate exports to maintain functionality."
        md5 = "f59095f0ab15f26a1ead7eed8cdb4902"
        rev = 8
        author = "FireEye"
    strings:
        $mz = "MZ"
    condition:
        $mz at 0 and uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and filesize < 10MB and pe.exports("MemoryCallEntryPoint") and pe.exports("MemoryDefaultAlloc") and pe.exports("MemoryDefaultFree") and pe.exports("MemoryDefaultFreeLibrary") and pe.exports("MemoryDefaultGetProcAddress") and pe.exports("MemoryDefaultLoadLibrary") and pe.exports("MemoryFindResource") and pe.exports("MemoryFindResourceEx") and pe.exports("MemoryFreeLibrary") and pe.exports("MemoryGetProcAddress") and pe.exports("MemoryLoadLibrary") and pe.exports("MemoryLoadLibraryEx") and pe.exports("MemoryLoadResource") and pe.exports("MemoryLoadString") and pe.exports("MemoryLoadStringEx") and pe.exports("MemorySizeofResource") and pe.exports("callback") and pe.exports("crosscall2") and pe.exports("crosscall_386")
}

String Definitions

{"name":"$mz","value":"\"MZ\""}

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

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

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

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

Integration Examples

Python (yara-python)

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

ClamAV Integration

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

Rule Information

YARA ID
YARA-2025-1007
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