From 02f79fecf9fa49f3271beb0fc7e3c859e1920979 Mon Sep 17 00:00:00 2001 From: Marc Jones Date: Wed, 5 Feb 2014 17:09:01 -0500 Subject: updated crpto word list --- cryptology.txt | 400 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- main.py~ | 264 ------------------------------------- 2 files changed, 399 insertions(+), 265 deletions(-) delete mode 100755 main.py~ diff --git a/cryptology.txt b/cryptology.txt index 36a4312..eac5bba 100644 --- a/cryptology.txt +++ b/cryptology.txt @@ -207,4 +207,402 @@ telnets sftp tls ssl - +asymmetric +key pair +encryption +decryption +private key +public key +certification authority +certificate authority +certificate +cert +CA +encripher +des +data encryption standard +rsa +rivest +shamir +adleman +hash +message digest +fingerprint +md5 +advanced encrption standard +rijndael +block cipher +nist +aes +sha-1 +hmac +hmac-md5 +hmac-sha1 +trust +smartcard +key recovery +key escrow +escrow +ciphers +symmetric +key lengths +cryptosytems +swIPe +JFK +key exchange +security key +macguffin +block cipher +rc4 +key scheduling +cryptanalysis +skc +secret key cryptography +pkc +public key cryptography +hash +encrypt +plaintext +ciphertext +stream cipher +electronic codebook +ecd +cipher block chaining +cbc +xored +xor +exlusive or +cipher feeback +cfb +output feedback +56-bit key +64-bit block +112-bit key +fips +cast-128 +cast 256 +rfc 2144 +rfc 2612 +encryption +idea +128-bit key +rc1 +rc2 +rfc 2268 +rc3 +rc4 +rc5 +rfc 2040 +rc6 +blowfish +twofish +camellia +block-cipher +camellia +rfc 3713 +ipsec +rfc 4312 +openpgp +pgp +rfc5581 +misty1 +rfc 2994 +safer +secure +kasumi +seed +rfc 4269 +aria +rfc 5794 +clefia +rfc 6114 +sms4 +diffie +skipjack +gsm +a5/1 +a5/2 +a5/3 +gprs +gea/0 +gea/1 +gea/2 +gea/3 +gea/4 +kcipher-2 +rfc 7008 +hellman +trap door +alice +bob +eve +rsa +dh +d-h +diffie-hellman +dsa +elgamal +elliptic curve +ecc +ecdsa +pkcs +rfc 6090 +public-key +rfc 3447 +rfc 2898 +x509 +x.509 +rfc 2315 +rfc 5208 +rfc 2985 +certification +certificate +cert +rfc 2986 +personal information exchange +pseudorandom +cramer-shoup +kea +key exchange algorithm +key exchange +luc +merkle +hash +one-way encryption +md2 +rfc 1319 +md4 +rfc 1320 +rfc 6150 +md5 +rfc 1321 +sha +sha-1 +fips +rfc 3174 +sha-224 +sha-256 +sha-384 +sha-512 +sha-1 +sha-3 +ripemd +rfc 4634 +haval +whirlpool +tiger-192 +tiger-128 +tiger-160 +session key +kerberos +rfc 1510 +x509 +x.509 +pki +LEAF +clipper +ees +escrow +fortezza +tessera +rfc 4357 +rfs 5830 +rfc 6986 +rfc 7091 +ibe +identity-based +weil pairing +rfc 5091 +ibcs +rfc 4301 +rfc 4302 +rfc 4303 +rfc 4304 +rfc 4305 +rfc 5996 +ike +rfc 2407 +isakmp +rfc 2408 +rfc 2409 +skeme +rfc 4307 +rfc 4308 +rfc 4309 +cbc-mac +esp +rfc 4359 +rfc 4434 +aes-xcbc-orf +rfc 2403 +rfc 2405 +rfc 2410 +rfc 2412 +rfc 2451 +photuris +rfc 2522 +rfc 2523 +oakley +mdc +rfc 6239 +ssh +secure shell +rfc 6379 +pgp +pretty good privacy +dss +idea +cast +3des +rfc 2440 +pem +rfc 1421 +rfc 1422 +rfc 1423 +rfc 1424 +pct +private communication technology +set +sepp +s-http +s/mime +rfc 2311 +rfc 2312 +ssl +rfc 6101 +sgc +sasl +rfc 4505 +skip +truecrypt +rfc 2459 +rfc 2510 +rfc 2527 +chap +mod +tdea +spi +esp +rfc 3686 +tls +ssl +rfc 6101 +fts +989 +990 +993 +imaps +993 +ldaps +636 +nntps +563 +pop3s +995 +telnets +992 +dtls +rfc 6347 +serpant +cipher +ssh +otp +spki +wts +gcm +ccm +eax +panama +sosemanuk +salsa20 +xsalsa20 +aes +rijndael +rc6 +mars +twofish +serpent +cast-256 +idea +Triple-des +des-ede2 +des-ede3 +camellia +seed +rc5 +blowfish +tea +xtea +skipjack +shacal-2 +ecb +cbc +cts +cfb +ofb +ctr +counter mode +ciphertext +vmac +hmac +gmac +gcm +cmac +cbc-mac +dmac +tow-track-mac +sha-1 +sha-224 +sha-256 +sha-384 +sha-512 +sha-3 +tiger +whirlpool +ripemd +rsa +dsa +elgamal +nyberg-rueppel +rabin-williams +luc +lucelg +dlies +dhaes +esign +pkcs +oaep +pss +pssr +emsa +emsa5 +dh +diffie-hellman +menezes-qu-vanstone +mqv +lucdif +xtr-dh +ecdsa +ecnr +ecies +ecdh +ecmqv +arc4 +seal +wake-ofb +desx +des-xex3 +rc2 +safer +3-way +gost +shark +cast +prng +urandom +random +scep +rtc +ocsp +cms +gost diff --git a/main.py~ b/main.py~ deleted file mode 100755 index 9dc8af5..0000000 --- a/main.py~ +++ /dev/null @@ -1,264 +0,0 @@ -#!/usr/bin/python -#example command - -from optparse import OptionParser -import os -import re -import sys -import datetime -import string - -report = {} -wordscore = {} -filescore = {} -filelist = list() -skipped = 0 -opened = 0 -datasize = 0 -progresstext = "" - -def sortscore(score, reverse=False): - sortedscore = sorted(score.items(), key=lambda score: score[1], reverse=reverse) - returnscore = [] - for s in sortedscore: - if s[1] > 0: - returnscore.append(s) - - return returnscore - -def printscore(report): - for i in report: - print i[0] + ':' + str(i[1]) - -def scorewords(report): - for file in report.keys(): - for word in report[file].keys(): - if not word in wordscore: - wordscore[word] = 0 - if not file in filescore: - filescore[file] = 0 - wordscore[word] += report[file][word] - return wordscore - -def scorefile(report): - for file in report.keys(): - for word in report[file].keys(): - if not word in wordscore: - wordscore[word] = 0 - if not file in filescore: - filescore[file] = 0 - filescore[file] += report[file][word] - return filescore - -def summary(report): - filescore = scorefile(report) - text = "" - for file in sortscore(filescore): - text += file[0] + '(' + str(file[1]) + '):' - for word in report[file[0]].keys(): - if report[file[0]][word] > 0: - text += word + '(' + str(report[file[0]][word]) + ');' - text += '\n' - return text - -def wholeword(word, string): - re.purge() - matches = [] - - if word.isdigit(): - int(word) - regexNum = r'([^0-9]|\b)(' + word + r')([^0-9]|\b)' - mN = re.search(regexNum, string) - if "groups" in dir(mN): - matches.append(mN.groups()) - - else: - regexU = r'([A-Z]|[^a-zA-Z]|\b)(' + word.lower() + r')([A-Z]|[^a-zA-Z]|\b)' - regexL = r'([a-z]|[^a-zA-Z]|\b)(' + word.upper() + r')([a-z]|[^a-zA-Z]|\b)' - mU = re.search(regexU, string) - if "groups" in dir(mU): - matches.append(mU.groups()) - re.purge() - mL = re.search(regexL, string) - if "groups" in dir(mL): - matches.append(mL.groups()) - return matches - -def skipfile(filename,skippedexts): - if not isinstance(skippedexts, list): - return False - for skip in skippedexts: - if filename.endswith(skip): - return True - return False - -def scoretext(wordlist, text, maxwholewordlen = -1): - score = {} - for word in wordlist: - wordreg = word.replace('-', ' ') - wordreg = wordreg.replace(' ', '['+string.punctuation+' ]*') - if int(len(word)) > int(maxwholewordlen): - matches = [] - m = re.search(wordreg.lower(),text.lower()) - if "groups" in dir(m): - matches.append(m.groups()) - score[word] = len(matches) - else: - score[word] = len(wholeword(wordreg,text)) - return score - -usage = "%prog [options] DIRECTORY ... DIRECTORYN" -epilog = "example: ./main.py ../git.lf/janitor -s .ppt -s .docx -s .pdf -s .xls -s .xlsx -s .gif -s .png -s .jpg -s .css -r fw -w cryptology.txt -c -p -l 3" -parser = OptionParser(usage = usage, epilog = epilog) -parser.add_option("-f", "--file", dest="suspiciousfilename", help="specify file to scan", action="append") -parser.add_option("-w", "--wordlist", dest="wordlistfilename", help="file containing all of the words to look for") -parser.add_option("-s", "--skip", dest="skipfileextensions", help="file extensions to skip", action="append") -parser.add_option("-v", "--verbose", dest="verbose", help="print verberose information", default=False, action="store_true") -parser.add_option("-r", "--report", dest="printreport", default="wf", help="print score") -parser.add_option("--show-wordlist", dest="show_wordlist", default=False, help="print list of words to detect", action="store_true") -parser.add_option("-c", "--display-counts", dest="display_counts", default=False, help="Show the num ber of files processed", action="store_true") -parser.add_option("-p", "--display_progress", dest="display_progress", default=False, help="show percentage complete", action="store_true") -parser.add_option("-l", "--max-wholeword-length", dest="maxwholewordlength", type="int", default=-1, help="maximun length of a word allowed to only find matches on whole word") -parser.add_option("-o", "--summary-file", dest="summaryfile", help="name of the file to store the summary in") -parser.add_option("-x", "--display-summary", dest="displaysummary", default=False, help="Display a summary from the summary file", action="store_true") -parser.add_option("-X", "--dont-display-summary", dest="dontdisplaysummary", default=False, help="Dont Display a summary after running a scan", action="store_true") - -(options, args) = parser.parse_args() - -if options.wordlistfilename: - wordlist = list(set(open(options.wordlistfilename).read().lower().strip().split('\n'))) - -if options.show_wordlist: print wordlist; exit() - -if options.displaysummary and options.summaryfile: - report = dict() - try: - summaryfile = open(options.summaryfile) - except: - print "no summary file: " + options.summaryfile - exit() - #sample input - #../bzr.lf/lsb/devel/build_env/headers/x86-64/4.1/glib-2.0/gio/gmenuexporter.h.defs(1): export(1); - for line in summaryfile: - #find the file name which is before the matching parathsis before the last colon on the line - filename = line[:line[:line.rfind(':')].rfind('(')] - #find the total number of words found by locating the end of the filename and taking the number in parathesis right before the : - totalfilecount = line[line[:line.rfind(':')].rfind('(')+1:line[:line.rfind(':')].rfind(')')] - #find the list of words following the :, and split them by the ;, and then drop the last item on the list which is always a \n - foundwords = line[line.rfind(':')+1:].split(';')[:-1] - report[filename] = dict() - for w in foundwords: - w = w.strip() - word = w[:w.find('(')] - wcount = w[w.find('(')+1:w.find(')')] - report[filename][word] = int(wcount) - - if options.printreport: - if options.printreport == "f": - printscore(sortscore(scorefile(report))) - elif options.printreport == "w": - printscore(sortscore(scorewords(report))) - elif options.printreport == "wf" or options.printreport == "fw": - print summary(report) - else: - print summary(report) - exit() - - -for a in args: - #filelist.append(a) - for (path, dirs, files) in os.walk(a): - if 'CVS' in dirs: - dirs.remove('CVS') - if '.git' in dirs: - dirs.remove('.git') - if '.bzr' in dirs: - dirs.remove('.bzr') - if '.hg' in dirs: - dirs.remove('.hg') - if '.svn' in dirs: - dirs.remove('.svn') - - for file in files: - filelist.append(path + '/' + file) - -if options.suspiciousfilename: - filelist += options.suspiciousfilename - -start = datetime.datetime.now() -for file in filelist: - if skipfile(file, options.skipfileextensions): - skipped += 1 - continue - try: - f = open(file) - except: - print "failed to open: " + file - continue - opened +=1 - now = datetime.datetime.now() - estimate = (((now - start) / (opened + skipped)) * len(filelist)) - if options.display_progress: - print '\r' + " " * len(progresstext) + '\r', - progresstext = str(((opened + skipped)*1.0/len(filelist))*100)[:5] + '% '+ " time left:" + str(estimate).split('.')[0] + ' ' + file + '\r' - print progresstext, - sys.stdout.flush() - filecontents = f.read() - datasize += len(filecontents) - filenamescore = scoretext(wordlist, file, options.maxwholewordlength) - filecontentsscore = scoretext(wordlist, filecontents, options.maxwholewordlength) - report[file] = {} - for k in filecontentsscore.keys(): - report[file][k] = filenamescore[k] + filecontentsscore[k] - -if options.display_progress: - print '\r' + " " * len(progresstext) + '\r', - -if options.printreport and not options.dontdisplaysummary: - if options.printreport == "f": - printscore(sortscore(scorefile(report))) - elif options.printreport == "wf" or options.printreport == "fw": - print summary(report) - else: - printscore(sortscore(scorewords(report))) - -if options.display_counts: - print "total files:" + str(len(filelist)) , - print "suspicious files:" + str(len(sortscore(scorefile(report)))) , - print "skipped files:" + str(skipped) , - print "searched:" + str(datasize) + 'B', - print "time:" + str(datetime.datetime.now() - start).split('.')[0] - -if options.summaryfile and len(filelist) > 0 and not options.displaysummary: - summaryfilename = options.summaryfile - counter = 0 - while os.path.isfile(summaryfilename): - counter +=1 - summaryfilename = options.summaryfile + '.' + str(counter) - try: - if counter > 1: print "saving as " + summaryfilename + "...." - summaryfile = open(summaryfilename, 'w+') - summaryfile.write(summary(report)) - summaryfile.close() - except: - print report - print "error saving summary as " + summaryfilename - - -def test(): - print wholeword("22", "port22") - print wholeword("22", "22") - print wholeword("22", ":22'") - print wholeword("22", "223") - print wholeword("22", "open('22')") - print wholeword("ear","bearth") - print wholeword("ear","BearTH") - print wholeword("ear","bEARth") - print wholeword("ear","ear_") - print wholeword("ear","ear()") - print wholeword("ear","ear.") - print wholeword("ear","ear:") - print wholeword("ear","ear\n\r") - print wholeword("ear","myEAR() MYear: myEAR()") - -#test() -- cgit v1.2.1