c7b9b711f1
This release SSL-enables the red team collaboration architecture, adds several keyboard shortcuts and it improves the workflow for viewing downloaded files/loots.
73 lines
2.3 KiB
Bash
Executable File
73 lines
2.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# start msfrpcd and the deconfliction server. Check for common mistakes
|
|
# to save some time and head scratching...
|
|
|
|
# check the arguments
|
|
EXPECTED=2
|
|
if [ $# -ne $EXPECTED ]; then
|
|
echo "[-] You must provide: <external IP address> <team password>"
|
|
echo " <external IP address> must be reachable by Armitage"
|
|
echo " clients on port 55553"
|
|
echo " <team password> is a shared password your team uses to"
|
|
echo " authenticate to the Armitage team server"
|
|
exit
|
|
fi
|
|
|
|
# check that we're r00t
|
|
if [ $UID -ne 0 ]; then
|
|
echo "[-] Superuser privileges are required to run the team server"
|
|
exit
|
|
fi
|
|
|
|
# check if java is available...
|
|
if [ $(command -v java) ]; then
|
|
true
|
|
else
|
|
echo "[-] java is not in \$PATH"
|
|
echo " is Java installed?"
|
|
exit
|
|
fi
|
|
|
|
# check if keytool is available...
|
|
if [ $(command -v keytool) ]; then
|
|
true
|
|
else
|
|
echo "[-] keytool is not in \$PATH"
|
|
echo " install the Java Developer Kit"
|
|
exit
|
|
fi
|
|
|
|
# check if msfrpcd is available
|
|
if [ $(command -v msfrpcd) ]; then
|
|
true
|
|
else
|
|
echo "[-] msfrpcd is not in \$PATH"
|
|
echo " is Metasploit installed?"
|
|
exit
|
|
fi
|
|
|
|
# check if msfrpcd is running or not
|
|
if [ "$(pidof msfrpcd)" ]; then
|
|
echo "[-] msfrpcd is already running. Kill it before running this script"
|
|
echo " try: killall -9 msfrpcd"
|
|
exit
|
|
fi
|
|
|
|
# generate a certificate
|
|
# naturally you're welcome to replace this step with your own permanent certificate.
|
|
# just make sure you pass -Djavax.net.ssl.keyStore="/path/to/whatever" and
|
|
# -Djavax.net.ssl.keyStorePassword="password" to java. This is used for setting up
|
|
# an SSL server socket. Also, the SHA-1 digest of the first certificate in the store
|
|
# is printed so users may have a chance to verify they're not being owned.
|
|
echo "[+] Generating X509 certificate and keystore (for SSL)"
|
|
rm -f ./armitage.store
|
|
keytool -keystore ./armitage.store -storepass 123456 -keypass 123456 -genkey -keyalg RSA -alias armitage -dname "CN=Armitage Hacker, OU=FastAndEasyHacking, O=Armitage, L=Somewhere, S=Cyberspace, C=Earth"
|
|
|
|
# start everything up
|
|
echo "[+] Starting RPC daemon"
|
|
msfrpcd -U msf -P $2 -a 127.0.0.1 -p 55554 -S
|
|
echo "[+] sleeping for 20s (to let msfrpcd initialize)"
|
|
sleep 20
|
|
echo "[+] Starting Armitage team server"
|
|
java -Djavax.net.ssl.keyStore=./armitage.store -Djavax.net.ssl.keyStorePassword=123456 -server -XX:+UseParallelGC -jar armitage.jar --server $1 55554 msf $2 55553
|