Sandboxing / isolation
Limits what the process can reach.
Still an RCE: the attacker can escalate, change the site and attack visitors.
Protected by EyalSec: it catches the command before it runs.
Install es-python and run your Python code without the fear of being hacked.
follows the attacker's data into your queries and commands, and reports remote code execution, privilege escalation or SQL injection. Or stops them before they run.
Followed and stoppedcatches a command injection from the network before it runs, whether it has a CVE or not.
Covered either waybrings observability, accessibility and security to the Python code it runs, whether you or your AI wrote it. You see what ran, and you can secure it.
Your AI, watchedEyalSec surfaced two unauthenticated SQL-injection flaws inside Django. Django's security team fixed both, with our thanks, and credits Eyal Gabay of EyalSec.
CVE-2024-42005, step by step
JSONField model, no login needed.QuerySet.values().SQL injection via crafted JSON keys used as column aliases in QuerySet.values() / values_list(). NVD rates it 7.3 High.
SQL injection via FilteredRelation column aliases in annotate() / alias() with **kwargs expansion.
TOOLS = {"local": os.system,
"remote": ssh_run}
@app.route("/check") # looks normal
def check():
host = request.args["host"]
run = TOOLS[request.args["via"]]
# Taint can't follow the string manipulation. # can't tell run is os.system run("ping -c 1 " + host) # runs, no crash, no report # only known CVEs # does nothing # still an RCE: can escalate, attacker still control users
Limits what the process can reach.
Still an RCE: the attacker can escalate, change the site and attack visitors.
Protected by EyalSec: it catches the command before it runs.
Blocks odd-looking strings in requests.
Still an RCE: the attack can look like normal input, so it passes.
Protected by EyalSec: it judges where the text lands, not how it looks.
Watches processes on the host.
Still an RCE: it sees a shell start, not that a web request built it.
Protected by EyalSec: it stops the command and names the request and the line.
Hooks risky calls inside the app.
Still an RCE: it cannot tell which data reached the call, so no alert.
Protected by EyalSec: it follows the request text to the command and stops it.
Scans source for known patterns.
Still an RCE: its simple patterns are rare in real code, and run(...) is not one.
Protected by EyalSec: it sees the real call to os.system and stops it.
Sends odd inputs, waits for a crash.
Still an RCE: the command runs, nothing crashes, nothing is reported.
Protected by EyalSec: it stops the request that tried it, and reports it.
Lists libraries with known CVEs.
Still an RCE: the bug is your own code, so no CVE names it.
Protected by EyalSec: it catches the bug in your own code.
Your code stays as it is. Run it with python3, the way you already do.
Network sockets, files, stdin, data is marked untrusted the moment it enters.
The taint follows the value as it's copied and transformed through your program.
exec, eval, compile, os.system, subprocess, pickle, sqlite3, ctypes, …
What each event carries, and how the dashboard protects it, is on the security page.