Proxy Port Activity to the Internet

This rule detects events that may describe network events of proxy use to the Internet. It includes popular HTTP proxy ports and SOCKS proxy ports. Typically, environments will use an internal IP address for a proxy server. It can also be used to circumvent network controls and detection mechanisms.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/02/18"
 3deprecation_date = "2021/04/15"
 4maturity = "deprecated"
 5updated_date = "2021/04/15"
 6
 7[rule]
 8author = ["Elastic"]
 9description = """
10This rule detects events that may describe network events of proxy use to the Internet. It includes popular HTTP proxy
11ports and SOCKS proxy ports. Typically, environments will use an internal IP address for a proxy server. It can also be
12used to circumvent network controls and detection mechanisms.
13"""
14false_positives = [
15    """
16    Some proxied applications may use these ports but this usually occurs in local traffic using private IPs which this
17    rule does not match. Proxies are widely used as a security technology but in enterprise environments this is usually
18    local traffic which this rule does not match. If desired, internet proxy services using these ports can be added to
19    allowlists. Some screen recording applications may use these ports. Proxy port activity involving an unusual source
20    or destination may be more suspicious. Some cloud environments may use this port when VPNs or direct connects are
21    not in use and cloud instances are accessed across the Internet. Because these ports are in the ephemeral range,
22    this rule may false under certain conditions such as when a NATed web server replies to a client which has used a
23    port in the range by coincidence. In this case, such servers can be excluded if desired.
24    """,
25]
26from = "now-9m"
27index = ["filebeat-*", "packetbeat-*", "logs-endpoint.events.*"]
28language = "kuery"
29license = "Elastic License v2"
30name = "Proxy Port Activity to the Internet"
31risk_score = 47
32rule_id = "ad0e5e75-dd89-4875-8d0a-dfdc1828b5f3"
33severity = "medium"
34tags = ["Elastic", "Host", "Network", "Threat Detection", "Command and Control"]
35timestamp_override = "event.ingested"
36type = "query"
37
38query = '''
39event.category:(network or network_traffic) and network.transport:tcp and (destination.port:(1080 or 3128 or 8080) or event.dataset:zeek.socks) and
40  source.ip:(
41    10.0.0.0/8 or
42    172.16.0.0/12 or
43    192.168.0.0/16
44  ) 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.168.0.0/16 or
51    224.0.0.0/4 or
52    "::1" or
53    "FE80::/10" or
54    "FF00::/8"
55  )
56'''
57
58
59[[rule.threat]]
60framework = "MITRE ATT&CK"
61
62[rule.threat.tactic]
63id = "TA0011"
64name = "Command and Control"
65reference = "https://attack.mitre.org/tactics/TA0011/"

Related rules

to-top