custom_ssh_backdoor_server

YARA-2015-0031 High general Active

Custome SSH backdoor based on python and paramiko - file server.py

custom_ssh_backdoor_server.yar Valid Syntax
/*
    This Yara ruleset is under the GNU-GPLv2 license (http://www.gnu.org/licenses/gpl-2.0.html) and open to any user or organization, as    long as you use it under this license.

*/

rule custom_ssh_backdoor_server
{

    meta:
        description = "Custome SSH backdoor based on python and paramiko - file server.py"
        author = "Florian Roth"
        reference = "https://goo.gl/S46L3o"
        date = "2015-05-14"
        hash = "0953b6c2181249b94282ca5736471f85d80d41c9"

    strings:
        $s0 = "command= raw_input(\"Enter command: \").strip('n')" fullword ascii
        $s1 = "print '[-] (Failed to load moduli -- gex will be unsupported.)'" fullword ascii
        $s2 = "print '[-] Listen/bind/accept failed: ' + str(e)" fullword ascii
        $s3 = "chan.send(command)" fullword ascii
        $s4 = "print '[-] SSH negotiation failed.'" fullword ascii
        $s5 = "except paramiko.SSHException, x:" fullword ascii

    condition:
        filesize < 10KB and 5 of them
}

Rule Metadata

description
Custome SSH backdoor based on python and paramiko - file server.py
author
Florian Roth
reference
https://goo.gl/S46L3o
date
2015-05-14
hash
0953b6c2181249b94282ca5736471f85d80d41c9

String Definitions

{"name":"$s0","value":"\"command= raw_input(\\\"Enter command: \\\").strip('n')\" fullword ascii"}
{"name":"$s1","value":"\"print '[-] (Failed to load moduli -- gex will be unsupported.)'\" fullword ascii"}
{"name":"$s2","value":"\"print '[-] Listen\/bind\/accept failed: ' + str(e)\" fullword ascii"}
{"name":"$s3","value":"\"chan.send(command)\" fullword ascii"}
{"name":"$s4","value":"\"print '[-] SSH negotiation failed.'\" fullword ascii"}
{"name":"$s5","value":"\"except paramiko.SSHException, x:\" fullword ascii"}

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

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

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

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

Integration Examples

Python (yara-python)

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

ClamAV Integration

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

Rule Information

YARA ID
YARA-2015-0031
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