Striker is a simple Command and Control (C2) program.
Disclaimer
This project is under active development. Most of the features are experimental, with more to come. Expect breaking changes.
Features
A) Agents
- Native agents for linux and windows hosts.
- Self-contained, minimal python agent should you ever need it.
- HTTP(s) channels.
- Aynchronous tasks execution.
- Support for multiple redirectors, and can fallback to others when active one goes down.
B) Backend / Teamserver
- Supports multiple operators.
- Most features exposed through the REST API, making it easy to automate things.
- Uses web sockets for faster comms.
C) User Interface
- Smooth and reactive UI thanks to Svelte and SocketIO.
- Easy to configure as it compiles into static HTML, JavaScript, and CSS files, which can be hosted with even the most basic web server you can find.
- Teamchat feature to communicate with other operators over text.
Installing Striker
Clone the repo;
$ git clone https://github.com/4g3nt47/Striker.git
$ cd Striker
The codebase is divided into 4 independent sections;
1. The C2 Server / Backend
This handles all server-side logic for both operators and agents. It is a NodeJS
application made with;
express
– For the REST API.socket.io
– For Web Socket communtication.mongoose
– For connecting to MongoDB.multer
– For handling file uploads.bcrypt
– For hashing user passwords.
The source code is in the backend/
directory. To setup the server;
- Setup a MongoDB database;
Striker uses MongoDB as backend database to store all important data. You can install this locally on your machine using this guide for debian-based distros, or create a free one with MongoDB Atlas (A database-as-a-service platform).
- Move into the source directory;
$ cd backend
- Install dependencies;
$ npm install
- Create a directory for static files;
$ mkdir static
You can use this folder to host static files on the server. This should also be where your UPLOAD_LOCATION
is set to in the .env
file (more on this later), but this is not necessary. Files in this directory will be publicly accessible under the path /static/
.
- Create a
.env
file;
NOTE: Values between <
and >
are placeholders. Replace them with appropriate values (including the <>
). For fields that require random strings, you can generate them easily using;
$ head -c 100 /dev/urandom | sha256sum
DB_URL=<your MongoDB connection URL>
HOST=<host to listen on (default: 127.0.0.1)>
PORT=<port to listen on (default: 3000)>
SECRET=<random string to use for signing session cookies and encrypting session data>
ORIGIN_URL=<full URL of the server you will be hosting the frontend at. Used to setup CORS>
REGISTRATION_KEY=<random string to use for authentication during signup>
MAX_UPLOAD_SIZE=<max file upload size, in bytes>
UPLOAD_LOCATION=<directory to store uploaded files to (default: static)>
SSL_KEY=<your SSL key file (optional)>
SSL_CERT=<your SSL cert file (optional)>
Note that SSL_KEY
and SSL_CERT
are optional. If any is not defined, a plain HTTP server will be created. This helps avoid needless overhead when running the server behind an SSL-enabled reverse proxy on the same host.
- Start the server;
$ node index.js
[12:45:30 PM] Connecting to backend database...
[12:45:31 PM] Starting HTTP server...
[12:45:31 PM] Server started on port: 3000
2. The Frontend
This is the web UI used by operators. It is a single page web application written in Svelte, and the source code is in the frontend/
directory.
To setup the frontend;
- Move into the source directory;
$ cd frontend
- Install dependencies;
$ npm install
- Create a
.env
file with the variableVITE_STRIKER_API
set to the full URL of the C2 server as configured above;
VITE_STRIKER_API=https://c2.striker.local
- Build;
$ npm run build
The above will compile everything into a static web application in dist/
directory. You can move all the files inside into the web root of your web server, or even host it with a basic HTTP server like that of python;
$ cd dist
$ python3 -m http.server 8000
- Signup;
- Open the site in a web browser. You should see a login page.
- Click on the
Register
button. - Enter a username, password, and the registration key in use (see
REGISTRATION_KEY
inbackend/.env
)
This will create a standard user account. You will need an admin account to access some features. Your first admin account must be created manually, afterwards you can upgrade and downgrade other accounts in the Users
tab of the web UI.
To create your first admin account;
- Connect to the MongoDB database used by the backend.
- Update the
users
collection and set theadmin
field of the target user totrue
;
There are different ways you can do this. If you have mongo
available in you CLI, you can do it using;
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ mongo > db.users.updateOne({username: ""}, {$set: {admin: true}})” dir=”auto”>
$ mongo <your MongoDB connection URL>
> db.users.updateOne({username: "<your username>"}, {$set: {admin: true}})