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.

4.4 KB
Raw Blame
id: aisoc-fim-credentials
name: AiSOC File Integrity — Cloud & Container Credentials
version: 1.0.0
platforms: [linux, darwin]
description: |
  Monitors cloud provider credentials, Kubernetes configs, Docker configs, and
  other sensitive credential files for unauthorized access or modification.
  Aligns with MITRE ATT&CK T1552 (Unsecured Credentials) and sub-techniques.

queries:
  aws_credentials:
    sql: >
      SELECT target_path, action, transaction_id, time, inode, uid, gid,
             md5, sha256, atime, mtime, ctime
      FROM file_events
      WHERE target_path LIKE '%/.aws/credentials'
        OR target_path LIKE '%/.aws/config'
    interval: 60
    severity: high
    description: Detect access/modification of AWS credential files
    mitre: [T1552.001, T1078.004]
    references:
      - https://attack.mitre.org/techniques/T1552/001/

  kube_config:
    sql: >
      SELECT target_path, action, transaction_id, time, inode, uid, gid,
             md5, sha256, atime, mtime, ctime
      FROM file_events
      WHERE target_path LIKE '%/.kube/config'
        OR target_path LIKE '/etc/kubernetes/%%'
        OR target_path LIKE '/root/.kube/%%'
    interval: 60
    severity: high
    description: Detect access/modification of Kubernetes configuration files
    mitre: [T1552.007]
    references:
      - https://attack.mitre.org/techniques/T1552/007/

  docker_config:
    sql: >
      SELECT target_path, action, transaction_id, time, inode, uid, gid,
             md5, sha256, atime, mtime, ctime
      FROM file_events
      WHERE target_path LIKE '%/.docker/config.json'
    interval: 60
    severity: high
    description: Detect access/modification of Docker registry credentials
    mitre: [T1552.001]
    references:
      - https://attack.mitre.org/techniques/T1552/001/

  gcloud_credentials:
    sql: >
      SELECT target_path, action, transaction_id, time, inode, uid, gid,
             md5, sha256, atime, mtime, ctime
      FROM file_events
      WHERE target_path LIKE '%/.config/gcloud/credentials.db'
        OR target_path LIKE '%/.config/gcloud/application_default_credentials.json'
    interval: 60
    severity: high
    description: Detect access/modification of GCP credential files
    mitre: [T1552.001]
    references:
      - https://attack.mitre.org/techniques/T1552/001/

  azure_credentials:
    sql: >
      SELECT target_path, action, transaction_id, time, inode, uid, gid,
             md5, sha256, atime, mtime, ctime
      FROM file_events
      WHERE target_path LIKE '%/.azure/credentials'
        OR target_path LIKE '%/.azure/accessTokens.json'
    interval: 60
    severity: high
    description: Detect access/modification of Azure credential files
    mitre: [T1552.001]
    references:
      - https://attack.mitre.org/techniques/T1552/001/

  ssh_private_keys:
    sql: >
      SELECT target_path, action, transaction_id, time, inode, uid, gid,
             md5, sha256, atime, mtime, ctime
      FROM file_events
      WHERE target_path LIKE '%/.ssh/id_rsa'
        OR target_path LIKE '%/.ssh/id_ecdsa'
        OR target_path LIKE '%/.ssh/id_ed25519'
    interval: 60
    severity: high
    description: Detect access/modification of SSH private key files
    mitre: [T1552.004]
    references:
      - https://attack.mitre.org/techniques/T1552/004/

  git_credentials:
    sql: >
      SELECT target_path, action, transaction_id, time, inode, uid, gid,
             md5, sha256, atime, mtime, ctime
      FROM file_events
      WHERE target_path LIKE '%/.git-credentials'
        OR target_path LIKE '%/.netrc'
    interval: 120
    severity: medium
    description: Detect access/modification of Git or netrc credentials
    mitre: [T1552.001]
    references:
      - https://attack.mitre.org/techniques/T1552/001/

file_paths:
  cloud_credentials:
    - /root/.aws/%%
    - /home/%%/.aws/%%
    - /root/.config/gcloud/%%
    - /home/%%/.config/gcloud/%%
    - /root/.azure/%%
    - /home/%%/.azure/%%
  k8s_credentials:
    - /root/.kube/%%
    - /home/%%/.kube/%%
    - /etc/kubernetes/%%
  container_credentials:
    - /root/.docker/config.json
    - /home/%%/.docker/config.json
  ssh_private:
    - /root/.ssh/id_rsa
    - /root/.ssh/id_ecdsa
    - /root/.ssh/id_ed25519
    - /home/%%/.ssh/id_rsa
    - /home/%%/.ssh/id_ecdsa
    - /home/%%/.ssh/id_ed25519
  misc_creds:
    - /root/.git-credentials
    - /root/.netrc
    - /home/%%/.git-credentials
    - /home/%%/.netrc