Git Product home page Git Product logo

mockc2's Introduction

mockc2

An interactive mock C2 server

Building

The Makefile will generate, macOS, Linux and Windows binaries in the build folder. Simply run the following command to build the binaries:

make all

Usage

Main Menu

mockc2> help
Main Menu Help

  debug       Enable or disable debug output [on/off]
  exit        Exit and shut down mockc2
  help        Print the main menu help
  interact    Interact with connected agents
  listener    Start or shutdown a protocol listener
  list        List connected agents
  version     Print the mockc2 server version

Agent Menu

agent[631e7862c77c73a4fba9883359c430240af10b9191aabaac3ee8accbd58bddcd]> help
Agent Menu Help

  exec        Execute a command on the agent
  exit        Exit and shut down mockc2
  help        Print the agent menu help
  download    Download a file from the agent
  main        Return to the main menu
  upload      Upload a file to the agent

Network Setup

Getting a sample to communicate correctly with the mock C2 server can be a challenge. This brief introduction covers the general approach that can be taken with any malware. Refer to the malware family documentation below for specific details on how to configure the malware to communicate with the mock C2 server.

DNS C2

Malware that makes use of domain names for their C2 addresses are the most straight forward to work with. Once you have determined what the FQDN is that is being used you can add an entry to the detonation machines hosts file. On Linux and macOS the file is /etc/hosts. On Windows the file is located at c:\windows\system32\drivers\etc\hosts.

IP C2

Malware that makes use of hard coded IP addresses can be a little more complicated to set up. There are two approaches you can take.

If the IP address is stored as ASCII or Unicode you can simply edit the IP address using a hex editor. This is usually a fairly quick process as you can use the hex editor to search for the IP address and then just manually replace it with the address of the mock C2 server. Just take care to make sure that you keep the total number of bytes the same. This might require some padding with null bytes.

For malware that is packed or that stores the IP in an encrypted format this is usually harder to set up. The best thing to do is to use two separate machines that you can set up on the same network. This is most easily accomplished with two separate virtual machines on the same virtual network. Set up one machine to have the IP address of the C2 server from the malware. This machine will run the mock C2 server. On the second machine simply give it an IP address on the same network. When the malware is run it will connect to your virtual machine rather than trying to route out over the internet.

Malware Families

mockc2's People

Contributors

knightsc avatar

Stargazers

Xu Hong Bo avatar Aryan avatar BackDoor avatar Peter A. avatar Tim Kersey avatar  avatar Yvonne2020 avatar f0wl avatar  avatar  avatar  avatar James Hovious avatar

Watchers

James Cloos avatar Andre Gironda avatar  avatar Scott Lundgren avatar Janette Fournier avatar  avatar

mockc2's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.