Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

3.4 KB
Raw Blame
id: splunk-security-content-66f737c6-3f7f-46ed-8e9b-cc0e5bf01f04
name: Linux Auditd Unix Shell Configuration Modification
description: 'The following analytic detects suspicious access or modifications to
  Unix shell configuration files, which may indicate an attempt to alter system behavior
  or gain unauthorized access.

  Unix shell configuration files, such as `.bashrc` or `.profile`, control user environment
  settings and command execution.

  Unauthorized changes to these files can be used to execute malicious commands, escalate
  privileges, or hide malicious activities.

  By monitoring for unusual or unauthorized modifications to shell configuration files,
  this analytic helps identify potential security threats, allowing security teams
  to respond quickly and mitigate risks.

  Correlate this with related EXECVE or PROCTITLE events to identify the process or
  user responsible for the access or modification.'
severity: medium
enabled: false
tags:
  mitre:
  - T1546.004
  categories:
  - endpoint
references:
- https://www.splunk.com/en_us/blog/security/deep-dive-on-persistence-privilege-escalation-technique-and-detection-in-linux-platform.html
- https://github.com/peass-ng/PEASS-ng/tree/master/linPEAS
logsource:
  product: splunk
detection:
  splunk_spl: "`linux_auditd`\n(type=PATH OR type=CWD)\n| rex \"msg=audit\\([^)]*:(?<audit_id>\\\
    d+)\\)\"\n\n| stats\n  values(type) as types\n  values(name) as names\n  values(nametype)\
    \ as nametype\n  values(cwd) as cwd_list\n  values(_time) as event_times\n  by\
    \ audit_id, host\n\n| eval current_working_directory = coalesce(mvindex(cwd_list,\
    \ 0), \"N/A\")\n| eval candidate_paths = mvmap(names, if(match(names, \"^/\"),\
    \ names, current_working_directory + \"/\" + names))\n| eval matched_paths = mvfilter(match(candidate_paths,\
    \ \"/etc/profile|/etc/shells|/etc/profile\\\\.d/.*|/etc/bash\\\\.bashrc.*|/etc/bashrc|.*/zsh/zprofile|.*/zsh/zshrc|.*/zsh/zlogin|.*/zsh/zlogout|/etc/csh\\\
    \\.cshrc.*|/etc/csh\\\\.login.*|/root/\\\\.bashrc.*|/root/\\\\.bash_profile.*|/root/\\\
    \\.profile.*|/root/\\\\.zshrc.*|/root/\\\\.zprofile.*|/home/.*/\\\\.bashrc.*|/home/.*/\\\
    \\.zshrc.*|/home/.*/\\\\.bash_profile.*|/home/.*/\\\\.zprofile.*|/home/.*/\\\\\
    .profile.*|/home/.*/\\\\.bash_login.*|/home/.*/\\\\.bash_logout.*|/home/.*/\\\\\
    .zlogin.*|/home/.*/\\\\.zlogout.*\"))\n| eval match_count = mvcount(matched_paths)\n\
    | eval reconstructed_path = mvindex(matched_paths, 0)\n| eval e_time = mvindex(event_times,\
    \ 0)\n| where match_count > 0\n| rename host as dest\n\n| stats count min(e_time)\
    \ as firstTime max(e_time) as lastTime\n  values(nametype) as nametype\n  by current_working_directory\n\
    \     reconstructed_path\n     match_count\n     dest\n     audit_id\n\n| `security_content_ctime(firstTime)`\n\
    | `security_content_ctime(lastTime)`\n| `linux_auditd_unix_shell_configuration_modification_filter`"
provenance:
  source: splunk/security_content
  source_id: 66f737c6-3f7f-46ed-8e9b-cc0e5bf01f04
  source_commit: 4d4c7ee
  license: Apache-2.0
  license_url: https://github.com/splunk/security_content/blob/develop/LICENSE
  imported_at: '2026-05-04'
  imported_by: splunk_importer
  upstream_path: detections/endpoint/linux_auditd_unix_shell_configuration_modification.yml
notes:
  splunk_status: production
  splunk_data_source: []
  quarantine_reason: raw SPL — needs translation to AiSOC detection schema