<?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 . on Medium]]></title>
        <description><![CDATA[Stories by . on Medium]]></description>
        <link>https://medium.com/@Unknown17?source=rss-d724851e10d5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9NQVvA5HH71kUq5mVhZdCg.jpeg</url>
            <title>Stories by . on Medium</title>
            <link>https://medium.com/@Unknown17?source=rss-d724851e10d5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 00:44:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Unknown17/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[BTLO: Log Analysis — Compromised WordPress Challenge]]></title>
            <link>https://medium.com/@Unknown17/btlo-log-analysis-compromised-wordpress-challenge-85b4bf7b14e2?source=rss-d724851e10d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/85b4bf7b14e2</guid>
            <dc:creator><![CDATA[.]]></dc:creator>
            <pubDate>Sat, 10 Aug 2024 03:42:35 GMT</pubDate>
            <atom:updated>2024-08-10T03:42:35.784Z</atom:updated>
            <content:encoded><![CDATA[<h3>BTLO: Log Analysis — Compromised WordPress Challenge</h3><p>Log Analysis</p><h3>Introduction</h3><p>Interesting challenge from Blue Team Labs Online to practice log analysis by using Linux CLI. This challenge provided web server (using Apache) log to investigate a compromised WordPress. My investigation took so many steps to write in this write-up, so I skip it and would like to share my finding from my investigation and analysis. You may find the answers of the challenge at the final subtopic. Please, do enjoy reading my write-up. You can access this challenge at this <a href="https://blueteamlabs.online/home/challenge/log-analysis-compromised-wordpress-ce000f5b59">link</a>.</p><h3>Scenario</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/550/0*okUIFLo_aawdYvXd.png" /></figure><h3>Findings</h3><p>Compromised web server usually could be the attacker performed brute force to the login page, code injection, upload RCE and etc. to gain access to the server. So, my first step is to see what IP address that send HTTP POST to the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*DOJE2CfURSUkYdMQ7v2wpw.png" /><figcaption>Figure 1: HTTP POST request by several IP addresses with quantity of request</figcaption></figure><p>We can see in the figure 1 above, several IP addresses that make HTTP POST request to the web server. From my opinion, to check every IP going to be take longer time and fatigue. Therefore, it is better to investigate IP that request the most. Top 5 IP that made most HTTP POST request is:<br>1. 172.21.0.1, 86 requests<br>2. 168.22.54.119, 42 requests<br>3. 110.29.54.120, 32 request<br>4. 119.241.22.12., 24 request<br>5. 103.69.55.212, 14 request<br>We can exclude 172.21.0.1 because this internal IP address and left 4 others that we can investigate.</p><h3>Timeline</h3><p>After investigation and analysis of those 4 IPs, I made timeline of this incident to have an insight of the attacker’s TTP.</p><h4>14/Jan/2021:05:42:34</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A8YT9JjlFLsCcfkWZseZQQ.png" /></figure><p>IP 119.241.22.12 send several HTTP GET request indicating enumeration on the web server to find any available directories and files. Other observation we can see in the above figure, repeated request to specific files, made manipulation parameter.</p><h4>14/Jan/2021:06:01:41</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Hc42N-uZl7NTFr6qRAF4Sg.png" /></figure><p>IP 119.241.22.121 used WPScan to enumerate the web server but the web server response with 403</p><h4>14/Jan/2021:06:12:53</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6KCC3weUSx-TMKs1dtEcig.png" /></figure><p>IP 168.22.54.119 made a POST request to /wp-login.php by using SQLmap. But the server, response with 302 code indicating a redirection.</p><h4>14/Jan/2021:06:13:52</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*37a8oLgO8xLXQ90hwytQKQ.png" /></figure><p>IP 168.22.54.119 gained access through /wp-login.php (a login page) with admin token, /wp-login.php?itsec-hb-token=adminlogin</p><h4>14/Jan/2021:06:14:00</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VMM-WBA--q7y9OC_WNSXBw.png" /></figure><p>IP 168.22.54.119 sent multiple request with code injection payload in the query in order to get the content of /etc/passwd. As you can in the query parameter had string “UNION”, “AND”. These are the common technique use in SQL injection to extract data/information from the database.</p><h4>14/Jan/2021:06:26:53</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FxRq25CwRz-S6C0wOQLsMQ.png" /></figure><p>IP 119.241.22.121 successful upload php file using python at /wp-content/plugins/simple-file-list/, file name “ee-upload-engine.php” &amp; “ee-file-engine.php”.<br>I did some research on Google and found vulnerability exploitation on Exploit-db for plugin Simple File List (<a href="https://www.exploit-db.com/exploits/48979">https://www.exploit-db.com/exploits/48979</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_xLeHvyiHh4zD2if8QCefQ.png" /></figure><p>We can see the same file name in this script as files uploaded by IP 119.241.22.121.</p><h4>14/Jan/2021:06:27:06</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z92L4J--_2_4UwL8x53vHQ.png" /></figure><p>IP 103.69.55.212 successful uploaded php file to /wp-content/uploads/simple-file-list file name “fr34k.php”. We can see after POST request (upload the php file), then GET request to that php file. This indicate attacker uploaded a web shell to get reverse shell that can remotely access or control the server.</p><h3>Challenge Questions</h3><p>Question 1: Identify the URI of the admin login panel that the attacker gained access to (include the token)</p><p>We knew that the attacker gained through the /wp-login.php page with using admin token.</p><blockquote>Answer: /wp-login.php?itsec-hb-token=adminlogin</blockquote><p>Question 2: Can you find two tools the attacker used?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*h0AJ27LsIJ902LhgCjW_5w.png" /></figure><p>Remember that 119.241.22.121 used WPScan to do scanning and 168.22.54.119 use sqlmap.</p><blockquote>Answer: Wpscan sqlmap</blockquote><p>Question 3: The attacker tried to exploit a vulnerability in ‘Contact Form 7’. What CVE was the plugin vulnerable to? (Do some research!)</p><p>This question require to do some research. I just quick google “Contact Form 7 vulnerability” and found this CVE on cve.mitre.org website, <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-35489">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-35489</a></p><blockquote>Answer: CVE-2020–35489</blockquote><p>Question 4: What plugin was exploited to get access?</p><p>From the findings, IP 119.241.22.121 upload php file to /wp-content/uploads/simple-file-list.</p><blockquote>Answer: Simple File List 4.2.2</blockquote><p>Question 5: What is the name of the PHP web shell file?</p><p>The last finding, IP 103.69.55.212 upload a php file into web server.</p><blockquote>Answer: fr34k.php</blockquote><p>Question 6: What was the HTTP response code provided when the web shell was accessed for the final time?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*UOVNTgjqqeAiqPTs7yPF1A.png" /></figure><blockquote>Answer: 404</blockquote><h3>Summary</h3><p>My analysis, the attacker used several IPs in this incident. I assume, the attacker keep changing IP because it got blocked. Their way to get breach start with:<br>1. Enumeration of the web site manually and by using enumeration tool, in this case WPScan for gathering information about the website directories and file. <br>2. Then, the attacker found a way to gain access through login page by using admin token. <br>3. Leveraging the admin access, the attacker extract data of available user in the /etc/passwd by code injection.<br>4. The attacker found vulnerability in the WordPress plugin which is Simple File List that may arbitrary file upload and exploit this vulnerability.<br>5. Lastly, the attacker upload a web shell to get reverse shell to remotely control the web server.</p><h4>Recommend actions</h4><ol><li>Implement WAF</li><li>Update blocklist for those malicious IP addresses</li><li>Immediately change all admin tokens, passwords, and any other credentials that may have been compromised.</li><li>Patch and update to the latest for the plugins, CMS and web server</li><li>Implement input validation and sanitization to prevent arbitrary file uploads</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85b4bf7b14e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LetsDefend Practice: SOC165 — Possible SQL Injection Payload Detected — Write-up]]></title>
            <link>https://medium.com/@Unknown17/letsdefend-practice-soc165-possible-sql-injection-payload-detected-write-up-c0ba95029b1c?source=rss-d724851e10d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/c0ba95029b1c</guid>
            <dc:creator><![CDATA[.]]></dc:creator>
            <pubDate>Sat, 27 Jul 2024 00:42:58 GMT</pubDate>
            <atom:updated>2024-07-27T00:52:57.494Z</atom:updated>
            <content:encoded><![CDATA[<h3>LetsDefend Practice: SOC165 — Possible SQL Injection Payload Detected — Write-up</h3><p>Investigating alert</p><p>LetsDefend providing a platform for practicing real situation of security analyst role to analyze, investigate and response to an security alert. In this write-up, will show the way to analyze and investigate alert.</p><h3><strong>SOC165 — Possible SQL Injection Payload Detected</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ZOdrvRdxZUWO1YFSAvqXQ.png" /><figcaption>Figure 1: Details of the alert being generated</figcaption></figure><h4>Detection and Analyze</h4><p>One alert was triggered and detected possible SQL injection payload. First step is to analyze the alert either it is false positive or true positive.</p><p>The alert triggered due to possible SQL injection. There must be a incoming network traffic with malicious code injection in the payload. Refer to the field “Requested URL” in the alert details above (Figure 1), there is malicious query in the URL (<strong>https://172.16.17.18/search/?q=%22%20OR%201%20%3D%201%20--%20-</strong>). We can use CyberChef to decode the URL, <a href="https://172.16.17.18/search/?q="><strong>https://172.16.17.18/search/?q=</strong></a><strong>&quot; OR 1 = 1 — -</strong>.</p><p>Common technique in SQL injection will use query ‘OR 1=1’. This can be conclude that the alert is indeed true positive. Other information we can use later in further investigation:<br>1. Source IP: 167.99.169.17 (adversary)<br>2. Destination IP: 172.16.17.18 (Web server)<br>3. HTTP Request Method: GET</p><h4>Containment</h4><p>After we analyze the alert, we need to isolate the affected machine or host to prevent spreading through the internal network that may disrupt the organization operation or business. In this incident, we must check either the network traffic with the SQL injection payload is pass to the its destination or not. We need to check in the any log that have HTTP request and response (usually, firewall log or web server log).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50DykIY8KYjqtcVWvrXFCw.png" /><figcaption>Figure 2: Firewall log with filtering source address: 167.99.169.17 and destination address: 172.16.17.18</figcaption></figure><p>We can see in the above Figure 2, there were 6 network traffics came from 167.99.169.17 (adversary) to 172.16.17.18 (web server). The other networks traffic could potentially contain SQL injection payload, we can perform investigation on them later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Kiu56v7kCDL6JEteE00Rfw.png" /><figcaption>Figure 3: Log for related to the triggered alert.</figcaption></figure><p>Focusing to the log that is related to alert that being investigating. We can see from the Figure 3, the network traffic is Permitted (at field Device Action). But looking at the field HTTP Response Status is 500, which is, the server (172.16.17.18) response with “Internal Server Error”. It means that the server encountered an unexpected condition that prevented it from fulfilling the request.</p><p>In this case, the network traffic pass through to its destination and not blocked by the firewall. Therefore, we need to isolate this web server because the adversary may get sensitive or PII from the database using SQL injection technique.</p><h4>Eradication &amp; Recovery</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xeTyVp9PYHQU-reKOK118Q.png" /><figcaption>Figure 4: scan result of source IP address.</figcaption></figure><p>Scan result from VirusTotal showed that, the source IP address is malicious (see Figure 4). Some actions can be take for this stage:<br>1. Block the source IP address in firewall<br>2. Update input validation and sanitization routines to ensure that all user inputs are properly validated and sanitized before being processed by SQL queries<br>3. Identify and remove malicious code any injected SQL queries or code that may have been inserted into the application or database. <br>4. Patch and update the web server to latest version.<br>5. Perform thorough testing to confirm that the vulnerability has been addressed and that there are no residual issues. This includes functional testing of the web server and security testing to ensure that the SQL injection vulnerability has been resolved.</p><h4>Summary</h4><p>After the eradication and recovery completed, we can remove the web server from the isolation and continue to normal operation. But in real world, need to consider a backup server or temporary redirect the HTTP request to the affected web server for the organization continue their operation. This is the reason of availability that we need to consider as mentioned in CIA triad.</p><p>In summary, there is a vulnerability found in the web application that may exploit with SQL injection technique. This can be the attack vector for adversary before they could get a foothold in the web server and make another step (persistence or lateral movement).</p><p>Considering to upgrade the firewall with IPS that can block any potential malicious network traffic is better to prevent this accident being happen again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c0ba95029b1c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe Challenge: MalBuster — Write-up]]></title>
            <link>https://medium.com/@Unknown17/tryhackme-challenge-malbuster-write-up-35cc014b615e?source=rss-d724851e10d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/35cc014b615e</guid>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[.]]></dc:creator>
            <pubDate>Sun, 14 Jan 2024 10:20:22 GMT</pubDate>
            <atom:updated>2024-01-18T02:31:04.834Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe Challenge: MalBuster — Write-up</h3><h4>You are tasked to analyze unknown malware samples detected by your SOC team.</h4><h4>Summary</h4><p>Hi everyone, this is my write-up challenge for TryHackMe. In this room, we have to prepare with malware analysis skills. I only use static analysis to analyze, which means without execute the malware. Following are the tools I used during malware analysis.<br>Tools:<br>1. Flare-VM<br>2. Cmder<br>3. PEStudio<br>4. VirusTotal<br>5. PE-bear<br>6. PEview<br>7. Capa</p><p>Let’s begin and start our malware analysis. You can visit the room <a href="https://tryhackme.com/room/malbuster">here</a>.</p><h3>MalBuster</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/256/0*VZK1i1VxDBYtzgs8.png" /></figure><h4>Scenario</h4><p>You are currently working as a Malware Reverse Engineer for your organization. Your team acts as a support for the SOC team when detections of unknown binaries occur. One of the SOC analysts triaged an alert triggered by binaries with unusual behaviour. Your task is to analyse the binaries detected by your SOC team and provide enough information to assist them in remediating the threat.</p><h3>Based on the ARCHITECTURE of the binary, is malbuster_1 a 32-bit or a 64-bit application? (32-bit/64-bit)</h3><p>I used Cmder tool to use file command to check either it is 32-bit or 64-bit</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/979/1*uT7DeknJwv5cpYI1xglftA.png" /></figure><p>It is PE32 executable (Portable Execute 32-bit). We can confirm by using PEStudio.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FE30pYa4GSSXdUd3H2bBrg.png" /></figure><blockquote>Answer: 32-bit</blockquote><h3>What is the MD5 hash of malbuster_1?</h3><p>We can just use Cmder that support md5sum command, it is similar shell in Linux OS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*f353zZOhtzZhlqaYPjxggw.png" /></figure><blockquote>Answer: 4348da65e4aeae6472c7f97d6dd8ad8f</blockquote><h3>Using the hash, what is the number of detections of malbuster_1 in VirusTotal?</h3><p>Let’s copy and paste the hash of malbuster_1 in VirusTotal and see the numbers of detections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K3werXoIWFakmM7VS7OzWw.png" /></figure><p>There are 57 security vendors flagged this file as malicious</p><blockquote>Answer: 57</blockquote><h3>Based on VirusTotal detection, what is the malware signature of malbuster_2 according to Avira?</h3><p>Let’s get the hash value for malbuster_2 first, then we can check Avira detection in VirusTotal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*iYKS_Es-wt-hRfFA1eCWwg.png" /></figure><p>That’s the hash value. Let’s paste it in VirusTotal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RQN5AaM4TtTWDrH-hI_sMw.png" /></figure><p>So, that’s the malware signature for malbuster_2 according to Avira</p><blockquote>Answer: HEUR/AGEN.1306860</blockquote><h3>malbuster_2 imports the function _CorExeMain. From which DLL file does it import this function?</h3><p>Let’s drag and put malbuster_2 file in PEStudio.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kNwW3TVXEGmJywa1lBTGnA.png" /></figure><p>In fuctions, _CorExeMain imported from mscoree.dll library.</p><blockquote>Answer: mscoree.dll</blockquote><h3>Based on the VS_VERSION_INFO header, what is the original name of malbuster_2?</h3><p>We can check its original name at the version section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LqRjV7YmxKtbeEsJCfWlYg.png" /></figure><p>The original name is 7JYpE.exe</p><blockquote>Answer: 7JYpE.exe</blockquote><h3>Using the hash of malbuster_3, what is its malware signature based on abuse.ch?</h3><p>First we to have its SHA256 hash value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*TJjSA_15PAdoSpc0ZqT1YA.png" /></figure><p>Let’s copy and paste it on abuse.ch, we can check in their MalwareBazaar Database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YngJXegsESI0r1bvF5n_SQ.png" /></figure><p>The answer is in the column Signature</p><blockquote>Answer: TrickBot</blockquote><h3>Using the hash of malbuster_4, what is its malware signature based on abuse.ch?</h3><p>We can repeat the same steps like previous question, first we need to get its SHA256 hash value and check in the abuse.ch’s malware database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*87-Y8Iqu4ZMuf7jntVWGkQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZJ5GEBfeZtdXdDgTY5AXg.png" /></figure><blockquote>Answer: Zloader</blockquote><h3>What is the message found in the DOS_STUB of malbuster_4?</h3><p>I used PE-bear to view the DOS_STUB message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DO2Wu7TOrx3ZupmphS2bMA.png" /></figure><p>We can see the message at blue pane.</p><blockquote>Answer: !This Salfram cannot be run in DOS mode.</blockquote><h3>malbuster_4 imports the function ShellExecuteA. From which DLL file does it import this function?</h3><p>Let’s drag malbuster_4 in PEview.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HCsfTK8ADklHr0eAxkyKtg.png" /></figure><p>After several scrolls, I found the imported DLL file which is shell32.dll.</p><blockquote>Answer: shell32.dll</blockquote><h3>Using capa, how many anti-VM instructions were identified in malbuster_1?</h3><p>We need to use capa tool to identified how many anti-VM instructions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q8x8gW8QwWm3IXZV0ZAxrA.png" /></figure><p>There it is, 3 matches is identified.</p><blockquote>Answer: 3</blockquote><h3>Using capa, which binary can log keystrokes?</h3><p>We need to use capa again to check which malbuster file can log keystrokes. Maybe there is a way to check in one time for all files in the Sample folder, but I didn’t know how. So, I just check it one by one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4fd9e2ZSTabuQfXSqz2sOQ.png" /></figure><p>So, I found malbuster_3 file can perform keylogging.</p><blockquote>Answer: malbuster_3</blockquote><h3>Using capa, what is the MITRE ID of the DISCOVERY technique used by malbuster_4?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P_BW6uQJBXWtzKRCP86HOQ.png" /></figure><blockquote>Answer: T1083</blockquote><h3>Which binary contains the string GodMode?</h3><p>We can use strings and grep in Cmder tools to check which file contains GodMode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*c6kGyDU3h-mEZ0-PIXrJOA.png" /></figure><p>The result shown, malbuster_2 contains string GodMode</p><blockquote>Answer: malbuster_2</blockquote><h3>Which binary contains the string <strong>Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)</strong>?</h3><p>Use the same command step like previous question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*fKRlOpX95vp0XT6iqpu02A.png" /></figure><blockquote>Answer: malbuster_1</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35cc014b615e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LetsDefend Challenge: MSHTML — Walkthrough]]></title>
            <link>https://medium.com/@Unknown17/letsdefend-challenge-mshtml-9530194f25db?source=rss-d724851e10d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/9530194f25db</guid>
            <category><![CDATA[malware-analysis]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[lets-defend]]></category>
            <dc:creator><![CDATA[.]]></dc:creator>
            <pubDate>Fri, 12 Jan 2024 23:38:01 GMT</pubDate>
            <atom:updated>2024-01-19T00:39:46.006Z</atom:updated>
            <content:encoded><![CDATA[<h3>LetsDefend Challenge: MSHTML — Walkthrough</h3><h4>2021’s 0-Day MSHTML</h4><p>Analyzing malware in Microsoft Office docx. You can visit the challenge in this <a href="https://app.letsdefend.io/challenge/mshtml">link</a>.</p><p>Summary<br>This challenge test our malware analysis skills. There are various tools we can use. So, the tools I used to solve this challenge as following.<br>1. REMnux<br>2. md5sum<br>3. VirusTotal<br>Let’s tackle the questions in the challenge.</p><h3>MSHTML</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*X-HuMuZiCNjPS3s3" /></figure><p>2021’s 0-Day MSHTML</p><p>Challenge Files (pass: infected): Download<br>Thanks for visiting this write-up. This challenge prepared by <a href="https://www.linkedin.com/in/bohan-zhang-078751137/">@Bohan Zhang</a> Malware samples: <a href="https://bazaar.abuse.ch/">MalwareBazaar</a>.</p><p>First, let’s download the malware file in a safe environment. I used VM REMnux to download it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UTZEBpPd5AVTlfVudjn00g.png" /></figure><p>So, we got the file in the zip. Unzip it with the password given in the room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LiXoH8sUseyWBRIga4XO6w.png" /></figure><p>There are several office document. Looks like malware author created their malware using Microsoft office macro because the file extension is .docx. They coded by using VBA.</p><h3>Examing the Employees_Contact_Audit_Oct_2021.docx file, what is the malicious IP in the docx file?</h3><p>Let’s get the MD5 value for this file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/847/1*-JIrOmgDNWI3zKpPjT1fdQ.png" /></figure><p>Here we are, let’s examine the MD5 value in VirusTotal. Hopefully, there is reports already been submitted for this malware file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O-oADV-1ncGXATR024wvgA.png" /></figure><p>According to VirusTotal, 38 security vendors and 3 sandboxes flagged this file as malicious. In the Relations, we can get the malicious IP in this docx file.</p><blockquote>Answer: 175.24.190.249</blockquote><h3>Examing the Employee_W2_Form.docx file, what is the malicious domain in the docx file?</h3><p>Let’s repeat the same steps to examine the second docx file by got the MD5 value and use VirusTotal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_z4uVdiNt2P0ievKOx5orw.png" /></figure><p>According to VirusTotal in the community tab, the malicious domain is arsenal.30cm.tw</p><blockquote>Answer: arsenal.30cm.tw</blockquote><h3>Examing the Work_From_Home_Survey.doc file, what is the malicious domain in the doc file?</h3><p>So, I kept repeating the same steps for the other docx file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*duhGuou1Tjp-WAlYK9TiGQ.png" /></figure><p>Answer: trendparlye.com</p><h3>Examing the income_tax_and_benefit_return_2021.docx, what is the malicious domain in the docx file?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2rxBigdipyGFl4h03keSrg.png" /></figure><blockquote>Answer: hidusi.com</blockquote><h3>What is the vulnerability the above files exploited?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QuRG0NDc36bjea7-1xtaIg.png" /></figure><blockquote>Answer: cve-2021–40444</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9530194f25db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe CTF: Agent Sudo — Write-up]]></title>
            <link>https://medium.com/@Unknown17/tryhackme-ctf-agent-sudo-write-up-4a7c3ad864c9?source=rss-d724851e10d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a7c3ad864c9</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[.]]></dc:creator>
            <pubDate>Fri, 12 Jan 2024 04:32:19 GMT</pubDate>
            <atom:updated>2024-01-19T00:41:06.071Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe CTF: Agent Sudo — Write-up</h3><h4>You found a secret server located under the deep sea. Your task is to hack inside the server and reveal the truth.</h4><p>CTF challenge<br>Tools:<br>1. Kali Linux<br>2. nmap<br>3. Hydra<br>4. Burp suite<br>5. Exploit-DB<br>6. John The Ripper</p><h3>Agent Sudo</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/0*UlfMpOjnAMLbvke2.png" /></figure><h3>Task 1 Author note</h3><p>Welcome to another THM exclusive CTF room. Your task is simple, capture the flags just like the other CTF room. Have Fun!</p><p>Deploy the machine</p><p>Answer: No answer needed</p><h3>Task 2 Enumerate</h3><p>Enumerate the machine and get all the important information</p><p>Answer the questions below</p><h4>How many open ports?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*-FaqTvCJkp4zkOggSbvGrQ.png" /></figure><p>We can just use nmap for port scanning to discover open port.</p><blockquote>Answer: 3</blockquote><h4>How you redirect yourself to a secret page?</h4><p>Nmap scan shown port 80 is running http service. That is a website for this machine. Let’s visit the webpage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*op-4T3VXmb076zqO72G86g.png" /></figure><p>There a message “Use your own codename as user-agent to access the site”. User-agent is request header in HTTP for GET request.</p><p>Answer: user-agent</p><h4>What is the agent name?</h4><p>The message inform we can access the site by using codename as user-agent. Maybe we adjust the user-agent when access to this site. The question hint we have to use user-agent: C. Let’s use Burp suite to change the GET HTTP request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ByDwCOXHnML39zK9jMGmqQ.png" /></figure><p>We have to change the request header for user-agent to “C”. Let’s forward the request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DT5P5cXT4IyZycIrbSV21g.png" /></figure><p>We got another GET request with /agent_c/attention.php. Let’s just forward this request to see response from the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ub2fVpEdYqnmtWEKPoVf4w.png" /></figure><p>There it is! The other agent name which is “chris”</p><blockquote>Answer: chris</blockquote><h3>Task 3 Hash cracking and brute-force</h3><p>Done enumerate the machine? Time to brute your way out.</p><p>Answer the questions below</p><h4>FTP password</h4><p>Previously, we have a name “chris”. So, we can use hydra to brute-force the chris’s FTP password</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2scVPbQBhoaKcsfu1JdtKQ.png" /></figure><blockquote>Answer: crystal</blockquote><h4>Zip file password</h4><p>Let’s enumerate into the ftp server using chris credentials.<br>Username: chris<br>Password: crystal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CeNsVwnwClam5HECOeT1XA.png" /></figure><p>There are 3 files in the ftp server. Download it to our attacking machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6ikp1g4ANgNkMW59tkVqHw.png" /></figure><p>There is another message from Agent C to agent J, he informed there is login password in either fake picture. Let’s view the pictures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y3zg9-isDv3E9ywAguKmXA.png" /></figure><p>There is no password shown in those pictures. Maybe the password is hidden in the picture. Let’s use strings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OR0OQwspQvj3iPqqq5op6A.png" /></figure><p>There is file hidden “To_agentR.txt” in cutie.png. We can use binwalk to extract this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JBmumUmD_9fJ4w0S7nnn3g.png" /></figure><p>We managed to extract it, let’s see what inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*qEVmH6gn8zj_EEO8GYh99A.png" /></figure><p>The file “To_agentR.txt” is just empty file. Let’s unzip 8702.zip.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Z7UYzWyjzfFPTd3j7wfMQ.png" /></figure><p>Looks like it require password to unzip. We have to use John The Ripper to crack the password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*zm421xUV1KMzk8vcikvgbg.png" /></figure><p>alien is the zip file password.</p><blockquote>Answer: alien</blockquote><h4>steg password</h4><p>Let’s view the file we extracted from the protected zip file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TKHQpJ8z17f8OE5DrRT5OA.png" /></figure><p>There a message from Agent C to Agent R informed “We need to send the picture to ‘QCJlyTIUx’ as soon as possible! Maybe ‘QCJlyTIUx’ is encoded, let’s crack it to see what is encoded word.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MaQClRW5BJ-FluMmukScMg.png" /></figure><p>There the answer, it was encoded with Base64.</p><blockquote>Answer: Area51</blockquote><h4>Who is the other agent (in full name)?</h4><p>Remember message from Agent J to Agent C tells there is login password in those pictures. Maybe it was coded with steganographic technique. Let’s use online decoder using the password “Area51”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YSpVvfC8TobOq1sfCyEgwA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_uaWRK4lguwtInAzXZHRtQ.png" /></figure><p>So, that is the Agent J’s name and login password hackerrules!</p><blockquote>Answer: james</blockquote><h4>SSH pasword</h4><blockquote>Answer: hackerrules!</blockquote><h3>Task 4 Capture the user flag</h3><p>You know the drill.</p><p>Answer the questions below</p><h4>What is the user flag?</h4><p>Let’s login via SSH using james’s credential<br>username: james<br>password: hackerrules!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*CPZ3JUdp9E50hWNzYU2bFw.png" /></figure><p>We did it! Let’s see any file inside the current directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/445/1*dWMoYzbfksDUhjnDkeXaUw.png" /></figure><p>That’s the user flag.</p><blockquote>Answer: b03d975e8c92a7c04146cfa7a5a313c7</blockquote><h4>What is the incident of the photo called?</h4><p>There is another picture in the current directory, let’s view the picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M45goCfc6U5IA4fttzGDMQ.png" /></figure><p>It is an alien body are lying picture. Let’s reverse this image to see any information of incident related to this picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j1n73Bm8ZG-SoBiBQ7BisA.png" /></figure><p>So, I found a news from FOX NEWS about ‘Roswell alien autopsy’ footage.</p><blockquote>Answer: Roswell alien autopsy</blockquote><h3>Task 5 Privilege escalation</h3><p>Enough with the extraordinary stuff? Time to get real.</p><p>Answer the questions below</p><h4>CVE number for the escalation</h4><p>(Format: CVE-xxxx-xxxx)</p><p>We have to elevate to the root user. Let’s enumerate with sudo -l.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1oi7KT_ZlZwMHqnyFENoIA.png" /></figure><p>That is it, let’s google about /bin/bash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tgKWvHWOYnK6WQId0OCQmw.png" /></figure><p>According to Exploit-DB, the /bin/bash is vulnerable with CVE:2019–14287.</p><blockquote>Answer: CVE-2019–14287</blockquote><h4>What is the root flag?</h4><p>Let’s use the exploit in the Exploit-DB. Download it from Exploit-DB using wget. It is a python file. Run the python code and we can be root user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rhQaaJqxH2uRVYVbPf_7Vg.png" /></figure><p>So we managed to become root. Let’s get the root flag.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*SmF58_K1RqZQHxg89EFEFA.png" /></figure><blockquote>Answer: b53a02f55b57d4439e3341834d70c062</blockquote><h4>(Bonus) Who is Agent R?</h4><blockquote>Answer: DesKel</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a7c3ad864c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe CTF: Simple CTF — Write-up]]></title>
            <link>https://medium.com/@Unknown17/tryhackme-ctf-simple-ctf-write-up-c4a0bd3098c4?source=rss-d724851e10d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/c4a0bd3098c4</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[.]]></dc:creator>
            <pubDate>Thu, 11 Jan 2024 01:02:58 GMT</pubDate>
            <atom:updated>2024-01-19T00:42:56.383Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe CTF: Simple CTF — Write-up</h3><h4>Beginner level ctf</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iGTAyMKUuAxFxKnL.png" /></figure><p>Hi! Thank you for visiting my write up. This time is CTF room from TryHackMe. You can visit the room <a href="https://tryhackme.com/room/easyctf">here</a>.</p><p>The tools I used to solve this CTF challenge:<br>1. Kali Linux<br>2. nmap<br>3. Gobuster<br>4. Hydra<br>5. Linpeas.sh</p><h3>How many services are running under port 1000?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*7juYl6HZeJCyDNQiIu90uA.png" /></figure><p>Just use nmap tools to port scanning port under 1000. We get result port 21 (ftp) and port 80 (http) are in open state.</p><blockquote>Answer: 2</blockquote><h3>What is running on the higher port?</h3><p>I’ve to run another nmap scan to find what is the higher port other previous open ports.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*wbZKtZjwpSkake4lQITN8Q.png" /></figure><p>So, I got another open port which is port 2222 running ssh service.</p><blockquote>Answer: ssh</blockquote><h3>What’s the CVE you’re using against the application?</h3><p>From the nmap scan result, we got port 80 running http service and it is a website. Let’s have a visit to the website.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SQ-lPUHhx7T5Zva_PfuDwQ.png" /></figure><p>It seems a Ubuntu default page and nothing interesting in this website. Let’s find out if there are any available directory using gobuster tool.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*gCFb0jMFEWzoWU5VEomXoQ.png" /></figure><p>We found one directory which is /simple. Let’s have a look at it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*st7VdjRi8Lm03lM4gTmoAw.png" /></figure><p>It shown their developer using CMS made simple for their web.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*kJyJbb3OiOs5WeUFyh82Xg.png" /></figure><p>We found its version which is CMS Made Simple version 2.2.8. Let’s google the version, might be found any CVE related to this version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AI6hyyTWg8ouNbiG8sq8ew.png" /></figure><p>From Exploit-database, any CMS Made Simple version below 2.2.10 is vulnerable to CVE:2019–9053.</p><blockquote>Answer: CVE-2019–9053</blockquote><h3>To what kind of vulnerability is the application vulnerable?</h3><p>In the Exploit-database, there was mentioned it is vulnerable to SQL injection also know as sqli for short.</p><blockquote>Answer: sqli</blockquote><h3>What’s the password?</h3><p>Let’s download and use the exploit provided in the Exploit-database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*CsH5vIiXZPWLWtW9mFsqTA.png" /></figure><p>The command to run the exploit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*ntWnWdNNNZbKYaIFiRGxlg.png" /></figure><p>So, a username found which is mitch. Let’s brute force by using Hydra</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Y37O672cueFBiLS9Qo0nQ.png" /></figure><p>There! The password for mitch is secret.</p><blockquote>Answer: secret</blockquote><h3>Where can you login with the details obtained?</h3><p>Remember the nmap scan, there is port 2222 running ssh service. We have credentials username and password to log in as mitch.</p><blockquote>Answer: ssh</blockquote><h3>What’s the user flag?</h3><p>Let’s log into mitch account via ssh</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/861/1*v2cyaGKfwdTNgcJ-f4B4wg.png" /></figure><p>Discover in the current directory, there is filename user.txt. This is the user flag.</p><p>Answer: G00d j0b, keep up!</p><h3>Is there any other user in the home directory? What’s its name?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*EF5weCrqxBK5EOLz4-yazQ.png" /></figure><blockquote>Answer: sunbath</blockquote><h3>What can you leverage to spawn a privileged shell?</h3><p>We have to privilege escalation or become root user, but how? In this situation, I used a automation Linux enumeration which is <a href="https://github.com/carlospolop/PEASS-ng/releases/download/20240107-6fec90a8/linpeas.sh">Linpeas.sh</a>. <br>1. Change directory to /tmp<br>2. Download linpeas.sh to attack machine<br>3. change the permission, chmod +x linpeas.sh<br>4. Run the linpeas.sh script</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8pekwOD9IjdO9Jyd4ulzog.png" /></figure><p>It will take several minute to be done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*h937ifTfxJ7WrDzGgYAEkw.png" /></figure><p>So, the script already completed. There is one file which is /usr/bin/vim we can exploit and become root.</p><blockquote>Answer: vim</blockquote><h3>What’s the root flag?</h3><p>Let’s refer to GTFOBins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*9Afxa6AhmGeITCPzlALuuw.png" /></figure><p>Let’s become root with first command provided by GTFOBins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*8Srer7ACESknvvnjUSywNQ.png" /></figure><p>We did it! We have become root. Let’s get the final flag in the /root directory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*km3oCt4tp2dqFLurwjZwfw.png" /></figure><blockquote>Answer: W3ll d0n3. You made it!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c4a0bd3098c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe CTF: Pickle Rick — Write-up]]></title>
            <link>https://medium.com/@Unknown17/tryhackme-ctf-pickle-rick-write-up-da489c6a1f7a?source=rss-d724851e10d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/da489c6a1f7a</guid>
            <category><![CDATA[tryhackme]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[.]]></dc:creator>
            <pubDate>Wed, 10 Jan 2024 00:17:30 GMT</pubDate>
            <atom:updated>2024-01-19T00:43:42.916Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe CTF: Pickle Rick — Write-up</h3><h4>A Rick and Morty CTF. Help turn Rick back into a human!</h4><p>Hello everyone, this is my first CTF write-up challenge I solved. This CTF challenge was created from TryHackMe platform.</p><h3>Summary</h3><p>To participate in this CTF; my opinion is you require the web exploitation skill and Linux command knowledge. Following are the tools I used:<br>1. Kali Linux<br>2. Nmap<br>3. Gobuster<br>4. Netcat<br>To see further about the CTF room, refer to this <a href="https://tryhackme.com/room/picklerick">link</a>.</p><h3>Pickle Rick</h3><p>Rick and Morty CTF. Help turn Rick back into a human!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*k5TTP99K8FVXoed6.jpg" /></figure><p>This Rick and Morty-themed challenge requires you to exploit a web server and find three ingredients to help Rick make his potion and transform himself back into a human from a pickle.</p><p>So, our mission is to find the three ingredients that Rick stored in his web server (10.10.95.82). Let’s start first step with port scanning the web server with IP address provided.</p><h4>Reconnaissance</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*UTq6Eqbw7Uh3FrgaSKAQ7w.png" /></figure><p>From the Nmap scan result, there are 2 open ports which are port 22 (ssh) and port 80 (http). Let’s view and investigate its webpage (http://10.10.95.82:80) if we can find any clue or hint.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AYa3LiR4vxAqA0xdgLjF_g.png" /></figure><p>The web page does not show any clue or hint, let’s view its source code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*70BcwzvMmKtSoy5HAb9llA.png" /></figure><p>There! A comment left that inform us the username: R1ckRul3s. We need to save to use for later. There is no more clue or hint left at the web. At this stage, we have to enumerate more, let’s use Gobuster tools to enumerate this website to find any available directories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*95DZD67ZdI8XoyIkIkvqAA.png" /></figure><p>Above is the result from gobuster. Seems there are might be two results are useful for us. Let’s visit /robots.txt first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QTEtMtgtUV3lEk-KSPGo1g.png" /></figure><p>It is a gibberish word, maybe some useful information. Just save it in notepad for later use. Let’s visit the other directory which is /login.php.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DY9tz6775lhcm36r1mL4RQ.png" /></figure><p>Here we go, a login page with a form. Require username and password. We have the username (R1ckRul3s) and maybe the gibberish word is the password (Wubbalubbadubdub). Let’s have a try to log in with those credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KE6k_UUGH7m-lVGZnuiEDA.png" /></figure><p>Voila! Managed to log in. This is another web page. Seems need to enter a command and click the green button to execute it. Let’s try <em>whoami </em>and <em>pwd </em>command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TJO4wBzsQLFKD2RlwUsRIA.png" /></figure><p>The left picture response with <em>whoami </em>command &amp; at the right is response with <em>pwd </em>command.</p><h4>Exploitation</h4><p>Let’s reverse shell this web server and start netcat listener on my attacking machine, so we may easily enumerate in the attack machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*svKl_YrLrg2vIDqvelflxw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V2rXulYHhVboCC18nxcuXw.png" /></figure><p>I did it to get reverse shell. Let’s see in the current directory to see what file or directory available. Maybe we may found the secret ingredients.</p><h3>What is the first ingredient that Rick needs?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/656/1*WWKzkhYQK5YIBoMlvUYVNA.png" /></figure><p>Here it is, the first ingredient located in the /var/www/html directory.</p><blockquote>Answer: mr meeseek hair</blockquote><h3>What is the second ingredient in Rick’s potion?</h3><p>Usually in CTF, the flag is located in user directory or root directory. Let’s check in the user directory first.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*MH7Hv-KmEdJ5hgb49O0T2g.png" /></figure><p>This is it, the second the ingredients.</p><blockquote>Answer: 1 jerry tear</blockquote><h3>What is the last and final ingredient?</h3><p>We need the last secret ingredient. Maybe it is stored in the /root directory. But, we need elevate to privileged user which root user. Let’s try find any SUID files that we can exploit and become root.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VtKiCGCkZ3zj9w7bh_CKlg.png" /></figure><p>/bin/su file has ‘s’ permission. Let’s refer to <a href="https://gtfobins.github.io/gtfobins/su/">GTFObins</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*NbngZ-ecoQL1Dz7m29shag.png" /></figure><p>So, we can become root by execute that command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/346/1*397cfO2CujBlTZJ_41x7Fg.png" /></figure><p>Nice. We have become root. Let’s go to /root directory to find the last secret ingredient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*xKj2Xo6qjOLjXbu1MnEJ2A.png" /></figure><p>There it is, the last secret ingredient.</p><blockquote>Answer: fleeb juice</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da489c6a1f7a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe Challenge — The Greenholt Phish — Write-up]]></title>
            <link>https://medium.com/@Unknown17/tryhackme-challenge-the-greenholt-phish-write-up-6fcbd0a9c004?source=rss-d724851e10d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/6fcbd0a9c004</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[phishing-analysis]]></category>
            <category><![CDATA[tryhackme]]></category>
            <dc:creator><![CDATA[.]]></dc:creator>
            <pubDate>Tue, 09 Jan 2024 05:18:19 GMT</pubDate>
            <atom:updated>2024-01-19T00:45:02.461Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe Challenge: The Greenholt Phish — Write-up</h3><h4>Use the knowledge attained to analyze a malicious email.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V8FCm4wFWJRUcBiC.png" /></figure><p>Hey folks, new challenge room from TryHackMe (The Greenholt Phish) tackled by me. This challenge test the knowledge and skills to analyze a malicious email.</p><p>You can try to the challenge in this <a href="https://tryhackme.com/room/phishingemails5fgjlzxc">link</a>. Read below write-up for this challenge to answer the questions.</p><p>Scenario:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7zlzacWw5b3NpseX.png" /></figure><p>A Sales Executive at Greenholt PLC received an email that he didn’t expect to receive from a customer. He claims that the customer never uses generic greetings such as “Good day” and didn’t expect any amount of money to be transferred to his account. The email also contains an attachment that he never requested. He forwarded the email to the SOC (Security Operations Center) department for further investigation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jGkEkh9GsTJ4XBqaZ926Lw.png" /></figure><p>Above is the screenshot of VM that provided in the room. The malicious email was located in the Desktop directory. We have to use Thunderbird Mail tool to read the content of this malicious email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j237_rABczhBCxLy-UNB7w.png" /></figure><p>There you go, the content inside the of malicious email. Let’s analyze this email to answer all of the questions. For the question 1 to 3 the answers are in the above image.</p><h3>What is the <strong>Transfer Reference Number</strong> listed in the email’s <strong>Subject</strong>?</h3><blockquote>Answer: 09674321</blockquote><h3>Who is the email from?</h3><blockquote>Answer: Mr. James Jackson</blockquote><h3>What is his email address?</h3><blockquote>Answer: info@mutawamarine.com</blockquote><h3>What email address will receive a reply to this email?</h3><p>We need to view the source code of the email. Press CTRL + U to view the source code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-dQW9P9mBus33OZQWyuD4w.png" /></figure><blockquote>Answer: 192.119.71.157</blockquote><h3>Who is the owner of the Originating IP? (Do not include the “.” in your answer.)</h3><p>Use OSINT <a href="https://www.whois.com/whois/">Whois</a> to find who is the owner.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*URxlJmT8gFZtmQRc4XUUxQ.png" /></figure><blockquote>Answer: Hostwinds LLC</blockquote><h3>What is the SPF record for the Return-Path domain?</h3><p><a href="https://mxtoolbox.com/SuperTool.aspx?action=spf%3amutawamarine.com&amp;run=toolpage">Mx ToolBox</a> can help to get the SPF record. Type in the search box for <em>mutawamarine.com</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*slt5LIZHp5tTXcK5fhNa1A.png" /></figure><p>Answer: v=spf1 include:spf.protection.outlook.com -all</p><h3>What is the DMARC record for the Return-Path domain?</h3><p>I used <a href="https://dmarcian.com/dmarc-inspector/">dmarcian</a> to get the its DMARC record for this domain name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SDra818FTo5DpFj8X1X-9g.png" /></figure><blockquote>Answer: v=DMARC1; p=quarantine; fo=1</blockquote><h3>What is the name of the attachment?</h3><p>In the content of the email, there is an attachment with its filename at the bottom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bqtqnZP8sackz7hwC1GJGw.png" /></figure><p>Answer: SWT_#09674321____PDF__.CAB</p><h3>What is the SHA256 hash of the file attachment?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*EmMsiXj_ItfGhTKnOozODg.png" /></figure><blockquote>Answer: 2e91c533615a9bb8929ac4bb76707b2444597ce063d84a4b33525e25074fff3f</blockquote><h3>What is the attachments file size? (Don’t forget to add “KB” to your answer, <strong>NUM KB</strong>)</h3><p>This require external search using OSINT VirusTotal. We can search by using the SHA256 hash value of the attachment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VmHtgnf9M_WuI7N7vSCWaQ.png" /></figure><blockquote>Answer: 400.26 KB</blockquote><h3>What is the actual file extension of the attachment?</h3><blockquote>Answer: RAR</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6fcbd0a9c004" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LetsDefend Challenge: Disclose The Agent — Walkthrough]]></title>
            <link>https://medium.com/@Unknown17/letsdefend-challenge-disclose-the-agent-walkthrough-ad6b75b913f2?source=rss-d724851e10d5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad6b75b913f2</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[pcap-analysis]]></category>
            <category><![CDATA[lets-defend]]></category>
            <dc:creator><![CDATA[.]]></dc:creator>
            <pubDate>Mon, 08 Jan 2024 08:11:02 GMT</pubDate>
            <atom:updated>2024-01-19T00:46:35.052Z</atom:updated>
            <content:encoded><![CDATA[<h3>LetsDefend Challenge: Disclose The Agent — Walkthrough</h3><h4>We reached the data of an agent leaking information. You have to disclose the agent.</h4><p>Hey folks, this is my write-up for the challenge room <strong>Disclose The Agent</strong> created by <strong>LetsDefend</strong>. Basically, this challenge test our network packet analysis.<br>You may refer the room it <a href="https://app.letsdefend.io/challenge/disclose-the-agent"><em>here</em></a></p><h3>Disclose The Agent</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*2LESFPzbwtVf6Tn6" /></figure><p>Log file: <a href="https://files-ld.s3.us-east-2.amazonaws.com/smtpchallenge.zip">https://files-ld.s3.us-east-2.amazonaws.com/smtpchallenge.zip</a> Pass: 321</p><p>Note: pcap file found public resources.</p><h3>What is the email address of Ann’s secret boyfriend?</h3><p>First, we have to download the zip file in the room in order to analyze it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tebdYjskmLGWTIQ1VOCEBw.png" /></figure><p>As we can see in the image above, after unzip the file there is a pcap file. I’m using Wireshark to analyze this pcap file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*92mPZOO-y70lAwb5SPHKLw.png" /></figure><p>Here we go, with 572 packets captured. I’ve gone through this pcap file and found out that there was someone accessing their email. Therefore, I used “smtp” to filter the packets and only display the packet that used protocol SMTP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1HkcS-5r3MysefZvYyR39A.png" /></figure><p>Packet number 80 shown an e-mail from Ann Dercover. I used Follow TCP Stream function to see the full content of the email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_zF5DsCPNYiKGtMqzJDwew.png" /></figure><p>Unfortunately, there was no answer found. I need go through other packets to find the Ann secret boyfriend’s email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hP1jLs2pqCttZ9Y0PM2Ziw.png" /></figure><p>I found out that another packet number 557 and used the same method to see the full content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iDBL6RNhmRGuIC6Rq3vBPg.png" /></figure><p>There it is, Ann secret boyfriend’s email!</p><blockquote><em>Answer: mistersecretx@aol.com</em></blockquote><h3>What is Ann’s email password?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EnAUjsvAwfkeI8DD0Ri1yA.png" /></figure><p>Packet 63 and 69 show that someone logged in using credential username: c25lYWt5ZzMza0Bhb2wuY29t and Password: NTU4cjAwbHo=. These could be encoded by something. CyberChef can help to decode these credential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cP66u2L8K4MJNxhEBJ71uA.png" /></figure><p>I used Base64 to decode the username; it is Ann’s email.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AKHU4hq81EBzefV3r6Qk7w.png" /></figure><p>The decode result for the password.</p><blockquote><em>Answer: 558r00lz</em></blockquote><h3>What is the name of the file that Ann sent to his secret lover?</h3><p>We need to refer to the last packet — Follow TCP Stream, in the email Ann sent to her secret lover there was a file she attached name’s <em>secret rendezvous.docx.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pHp9CgwW1PYIwxuXAKI6ig.png" /></figure><blockquote>Answer: secretrendezvous.docx</blockquote><h3>In what country will Ann meet with her secret lover?</h3><p>Still in the same email, we have to copy all the raw data that encoded with Base64 and make it to docx because Wireshark cannot read the content of docx file. This can be done by using CyberChef and save the output to docx file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NvBH868AnpsY1Jo0nP1TUA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/687/1*JySzZ9UMY79rfFcIq6n-YQ.png" /></figure><p>Open the output file and we can the location that Ann pinned for them to meet.</p><blockquote>Answer: mexico</blockquote><h3>What is the MD5 value of the attachment Ann sent?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*Q_xRsTLGDn38Yq8VfAksvQ.png" /></figure><blockquote>Answer: 9e423e11db88f01bbff81172839e1923</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad6b75b913f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>