SlideShare a Scribd company logo
ADVANCES IN OPEN-SOURCE
PASSWORD CRACKING

dhiru@openwall.com
Agenda
   John the Ripper

   Ettercap

   Attacks on M$ AD / Kerberos infrastructure

   Misc. Stuff

   Current and future work
John the Ripper
   John the Ripper is a free open-source password
    cracking software tool (http://www.openwall.com/)

   Traditionally supports cracking hashes (LM, FreeBSD,
    DES crypt etc.)

   $ cat lm-hash
    user:fda95fbeca288d44aad3b435b51404ee

   $ john -format:lm lm-hash
    Loaded 1 password hash (LM ...)
    HELLO           (user)
Jumbo patch

   community-enhanced version of JtR, available in almost all
    Linux distributions

   Add tons of formats for cracking hashes as well as “non-
    hashes”

   Hashes: e.g. MD5, LM

   “non-hashes” : e.g. PDF or other types of files

   Can use GPU to accelerate cracking (Speedups > 150X
    possible)
Jumbo patch supports cracking
   1Password, Clipperz, Apple DMG images, EncFS, EPiServer, GPG
    private keys, IKE PSK, Apple Keychain, GNOME Keyring, KDE
    KWallet, KeePass, LastPass, Mozilla Master Passwords, MongoDB,
    MS-CHAP, MySQL authentication protocol, M$ Office,
    OpenOffice, PDF, O5LOGON, Password Safe, ZIP, RAR, Apple
    10.8 hashes, GRUB 2, PFX, SSH keys, PuTTY keys, PostgresSQL,
    M$ PST, RACF, etc

   Above list *only* includes formats I have worked on

   Lot of these formats are faster than commercial products.

   Many formats are not even supported by commercial products
Example: cracking password protected
SSH keys
   Two-step process

   Use one of the many *2john utilities

   $ sshng2john.py key-catch22 > ssh-hash

   $ john ssh-hash
    Loaded 1 password hash (ssh-ng ...)
    catch22      (key-catch22)
Example: using GPU
   Build GPU-enabled JtR (e.g. make linux-x86-64-opencl)

   $ john -fo:keychain -t
    Benchmarking: Mac OS X Keychain ...
    Raw: 1331 c/s real, 1331 c/s virtual

   $ john -fo:keychain-opencl -t # ATI 7970 GPU
    OpenCL platform 1: AMD Accelerated Parallel Processing ...
    Benchmarking: Mac OS X Keychain ...
    Raw: 208537 c/s real, 92758 c/s virtual

   Greater than 150X speedup
JtR community
   http://www.openwall.com/lists/john-users/

   Join “john-users” mailing list for general discussion and help

   Join “john-dev” if you are interested in JtR development

   #openwall channel on Freenode IRC network

   Writing a plug-in (called format) is easy enough (start
    contributing!)

   https://github.com/magnumripper/JohnTheRipper
Ettercap
   Ettercap is free, open source network security tool
    for doing MiTM attacks.

   Allows interception and modifications of packets
    on the fly.

   Can be extended by writing plug-ins
Example: Facebook password sniffing

   Facebook loads login form over HTTP which
    POSTs credentials to a HTTPS link.

   Modified HTTP dissector (ec_http.c) to replace
    “https” with “ http”.

   Login form is now posted over HTTP

   Ettercap filter functionality can be used to do the
    same.
Example: Facebook password sniffing




   Only 12 lines of code added to ec_http.c

   6 lines to avoid gzip encoding and 6 lines to avoid
    SSL
Example: works for Flipkart and
Rediffmail too




   Ettercap automatically prints credentials sent over
    HTTP

   Don’t expose / load resources over HTTP
Ettercap: My contributions
   MySQL v5 challenge-response

   PostgreSQL challenge-response

   VNC challenge-response

   O5LOGON protocol (used by Oracle DB)

   MongoDB challenge-response

   Kerberos MiTM etype downgrade attack

   MongoDB MiTM fixed salt attack
Ettercap community
   https://github.com/Ettercap/

   #ettercap-project channel on Freenode IRC
    network

   Writing a plug-in (called dissector) is easy once the
    protocol is understood (use Wireshark)
Attacks on Kerberos and M$ AD
infrastructure
   Popular network authentication protocol used to implement
    SSO

   Uses shared secret/symmetric keys (which don’t travel over
    the network)

   Uses timestamp pre-authentication in which timestamp is
    encrypted with a key (derived from the user password)

   We capture encrypted timestamp and mount offline brute-
    force attack
Kerberos: Key Derivation
   The “string-to-key” function used to convert a user
    password to a secret key in Kerberos is dependent
    upon the encryption type (called etype) being used.

   etype functions differ in cost

   etype negotiation process can be attacked to
    downgrade etype (and make offline attacks faster)
Kerberos: etype downgrade attacks
   Downgrade etype 18 (aes256-cts-hmac-sha1-96, very
    expensive) to etype 23 (rc4-hmac, very fast)

   etype 18 brute-force attack, 380 tries per second on
    CPU, 125K on ATI 7970 GPU

   etype 23 brute-force attack, 728K tries per second on
    CPU

   Speedup > 1900X
Kerberos: etype downgrade attacks
   These attacks have been talked about previously
    but tools were not published (maybe not even
    made).

   My Ettercap plug-in is the first public tool to make
    these attacks practical.

   Only 16 lines of code.
Misc : Guaranteed cracking of PDF
files using RC4 40-bit encryption
   RC4 40-bit is still popular among banks and
    income tax department.

   https://github.com/kholia/RC4-40-brute-pdf

   https://github.com/kholia/qpdf

   Should take less than 2 days on AMD FX-8120 (8-
    core Bulldozer)
Misc : Guaranteed cracking of PDF
files using RC4 40-bit encryption
   Three-step process

    $ npdf2john test.pdf
    test.pdf:$npdf$1*2*40*4*1*16*c56b…

   $ RC4-40-brute ‘test.pdf:$npdf$1*2*40*4…’
    Key is : 9296c944ee

   $ qpdf --key=9296c944e --decrypt test.pdf output.pdf
Current and future work

   Dropbox account “hijacker”

   Metasploit post script for doing the same

   Offline attacks on LastPass password manager

   Fake VMware vCenter (and ESX) server for Metasploit
    project

   Fake LDAP server for Metasploit project
Questions

More Related Content

What's hot (20)

PPTX
Password Attack
Sina Manavi
 
PDF
Brute Force Attack
Ahmad karawash
 
PPSX
Brute force attack
Jamil Ali Ahmed
 
PPT
Brute force
Prajwal Panchmahalkar
 
PPTX
Password craking techniques
أحلام انصارى
 
PPTX
Brute force-attack presentation
Mahmoud Ibra
 
PPTX
Brute force-attack presentation
Mahmoud Ibra
 
PPTX
Welcome to the world of hacking
Tjylen Veselyj
 
PPTX
Brute force attack
joycruiser
 
PDF
Brute Force Attacks - Finding and Stopping them
FlowTraq
 
DOCX
Password hacking
Abhay pal
 
PDF
Ceh v5 module 13 web based password cracking techniques
Vi Tính Hoàng Nam
 
PDF
Module 13 (web based password cracking techniques)
Wail Hassan
 
DOC
Password hacking
Mr. FM
 
PPTX
Improving Password Based Security
Rare Input
 
PPT
Bruteforce basic presentation_file - linx
idsecconf
 
PDF
Introduction to Web Application Security - Blackhoodie US 2018
Niranjanaa Ragupathy
 
PDF
Password Cracking using dictionary attacks
lord
 
PDF
Evolution Of Web Security
Chris Shiflett
 
PDF
OSINT for Attack and Defense
Andrew McNicol
 
Password Attack
Sina Manavi
 
Brute Force Attack
Ahmad karawash
 
Brute force attack
Jamil Ali Ahmed
 
Password craking techniques
أحلام انصارى
 
Brute force-attack presentation
Mahmoud Ibra
 
Brute force-attack presentation
Mahmoud Ibra
 
Welcome to the world of hacking
Tjylen Veselyj
 
Brute force attack
joycruiser
 
Brute Force Attacks - Finding and Stopping them
FlowTraq
 
Password hacking
Abhay pal
 
Ceh v5 module 13 web based password cracking techniques
Vi Tính Hoàng Nam
 
Module 13 (web based password cracking techniques)
Wail Hassan
 
Password hacking
Mr. FM
 
Improving Password Based Security
Rare Input
 
Bruteforce basic presentation_file - linx
idsecconf
 
Introduction to Web Application Security - Blackhoodie US 2018
Niranjanaa Ragupathy
 
Password Cracking using dictionary attacks
lord
 
Evolution Of Web Security
Chris Shiflett
 
OSINT for Attack and Defense
Andrew McNicol
 

Similar to Advances in Open Source Password Cracking (20)

PDF
44CON 2014 - Switches Get Stitches, Eireann Leverett & Matt Erasmus
44CON
 
PPT
ok_mary_pki1234public_key_encryption.ppt
SmeetaJavalagi
 
PPT
ok_mary_pki.ppt an introduction to Distributed Concept
HazemElabed2
 
PPTX
Don't Pick the lock
David Maloney
 
PPTX
Django cryptography
Erik LaBianca
 
PDF
Hacking
SahilGothoskar
 
PDF
Cryto Party at CCU
Jose L. Quiñones-Borrero
 
PDF
Unmasking or De-Anonymizing You
E Hacking
 
PDF
David - Fpga - ClubHack2007
ClubHack
 
PPTX
Ethical hacking Chapter 12 - Encryption - Eric Vanderburg
Eric Vanderburg
 
PDF
NSC #2 - Challenge Solution
NoSuchCon
 
PDF
Hack Attack! An Introduction to Penetration Testing
Steve Phillips
 
PDF
Formative Task 3: Social Engineering Attacks
DamaineFranklinMScBE
 
PPTX
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014
Jakub Kałużny
 
PDF
Last mile authentication problem: Exploiting the missing link in end-to-end s...
Priyanka Aash
 
PDF
Positive Technologies - S4 - Scada under x-rays
qqlan
 
PPTX
CompTIASecPLUS-Part6 - UnlimitedEdited.pptx
mohedkhadar60
 
PDF
CREST CCT Lab Prep Notes
NathanAn
 
PDF
David-FPGA
guest66dc5f
 
PDF
David-FPGA
guest66dc5f
 
44CON 2014 - Switches Get Stitches, Eireann Leverett & Matt Erasmus
44CON
 
ok_mary_pki1234public_key_encryption.ppt
SmeetaJavalagi
 
ok_mary_pki.ppt an introduction to Distributed Concept
HazemElabed2
 
Don't Pick the lock
David Maloney
 
Django cryptography
Erik LaBianca
 
Hacking
SahilGothoskar
 
Cryto Party at CCU
Jose L. Quiñones-Borrero
 
Unmasking or De-Anonymizing You
E Hacking
 
David - Fpga - ClubHack2007
ClubHack
 
Ethical hacking Chapter 12 - Encryption - Eric Vanderburg
Eric Vanderburg
 
NSC #2 - Challenge Solution
NoSuchCon
 
Hack Attack! An Introduction to Penetration Testing
Steve Phillips
 
Formative Task 3: Social Engineering Attacks
DamaineFranklinMScBE
 
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014
Jakub Kałużny
 
Last mile authentication problem: Exploiting the missing link in end-to-end s...
Priyanka Aash
 
Positive Technologies - S4 - Scada under x-rays
qqlan
 
CompTIASecPLUS-Part6 - UnlimitedEdited.pptx
mohedkhadar60
 
CREST CCT Lab Prep Notes
NathanAn
 
David-FPGA
guest66dc5f
 
David-FPGA
guest66dc5f
 
Ad

More from n|u - The Open Security Community (20)

PDF
Hardware security testing 101 (Null - Delhi Chapter)
n|u - The Open Security Community
 
PPTX
SSRF exploit the trust relationship
n|u - The Open Security Community
 
PDF
Metasploit primary
n|u - The Open Security Community
 
PDF
Api security-testing
n|u - The Open Security Community
 
PDF
Introduction to TLS 1.3
n|u - The Open Security Community
 
PDF
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
n|u - The Open Security Community
 
PDF
Talking About SSRF,CRLF
n|u - The Open Security Community
 
PPTX
Building active directory lab for red teaming
n|u - The Open Security Community
 
PPTX
Owning a company through their logs
n|u - The Open Security Community
 
PPTX
Introduction to shodan
n|u - The Open Security Community
 
PDF
Detecting persistence in windows
n|u - The Open Security Community
 
PPTX
Frida - Objection Tool Usage
n|u - The Open Security Community
 
PDF
OSQuery - Monitoring System Process
n|u - The Open Security Community
 
PDF
DevSecOps Jenkins Pipeline -Security
n|u - The Open Security Community
 
PDF
Extensible markup language attacks
n|u - The Open Security Community
 
PPTX
Linux for hackers
n|u - The Open Security Community
 
PDF
Android Pentesting
n|u - The Open Security Community
 
Hardware security testing 101 (Null - Delhi Chapter)
n|u - The Open Security Community
 
SSRF exploit the trust relationship
n|u - The Open Security Community
 
Api security-testing
n|u - The Open Security Community
 
Introduction to TLS 1.3
n|u - The Open Security Community
 
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
n|u - The Open Security Community
 
Talking About SSRF,CRLF
n|u - The Open Security Community
 
Building active directory lab for red teaming
n|u - The Open Security Community
 
Owning a company through their logs
n|u - The Open Security Community
 
Introduction to shodan
n|u - The Open Security Community
 
Detecting persistence in windows
n|u - The Open Security Community
 
Frida - Objection Tool Usage
n|u - The Open Security Community
 
OSQuery - Monitoring System Process
n|u - The Open Security Community
 
DevSecOps Jenkins Pipeline -Security
n|u - The Open Security Community
 
Extensible markup language attacks
n|u - The Open Security Community
 
Ad

Advances in Open Source Password Cracking

  • 2. Agenda  John the Ripper  Ettercap  Attacks on M$ AD / Kerberos infrastructure  Misc. Stuff  Current and future work
  • 3. John the Ripper  John the Ripper is a free open-source password cracking software tool (http://www.openwall.com/)  Traditionally supports cracking hashes (LM, FreeBSD, DES crypt etc.)  $ cat lm-hash user:fda95fbeca288d44aad3b435b51404ee  $ john -format:lm lm-hash Loaded 1 password hash (LM ...) HELLO (user)
  • 4. Jumbo patch  community-enhanced version of JtR, available in almost all Linux distributions  Add tons of formats for cracking hashes as well as “non- hashes”  Hashes: e.g. MD5, LM  “non-hashes” : e.g. PDF or other types of files  Can use GPU to accelerate cracking (Speedups > 150X possible)
  • 5. Jumbo patch supports cracking  1Password, Clipperz, Apple DMG images, EncFS, EPiServer, GPG private keys, IKE PSK, Apple Keychain, GNOME Keyring, KDE KWallet, KeePass, LastPass, Mozilla Master Passwords, MongoDB, MS-CHAP, MySQL authentication protocol, M$ Office, OpenOffice, PDF, O5LOGON, Password Safe, ZIP, RAR, Apple 10.8 hashes, GRUB 2, PFX, SSH keys, PuTTY keys, PostgresSQL, M$ PST, RACF, etc  Above list *only* includes formats I have worked on  Lot of these formats are faster than commercial products.  Many formats are not even supported by commercial products
  • 6. Example: cracking password protected SSH keys  Two-step process  Use one of the many *2john utilities  $ sshng2john.py key-catch22 > ssh-hash  $ john ssh-hash Loaded 1 password hash (ssh-ng ...) catch22 (key-catch22)
  • 7. Example: using GPU  Build GPU-enabled JtR (e.g. make linux-x86-64-opencl)  $ john -fo:keychain -t Benchmarking: Mac OS X Keychain ... Raw: 1331 c/s real, 1331 c/s virtual  $ john -fo:keychain-opencl -t # ATI 7970 GPU OpenCL platform 1: AMD Accelerated Parallel Processing ... Benchmarking: Mac OS X Keychain ... Raw: 208537 c/s real, 92758 c/s virtual  Greater than 150X speedup
  • 8. JtR community  http://www.openwall.com/lists/john-users/  Join “john-users” mailing list for general discussion and help  Join “john-dev” if you are interested in JtR development  #openwall channel on Freenode IRC network  Writing a plug-in (called format) is easy enough (start contributing!)  https://github.com/magnumripper/JohnTheRipper
  • 9. Ettercap  Ettercap is free, open source network security tool for doing MiTM attacks.  Allows interception and modifications of packets on the fly.  Can be extended by writing plug-ins
  • 10. Example: Facebook password sniffing  Facebook loads login form over HTTP which POSTs credentials to a HTTPS link.  Modified HTTP dissector (ec_http.c) to replace “https” with “ http”.  Login form is now posted over HTTP  Ettercap filter functionality can be used to do the same.
  • 11. Example: Facebook password sniffing  Only 12 lines of code added to ec_http.c  6 lines to avoid gzip encoding and 6 lines to avoid SSL
  • 12. Example: works for Flipkart and Rediffmail too  Ettercap automatically prints credentials sent over HTTP  Don’t expose / load resources over HTTP
  • 13. Ettercap: My contributions  MySQL v5 challenge-response  PostgreSQL challenge-response  VNC challenge-response  O5LOGON protocol (used by Oracle DB)  MongoDB challenge-response  Kerberos MiTM etype downgrade attack  MongoDB MiTM fixed salt attack
  • 14. Ettercap community  https://github.com/Ettercap/  #ettercap-project channel on Freenode IRC network  Writing a plug-in (called dissector) is easy once the protocol is understood (use Wireshark)
  • 15. Attacks on Kerberos and M$ AD infrastructure  Popular network authentication protocol used to implement SSO  Uses shared secret/symmetric keys (which don’t travel over the network)  Uses timestamp pre-authentication in which timestamp is encrypted with a key (derived from the user password)  We capture encrypted timestamp and mount offline brute- force attack
  • 16. Kerberos: Key Derivation  The “string-to-key” function used to convert a user password to a secret key in Kerberos is dependent upon the encryption type (called etype) being used.  etype functions differ in cost  etype negotiation process can be attacked to downgrade etype (and make offline attacks faster)
  • 17. Kerberos: etype downgrade attacks  Downgrade etype 18 (aes256-cts-hmac-sha1-96, very expensive) to etype 23 (rc4-hmac, very fast)  etype 18 brute-force attack, 380 tries per second on CPU, 125K on ATI 7970 GPU  etype 23 brute-force attack, 728K tries per second on CPU  Speedup > 1900X
  • 18. Kerberos: etype downgrade attacks  These attacks have been talked about previously but tools were not published (maybe not even made).  My Ettercap plug-in is the first public tool to make these attacks practical.  Only 16 lines of code.
  • 19. Misc : Guaranteed cracking of PDF files using RC4 40-bit encryption  RC4 40-bit is still popular among banks and income tax department.  https://github.com/kholia/RC4-40-brute-pdf  https://github.com/kholia/qpdf  Should take less than 2 days on AMD FX-8120 (8- core Bulldozer)
  • 20. Misc : Guaranteed cracking of PDF files using RC4 40-bit encryption  Three-step process  $ npdf2john test.pdf test.pdf:$npdf$1*2*40*4*1*16*c56b…  $ RC4-40-brute ‘test.pdf:$npdf$1*2*40*4…’ Key is : 9296c944ee  $ qpdf --key=9296c944e --decrypt test.pdf output.pdf
  • 21. Current and future work  Dropbox account “hijacker”  Metasploit post script for doing the same  Offline attacks on LastPass password manager  Fake VMware vCenter (and ESX) server for Metasploit project  Fake LDAP server for Metasploit project