Crafting tailored wordlists with Wordsmith

Sanjiv Kawa & Tom Porter
Crafting tailored wordlists with Wordsmith
BSides LV 2016
Formalities
Tom’s the guy with the beard
www.porterhau5.com
@porterhau5
Sanjiv’s the Canadian
www.popped.io
@skawasec
PSC – Proprietary and Confidential. All Rights Reserved. 2
• Penetration Testers at PSC - www.paysw.com
• PSC specializes in PCI assessments
• Our day-to-day activities consist of attacking large
enterprise networks and searching for CHD
What do you guys do?
PSC – Proprietary and Confidential. All Rights Reserved. 3
• Wordsmith generates wordlists for dictionary attacks!
• Wordlists can be used on their own or as a supplement
• Uses geo-location data from U.S. States to create
wordlists
What’s Wordsmith?
PSC – Proprietary and Confidential. All Rights Reserved. 4
• Authentication process
• Dictionary attacks
• 8 slides total!
Quick primer
PSC – Proprietary and Confidential. All Rights Reserved. 5
• We have something else you can do during the primer!
• First 10 people who tweet the correct answer will get
some swag
• Or go and check out Wordsmith here:
https://github.com/skahwah/wordsmith
For those who already know this
PSC – Proprietary and Confidential. All Rights Reserved. 6
• What hash format is this? (hint wpad)
Question
PSC – Proprietary and Confidential. All Rights Reserved. 7
Back to the primer
PSC – Proprietary and Confidential. All Rights Reserved. 8
Primer (1/8): Authentication process
PSC – Proprietary and Confidential. All Rights Reserved. 9
• On submit, convert the password into a hashed
representative
Primer (2/8): Password converted to hash
PSC – Proprietary and Confidential. All Rights Reserved. 10
Primer (3/8): Credentials sent to authentication
server
PSC – Proprietary and Confidential. All Rights Reserved. 11
• Backend DB holds passwords for all users in a hashed state
• Check to see if hashes match
if userSuppliedCreds == userStoredCreds
allow logon :)
else
deny logon :(
Primer (4/8): Credentials validated
PSC – Proprietary and Confidential. All Rights Reserved. 12
• How do we “convert” a hash back to a cleartext
password?
• No direct way. However, we can do a dictionary attack.
Primer (5/8): password == hash, right?
PSC – Proprietary and Confidential. All Rights Reserved. 13
• Large lists containing common words
• Sometimes compiled from passwords obtained in
breaches (LinkedIn, Yahoo, Adobe, AM, etc.)
• Dictionaries we use:
– Rockyou (free)
– Uniq (paid, but worth it)
– top10k (free)
– yahoo (free)
– linkedin (free)
Primer (6/8): What are dictionaries?
PSC – Proprietary and Confidential. All Rights Reserved. 14
A couple of pre-requisites:
1. A solid dictionary (also known as wordlist)
2. Need to know the hash type (md5, sha1, NTLM,
NetNTLMv2, etc)
3. A list of password hashes (typically exfiltrated in post-
exploitation)
Primer (7/8): Dictionary attacks
PSC – Proprietary and Confidential. All Rights Reserved. 15
Primer (8/8): Conducting a dictionary attack
1. Guess
2. Encrypt
3. Compare
apple
banana
cherry
…
$hash <- encrypt(apple)
$hash : 5ebe7dfa074da8ee8aef1faa2bbde876
Search for $hash in obtained hash list:
af5432a79b941528fa7fac9e7e391651
5ebe7dfa074da8ee8aef1faa2bbde876
8846f7eaee8fb117ad06bdd830b7586c
PSC – Proprietary and Confidential. All Rights Reserved. 16
• Lets move on to Wordsmith
Primers done
PSC – Proprietary and Confidential. All Rights Reserved. 17
• Wordsmith generates wordlists for dictionary attacks!
• Wordlists can be used on their own or as a supplement
• Uses geo-location data from U.S. States to create
wordlists
A quick re-cap on Wordsmith
PSC – Proprietary and Confidential. All Rights Reserved. 18
What kind of geo-location data is in a wordlist?
Landmarks
Sports teams
Cities, towns, etc
Streets/Roads
Zip codes
Area codes
Common names
Colleges
PSC – Proprietary and Confidential. All Rights Reserved. 19
• Saw more geo-location related passwords during
engagements
• Thought it would be a cool project
• Improve overall password cracking efficacy
• Limit guess-encrypt compare cycles
Why geo-location data?
PSC – Proprietary and Confidential. All Rights Reserved. 20
*Wikipedia, US Census and Open Street Map
Where is all of this data coming from?
PSC – Proprietary and Confidential. All Rights Reserved. 21
How Wordsmith works
PSC – Proprietary and Confidential. All Rights Reserved. 22
• Initial git clone (~20 MB)
Wordsmith files
PSC – Proprietary and Confidential. All Rights Reserved. 23
First run
• On first run, data.tar.gz is unpacked (1 second, 175 MB)
PSC – Proprietary and Confidential. All Rights Reserved. 24
• ./wordsmith/data/
• All lookups are done offline (speed & efficiency).
File structure and data lookup
PSC – Proprietary and Confidential. All Rights Reserved. 25
Word is kept in its original form (special characters included)
Freemont St.
You can also use the “-m” flag for basic mangling!
Freemont St.
Freemont St
Freemont
St.
St
FreemontSt.
FreemontSt
Sort & Uniq to remove all duplicate words
downcase()
Min character length
What does a wordlist look like?
PSC – Proprietary and Confidential. All Rights Reserved. 26
Demo time
PSC – Proprietary and Confidential. All Rights Reserved. 27
Statistics and results
PSC – Proprietary and Confidential. All Rights Reserved. 28
• Hash cracking rig
• Get our hands on REAL NTLM hashes
– Massachusetts 404 hashes
– Wisconsin 2011 hashes
– New York 542 hashes
Pre-requisites
PSC – Proprietary and Confidential. All Rights Reserved. 29
• Software
– hashcat.net
• Hardware
– NVidia GRID K520
• 3617 MH/s – nothing too crazy, but it does the trick
– 1 MH/s is 1,000,000 hashes per second
• Build your own cracking rig:
https://www.popped.io/2016/07/steps-to-create-aws-
hash-cracking-rig.html
Hash cracking rig
PSC – Proprietary and Confidential. All Rights Reserved. 30
• Crack hashes for each U.S. State using common
wordlists and rules
• Crack hashes for each U.S. State using a Wordsmith
wordlist for the particular State
• ruby wordsmith.rb –s WI –a –m –o wi.txt
Test Cases
PSC – Proprietary and Confidential. All Rights Reserved. 31
State NTLM Hashes Wordsmith
Wordlist
Wisconsin 2011 112k
Massachusetts 404 82k
New York 542 158k
Input Parameters for Cracking Session
1. Guess
2. Encrypt
3. Compare
Wordlists:
• Top10k (10k)
• Rockyou (14.4m)
• Wordsmith
• WI, MA, NY
NTLM Hash (NT)
Based on MD4
Common on Active Directory domains
Hashes obtained from various clients:
Wisconsin-hashes.txt (2011 hashes)
Massachusetts-hashes.txt (404 hashes)
Newyork-hashes.txt (542 hashes)
Rule set:
• D3adhob0 (57.5k rules)
PSC – Proprietary and Confidential. All Rights Reserved. 32
Results!
PSC – Proprietary and Confidential. All Rights Reserved. 33
• 2011 NTLM Hashes
Wisconsin results
Wordlist Hashcat
run time
Number of
passwords recovered
Top10k
(10k words)
2 secs
Rockyou
(14.4m words)
27 mins
Wisconsin.txt
(112k words)
12 secs
237
12%
1094
54%
229
11%
77%
PSC – Proprietary and Confidential. All Rights Reserved. 34
• 404 NTLM Hashes
Massachusetts results
Wordlist Hashcat
run time
Number of
passwords recovered
Top10k
(10k words)
1 sec
Rockyou
(14.4m words)
24 mins
Massachusetts.txt
(82k words)
12 secs
52
13%
262
65%
56
14%
92%
PSC – Proprietary and Confidential. All Rights Reserved. 35
• 542 NTLM Hashes
New York results
Wordlist Hashcat
run time
Number of
passwords recovered
Top10k
(10k words)
1 sec
Rockyou
(14.4m words)
26 mins
Newyork.txt
(158k words)
22 secs
0
220
41%
59
11%
52%
PSC – Proprietary and Confidential. All Rights Reserved. 36
• Identifying proper nouns
unique to location
• Time-CPU cycle tradeoff
• At least 11% of
passwords recovered in <
20 seconds
Conclusions
PSC – Proprietary and Confidential. All Rights Reserved. 37
• Data!
– Team rosters, mascots, stadiums
– Famous people
– State symbols
– Motto, song, bird, flower, etc.
– Regional food, cuisine, agriculture
– (h/t Larry Pesce - @haxorthematrix)
• Design
– Modular
– Extend to provinces, territories, countries
– Integrate data look up by coordinates
Next Steps for Wordsmith
PSC – Proprietary and Confidential. All Rights Reserved. 38
• Important to maintain, expand, and improve
• Got any additional data sources or features?
• Pull requests, submit issues, comment, share:
https://github.com/skahwah/wordsmith
Suggestions?
PSC – Proprietary and Confidential. All Rights Reserved. 39
Questions?
Tom’s the guy with the beard
www.porterhau5.com
@porterhau5
Sanjiv’s the Canadian
www.popped.io
@skawasec
https://github.com/skahwah/wordsmith
PSC – Proprietary and Confidential. All Rights Reserved. 40
1 of 40

Recommended

The world is y0ur$: Geolocation-based wordlist generation with wordsmith by
The world is y0ur$: Geolocation-based wordlist generation with wordsmithThe world is y0ur$: Geolocation-based wordlist generation with wordsmith
The world is y0ur$: Geolocation-based wordlist generation with wordsmithSanjiv Kawa
904 views42 slides
The world is y0ur$: Geolocation-based wordlist generation with wordsmith by
The world is y0ur$: Geolocation-based wordlist generation with wordsmithThe world is y0ur$: Geolocation-based wordlist generation with wordsmith
The world is y0ur$: Geolocation-based wordlist generation with wordsmithSanjiv Kawa
719 views42 slides
เทคนิคการค้นหาด้วย Google by
เทคนิคการค้นหาด้วย Googleเทคนิคการค้นหาด้วย Google
เทคนิคการค้นหาด้วย Googlezerostart77777
1.2K views7 slides
Digital Twin: jSON-LD, RDF by
Digital Twin: jSON-LD, RDFDigital Twin: jSON-LD, RDF
Digital Twin: jSON-LD, RDFMd Mazedul Islam Khan
271 views18 slides
Keeping it personal by
Keeping it personalKeeping it personal
Keeping it personaladactio
619 views70 slides
when the link makes sense by
when the link makes sensewhen the link makes sense
when the link makes senseFabien Gandon
2.5K views59 slides

More Related Content

What's hot

"Whatever I can get..." by
"Whatever I can get...""Whatever I can get..."
"Whatever I can get..."Dan Brickley
7K views33 slides
Poster - Completeness Statements about RDF Data Sources and Their Use for Qu... by
Poster - Completeness Statements about RDF Data Sources and Their Use for Qu...Poster - Completeness Statements about RDF Data Sources and Their Use for Qu...
Poster - Completeness Statements about RDF Data Sources and Their Use for Qu...Fariz Darari
341 views1 slide
Password hasing algorithms by pad by
Password hasing algorithms by padPassword hasing algorithms by pad
Password hasing algorithms by padPrasad Dhole
668 views19 slides
(Re-) Discovering Lost Web Pages by
(Re-) Discovering Lost Web Pages(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web PagesMichael Nelson
960 views49 slides
Two graph data models : RDF and Property Graphs by
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphsandyseaborne
2.4K views19 slides
Linked Data on Rails by
Linked Data on RailsLinked Data on Rails
Linked Data on RailsPatrick Sinclair
2.5K views58 slides

What's hot(20)

"Whatever I can get..." by Dan Brickley
"Whatever I can get...""Whatever I can get..."
"Whatever I can get..."
Dan Brickley7K views
Poster - Completeness Statements about RDF Data Sources and Their Use for Qu... by Fariz Darari
Poster - Completeness Statements about RDF Data Sources and Their Use for Qu...Poster - Completeness Statements about RDF Data Sources and Their Use for Qu...
Poster - Completeness Statements about RDF Data Sources and Their Use for Qu...
Fariz Darari341 views
Password hasing algorithms by pad by Prasad Dhole
Password hasing algorithms by padPassword hasing algorithms by pad
Password hasing algorithms by pad
Prasad Dhole668 views
(Re-) Discovering Lost Web Pages by Michael Nelson
(Re-) Discovering Lost Web Pages(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web Pages
Michael Nelson960 views
Two graph data models : RDF and Property Graphs by andyseaborne
Two graph data models : RDF and Property GraphsTwo graph data models : RDF and Property Graphs
Two graph data models : RDF and Property Graphs
andyseaborne2.4K views
Scaling Saved Searches at eBay Kleinanzeigen by Andre Charton
Scaling Saved Searches at eBay KleinanzeigenScaling Saved Searches at eBay Kleinanzeigen
Scaling Saved Searches at eBay Kleinanzeigen
Andre Charton1.4K views
Real-time Semantic Web with Twitter Annotations by Joshua Shinavier
Real-time Semantic Web with Twitter AnnotationsReal-time Semantic Web with Twitter Annotations
Real-time Semantic Web with Twitter Annotations
Joshua Shinavier5.7K views
semlavssws2015 by hala Skaf
semlavssws2015semlavssws2015
semlavssws2015
hala Skaf452 views
Thinking in documents by César Rodas
Thinking in documentsThinking in documents
Thinking in documents
César Rodas1.2K views
Linked Data and Tools by Pedro Szekely
Linked Data and ToolsLinked Data and Tools
Linked Data and Tools
Pedro Szekely1.1K views
쉽게 이해하는 LOD by Myungjin Lee
쉽게 이해하는 LOD쉽게 이해하는 LOD
쉽게 이해하는 LOD
Myungjin Lee118.7K views
NdFluents: An Ontology for Annotated Statements with Inference Preservation by José M. Giménez-García
NdFluents: An Ontology for Annotated Statements with Inference PreservationNdFluents: An Ontology for Annotated Statements with Inference Preservation
NdFluents: An Ontology for Annotated Statements with Inference Preservation
Coffee, Danish & Search: Presented by Alan Woodward & Charlie Hull, Flax by Lucidworks
Coffee, Danish & Search: Presented by Alan Woodward & Charlie Hull, FlaxCoffee, Danish & Search: Presented by Alan Woodward & Charlie Hull, Flax
Coffee, Danish & Search: Presented by Alan Woodward & Charlie Hull, Flax
Lucidworks304 views
Perl DBI Scripting with the ILS by Roy Zimmer
Perl DBI Scripting with the ILSPerl DBI Scripting with the ILS
Perl DBI Scripting with the ILS
Roy Zimmer860 views
Consuming Linked Data by Machines - WWW2010 by Juan Sequeda
Consuming Linked Data by Machines - WWW2010Consuming Linked Data by Machines - WWW2010
Consuming Linked Data by Machines - WWW2010
Juan Sequeda985 views

Similar to Crafting tailored wordlists with Wordsmith

Ppsp icassp17v10 by
Ppsp icassp17v10Ppsp icassp17v10
Ppsp icassp17v10Gérard Chollet
880 views175 slides
Hash cat by
Hash catHash cat
Hash catSreekanth Narendran
1.6K views16 slides
Frontera распределенный робот для обхода веба в больших объемах / Александр С... by
Frontera распределенный робот для обхода веба в больших объемах / Александр С...Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...Ontico
882 views159 slides
H2O World - Clustering & Feature Extraction on Text - Seth Redmore by
H2O World - Clustering & Feature Extraction on Text - Seth RedmoreH2O World - Clustering & Feature Extraction on Text - Seth Redmore
H2O World - Clustering & Feature Extraction on Text - Seth RedmoreSri Ambati
5.4K views26 slides
2011 and still bruteforcing - OWASP Spain by
2011 and still bruteforcing - OWASP Spain2011 and still bruteforcing - OWASP Spain
2011 and still bruteforcing - OWASP SpainChristian Martorella
858 views47 slides
NoSQL Couchbase Lite & BigData HPCC Systems by
NoSQL Couchbase Lite & BigData HPCC SystemsNoSQL Couchbase Lite & BigData HPCC Systems
NoSQL Couchbase Lite & BigData HPCC SystemsFujio Turner
771 views43 slides

Similar to Crafting tailored wordlists with Wordsmith(20)

Frontera распределенный робот для обхода веба в больших объемах / Александр С... by Ontico
Frontera распределенный робот для обхода веба в больших объемах / Александр С...Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Frontera распределенный робот для обхода веба в больших объемах / Александр С...
Ontico882 views
H2O World - Clustering & Feature Extraction on Text - Seth Redmore by Sri Ambati
H2O World - Clustering & Feature Extraction on Text - Seth RedmoreH2O World - Clustering & Feature Extraction on Text - Seth Redmore
H2O World - Clustering & Feature Extraction on Text - Seth Redmore
Sri Ambati5.4K views
NoSQL Couchbase Lite & BigData HPCC Systems by Fujio Turner
NoSQL Couchbase Lite & BigData HPCC SystemsNoSQL Couchbase Lite & BigData HPCC Systems
NoSQL Couchbase Lite & BigData HPCC Systems
Fujio Turner771 views
Евгений Бобров "Powered by OSS. Масштабируемая потоковая обработка и анализ б... by Fwdays
Евгений Бобров "Powered by OSS. Масштабируемая потоковая обработка и анализ б...Евгений Бобров "Powered by OSS. Масштабируемая потоковая обработка и анализ б...
Евгений Бобров "Powered by OSS. Масштабируемая потоковая обработка и анализ б...
Fwdays501 views
Attack All the Layers - What's Working in Penetration Testing by NetSPI
Attack All the Layers - What's Working in Penetration TestingAttack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration Testing
NetSPI1.2K views
Attack All The Layers - What's Working in Penetration Testing by NetSPI
Attack All The Layers - What's Working in Penetration TestingAttack All The Layers - What's Working in Penetration Testing
Attack All The Layers - What's Working in Penetration Testing
NetSPI1.3K views
Attack All the Layers: What's Working during Pentests (OWASP NYC) by Scott Sutherland
Attack All the Layers: What's Working during Pentests (OWASP NYC)Attack All the Layers: What's Working during Pentests (OWASP NYC)
Attack All the Layers: What's Working during Pentests (OWASP NYC)
Scott Sutherland2K views
Open Security Operations Center - OpenSOC by Sheetal Dolas
Open Security Operations Center - OpenSOCOpen Security Operations Center - OpenSOC
Open Security Operations Center - OpenSOC
Sheetal Dolas4.6K views
DNS как линия защиты/DNS as a Defense Vector by Positive Hack Days
DNS как линия защиты/DNS as a Defense VectorDNS как линия защиты/DNS as a Defense Vector
DNS как линия защиты/DNS as a Defense Vector
Positive Hack Days900 views
PLNOG 5: Eric Ziegast, Zbigniew Jasinski - DNSSEC by PROIDEA
PLNOG 5: Eric Ziegast, Zbigniew Jasinski -  DNSSECPLNOG 5: Eric Ziegast, Zbigniew Jasinski -  DNSSEC
PLNOG 5: Eric Ziegast, Zbigniew Jasinski - DNSSEC
PROIDEA91 views
Techniques for password hashing and cracking by Nipun Joshi
Techniques for password hashing and crackingTechniques for password hashing and cracking
Techniques for password hashing and cracking
Nipun Joshi95 views
Anton Dedov - Testing of password policy by DefconRussia
Anton Dedov - Testing of password policyAnton Dedov - Testing of password policy
Anton Dedov - Testing of password policy
DefconRussia1.3K views
ZeroNights2013 testing of password policy by Anton Dedov
ZeroNights2013 testing of password policyZeroNights2013 testing of password policy
ZeroNights2013 testing of password policy
Anton Dedov5.7K views
Lares from LOW to PWNED by Chris Gates
Lares from LOW to PWNEDLares from LOW to PWNED
Lares from LOW to PWNED
Chris Gates6.4K views

Recently uploaded

DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...ShapeBlue
98 views29 slides
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueShapeBlue
163 views54 slides
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...ShapeBlue
85 views10 slides
NTGapps NTG LowCode Platform by
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform Mustafa Kuğu
365 views30 slides
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TShapeBlue
112 views34 slides
Network Source of Truth and Infrastructure as Code revisited by
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
52 views45 slides

Recently uploaded(20)

DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... by ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue98 views
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue by ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlueVNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
VNF Integration and Support in CloudStack - Wei Zhou - ShapeBlue
ShapeBlue163 views
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ... by ShapeBlue
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
Live Demo Showcase: Unveiling Dell PowerFlex’s IaaS Capabilities with Apache ...
ShapeBlue85 views
NTGapps NTG LowCode Platform by Mustafa Kuğu
NTGapps NTG LowCode Platform NTGapps NTG LowCode Platform
NTGapps NTG LowCode Platform
Mustafa Kuğu365 views
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T by ShapeBlue
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&TCloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
CloudStack and GitOps at Enterprise Scale - Alex Dometrius, Rene Glover - AT&T
ShapeBlue112 views
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P... by ShapeBlue
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
Developments to CloudStack’s SDN ecosystem: Integration with VMWare NSX 4 - P...
ShapeBlue154 views
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online by ShapeBlue
KVM Security Groups Under the Hood - Wido den Hollander - Your.OnlineKVM Security Groups Under the Hood - Wido den Hollander - Your.Online
KVM Security Groups Under the Hood - Wido den Hollander - Your.Online
ShapeBlue181 views
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... by ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue120 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... by ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue101 views
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O... by ShapeBlue
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
Declarative Kubernetes Cluster Deployment with Cloudstack and Cluster API - O...
ShapeBlue88 views
State of the Union - Rohit Yadav - Apache CloudStack by ShapeBlue
State of the Union - Rohit Yadav - Apache CloudStackState of the Union - Rohit Yadav - Apache CloudStack
State of the Union - Rohit Yadav - Apache CloudStack
ShapeBlue253 views
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates by ShapeBlue
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates
ShapeBlue210 views
The Power of Heat Decarbonisation Plans in the Built Environment by IES VE
The Power of Heat Decarbonisation Plans in the Built EnvironmentThe Power of Heat Decarbonisation Plans in the Built Environment
The Power of Heat Decarbonisation Plans in the Built Environment
IES VE69 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... by ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue138 views
"Surviving highload with Node.js", Andrii Shumada by Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays53 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... by ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue123 views
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue by ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlueCloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
CloudStack Object Storage - An Introduction - Vladimir Petrov - ShapeBlue
ShapeBlue93 views

Crafting tailored wordlists with Wordsmith

  • 1. Sanjiv Kawa & Tom Porter Crafting tailored wordlists with Wordsmith BSides LV 2016
  • 2. Formalities Tom’s the guy with the beard www.porterhau5.com @porterhau5 Sanjiv’s the Canadian www.popped.io @skawasec PSC – Proprietary and Confidential. All Rights Reserved. 2
  • 3. • Penetration Testers at PSC - www.paysw.com • PSC specializes in PCI assessments • Our day-to-day activities consist of attacking large enterprise networks and searching for CHD What do you guys do? PSC – Proprietary and Confidential. All Rights Reserved. 3
  • 4. • Wordsmith generates wordlists for dictionary attacks! • Wordlists can be used on their own or as a supplement • Uses geo-location data from U.S. States to create wordlists What’s Wordsmith? PSC – Proprietary and Confidential. All Rights Reserved. 4
  • 5. • Authentication process • Dictionary attacks • 8 slides total! Quick primer PSC – Proprietary and Confidential. All Rights Reserved. 5
  • 6. • We have something else you can do during the primer! • First 10 people who tweet the correct answer will get some swag • Or go and check out Wordsmith here: https://github.com/skahwah/wordsmith For those who already know this PSC – Proprietary and Confidential. All Rights Reserved. 6
  • 7. • What hash format is this? (hint wpad) Question PSC – Proprietary and Confidential. All Rights Reserved. 7
  • 8. Back to the primer PSC – Proprietary and Confidential. All Rights Reserved. 8
  • 9. Primer (1/8): Authentication process PSC – Proprietary and Confidential. All Rights Reserved. 9
  • 10. • On submit, convert the password into a hashed representative Primer (2/8): Password converted to hash PSC – Proprietary and Confidential. All Rights Reserved. 10
  • 11. Primer (3/8): Credentials sent to authentication server PSC – Proprietary and Confidential. All Rights Reserved. 11
  • 12. • Backend DB holds passwords for all users in a hashed state • Check to see if hashes match if userSuppliedCreds == userStoredCreds allow logon :) else deny logon :( Primer (4/8): Credentials validated PSC – Proprietary and Confidential. All Rights Reserved. 12
  • 13. • How do we “convert” a hash back to a cleartext password? • No direct way. However, we can do a dictionary attack. Primer (5/8): password == hash, right? PSC – Proprietary and Confidential. All Rights Reserved. 13
  • 14. • Large lists containing common words • Sometimes compiled from passwords obtained in breaches (LinkedIn, Yahoo, Adobe, AM, etc.) • Dictionaries we use: – Rockyou (free) – Uniq (paid, but worth it) – top10k (free) – yahoo (free) – linkedin (free) Primer (6/8): What are dictionaries? PSC – Proprietary and Confidential. All Rights Reserved. 14
  • 15. A couple of pre-requisites: 1. A solid dictionary (also known as wordlist) 2. Need to know the hash type (md5, sha1, NTLM, NetNTLMv2, etc) 3. A list of password hashes (typically exfiltrated in post- exploitation) Primer (7/8): Dictionary attacks PSC – Proprietary and Confidential. All Rights Reserved. 15
  • 16. Primer (8/8): Conducting a dictionary attack 1. Guess 2. Encrypt 3. Compare apple banana cherry … $hash <- encrypt(apple) $hash : 5ebe7dfa074da8ee8aef1faa2bbde876 Search for $hash in obtained hash list: af5432a79b941528fa7fac9e7e391651 5ebe7dfa074da8ee8aef1faa2bbde876 8846f7eaee8fb117ad06bdd830b7586c PSC – Proprietary and Confidential. All Rights Reserved. 16
  • 17. • Lets move on to Wordsmith Primers done PSC – Proprietary and Confidential. All Rights Reserved. 17
  • 18. • Wordsmith generates wordlists for dictionary attacks! • Wordlists can be used on their own or as a supplement • Uses geo-location data from U.S. States to create wordlists A quick re-cap on Wordsmith PSC – Proprietary and Confidential. All Rights Reserved. 18
  • 19. What kind of geo-location data is in a wordlist? Landmarks Sports teams Cities, towns, etc Streets/Roads Zip codes Area codes Common names Colleges PSC – Proprietary and Confidential. All Rights Reserved. 19
  • 20. • Saw more geo-location related passwords during engagements • Thought it would be a cool project • Improve overall password cracking efficacy • Limit guess-encrypt compare cycles Why geo-location data? PSC – Proprietary and Confidential. All Rights Reserved. 20
  • 21. *Wikipedia, US Census and Open Street Map Where is all of this data coming from? PSC – Proprietary and Confidential. All Rights Reserved. 21
  • 22. How Wordsmith works PSC – Proprietary and Confidential. All Rights Reserved. 22
  • 23. • Initial git clone (~20 MB) Wordsmith files PSC – Proprietary and Confidential. All Rights Reserved. 23
  • 24. First run • On first run, data.tar.gz is unpacked (1 second, 175 MB) PSC – Proprietary and Confidential. All Rights Reserved. 24
  • 25. • ./wordsmith/data/ • All lookups are done offline (speed & efficiency). File structure and data lookup PSC – Proprietary and Confidential. All Rights Reserved. 25
  • 26. Word is kept in its original form (special characters included) Freemont St. You can also use the “-m” flag for basic mangling! Freemont St. Freemont St Freemont St. St FreemontSt. FreemontSt Sort & Uniq to remove all duplicate words downcase() Min character length What does a wordlist look like? PSC – Proprietary and Confidential. All Rights Reserved. 26
  • 27. Demo time PSC – Proprietary and Confidential. All Rights Reserved. 27
  • 28. Statistics and results PSC – Proprietary and Confidential. All Rights Reserved. 28
  • 29. • Hash cracking rig • Get our hands on REAL NTLM hashes – Massachusetts 404 hashes – Wisconsin 2011 hashes – New York 542 hashes Pre-requisites PSC – Proprietary and Confidential. All Rights Reserved. 29
  • 30. • Software – hashcat.net • Hardware – NVidia GRID K520 • 3617 MH/s – nothing too crazy, but it does the trick – 1 MH/s is 1,000,000 hashes per second • Build your own cracking rig: https://www.popped.io/2016/07/steps-to-create-aws- hash-cracking-rig.html Hash cracking rig PSC – Proprietary and Confidential. All Rights Reserved. 30
  • 31. • Crack hashes for each U.S. State using common wordlists and rules • Crack hashes for each U.S. State using a Wordsmith wordlist for the particular State • ruby wordsmith.rb –s WI –a –m –o wi.txt Test Cases PSC – Proprietary and Confidential. All Rights Reserved. 31 State NTLM Hashes Wordsmith Wordlist Wisconsin 2011 112k Massachusetts 404 82k New York 542 158k
  • 32. Input Parameters for Cracking Session 1. Guess 2. Encrypt 3. Compare Wordlists: • Top10k (10k) • Rockyou (14.4m) • Wordsmith • WI, MA, NY NTLM Hash (NT) Based on MD4 Common on Active Directory domains Hashes obtained from various clients: Wisconsin-hashes.txt (2011 hashes) Massachusetts-hashes.txt (404 hashes) Newyork-hashes.txt (542 hashes) Rule set: • D3adhob0 (57.5k rules) PSC – Proprietary and Confidential. All Rights Reserved. 32
  • 33. Results! PSC – Proprietary and Confidential. All Rights Reserved. 33
  • 34. • 2011 NTLM Hashes Wisconsin results Wordlist Hashcat run time Number of passwords recovered Top10k (10k words) 2 secs Rockyou (14.4m words) 27 mins Wisconsin.txt (112k words) 12 secs 237 12% 1094 54% 229 11% 77% PSC – Proprietary and Confidential. All Rights Reserved. 34
  • 35. • 404 NTLM Hashes Massachusetts results Wordlist Hashcat run time Number of passwords recovered Top10k (10k words) 1 sec Rockyou (14.4m words) 24 mins Massachusetts.txt (82k words) 12 secs 52 13% 262 65% 56 14% 92% PSC – Proprietary and Confidential. All Rights Reserved. 35
  • 36. • 542 NTLM Hashes New York results Wordlist Hashcat run time Number of passwords recovered Top10k (10k words) 1 sec Rockyou (14.4m words) 26 mins Newyork.txt (158k words) 22 secs 0 220 41% 59 11% 52% PSC – Proprietary and Confidential. All Rights Reserved. 36
  • 37. • Identifying proper nouns unique to location • Time-CPU cycle tradeoff • At least 11% of passwords recovered in < 20 seconds Conclusions PSC – Proprietary and Confidential. All Rights Reserved. 37
  • 38. • Data! – Team rosters, mascots, stadiums – Famous people – State symbols – Motto, song, bird, flower, etc. – Regional food, cuisine, agriculture – (h/t Larry Pesce - @haxorthematrix) • Design – Modular – Extend to provinces, territories, countries – Integrate data look up by coordinates Next Steps for Wordsmith PSC – Proprietary and Confidential. All Rights Reserved. 38
  • 39. • Important to maintain, expand, and improve • Got any additional data sources or features? • Pull requests, submit issues, comment, share: https://github.com/skahwah/wordsmith Suggestions? PSC – Proprietary and Confidential. All Rights Reserved. 39
  • 40. Questions? Tom’s the guy with the beard www.porterhau5.com @porterhau5 Sanjiv’s the Canadian www.popped.io @skawasec https://github.com/skahwah/wordsmith PSC – Proprietary and Confidential. All Rights Reserved. 40