Man
Professional
- Messages
- 3,222
- Reaction score
- 810
- Points
- 113
Before we can begin to guess a password, we need to establish a few parameters.
The first step in the process is identifying the target. If we are working on a pentest for a company, we need to know the login syntax. Is it Cameron.Smith or C.Smith or maybe CSmith?
We may know this beforehand or need to find out by doing some investigation online using OSINT.
Once we have the correct syntax for users, the next step is to figure out information on the service we are attacking, specifically the login information.
Let’s take a look at the website signup at the picture.
Looking at the form, we know the password must be at least eight characters, and no other requirements must be met.
Now we could use this information to create a list of passwords.
When trying to guess a password, you will often need to perform some sort of OSINT, which can be incredibly helpful in finding out more about the individual. You can locate the individual on social media and find hints like hobbies, significant dates, pet names, or work details that could be part of their password.
If you are working for a client, find a list of employees and their emails on LinkedIn or via other open-source means. This will give you a list you can manipulate. This list might reveal common themes or patterns, such as the company's username syntax or other potentially useful information.
Moreover, people's personal interests and preferences, such as their pets' names, friends' or spouse/partner names, activities, preferred sports, and numerous other aspects of their lives, frequently influence their password selection.
You can use online OSINT sites such as Have I Been Pwned or Dehashed to see if the company has been involved in any breaches (and may still have employees using compromised passwords); you can also search specific individuals and discover if they have been involved in any breaches, where you may find passwords you can reuse.
Another way you can find potential passwords is by using a tool such as CeWL, a Ruby application designed to create custom word lists for password-cracking tools. It spiders a website, collecting words for a password list.
You can also use social engineering techniques to create fake login portals or even watering hole websites, these tactics can be effective in obtaining user credentials by duping the users into thinking they're logging into a legitimate service. Tools such as BeEF, Social Engineer Toolkit, or ChatGPT can help.
Rules
When creating a wordlist, we can also use rules to help take a password and modify it. We may want to append a password, such as adding numbers or symbols to the end of them (Password123@) or we may want to substitute characters (such as P@$$W0RD), or we could even reverse the password (like "drowssaP"). In addition, we could incorporate leet speak substitutions, such as replacing 'i' with '1', 'e' with '3', 'a' with '4', etc.
Here are some tools that can help you manipulate passwords in the ways we described above.
John The Ripper
John the Ripper's rule syntax is extensive, but we’ll provide a simple example. Rules in John are specified in the configuration file or on the command line using the -rules: option.
Here's an example of a rule that appends the numbers 0-9 to each word in the wordlist:
If you saved this in your john.conf file under [List.Rules:MyRule], you could then use this rule with:
Hashcat
Hashcat, like John, can also manipulate a password list by using what’s known as a “rule-based attack.” You can specify a file containing rules to modify the words in the wordlist. This allows Hashcat to attempt variations on the words in the list, such as lowercase all letters or appending the character X to the end.
Here's an example of a command you might run with the best64 rule The "best64" rule is a collection of commonly used rules:
RSMangler
RSMangler is a wordlist manipulation tool. It takes an input file, such as a wordlist, and applies various transformations to the words in the list to generate a larger set of possible passwords. It performs a variety of transformations, including adding years to the end of the word, or adding the following words to the start and end: admin, sys, pw, pwd, numbers 01 - 09, etc.
Here is a sample command that will mangle the given wordlist.
It reads password.txt as an input file, applies a variety of transformations to each word, and saves the results in mangled.txt. -m 6 specifies a minimum word length of 6 characters, while -x 8 specifies a maximum of 8. Any words generated outside of the specified range will be discarded. This is helpful if you know the length of the password.
To be continued.
The first step in the process is identifying the target. If we are working on a pentest for a company, we need to know the login syntax. Is it Cameron.Smith or C.Smith or maybe CSmith?
We may know this beforehand or need to find out by doing some investigation online using OSINT.
Once we have the correct syntax for users, the next step is to figure out information on the service we are attacking, specifically the login information.
Does the login offer hints if the user forgets their login, such as username reminder, custom password hints, or security questions? And what is the password policy of the service? This will give you much more information you can use to formulate a plan of attack.
Let’s take a look at the website signup at the picture.
Looking at the form, we know the password must be at least eight characters, and no other requirements must be met.
Now we could use this information to create a list of passwords.
In 2011, Aaron Barr, the CEO of the cyber security consulting firm HBGary Federal, was hacked by Anonymous after they discovered he used the same password for his business email, Twitter, Facebook, Yahoo, and World of Warcraft accounts.
When trying to guess a password, you will often need to perform some sort of OSINT, which can be incredibly helpful in finding out more about the individual. You can locate the individual on social media and find hints like hobbies, significant dates, pet names, or work details that could be part of their password.
If you are working for a client, find a list of employees and their emails on LinkedIn or via other open-source means. This will give you a list you can manipulate. This list might reveal common themes or patterns, such as the company's username syntax or other potentially useful information.
Many individuals or employees follow similar patterns when generating passwords, often linking them to the specific service used. It is common for employees to include their company's name in their workplace passwords.
Moreover, people's personal interests and preferences, such as their pets' names, friends' or spouse/partner names, activities, preferred sports, and numerous other aspects of their lives, frequently influence their password selection.
You can use online OSINT sites such as Have I Been Pwned or Dehashed to see if the company has been involved in any breaches (and may still have employees using compromised passwords); you can also search specific individuals and discover if they have been involved in any breaches, where you may find passwords you can reuse.
Another way you can find potential passwords is by using a tool such as CeWL, a Ruby application designed to create custom word lists for password-cracking tools. It spiders a website, collecting words for a password list.
You can also use social engineering techniques to create fake login portals or even watering hole websites, these tactics can be effective in obtaining user credentials by duping the users into thinking they're logging into a legitimate service. Tools such as BeEF, Social Engineer Toolkit, or ChatGPT can help.
Rules
When creating a wordlist, we can also use rules to help take a password and modify it. We may want to append a password, such as adding numbers or symbols to the end of them (Password123@) or we may want to substitute characters (such as P@$$W0RD), or we could even reverse the password (like "drowssaP"). In addition, we could incorporate leet speak substitutions, such as replacing 'i' with '1', 'e' with '3', 'a' with '4', etc.
Here are some tools that can help you manipulate passwords in the ways we described above.
John The Ripper
John the Ripper's rule syntax is extensive, but we’ll provide a simple example. Rules in John are specified in the configuration file or on the command line using the -rules: option.
Here's an example of a rule that appends the numbers 0-9 to each word in the wordlist:
Code:
[List.Rules:MyRule]
$[0-9]
If you saved this in your john.conf file under [List.Rules:MyRule], you could then use this rule with:
Code:
john --wordlist=wordlist.txt --rules:MyRule hashes.txt
Hashcat
Hashcat, like John, can also manipulate a password list by using what’s known as a “rule-based attack.” You can specify a file containing rules to modify the words in the wordlist. This allows Hashcat to attempt variations on the words in the list, such as lowercase all letters or appending the character X to the end.
Here's an example of a command you might run with the best64 rule The "best64" rule is a collection of commonly used rules:
Code:
hashcat -m 1400 -a 0 -r rules/best64.rule hash.txt wordlist.txt
RSMangler
RSMangler is a wordlist manipulation tool. It takes an input file, such as a wordlist, and applies various transformations to the words in the list to generate a larger set of possible passwords. It performs a variety of transformations, including adding years to the end of the word, or adding the following words to the start and end: admin, sys, pw, pwd, numbers 01 - 09, etc.
Here is a sample command that will mangle the given wordlist.
Code:
rsmangler -m 6 -x 8 --file password.txt > mangled.txt
It reads password.txt as an input file, applies a variety of transformations to each word, and saves the results in mangled.txt. -m 6 specifies a minimum word length of 6 characters, while -x 8 specifies a maximum of 8. Any words generated outside of the specified range will be discarded. This is helpful if you know the length of the password.
To be continued.
Last edited: