Skip to content

mojodojo101/c2server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c2server

A simple command and control server written in golang


The core is working now, together with the angular client

and the testbeacon.go you should be able to get a demo going on a local server

the token is just a stub and this will change later on

same with the entire authentication at the moment

TODO:

  • Add better authentication for client and active beacon
  • Add Beacon Templates
  • Add better Server-Beacon Communication
  • Add better Client-Server Communication

Setting up the database

  • get postgresql repo
sudo apt update
sudo apt install postgresql postgresql-contrib
  • switch user to postgresql and create roles and database
sudo su postgres

createuser --interactive 
#----->add the “c2admin” user


createdb c2db
  • set up priviliges and password
psql
grant all privileges on database c2db to c2admin;
alter user c2admin password 'mojodojo101+';
  • make sure your pg_hba.conf allows the correct connection types
# Database administrative login by Unix domain socket
local   all             postgres                                peer
# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all             	                peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            md5
host    replication     all             ::1/128                 md5

systemctl restart postgresql.service

if you used different accounts names and passwords change the config.go

About

Proof of concept; a command and control server written in go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages