
Implementazione Python3 per la conversione degli hash PBKDF2WithHmacSHA1 di Artemis nel formato hashcat
Implementazione in Python3 per convertire gli hash Artemis PBKDF2WithHmacSHA1 nel formato hashcat
La configurazione predefinita di Apache Artemis prevede l'uso di DefaultSensitiveStringCodec per memorizzare le password degli utenti come hash PBKDF2WithHmacSHA1 nel file "artemis-users.properties".
Gli hash memorizzati in "artemis-users.properties" hanno solitamente la seguente forma:
username = ENC(ITERATIONS:SALT:HASH)
Questo codice python3 converte l'hash Artemis in un formato compatibile con hashcat utilizzando uno dei seguenti comandi:
python3 artemis2hashcat.py 'ENC(1024:8D873D1EDFB8ABACBC1A8229AC6A691B2856427B385167AC5DA636A8B0D0CF7C:50DE2FF97B69C8B8D127356F8F1090730F8F805DAA288E804E199788394EF0C9363671038857CB7F83ACE9022ACE2119792B9FCFB72CA68D026A5458B2D4C7CF)'
OPPURE
python3 artemis2hashcat.py '1024:8D873D1EDFB8ABACBC1A8229AC6A691B2856427B385167AC5DA636A8B0D0CF7C:50DE2FF97B69C8B8D127356F8F1090730F8F805DAA288E804E199788394EF0C9363671038857CB7F83ACE9022ACE2119792B9FCFB72CA68D026A5458B2D4C7CF)'
Nota: L'hash sopra corrisponde alla password in chiaro "7KBeh41j".
Il risultato dei comandi precedenti dovrebbe avere la seguente forma:
sha1:1024:jYc9Ht+4q6y8GoIprGppGyhWQns4UWesXaY2qLDQz3w=:UN4v+XtpyLjRJzVvjxCQcw+PgF2qKI6AThmXiDlO8Mk2NnEDiFfLf4Os6QIqziEZeSufz7cspo0CalRYstTHzw==
Scrivendo l'output su un file (ad es. test.hashcat) possiamo usare il seguente comando hashcat, con modalità hash 12000, per tentare di craccare l'hash:
hashcat -m 12000 -a 0 test.hashcat test.lst