Skip to content

Commit

Permalink
Update to v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelGMSec committed Jan 1, 2022
1 parent 00af1fa commit 26ba98b
Show file tree
Hide file tree
Showing 12 changed files with 643 additions and 71 deletions.
43 changes: 23 additions & 20 deletions Cloudtopolis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
},
"source": [
"#=====================================#\n",
"# Cloudtopolis v2.4 by @JoelGMSec #\n",
"# https://darkbyte.net #\n",
"# Cloudtopolis v3.0 by @JoelGMSec #\n",
"# https://darkbyte.net - [Client] #\n",
"#=====================================#\n",
"\n",
"# [ Requeriments ] Create and copy from Hashtopolis > Agent > New Agent\n",
"# [ Requirements ] Create and copy from Hashtopolis > Agent > New Agent\n",
"Voucher = ''\n",
"\n",
"# [ Wordlists + Rules ] Select one or more according to your needs\n",
Expand All @@ -53,10 +53,11 @@
"!echo -e \" | |___| | (_) | |_| | (_| | || (_) | |_) | (_) | | \\__ \\\\ \"\n",
"!echo -e \" \\____|_|\\___/ \\__,_|\\__,_|\\__\\___/| __/ \\___/|_|_|___/ \"\n",
"!echo -e \" |_| \"\n",
"!echo -e \"-----------------------------------------------------------\"\n",
"!echo -e \":: Created by @JoelGMSec :: https://darkbyte.net :: v2.4 ::\"\n",
"!echo -e \"-----------------------------------------------------------\"\n",
"megatoolz = False\n",
"!echo -e \" \"\n",
"!echo -e \":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\"\n",
"!echo -e \":: Created by @JoelGMSec :: https://darkbyte.net :: v3.0 ::\"\n",
"!echo -e \":: https://github.com/JoelGMSec/Cloudtopolis :: [Client] ::\"\n",
"!echo -e \":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::\"\n",
"\n",
"# [ Checking Voucher ]\n",
"if not Voucher:\n",
Expand All @@ -76,6 +77,7 @@
"\n",
"else:\n",
" !echo -e \"\\e[0m$GPU_CARD found!\"\n",
" megatoolz = False\n",
"\n",
"# [ Wordlist - Kaonashi ]\n",
"if Kaonashi:\n",
Expand All @@ -88,13 +90,13 @@
" !echo -e \"\\e[0mKaonashi not found!\"\n",
"\n",
" if not megatoolz:\n",
" !echo -e \"\\n\\e[34;1m[+] Installing megatools..\\e[0m\"\n",
" !echo -e \"\\n\\e[34;1m[i] Installing megatools..\\e[0m\"\n",
" !apt install megatools -y -qq > /dev/null 2>&1\n",
" !echo -e \"\\e[0mDone!\" \n",
" megatoolz = True\n",
"\n",
" # Downloading Kaonashi\n",
" !echo -e \"\\n\\e[34;1m[+] Downloading Kaonashi..\"\n",
" !echo -e \"\\n\\e[34;1m[i] Downloading Kaonashi..\"\n",
" !echo -e \"\\e[0mWARNING: This can take some time..\"\n",
" !megadl https://mega.nz/#!nWJXzYzS!P1G8HDiMxq5wFaxeWGWx334Wp9wByj5kMEGLZkVX694 --path /content\n",
"\n",
Expand All @@ -119,13 +121,13 @@
" !echo -e \"\\e[0mKaonashi_WPA not found!\"\n",
" \n",
" if not megatoolz:\n",
" !echo -e \"\\n\\e[34;1m[+] Installing megatools..\\e[0m\"\n",
" !echo -e \"\\n\\e[34;1m[i] Installing megatools..\\e[0m\"\n",
" !apt install megatools -y -qq > /dev/null 2>&1\n",
" !echo -e \"\\e[0mDone!\"\n",
" megatoolz = True\n",
"\n",
" # Downloading Kaonashi_WPA\n",
" !echo -e \"\\n\\e[34;1m[+] Downloading Kaonashi_WPA..\"\n",
" !echo -e \"\\n\\e[34;1m[i] Downloading Kaonashi_WPA..\"\n",
" !echo -e \"\\e[0mWARNING: This can take a little..\"\n",
" !megadl https://mega.nz/#!jeRRgQgZ!xcRcLpm0ftuu7z7JN32LHMECqk9vmpVNH2JFVxSICfU --path /content\n",
"\n",
Expand All @@ -148,7 +150,7 @@
" if not \"/content/rockyou.txt\" in Rockyoutxt:\n",
" # Downloading Rockyou\n",
" !echo -e \"\\e[0mRockyou not found!\"\n",
" !echo -e \"\\n\\e[34;1m[+] Downloading Rockyou..\"\n",
" !echo -e \"\\n\\e[34;1m[i] Downloading Rockyou..\"\n",
" !wget --quiet https://download.weakpass.com/wordlists/90/rockyou.txt.gz\n",
"\n",
" # Extracting wordlist\n",
Expand All @@ -167,7 +169,7 @@
" if not \"/content/OneRuleToRuleThemAll.rule\" in OneRuletxt:\n",
" # Downloading rule\n",
" !echo -e \"\\e[0mOneRuleToRuleThemAll not found!\"\n",
" !echo -e \"\\n\\e[34;1m[+] Downloading rule..\"\n",
" !echo -e \"\\n\\e[34;1m[i] Downloading rule..\"\n",
" !wget --quiet https://raw.githubusercontent.com/NotSoSecure/password_cracking_rules/master/OneRuleToRuleThemAll.rule\n",
" !echo -e \"\\e[0mDone!\"\n",
"\n",
Expand All @@ -181,23 +183,24 @@
"!rm -frd config.json > /dev/null 2>&1\n",
"!rm hashtopolis.zip > /dev/null 2>&1\n",
"\n",
"# [ Connecting with Hashtopolis ]\n",
"!echo -e \"\\n\\e[32;1m[+] Connecting with Hashtopolis..\\e[0m\"\n",
"# [ Connecting with Cloudtopolis Server ]\n",
"!echo -e \"\\n\\e[34;1m[i] Connecting with Cloudtopolis Server..\\e[0m\"\n",
"if not VPS:\n",
" !echo -e \"\\e[0mCloud Shell Mode enabled!\"\n",
" !gcloud alpha auth login --quiet --no-launch-browser\n",
" !gcloud alpha cloud-shell --quiet ssh -- -p 6000 -o TCPKeepAlive=yes -N -T -C -L 1337:localhost:8000 -4 </dev/null &>/dev/null &\n",
" !gcloud alpha cloud-shell --quiet ssh -- -p 6000 -o TCPKeepAlive=yes -N -T -C -L 8000:localhost:8000 -4 </dev/null &>/dev/null &\n",
"\n",
"else:\n",
" !echo -e \"\\e[0mVPS Mode enabled!\"\n",
" !apt install sshpass -y -qq > /dev/null 2>&1\n",
" SshParams = '-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'\n",
" !sshpass -p $SshPass ssh $SshParams -o TCPKeepAlive=yes -N -T -C -L 1337:hashtopolis:80 $SshUser@$SshHost -p $SshPort > /dev/null 2>&1 & \n",
" !sshpass -p $SshPass ssh $SshParams -o TCPKeepAlive=yes -N -T -C -L 8000:localhost:8000 $SshUser@$SshHost -p $SshPort > /dev/null 2>&1 & \n",
"\n",
"# [ Download and run agent ]\n",
"!echo -e \"\\n\\e[34;1m[+] Download and run agent..\\e[0m\"\n",
"!wget --quiet http://localhost:1337/agents.php?download=1\n",
"!echo -e \"\\n\\e[34;1m[i] Download and run agent..\\e[0m\"\n",
"!wget --quiet http://localhost:8000/agents.php?download=1\n",
"!mv 'agents.php?download=1' hashtopolis.zip\n",
"!python3 hashtopolis.zip --url http://localhost:1337/api/server.php --voucher $Voucher\n"
"!python3 hashtopolis.zip --url http://localhost:8000/api/server.php --voucher $Voucher\n"
],
"execution_count": null,
"outputs": []
Expand Down
108 changes: 59 additions & 49 deletions Cloudtopolis.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
#!/bin/bash
#=====================================#
# Cloudtopolis v2.4 by @JoelGMSec #
# https://darkbyte.net #
# Cloudtopolis v3.0 by @JoelGMSec #
# https://darkbyte.net - [Server] #
#=====================================#

clear
clear -x
echo -ne "\033]0;Cloudtopolis v3.0 [Server] - by @JoelGMSec\007"
echo -e "\e[34;1m
____ _ _ _ _ _
/ ___| | ___ _ _ __| | |_ ___ _ __ ___ | (_)___
| | | |/ _ \| | | |/ _' | __/ _ \| '_ \ / _ \| | / __|
| |___| | (_) | |_| | (_| | || (_) | |_) | (_) | | \__ \\
\____|_|\___/ \__,_|\__,_|\__\___/| __/ \___/|_|_|___/
|_|
\e[37;1m-----------------------------------------------------------
:: \e[34;1mCreated by @JoelGMSec \e[37;1m:: \e[34;1mhttps://darkbyte.net \e[37;1m:: \e[34;1mv2.4 \e[37;1m::
-----------------------------------------------------------"
\e[37;1m:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: \e[34;1mCreated by @JoelGMSec \e[37;1m:: \e[34;1mhttps://darkbyte.net \e[37;1m:: \e[34;1mv3.0 \e[37;1m::
:: \e[34;1mhttps://github.com/JoelGMSec/Cloudtopolis \e[37;1m:: \e[31;1m[Server] \e[37;1m::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
echo -e "\e[0m"
echo -e "\e[32;1m[+] Checking Environment..\e[0;1m"
echo -e "\e[32;1m[+] Checking Environment..\e[37;1m"

if ping -c 1 169.254.169.254 &> /dev/null ; then

Expand All @@ -29,111 +32,118 @@ AmazonCheck="$(echo $AmazonCloud | grep 404)"
GoogleCheck="$(echo $GoogleCloud | grep 404)"

if [[ ! $AzureCheck ]] ; then
echo -e "\e[0;1mAzure Cloud detected!"
IP="$(echo $AzureCloud)"
echo -e "\e[37;1mAzure Cloud detected!"
IP="$(echo $AzureCloud)"

elif [[ ! $AmazonCheck ]] ; then
echo -e "\e[0;1mAmazon Cloud detected!"
IP="$(echo $AmazonCloud)"
echo -e "\e[37;1mAmazon Cloud detected!"
IP="$(echo $AmazonCloud)"

elif [[ ! $GoogleCheck ]] ; then
echo -e "\e[0;1mGoogle Cloud detected!"
IP="$(echo $GoogleCloud)"
echo -e "\e[37;1mGoogle Cloud detected!"
IP="$(echo $GoogleCloud)"
fi

else
echo -e "\e[0;1mCustom VPS detected!"
echo -e "\e[37;1mCustom VPS detected!"
IP="$(curl -s ipconfig.io)"
CustomVPS="True"
fi

echo -e "\e[0m"
echo -e "\e[32;1m[+] Checking Docker installation..\e[0;1m"
echo -e "\e[32;1m[+] Checking Docker installation..\e[37;1m"

if docker -v &> /dev/null ; then
if not "$(service docker status | grep Active)" &> /dev/null ; then
sudo systemctl start docker
if ! (( $(ps -ef | grep -v grep | grep docker | wc -l) > 0 )) ; then
sudo service docker start > /dev/null 2>&1
sleep 2
echo -e "\e[37;1mDocker is installed and running!"
else
echo -e "\e[0;1mDocker is installed and running!"
echo -e "\e[37;1mDocker is installed and running!"
fi

else
echo -e "\e[0;1mDocker is not installed!"
echo -e "\e[37;1mDocker is not installed!"
echo -e "\e[0m"
echo -e "\e[32;1m[+] Installing Docker Community Edition..\e[0;1m"
echo -e "\e[32;1m[+] Installing Docker Community Edition..\e[37;1m"

sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y -qq > /dev/null 2>&1
curl -fsSL https://download.docker.com/linux/debian/gpg > apt.key ; sudo apt-key add apt.key > /dev/null 2>&1 ; rm apt.key > /dev/null 2>&1
sudo echo 'deb [arch=amd64] https://download.docker.com/linux/debian buster stable' > /etc/apt/sources.list.d/docker.list
sudo echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
sudo apt-get update > /dev/null 2>&1 ; sudo apt-get remove docker docker-engine docker.io -y -qq > /dev/null 2>&1
sudo apt-get install docker-ce -y -qq > /dev/null 2>&1 ; sudo systemctl start docker > /dev/null 2>&1
echo -e "\e[0;1mDone!"
sudo apt-get install docker-ce -y -qq > /dev/null 2>&1 ; sudo service docker start > /dev/null 2>&1
echo -e "\e[37;1mDone!"
fi

sudo mkdir Cloudtopolis > /dev/null 2>&1 ; sudo mkdir Cloudtopolis/mysql > /dev/null 2>&1 ; sudo mkdir Cloudtopolis/inc > /dev/null 2>&1 ; sudo mkdir Cloudtopolis/import > /dev/null 2>&1 ; sudo mkdir Cloudtopolis/files > /dev/null 2>&1

echo -e "\e[0m"
echo -e "\e[32;1m[+] Installing MySQL Database..\e[0;1m"
sudo docker run --name mysql -v $(pwd)/Cloudtopolis/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD="Cl0udt0p0l1s!" -d mysql:5.7
echo -e "\e[32;1m[+] Installing MySQL Database..\e[37;1m"
sudo docker run --rm --name mysql -v $(pwd)/Cloudtopolis/mysql:/var/lib/mysql -e MYSQL_ROOT_PASSWORD="Cl0udt0p0l1s!" -d mysql:5.7 > /dev/null 2>&1
echo -e "\e[37;1mDone!"

echo -e "\e[0m"
echo -e "\e[32;1m[+] Installing Hashtopolis..\e[0;1m"
sudo docker run --name hashtopolis --link mysql:mysql -v $(pwd)/Cloudtopolis/inc:/var/www/html/inc -v $(pwd)/Cloudtopolis/import:/var/www/html/import -v $(pwd)/Cloudtopolis/files:/var/www/html/files -e H8_USER="admin" -e H8_PASS="Cl0udt0p0l1s!" -d -p 8000:80 kpeiruza/hashtopolis
echo -e "\e[32;1m[+] Installing Hashtopolis..\e[37;1m"
sudo docker run --rm --name hashtopolis --link mysql:mysql -v $(pwd)/Cloudtopolis/inc:/var/www/html/inc -v $(pwd)/Cloudtopolis/import:/var/www/html/import -v $(pwd)/Cloudtopolis/files:/var/www/html/files -e H8_USER="admin" -e H8_PASS="Cl0udt0p0l1s!" -d -p 8000:80 kpeiruza/hashtopolis > /dev/null 2>&1
echo -e "\e[37;1mDone!"

if [[ $CustomVPS ]] ; then
echo -e "\e[0m"
echo -e "\e[32;1m[+] Installing SSH Access..\e[0;1m"
echo -e "\e[32;1m[+] Installing SSH Access..\e[37;1m"

SshDocker="$(docker image ls | grep kartoza)"

if [[ ! $SshDocker ]] ; then
sudo docker build --quiet -t kartoza/ssh git://github.com/timlinux/docker-ssh
sudo docker build --quiet -t kartoza/ssh git://github.com/timlinux/docker-ssh > /dev/null 2>&1
fi

sudo docker run --name ssh --link hashtopolis:hashtopolis -p 2222:22 -d -t kartoza/ssh
sudo docker run --rm --name ssh --network host -d -t kartoza/ssh > /dev/null 2>&1
echo -e "\e[37;1mDone!"
fi

CloudtopolisDB="$(pwd)/Cloudtopolis/mysql/hashtopolis"

if [ ! -d $CloudtopolisDB ] ; then
echo -e "\e[0m"
echo -e "\e[35;1m[!] Cloudtopolis database not found!"
echo -e "\e[31;1m[!] Cloudtopolis database not found!"
sleep 1
echo -e "\e[0;1mWait until setup is finished.."
echo -e "\e[37;1mWait until setup is finished.."
until [ -d $CloudtopolisDB ] ; do [ -d $CloudtopolisDB ] ; done

else
echo -e "\e[0m"
echo -e "\e[36;1m[i] Cloudtopolis database found!"
echo -e "\e[34;1m[i] Cloudtopolis database found!"
sleep 1
echo -e "\e[0;1mRestoring data from last session.."
echo -e "\e[37;1mRestoring data from last session.."
sleep 3
fi

if [[ $CustomVPS ]] ; then
SshHost="$(echo $IP)"
SshPort="2222"
SshPort="22"
SshUser="root"
SshPass="$(docker logs ssh | grep 'root login password' | awk '{print $4}' | tr -d "\n\r")"

echo -e "\e[0m"
echo -e "\e[36;1m[i] VPS Mode Data for Colab:\e[0;1m"
echo -e "VPS = True"
echo -e "SshHost = '$SshHost'"
echo -e "SshPort = '$SshPort'"
echo -e "SshUser = '$SshUser'"
echo -e "SshPass = '$SshPass'"
echo -e "\e[34;1m[i] VPS Mode Data for Colab:\e[37;1m"
echo -e "\e[31;1mVPS = \e[37;1mTrue"
echo -e "\e[31;1mSshHost = \e[37;1m'$SshHost'"
echo -e "\e[31;1mSshPort = \e[37;1m'$SshPort'"
echo -e "\e[31;1mSshUser = \e[37;1m'$SshUser'"
echo -e "\e[31;1mSshPass = \e[37;1m'$SshPass'"
fi

echo -e "\e[0m"
echo -e "\e[36;1m[i] Hashtopolis Credentials:"
echo -e "\e[35;1mUser: \e[0;1madmin"
echo -e "\e[35;1mPassword: \e[0;1mCl0udt0p0l1s!"
echo -e "\e[35;1mUrl: \e[0;4;1mhttp://localhost:8000"
echo -e "\e[0m"
echo -e "\e[36;1m[i] Cloudtopolis is running!"
echo -e "\e[0;1mPress \e[35;1mCTRL+C \e[0;1mto stop.."
echo -e "\e[34;1m[i] Hashtopolis Credentials:"
echo -e "\e[31;1mUser: \e[37;1madmin"
echo -e "\e[31;1mPassword: \e[37;1mCl0udt0p0l1s!"
echo -e "\e[31;1mUrl: \e[37;4mhttp://localhost:8000\e[30m"
echo -e "\e[0m"
echo -e "\e[34;1m[i] Cloudtopolis is running!"
echo -e "\e[37;1mPress \e[31;1mControl+C \e[37;1mto stop.."
echo -e "\e[31;1m"

sudo chown -R 33:33 Cloudtopolis/inc Cloudtopolis/import Cloudtopolis/files
trap 'docker rm -f $(docker container ls -q -a) > /dev/null 2>&1 ; echo ; exit' SIGINT SIGTERM EXIT
trap 'docker rm -f $(docker container ls -q -a) > /dev/null 2>&1 ; echo
echo -e "\e[31;1m[!] Control+C Pressed, exiting!\n\e[0m" ; sleep 2 ; exit' SIGINT SIGTERM EXIT
while true ; do sleep 3600 ; done
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<<<<<<< Updated upstream
<p align="center"><img width=550 alt="Cloudtopolis" src="https://raw.githubusercontent.com/JoelGMSec/Cloudtopolis/master/Cloudtopolis.png"></p>
=======
<p align="center"><img width=550 alt="Cloudtopolis" src="https://raw.githubusercontent.com/JoelGMSec/Cloudtopolis/master/Resources/Design/Cloudtopolis.png"></p>
>>>>>>> Stashed changes

**Cloudtopolis** is a tool that facilitates the installation and provisioning of Hashtopolis on the Google Cloud Shell platform, quickly and completely unattended (and also, free!). Together with Google Collaboratory, it allows us to break hashes without the need for dedicated hardware from any browser.
Expand Down Expand Up @@ -65,7 +69,7 @@ By default, only Rockyou is selected to load at startup.

### The detailed guide of use can be found at the following link:

https://darkbyte.net/cloudtopolis-rompiendo-hashes-en-la-nube-gratis
https://darkbyte.net/cloudtopolis-actualizacion-y-guia-de-uso-completa


# License
Expand Down Expand Up @@ -93,7 +97,7 @@ Original idea from **@mxrch**, inspired in *Penglab* --> https://github.com/mxrc
# Contact
This software does not offer any kind of guarantee. Its use is exclusive for educational environments and / or security audits with the corresponding consent of the client. I am not responsible for its misuse or for any possible damage caused by it.

For more information, you can find me on Twitter as [@JoelGMSec](https://twitter.com/JoelGMSec) and on my blog [darkbyte.net](https://darkbyte.net).
For more information, you can contact through info@darkbyte.net


# Support
Expand Down
Binary file added Resources/Client/Cloudtopolis.exe
Binary file not shown.
Loading

0 comments on commit 26ba98b

Please sign in to comment.