glv2 / bruteforce-salted-openssl

Try to find the password of a file that was encrypted with the 'openssl' command.
Other
205 stars 52 forks source link

DES Support request #19

Closed combat-entropy closed 4 years ago

combat-entropy commented 4 years ago

This is not listed in the program with -a (all i see with DES is id-smime-alg-CMS3DESwrap) but is supported by openssl. I.E: openssl enc -d -des-ecb -nopad -K e0e0e0e0f1f1f1f1

Please add support. Thanks.

glv2 commented 4 years ago

What version of OpenSSL is on your system?

On my system with OpenSSL 1.1.1c I get the following result:

$ bruteforce-salted-openssl -a
Available ciphers:
  AES-128-CBC
  AES-128-CBC-HMAC-SHA1
  AES-128-CBC-HMAC-SHA256
  AES-128-CFB
  AES-128-CFB1
  AES-128-CFB8
  AES-128-CTR
  AES-128-ECB
  AES-128-OFB
  AES-128-XTS
  AES-192-CBC
  AES-192-CFB
  AES-192-CFB1
  AES-192-CFB8
  AES-192-CTR
  AES-192-ECB
  AES-192-OFB
  AES-256-CBC
  AES-256-CBC-HMAC-SHA1
  AES-256-CBC-HMAC-SHA256
  AES-256-CFB
  AES-256-CFB1
  AES-256-CFB8
  AES-256-CTR
  AES-256-ECB
  AES-256-OFB
  AES-256-XTS
  AES128 => AES-128-CBC
  AES192 => AES-192-CBC
  AES256 => AES-256-CBC
  BF => BF-CBC
  BF-CBC
  BF-CFB
  BF-ECB
  BF-OFB
  CAMELLIA-128-CBC
  CAMELLIA-128-CFB
  CAMELLIA-128-CFB1
  CAMELLIA-128-CFB8
  CAMELLIA-128-ECB
  CAMELLIA-128-OFB
  CAMELLIA-192-CBC
  CAMELLIA-192-CFB
  CAMELLIA-192-CFB1
  CAMELLIA-192-CFB8
  CAMELLIA-192-ECB
  CAMELLIA-192-OFB
  CAMELLIA-256-CBC
  CAMELLIA-256-CFB
  CAMELLIA-256-CFB1
  CAMELLIA-256-CFB8
  CAMELLIA-256-ECB
  CAMELLIA-256-OFB
  CAMELLIA128 => CAMELLIA-128-CBC
  CAMELLIA192 => CAMELLIA-192-CBC
  CAMELLIA256 => CAMELLIA-256-CBC
  CAST => CAST5-CBC
  CAST-cbc => CAST5-CBC
  CAST5-CBC
  CAST5-CFB
  CAST5-ECB
  CAST5-OFB
  DES => DES-CBC
  DES-CBC
  DES-CFB
  DES-CFB1
  DES-CFB8
  DES-ECB
  DES-EDE
  DES-EDE-CBC
  DES-EDE-CFB
  DES-EDE-OFB
  DES-EDE3
  DES-EDE3-CBC
  DES-EDE3-CFB
  DES-EDE3-CFB1
  DES-EDE3-CFB8
  DES-EDE3-OFB
  DES-OFB
  DES3 => DES-EDE3-CBC
  DESX => DESX-CBC
  DESX-CBC
  IDEA => IDEA-CBC
  IDEA-CBC
  IDEA-CFB
  IDEA-ECB
  IDEA-OFB
  RC2 => RC2-CBC
  RC2-40-CBC
  RC2-64-CBC
  RC2-CBC
  RC2-CFB
  RC2-ECB
  RC2-OFB
  RC4
  RC4-40
  RC4-HMAC-MD5
  SEED => SEED-CBC
  SEED-CBC
  SEED-CFB
  SEED-ECB
  SEED-OFB

Available digests:
  DSA
  DSA-SHA
  DSA-SHA1 => DSA
  DSA-SHA1-old => DSA-SHA1
  DSS1 => DSA-SHA1
  MD4
  MD5
  MDC2
  RIPEMD160
  RSA-MD4 => MD4
  RSA-MD5 => MD5
  RSA-MDC2 => MDC2
  RSA-RIPEMD160 => RIPEMD160
  RSA-SHA => SHA
  RSA-SHA1 => SHA1
  RSA-SHA1-2 => RSA-SHA1
  RSA-SHA224 => SHA224
  RSA-SHA256 => SHA256
  RSA-SHA384 => SHA384
  RSA-SHA512 => SHA512
  SHA
  SHA1
  SHA224
  SHA256
  SHA384
  SHA512
  sha512WithRSAEncryption => SHA512
  shaWithRSAEncryption => SHA
  ssl2-md5 => MD5
  ssl3-md5 => MD5
  ssl3-sha1 => SHA1
  whirlpool
combat-entropy commented 4 years ago

I am using the latest in Ubuntu 19.04

$ openssl version
OpenSSL 1.1.1b  26 Feb 2019

On my system I get:

$ bruteforce-salted-openssl -a 
Available ciphers:
  AES-128-CBC
  AES-128-CBC-HMAC-SHA1
  AES-128-CBC-HMAC-SHA256
  id-aes128-CCM
  id-aes128-GCM
  id-aes192-CCM
  id-aes192-GCM
  id-aes256-CCM
  id-aes256-GCM
  id-aes256-wrap
  id-aes256-wrap-pad
  id-smime-alg-CMS3DESwrap
  rc2 => RC2-CBC
  rc2-128 => RC2-CBC
  rc2-40 => RC2-40-CBC
  RC2-40-CBC
  rc2-64 => RC2-64-CBC
  RC2-64-CBC
  RC2-CBC
  RC2-CFB
  RC2-ECB
  RC2-OFB
  RC4
  RC4-40
  RC4-HMAC-MD5
  seed => SEED-CBC
  SEED-CBC
  SEED-CFB
  SEED-ECB
  SEED-OFB
  sm4 => SM4-CBC
  SM4-CBC
  SM4-CFB
  SM4-CTR
  SM4-ECB
  SM4-OFB

Available digests:
  RSA-MD4 => MD4
  RSA-MD5 => MD5
  RSA-RIPEMD160 => RIPEMD160
  RSA-SHA1 => SHA1
  RSA-SHA1-2 => RSA-SHA1
  RSA-SHA224 => SHA224
  RSA-SHA256 => SHA256
  RSA-SHA3-224 => SHA3-224
  RSA-SHA3-256 => SHA3-256
  RSA-SHA3-384 => SHA3-384
  RSA-SHA3-512 => SHA3-512
  RSA-SHA384 => SHA384
  RSA-SHA512 => SHA512
  RSA-SHA512/224 => SHA512-224
  RSA-SHA512/256 => SHA512-256
  RSA-SM3 => SM3
  SHA1
  sha1WithRSAEncryption => SHA1
  SHA224
  sha224WithRSAEncryption => SHA224
  SHA256
  sha256WithRSAEncryption => SHA256
  SHA3-224
  SHA3-256
  SHA3-384
  SHA3-512
  SHA384
  sha384WithRSAEncryption => SHA384
  SHA512
  SHA512-224
  sha512-224WithRSAEncryption => SHA512-224
  SHA512-256
  sha512-256WithRSAEncryption => SHA512-256
  sha512WithRSAEncryption => SHA512
  SHAKE128
  SHAKE256
  SM3
  sm3WithRSAEncryption => SM3
  ssl3-md5 => MD5
  ssl3-sha1 => SHA1
  whirlpool
glv2 commented 4 years ago

And what happens if you try to use DES anyway with bruteforce-salted-openssl -c des-cbc ...?

combat-entropy commented 4 years ago

Interesting idea, that seems to work, thanks! I'll close this issue now.