Skip to content

Instantly share code, notes, and snippets.

View canvon's full-sized avatar

Fabian Pietsch canvon

  • Germany
View GitHub Profile
@canvon
canvon / Vulnerable.cs
Last active March 20, 2018 02:41
mono/gtk-sharp format string vulnerability in GLib.Log.Write()
// Compile with, e.g.: mcs -pkg:gtk-sharp-2.0 Vulnerable.cs
class Vulnerable
{
public static int Main(string[] args)
{
if (args.Length != 1)
return 1;
GLib.Log.Write(null, GLib.LogLevelFlags.Message, "You specified this: \"{0}\"", args[0]);