[Share Experiences] john the ripper破解rar加密文件,试验成功
Tofloor
poster avatar
青陆朱红
deepin
2023-01-15 07:10
Author

只能破解难度级别较低的密码,这里使用了rockyou.txt为破解字典。试验成功破解获得密码password。但是目标破解文件还是无法解开,因为rar2john提取的hash文件太大了,尽然达到了53M,用现在的机器ETA要三天三夜scream 只好放弃了。

一、运行命令行,得到存储hash值的1.txt

./rar2john  ./first-file-plain.rar > ~/Downloads/1.txt

二、运行命令行

./john --list=formats

获得支持的格式类型

descrypt, bsdicrypt, md5crypt, md5crypt-long, bcrypt, scrypt, LM, AFS,
tripcode, AndroidBackup, adxcrypt, agilekeychain, aix-ssha1, aix-ssha256,
aix-ssha512, andOTP, ansible, argon2, as400-des, as400-ssha1, asa-md5,
AxCrypt, AzureAD, BestCrypt, bfegg, Bitcoin, BitLocker, bitshares, Bitwarden,
BKS, Blackberry-ES10, WoWSRP, Blockchain, chap, Clipperz, cloudkeychain,
dynamic_n, cq, CRC32, sha1crypt, sha256crypt, sha512crypt, Citrix_NS10,
dahua, dashlane, diskcryptor, Django, django-scrypt, dmd5, dmg, dominosec,
dominosec8, DPAPImk, dragonfly3-32, dragonfly3-64, dragonfly4-32,
dragonfly4-64, Drupal7, eCryptfs, eigrp, electrum, EncFS, enpass, EPI,
EPiServer, ethereum, fde, Fortigate256, Fortigate, FormSpring, FVDE, geli,
gost, gpg, HAVAL-128-4, HAVAL-256-3, hdaa, hMailServer, hsrp, IKE, ipb2,
itunes-backup, iwork, KeePass, keychain, keyring, keystore, known_hosts,
krb4, krb5, krb5asrep, krb5pa-sha1, krb5tgs, krb5-17, krb5-18, krb5-3,
kwallet, lp, lpcli, leet, lotus5, lotus85, LUKS, MD2, mdc2, MediaWiki,
monero, money, MongoDB, scram, Mozilla, mscash, mscash2, MSCHAPv2,
mschapv2-naive, krb5pa-md5, mssql, mssql05, mssql12, multibit, mysqlna,
mysql-sha1, mysql, net-ah, nethalflm, netlm, netlmv2, net-md5, netntlmv2,
netntlm, netntlm-naive, net-sha1, nk, notes, md5ns, nsec3, NT, o10glogon,
o3logon, o5logon, ODF, Office, oldoffice, OpenBSD-SoftRAID, openssl-enc,
oracle, oracle11, Oracle12C, osc, ospf, Padlock, Palshop, Panama,
PBKDF2-HMAC-MD4, PBKDF2-HMAC-MD5, PBKDF2-HMAC-SHA1, PBKDF2-HMAC-SHA256,
PBKDF2-HMAC-SHA512, PDF, PEM, pfx, pgpdisk, pgpsda, pgpwde, phpass, PHPS,
PHPS2, pix-md5, PKZIP, po, postgres, PST, PuTTY, pwsafe, qnx, RACF,
RACF-KDFAES, radius, RAdmin, RAKP, rar, RAR5, Raw-SHA512, Raw-Blake2,
Raw-Keccak, Raw-Keccak-256, Raw-MD4, Raw-MD5, Raw-MD5u, Raw-SHA1,
Raw-SHA1-AxCrypt, Raw-SHA1-Linkedin, Raw-SHA224, Raw-SHA256, Raw-SHA3,
Raw-SHA384, ripemd-128, ripemd-160, rsvp, Siemens-S7, Salted-SHA1, SSHA512,
sapb, sapg, saph, sappse, securezip, 7z, Signal, SIP, skein-256, skein-512,
skey, SL3, Snefru-128, Snefru-256, LastPass, SNMP, solarwinds, SSH, sspr,
Stribog-256, Stribog-512, STRIP, SunMD5, SybaseASE, Sybase-PROP, tacacs-plus,
tcp-md5, telegram, tezos, Tiger, tc_aes_xts, tc_ripemd160, tc_ripemd160boot,
tc_sha512, tc_whirlpool, vdi, OpenVMS, vmx, VNC, vtp, wbb3, whirlpool,
whirlpool0, whirlpool1, wpapsk, wpapsk-pmk, xmpp-scram, xsha, xsha512, ZIP,
ZipMonster, plaintext, has-160, HMAC-MD5, HMAC-SHA1, HMAC-SHA224,
HMAC-SHA256, HMAC-SHA384, HMAC-SHA512, dummy, crypt

三、运行命令行

./john --format=rar --wordlist=~/Downloads/rockyou.txt ~/Downloads/1.txt

显示结果

Using default input encoding: UTF-8
Loaded 1 password hash (rar, RAR3 [SHA1 128/128 AVX 4x AES])
Will run 4 OpenMP threads
Press 'q' or Ctrl-C to abort, almost any other key for status
password (first-file-plain.rar)
1g 0:00:00:04 DONE (2023-01-14 13:06) 0.2207g/s 91.83p/s 91.83c/s 91.83C/s 123456..jerome
Use the "--show" option to display all of the cracked passwords reliably
Session completed

四、运行命令行,显示破解的密码。1.txt为被破解的hash值。

./john --show ~/Downloads/1.txt

显示结果,filename.rar:这就是密码明文:type:username:压缩文件目录

first-file-plain.rar:password:1::1 2

Reply Favorite View the author
All Replies
joo
deepin
2023-01-15 09:20
#1

小心这是木马程序,到时加密你电脑文件,勒索你赎金倒是有可能。

Reply View the author
青陆朱红
deepin
2023-01-15 18:23
#2

有产品迭代,又是开源。可以看看官方网站介绍 https://www.openwall.com/john/

image.png

https://download.openwall.net/pub/projects/john/
image.png

还有hashcat的介绍https://hashcat.net/wiki/

而且hashcat,可以通过apt-get直接安装到系统,说明已经是被收录在系统软件包库中的,只不过收录的版本安装后发现还是5代版本,最新的已经到了6.2.6,支持的类型中多了rar-p等类型。所以目前最新版暂时只能通过编译安装。

Reply View the author