#!/bin/sh # # Wi-Fi Security: Attack and Defense # by by ternarybit (austindcc@gmail.com) # 2600 Magazine, Vol. 30, No. 4 # # Filename: netgear-psk.sh # Usage: ./netgear-psk.sh adj-verbs animals numbers netgear.lst # # NETGEAR has not randomly chosen any two words - they are two fairly common # words in a grammatically correct order. After some searching and hacking, # I came up with a reasonably comprehensive list of common adjectives and # present-tense verbs which came to only 1,715 words. A list of common animals # came in much smaller, at only 171 words. I didn't include highly esoteric # animals (like archaeopteryx), or very specific ones (like saber-toothed tiger # - just tiger). I also didn't include adjectives or verbs that a NETGEAR # customer would view as offensive or inappropriate. Somehow, PSKs like # 'murderinglion666' and 'sexygorilla690' seem unlikely. I used Crunch in # much the same way as the example above to create a list of all 1,000 # 3-digit numbers, and wrote this simple script to combine them into a master # PSK list. PRE=$1 SUF=$2 NUM=$3 OUT=$4 echo "Creating a list of all combinations of the files: \033[01;32m$PRE + $SUF + $NUM\033[00m" echo "And saving in wordlist file: \033[01;32m$OUT\033[00m" TOTAL=$(expr $(wc -l < $PRE) '*' $(wc -l < $SUF) '*' $(wc -l < $NUM)) echo echo "Total combinations: \033[01;32m$TOTAL\033[00m" echo "\033[01;31mFor large dictionaries, this will take significant time and disk space.\033[00m" echo while read PREFIX do while read SUFFIX do while read NUMBER do echo $PREFIX$SUFFIX$NUMBER >> $OUT done < $NUM done < $SUF done < $PRE echo "Done." exit 0