Home

Awesome

WSC2

LAST/CURRENT VERSION: 0.1

Author: Arno0x0x - @Arno0x0x

WSC2 is a PoC of using the WebSockets and a browser process to serve as a C2 communication channel between an agent, running on the target system, and a controller acting as the actuel C2 server.

The tool is distributed under the terms of the GPLv3 licence.

Background information

Check this blog post to get some context and insight on the developpment of this tool:

Using WebSockets and IE/Edge for C2 communications

Architecture

WSC2 is composed of:

<img src="https://dl.dropboxusercontent.com/s/2znnn74iczdjbus/architecture.jpg?dl=0" width="600">

Features

WSC2 main features:

<img src="https://dl.dropboxusercontent.com/s/ubhgex2d9h8cjr4/wsc2.jpg?dl=0" width="600">

Installation & Configuration

Installation is pretty straight forward:

Check the configuration file config.py and ensure the default config fits your needs.

Start the controller by typing: ./wsc2.py.

Compiling your own agent

The JScript agent (stager 'jscript1') doesn't need to be compiled.

The 'jscript2', 'jscript3' and 'psoneliner' stagers are based on a .Net assembly DLL that you can choose to build on your own/modify, based on the source code provided.

Although it is perfectly OK to use the provided wsc2.dll, you can very easily compile your own agent, from the source code provided. You'll need Visual Studio installed.

Create a .Net (Visual C#) Class Libray projet. Add the wsc2Agent.cs source file as the main source code file.

Add the following references to your project:

  1. Microsoft HTML Object Library (MSHTML)
  2. Microsoft Internet Controls (SHDocVw)

Build !

Todo

DISCLAIMER

This tool is intended to be used in a legal and legitimate way only:

Quoting Empire's authors: There is no way to build offensive tools useful to the legitimate infosec industry while simultaneously preventing malicious actors from abusing them.

CREDITS