Suspicious xdg-open Command Execution
Description
This rule monitors for the execution of the xdg-open process via a common parent process. xdg-open is a command-line utility that opens documents and URLs in the user's preferred desktop application. Attackers may use this command to open malicious documents or URLs to gain access to the target system.
Query · eql
process where event.type == "start" and event.action == "exec" and (
process.name == "xdg-open" or
process.args in ("/bin/xdg-open", "/usr/bin/xdg-open", "/usr/local/bin/xdg-open", "xdg-open")
) and
process.command_line regex ".*[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}(:[0-9]{1,5})?/.+" and
not (
process.executable in ("/bin/chmod", "/usr/bin/chmod", "/usr/local/bin/chmod") or
process.args like (
"http://10.*", "https://10.*", "http://192.168.*", "https://192.168.*", "http://172.16.*",
"https://172.16.*", "http://172.17.*", "https://172.17.*", "http://172.31.*", "https://172.31.*"
) or
process.command_line like ("*127.0.0.1*", "*0.0.0.0*") or
process.parent.executable in ("/usr/bin/make", "/opt/forticlient/gui/FortiClient-linux-x64/FortiClient") or
(process.parent.executable == "/usr/share/code/code" and process.args like "http://*:8080/swagger/index.html")
)