Prt.1 – Hak5 Cloud C2 Setup on AWS

Search for a command to run...

No comments yet. Be the first to comment.
In this blog, we will show you how to install and setup Kali linux on the new Raspberry Pi 400 Personal Computer. Hardware List Raspbery Pi 400 Micro SD Card PowerSupply Ethernet/Rj45 Cord Mous

What is CyberChef? CyberChef is a simple, intuitive web application for analyzing and decoding data without having to deal with complex tools or programming languages. It is also known as the “Cyber

What is Shodan: Shodan is a search engine that allows researchers to explore and discover a wide range of devices that are connected to the internet, where they are located and who is using them. Shod

In today’s cyber landscape threats are evolving on a daily basis. There are many ways to reduce your company’s attack surface. A simple way to reduce a company’s email attack surface is by blocking

Cloud C2 makes it easy for penetration testers and IT security teams to deploy and manage Hak5 gear from a simple self-hosted cloud managed platform. Cloud C2 allows you to maintain access for engagements, continually monitor and assess environments with Hak5 gear implants.
Cloud C2 currently supports several Hak5 devices including the WiFi Pineapple, LAN Turtle, Packet Squirrel, Signal Owl, ScreenCrab, Shark Jack and the KeyCroc.
Sign-up and Create your AWS hosting account.
In this setup of Cloud C2, we will utilize a single Amazon Lightsail instance for $5 a month to run our public Cloud C2.
Next, create and instance by selecting the instance “location/region” that works best for you, and select a “Linux/Unix” platform as an "OS Only" option. In this blog, we will be utilizing the latest Ubuntu LTS release and naming the instance to identify our LightSail resource (especially helpful, if you are running numerous instances in Lightsail). See screenshot below for details.
In the next steps, we will configure our Lightsail instance to allow network communications from our Hak5 devices to properly communicate to the Cloud C2 platform. Please keep in mind, using stricter network rules can prevent public facing instance exposure, but for this blog post we are not restricting IP Addresses. In a controlled assessment, we would highly recommend utilizing a restricted IP address list, or VPN relay to access the Cloud C2 portal during engagements.
Select the networking tab, and create a static IP you can assign to your instance. Next, select your instance, and add an identifier name for the static IP. See screenshot below for details.
In this step, we will configure the proper firewall rules on our Cloud C2 instance to allow our Hak5 devices to properly communicate. Please remember as stated before, it is always best practice to utilize restricted IP addresses or VPN access for public instances to reduce your attack surface. For this demonstration, we are leaving this instance public. To configure firewall rules, select the Networking tab and navigate to the firewall. Scroll down and click the "+ Add rule" to configure rules. We will add several rules to our firewall. Add HTTPs, Custom TCP port 2022 and 8080. See screenshot below for details on port configuration.
To quickly access your Lightsail instance, click on the “connect” tab in the top left. Then select Connect securely using your browser by “Connect Using SSH”. This will connect you to your instance via a SSH webshell. You can also configure your own SSH client as well. See screenshot below.
During these steps, we will have to install UnZip, since it is not natively installed on the AWS Lightsail Unbuntu Instance. We will also utilize a Cloud C2 bash script that will automagically install the latest version of Cloud C2. Once you are in the “Connect” console, copy and paste the script below to install Cloud C2. Remember, you will have to register to get a valid license key from Hak5 which can be obtained free on the Hak5 website - https://shop.hak5.org/products/c2#c2-versions. See bash install script below.
sudo apt install unzip
wget https://c2.hak5.org/com -q -O c2.zip && unzip -qq c2.zip && \
IP=$(curl -s https://checkip.amazonaws.com) && \
echo "Copy the below setup token and browse to http://\)IP:8080" && \
./c2_community-linux-64 -hostname $IP
Once the script is complete, you will get a setup token and a browse path where your Cloud C2 instance is running. Next, navigate to your Cloud C2 instance, and finish the activation process.
In this setup process, you will be prompted to enter your valid “License Key” that would have been sent to you after your Hak5 Cloud C2 registration process. Check your email for the “Hak5 Cloud C2 Download & License” from step 3.2 – Obtaining an active Cloud C2 License ( https://shop.hak5.org/products/c2#c2-versions ). The setup token will be provided if the script runs successful.
Once your account has been setup, you can navigate to your C2 Cloud instance, and login with the newly created Username and Password that was created during the setup process.
Start adding Hak5 approved devices such as WiFi Pineapple, LAN Turtle, Packet Squirrel, Signal Owl, ScreenCrab, Shark Jack and the KeyCroc to your Cloud C2 instance. Adding devices to Cloud C2 getting started guide can be found [at] https://docs.hak5.org/hc/en-us/articles/360014295634-Adding-Devices-to-Cloud-C2
[1]. Cloud C2 Downloads – https://shop.hak5.org/products/c2#c2-versions
[2]. Hak5 Devices – https://shop.hak5.org/
[3]. Cloud C2 Installation and Setup Guides – https://docs.hak5.org/hc/en-us/articles/360012947534-About-Cloud-C2
[4]. Adding Devices to Cloud C2 – https://docs.hak5.org/hc/en-us/articles/360014295634-Adding-Devices-to-Cloud-C2
Prt.2 – Hak5 Cloud C2 SSL Setup on AWS - (Coming Soon!)