Interesting, a lot of ifs, buts and slack security practices required for it to be viable. Has such an attack been used with the vulnerabilities you listed? As I said, I would be genuinely interested in reading about some real world cases rather than what could potentially happen.
Stuxnet.
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=stuxnet
Oh go on then, just a quick one as I saw your cheeky link you added in..
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=Apple+gain+privileges
By using Apple in your search terms rather than Mac OS X, you have inflated the results.
Mac OS X =
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=Mac+OS+X+gain+privileges = 83
Not all privilege escalation exploits allow system level access. There are lateralization and elevation of privileges included in the privilege escalation category. Only, privilege elevation allows modification of the system level of the OS. Many, if not most, of those vulnerabilities do not provide system level access so, therefore, can not facilitate rootkit install.
Also, many are not reliable exploitation vectors.
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=mac+os+x+gain+privileges+2011 -> This system call was completely removed from the OS as it was no longer needed given that it was no longer being used by any 32 bit process that could make that system call; this system call's lack of use in any process limits its use in exploits.
It is rare for any of these vulnerabilities to be publicly known prior to being patched. If you look at Apple's security releases, 2/3 of the privilege escalation vulnerabilities are found and disclosed by Apple rather than an external researcher.
Windows =
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=windows+gain+privileges = 295
The fact that Windows XP admin accounts do not require privilege escalation to allow system level access as this account does not use DAC also has to be taken into consideration. It is common for Windows XP users to use admin accounts for day to day computing. Without DAC the number of privilege escalation exploits must include all remote exploits as well.
So, Windows XP =
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=windows+xp = 612
That number for Windows XP is artificially low given that it does not include every applicable remote vulnerability in IE (
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=internet+explorer) or MS Office (
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=ms+office). Also, this does not include all remote vulnerabilities introduced via third party software vendors, such as Adobe (
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=adobe).
This is valid given that Windows XP still has the greatest market share of any OS including other versions of Windows and many use admin accounts in Windows XP for day to day computing.
The previous link I provided for Windows (
http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=win32k.sys) only focused on privilege escalation vulnerabilities concerning an attack vector that has been used in the wild. This vector is well documented (
http://www.exploit-db.com/bypassing-uac-with-user-privilege-under-windows-vista7-mirror/) and well known via being used in Stuxnet.
Many exploits related to win32k.sys have been released to the public before being patched. For example,
http://www.exploit-db.com/exploits/15609/ was public on November 24, 2010 but was not patched until February 8, 2011. During that time, any malware developer could have used that exploit in malware in the wild if they became aware of the public and unpatched exploit via
http://www.exploit-db.com/.
There has not been an incidence of privilege escalation exploitation being used in malware in the wild in OS X. This is because linking together remote and local exploits is difficult on any OS. Not only does Windows have a higher incidence rate of these vulnerabilities that provide system level access despite the versions of Windows in use, but Windows provides a more accessible vector to link exploits together via the Windows registry (
http://www.exploit-db.com/bypassing-uac-with-user-privilege-under-windows-vista7-mirror/).
leads on to:
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-0182 which was reported on the 23rd December 2010 and fixed by apple late March 2011. /tips hat and rides off into the sunset.
This vulnerability was not publicly disclosed before being patched.
Here is a list of public zeroday vulnerabilities.
http://www.vupen.com/english/zerodays/ Some of the items in this list for Windows are still unpatched since 2007.