mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #2163] -aes-256-cbc algo #1449
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1449
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kost123 on GitHub (Jul 1, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2163
First off I'll front with this.. I don't know if this is already implemented somewhere in another module that can be easily modified but...
There are a few bitcoin related programs that many people use such as bitcoin wallet for android, multibit keys.. they all use this decryption method:
openssl enc -d -aes-256-cbc -a -in "INFILE" -out "OUTFILE.txt" -k PASSWORDThe creator of btcrecover.py made a good way to check for each of these programs decrypted data to see if the password was correct, it's written in python:
So, can anybody make this algo?
@jfoug commented on GitHub (Jul 5, 2016):
Within john, we already have this in aes/aes.h (note this is a function pointer, where it will get replaced with SIMD aes or fall back to C aes is SIMD on the machine is not there, or can not do AES)
So aes-cbc should be handled.
@kost123 commented on GitHub (Jul 5, 2016):
So how would I go about cracking a base64 encoded aes256 encryption on jtr?
@jfoug commented on GitHub (Jul 5, 2016):
There is a utility class called base64_convert (well, it's in base64_convert.[ch]) You would convert the base64 string into it's binary value. Then perform the aes256-cbc call, and compare the buffers.
@kost123 commented on GitHub (Jul 5, 2016):
Scrap this post.. figured most of it out.
@kholia commented on GitHub (Feb 26, 2017):
I think that the existing
openssl_enc_fmt_plug.cformat can handle this. Also, it seems that OP's problem was "solved". Should we close this ticket?@kost123 commented on GitHub (Feb 26, 2017):
I will try it out and let you know if it works, thanks.
Hmm, little issue with the known plaintext.. is it possible to add a regex expression in there? Because the plaintext I would want to use don't fit a fixed string but more like a hash.
@kholia commented on GitHub (Feb 26, 2017):
No, there is no support for specifying regular expressions. Patches are welcome to add such a feature.
@kholia commented on GitHub (Mar 12, 2017):
https://github.com/cesanta/slre looks good for implementing such a feature.
@kholia commented on GitHub (Jun 28, 2017):
JtR now has native support for various wallet formats. Hence, I am closing this ticket.
@solardiz commented on GitHub (May 10, 2021):
In 2017, @kholia wrote:
As I understand, our native support for wallets does not cover those wallets wrapped in "openssl enc", which some wallet software uses, and which this issue was about. Our "openssl-enc" format works on this outer layer fine, but suffers from too frequent false negatives - hence, @kost123's request here to detect correct decryption through wallet-specific patterns made sense. Unfortunately, it is non-trivial to implement given what we encode into
openssl2john.pyoutput and what we decrypt - namely, we decrypt only the last AES block, where we check the padding, whereas those patterns would be seen near the beginning of a wallet.See also #4723, #4724.