• Stars
    star
    1,726
  • Rank 26,356 (Top 0.6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Deep Learning Approach for Password Guessing (https://arxiv.org/abs/1709.00440)

PassGAN

This repository contains code for the PassGAN: A Deep Learning Approach for Password Guessing paper.

The model from PassGAN is taken from Improved Training of Wasserstein GANs and it is assumed that the authors of PassGAN used the improved_wgan_training tensorflow implementation in their work. For this reason, I have modified that reference implementation in this repository to make it easy to train (train.py) and sample (sample.py) from. This repo contributes:

  • A command-line interface
  • A pretrained PassGAN model trained on the RockYou dataset

Getting Started

# requires CUDA 8 to be pre-installed
pip install -r requirements.txt

Generating password samples

Use the pretrained model to generate 1,000,000 passwords, saving them to gen_passwords.txt.

python sample.py \
	--input-dir pretrained \
	--checkpoint pretrained/checkpoints/195000.ckpt \
	--output gen_passwords.txt \
	--batch-size 1024 \
	--num-samples 1000000

Training your own models

Training a model on a large dataset (100MB+) can take several hours on a GTX 1080.

# download the rockyou training data
# contains 80% of the full rockyou passwords (with repeats)
# that are 10 characters or less
curl -L -o data/train.txt https://github.com/brannondorsey/PassGAN/releases/download/data/rockyou-train.txt

# train for 200000 iterations, saving checkpoints every 5000
# uses the default hyperparameters from the paper
python train.py --output-dir output --training-data data/train.txt

You are encouraged to train using your own password leaks and datasets. Some great places to find those include:

Results

I've yet to do an exhaustive analysis of my attempt to reproduce the results from the PassGAN paper. However, using the pretrained rockyou model to generate 10โธ password samples I was able to match 630,347 (23.97%) unique passwords in the test data, using a 80%/20% train/test split.

In general, I am somewhat surprised (and dissapointed) that the authors of PassGAN referenced prior work in the ML password generation domain but did not compare their results to that research. My initial experience with PassGAN leads me to believe that it would significantly underperform both the RNN and Markov-based approaches mentioned in that paper and I hope that it is not for this reason that the authors have chosen not to compare results.

Attribution and License

This code is released under an MIT License. You are free to use, modify, distribute, or sell it under those terms.

The majority of the credit for the code in this repository goes to @igul222 for his work on the improved_wgan_training. I've simply modularized his code a bit, added a command-line interface, and specialized it for the PassGAN paper.

The PassGAN research and paper was published by Briland Hitaj, Paolo Gasti, Giuseppe Ateniese, Fernando Perez-Cruz.

More Repositories

1

wifi-cracking

Crack WPA/WPA2 Wi-Fi Routers with Airodump-ng and Aircrack-ng/Hashcat
10,642
star
2

naive-hashcat

Crack password hashes without the fuss ๐Ÿˆ
C
1,075
star
3

chattervox

๐Ÿ“ก An AX.25 packet radio chat protocol with support for digital signatures and binary compression. Like IRC over radio waves.
TypeScript
743
star
4

whonow

A "malicious" DNS server for executing DNS Rebinding attacks on the fly (public instance running on rebind.network:53)
JavaScript
615
star
5

dns-rebind-toolkit

A front-end JavaScript toolkit for creating DNS rebinding attacks.
JavaScript
481
star
6

sniff-probes

Plug-and-play bash script for sniffing 802.11 probes requests ๐Ÿ‘ƒ
Shell
231
star
7

apibuilder

Easy API builder mini library for PHP
PHP
202
star
8

host-validation

Express.js middleware for "Host" and "Referer" header validation to protect against DNS rebinding attacks.
JavaScript
190
star
9

distributed-password-cracking

Borrow CPU cycles from visitor's web browsers to crack MD5 password hashes ๐Ÿ˜ฒ
JavaScript
180
star
10

midi-rnn

Generate monophonic melodies with machine learning using a basic LSTM RNN
Python
155
star
11

ProbeKit

SSID Probe Request Collection Workshop
JavaScript
133
star
12

keras_weight_animator

Save keras weight matrices as short animated videos during training
Python
105
star
13

ml4music-workshop

Machine Learning for Music and Sound Synthesis workshop
Jupyter Notebook
104
star
14

GloVe-experiments

GloVe word vector embedding experiments (similar to Word2Vec)
Python
60
star
15

radio-thermostat

Radio Thermostat CT50 & CT80 REST API notes
32
star
16

letterpress

A nefarious keylogger for Ubuntu. Encrypts keylogs and uploads to pastebin.
Python
26
star
17

the-wandering-dreamer

The Wandering Dreamer: An Synthetic Feedback Loop
JavaScript
22
star
18

pw

Generate strong passwords using /dev/urandom ๐Ÿ‘ป
Shell
15
star
19

markov-passwords

Markov-chain password generator
Python
13
star
20

chattervox-examples

A collection of example applications and use cases for the Chattervox protocol
Python
11
star
21

quartzite

Auto-log screenshots and metadata to your personal cloud server when surfing the web
PHP
11
star
22

xmrig-k8s

Mine Monero using leftover resources in a Kubernetes cluster
10
star
23

aprsc-docker

A dockerized aprsc APRS-IS server
Dockerfile
10
star
24

chirp-files

A collection of notable radio frequencies near Philadelphia PA and beyond
9
star
25

chattervox-keys

A public chattervox key server ๐Ÿ”‘
Python
9
star
26

cve

A collection of vulnerabilities found through independent security research.
8
star
27

DreamMachines

Research into using Machine Learning to hallucinate circuit board schematics
KiCad Layout
8
star
28

pokemods

A small collection of Pokรฉmon Red & Blue Gameboy game mods.
Assembly
7
star
29

attacker-personas

๐Ÿดโ€โ˜ ๏ธ Use attacker personas to improve your threat modeling and cybersecurity practices
7
star
30

vanity-keygen

A vanity key generator for the P224, P256, P384, and P521 elliptic curves.
Go
7
star
31

go-runway

A small Go module for interfacing with RunwayML
Go
7
star
32

helm-charts

A small collection of helm charts
HTML
6
star
33

ofTutoring

Course repository for 1-on-1 openFrameworks/C++ tutoring
6
star
34

markov

A small Markov chain generator ๐Ÿ“ƒ
Go
5
star
35

distance-sort

Sort geographic locations by their distance from eachother
Python
5
star
36

twilio-cleverbot

Talk to Cleverbot from your phone
JavaScript
4
star
37

BetweenTheTwoOfThese

Custom openFrameworks applications for an 80ft projection installation in Atlanta
C++
4
star
38

spectrum-wrangler-docker

A Dockerized version of Spectrum Wrangler that downloads and geo indexes public FCC license data
Dockerfile
4
star
39

indexd

Archive and connect independent artists websites
PHP
4
star
40

exchatter

A personalized chatbot framework for Node js
JavaScript
4
star
41

application-security-workshop

HTML
4
star
42

LANlockED

PirateBox style LAN tutorial website for EmptyBox
HTML
3
star
43

LEDWallVideoPlayer

Video player application for the Moment LED wall installation at Dolby Labs
C++
3
star
44

pastebin-mirror-docker

A dockerized version of the pastebin-mirror service.
Dockerfile
3
star
45

manifesto

A young art and technologist's manifesto
3
star
46

picamstreaming

Stream directly to Youtube from the Raspberry Pi camera module
Python
2
star
47

thisisatrackingdevice

An interactive map to display data from a public tracking device project
Processing
2
star
48

osm-museums

Open Street Maps data for all museums on earth (36,694 as of June 5th, 2017)
Python
2
star
49

gpssandbox

Sandbox to play with gps/gpx data visualization using google maps api
Processing
2
star
50

kiss-tnc

Talk to a packet radio KISS TNC over a serial port.
JavaScript
2
star
51

runway-glove

A Runway model for experimenting with GloVe vector embeddings
Python
2
star
52

rtl-433-influxdb-importer

Import data from an Acurite 5-in-1 weather station into influxdb
Python
2
star
53

osm-syria-poi

Open Street Maps data for cultural/historic points of interest in Syria
Python
2
star
54

ofxCanvasEvents

Broadcasts mouse, touch, and key events from an HTML5 Canvas to an openFrameworks app
JavaScript
2
star
55

P5AlbersColorTheory

Materials for an introduction to P5.js lecture themed around Josef Albers inspired color theory.
JavaScript
1
star
56

projectortracking

A sandbox repo for projects aimed to make any projector touch screen
Processing
1
star
57

OculusWebcamExperiments

Experimental webcam projects for the Oculus Rift. Built with openFrameworks.
C++
1
star
58

nodesandbox

A sandbox repo for node.js + RPi experiments
JavaScript
1
star
59

ChessEmbeddings

GloVe vector embeddings of chess moves
Jupyter Notebook
1
star
60

ofBook_IntroToGraphics

1
star
61

looplamp

Raspberry Pi + Node.js interactive lamp project
JavaScript
1
star
62

ml-sandbox

Machine Learning sandbox
Python
1
star
63

brannondorsey.com

My portfolio website
PHP
1
star
64

tvtalker-app

TVTalker Display app made with openFrameworks
C++
1
star
65

website

Personal Website. Using Kirby CMS.
PHP
1
star
66

scarecrow

A Node.js chat bot that learns.
JavaScript
1
star
67

oculusself

Self reflection with the Oculus Rift
C++
1
star
68

OpenNIWebSocketDaemon

Stream depth and skeleton tracking data from OpenNI2 + NiTE2 to the browser via WebSockets
JavaScript
1
star
69

UBox

Generalized modular framework to create software like PirateBox or LibraryBox
JavaScript
1
star
70

oFMaskTool

C
1
star
71

webconnections

A node.js powered command-line app for illustrating the degrees of separation between webpages
JavaScript
1
star
72

brbxoxo

PHP
1
star
73

vectorpi

C++
1
star
74

LEDWallInteractive

Interactive scenes for the Moment LED wall installation at Dolby Labs (Authored by Jason Van Cleave and Brannon Dorsey)
C++
1
star
75

exes

A romantic artificial intelligence project
Python
1
star
76

zetamaze

Repo for the Zetamaze threejs project
JavaScript
1
star
77

ProgrammingForArtists

Art && Programming Lecture @ The School of the Art Institute of Chicago, March 2017
JavaScript
1
star