Home

Awesome

Sharpcat

A port of classic netcat to C#

This is my first attempt at writing C# stuff, so if you thing this code is bad, I am open to constructive improvement suggestions.

This is a reverse shell only netcat and as it is written in C#, it can be loaded reflectively. It is based on the netcat windows code and I ported the do_exec.c file to C# as best as I could.

You can call Sharpcat in a few different ways:

The bulk of it all is in Exec.cs, it is a shameless port of the do_exec.c from netcat. The command will be started as a sub process, with stdin, stdout and stderr redirected through a pipe to Sharpcat. Sharpcat will then tunnel the pipe through the network socket to the remote end. This remote end could be a netcat or something else.

Not much more to it. If you want to bypass AMSI and other stuff, you can use a Powershell based reflective loader (left as an exercise for the reader).

That is more or less it...

TheArt42