Elastic medium stable eql

ROT Encoded Python Script Execution

Identifies the execution of a Python script that uses the ROT cipher for letters substitution. Adversaries may use this method to encode and obfuscate part of their malicious code in legit python packages.

View Source

Detection Logic

sequence by process.entity_id with maxspan=1m
 [process where host.os.type in ("windows", "macos") and event.type == "start" and process.name : "python*" and
  not (
    process.args : ("*gcloud.py", "*conda-script.py", "*compileall.py", "*.lmstudio*") or
    process.parent.args : ("*gcloud.py", "*conda-script.py", "*compileall.py", "*.lmstudio*")
  )]
 [file where host.os.type in ("windows", "macos") and
  event.action != "deletion" and process.name : "python*" and file.name : "rot_??.cpython-*.pyc*"]

Field Validations

Loading…

Comments (0)

Loading comments...