Detecting Web Attacks Writeup

Date: 19-10-2025 | Platform: TryHackMe | Difficulty: Easy

Overview

This room explores web attacks and detection methods through log and network traffic analysis, covering client-side and server-side attacks.

Task 1: Introduction to Web Attacks

1.1 What class of attacks relies on exploiting the user's behavior or device?

Answer: Cli***-****

1.2 What is the most common client-side attack?

Answer: XSS

Task 2: Server-Side Attacks

2.1 What class of attacks relies on exploiting vulnerabilities within web servers?

Answer: Ser***-****

2.2 Which server-side attack lets attackers abuse forms to dump database contents?

Answer: SQL*

Task 3: Analyzing the Logs

3.1 What is the attacker's User-Agent while performing the directory fuzz?

Answer: FFU* **.*.*

3.2 What is the name of the page on which the attacker performs a brute-force attack?

Answer: /log**.***

3.3 What is the complete, decoded SQLi payload the attacker uses on the /changeusername.php form?

Answer: %' OR '1'='*

Task 4: Practical Analysis

4.1 What password does the attacker successfully identify in the brute-force attack?

Answer: ast***************

4.2 What is the flag the attacker found in the database using SQLi?

Answer: THM{******_***_**}

Task 5: Detection and Prevention

5.1 What do WAFs inspect and filter?

Answer: Web ********

5.2 Create a custom firewall rule to block any User-Agent that matches "BotTHM".

Answer: IF U***-***** ******** "******" **** *****

Lessons Learned