THM - Intro to Offensive Security Walkthrough
Step by Step Walkthrough of the Intro to OffSec room
THM IT REDTEAM
Note on how this goes: I use the premium version of TryHackMe and as such, I connect to their VPN and solve all tasks from my machine. Where applicable, I use the same tools as the room uses. Where not, I do not.
Hacking your first machine===================================
Before going into cyber security careers and what offensive security is, let's get you hacking (and yes, its legal, all exercises are fake simulations)
Your first hack
Click the "Start Machine" button. Once loaded, you will have access to a machine you'll use to hack a fake bank application called FakeBank.We will use a command-line application called "GoBuster" to brute-force FakeBank's website to find hidden directories and pages. GoBuster will take a list of potential page or directory names and tries accessing a website with each of them; if the page exists, it tells you.
Step 1) Open a terminal
A terminal, also known as the command-line, allows us to interact with a computer without using a graphical user interface. On the machine, open the terminal using the Terminal icon: Stuck? See video (V: PRESS CTRL+ALT+T)
Step 2) Find hidden website pages
Most companies will have an admin portal page, giving their staff access to basic admin controls for day-to-day operations. For a bank, an employee might need to transfer money to and from client accounts. Often these pages are not made private, allowing attackers to find hidden pages that show, or give access to, admin controls or sensitive data.Type the following command into the terminal to find potentially hidden pages on FakeBank's website using GoBuster (a command-line security application).
In the command above, -u is used to state the website we're scanning, -w takes a list of words to iterate through to find hidden pages. You will see that GoBuster scans the website with each word in the list, finding pages that exist on the site. GoBuster will have told you the pages it found in the list of page/directory names (indicated by Status: 200).
Step 3) Hack the bank
You should have found a secret bank transfer page that allows you to transfer money between accounts at the bank (/bank-transfer). Type the hidden page into the FakeBank website on the machine. Stuck? See video (V: open Firefox and enter the machine ip address into the bar like so: http://<BANKWEBSITEIP>/bank-transfer)
This page allows an attacker to steal money from any bank account, which is a critical risk for the bank. As an ethical hacker, you would (with permission) find vulnerabilities in their application and report them to the bank to fix before a hacker exploits them.Transfer $2000 from the bank account 2276, to your account (account number 8881). (V: enter those numbers into the page and voila, you will have the data for your answers)
Answer the Following Questions:
Q: When you've transferred money to your account, go back to your bank account page. What is the answer shown on your bank balance page?
A: bank-hacked
Q: If you were a penetration tester or security consultant, this is an exercise you’d perform for companies to test for vulnerabilities in their web applications; find hidden pages to investigate for vulnerabilities.
A: *Click Button*
Q: Terminate the machine by clicking the red "Terminate" button at the top of the page.
A: Terminate machine and then *Click Button*
(V: Read and Click Complete to finish the other two sections)