tuckner / detection-rules

Rules for Elastic Security's detection engine

Home Page:https://www.elastic.co/guide/en/security/current/detection-engine-overview.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Alert] Whoami Process Activity Custom Tines Webinar

tuckner opened this issue · comments

Host FVFDXJGEQ6L4
User root
Severity low

Response Actions:
Isolate Host

Raw Detection:

{
  "rule": {
    "category": "Event Correlation Rule",
    "consumer": "siem",
    "execution": {
      "uuid": "965b9a20-f779-42d2-aaff-c1d323c78772"
    },
    "name": "Whoami Process Activity Custom Tines Webinar",
    "producer": "siem",
    "rule_type_id": "siem.eqlRule",
    "uuid": "6cfa67e0-3527-11ed-ae27-d5d2a8d1690a",
    "tags": [
      "Elastic",
      "Host",
      "Windows",
      "Threat Detection",
      "Discovery"
    ],
    "parameters": {
      "description": "Identifies use of whoami.exe which displays user information\n",
      "risk_score": 21,
      "severity": "low",
      "note": "## Triage and analysis\n\n### Investigating Whoami Process Activity\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps.\nThis can happen by running commands to enumerate network resources, users, connections, files, and installed security\nsoftware.\n\nThis rule looks for the execution of the `whoami` utility. Attackers commonly use this utility to measure their current\nprivileges, discover the current user, determine if a privilege escalation was successful, etc.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files\nfor prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate abnormal behaviors observed using the account, such as commands executed, files created or modified, and\nnetwork connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify\nsuspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- Account Discovery Command via SYSTEM Account - 2856446a-34e6-435b-9fb5-f8f040bfa7ed\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are\nidentified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business\nsystems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and\nmalware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the\nmean time to respond (MTTR).\n\n## Config\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.\n",
      "license": "Elastic License v2",
      "meta": {
        "from": "3m",
        "kibana_siem_app_url": "https://teamtines.kb.europe-west2.gcp.elastic-cloud.com:9243/app/security"
      },
      "timestamp_override": "event.ingested",
      "author": [
        "Elastic"
      ],
      "false_positives": [
        "    Some normal use of this pro"
      ],
      "from": "now-540s",
      "rule_id": "ef862985-3f13-4262-a686-5f357bbb9bc4",
      "max_signals": 100,
      "risk_score_mapping": [],
      "severity_mapping": [],
      "threat": [
        {
          "framework": "MITRE ATT&CK",
          "tactic": {
            "reference": "https://attack.mitre.org/tactics/TA0007/",
            "name": "Discovery",
            "id": "TA0007"
          },
          "technique": [
            {
              "reference": "https://attack.mitre.org/techniques/T1033/",
              "name": "System Owner/User Discovery",
              "id": "T1033",
              "subtechnique": []
            }
          ]
        }
      ],
      "to": "now",
      "references": [],
      "version": 2,
      "exceptions_list": [],
      "immutable": false,
      "related_integrations": [],
      "required_fields": [],
      "setup": "",
      "type": "eql",
      "language": "eql",
      "index": [
        "winlogbeat-*",
        "logs-endpoint.events.*",
        "logs-windows.*",
        "logs-system.*"
      ],
      "query": "process where event.type in (\"start\", \"process_started\") and process.name : \"whoami\"\n",
      "filters": []
    },
    "actions": [
      {
        "group": "default",
        "id": "4f074300-33d5-11ed-ae27-d5d2a8d1690a",
        "params": {
          "body": "[{{#context.alerts}}{{{.}}},{{/context.alerts}}null]"
        },
        "action_type_id": ".webhook"
      }
    ],
    "author": [
      "Elastic"
    ],
    "created_at": "2022-09-15T18:51:37.188Z",
    "created_by": "elastic",
    "description": "Identifies use of whoami.exe which displays user information\n",
    "enabled": true,
    "exceptions_list": [],
    "false_positives": [
      "    Some normal use of this pro"
    ],
    "from": "now-540s",
    "immutable": false,
    "interval": "6m",
    "indices": [
      "winlogbeat-*",
      "logs-endpoint.events.*",
      "logs-windows.*",
      "logs-system.*"
    ],
    "license": "Elastic License v2",
    "max_signals": 100,
    "note": "## Triage and analysis\n\n### Investigating Whoami Process Activity\n\nAfter successfully compromising an environment, attackers may try to gain situational awareness to plan their next steps.\nThis can happen by running commands to enumerate network resources, users, connections, files, and installed security\nsoftware.\n\nThis rule looks for the execution of the `whoami` utility. Attackers commonly use this utility to measure their current\nprivileges, discover the current user, determine if a privilege escalation was successful, etc.\n\n#### Possible investigation steps\n\n- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files\nfor prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.\n- Identify the user account that performed the action and whether it should perform this kind of action.\n- Investigate other alerts associated with the user/host during the past 48 hours.\n- Investigate abnormal behaviors observed using the account, such as commands executed, files created or modified, and\nnetwork connections.\n\n### False positive analysis\n\n- Discovery activities are not inherently malicious if they occur in isolation. As long as the analyst did not identify\nsuspicious activity related to the user or host, such alerts can be dismissed.\n\n### Related rules\n\n- Account Discovery Command via SYSTEM Account - 2856446a-34e6-435b-9fb5-f8f040bfa7ed\n\n### Response and remediation\n\n- Initiate the incident response process based on the outcome of the triage.\n- Isolate the involved hosts to prevent further post-compromise behavior.\n- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are\nidentified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business\nsystems, and web services.\n- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and\nmalware components.\n- Determine the initial vector abused by the attacker and take action to prevent reinfection via the same vector.\n- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the\nmean time to respond (MTTR).\n\n## Config\n\nIf enabling an EQL rule on a non-elastic-agent index (such as beats) for versions <8.2, events will not define `event.ingested` and default fallback for EQL rules was not added until 8.2, so you will need to add a custom pipeline to populate `event.ingested` to @timestamp for this rule to work.\n",
    "references": [],
    "risk_score_mapping": [],
    "rule_id": "ef862985-3f13-4262-a686-5f357bbb9bc4",
    "severity_mapping": [],
    "threat": [
      {
        "framework": "MITRE ATT&CK",
        "tactic": {
          "reference": "https://attack.mitre.org/tactics/TA0007/",
          "name": "Discovery",
          "id": "TA0007"
        },
        "technique": [
          {
            "reference": "https://attack.mitre.org/techniques/T1033/",
            "name": "System Owner/User Discovery",
            "id": "T1033",
            "subtechnique": []
          }
        ]
      }
    ],
    "timestamp_override": "event.ingested",
    "to": "now",
    "type": "eql",
    "updated_at": "2022-09-15T19:06:49.566Z",
    "updated_by": "elastic",
    "version": 2,
    "meta": {
      "from": "3m",
      "kibana_siem_app_url": "https://teamtines.kb.europe-west2.gcp.elastic-cloud.com:9243/app/security"
    },
    "risk_score": 21,
    "severity": "low"
  },
  "original_time": "2023-01-31T16:02:21.108Z",
  "ancestors": [
    {
      "id": "J2mRCIYB6b2I_znkQJtU",
      "type": "event",
      "index": ".ds-logs-endpoint.events.process-default-2023.01.10-000015",
      "depth": 0
    }
  ],
  "status": "active",
  "workflow_status": "open",
  "depth": 1,
  "reason": "process event with process whoami, parent process bash, by root on FVFDXJGEQ6L4 created low alert Whoami Process Activity Custom Tines Webinar.",
  "severity": "low",
  "risk_score": 21,
  "original_event": {
    "agent_id_status": "verified",
    "sequence": 63695160,
    "ingested": "2023-01-31T16:03:02Z",
    "created": "2023-01-31T16:02:21.108848Z",
    "kind": "event",
    "module": "endpoint",
    "action": "exec",
    "id": "MrCdyFu81zAHQkRX+++4/52z",
    "category": [
      "process"
    ],
    "type": [
      "start"
    ],
    "dataset": "endpoint.events.process"
  },
  "uuid": "eca3286753aa9477bffb8d5cfa6ba7eba5017a2d09264ec8f9a4bd38a1eb8142"
}

Link to Kibana