Login via Unusual System User
editLogin via Unusual System User
editThis rule identifies successful logins by system users that are uncommon to authenticate. These users have nologin
set by default, and must be modified to allow SSH access. Adversaries may backdoor these users to gain unauthorized access to the system.
Rule type: eql
Rule indices:
- filebeat-*
- logs-system.auth-*
Severity: medium
Risk score: 47
Runs every: 5m
Searches indices from: now-9m (Date Math format, see also Additional look-back time
)
Maximum alerts per execution: 100
References:
Tags:
- Domain: Endpoint
- OS: Linux
- Use Case: Threat Detection
- Tactic: Persistence
- Tactic: Defense Evasion
- Data Source: System
Version: 1
Rule authors:
- Elastic
Rule license: Elastic License v2
Setup
editSetup
This rule requires data coming in from Filebeat.
Filebeat Setup
Filebeat is a lightweight shipper for forwarding and centralizing log data. Installed as an agent on your servers, Filebeat monitors the log files or locations that you specify, collects log events, and forwards them either to Elasticsearch or Logstash for indexing.
The following steps should be executed in order to add the Filebeat on a Linux System:
- Elastic provides repositories available for APT and YUM-based distributions. Note that we provide binary packages, but no source packages.
- To install the APT and YUM repositories follow the setup instructions in this helper guide.
- To run Filebeat on Docker follow the setup instructions in the helper guide.
- To run Filebeat on Kubernetes follow the setup instructions in the helper guide.
- For quick start information for Filebeat refer to the helper guide.
- For complete “Setup and Run Filebeat” information refer to the helper guide.
Rule Specific Setup Note
- This rule requires the “Filebeat System Module” to be enabled.
- The system module collects and parses logs created by the system logging service of common Unix/Linux based distributions.
- To run the system module of Filebeat on Linux follow the setup instructions in the helper guide.
Rule query
editauthentication where host.os.type == "linux" and event.action in ("ssh_login", "user_login") and user.name in ( "deamon", "bin", "sys", "games", "man", "lp", "mail", "news", "uucp", "proxy", "www-data", "backup", "list", "irc", "gnats", "nobody", "systemd-timesync", "systemd-network", "systemd-resolve", "messagebus", "avahi", "sshd", "dnsmasq" ) and event.outcome == "success"
Framework: MITRE ATT&CKTM
-
Tactic:
- Name: Persistence
- ID: TA0003
- Reference URL: https://attack.mitre.org/tactics/TA0003/
-
Technique:
- Name: Account Manipulation
- ID: T1098
- Reference URL: https://attack.mitre.org/techniques/T1098/
-
Sub-technique:
- Name: SSH Authorized Keys
- ID: T1098.004
- Reference URL: https://attack.mitre.org/techniques/T1098/004/
-
Tactic:
- Name: Defense Evasion
- ID: TA0005
- Reference URL: https://attack.mitre.org/tactics/TA0005/
-
Technique:
- Name: Hide Artifacts
- ID: T1564
- Reference URL: https://attack.mitre.org/techniques/T1564/
-
Sub-technique:
- Name: Hidden Users
- ID: T1564.002
- Reference URL: https://attack.mitre.org/techniques/T1564/002/