Base16 or Base32 Encoding/Decoding Activity

Adversaries may encode/decode data in an attempt to evade detection by host- or network-based security controls.

Elastic rule (View on GitHub)

 1[metadata]
 2creation_date = "2020/04/17"
 3integration = ["endpoint", "auditd_manager"]
 4maturity = "production"
 5updated_date = "2024/05/21"
 6
 7[rule]
 8author = ["Elastic"]
 9description = "Adversaries may encode/decode data in an attempt to evade detection by host- or network-based security controls."
10false_positives = [
11    """
12    Automated tools such as Jenkins may encode or decode files as part of their normal behavior. These events can be
13    filtered by the process executable or username values.
14    """,
15]
16from = "now-9m"
17index = ["logs-endpoint.events.*", "endgame-*", "auditbeat-*", "logs-auditd_manager.auditd-*"]
18language = "eql"
19license = "Elastic License v2"
20name = "Base16 or Base32 Encoding/Decoding Activity"
21risk_score = 21
22rule_id = "debff20a-46bc-4a4d-bae5-5cdd14222795"
23setup = """## Setup
24
25This rule requires data coming in from one of the following integrations:
26- Elastic Defend
27- Auditbeat
28
29### Elastic Defend Integration Setup
30Elastic Defend is integrated into the Elastic Agent using Fleet. Upon configuration, the integration allows the Elastic Agent to monitor events on your host and send data to the Elastic Security app.
31
32#### Prerequisite Requirements:
33- Fleet is required for Elastic Defend.
34- To configure Fleet Server refer to the [documentation](https://www.elastic.co/guide/en/fleet/current/fleet-server.html).
35
36#### The following steps should be executed in order to add the Elastic Defend integration on a Linux System:
37- Go to the Kibana home page and click "Add integrations".
38- In the query bar, search for "Elastic Defend" and select the integration to see more details about it.
39- Click "Add Elastic Defend".
40- Configure the integration name and optionally add a description.
41- Select the type of environment you want to protect, either "Traditional Endpoints" or "Cloud Workloads".
42- Select a configuration preset. Each preset comes with different default settings for Elastic Agent, you can further customize these later by configuring the Elastic Defend integration policy. [Helper guide](https://www.elastic.co/guide/en/security/current/configure-endpoint-integration-policy.html).
43- We suggest selecting "Complete EDR (Endpoint Detection and Response)" as a configuration setting, that provides "All events; all preventions"
44- Enter a name for the agent policy in "New agent policy name". If other agent policies already exist, you can click the "Existing hosts" tab and select an existing policy instead.
45For more details on Elastic Agent configuration settings, refer to the [helper guide](https://www.elastic.co/guide/en/fleet/8.10/agent-policy.html).
46- Click "Save and Continue".
47- To complete the integration, select "Add Elastic Agent to your hosts" and continue to the next section to install the Elastic Agent on your hosts.
48For more details on Elastic Defend refer to the [helper guide](https://www.elastic.co/guide/en/security/current/install-endpoint.html).
49
50### Auditbeat Setup
51Auditbeat is a lightweight shipper that you can install on your servers to audit the activities of users and processes on your systems. For example, you can use Auditbeat to collect and centralize audit events from the Linux Audit Framework. You can also use Auditbeat to detect changes to critical files, like binaries and configuration files, and identify potential security policy violations.
52
53#### The following steps should be executed in order to add the Auditbeat on a Linux System:
54- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
55- To install the APT and YUM repositories follow the setup instructions in this [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setup-repositories.html).
56- To run Auditbeat on Docker follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-docker.html).
57- To run Auditbeat on Kubernetes follow the setup instructions in the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/running-on-kubernetes.html).
58- For complete “Setup and Run Auditbeat” information refer to the [helper guide](https://www.elastic.co/guide/en/beats/auditbeat/current/setting-up-and-running.html).
59"""
60severity = "low"
61tags = [
62    "Domain: Endpoint",
63    "OS: Linux",
64    "Use Case: Threat Detection",
65    "Tactic: Defense Evasion",
66    "Data Source: Elastic Endgame",
67    "Data Source: Elastic Defend",
68    "Data Source: Auditd Manager",
69]
70timestamp_override = "event.ingested"
71type = "eql"
72
73query = '''
74process where host.os.type == "linux" and event.type == "start" and event.action in ("exec", "exec_event", "executed", "process_started")
75 and process.name in ("base16", "base32", "base32plain", "base32hex") and
76not process.args in ("--help", "--version")
77'''
78
79
80[[rule.threat]]
81framework = "MITRE ATT&CK"
82[[rule.threat.technique]]
83id = "T1027"
84name = "Obfuscated Files or Information"
85reference = "https://attack.mitre.org/techniques/T1027/"
86
87[[rule.threat.technique]]
88id = "T1140"
89name = "Deobfuscate/Decode Files or Information"
90reference = "https://attack.mitre.org/techniques/T1140/"
91
92
93[rule.threat.tactic]
94id = "TA0005"
95name = "Defense Evasion"
96reference = "https://attack.mitre.org/tactics/TA0005/"

Related rules

to-top