-
Notifications
You must be signed in to change notification settings - Fork 567
[New Rule] PE through Writable Docker Socket #2958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
Co-authored-by: Jonhnathan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great rule 🔥
There are some instances where users will need to use docker runtime sockets to route control of the docker interface in some more intricate development environments. However, these are few and far between and I have not seen one that also makes use of -it
as one might use for privilege escalation. Great Work!
* [New Rule] PE through Writable Docker Socket * simplified query * Update privilege_escalation_writable_docker_socket.toml * Update privilege_escalation_writable_docker_socket.toml * Update rules/linux/privilege_escalation_writable_docker_socket.toml Co-authored-by: Jonhnathan <[email protected]> --------- Co-authored-by: Jonhnathan <[email protected]> (cherry picked from commit bbb2470)
* [New Rule] PE through Writable Docker Socket * simplified query * Update privilege_escalation_writable_docker_socket.toml * Update privilege_escalation_writable_docker_socket.toml * Update rules/linux/privilege_escalation_writable_docker_socket.toml Co-authored-by: Jonhnathan <[email protected]> --------- Co-authored-by: Jonhnathan <[email protected]> (cherry picked from commit bbb2470)
* [New Rule] PE through Writable Docker Socket * simplified query * Update privilege_escalation_writable_docker_socket.toml * Update privilege_escalation_writable_docker_socket.toml * Update rules/linux/privilege_escalation_writable_docker_socket.toml Co-authored-by: Jonhnathan <[email protected]> --------- Co-authored-by: Jonhnathan <[email protected]> (cherry picked from commit bbb2470)
* [New Rule] PE through Writable Docker Socket * simplified query * Update privilege_escalation_writable_docker_socket.toml * Update privilege_escalation_writable_docker_socket.toml * Update rules/linux/privilege_escalation_writable_docker_socket.toml Co-authored-by: Jonhnathan <[email protected]> --------- Co-authored-by: Jonhnathan <[email protected]> (cherry picked from commit bbb2470)
* [New Rule] PE through Writable Docker Socket * simplified query * Update privilege_escalation_writable_docker_socket.toml * Update privilege_escalation_writable_docker_socket.toml * Update rules/linux/privilege_escalation_writable_docker_socket.toml Co-authored-by: Jonhnathan <[email protected]> --------- Co-authored-by: Jonhnathan <[email protected]> (cherry picked from commit bbb2470)
* [New Rule] PE through Writable Docker Socket * simplified query * Update privilege_escalation_writable_docker_socket.toml * Update privilege_escalation_writable_docker_socket.toml * Update rules/linux/privilege_escalation_writable_docker_socket.toml Co-authored-by: Jonhnathan <[email protected]> --------- Co-authored-by: Jonhnathan <[email protected]> (cherry picked from commit bbb2470)
* [New Rule] PE through Writable Docker Socket * simplified query * Update privilege_escalation_writable_docker_socket.toml * Update privilege_escalation_writable_docker_socket.toml * Update rules/linux/privilege_escalation_writable_docker_socket.toml Co-authored-by: Jonhnathan <[email protected]> --------- Co-authored-by: Jonhnathan <[email protected]> (cherry picked from commit bbb2470)
Summary
This rule monitors for the usage of Docker runtime sockets to escalate privileges on Linux systems. Docker sockets by default are only be writable by the root user and docker group. Attackers that have permissions to write to these sockets may be able to create and run a container that allows them to escalate privileges and gain further access onto the host file system.
Detection
0 hits last 365 days in red sector, nor in my docker test clusters. Added
and not user.Ext.real.id : "0" and not group.Ext.real.id : "0"
to minimize FPs.