C++ Password Cracker

0 views
Skip to first unread message

Escolastico Hall

unread,
Aug 5, 2024, 1:26:25 AM8/5/24
to chermarighla
Ihad never used an online tool for password cracking before. I knew they were out there, but, there are literally hundreds of billions of passwords with their associating hashes, no database can store them all, this is seemed to be an impossible task, but I set out finding some resources to be able to work through the category.

Crackstation has been my favorite online tool since I discovered it in 2018. It contains numerous wordlists, including the most common rockyou, and 219 additional gigabytes of passwords. The dictionary is enormous! Crackstation is usually where I begin, as it will tell you the wordlist it pulled from, and that allows me to work further down that same list using another tool or website.


Md5decrypt is a website that is great for various password hashes as well as various encryption types. I have used this website for Md5, NTLM (lovely old Windows passwords), and a few of their encryption tools for both the NCL games and a few other CTFs. While they do not provide the name of the wordlist, I normally use that as a starting point to begin to research where that password is found.


onlinehashcrack.com was a bit of an unexpected gem. I have found many paid password tools, which I usually immediately write off and continue down the list, but, I noticed they had a free option, where, if the password was already in the database (which meant it was found in a more common wordlist) it was free! I immediately tried a few well known password hashes, such as d41d8cd98f00b204e9800998ecf8427e, which should always return for any tool, as that is the MD5 hash of a null string. Onlinehashcrack contains many additional tools as well, including some for basic zip file and encrypted word document cracking. This website does contain paid options as well, and they are fairly pricey, so I normally use this as a last resort.


The thing here is, everything works and it generates 2 string password petty well. However, if length exceeds 2 or 3 strings. Well, it kind of moves at snail pace. Then I got an idea, if I could save the randomly generated password in the "b" list that I made and make sure that the passwords in that list are not repeated in the process then i think it will run significantly faster.


Password cracking is not an easy job. Think about the search space you have to go through as the length of the password grows. Your list of the possible characters contains 26 letters and 10 digits (by the way you can use string.digits and string.ascii_lowercase). So, for the first character in your password there are 36 options. The second has 36 options, the 3rd has 36 options and so on. Therefor, for a password of length n you will have 3^n options. As you can quickly see, this number is growing extremely rapidly even for small numbers.


So I locked myself out of a windows server 2003 tower and I do not even remember the local admin password. Does anyone have any recommendations on a good bootable password cracker that is free in order to retrieve my administrative password?


There are actually many ways of doing this. For simplicity, you should divide the majority of the work. In this case, it is rather obvious that most of the work is done in computing the hash. In cases where it is not obvious, you will want to profile your application and find out where the majority of the time is being spent. But also remember there is overhead incurred for many thread creations/joins, so it best to allocate a subset of work to each thread before beginning the work (perhaps check some protected shared variable if someone has found the solution).


Notice, however, depending on the the kind of hashes you will be attempting to crack (I am assuming you will be brute-forcing), there is no guarantee that your program will finish. Most (by that, I mean any practical/effective one) hashing algorithms operate under the notion of computational infeasibility. If you will be generating random strings to crack, notice that all a cracker needs to do is find a collision. For instance, consider a situation where 'cat' and 'dog' map to the same hash value and the real password is 'dog.' If your cracker finds 'cat' as a solution, this solution is just as viable. This is still a very hard problem, however, and also not guaranteed to finish.


The other alternative is a dictionary attack (since this is educational - this should be feasible). If you are doing a simple dictionary attack and the word is not in the dictionary, you will simply be out of luck. This is guaranteed to finish at the end of your dictionary, however. To implement this, it would be best to split your dictionary. If you have 4 threads and a dictionary of 1000 words, then each thread should get a different subset of the dictionary (each with 250 entries to work on). In practice, however, most protected passwords probably have some form of salt as well (just something to think about).


The fastest multi-threading design typically is one thread per core. Why thread swap? the amount of work to be done remains the same. Many threads can be useful in some situations to ease design issues, but if you want full performance, then the design issues have to be met such that one thread per core can be used.


Hashcat enables highly-parallelized password cracking with the ability to crack multiple different passwords on multiple different devices at the same time and the ability to support a distributed hash-cracking system via overlays. Cracking is optimized with integrated performance tuning and temperature monitoring.


John the Ripper offers password cracking for a variety of different password types. It goes beyond OS passwords to include common web apps (like WordPress), compressed archives, document files (Microsoft Office files, PDFs and so on), and more.


Brutus is one of the most popular remote online password-cracking tools. It claims to be the fastest and most flexible password cracking tool. This tool is free and is only available for Windows systems. It was released back in October 2000.


Brutus has not been updated for several years. However, its support for a wide variety of authentication protocols and ability to add custom modules make it a popular tool for online password cracking attacks.


Wfuzz is a web application password-cracking tool like Brutus that tries to crack passwords via a brute-force guessing attack. It can also be used to find hidden resources like directories, servlets and scripts. Wfuzz can also identify injection vulnerabilities within an application such as SQL injection, XSS injection and LDAP injection.


Medusa is a command-line tool, so some level of command-line knowledge is necessary to use it. Password-cracking speed depends on network connectivity. On a local system, it can test 2,000 passwords per minute.


RainbowCrack is a password cracking tool designed to work using rainbow tables. It is possible to generate custom rainbow tables or take advantage of preexisting ones downloaded from the internet. RainbowCrack offers free downloads of rainbow tables for the LANMAN, NTLM, MD5 and SHA1 password systems.


OphCrack is a free rainbow table-based password cracking tool for Windows. It is the most popular Windows password cracking tool but can also be used on Linux and Mac systems. It cracks LM and NTLM hashes. For cracking Windows XP, Vista and Windows 7, free rainbow tables are also available.


L0phtCrack is an alternative to OphCrack. It attempts to crack Windows passwords from hashes. For cracking passwords, it uses Windows workstations, network servers, primary domain controllers and Active Directory. It also uses dictionary and brute-force attacks for generating and guessing passwords. It was acquired by Symantec and discontinued in 2006. Later, L0pht developers again reacquired it and launched L0phtCrack in 2009.


Aircrack-ng is a Wi-Fi password-cracking tool that can crack WEP or WPA/WPA2 PSK passwords. It analyzes wireless encrypted packets and then tries to crack passwords via the dictionary attacks and the PTW, FMS and other cracking algorithms. It is available for Linux and Windows systems. A live CD of Aircrack is also available.


In this post, we have listed 10 password-cracking tools. These tools try to crack passwords with different password-cracking algorithms. Most of the password cracking tools are available for free. So, you should always try to have a strong password that is hard to crack. These are a few tips you can try while creating a password.


Password-cracking tools are designed to take the password hashes leaked during a data breach or stolen using an attack and extract the original passwords from them. They accomplish this by taking advantage of the use of weak passwords or by trying every potential password of a given length.


Howard Poston is a copywriter, author, and course developer with experience in cybersecurity and blockchain security, cryptography, and malware analysis. He has an MS in Cyber Operations, a decade of experience in cybersecurity, and over five years of experience as a freelance consultant providing training and content creation for cyber and blockchain security. He is also the creator of over a dozen cybersecurity courses, has authored two books, and has spoken at numerous cybersecurity conferences. He can be reached by email at how...@howardposton.com or via his website at


I wouldn't expect the OS to just let you keep trying different numbers until you hit one that works. There are other well known ways to recover from a lost password, using the OS installer or a bootable Linux image. Wouldn't they be quicker and easier?


With an external keyboard connected via USB, I can type and enter all the passwords I want, not locked out.

OS installer will not remove this type of password nor will bootable linux image.

Thanks.

JB


The code you posted looks as if it would do the sort of thing you're trying to do although I don't quite follow what you're doing with fakecounter. What's the problem with that code? Does it compile? Does it do anything? What's it doing, or not doing, wrong?

3a8082e126
Reply all
Reply to author
Forward
0 new messages