Advent of Cyber 2023 Day-3

Search for a command to run...

No comments yet. Be the first to comment.
This is a collection of Day wise write-ups of Advent of Cyber 2023. https://tryhackme.com/r/christmas
First, I started the machine of the task of day 4. Then in order to use AntarctiCrafts homepage to generate a wordlist that could potentially hold the key to the portal, I used this command: cewl -d 2 -m 5 -w passwords.txt http://MACHINE_IP --wit...
Artificial Intelligence (AI) is all around us—powering recommendations, self-driving cars, and even medical diagnoses. But have you ever stopped to wonder how AI makes these decisions? As AI gets more advanced, it becomes harder to understand its rea...
Euler’s Totient Function often symbolised as ϕ(n), is one of the most important and fascinating functions in number theory. Named after the mathematician Leonhard Euler, it counts the number of integers upto a given integer n that are coprime to n. T...
A editorial-cum-educative blog teaching the basic features of Typescript, inspired by the Advent of TypeScript '24 exercises.

The world of Machine Learning has been developing for quite some time now , but one of the major breakthroughs in this dynamic field was the invention of XGBoost . The birth of Gradient boosting took place in 1999-2000 which starting the chain reacti...

Cloud computing is a transformative technology that allows businesses and developers to build, deploy, and manage applications through virtualized environments offered by cloud providers. Cloud development focuses on leveraging cloud infrastructure t...

Day 3 delves into cybersecurity aspects, focusing on password complexity and the vulnerabilities associated with weak passwords. The tasks involve practical demonstrations using tools like Crunch and Hydra to showcase the feasibility of brute force attacks.
To tackle the challenge, an AttackBox and Target Machine are utilized, emphasizing hands-on experience. The day's activities culminate in gaining unauthorized access to a PIN code-protected system, showcasing the practical implications of cybersecurity concepts.
Crunch is a versatile password generation tool used to create custom password lists based on specified criteria, aiding in cybersecurity tasks such as brute force testing.
crunch 3 3 0123456789ABCDEF -o 3digits.txt
This command generates a list of all possible three-digit PIN codes using the hexadecimal character set (0-9, A-F) and saves the output to a file named "3digits.txt."

In other words, the main login page http://MACHINE_IP:8000/pin.php receives the input from the user and sends it to /login.php using the name pin.
These three pieces of information,
post,/login.php, andpin, are necessary to set the arguments for Hydra.
Next, Hydra is introduced for automated password testing. The HTML source code of the target page is analyzed to determine the form parameters. The Hydra command then tests each PIN code from the generated list.
hydra -l '' -P 3digits.txt -f -v MACHINE_IP http-post-form "/login.php:pin=^PASS^:Access denied" -s 8000
This command uses Hydra to perform a brute force attack on a login form at MACHINE_IP, testing each PIN code from the "3digits.txt" file.
The output confirms the successful discovery of a valid password for accessing the system.
To provide an alternative approach, we can use FFUF (Fuzz Faster U Fool), a fast web fuzzer written in Go. FFUF is versatile and can be employed for various types of fuzzing, including brute forcing.
ffuf -c -w 3digits.txt -X POST -d "pin=FUZZ" -H "Content-Type: application/x-www-form-urlencoded" -u http://MACHINE_IP:8000/login.php -mr "Access denied"
This FFUF command conducts a brute force attack, replacing the placeholder "FUZZ" with PIN codes from the "3digits.txt" file in a POST request to the login form at MACHINE_IP, with subsequent output indicating the discovery of a valid password based on the specified "Access denied" response.
Alternatively, we can create a request.txt file for FFUF, use Burp Suite to intercept and save the target request, then execute FFUF with the
-uoption, specifying the request file path.
In summary, Brute Force Attacks leverage computational power to crack passwords, underscoring the need for strong security measures. Emphasizing vulnerabilities, this method highlights the ongoing necessity for robust security protocols, serving as a crucial reminder for organizations to fortify defenses against evolving threats.
Additionally, you can check out their Password Attacks Room.
That's all, folks!