GithubHelp home page GithubHelp logo

jasper-27 / nicec2 Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 9.33 MB

Comp3000 Final Year Project.

Go 95.96% Shell 4.04%
c2 command-and-control remote-management golang final-year-project university-of-plymouth comp3000

nicec2's Introduction

NiceC2

Comp3000 Final Year Project.

Trello: https://trello.com/b/cnf4AldV/nicec2

Description

NiceC2 is a system for managing multiple computers on different networks. The system uses techniques often employed in command and control situations, hence the name.

The system is designed for more technical people, who may have a collection of systems either for their own use, or for a team/group. NiceC2 will allow the user to perform updates, run scripts, and perform a remote shell on the managed devices, as long as they can talk to the command server.

The NiceC2 server, and console are designed to be deployed on a Linux server. The agent has been designed Linux first, but is cross platform (with some missing functionality on Windows and MacOS)

Setup

ServerCode

The server is designed to be deployed on a Linux server.

There is a setup script within the ServerCode folder, running this setup script will install the server and console, and make the server auto-start when the system boots up.

This install script will display the server.crt. It's important to copy this out, as it is necisary for configering the agent.

Agent

When deploying the NiceC2 agent the first step is to configure the code to talk to the correct command server. This is hard-coded into the agent, to avoid tampering after install. The URl for the command server can be found near the top of the main.go file. Simply replace this with the URL of the new command server.

Next you will need to create a .crt file. This should be populated with the certificate displayed in the server setup process.

The agent can be built with the command go build. Once built the executable can be coppied onto the target device, and executed on that device. The executable will copy itself and the certificate to an appropriate place in file structure, and then set itself to auto-run

Linux

On linux the executable will be copied to /usr/local/bin/NiceC2/, and a systemd service will be created to run the executable as root on system startup. The systemd service will be called NiceC2_agent.service

This service can be removed with the command systemd disable NiceC2_agent.service

Windows

On windows the executable will be copied to C:\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\NiceC2\\". The program will start once the user runs in, and will be run under that user.

MacOS

On MacOS the exectutable will be copied to /Users/[current user]/Library/NiceC2/. the program will run as the user it was installed under automatically when they log in.

It is possible to remove the autostart by deleting the executable, or by removeing the NiceC2_agent.plist file located in /Users/[username]/Library/LaunchAgents.

Requirments

One of the dependencies for the setup script requires GCC to be installed on the machine. This is a pain on Windows, but Here is a link to some instructions.

Dependencies

  • github.com/denisbrodbeck/machineid
  • github.com/emersion/go-autostart
  • github.com/fatih/color
  • github.com/gosuri/uitable

nicec2's People

Contributors

jasper-27 avatar

Watchers

 avatar

nicec2's Issues

Compromised client can fetch any payload

Because the client is responsible for requesting the payload, if the client was to be compromised the code could be modified to request any payload in the payloads folder.

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.