Elastic low stable eql

Git Repository or File Download to Suspicious Directory

This rule detects the use of git to clone a repository or download files from GitHub using wget or curl, followed by the creation of files in suspicious directories such as /tmp, /var/tmp, or /dev/shm. This behavior may indicate an attempt to download a payload, exploit or tool.

View Source

Detection Logic

sequence by process.entity_id, host.id with maxspan=10s
  [process where host.os.type == "linux" and event.type == "start" and event.action == "exec" and (
     (process.name == "git" and process.args == "clone") or
     (process.name in ("wget", "curl") and process.command_line like~ "*github*")
  ) and not (
    process.parent.name in ("git", "cmake") or
     process.parent.args like "/root/.ansible/tmp/ansible*"
  )]
  [file where host.os.type == "linux" and event.type == "creation" and file.path like ("/tmp/*", "/var/tmp/*", "/dev/shm/*")]

Field Validations

Loading…

Comments (0)

Loading comments...