SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Password Attack
Password Attack Password Attack
Password Attack Sina Manavi
 
Brute force-attack presentation
Brute force-attack presentationBrute force-attack presentation
Brute force-attack presentationMahmoud Ibra
 
Brute force-attack presentation
Brute force-attack presentationBrute force-attack presentation
Brute force-attack presentationMahmoud Ibra
 
Welcome to the world of hacking
Welcome to the world of hackingWelcome to the world of hacking
Welcome to the world of hackingTjylen Veselyj
 
Brute force attack
Brute force attackBrute force attack
Brute force attackjoycruiser
 
Brute Force Attacks - Finding and Stopping them
Brute Force Attacks - Finding and Stopping themBrute Force Attacks - Finding and Stopping them
Brute Force Attacks - Finding and Stopping themFlowTraq
 
Password hacking
Password hackingPassword hacking
Password hackingAbhay pal
 
Ceh v5 module 13 web based password cracking techniques
Ceh v5 module 13 web based password cracking techniquesCeh v5 module 13 web based password cracking techniques
Ceh v5 module 13 web based password cracking techniquesVi Tính Hoàng Nam
 
Module 13 (web based password cracking techniques)
Module 13 (web based password cracking techniques)Module 13 (web based password cracking techniques)
Module 13 (web based password cracking techniques)Wail Hassan
 
Password hacking
Password hackingPassword hacking
Password hackingMr. FM
 
Improving Password Based Security
Improving Password Based SecurityImproving Password Based Security
Improving Password Based SecurityRare Input
 
Bruteforce basic presentation_file - linx
Bruteforce basic presentation_file - linxBruteforce basic presentation_file - linx
Bruteforce basic presentation_file - linxidsecconf
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Niranjanaa Ragupathy
 
Password Cracking using dictionary attacks
Password Cracking using dictionary attacksPassword Cracking using dictionary attacks
Password Cracking using dictionary attackslord
 
Evolution Of Web Security
Evolution Of Web SecurityEvolution Of Web Security
Evolution Of Web SecurityChris Shiflett
 
OSINT for Attack and Defense
OSINT for Attack and DefenseOSINT for Attack and Defense
OSINT for Attack and DefenseAndrew McNicol
 

La actualidad más candente (20)

Password Attack
Password Attack Password Attack
Password Attack
 
Brute Force Attack
Brute Force AttackBrute Force Attack
Brute Force Attack
 
Brute force attack
Brute force attackBrute force attack
Brute force attack
 
Brute force
Brute forceBrute force
Brute force
 
Password craking techniques
Password craking techniques Password craking techniques
Password craking techniques
 
Brute force-attack presentation
Brute force-attack presentationBrute force-attack presentation
Brute force-attack presentation
 
Brute force-attack presentation
Brute force-attack presentationBrute force-attack presentation
Brute force-attack presentation
 
Welcome to the world of hacking
Welcome to the world of hackingWelcome to the world of hacking
Welcome to the world of hacking
 
Brute force attack
Brute force attackBrute force attack
Brute force attack
 
Brute Force Attacks - Finding and Stopping them
Brute Force Attacks - Finding and Stopping themBrute Force Attacks - Finding and Stopping them
Brute Force Attacks - Finding and Stopping them
 
Password hacking
Password hackingPassword hacking
Password hacking
 
Ceh v5 module 13 web based password cracking techniques
Ceh v5 module 13 web based password cracking techniquesCeh v5 module 13 web based password cracking techniques
Ceh v5 module 13 web based password cracking techniques
 
Module 13 (web based password cracking techniques)
Module 13 (web based password cracking techniques)Module 13 (web based password cracking techniques)
Module 13 (web based password cracking techniques)
 
Password hacking
Password hackingPassword hacking
Password hacking
 
Improving Password Based Security
Improving Password Based SecurityImproving Password Based Security
Improving Password Based Security
 
Bruteforce basic presentation_file - linx
Bruteforce basic presentation_file - linxBruteforce basic presentation_file - linx
Bruteforce basic presentation_file - linx
 
Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018Introduction to Web Application Security - Blackhoodie US 2018
Introduction to Web Application Security - Blackhoodie US 2018
 
Password Cracking using dictionary attacks
Password Cracking using dictionary attacksPassword Cracking using dictionary attacks
Password Cracking using dictionary attacks
 
Evolution Of Web Security
Evolution Of Web SecurityEvolution Of Web Security
Evolution Of Web Security
 
OSINT for Attack and Defense
OSINT for Attack and DefenseOSINT for Attack and Defense
OSINT for Attack and Defense
 

Similar a Advances in Open Source Password Cracking

Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliDefcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliPriyanka Aash
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsShakacon
 
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...Zoltan Balazs
 
DEF CON 27 - HUBER AND ROSKOSCH - im on your phone listening attacking voip c...
DEF CON 27 - HUBER AND ROSKOSCH - im on your phone listening attacking voip c...DEF CON 27 - HUBER AND ROSKOSCH - im on your phone listening attacking voip c...
DEF CON 27 - HUBER AND ROSKOSCH - im on your phone listening attacking voip c...Felipe Prado
 
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote AccessHacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote AccessEC-Council
 
1032 cs208 g operation system ip camera case share.v0.2
1032 cs208 g operation system ip camera case share.v0.21032 cs208 g operation system ip camera case share.v0.2
1032 cs208 g operation system ip camera case share.v0.2Stanley Ho
 
DevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps ToolchainsDevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps ToolchainsChris Gates
 
Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)Svetlin Nakov
 
DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...
DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...
DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...Felipe Prado
 
Ngrep commands
Ngrep commandsNgrep commands
Ngrep commandsRishu Seth
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdbRoman Podoliaka
 
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...CODE BLUE
 
Hacking Exposed: The Mac Attack
Hacking Exposed: The Mac AttackHacking Exposed: The Mac Attack
Hacking Exposed: The Mac AttackPriyanka Aash
 
Hacking Exposed: The Mac Attack
Hacking Exposed: The Mac AttackHacking Exposed: The Mac Attack
Hacking Exposed: The Mac AttackPriyanka Aash
 

Similar a Advances in Open Source Password Cracking (20)

Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliDefcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
 
Penetration Testing Boot CAMP
Penetration Testing Boot CAMPPenetration Testing Boot CAMP
Penetration Testing Boot CAMP
 
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
DEFCON 22: Bypass firewalls, application white lists, secure remote desktops ...
 
DEF CON 27 - HUBER AND ROSKOSCH - im on your phone listening attacking voip c...
DEF CON 27 - HUBER AND ROSKOSCH - im on your phone listening attacking voip c...DEF CON 27 - HUBER AND ROSKOSCH - im on your phone listening attacking voip c...
DEF CON 27 - HUBER AND ROSKOSCH - im on your phone listening attacking voip c...
 
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote AccessHacker Halted 2014 - Post-Exploitation After Having Remote Access
Hacker Halted 2014 - Post-Exploitation After Having Remote Access
 
1032 cs208 g operation system ip camera case share.v0.2
1032 cs208 g operation system ip camera case share.v0.21032 cs208 g operation system ip camera case share.v0.2
1032 cs208 g operation system ip camera case share.v0.2
 
DevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps ToolchainsDevOOPS: Attacks and Defenses for DevOps Toolchains
DevOOPS: Attacks and Defenses for DevOps Toolchains
 
Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)Cryptography for Absolute Beginners (May 2019)
Cryptography for Absolute Beginners (May 2019)
 
Sectools
SectoolsSectools
Sectools
 
aaa
aaaaaa
aaa
 
DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...
DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...
DEF CON 27 - DANIEL ROMERO and MARIO RIVAS - why you should fear your mundane...
 
Ngrep commands
Ngrep commandsNgrep commands
Ngrep commands
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
 
Rust Hack
Rust HackRust Hack
Rust Hack
 
Nullbyte 6ed. 2019
Nullbyte 6ed. 2019Nullbyte 6ed. 2019
Nullbyte 6ed. 2019
 
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
[CB20] Operation I am Tom: How APT actors move laterally in corporate network...
 
Hacking Exposed: The Mac Attack
Hacking Exposed: The Mac AttackHacking Exposed: The Mac Attack
Hacking Exposed: The Mac Attack
 
Hacking Exposed: The Mac Attack
Hacking Exposed: The Mac AttackHacking Exposed: The Mac Attack
Hacking Exposed: The Mac Attack
 
FreeBSD and Hardening Web Server
FreeBSD and Hardening Web ServerFreeBSD and Hardening Web Server
FreeBSD and Hardening Web Server
 

Más de n|u - The Open Security Community

Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...n|u - The Open Security Community
 

Más de n|u - The Open Security Community (20)

Hardware security testing 101 (Null - Delhi Chapter)
Hardware security testing 101 (Null - Delhi Chapter)Hardware security testing 101 (Null - Delhi Chapter)
Hardware security testing 101 (Null - Delhi Chapter)
 
Osint primer
Osint primerOsint primer
Osint primer
 
SSRF exploit the trust relationship
SSRF exploit the trust relationshipSSRF exploit the trust relationship
SSRF exploit the trust relationship
 
Nmap basics
Nmap basicsNmap basics
Nmap basics
 
Metasploit primary
Metasploit primaryMetasploit primary
Metasploit primary
 
Api security-testing
Api security-testingApi security-testing
Api security-testing
 
Introduction to TLS 1.3
Introduction to TLS 1.3Introduction to TLS 1.3
Introduction to TLS 1.3
 
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
Gibson 101 -quick_introduction_to_hacking_mainframes_in_2020_null_infosec_gir...
 
Talking About SSRF,CRLF
Talking About SSRF,CRLFTalking About SSRF,CRLF
Talking About SSRF,CRLF
 
Building active directory lab for red teaming
Building active directory lab for red teamingBuilding active directory lab for red teaming
Building active directory lab for red teaming
 
Owning a company through their logs
Owning a company through their logsOwning a company through their logs
Owning a company through their logs
 
Introduction to shodan
Introduction to shodanIntroduction to shodan
Introduction to shodan
 
Cloud security
Cloud security Cloud security
Cloud security
 
Detecting persistence in windows
Detecting persistence in windowsDetecting persistence in windows
Detecting persistence in windows
 
Frida - Objection Tool Usage
Frida - Objection Tool UsageFrida - Objection Tool Usage
Frida - Objection Tool Usage
 
OSQuery - Monitoring System Process
OSQuery - Monitoring System ProcessOSQuery - Monitoring System Process
OSQuery - Monitoring System Process
 
DevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -SecurityDevSecOps Jenkins Pipeline -Security
DevSecOps Jenkins Pipeline -Security
 
Extensible markup language attacks
Extensible markup language attacksExtensible markup language attacks
Extensible markup language attacks
 
Linux for hackers
Linux for hackersLinux for hackers
Linux for hackers
 
Android Pentesting
Android PentestingAndroid Pentesting
Android Pentesting
 

Advances in Open Source Password Cracking

  • 1. ADVANCES IN OPEN-SOURCE PASSWORD CRACKING dhiru@openwall.com
  • 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