SlideShare a Scribd company logo
Fork/Join frameworkRainbow attack examplePhilip Savkinphilip.savkin@gmail.comTwitter: philipsavkin
Fork Join FrameworkJava framework for supporting a style of parallel programming in which problems are solved by (recursively) splitting them into subtasks that are solved in parallel, waiting for them to complete, and then composing results.http://gee.cs.oswego.edu/dl/papers/fj.pdf
AlgorithmResult solve(Problem problem) {  if (problem is small)    directly solve problem  else {    split problem into independent parts    fork new subtasks to solve each part    join all subtasks   compose result from subresults  }}
Core classes
Differences from ThreadPoolExecutorSuited for recursive tasks and “divide and conquer” algorithmsWork stealing
Work StealingInitial stateWait for all threads to complete their tasks
Work StealingOther threads are idle until the first thread finishedWait for all threads to complete their tasks
Part II
Practical examplePasswords are rarely kept in cleartext nowadaysThe problem: restore passwords from a list of password hashes with Rainbow attack
Rainbow attackhttp://en.wikipedia.org/wiki/Rainbow_attackBuild a Rainbow table using the list of possible passwordsLookup passwords in the table
The algorithmLoad top 2000 english wordsAdd all case permutationsAdd numbers 0-9Results in 6 000 000 combinationsCompute hashesLookup hashes in the table
How ForkJoin can help?CPU intensive tasksGenerate the list of all possible passwordsCompute hashes
Let’s see some code!
Test resultsTested on Amazon EC2 Extra Large instance running 64 bit AMI Linux15 Gb RAM, 4 processorsRainbow table size: 6 041 508Input: list of 1000 MD5 hashesFound all 10 passwords
Test results
Bonus slide - OfftopicNever keep passwords in cleartext!MD5 is a bad choiceAlways add “salt” to passwordsThe right way: use Bcrypt!
More offtopicThe “pastebin” experimenthttp://pastebin.com/1iL2P0G5Found one password “a1”
QuestionsThank you!

More Related Content

KEY
Fork/Join for Fun and Profit!
PDF
Fork Join (BeJUG 2012)
PPTX
Fork and join framework
PDF
Concurrency Utilities in Java 8
PPTX
Concurrency with side-effects – cats way
PPTX
Demystifying functional effect systems in Scala
PDF
The Mayans Lost Guide to RxJava on Android
PDF
RxJava@DAUG
Fork/Join for Fun and Profit!
Fork Join (BeJUG 2012)
Fork and join framework
Concurrency Utilities in Java 8
Concurrency with side-effects – cats way
Demystifying functional effect systems in Scala
The Mayans Lost Guide to RxJava on Android
RxJava@DAUG

What's hot (20)

PDF
Practical RxJava for Android
ODP
Java Concurrency, Memory Model, and Trends
ODP
Threads and concurrency in Java 1.5
PDF
The Future of Futures - A Talk About Java 8 CompletableFutures
PDF
Working With Concurrency In Java 8
PDF
Wait for your fortune without Blocking!
PDF
Asynchronous I/O in Python 3
PPTX
Modern Java Workshop
PDF
Clojure made-simple - John Stevenson
PPTX
Java concurrency in practice
KEY
Modern Java Concurrency
PDF
Functional Reactive Programming / Compositional Event Systems
PPTX
C#: Understanding ConfigureAwait(false)
PDF
How To Use IO Monads in Scala?
DOCX
Parallel Programming With Dot Net
PPTX
Headless fragments in Android
PPTX
Effective java - concurrency
PDF
Building Hermetic Systems (without Docker)
PPTX
Non blocking programming and waiting
PDF
Comparing different concurrency models on the JVM
Practical RxJava for Android
Java Concurrency, Memory Model, and Trends
Threads and concurrency in Java 1.5
The Future of Futures - A Talk About Java 8 CompletableFutures
Working With Concurrency In Java 8
Wait for your fortune without Blocking!
Asynchronous I/O in Python 3
Modern Java Workshop
Clojure made-simple - John Stevenson
Java concurrency in practice
Modern Java Concurrency
Functional Reactive Programming / Compositional Event Systems
C#: Understanding ConfigureAwait(false)
How To Use IO Monads in Scala?
Parallel Programming With Dot Net
Headless fragments in Android
Effective java - concurrency
Building Hermetic Systems (without Docker)
Non blocking programming and waiting
Comparing different concurrency models on the JVM
Ad

More from Dmitry Buzdin (20)

PDF
How Payment Cards Really Work?
PDF
Как построить свой фреймворк для автотестов?
PDF
How to grow your own Microservice?
PDF
How to Build Your Own Test Automation Framework?
PDF
Delivery Pipeline for Windows Machines
PPTX
Big Data Processing Using Hadoop Infrastructure
PDF
JOOQ and Flyway
PDF
Developing Useful APIs
PPTX
Whats New in Java 8
PPTX
Архитектура Ленты на Одноклассниках
PDF
Dart Workshop
PDF
Riding Redis @ask.fm
PDF
Rubylight JUG Contest Results Part II
PDF
Rubylight Pattern-Matching Solutions
PDF
Refactoring to Macros with Clojure
PPTX
Poor Man's Functional Programming
PDF
Rubylight programming contest
PPTX
Continuous Delivery
PPTX
Introduction to DevOps
PDF
Thread Dump Analysis
How Payment Cards Really Work?
Как построить свой фреймворк для автотестов?
How to grow your own Microservice?
How to Build Your Own Test Automation Framework?
Delivery Pipeline for Windows Machines
Big Data Processing Using Hadoop Infrastructure
JOOQ and Flyway
Developing Useful APIs
Whats New in Java 8
Архитектура Ленты на Одноклассниках
Dart Workshop
Riding Redis @ask.fm
Rubylight JUG Contest Results Part II
Rubylight Pattern-Matching Solutions
Refactoring to Macros with Clojure
Poor Man's Functional Programming
Rubylight programming contest
Continuous Delivery
Introduction to DevOps
Thread Dump Analysis
Ad

Recently uploaded (20)

PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Chapter 5: Probability Theory and Statistics
PPTX
A Presentation on Touch Screen Technology
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Mushroom cultivation and it's methods.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
DP Operators-handbook-extract for the Mautical Institute
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Hybrid model detection and classification of lung cancer
PDF
Web App vs Mobile App What Should You Build First.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Tartificialntelligence_presentation.pptx
Zenith AI: Advanced Artificial Intelligence
Enhancing emotion recognition model for a student engagement use case through...
Digital-Transformation-Roadmap-for-Companies.pptx
Chapter 5: Probability Theory and Statistics
A Presentation on Touch Screen Technology
1 - Historical Antecedents, Social Consideration.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Mushroom cultivation and it's methods.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
DP Operators-handbook-extract for the Mautical Institute
SOPHOS-XG Firewall Administrator PPT.pptx
Encapsulation theory and applications.pdf
A Presentation on Artificial Intelligence
WOOl fibre morphology and structure.pdf for textiles
Hybrid model detection and classification of lung cancer
Web App vs Mobile App What Should You Build First.pdf

Fork Join