Using the Assimilation Bridge (Python Plugin) for Rapid Prototyping
#11
(Yesterday, 05:12 PM)atom Wrote: Please see in the original post:

Note!!! that in order to use this you need a version higher than 7.0.0, for instance the beta binary from https://hashcat.net/beta or by compiling from GitHub master sources.

This will solve the error: This hash-mode plugin cannot crack multiple hashes with the same salt, please select one of the hashes

I was using git commit hash f47c14603631f545ed4e554b0490ce19afe7e3c8 (very recent from this morning) that still produces that error.
Reply
#12
Tried to reproduce with f47c14603631f545ed4e554b0490ce19afe7e3c8, but it works perfect. Here's a log:

Quote:atom@x870:~/hashcat$ git checkout f47c14603631f545ed4e554b0490ce19afe7e3c8
Note: switching to 'f47c14603631f545ed4e554b0490ce19afe7e3c8'.
...
atom@x870:~/hashcat$ make -s
atom@x870:~/hashcat$ wget https://hashcat.net/misc/hash_list_3.txt
...
atom@x870:~/hashcat$ cat hash_list_3.txt | grep -v '^\$2a\$' | sed -e 's/$/*/g' > hashes73000.txt
atom@x870:~/hashcat$
...
edited Python/generic_hash_mp.py as described in (3)
...
atom@x870:~/hashcat$
atom@x870:~/hashcat$ ./hashcat -m 73000 hashes73000.txt example.dict
hashcat (v7.0.0-130-gf47c14603) starting
...
2397b137125c9057e24395767580e9766a340bc13447b5dca4f240d7*:CHOCOLATE
b6a567591e336b320e866187f7993de073589e8518e0b24a6902bcf9*:Learning
bb838248f9023a39bfa873d982aed3260279286ba51975684c42f0ec*:Property
f1cc31f19daa3f07b0278cada69ddfce3619ccbcaf33dd584739e0d8*:Universal
d52285b2e25224fe5a73d0ae0bcba55246442e40c0d68191f3394c19*:amsterdam
afdcd8e8459d171d568dca4fec872d038f98ae07a02c8a846cf2a78f*:augustine
d0af3def62b653b93843afca8b8d73ac636d85313ca12a11bd6763a8*:backdoor
7f16aec1c67828eaadf5b370cc62eee8e8090dc037df7b56b2b1380d*:community
20aad563c133318d232a0e31441245686b863e1932275afd537d3d92*:discovery
31be0ab4bb15394fa89fd091043a881094fd40818dd31a9eb32e3c59*:emulation
cf7df2ba97f76a6e4425ab5b0c1f4641dc4e69f62941c40ec58d38952270afc040923d030c51bd40f38d2400b09c8bc4*:goinggoing
d3b8db3cc6003de3c83b566b51de5ff56487164e25d0f2fbc9b96f24*:mississippi
f435f4a557db5ddd29011c174c018244ad5ac9100ea6eb2cbb612394*:restriction
8bf6d20b734824641f354fd1f7d36a5a62721e6250e6249763c1b419*:safesafe
101f6de2a51d077f76d5aa680114976890c9c8faf673eb447a34a736*:software
3ea5e0d9d5dc6d8abf5c41bd312adbaa73ee36423bf85e503a9bfd52*:something
...
Reply
#13
was a user (my) problem, no idea what happened, sorry..
Reply
#14
One more question: when running the default Python example (from master, not the changed example from this page) in a Python debugger (or as Python file) the salts are not populated. `calc_hash()` is called but context is empty (as it's not run from hashcat).

```
$ echo -n 'hashcat' | python3 Python/generic_hash_mp.py
578062bebe5d6464de429098aea3b21261a2bd366acc8850066032db1c4d3c67
```

Where I'd expect `33522b0fd9812aa68586f66dba7c17a8ce64344137f9c7d8b11f32a6921c22de*9348746780603343` as output.

Not sure how to proceed, writing a Python function that interprets a hashes.txt file doesn't make too much sense.


Furthermore am I correct in thinking https://github.com/hashcat/hashcat/blob/...lain=1#L98 is out of date as I can't find `def calc_hash(ctx, password, salt_id, is_selftest):` anywhere, I expect it should be `def calc_hash(password: bytes, salt: dict) -> str:`
Reply
#15
(Yesterday, 09:08 PM)tha_tux Wrote: One more question: when running the default Python example (from master, not the changed example from this page)  in a Python debugger (or as Python file) the salts are not populated. `calc_hash()` is called but context is empty (as it's not run from hashcat).

```
$ echo -n 'hashcat' | python3 Python/generic_hash_mp.py
578062bebe5d6464de429098aea3b21261a2bd366acc8850066032db1c4d3c67
```

Where I'd expect `33522b0fd9812aa68586f66dba7c17a8ce64344137f9c7d8b11f32a6921c22de*9348746780603343` as output.

Not sure how to proceed, writing a Python function that interprets a hashes.txt file doesn't make too much sense.


Furthermore am I correct in thinking https://github.com/hashcat/hashcat/blob/...lain=1#L98 is out of date as I can't find `def calc_hash(ctx, password, salt_id, is_selftest):` anywhere, I expect it should be `def calc_hash(password: bytes, salt: dict) -> str:`

Again sorry, it's described here in the documentation, that there is no salt an you need to provide it yourself:
Quote:"Note that you probably want to inline the correct salt value, see the main section in the code. TBD: Add some sample"
https://github.com/hashcat/hashcat/blob/...ain=1#L257
Reply
#16
Excellent point. Right now the "hashcat emulation" is not sending the salt used in the ST_HASH, and that is the reason why the result looks different. It was created very early when no salt was involved, so it needs an update. Someone mentioned that they are working on fixing this, but so far I have not received anything from them. Feel free to fix this.
Reply