Ethereum json file and ethereum aes.json file
#7
I think a diff (patch) to the source code like this could work in the case of shorter ciphertext length and therefore solve the github issue #2017 on https://github.com/hashcat/hashcat/issues/2017 :

patch_ethereum_15700_github_2017_base64.diff
Code:
ZGlmZiAtLWdpdCBhL09wZW5DTC9tMTU3MDAtcHVyZS5jbCBiL09wZW5DTC9tMTU3MDAtcHVyZS5jbAppbmRleCBjM2UzMmZhZTkuLjg0ZWY2ZGQ1NCAxMDA2NDQKLS0tIGEvT3BlbkNML20xNTcwMC1wdXJlLmNsCisrKyBiL09wZW5DTC9tMTU3MDAtcHVyZS5jbApAQCAtNDQsNyArNDQsOSBAQCBpbmxpbmUgX19kZXZpY2VfXyB1aW50NCByb3RhdGUgKGNvbnN0IHVpbnQ0IGEsIGNvbnN0IGludCBuKQogdHlwZWRlZiBzdHJ1Y3QgZXRoZXJldW1fc2NyeXB0CiB7CiAgIHUzMiBzYWx0X2J1ZlsxNl07Ci0gIHUzMiBjaXBoZXJ0ZXh0WzhdOworICB1MzIgY2lwaGVydGV4dFs5XTsKKworICB1MzIgY2lwaGVydGV4dF9sZW47CiAKIH0gZXRoZXJldW1fc2NyeXB0X3Q7CiAKQEAgLTU5OSw3ICs2MDEsNyBAQCBLRVJORUxfRlEgdm9pZCBtMTU3MDBfY29tcCAoS0VSTl9BVFRSX1RNUFNfRVNBTFQgKHNjcnlwdF90bXBfdCwgZXRoZXJldW1fc2NyeXB0XwogICAgKiBrZWNjYWsKICAgICovCiAKLSAgdTMyIGNpcGhlcnRleHRbOF07CisgIHUzMiBjaXBoZXJ0ZXh0WzldOwogCiAgIGNpcGhlcnRleHRbMF0gPSBlc2FsdF9idWZzW0RJR0VTVFNfT0ZGU0VUXS5jaXBoZXJ0ZXh0WzBdOwogICBjaXBoZXJ0ZXh0WzFdID0gZXNhbHRfYnVmc1tESUdFU1RTX09GRlNFVF0uY2lwaGVydGV4dFsxXTsKQEAgLTYwOSw2ICs2MTEsNyBAQCBLRVJORUxfRlEgdm9pZCBt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jZTY2ZTUuLjgzN2NmYjYxMiAxMDA2NDQKLS0tIGEvdG9vbHMvdGVzdF9tb2R1bGVzL20xNTcwMC5wbQorKysgYi90b29scy90ZXN0X21vZHVsZXMvbTE1NzAwLnBtCkBAIC0yMCw3ICsyMCw3IEBAIHN1YiBtb2R1bGVfZ2VuZXJhdGVfaGFzaAogICBteSAkc2NyeXB0X04gICA9IHNoaWZ0IHx8IDEwMjQgOyAjIDI2MjE0NCBvcmlnaW5hbGx5CiAgIG15ICRzY3J5cHRfciAgID0gc2hpZnQgfHwgMTsgIyA4IG9yaWdpbmFsbHkKICAgbXkgJHNjcnlwdF9wICAgPSBzaGlmdCB8fCAxOwotICBteSAkY2lwaGVydGV4dCA9IHNoaWZ0IHx8IHJhbmRvbV9ieXRlcyAoMzIpOworICBteSAkY2lwaGVydGV4dCA9IHNoaWZ0IHx8IHJhbmRvbV9ieXRlcyAocmFuZG9tX251bWJlciAoMTYsIDMyKSk7CiAKICAgbXkgJGRlcml2ZWRfa2V5ID0gc2NyeXB0X3JhdyAoJHdvcmQsICRzYWx0LCAkc2NyeXB0X04sICRzY3J5cHRfciwgJHNjcnlwdF9wLCAzMik7CiAK


to apply this patch:
Code:
git clone https://github.com/hashcat/hashcat hashcat_15700_mod
cd hashcat_15700_mod
git checkout 15bf8b7302fd2febd93845eb26d60efed6255bae
base64 -d patch_ethereum_15700_github_2017_base64.diff > patch_ethereum_15700_github_2017.diff
git apply patch_ethereum_15700_github_2017.diff
make
./hashcat -m 15700 -b

(use hashcat.exe instead of ./hashcat for windows)

the patch above is in base64 encoded format, otherwise the forum software or pastebin etc add some whitespace problems such that the patch can't be applied. Therefore it needs to be base64 decoded first (base64 -d of patch_ethereum_15700_github_2017_base64.diff to patch_ethereum_15700_github_2017.diff)

Of course you need to make sure that you do not confuse this hashcat_15700_mod modified hashcat version with other release (or beta) version of hashcat. remember that it's a modified/patched version

Of course this would need to be tested with several keystore files to make sure it doesn't break anything and at the same time also works with the keystore files with shorter ciphertext lengths.

Please test

update: I've updated the patch above to add tests with much shorter ciphertext lengths and corrected the keccak computation in the kernel after I've discovered that some shorter lengths failed (should be fixed now)
Reply


Messages In This Thread
RE: Ethereum json file and ethereum aes.json file - by philsmd - 11-05-2020, 03:40 PM