TryHackMe – OWASP TOP 10 – 2021 Walkthrough

This is a Walkthrough of TryHackMe “OWASP Top 10 – 2021”.

TryHackMe | OWASP Top 10 – 2021
Learn about and exploit each of the OWASP Top 10 vulnerabilities; the 10 most critical web security risks.
tryhackme.com

Task4

Q2Deploy the machine and go to http://MACHINE_IP – Login with the username noot and the password test1234.

Launch the target machine, visit the website, and you will see a login form.

image.png

Username: nootLog in with ,.Password: test1234

image.png

Q3Look at other users’ notes. What is the flag?

HintThe URL contains ?note_id=1 – I wonder what happens if you change the parameter value? You might be able to access another user’s notes.

note_id=1It seems that the note with the number specified in the parameter will be displayed as follows.note_id

note_id=0You can get another note data by specifying and you get the flag.

image.png

Aflag{fivefourthree}

Task8

Q1What is the name of the mentioned directory?

HintHave a look at the source code on the /login page.

81Access the number port.

image.png

/login.phpI found the path in the source code of ./assets

image.png

A/assets

Q2Navigate to the directory you found in question one. What file stands out as being likely to contain sensitive data?

/assetsI found access to thewebapp.db

image.png

Awebapp.db

Q3Use the supporting material to access the sensitive data. What is the password hash of the admin user?

webapp.dbWhen I downloaded and checked the data, I found the account name and password hash value.

image.png

A6eea9b7ef19179a06954edd0f6c05ceb

Q4What is the admin’s plaintext password?

HintRead the supporting material.

The following site is used to analyze the hash value.

https://qiita.com/embed-contents/link-card#qiita-embed-content__b92bf01b182dceba1d7ea24ecc9a4351

adminThe password hash was successfully parsed, and the plaintext of the password was known.

image.png

Aqwertyuiop

Q5Log in as the admin. What is the flag?

/login.phpI was able to get the flag when I logged in with .Username: adminPassword: qwertyuiop

image.png

For the purposes of 1C0 THM{Yzc2YjdkMjE5N2VjMzNhOTE3NjdiMjdl}

Task10

Q1What strange text file is in the website’s root directory?

82Access the number port.

image.png

$()Command injection was successful.

image.png

$(ls)I was able to check the file structure in .

image.png

Adrpepper.txt

Q2How many non-root/non-service/non-daemon users are there?

/etc/passwdConfirm.

image.png

A0

Q3What user is this app running as?

whoamiConfirm with the command.

image.png

Aapache

Q4What is the user’s shell set as?

/etc/passwdConfirm from:

image.png

A/sbin/nologin

Q5What version of Alpine Linux is running?

HintThe version can be found in “/etc/alpine-release”.

/etc/alpine-releaseConfirm from:

image.png

A3.16.0

Task11

Q2What is the value of the flag in joseph’s account?

HintIs there any security question that can be easily guessed?

85Access the number port.

image.png

josephI don’t know the password for , so I will try to change the password from there./resetpass1.php

image.png

There are three secret questions, but it seems easy to guess from.favorite color

image.png

When you finally enter it, you will be issued a new password, so make a note of it.green

image.png

You have successfully logged in with your new password.

image.png

I was able to get the flags from a text file.

image.png

ATHM{Not_3ven_c4tz_c0uld_sav3_U!}

Task12

Q1Navigate to http://TARGET_IP:86/console to access the Werkzeug console.

/consoleWhen I accessed the Werkzeug console, I was able to see the Werkzeug console.

image.png

Q2What is the database file name (the one with the .db extension) in the current directory?

osRCE from the console was successful with the help of the module.

import os; print(os.popen("ls -l").read())
image.png

Atodo.db

Q3Modify the code to read the contents of the app.py file, which contains the application’s source code. What is the value of the secret_flag variable in the source code?

HintThe flag looks like THM{…}. Be sure to write it without the surrounding quotes!

app.pyReview the code.

import os; print(os.popen("cat app.py").read())
image.png

ATHM{Just_a_tiny_misconfiguration}

Leave a Reply

Your email address will not be published. Required fields are marked *