Skip to content

A fully managed C# implementation of JuicyPotato

Notifications You must be signed in to change notification settings

SparkyTD/sharp-potato

Repository files navigation

SharpPotato

A fully managed C# implementation of JuicyPotato

Note that this is currently just a library, not a command-line executable tool. You'll have to write your own CLI wrapper around the JuicyPotato or SystemProcess classes.

Project Status / TODO

  • CreateProcessWithTokenW
  • CreateProcessAsUserW
  • Custom COM Server Address/Port
  • Custom CLSIDs
  • Custom Process (currently hard-coded to cmd.exe)
  • Custom CmdLine Arguments
  • Custom RPC Server Address/Port
  • Error checking and custom Exceptions
  • Stream redirection (stdout, stderr, stdin)
  • Asynchronous COM/RPC socket I/O
  • Reliability (packet 72 fix)

Example Usage

The following code will start a cmd.exe process as nt authority\system.

var process = new SystemProcess();
process.StartInfo.FileName = "cmd.exe";
process.StartInfo.Arguments = "/K whoami";

process.Start();
process.WaitForExit();

You can use the SystemProcess class as you would use a regular Process class. Some ProcessStartInfo features are supported, such as RedirectStandardInput/Output/Error, CreateNoConsole, and custom filename or command line arguments. If you redirect the standard streams, you can use the StandardInput, StandardOutput and StandardError interfaces of the SystemProcess class to interact with the process.

About

A fully managed C# implementation of JuicyPotato

Resources

Stars

Watchers

Forks

Languages