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: Client-Side

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: Server-Side

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

Answer: SQLi

Task 3: Analyzing the Logs

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

Answer: FFUF v2.1.0

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

Answer: /login.php

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

Answer: %' OR '1'='1

Task 4: Practical Analysis

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

Answer: astrongpassword123

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

Answer: THM{dumped_the_db}

Task 5: Detection and Prevention

5.1 What do WAFs inspect and filter?

Answer: Web Requests

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

Answer: IF User-Agent CONTAINS "BotTHM" THEN block

Lessons Learned