├── README.md └── c2matrix.sh /README.md: -------------------------------------------------------------------------------- 1 | # C2Matrix-Automation 2 | 3 | ## What is project? 4 | 5 | The project is based on the C2 Matrix by Jorge Jorge Orchilles, Bryson Bort and Adam Mashinchi, which is a sensational project that helps you pinpoint the best C2 for your needs. 6 | 7 | https://www.thec2matrix.com/about 8 | 9 | Based on this project, Miter Att&ck and my Cracking The Perimeter Framework, I developed this script to automate the installation of a command and control server. I plan to take this one step further by innovating with attack vectors that can be customized for attacks within your favorite C2. 10 | 11 | 12 | My Cracking The Perimeter framework brings C2 as an essential solution to help test the effectiveness of security controls and manage your tests. In addition to performing Adversary Emulation and having as a partner structure for the CTP tools such as Exploit-Pack. 13 | 14 | 15 | So as the start of a framework that can be used by everyone and applied within an organization, I started some automation projects. 16 | 17 | 18 | If you want to know more about CTP 19 | 20 | 21 | https://github.com/CyberSecurityUP/Cracking-The-Perimeter-Framework 22 | 23 | https://github.com/CyberSecurityUP/Adversary-Emulation-Matrix 24 | 25 | https://github.com/CyberSecurityUP/Awesome-Red-Team-Operations 26 | 27 | https://www.linkedin.com/in/joas-antonio-dos-santos (My LinkedIn) 28 | 29 | https://twitter.com/C0d3Cr4zy (My Twitter) 30 | -------------------------------------------------------------------------------- /c2matrix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | while :; do 3 | echo "Welcome to C2 Matrix Automation" 4 | echo "Create by Joas Antonio" 5 | echo "Based on C2 Matrix and Cracking The Perimeter Framework" 6 | echo "Version 1.0 - Beta" 7 | echo "" 8 | echo "ibombshell, covenant, evilosx, fudgec2, godoh, kodiac, merlinc2, poshc2, silent trinity, empire and trevorc2" 9 | echo "" 10 | echo "1 - Download Repositorys" 11 | echo "2 - Install Requeriments" 12 | echo "3 - Connect Command and Control Server" 13 | echo "" 14 | read -p "Select Options: " option 15 | echo "" 16 | if [ $option -eq 1 ]; 17 | then 18 | echo "Download Repositorys" 19 | echo "" 20 | echo "Bombshell" 21 | git clone https://github.com/ElevenPaths/ibombshell 22 | echo "" 23 | echo "Covenant" 24 | git clone https://github.com/cobbr/Covenant 25 | echo "" 26 | echo "EvilOSX" 27 | git clone https://github.com/Marten4n6/EvilOSX 28 | echo "" 29 | echo "Fudge C2" 30 | git clone https://github.com/Ziconius/FudgeC2 31 | echo "" 32 | echo "Godoh" 33 | git clone https://github.com/sensepost/goDoH 34 | echo "" 35 | echo "Kodiac" 36 | git clone https://github.com/zerosum0x0/koadic 37 | echo "" 38 | echo "Merlinc2" 39 | git clone https://github.com/Ne0nd0g/merlin 40 | echo "" 41 | echo "Poshc2" 42 | git clone https://github.com/nettitude/PoshC2 43 | echo "" 44 | echo "Silent Trinity" 45 | git clone https://github.com/byt3bl33d3r/SILENTTRINITY 46 | echo "" 47 | echo "Empire" 48 | apt-get update && apt install powershell-empire 49 | echo "" 50 | echo "Trevorc2" 51 | git clone https://github.com/CyberSecurityUP/Trevorfuscation 52 | echo "" 53 | elif [ $option -eq 2 ]; 54 | then 55 | echo "Install Requeriments" 56 | echo "" 57 | echo "Select C2 Requeriments Install" 58 | echo "Select the order number from the home page list, ex: 1 - ibombshell" 59 | read -p "Select Option: " c2option 60 | if [ $c2option -eq 1 ]; 61 | then 62 | echo "ibombshell" 63 | cd ibombshell/ibombshell\ c2/ 64 | pip install -r requirements.txt 65 | echo "" 66 | elif [ $c2option -eq 2 ]; 67 | then 68 | echo "Covenant" 69 | mkdir covenant2 70 | cd covenant2 71 | wget -q https://packages.microsoft.com/config/ubuntu/19.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb 72 | sudo dpkg -i packages-microsoft-prod.deb 73 | sudo apt-get update 74 | sudo apt-get install apt-transport-https 75 | sudo apt-get update 76 | sudo apt-get install dotnet-sdk-2.2 77 | git clone --recurse-submodules https://github.com/cobbr/Covenant 78 | elif [ $c2option -eq 3 ]; 79 | then 80 | echo "EvilOSX" 81 | cd EvilOSX 82 | sudo pip install -r requirements.txt 83 | python start.py 84 | elif [ $c2option -eq 4 ]; 85 | then 86 | echo "FudgeC2" 87 | cd FudgeC2/FudgeC2 88 | sudo pip3 install -r requirements.txt 89 | elif [ $c2option -eq 5 ]; 90 | then 91 | echo "Godoh" 92 | sudo apt-get update 93 | sudo apt install -y golang 94 | cd goDoH 95 | go build 96 | elif [ $c2option -eq 6 ]; 97 | then 98 | echo "Kodiac" 99 | cd koadic 100 | pip3 install -r requirements.txt 101 | elif [ $c2option -eq 7 ]; 102 | then 103 | echo "Merlinc2" 104 | mkdir Merlinc2 105 | wget https://github.com/Ne0nd0g/merlin/releases/latest/download/merlinServer-Linux-x64.7z 106 | 7z x merlinServer-Linux-x64.7z 107 | sudo ./merlinServer-Linux-x64 108 | elif [ $c2option -eq 8 ]; 109 | then 110 | echo "Poshc2" 111 | cd "PoshC2" 112 | curl -sSL https://raw.githubusercontent.com/nettitude/PoshC2/master/Install.sh | sudo bash 113 | sudo ./Install.sh 114 | curl -sSL https://raw.githubusercontent.com/nettitude/PoshC2/master/Install.sh | sudo bash -s -- -p /root/PoshC2 115 | curl -sSL https://raw.githubusercontent.com/nettitude/PoshC2/dev/Install.sh | sudo bash -s -- -b dev 116 | elif [ $c2option -eq 9 ]; 117 | then 118 | echo "Silent Trinity" 119 | cd SILENTTRINITY 120 | pip3 install --user pipenv && pipenv install && pipenv shell 121 | elif [ $c2option -eq 10 ]; 122 | then 123 | echo "" 124 | echo "Upgrade Empire" 125 | apt-get update && apt install powershell-empire 126 | elif [ $c2option -eq 11 ]; 127 | then 128 | echo "" 129 | echo "Trevorc2 + Trevorfuscation" 130 | cd Trevorfuscation/ 131 | cd PyFuscation/ 132 | pip install -r requirements.txt 133 | cd .. 134 | cd trevorc2/ 135 | pip install -r requirements.txt 136 | echo "" 137 | else 138 | echo "Finish" 139 | fi 140 | elif [ $option -eq 3 ]; 141 | then 142 | echo "" 143 | echo "Obfuscation and Server Connect" 144 | echo "1 - ibombshell" 145 | echo "2 - Covenant" 146 | echo "3 - EvilOSX" 147 | echo "4 - FudgeC2" 148 | echo "5 - GoDoH" 149 | echo "6 - Kodiac" 150 | echo "7 - MerlinC2" 151 | echo "8 - Poshc2" 152 | echo "9 - SILENTTRINITY" 153 | echo "10 - Powershell Empire" 154 | echo "11 - Trevorc2 + Trevorfuscation" 155 | echo "" 156 | read -p "Select Command and Control: " select2 157 | echo "" 158 | if [ $select2 -eq 1 ] 159 | then 160 | echo "" 161 | echo "ibombshell" 162 | cd ibombshell/ibombshell\ c2/ 163 | python3 ibombshell.py 164 | elif [ $select2 -eq 2 ] 165 | then 166 | echo "" 167 | echo "Covenant Connect" 168 | cd Covenant/Covenant 169 | dotnet build 170 | dotnet run 171 | echo "" 172 | elif [ $select2 -eq 3 ]; 173 | then 174 | echo "" 175 | echo "EvilOSX" 176 | cd EvilOSX 177 | python start.py --builder 178 | python start.py --cli --port 1337 179 | elif [ $select2 -eq 4 ]; 180 | then 181 | echo "" 182 | echo "FudgeC2" 183 | cd FudgeC2/FudgeC2 184 | sudo python3 Controller.py 185 | echo "admin:letmein" 186 | elif [ $select2 -eq 5 ]; 187 | then 188 | echo "" 189 | echo "GoDoH" 190 | echo "See goDoH documentation" 191 | echo "https://github.com/sensepost/goDoH" 192 | echo "" 193 | elif [ $select2 -eq 6 ]; 194 | then 195 | echo "" 196 | echo "Kodiac" 197 | cd kodiac 198 | .\kodiac 199 | elif [ $select2 -eq 7 ]; 200 | then 201 | echo "" 202 | echo "Merlinc2" 203 | cd Merlinc2 204 | sudo ./merlinServer-Linux-x64 205 | elif [ $select2 -eq 8 ]; 206 | then 207 | echo "" 208 | echo "PoshC2" 209 | cd PoshC2 210 | posh-server 211 | elif [ $select2 -eq 9 ]; 212 | then 213 | echo "" 214 | echo "SILENTTRINITY" 215 | cd SILENTTRINITY 216 | python st.py && python3 st.py 217 | elif [ $select2 -eq 10 ]; 218 | then 219 | echo "" 220 | echo "Powershell - Empire" 221 | echo "Execute: powershell-empire" 222 | echo "" 223 | elif [ $select2 -eq 11 ]; 224 | then 225 | echo "" 226 | cd Trevorfuscation/ 227 | chmod +x trevorfuscation.sh 228 | ./trevorfuscation.sh 229 | else 230 | echo "In progress..." 231 | fi 232 | fi 233 | done 234 | --------------------------------------------------------------------------------