Strumenti Utente

Strumenti Sito


software:john

Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Entrambe le parti precedenti la revisione Revisione precedente
Prossima revisione
Revisione precedente
software:john [2016/12/27 22:12]
stefano
software:john [2023/04/17 14:25] (versione attuale)
Linea 1: Linea 1:
 +==== Introduzione ====
 localmente ad una macchina linux dopo installazione standard fatta da debian con apt-get:\\ localmente ad una macchina linux dopo installazione standard fatta da debian con apt-get:\\
   john /etc/shadow   john /etc/shadow
Linea 26: Linea 27:
 altrimenti se abbiamo già un file di testo contenente l'hash MD5 (attenzione le lettere devono essere minuscole altrimenti john non lo riconosce)\\ altrimenti se abbiamo già un file di testo contenente l'hash MD5 (attenzione le lettere devono essere minuscole altrimenti john non lo riconosce)\\
   ./john percorso-file-con-hash-da-scoprire/file-di-testo   ./john percorso-file-con-hash-da-scoprire/file-di-testo
 +  
 +se non si specifica il tipo di hash o la tipologia di crittazione john la cerca automaticamente e lo si capisce dal seguente output che appare subito dopo l'esecuzione del comando\\
 +  Warning: detected hash type "LM", but the string is also recognized as "HAVAL-128-4"
 +  Use the "--format=HAVAL-128-4" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "lotus5"
 +  Use the "--format=lotus5" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "MD2"
 +  Use the "--format=MD2" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "mdc2"
 +  Use the "--format=mdc2" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "mscash"
 +  Use the "--format=mscash" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "mscash2"
 +  Use the "--format=mscash2" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "NT"
 +  Use the "--format=NT" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "nt2"
 +  Use the "--format=nt2" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "Raw-MD4"
 +  Use the "--format=Raw-MD4" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "Raw-MD5"
 +  Use the "--format=Raw-MD5" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "Raw-MD5u"
 +  Use the "--format=Raw-MD5u" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "ripemd-128"
 +  Use the "--format=ripemd-128" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "Snefru-128"
 +  Use the "--format=Snefru-128" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "lotus5-opencl"
 +  Use the "--format=lotus5-opencl" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "mscash2-opencl"
 +  Use the "--format=mscash2-opencl" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "nt-opencl"
 +  Use the "--format=nt-opencl" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "Raw-MD4-opencl"
 +  Use the "--format=Raw-MD4-opencl" option to force loading these as that type instead
 +  Warning: detected hash type "LM", but the string is also recognized as "Raw-MD5-opencl"
 +  Use the "--format=Raw-MD5-opencl" option to force loading these as that type instead
 +
 +Allora, dalle ultime prove sembra che il comando seguente funzioni:\\
 +  ./john --format=raw-md5 --wordlist=/home/stefano/Scrivania/dizionario.txt  --rules /home/stefano/Scrivania/passw.lst 
 +
 +obiettivo: scoprire l'hash di una stringa MD5\\
 +come deve essere il file contenente la stringa md5 da scoprire??\\
 +Non capivo se andava inserito solo l'hash o anche altri caratteri prima o dopo.\\
 +In teoria john dovrebbe riconoscere il contenuto e agire di conseguenza. In realtà ho scoperto che è meglio specificare quello che vogliamo cercare.\\
 +Infatti nel precedente output abbiamo visto che ha riconosciuto un tipo di hash "LM" ma avvertiva che potrebbe anche essere riconosciuto con altri tipi.\\
 +Quindi specificare subito dopo il comando ./john il formato --format=raw-md5 \\
 +Non ho ancora sperimentato ma dovrebbe essere la stessa cosa anche con gli altri formati.\\
 +Pertanto alla fine ho costruito un file contenente la password (password.txt) in due modi:\\
 +  utente:9f1cb52df1029b12a08ed61d988b8fb1
 +
 +e solo con la stringa md5\\
 +  9f1cb52df1029b12a08ed61d988b8fb1
 +
 +Ho visto che funziona in entrambi i modi specificando **--format=raw-md5** \\
 +Poi ho specificato il file contenente un elenco di parole da testare per vedere se corrispondono alla password **--wordlist=/percorso-file/nomefile.txt** \\
 +Tale file deve essere in chiaro e non deve avere formattazioni particolari, solo un semplice elenco di parole come di seguito:\\
 +  parola1
 +  parola2
 +  parola3
 +  passwordprova1
 +  passwordprova2
 +  password
 +  admin
 +  ecc...
 +
 +il --single come opzione non l'ho capita\\
 +ho provato anche senza questa opzione e ho visto che ha funzionato\\
 +Invece l'ultima parte relativa il file contenente l'hash da scoprire è il semplice percorso del file **/percorso-file/nomefile.txt** \\
 +
 +Ho capito un'altra cosa interessante.\\
 +Se nell'elenco di parole ho ad esempio un nome proprio come: "Sassari" \\
 +ma la password è "irassaS" \\
 +Essa può essere scoperta con l'opzione **--rules** che praticamente va a combinare con non so quale criterio le lettere della parola in elenco "Sassari" \\
 +Se invece eseguo il comando senza l'opzione --rules questa cosa non viene fatta.\\
 +Quindi:\\
 +  ./john --format=raw-md5 --wordlist=/percorso-file/elenco-parole.txt --rules  /percorso-file/password-da-cercare.lst 
 +
 +Al prossimo giro bisogna trovare il modo di far provare in automatico le sostituzioni di caratteri speciali come "s" con "$" oppure "1" con "i" oppure "a" con "@" ecc.. \\
 +Ok figata. ci siamo\\
 +Quindi con l'opzione --rules vengono applicate le regole indicate nel file john.conf nella sezione che si sceglie come modo\\
 +come modo in questo caso era stato scelto il --wordlist \\
 +Quindi nel file john.conf ci sarà una sezione ""[List.Rules:Wordlist]"" \\
 +e all'interno di questa andremo ad aggiungere in fondo le seguenti regole:\\
 +  si1
 +  sa@
 +
 +oppure la combinazione di queste per effettuare la regola contemporaneamente sulla parola:\\
 +  si1 sa@
 +
 +o ancora\\
 +  si1 sa@ so0
 +  si1 so0
 +  sa@ so0
 +  ss$
 +
 +ecc..\\
 +
 +In questo modo verranno provate le sostituzioni.\\
 +
 +==== Dizionari ====
 +
 +http://www.stefanostrozzi.it/mirror/dizionari/diz1.txt \\
 +http://www.stefanostrozzi.it/mirror/dizionari/diz2.txt \\
 +http://www.stefanostrozzi.it/mirror/dizionari/diz3.txt \\
 +http://www.stefanostrozzi.it/mirror/dizionari/diz4.txt \\
 +http://www.stefanostrozzi.it/mirror/dizionari/diz5.txt \\
software/john.1482873172.txt.gz · Ultima modifica: 2023/04/17 14:25 (modifica esterna)