APT_Backdoor_Win_GORAT_2

YARA-2025-0943 High general Active
No description available for this rule
APT_Backdoor_Win_GORAT_2.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
rule APT_Backdoor_Win_GORAT_2
{
    meta:
        description = "Verifies that the sample is a Windows PE that is less than 10MB in size and has the Go build ID strings. Then checks for various strings known to be in the Gorat implant including strings used in C2 json, names of methods, and the unique string 'murica' used in C2 comms. A check is done to ensure the string 'rat' appears in the binary over 1000 times as it is the name of the project used by the implant and is present well over 2000 times."
        md5 = "f59095f0ab15f26a1ead7eed8cdb4902"
        rev = 7
        author = "FireEye"
    strings:
        $go1 = "go.buildid" ascii wide
        $go2 = "Go build ID:" ascii wide
        $json1 = "json:\"pid\"" ascii wide
        $json2 = "json:\"key\"" ascii wide
        $json3 = "json:\"agent_time\"" ascii wide
        $json4 = "json:\"rid\"" ascii wide
        $json5 = "json:\"ports\"" ascii wide
        $json6 = "json:\"agent_platform\"" ascii wide
        $rat = "rat" ascii wide
        $str1 = "handleCommand" ascii wide
        $str2 = "sendBeacon" ascii wide
        $str3 = "rat.AgentVersion" ascii wide
        $str4 = "rat.Core" ascii wide
        $str5 = "rat/log" ascii wide
        $str6 = "rat/comms" ascii wide
        $str7 = "rat/modules" ascii wide
        $str8 = "murica" ascii wide
        $str9 = "master secret" ascii wide
        $str10 = "TaskID" ascii wide
        $str11 = "rat.New" ascii wide
    condition:
        uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and filesize < 10MB and all of ($go*) and all of ($json*) and all of ($str*) and #rat > 1000
}

String Definitions

{"name":"$go1","value":"\"go.buildid\" ascii wide"}
{"name":"$go2","value":"\"Go build ID:\" ascii wide"}
{"name":"$json1","value":"\"json:\\\"pid\\\"\" ascii wide"}
{"name":"$json2","value":"\"json:\\\"key\\\"\" ascii wide"}
{"name":"$json3","value":"\"json:\\\"agent_time\\\"\" ascii wide"}
{"name":"$json4","value":"\"json:\\\"rid\\\"\" ascii wide"}
{"name":"$json5","value":"\"json:\\\"ports\\\"\" ascii wide"}
{"name":"$json6","value":"\"json:\\\"agent_platform\\\"\" ascii wide"}
{"name":"$rat","value":"\"rat\" ascii wide"}
{"name":"$str1","value":"\"handleCommand\" ascii wide"}
{"name":"$str2","value":"\"sendBeacon\" ascii wide"}
{"name":"$str3","value":"\"rat.AgentVersion\" ascii wide"}
{"name":"$str4","value":"\"rat.Core\" ascii wide"}
{"name":"$str5","value":"\"rat\/log\" ascii wide"}
{"name":"$str6","value":"\"rat\/comms\" ascii wide"}
{"name":"$str7","value":"\"rat\/modules\" ascii wide"}
{"name":"$str8","value":"\"murica\" ascii wide"}
{"name":"$str9","value":"\"master secret\" ascii wide"}
{"name":"$str10","value":"\"TaskID\" ascii wide"}
{"name":"$str11","value":"\"rat.New\" ascii wide"}

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

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

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

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

Integration Examples

Python (yara-python)

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

ClamAV Integration

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

Rule Information

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