[TOOL] SSH Private Keys Cracker

From: SecuriTeam (support_at_securiteam.com)
Date: 04/25/04

  • Next message: SecuriTeam: "[NT] EpicGames's Unreal Engine UMOD Vulnerability"
    To: list@securiteam.com
    Date: 25 Apr 2004 19:33:03 +0200
    
    

    The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
    - - promotion

    The SecuriTeam alerts list - Free, Accurate, Independent.

    Get your security news from a reliable source.
    http://www.securiteam.com/mailinglist.html

    - - - - - - - - -

      SSH Private Keys Cracker
    ------------------------------------------------------------------------

    SUMMARY

    DETAILS

    The following tool written by THC is a SSH Cracker, which is a simple
    utility that attempts to crack SSH private keys via brute force.

    Tool:
    /*
     * THC/2003
     *
     * Simple ssh-private key cracker. Tries to brute force (dictionary
     * attack) almost any ssh private key file format.
     *
     * This is just a quick tool from THC. Using OpenSSL is not really
     * fast...
     *
     * COMPILE:
     * gcc -Wall -O2 -o thc-ssh-crack thc-ssh-crack.c -lssl
     *
     * RUN:
     * John is a good password generator. We use it for thc-ssh-crack:
     *
     * $ john -stdout -incremental | nice -19 thc-ssh-crack id_dsa
     *
     * Normal dictionary (without john's permutation engine):
     *
     * $ nice -19 thc-ssh-crack id_dsa <dictionary.txt
     *
     * Enjoy,
     *
     * http://www.thc.org
     */
    #include <stdio.h>
    #include <openssl/ssl.h>
    #include <openssl/err.h>
    #include <openssl/evp.h>
    #include <openssl/pem.h>
    #include <string.h>

    int
    main(int argc, char *argv[])
    {
     FILE *fp = fopen(argv[1], "r");
     EVP_PKEY *pk;
     char *ptr;
     char pwd[1024];

     SSL_library_init();
     pwd[0] = '\0';
     while (1)
     {
      if (!fgets(pwd, sizeof pwd, stdin))
      {
       printf("Password not found.\n");
       exit(0);
      }
      ptr = strchr(pwd, '\n');
      if (ptr)
       *ptr = '\0';
      pk = PEM_read_PrivateKey(fp, NULL, NULL, (char *)pwd);
      if (pk)
      {
       printf("THC THC THC THC THC THC THC THC THC\n");
       printf("----> pwd is '%s' <-----\n", pwd);
       printf("THC THC THC THC THC THC THC THC THC\n");
       exit(0);
      }
     }

     return 0;
    }

    ADDITIONAL INFORMATION

    The information has been provided by THC.

    ========================================

    This bulletin is sent to members of the SecuriTeam mailing list.
    To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@securiteam.com
    In order to subscribe to the mailing list, simply forward this email to: list-subscribe@securiteam.com

    ====================
    ====================

    DISCLAIMER:
    The information in this bulletin is provided "AS IS" without warranty of any kind.
    In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.


  • Next message: SecuriTeam: "[NT] EpicGames's Unreal Engine UMOD Vulnerability"

    Relevant Pages

    • [TOOL] Fast SYN Scanner (libnet, libpcap)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... struct bpf_program cfilter; ... const unsigned char *packet; ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
      (Securiteam)
    • [NT] NetFile FTP Denial of Service (Nonexisting Username)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... multi-threaded FTP/HTTP server combined, featuring automatic virtual ... * Net File version 6.5.1 and prior ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
      (Securiteam)
    • [TOOL] P0f - Passive OS Fingerprinting Tool
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Machines that connect to your box, ... Official SYN+ACK fingerprinting support ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
      (Securiteam)
    • [EXPL] TinyWeb Server DoS Exploit
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... The information in this bulletin is provided "AS IS" without warranty of any kind. ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
      (Securiteam)
    • [EXPL] 3Com FTP Server Buffer Overflow (CD)
      ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... overflow in its parsing of the 'CD' command. ... The information in this bulletin is provided "AS IS" without warranty of any kind. ... In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages. ...
      (Securiteam)