Difference between revisions of "Password Cracking: Membuat custom wordlist menggunakan Crunch"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 21: | Line 21: | ||
crunch | crunch | ||
− | + | ==Step 2 Syntax Crunch== | |
− | + | Syntax dasar crunch sebagai berikut, | |
+ | crunch <min> max<max> <characterset> -t <pattern> -o <output filename> | ||
+ | Dengan | ||
+ | min = The minimum password length. | ||
+ | max = The maximum password length. | ||
+ | characterset = The character set to be used in generating the passwords. | ||
+ | -t <pattern> = The specified pattern of the generated passwords. For instance, if you knew that the target's birthday was 0728 (July 28th) and you suspected they used their birthday in their password (people often do), you could generate a password list that ended with 0728 by giving crunch the pattern @@@@@@@0728. This word generate passwords up to 11 characters (7 variable and 4 fixed) long that all ended with 0728. | ||
+ | -o <outputfile> = This is the file you want your wordlist written to. | ||
+ | ==Step 3 Crunch Manual== | ||
− | + | Manual crunch bisa di akses melalui perintah, | |
− | + | man crunch | |
− | + | agak ke bawah kita akan melihat cukup banyak contoh yang diberikan di crunch manual ini. Agak ke bawah kita bisa melihat penggunakan switch chacactersset pada crunch, sebagai berikut | |
− | + | -f /path/to/charset.lst charset-name | |
+ | Specifies a character set from the charset.lst | ||
− | + | Disini kita dapat memberitahukan crunch dimana letak (full path) charset.lst. Di Kali Linux, charset.lst ada di: | |
− | + | /usr/share/crunch/charset.lst | |
− | + | ==Step 4 Create Simple Wordlist== | |
− | |||
− | |||
− | |||
− | |||
− | + | Membuat simpel wordlist untuk password cracking. Kita mengasumsikan password yang digunakan hanya menggunakan 4 sampai 8 character. Kita dapat membuat semua kemungkinan password-nya menggunakan crunch dengan nulis, | |
− | + | crunch 4 8 | |
− | + | Saat di jalankan, crunch akan mengestimasi besar file sebelum mulai membuat list-nya, besar file tersebut adalah, | |
− | + | Crunch will now generate the following amount of data: 1945934046160 bytes | |
+ | 1855787 MB | ||
+ | 1812 GB | ||
+ | 1 TB | ||
+ | 0 PB | ||
+ | Crunch will now generate the following number of lines: 217180128880 | ||
− | + | Jika kita tahu bahwa target hanya menggunakan password ANGKA antara 6 dan 8 character. Maka kita dapat membuat list lengkap dari kemungkinan password yang memenuhi kriteria tersebut dan menyimpannya pada root user directory dengan nama numericwordlist.lst dengan mengetik | |
− | + | crunch 6 8 1234567890 -o /root/numericwordlist.lst | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
If we knew that the target's birthday was July 28 and they likely used that date (people often use their birthdates in their passwords to make it easier to remember) at the end of a ten character password? We could generate all the possibilities of ten-character passwords that end with 0728 and send the output to a file in the root user's directory named birthdaywordlist.lst, by typing: | If we knew that the target's birthday was July 28 and they likely used that date (people often use their birthdates in their passwords to make it easier to remember) at the end of a ten character password? We could generate all the possibilities of ten-character passwords that end with 0728 and send the output to a file in the root user's directory named birthdaywordlist.lst, by typing: | ||
Line 84: | Line 74: | ||
The @ sign is use to represent a wildcard of all possibilities, while the literals "0728" represent the fixed values. | The @ sign is use to represent a wildcard of all possibilities, while the literals "0728" represent the fixed values. | ||
− | Step | + | |
+ | Step 5 Complex Wordlists with Crunch | ||
One of the beauties of crunch is the ability to select a specific character set or create your own character set for generating your password list. If we know the likely character set the target is using for their password, we can select the character set to generate our password list. We can find the choice of character sets at: | One of the beauties of crunch is the ability to select a specific character set or create your own character set for generating your password list. If we know the likely character set the target is using for their password, we can select the character set to generate our password list. We can find the choice of character sets at: |
Latest revision as of 11:49, 27 April 2020
Dalam banyak disiplin pemecahan password, kita sering perlu menggunakan wordlist yang pada dasarnya akan mencoba ribuan kata sandi potensial per detik. Ini sering disebut sebagai dictionary attack, meskipun kita tidak perlu hanya mengandalkan kata-kata di kamus. Wordlist dapat memiliki kombinasi karakter dan kata dalam upaya memecahkan password yang rumit secara offline.
Terkadang kita mungkin memiliki indikasi password pilihan target atau komponen password yang mungkin berasal sari pengetahuan kita tentang target, mis. pacar, tetangga, teman, dll. Bisa nama mereka, nama anak-anak, nama hewan peliharaan, ulang tahun, atau pekerjaan. Kita juga dapat mengetahui kebijakan password organisasi (mis. Minimum 8 karakter, huruf besar dan kecil, dll.).
Dalam kasus ini, kita mungkin dapat membuat wordlist yang disesuaikan yang mencerminkan pengetahuan kita tentang target atau kebijakan password organisasi.
Kali Linux telah memasukan di dalamnya sebuah tool yang disebut "crunch" yang memungkinkan kita untuk membuat custom password-cracking wordlist yang dapat kita gunakan dengan tool seperti Hashcat, Cain and Abel, John the Ripper, Aircrack-ng, dan lainnya. Custom wordlist ini mungkin dapat menyelamatkan kita berjam-jam atau berhari-hari dalam pemecahan password jika kita dapat membuatnya dengan benar.
Step 1 Jalankan Kali kemudian Crunch
Jalankan Kali linux, kemudian jalankan crunch melalui menu
Applications -> Password Attacks -> crunch
atau melalui CLI, ketik
crunch
Step 2 Syntax Crunch
Syntax dasar crunch sebagai berikut,
crunch <min> max<max> <characterset> -t <pattern> -o <output filename>
Dengan
min = The minimum password length. max = The maximum password length. characterset = The character set to be used in generating the passwords. -t <pattern> = The specified pattern of the generated passwords. For instance, if you knew that the target's birthday was 0728 (July 28th) and you suspected they used their birthday in their password (people often do), you could generate a password list that ended with 0728 by giving crunch the pattern @@@@@@@0728. This word generate passwords up to 11 characters (7 variable and 4 fixed) long that all ended with 0728. -o <outputfile> = This is the file you want your wordlist written to.
Step 3 Crunch Manual
Manual crunch bisa di akses melalui perintah,
man crunch
agak ke bawah kita akan melihat cukup banyak contoh yang diberikan di crunch manual ini. Agak ke bawah kita bisa melihat penggunakan switch chacactersset pada crunch, sebagai berikut
-f /path/to/charset.lst charset-name Specifies a character set from the charset.lst
Disini kita dapat memberitahukan crunch dimana letak (full path) charset.lst. Di Kali Linux, charset.lst ada di:
/usr/share/crunch/charset.lst
Step 4 Create Simple Wordlist
Membuat simpel wordlist untuk password cracking. Kita mengasumsikan password yang digunakan hanya menggunakan 4 sampai 8 character. Kita dapat membuat semua kemungkinan password-nya menggunakan crunch dengan nulis,
crunch 4 8
Saat di jalankan, crunch akan mengestimasi besar file sebelum mulai membuat list-nya, besar file tersebut adalah,
Crunch will now generate the following amount of data: 1945934046160 bytes 1855787 MB 1812 GB 1 TB 0 PB Crunch will now generate the following number of lines: 217180128880
Jika kita tahu bahwa target hanya menggunakan password ANGKA antara 6 dan 8 character. Maka kita dapat membuat list lengkap dari kemungkinan password yang memenuhi kriteria tersebut dan menyimpannya pada root user directory dengan nama numericwordlist.lst dengan mengetik
crunch 6 8 1234567890 -o /root/numericwordlist.lst
If we knew that the target's birthday was July 28 and they likely used that date (people often use their birthdates in their passwords to make it easier to remember) at the end of a ten character password? We could generate all the possibilities of ten-character passwords that end with 0728 and send the output to a file in the root user's directory named birthdaywordlist.lst, by typing:
kali > crunch 10 10 -t @@@@@@0728 -o /root/birthdaywordlist.lst
The @ sign is use to represent a wildcard of all possibilities, while the literals "0728" represent the fixed values.
Step 5 Complex Wordlists with Crunch
One of the beauties of crunch is the ability to select a specific character set or create your own character set for generating your password list. If we know the likely character set the target is using for their password, we can select the character set to generate our password list. We can find the choice of character sets at:
/usr/share/rainbowcrack/charset.txt
Now, if we know that our target is using an eight character password with only alphabetic characters, we can generate a list of all the possibilities in crunch with the command:
kali > crunch 8 8 -f /usr/share/rainbowcrack/charset.txt mixalpha -o /root/alphawordlist.lst
This will generate all the 8-character passwords using only the alphabetic characters (no numbers or special characters) and storing them in a file called alphawordlist.lst in the root user's directory.
When cracking passwords, there are multiple methods of cracking unknown passwords. These include dictionary, rainbow table, brute force and others. If we know that parameters of the password or know something about the target and their possible passwords (birthday, pet names, spouse, etc.), crunch can be a very useful tool for generating specific wordlists to be used in a dictionary-like attack.
That's it for this lesson; stay tuned to this series on password cracking for more guides in the near future.