OWASP Top 10 Challenge [Phần 3] – LLODO


Continuing with part 2, in this article, I will guide you to exploit OWASP vulnerabilities such as Insecure Deserialization, Components With known Vulnerabilities, and Insufficient Logging & Monitoring in the OWASP Top 10 challenge.

TryHackMe: OWASP Top 10 Challenge [Phần 3]

TryHackMe: OWASP Top 10 Challenge [Phần 3]

Mission 21: [Mức độ nghiêm trọng 8] Insecure Deserialization

What applications are vulnerable?

Any application that stores or fetches data for which no authentication or integrity check is applied to the queried or stored data. Some examples of applications of this nature are:

  • E-commerce website
  • Forum
  • API
  • Runtimes applications (Tomcat, Jenkins, Jboss, …)

You can learn more about Insecure Deserialization here.

#1 Who developed the Tomcat application?

TryHackMe: OWASP Top 10 Challenge [Phần 3] seventy three

Answer: Apache Software Foundation

#2 What kind of attacks that crash services can be done with insecure decryption?

This definition is still quite broad. But can be understood like this, unsafe decryption is replacing the data processed by the application with malicious code; allows anything from DoS (Denial of Service) to RCE (Remote Malware Execution) that an attacker can use to gain a foothold in pentesting.

Answer: Denial of Service

Mission 22 [Mức độ nghiêm trọng 8] Unsecure Decryption – Object

#1 Choose the correct term of the following sentence:

if a dog was sleeping, would this be:

A) A State
B) A Behaviour

Answer: A Behaviour

Mission 23: [Mức độ nghiêm trọng 8] Insecure Deserialization — Deserialization

Suppose you have a password “password123” from a program that needs to be stored in a database on another system. To move across a network, this string/output needs to be converted to binary. Of course, the password needs to be stored as “password123” and not its binary string. When it reaches the database, it will be converted or deserialized back to “password123” to be stored.

#1 What is the name of the base 2 format in which data is sent over the network?

Answer: binary

Mission 24 [Mức độ nghiêm trọng 8] Insecure Deserialization — Cookies

Answer: webapp.com/login

#2 What is the acronym for the web technology that Secure cookies work on?

Answer: Https

Mission 25: [Mức độ nghiêm trọng 8] Insecure Deserialization — Cookies Practical

I will log in to a website like the one below.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 74

Create an account. No need to enter details, you can enter what you like.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 75

Notice on the right, you have your details.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 76

Right click on the page and hit “Inspect Element” then go to the “Storage” tab.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 77

Check Encrypted Data

You will see here that there are both plaintext and base64 encoded cookies. The first flag will be found in one of these cookies.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 78

Answer: THM{good_old_base64_huh}

Notice here that you have a cookie named “userType”. You are now a user, as confirmed by your information on the “myprofile” page.

This application defines what you can and cannot see by your userType. What if you want to be an administrator?

Double left click on the “Value” column of “userType” to modify the content. Let’s change our userType to “admin” and navigate to http://10.10.83.1/admin to get the second flag.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 79

TryHackMe: OWASP Top 10 Challenge [Phần 3] 80

Answer: THM{hers_the_admin_flag}

Mission 26: [Mức độ nghiêm trọng 8] Insecure Deserialization — Code Execution

1. First, change the value of the userType cookie from “admin” to “user” and back to http://10.10.83.1/myprofile.

2. Then left click on the URL under “Exhange your vim” in the screenshot below.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 81

3. Next left click on the URL under “Provide your feedback!” to a page like this:

TryHackMe: OWASP Top 10 Challenge [Phần 3] 82

#1 flag.txt

Change netcat ip.

Use command nano rce.py

Swap tryhackmyIP to the IP of that website.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 83

TryHackMe: OWASP Top 10 Challenge [Phần 3] 84

Paste this into the “encodedPayload” cookie in your browser:

TryHackMe: OWASP Top 10 Challenge [Phần 3] 85

7. Make sure netcat is still running:

TryHackMe: OWASP Top 10 Challenge [Phần 3] eighty six

8. Refresh the page. It will hang, go back to netcat:

TryHackMe: OWASP Top 10 Challenge [Phần 3] eighty seven

Answer: 4a69a7ff9fd68

Mission 29: [Mức độ nghiêm trọng 9] Components With Known Vulnerabilities — Lab

#1 How many characters are in /etc/passwd (using WC -c /etc/passwd for the answer)

Visit the website, as we see this is a normal book website.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 88

Did a bit of research on vulnerabilities found in online bookstore sites and I found this.

TryHackMe: OWASP Top 10 Challenge [Phần 3] 89

TryHackMe: OWASP Top 10 Challenge [Phần 3] 90

TryHackMe: OWASP Top 10 Challenge [Phần 3] 91

Answer: 1611

Mission 30: [Mức độ nghiêm trọng 10] Insufficient Logging & Monitoring

TryHackMe: OWASP Top 10 Challenge [Phần 3] 92

We have to download the login-logs.txt file. Click download and save the file.

#1 What IP address is the attacker using?

We can use cat login-logs.txt and see all the frontends.

TryHackMe: OWASP Top 10 Challenge [Phần 3] ninety three

There is one person constantly accessing the system with different usernames.

Answer: 49.99.13.16

#2 What kind of attack is being performed?

HTTP 401 indicates that the request has not been applied because it lacks valid credentials for the target resource.

So I think it’s a brute force attack because we see that someone is repeatedly trying a password with a different username.

Answer: Brute Force

So this series is done. Are you looking forward to the other series? In addition, you can also see other challenges on tryhackme here.



Link Hoc va de thi 2021

Chuyển đến thanh công cụ