Roshal Archive (RAR) or PowerShell File Downloaded from the Internet

Detects a Roshal Archive (RAR) file or PowerShell script downloaded from the internet by an internal host. Gaining initial access to a system and then downloading encoded or encrypted tools to move laterally is a common practice for adversaries as a way to protect their more valuable tools and tactics, techniques, and procedures (TTPs). This may be atypical behavior for a managed network and can be indicative of malware, exfiltration, or command and control.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/07/02"
 3integration = ["network_traffic"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10Detects a Roshal Archive (RAR) file or PowerShell script downloaded from the internet by an internal host. Gaining
11initial access to a system and then downloading encoded or encrypted tools to move laterally is a common practice for
12adversaries as a way to protect their more valuable tools and tactics, techniques, and procedures (TTPs). This may be
13atypical behavior for a managed network and can be indicative of malware, exfiltration, or command and control.
14"""
15false_positives = [
16    """
17    Downloading RAR or PowerShell files from the Internet may be expected for certain systems. This rule should be
18    tailored to either exclude systems as sources or destinations in which this behavior is expected.
19    """,
20]
21from = "now-9m"
22index = ["packetbeat-*", "auditbeat-*", "filebeat-*", "logs-network_traffic.*"]
23language = "kuery"
24license = "Elastic License v2"
25name = "Roshal Archive (RAR) or PowerShell File Downloaded from the Internet"
26note = """## Threat intel
27
28This activity has been observed in FIN7 campaigns."""
29references = [
30    "https://www.fireeye.com/blog/threat-research/2017/04/fin7-phishing-lnk.html",
31    "https://www.justice.gov/opa/press-release/file/1084361/download",
32    "https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml",
33]
34risk_score = 47
35rule_id = "ff013cb4-274d-434a-96bb-fe15ddd3ae92"
36severity = "medium"
37tags = ["Use Case: Threat Detection", "Tactic: Command and Control", "Domain: Endpoint"]
38timestamp_override = "event.ingested"
39type = "query"
40
41query = '''
42(event.dataset: (network_traffic.http or network_traffic.tls) or
43  (event.category: (network or network_traffic) and network.protocol: http)) and
44  (url.extension:(ps1 or rar) or url.path:(*.ps1 or *.rar)) and
45    not destination.ip:(
46      10.0.0.0/8 or
47      127.0.0.0/8 or
48      169.254.0.0/16 or
49      172.16.0.0/12 or
50      192.0.0.0/24 or
51      192.0.0.0/29 or
52      192.0.0.8/32 or
53      192.0.0.9/32 or
54      192.0.0.10/32 or
55      192.0.0.170/32 or
56      192.0.0.171/32 or
57      192.0.2.0/24 or
58      192.31.196.0/24 or
59      192.52.193.0/24 or
60      192.168.0.0/16 or
61      192.88.99.0/24 or
62      224.0.0.0/4 or
63      100.64.0.0/10 or
64      192.175.48.0/24 or
65      198.18.0.0/15 or
66      198.51.100.0/24 or
67      203.0.113.0/24 or
68      240.0.0.0/4 or
69      "::1" or
70      "FE80::/10" or
71      "FF00::/8"
72    ) and
73    source.ip:(
74      10.0.0.0/8 or
75      172.16.0.0/12 or
76      192.168.0.0/16
77    )
78'''
79
80
81[[rule.threat]]
82framework = "MITRE ATT&CK"
83[[rule.threat.technique]]
84id = "T1105"
85name = "Ingress Tool Transfer"
86reference = "https://attack.mitre.org/techniques/T1105/"
87
88
89[rule.threat.tactic]
90id = "TA0011"
91name = "Command and Control"
92reference = "https://attack.mitre.org/tactics/TA0011/"

Threat intel

This activity has been observed in FIN7 campaigns.

References

Related rules

to-top