Skip to content

Commit 32238aa

Browse files
authored
Kali-Violet
1 parent 9e2c987 commit 32238aa

File tree

1 file changed

+45
-35
lines changed

1 file changed

+45
-35
lines changed

README.md

+45-35
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ It consists of two files:
1717
This is the diagram of the VPC. I reduced the number of subnets for simplicity by grouping all the VLANs into one. This reduced the number of required interfaces in the firewall from 5 to 3 and this allowed me to choose an instance type that was more cost effective. I know that the solution is not the ideal but it was a compromise that I had to make. Also, I didn't use the kali.purple domain name so all the references to the machines are done through their respective private ip addresses.
1818

1919
![VPC](https://user-images.githubusercontent.com/47893772/231020516-6c6cc77f-19f5-480d-a762-50b57fb26450.png)
20-
21-
2220

2321
## Installation
2422

@@ -27,59 +25,37 @@ To install this project, you need to have an AWS account and access to CloudForm
2725
Once this stack is created, you need to create the instances using the KaliPurple-NAT-EC2.yml file. For simplicity use "ec2" as a name. You need to input the name of the VPC stack that was created previously.
2826

2927
![AWS Cloudformation](https://user-images.githubusercontent.com/47893772/231020706-82afa33e-b182-4b1f-9ed3-4f71fe0f1b63.png)
30-
31-
3228

3329
The EC2 stack gives you the possibility of choosing the instances that you want to launch. This way you don't have to pay for services that you don't need. I used the Guacamole Bastion initially but there is no need for it once the firewall and its OpenVPN is configured unless there is a problem with one of the instances. I left the option of launching it if needed but it is not necessary for most cases. I also left the possibility of using an internet gateway for the instances in the SOC and LAN subnets to have access to the internet. Again, this option should not be necessary once the firewall is configured.
3430

35-
36-
3731
![AWS Instances](https://user-images.githubusercontent.com/47893772/231023159-8aa8e92c-73b9-4765-be08-45234d8d7950.png)
3832

3933
The instance types defaults are the minimum required for each to work. You can choose a bigger type if desired.
4034

4135
## Configuration
4236

43-
To set up the SOC, I could not find any Kali Purple images in AWS without product codes, so I used a regular Debian image and manually installed only the required packages for each of the machines. Additionally, some of the packages are not yet available or not well configured int the Kali repositories so I had to go to the original repositories. One example of this is the Elastic Stack.
44-
45-
The cost of running this setup is approximately $6 per day, and I use the instances for 5 hours each day, stopping them when not in use.
46-
47-
![Cost History](https://user-images.githubusercontent.com/47893772/231023307-d604dc42-dcd1-4a30-92eb-4d333c99df88.png)
37+
There are no Kali Purple images in AWS without product codes, so I used a regular Debian image and manually installed only the required packages for each of the machines. Additionally, some of the packages are not yet available or not well configured int the Kali repositories so I had to go to the original repositories. One example of this is the Elastic Stack.
4838

49-
The VPC stack in AWS is free, so you can leave it running indefinitely. However, keep in mind that AWS will charge for services in the EC2 stack, so be sure to it once you no longer needed to avoid unnecessary charges.
50-
51-
Note that the SOC setup process is lengthy and nuanced, as the instructions in the Kali-Purple documentation are not very clear, resulting in lots of trial and error. However, it is possible to set up the same configuration as in the Kali-Purple instructions for all machines except Bizantium, which requires some tweaking to avoid using VLANs. I also omitted the use of a domain name for simplicity.
52-
53-
Currently, the cloud configuration and firewall accept packets from all over the internet and in all of the internal connections, making it unsuitable for production situations but acceptable for proof of concept. To make it as close to production as possible, I will be hardening the AWS security groups, routing tables, NACs, and firewall rules.
54-
55-
In the future, I will be publishing a tutorial to help others replicate this setup, starting with the firewall setup, which is necessary for the rest of the instances unless an internet gateway is used.
56-
57-
Lastly, I have not yet attempted an attack the vulnerable Kali-Pearly machine. As soon as I do, I will publish some screenshots of the SOC.
39+
The setup is similar to that described in Kali-Purple SOC instructions, with some modifications made to avoid the use of VLANs. For simplicity, the domain name was not utilized.
5840

41+
Currently, the cloud configuration and firewall accept packets from all over the internet and in all of the internal connections, making it unsuitable for production situations but acceptable for proof of concept.
5942

6043
## Usage
6144

62-
To use this project, you need to connect to the firewall instance using its public IP address and configure its OpenVPN service. You can then download and install the OpenVPN client on your machine and connect to the firewall using its private IP address.
63-
64-
You can then access all the other instances in the SOC and LAN subnets using their private IP addresses through SSH or RDP protocols.
65-
66-
You can use Kali Linux as your attack platform on the kali-pearly instance and run various tools such as Nmap, Metasploit, Burp Suite, etc. You can also upload other vulnerable machine AMIs to perform attacks. Once the simulated attack is complete, you can delete the stack and pay only for the time used.
67-
68-
Please note that this repository is still work in progress.
45+
To use this project, you need to connect to the firewall instance using its public IP address and configure its OpenVPN service. You can then use the OpenVPN client on your machine to connect to the firewall. You can then access all the other instances in the SOC and LAN subnets using their private IP addresses through SSH or RDP protocols.
6946

70-
Reference: https://gitlab.com/kalilinux/kali-purple/documentation/-/wikis/home
71-
72-
CloudFormation is an AWS service and cannot be used for provisioning infrastructure on other cloud platforms like Azure, Google Cloud, etc. For those platforms, you need to use Terraform instead. A tool to make this conversion is available on this page: https://discuss.hashicorp.com/t/tool-to-convert-cloudformation-to-terraform/46704. Keep in mind that the tool may require some tweaking to work properly.
47+
You need to enter into Elasticsearch and then install an Elastic-Agent of each of the other machines except for Kali-Pearly. Otherwise, data will not be ingested into Elasticsearch.
48+
49+
You can use Kali-Heliotrope as your attack platform on the kali-pearly instance. You can also upload other vulnerable machine AMIs. Once you are done, delete the stack.
7350

7451
## AIM Images
75-
Due to AWS restrictions, AIM images with product codes cannot be made public. Therefore, the official Kali AIM cannot be used as a base. Instead, a Debian AIM with the Kali repository added was used. Several methods exist for achieving this, but the method outlined in this article was chosen https://miloserdov.org/?p=3609&PageSpeed=noscript. When installing Kali packages, follow the syntax
52+
Due to AWS restrictions, AIM images with product codes cannot be made public. Therefore, the official Kali AIM cannot be used as a base. Instead, a Debian AIM with the Kali repository added was used. Several methods exist for achieving this, but the method outlined in [this](https://miloserdov.org/?p=3609&PageSpeed=noscript) article was chosen. When installing Kali packages, follow the syntax
7653
```
7754
sudo aptitude install -t <package-name>.
7855
```
56+
These machines can be accessed within the Cloud Formation VPC, or they can be launched individually. If you wish to access them in the Cloud Formation VPC and have not yet configured OPNSense with OpenVPN, use a Bastion such as Guacamole since the machines are created in a private subnet. Simultaneously launching Guacamole is an option when launching the instances in CloudFormation.
7957

80-
These machines can be accessed within the Cloud Formation VPC, or they can be launched individually. If you wish to access them in the Cloud Formation VPC and have not yet configured OPNSense with OpenVPN, use a Bastion such as Guacamole since the machines are created in a private subnet. Simultaneously launching Guacamole is an option when launching the instances in CloudFormation.The Elastic-Agent is not installed on the images. Install the agent once you have Kali-Purple running.
81-
82-
To login use the following credentials.
58+
To login to all EC2 instances, except for Bizantium, use the following credentials.
8359
```
8460
Username: kali
8561
Password: kali2023
@@ -164,13 +140,47 @@ Username: elastic
164140
Password: 9voOW_WV6AO3EifKz=uu
165141
```
166142

167-
### The remaining images will be available soon.
143+
### Kali Violet
144+
The Kali-Violet image is 'ami-0ea952e3e2d36ebad'. The credentials are he following.
145+
146+
OpenCTI
147+
```
148+
Username: admin@opencti.io
149+
Password: kalipurpleSOCCTI
150+
```
151+
OpenCTI Portainer
152+
```
153+
Username: admin
154+
Password: kalipurpleSOCPortainer
155+
```
156+
GVM
157+
```
158+
Username: admin
159+
Password: efa72ac9-95fe-496e-b110-e68baa757ea5
160+
```
168161

169162
## Tips
170163
- The Byzantium machine needs 3 interfaces (LAN, WAN, and SOC). OpnSense may get them mixed up when it launches. Obtain the MAC address of the interfaces in the interfaces section of AWS and assign them to the appropriate subnet in the interfaces menu of OPNsense. If you can't access the login screen, relaunch the stack.
171164

172165
- When the Byzantium machine is stopped, it may lose the public IP address assigned. You need to create an Elastic IP and assign it to the WAN interface to solve this issue.
173166

167+
## Notes
168+
169+
- Please note that this repository is still work in progress.
170+
171+
- CloudFormation is an AWS service and cannot be used for provisioning infrastructure on other cloud platforms like Azure, Google Cloud, etc. For those platforms, you need to use Terraform instead. A tool to make this conversion is available on this page: https://discuss.hashicorp.com/t/tool-to-convert-cloudformation-to-terraform/46704. Keep in mind that the tool may require some tweaking to work properly.
172+
173+
- Reference: https://gitlab.com/kalilinux/kali-purple/documentation/-/wikis/home
174+
175+
## Cost
176+
177+
The cost of running this setup is approximately $6 per day, and I use the instances for 5 hours each day, stopping them when not in use.
178+
179+
![Cost History](https://user-images.githubusercontent.com/47893772/231023307-d604dc42-dcd1-4a30-92eb-4d333c99df88.png)
180+
181+
The VPC stack in AWS is free, so you can leave it running indefinitely. However, keep in mind that AWS will charge for services in the EC2 stack, so be sure to delete it once you no longer needed to avoid unnecessary charges.
182+
183+
174184
## Screenshots
175185

176186
![Screenshot 2023-04-10 at 10-44-47 Dashboard Lobby byzantium localdomain](https://user-images.githubusercontent.com/47893772/231025324-626561a3-dcc8-41b0-b57e-dfac77f23fed.png)

0 commit comments

Comments
 (0)