Pentesting Tools

C2 Server Installation – A Comprehensive Guide For Red Team Operations

Setting up a Command and Control (C2) server is a critical step in establishing a robust red team infrastructure.

This guide provides a detailed walkthrough on how to install and configure your C2 server, ensuring seamless integration with tools like Filebeat and RedELK.

Follow these essential steps to enhance your cybersecurity testing capabilities.

In Short

  1. extract c2servers.tgz on your C2 server.
  2. Run the installer for your C2 servers with parameters, i.e. install-c2server.sh $FilebeatID $ScenarioName $IP/DNS:PORT

In Detail

Copy and extract c2servers.tgz on your C2 server as part of your red team infra deployment procedures. Run the installer for your C2 server, i.e.: install-c2server.sh $FilebeatID $ScenarioName $IP/DNS:POR

  • $FilebeatID is the identifier of this teamserver within filebeat.
  • $ScenarioName is the name of the attack scenario this teamserver is used for.
  • $IP/DNS:PORT is the IP or DNS name and port where filebeat logs are shipped to, this would be the IP/DNS of your RedELK server. Even if you use the default port (TCP/5044) you need to provide this as a parameter.

See Naming requirements for detailed info on naming requirements.

This script will warn if filebeat is already installed (important as ELK and filebeat sometimes are very picky about having equal versions), install required certificates, adjust the filebeat configuration, start filebeat, create a local user ‘scponly’ and limit that user to SSH key-based auth via scp/sftp/rsync.

Debugging

Having issues? Check the following:

  • The installer output in redelk-install.log.
  • Filebeat errors in its log file (/var/log/filebeat or filebeat mentioned in /var/log/syslog depending on your Linux flavour used).
    • You want to make sure it is tracking the right log files. And you want to make sure it can connect to the RedELK server.
      • If no connection is established, this is often due to firewall issues or due to incorrect SSL parameters given in the certs/config.cfg file.
  • Check for issues in the background scripts in /var/log/redelk/*.
Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

B(l)utter

Flutter Mobile Application Reverse Engineering Tool by Compiling Dart AOT Runtime. Currently, the application supports…

14 hours ago

FLARE-VM : A Comprehensive Guide To Establishing A Reverse Engineering Lab On Windows

Welcome to FLARE-VM - a collection of software installations scripts for Windows systems that allows…

14 hours ago

AWeSomeUserFinder : Harnessing AWS IAM For Username Enumeration And Password Security

AWS IAM Username Enumerator and Password Spraying Tool in Python3 In order to use the…

14 hours ago

Monolith : The Ultimate Tool For Compiling Entire Web Pages Into Single HTML Files

A data hoarder’s dream come true: bundle any web page into a single HTML file.…

14 hours ago

Useful Bug Bounty And Security Related Write-ups : A Comprehensive Guide For Enthusiasts

This repo contains all variants of information security & Bug bounty & Penetration Testing write-up…

2 days ago

Admin-Panel-Dorks : Mastering Google Dorks To Uncover Hidden Admin Panels

site:*/sign-in site:*/account/login site:*/forum/ucp.php?mode=login inurl:memberlist.php?mode=viewprofile intitle:"EdgeOS" intext:"Please login" inurl:user_login.php intitle:"Web Management Login" site:*/users/login_form site:*/access/unauthenticated site:account.*.*/login site:admin.*.com/signin/…

2 days ago