<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mahin Ahmad</title>
    <description>The latest articles on DEV Community by Mahin Ahmad (@mahin101).</description>
    <link>https://dev.to/mahin101</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2011325%2F5810c8b0-b6c2-41fd-bda0-af74caca7657.jpg</url>
      <title>DEV Community: Mahin Ahmad</title>
      <link>https://dev.to/mahin101</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mahin101"/>
    <language>en</language>
    <item>
      <title>AWS Regions, Zones and IAM</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Wed, 04 Feb 2026 08:27:40 +0000</pubDate>
      <link>https://dev.to/mahin101/aws-regions-zones-and-iam-1h1m</link>
      <guid>https://dev.to/mahin101/aws-regions-zones-and-iam-1h1m</guid>
      <description>&lt;p&gt;Lets start with the concept of data centers: stacks and stacks of server hardware built with high speed RAMs, powerful CPUs and low latency storage drives running 24/7/365. They host the websites you visit, enterprise company data and pictures of the moon that you took with your &lt;del&gt;budget&lt;/del&gt; phone!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://disaster-recovery.workshop.aws/en/intro/infra-aws/regions-az.html" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8azj3gvzlnansfyk4awr.png" alt="AWS region made up of Availability zone made up of datacenters" width="360" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Relying on only one datacenter is not enough redundancy-wise. This is where AWS defines their 'Availability Zone' concept. 1 AZ = 1 (or more) data center acting as a single logical unit. What's behind that 'single logical unit'? the promise of AWS Cloud's service guarantee that it will always work, officially called a 'Service Level Agreement'.&lt;/p&gt;

&lt;p&gt;This is what it looks like: Suppose after some downtime and disruption incidents, the AWS storage service &lt;em&gt;S3&lt;/em&gt; had an uptime of (less than) 95% in January, then you get 100% &lt;del&gt;refund&lt;/del&gt; credit for the next monthly billing cycle.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/s3/sla/" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8toz7dy7k7usmacri52b.png" alt="https://aws.amazon.com/s3/sla/" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Despite proper backups, nobody can prevent a city-wide natural calamity or man-made crisis. To ensure close to 100% uptime, we as the user can also choose to host our websites or storage in multiple availability zones. For example: the Mumbai &lt;em&gt;Region&lt;/em&gt; has three availability zones. If we keep our resources in all three AZ, though more pricier, we can ensure closer to 100% uptime.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;AZs are designed not to be simultaneously impacted by a shared fate scenario like utility power, water disruption, fiber isolation, earthquakes, fires, tornadoes, or floods. Common points of failure, like generators and cooling equipment, are not shared across Availability Zones and are designed to be supplied by different power substations.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnpz0whxvrslf0rj4wktt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnpz0whxvrslf0rj4wktt.png" alt="Region and Availability Zones" width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/availability-zones.html" rel="noopener noreferrer"&gt;Read More about AZs&lt;/a&gt;&lt;br&gt;
Also note that in a new aws cloud account, not all regions and availability zones will be available by default. We have to manually turn them on. Its not an issue unless you are looking for a zone closer to your user base for your latency sensitive boutique flower shop's online service! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6epgiedpt6lys6c92ib9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6epgiedpt6lys6c92ib9.png" alt="Available zones in AWS console" width="336" height="827"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Some new features appear some regions first.  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some AWS services are &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/zonal-services.html" rel="noopener noreferrer"&gt;zone-specific&lt;/a&gt;, &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/regional-services.html" rel="noopener noreferrer"&gt;region-specific&lt;/a&gt; or &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/global-services.html" rel="noopener noreferrer"&gt;global&lt;/a&gt;.&lt;/strong&gt; Meaning while configuring them you have to be mindful under which zones/regions you are deploying them or setting particular rules.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Like Amazon EC2 and Amazon EBS, A &lt;u&gt;zonal service&lt;/u&gt; is one that provides the ability to specify which Availability Zone the resources are deployed into. These services operate independently in each Availability Zone within a Region, and more importantly, fail independently in each Availability Zone as well.   &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Note that, if the AZ suffers downtime, the EC2 instance and the attached block storage(EBS) also goes offline (not corrupted/destroyed, depending how severe the AZ failure was). This is called 'static stability', meaning AWS will not automatically/dynamically move the EC2 instance to another AZ and ensure EC2 is up. We have to do it ourselves e.g. select more than 1 AZ if 100% uptime is crucial.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;u&gt;Regional services&lt;/u&gt; are services that AWS has built on top of multiple Availability Zones so that customers don’t have to figure out how to make the best use of zonal services. We logically group together the service deployed across multiple Availability Zones to present a single Regional endpoint to customers. Amazon SQS and Amazon DynamoDB are examples of Regional services. They use the isolation and redundancy of Availability Zones to minimize infrastructure failure...&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Beyond Regions and Availability Zones there are also the concept of &lt;strong&gt;AWS Local Zones&lt;/strong&gt; (infrastructure set up closer to large populations) and &lt;strong&gt;Point-of-Presence&lt;/strong&gt; &lt;del&gt;colloquially&lt;/del&gt; also known as 'edge locations' which host 3 key AWS service: Amazon CloudFront, a content delivery network (CDN); Amazon Route 53, a public Domain Name System (DNS) resolution service; and AWS Global Accelerator (AGA), an edge networking optimization service. &lt;a href="https://docs.aws.amazon.com/whitepapers/latest/aws-fault-isolation-boundaries/points-of-presence.html" rel="noopener noreferrer"&gt;Read more.&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  IAM: Identity Access Management
&lt;/h2&gt;

&lt;p&gt;Moving the discussion away from 'where our resources and workloads run', our next concern should be who can do what, also known as Authorization. Authentication and Authorization is covered under a suite of concepts and tools called IAM.&lt;br&gt;
Lets start from square one. When you try to login to your aws cloud via "console.aws.amazon .com/console" you are presented with a login panel which mentions two types of accounts:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;IAM user&lt;/li&gt;
&lt;li&gt;Root user&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1w4pof165s61w2thcygt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1w4pof165s61w2thcygt.png" alt="IAM user Root user " width="406" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A root user, which can do anything, can spawn(make) many IAM users and specify what they can/cant do. You dont want your company's data analyst working with full priviledge to destroy everything, instead of only limited read and write permission. You can also create a &lt;em&gt;user group&lt;/em&gt; and place many of the same types of users under it. This helps reduce click operations and good management.&lt;br&gt;
Note that we are using the 'IAM' jargon freely here! The entire AWS service and the account type are also called 'IAM'. Dont think about the jargons for too long, just go with it!&lt;/p&gt;

&lt;p&gt;Below is what a IAM setup could look like, read from left:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw1688lhme1uamna9biev.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw1688lhme1uamna9biev.png" alt="IAM and Root user hierarchy" width="800" height="541"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is what an IAM user would see after login. There will be some access denied flags depending on what permission they have been given.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxxr6q0zqjmmjya6tvjy0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxxr6q0zqjmmjya6tvjy0.png" alt="IAM user panel" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Screenshot taken from &lt;a href="https://www.youtube.com/watch?v=l1iBd3o0oKA" rel="noopener noreferrer"&gt;youtube video&lt;/a&gt; by Mr. Mitul Shahriyar, an AWS Community Builder.&lt;/p&gt;

&lt;p&gt;AWS IAM has these concepts that we will discuss in short. The best way is to actually browse and DIY.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ficeflj59e5fettomuv84.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ficeflj59e5fettomuv84.png" alt="AWS IAM concepts" width="343" height="892"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To be contd...&lt;/p&gt;

</description>
      <category>aws</category>
      <category>infrastructure</category>
    </item>
    <item>
      <title>Advent of Cyber 2025 Day 21 22 23 24 Final Writeup &amp; Bonus Question | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Sat, 03 Jan 2026 09:40:25 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-21-24-final-writeup-tryhackme-4omn</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-21-24-final-writeup-tryhackme-4omn</guid>
      <description>&lt;h1&gt;
  
  
  Day 21: Malware Analysis: HTA apps
&lt;/h1&gt;

&lt;p&gt;👉&lt;a href="https://dev.tourl"&gt;Room Link&lt;/a&gt;&lt;br&gt;
You can use the Attackbox or just download the 'malicious' file. &lt;strong&gt;Do not run it&lt;/strong&gt;. Open your text ediltor and open the file(drag and drop the file or ctrl+o)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30ume1bbq5c5byueepbx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F30ume1bbq5c5byueepbx.png" alt="Download Task Button" width="800" height="108"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F16plhcxc5jsk4d9xaf15.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F16plhcxc5jsk4d9xaf15.png" alt="Allow Downloads, Microsoft Edge" width="367" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Task 2 questions are relatively easy. This is a hard one:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The HTA is enumerating information from the local host executing the application. What two pieces of &lt;u&gt;information about the computer&lt;/u&gt; it is running on &lt;u&gt;are being exfiltrated&lt;/u&gt;? You should provide the two object names separated by commas.&lt;br&gt;
=&amp;gt;You can find it inside &lt;code&gt;provideFeedback&lt;/code&gt; vba function! Just ctrl+f to find this string in the hta file.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Next question: What endpoint is the enumerated data being exfiltrated to?&lt;br&gt;
Meaning the malware is getting those information and passing this &lt;strong&gt;to where?&lt;/strong&gt; That's 2 lines down the last question.&lt;/p&gt;

&lt;p&gt;What HTTP method is being used to exfiltrate the data?&lt;br&gt;
=&amp;gt; GET, a 3 letter word.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What is the line of code that executes the contents of the download?&lt;br&gt;
=&amp;gt; The line that starts with 'runObject.Run' 🙂&lt;/p&gt;

&lt;p&gt;What &lt;u&gt;popular encoding scheme&lt;/u&gt; was used in an attempt to obfuscate the download?&lt;br&gt;
=&amp;gt; MD5, Base64 are pretty Popular&lt;/p&gt;

&lt;p&gt;Decode the payload. It seems as if additional steps were taken to hide the malware! What common encryption scheme was used in the script?&lt;br&gt;
=&amp;gt; Can't say base64 this time. From the vba programming it is apparent that letters were shifted. ROT13 is the answer.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh7nnm5vnn8m7mp439zmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh7nnm5vnn8m7mp439zmp.png" alt="Code screenshot" width="498" height="816"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;=&amp;gt; Because ROT13(a cyclic algorithm) was used to encode, the algorithm to decode the string is also ROT13.&lt;/p&gt;

&lt;p&gt;Now the most important question, its the optional question!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;For those who want another challenge, download the HTA file from &lt;a href="https://assets.tryhackme.com/additional/aoc2025/SQ4/NorthPole.zip" rel="noopener noreferrer"&gt;here &lt;/a&gt; to get the key for Side Quest 4, accessible through our Side Quest Hub. The password for the file is CanYouREM3?.&lt;/p&gt;
&lt;/blockquote&gt;







&lt;h1&gt;
  
  
  Day 22: C2 = Command &amp;amp; Control
&lt;/h1&gt;

&lt;p&gt;👉&lt;a href="https://dev.tourl"&gt;Room Link&lt;/a&gt;&lt;br&gt;
Just like attackers have a wide range of tools in their arsenal, defenders also have many tools, frameworks, end-to-end solutions etc.&lt;/p&gt;

&lt;p&gt;Throughout Advent of Cyber, we have been acquainted with Splunk, Burp Suite Community Edition, the DevTools!, YARA and now RITA (Real Intelligence Threat Analytics).&lt;/p&gt;

&lt;p&gt;Note: You are supposed to see a GUI, if not the click this: &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5hd4p4thok4elk7plx09.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5hd4p4thok4elk7plx09.png" alt="Show Split View" width="667" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;RITA interfaces with &lt;code&gt;zeek&lt;/code&gt; tool. Usually, a network activity can be recorded into a 'pcap file' format. But for today's use case we have to convert PCAP files to "Zeek logs": &lt;code&gt;zeek readpcap pcaps/AsyncRAT.pcap zeek_logs/asyncrat&lt;/code&gt; command follows the format &lt;code&gt;zeek readpcap inputFile outputDir&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then using RITA: &lt;code&gt;rita import --logs ~/zeek_logs/asyncrat/ --database asyncrat&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We are simply analyzing the logs and making a new database we named 'asyncrat'. Now we can browse through this 'result database' with &lt;code&gt;rita view asyncrat&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Note that you should open the VM in a new tab to see the &lt;code&gt;rita view asyncrat&lt;/code&gt; output properly. There is an expand icon in the lower bar.&lt;/p&gt;

&lt;p&gt;To answer the questions we need to analyze a different file &lt;code&gt;rita_challenge.pcap&lt;/code&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How many hosts are communicating with malhare.net?
=&amp;gt; Count the lines in 'rita view databasename`&lt;/li&gt;
&lt;li&gt;Which Threat Modifier tells us the number of hosts communicating to a certain destination?
=&amp;gt; scroll up the literature in 'Threat Modifier' section.&lt;/li&gt;
&lt;li&gt;highest number of connections to rabbithole.malhare .net?
=&amp;gt; Use the arrow key and find the max "Connection Count":
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpvakns1zfv4kdpt1jxm3.png" alt="rita view command output" width="800" height="400"&gt;
&lt;/li&gt;
&lt;li&gt;Which search filter would you use to search for all entries that communicate to rabbithole.malhare .net with a beacon score greater than 70% and sorted by connection duration (descending)?
=&amp;gt; Refresh your memory by reading the &lt;u&gt;Search bar&lt;/u&gt; section again in THM room. 
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz73iv5sezae1gtj6y92d.png" alt="How to Search in RITA Database" width="800" height="460"&gt;
&lt;/li&gt;
&lt;li&gt;communicate to rabbithole.malhare .net : &lt;code&gt;dst:rabbithole.malhare.net&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;beacon:&amp;gt;=70&lt;/code&gt; beacon score &lt;u&gt;equal or&lt;/u&gt; greater than 70% &lt;/li&gt;
&lt;li&gt;&lt;p&gt;sorted by connection duration (descending): &lt;code&gt;sort:duration-desc&lt;/code&gt;&lt;br&gt;
Dont type in the VM, I find it slow. Type the entire thing here and paste into VM's RITA search bar.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Which port did the host 10.0.0.13 use to connect to rabbithole.malhare.net?&lt;br&gt;
=&amp;gt; Bro just use the arrow keys and read the panel on the right&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;







&lt;p&gt;Day 23: AWS Security&lt;/p&gt;

&lt;p&gt;👉&lt;a href="https://tryhackme.com/room/cloudenum-aoc2025-y4u7i0o3p6" rel="noopener noreferrer"&gt;Room Link&lt;/a&gt;&lt;br&gt;
If you have never worked with AWS, no worries; just read through the very friendly THM literature.&lt;/p&gt;

&lt;p&gt;Basically, AWS allows us to control our infrastructure resource &lt;u&gt;programmatically&lt;/u&gt; via access keys, much like "api keys". We are authorized through environment variables that hold these keys, ensuring you have the necessary permissions.&lt;/p&gt;

&lt;p&gt;Another very useful tool is the &lt;em&gt;AWS CLI&lt;/em&gt;, which allows you to run AWS commands directly from your terminal and provision/manage your infrastructure. For example: &lt;code&gt;aws ec2 run-instances&lt;/code&gt; to privision(create) a VIM(EC2 instace); &lt;code&gt;aws sts get-caller-identity&lt;/code&gt; displays details about the IAM identity&lt;/p&gt;

&lt;p&gt;Dont make my mistak in task 1! Actually run the command in the Target Machine VM:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy92wvga7q4t35os6gzaj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy92wvga7q4t35os6gzaj.png" alt="THM Day 23" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Task 4 Question:&lt;/u&gt; Apart from &lt;em&gt;GetObject&lt;/em&gt; and &lt;em&gt;ListBucket&lt;/em&gt;, what other action can be taken by assuming the &lt;em&gt;bucketmaster&lt;/em&gt; role?&lt;br&gt;
=&amp;gt; Note that you have to assume the role of &lt;em&gt;bucketmaster&lt;/em&gt; from the prevous task. Make sure to follow all the steps including exporting the new Access Keys.&lt;/p&gt;

&lt;p&gt;lists the bucket and its objects. &lt;br&gt;
To view the specific object(file) &lt;code&gt;cloud_password.txt&lt;/code&gt; you also have to mention this as the 'key' argument:&lt;br&gt;
&lt;a href="https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html#examples" rel="noopener noreferrer"&gt;see example in aws docs&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;aws s3api get-object --key cloud_password.txt --bucket easter-secrets-123145&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command is still incomplete. This we also have to type a 'filename' because this is basically a download operation.&lt;/p&gt;

&lt;p&gt;I tried typing just &lt;code&gt;-&lt;/code&gt; to show the it to the standard output, rather than saving to disk; but it didn't work. It showed the metadata instead:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxlvhivtbixrw93hwl4o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqxlvhivtbixrw93hwl4o.png" alt="aws s3api get-object error" width="800" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;cpass.txt&lt;/em&gt; is the downloaded 'cloud_password.txt' file:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzks0usv5uxqwg7tpxrbe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzks0usv5uxqwg7tpxrbe.png" alt="final flag THM Day 23" width="800" height="164"&gt;&lt;/a&gt;&lt;/p&gt;







&lt;h1&gt;
  
  
  Day 24: Exploitation with cURL
&lt;/h1&gt;

&lt;p&gt;👉&lt;a href="https://tryhackme.com/room/webhackingusingcurl-aoc2025-w8q1a4s7d0" rel="noopener noreferrer"&gt;Room Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fel0kkfo768iihtq7p83l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fel0kkfo768iihtq7p83l.png" alt="TryHackMe Advent of Cyber Roadmap" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A little bit of legendary history hurts nobody:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzxmk0otfkaryya4soa0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flzxmk0otfkaryya4soa0.png" alt="a screenshot of Curl wikipedia" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It gets cooler!&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4ig78qq35clvu4ltxnr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4ig78qq35clvu4ltxnr.png" alt="a screenshot of Daniel_Stenberg wikipedia" width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Curl is basically a command line tool to talk to other machines by sending http requests and &lt;a href="https://everything.curl.dev/protocols/curl.html" rel="noopener noreferrer"&gt;many more&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task 2 Questions:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make a POST request to the /post.php endpoint with the username admin and the password admin. What is the flag you receive?
=&amp;gt; You will not get through if you try to be smart and use a user-agent header, because the task wants you to use the terminal, without any user-agent header.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xd2doqldao9mj2vkqdb.png" alt="Curl Command in Terminal" width="800" height="99"&gt;
&lt;/li&gt;
&lt;li&gt;Make a request to the /cookie.php endpoint with the username admin and the password admin and save the cookie. Reuse that saved cookie at the same endpoint. What is the flag you received?
=&amp;gt; First Login: &lt;code&gt;curl -c cookie.txt -X POST -d "username=admin&amp;amp;password=admin" http://10.49.172.12/cookie.php&lt;/code&gt;
Then simply use the cookie and send an empty GET: &lt;code&gt;curl -b cookie.txt  http://10.49.172.12/cookie.php&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Just follow THM steps.&lt;/li&gt;
&lt;li&gt;Make a request to the /agent.php endpoint with the user-agent TBFC. What is the flag your receive?
=&amp;gt; &lt;code&gt;curl -A "TBFC" -s http://10.49.172.12/agent.php&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Bonus Question:&lt;/strong&gt;&lt;br&gt;
Need to "identify endpoints, authenticate and obtain the operator token, and call the close operation."&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz78quau5vksii3kfif1u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz78quau5vksii3kfif1u.png" alt="Bonus Mission THM Day 24" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -A "secretcomputer" http://10.49.172.12/terminal.php?action=panel&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8pay1jrxud6k6cr2ykb3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8pay1jrxud6k6cr2ykb3.png" alt="curl output " width="800" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that our final goal is the 'close the portal'&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4h9w7bzm8kchavgdx9n2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4h9w7bzm8kchavgdx9n2.png" alt="curl output 2" width="800" height="196"&gt;&lt;/a&gt;&lt;br&gt;
But we need 3 things: session, operator token and X-Force header&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Step 1: brute force the /login endpoint &lt;/u&gt;&lt;br&gt;
You can use the old script in the THM room. or even ask GPT to make you a &lt;a href="https://gist.github.com/rmpasswd/ade6b099f3a8de29d724637fa42bf6ae" rel="noopener noreferrer"&gt;script&lt;/a&gt; that will utilize all the cpu cores!&lt;/p&gt;

&lt;p&gt;Running the script with rockyou.txt&lt;br&gt;
If you are not in the attackbox, then download it &lt;a href="https://weakpass.com/wordlists/rockyou.txt" rel="noopener noreferrer"&gt;from here&lt;/a&gt; and extract the text file using &lt;code&gt;gunzip rockyou.txt.gz&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Go Outside and 𝔗𝔬𝔲𝔠𝔥 𝔤𝔯𝔞𝔰𝔰. 🌿🌱🍃  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwp0v1vx0nz1q9f156wvq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwp0v1vx0nz1q9f156wvq.png" alt="linux script output" width="486" height="773"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 2: Guess the PIN&lt;br&gt;
Notice the /pin endpoint that gives us a temporary &lt;u&gt;admin token&lt;/u&gt;. THM says the pin is between 4000 and 5000.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It's important to know that &lt;u&gt;exploring and tinkering&lt;/u&gt; are the number one steps to break into anything. Expecting that there is a linear, step-by-step approach is a mistake.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If we 'fool around' we get a suggestion on how to attempt a pin value, compared to the "username=admin&amp;amp;password=admin" approach&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ki5pklj6dzd84e5ofi6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ki5pklj6dzd84e5ofi6.png" alt="curl output 123" width="800" height="59"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;`bash&lt;/p&gt;

&lt;p&gt;for pass in $(seq 5000 -1 4000); do&lt;br&gt;
  # echo "Trying password: $pass"&lt;br&gt;
  resp=$(curl -sA "secretcomputer"  -X POST -d "pin=$pass" &lt;a href="http://10.48.172.152/terminal.php?action=pin" rel="noopener noreferrer"&gt;http://10.48.172.152/terminal.php?action=pin&lt;/a&gt;)&lt;br&gt;
  if ! grep -q "fail" &amp;lt;&amp;lt;&amp;lt; "$resp"; then echo "$pass is the pin"; echo $resp; break; fi&lt;br&gt;
  # echo $resp&lt;br&gt;
done&lt;br&gt;
`&lt;code&gt;&lt;/code&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12ro7gttrb53ynphtclh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F12ro7gttrb53ynphtclh.png" alt="curl output 2134" width="800" height="71"&gt;&lt;/a&gt;&lt;br&gt;
Note the type of user: &lt;u&gt;operator &lt;/u&gt;. Does this mean we should bruteforce the login endpoint with username=operator? I'm writing this early by the way, step 1 is taking too much time, there are 14,344,391 different passwords to try!&lt;/p&gt;

&lt;p&gt;Remember what happens when we try the /close endpoint? We require three things: &lt;u&gt;admin &lt;/u&gt;Session, &lt;u&gt;operator&lt;/u&gt; token, and X-Force header.&lt;/p&gt;

&lt;p&gt;The brute force is taking so much time that i have to look into a solution &lt;a href="https://youtu.be/2YT4ijL0fao?t=552" rel="noopener noreferrer"&gt;video&lt;/a&gt; 😑 Dude uses a tool called &lt;em&gt;ffuf&lt;/em&gt; on a partial rockyou.txt. After an hour the script is at 121,000th password. The correct password "stellaris61" is at line 3,537,735!&lt;/p&gt;

&lt;p&gt;We will save the session in our machine with -c flag.&lt;br&gt;
&lt;code&gt;curl -A "secretcomputer" http://10.48.172.152/terminal.php?action=login -X POST -d "username=admin&amp;amp;password=stellaris61" -c session.txt &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now we can hit the &lt;code&gt;/close&lt;/code&gt; endpoint with our 'admin session' and our 'opertor token'! Need to figure out the custom X-Force header, lets try 'true' value?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;curl -A "secretcomputer" http://10.48.172.152/terminal.php?action=close -X POST -d "username=admin&amp;amp;password=stellaris61&amp;amp;operator_token=7dce601fc5cf86aae78f1471e5af3220956de91cefd714e2ff399da426a79ced" -b session.txt -H "X-Force: true"&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
There is a mistake on how we used our operator_token. Following is the accurate way.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F59saxnvgvgki72as4u8e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F59saxnvgvgki72as4u8e.png" alt="Curl command output 1241" width="800" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The reason I use the &lt;em&gt;status&lt;/em&gt; endpoint is that the &lt;em&gt;close&lt;/em&gt; endpoint is not very friendly regarding which specific value is actually invalid.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzgmb7jgvyyszmof7drc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frzgmb7jgvyyszmof7drc.png" alt="Curl command output 11" width="625" height="522"&gt;&lt;/a&gt;&lt;br&gt;
X-Force value is not obvious at first, but tryhackme says mentions this, kuddos to that youtube channel.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkmrsgazdsha3r3vd06gy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkmrsgazdsha3r3vd06gy.png" alt="tryhackme day 24 bonus question" width="800" height="68"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And finally the reason of the meme:&lt;br&gt;
&lt;a href="https://help.tryhackme.com/en/articles/8537472-advent-of-cyber-2025-terms-and-condition#:~:text=Entries%20for%20the%20Giveaway%20can%20be%20submitted%20from%20December%201st%202025%20to%20December%2031st%202025%2C%20by%20completing%20rooms." rel="noopener noreferrer"&gt;Entries for the Giveaway can be submitted from December 1st 2025 to December 31st 2025, by completing rooms.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Onwards and upwords...&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p7203t8vdbf3cyqe3cy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p7203t8vdbf3cyqe3cy.png" alt="" width="630" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tryhackme</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Advent of Cyber 2025 Day 13-20 Writeup Sprint! | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Fri, 02 Jan 2026 11:29:53 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-13-20-writeup-sprint-tryhackme-379a</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-13-20-writeup-sprint-tryhackme-379a</guid>
      <description>&lt;h1&gt;
  
  
  Day 13: YARA!
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://virustotal.github.io/yara/" rel="noopener noreferrer"&gt;YARA&lt;/a&gt; is a tool to collect digital footprints, like in physical world where forensic people use tools to collect fingerprints.&lt;/p&gt;

&lt;p&gt;We define the &lt;u&gt;rules &lt;/u&gt;about what a malicious behavior should be.&lt;/p&gt;

&lt;p&gt;A rule file consists of several parts: meta, strings, condition. &lt;em&gt;meta&lt;/em&gt; is for the author, in case there are 100s of files to maintain. &lt;em&gt;strings&lt;/em&gt; are what yara will look for in the malware files; we can use regex here. condition is how yara should look for them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;rule TBFC_Simple_MZ_Detect&lt;/span&gt;
&lt;span class="pi"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;meta&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="nv"&gt;author = "TBFC SOC L2"&lt;/span&gt;
        &lt;span class="nv"&gt;description = "IcedID Rule"&lt;/span&gt;
        &lt;span class="nv"&gt;date = "2025-10-10"&lt;/span&gt;
        &lt;span class="nv"&gt;confidence = "low"&lt;/span&gt;

    &lt;span class="nv"&gt;strings&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="nv"&gt;$mz   =&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;4D 5A&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;                        &lt;span class="nv"&gt;// "MZ" header (PE file)&lt;/span&gt;
        &lt;span class="nv"&gt;$hex1 =&lt;/span&gt; &lt;span class="pi"&gt;{&lt;/span&gt; &lt;span class="nv"&gt;48 8B&lt;/span&gt; &lt;span class="pi"&gt;??&lt;/span&gt; &lt;span class="pi"&gt;??&lt;/span&gt; &lt;span class="nv"&gt;48 89&lt;/span&gt; &lt;span class="pi"&gt;}&lt;/span&gt;            &lt;span class="nv"&gt;// malicious binary fragment&lt;/span&gt;
        &lt;span class="nv"&gt;$s1   = "malhare" nocase                 // story / IOC string&lt;/span&gt;

    &lt;span class="nv"&gt;condition&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="nv"&gt;all of them and filesize &amp;lt; 10485760     // &amp;lt; 10MB size&lt;/span&gt;
&lt;span class="pi"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The task is this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It's time to complete the practical task! The blue team has to search for the keyword TBFC: followed by an ASCII alphanumeric keyword across the /home/ubuntu/Downloads/easter directory to extract the message sent by McSkidy. Can you help decode the message sent by McSkidy?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We have to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make a yara rule to search for the string &lt;em&gt;TBFC:&lt;/em&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rule search_for_TBFC
{
        meta:
                author = "mahin THM Day13"
        strings:
                $st = "TBFC:" ascii
        condition:
                $st
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My strings section is not correct, 'ascii' is redundent, but it does the job! the question required this: &lt;code&gt;$st = /TBFC:[A-Za-z0-9]+/&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Next step is to apply this yara rule: &lt;code&gt;yara -rs rule.yar ~/Downloads/easter/&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This screenshot has the answer to the last question "What is the message sent by McSkidy?"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwp3h03ai656mekb7pddh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwp3h03ai656mekb7pddh.png" alt="Find me in Hopsec Island" width="762" height="738"&gt;&lt;/a&gt;&lt;/p&gt;







&lt;h1&gt;
  
  
  Day 14 Containers
&lt;/h1&gt;

&lt;p&gt;Goal is the fix the defaced website of the fictional service named 'doordasher'. We have to explore the container layer of the infrastructure.&lt;br&gt;
&lt;code&gt;docker ps&lt;/code&gt; command shows the table with all the apps that are running. Notice the image column highlighted in yellow. There are three app containers that are running.&lt;/p&gt;

&lt;p&gt;5001 port hosts the doordash app. 5002 port hosts the news app &lt;em&gt;wareville-times&lt;/em&gt;, part of the bonus question.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu38bd74ybskb5su0vy9s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu38bd74ybskb5su0vy9s.png" alt="docker ps output" width="800" height="182"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bonus question: &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is a secret code contained &lt;strong&gt;within the news site&lt;/strong&gt; running on port 5002; this code also happens to be the password for the deployer user! They should definitely change their password. Can you find it?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The clue is in the question. Go to the website &lt;code&gt;http://10.48.153.34:5002/&lt;/code&gt; and look at the news page. Notice that some words are highlighted differently. 💤😴&lt;/p&gt;







&lt;h1&gt;
  
  
  Day 15 Web Attack Forensics in Splunk(again...)
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://tryhackme.com/room/webattackforensics-aoc2025-b4t7c1d5f8" rel="noopener noreferrer"&gt;Room Link&lt;/a&gt;&lt;br&gt;
Turn on the TargetBox and go to this address in you local laptop: &lt;code&gt;TargetMachineIpAddress:8000/en-US/app/search/search&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4h9od24q0jv7cz870jl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb4h9od24q0jv7cz870jl.png" alt="Splunk" width="800" height="308"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;index=windows_apache_access (cmd.exe OR powershell OR "powershell.exe" OR "Invoke-Expression") | table _time host clientip uri_path uri_query status&lt;/code&gt; searches the web access logs for any HTTP requests that include signs of command execution attempts, such as cmd.exe, PowerShell, or Invoke-Expression&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;index=windows_apache_error ("cmd.exe" OR "powershell" OR "Internal Server Error")&lt;/code&gt; checks for Apache error logs for signs of execution attempts or internal failures caused by malicious requests&lt;/li&gt;
&lt;li&gt;What if the attacker tried to create suspicious processes? &lt;code&gt;index=windows_sysmon ParentImage="*httpd.exe"&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpnw76326bbulhlks8f05.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpnw76326bbulhlks8f05.png" alt="THM Day 12" width="800" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdgqgud5gtnofpfiz9yle.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdgqgud5gtnofpfiz9yle.png" alt="THM Day 12 Answers" width="800" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The hints are in the THM walkthrouh really. &lt;br&gt;
"the encoded payload (such as the “Muahahaha” message) never ran."&lt;br&gt;
=&amp;gt; The base64 decoded string says: T�h�i�s� �i�s� �n�o�w� �M�i�n�e�!� �M�U�A�H�A�A�H�A�A� (aka This is now mine muhahauah) which attempted to run from &lt;strong&gt;powershell.exe&lt;/strong&gt;, seen from Splunk results.&lt;/p&gt;







&lt;h1&gt;
  
  
  Day 14
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://tryhackme.com/room/registry-forensics-aoc2025-h6k9j2l5p8" rel="noopener noreferrer"&gt;Room Link&lt;/a&gt;&lt;br&gt;
In this room we have to deep dive into 'registry explorer' tool.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\&lt;/code&gt;UserAssist`   : It stores information on recently accessed applications launched via the GUI.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\&lt;/code&gt;TypedPaths` : It stores all the paths and locations typed by the user inside the Explorer address bar.
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths    It stores the path of the applications.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\&lt;/code&gt;WordWheelQuery`   : It stores all the search terms typed by the user in the Explorer search bar.
HKLM\Software\Microsoft\Windows\CurrentVersion\Run  It stores information on the programs that are set to automatically start (startup programs) when the users logs in.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RecentDocs&lt;/code&gt; : It stores information on the files that the user has recently accessed.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HKLM\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName&lt;/code&gt;    : It stores the computer's name (hostname).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall&lt;/code&gt;
: It stores information on the installed programs.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;What application was installed on the dispatch-srv01 before the abnormal activity started? 
=&amp;gt; From the bullet points above we know we should look here: &lt;code&gt;HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall&lt;/code&gt; But first we have to import the relevant hive file: Ctrl+O and then select 'SOFTWARE'
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj1sjiij9s9wpmyje31au.png" alt="Registry Explorer" width="681" height="707"&gt;
Then go to Available Bookmarks tab and then browse for a 'CurrentVersion/Uninstall' folder because thats the end of the path we are looking for: 'DroneManager Updater' is the answer!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fidtm7jda04b0ezfdrjt1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fidtm7jda04b0ezfdrjt1.png" alt="Registry Explorer browsing " width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question 2:&lt;/strong&gt; Full path of the application that the &lt;strong&gt;user&lt;/strong&gt; has started from!&lt;br&gt;
=&amp;gt; We know that the installed path is not the only location of the executable. This registry key: &lt;code&gt;HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist&lt;/code&gt; is supposed to "store information on recently accessed applications launched via the GUI."&lt;br&gt;
But I could not find the &lt;em&gt;UserAssist&lt;/em&gt; folder from the 3rd party "Registry Explorer" tool that we've been using. But another registry path is this: &lt;br&gt;
&lt;code&gt;ROOT\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store&lt;/code&gt; according to the hint lightbulb! We also have to import this hive as well:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgir69cbzofwapsed8oqv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgir69cbzofwapsed8oqv.png" alt="Registry Explorer Import Hive" width="591" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we can search for the last 2 folder names 'Compatibility Assistant' or 'Store' right? wrong! If we search for 'Compatibility Assistant' we get this result but we cannot expand on them to see 'Store'. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1waywpgchjuyuiye9bb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1waywpgchjuyuiye9bb.png" alt="REgsitry Explorer" width="800" height="817"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we search 'Store' there are too many results. Best is to browse manually: &lt;code&gt;Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Store&lt;/code&gt;. Right click on 'Store' &amp;gt; Techinical Details&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xmbutjn91blwon9v5fl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xmbutjn91blwon9v5fl.png" alt="Inspect" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Best to type it in the THM answer box. &lt;/p&gt;

&lt;p&gt;Question 3: &lt;/p&gt;

&lt;p&gt;I cannot find the RUN entry for the DroneManager but found the msedge one:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjumoqltd5h5pg7m0w3yx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjumoqltd5h5pg7m0w3yx.png" alt="Registry Explorer 2" width="800" height="613"&gt;&lt;/a&gt;&lt;br&gt;
Which gives some insight on what the answer should be:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fey1s53d9fiv0i2o38zne.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fey1s53d9fiv0i2o38zne.png" alt="THM Day 16 Question 3" width="800" height="85"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;THM's hint lightbulb tells us to look in: &lt;code&gt;ROOT\Microsoft\Windows\CurrentVersion\Run&lt;/code&gt; But we are looking in &lt;code&gt;ROOT\Software\Microsoft....&lt;/code&gt;&lt;br&gt;
Among the 3 hives this one matches ROOT/Microsoft but do not have RUN key.&lt;/p&gt;

&lt;p&gt;Another way mentioned by a youtuber is this button.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Facawkznt653bnu2volxa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Facawkznt653bnu2volxa.png" alt="Registry Bookmarks" width="800" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on "RUN" and press F5 in keyboard. Go to "Full details as text" tab and scroll downnn... and voila 😖&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F40rj3ql9zlntcrclni9z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F40rj3ql9zlntcrclni9z.png" alt="RUN key" width="617" height="784"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fouoio8kxsbywjoxuh2io.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fouoio8kxsbywjoxuh2io.png" alt="What a drag meme" width="463" height="322"&gt;&lt;/a&gt;&lt;/p&gt;







&lt;h1&gt;
  
  
  Day 17: CyberChef Tool
&lt;/h1&gt;

&lt;p&gt;Goal is to learn about encoding and encryption through the popular tool &lt;a href="https://cyberchef.io/" rel="noopener noreferrer"&gt;CyberChef&lt;/a&gt; available online; no need to start the attackbox if you have openvpn on.&lt;/p&gt;

&lt;p&gt;Go to the target machine ip from a browser and click 'outer gate' icon.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F279437ozp19mhfpdx9oy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F279437ozp19mhfpdx9oy.png" alt="THM Day 17" width="800" height="639"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We find a base64 string &lt;code&gt;QWxsIGhhaWwgS2luZyBNYWxoYXJlIQ==&lt;/code&gt; we have to convert this &lt;strong&gt;from base64&lt;/strong&gt; to plaintext. Drag "from base64" in CyberChef, paste the encoded string in the Input field and see the plaintext output being produced(clicking bake! button is optional):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0d75qetxm5s2tsy0nsii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0d75qetxm5s2tsy0nsii.png" alt="From base64 to plaintext" width="800" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;THM says to go to the debugger tab, but in Edge browser I don't have a debugger tab; Going to &lt;em&gt;Sources&lt;/em&gt; tab and clicking on the yellow highlights from there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9w0lwrkifgvup0cqn5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9w0lwrkifgvup0cqn5g.png" alt="Dev Tools Sources tab versus tab" width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lets now find the username and password&lt;br&gt;
username hint is: &lt;code&gt;Username: This will decode to CottonTail.&lt;/code&gt; Meaning the encoded string of 'CottonTail'&lt;br&gt;
To find the password:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;we can literally ask the chatbox besides the login panel! Go to CyberChef and pick "to base64" for this and paste the question: &lt;code&gt;What is the password for this level?&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Insert the encoded question to the chatbox, you will get an encoded answer, this answer should be decoded from CyberChef again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefi5egugp0lj3u14eqct.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefi5egugp0lj3u14eqct.png" alt="CyberChef decode" width="433" height="293"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paste the encoded username and the **&lt;u&gt;plaintext&lt;/u&gt;&lt;/strong&gt; password to pass level 1!**.&lt;br&gt;
Press Enter or click on the "Bash" icon...&lt;/p&gt;

&lt;p&gt;&lt;u&gt;For level 2, same process,&lt;/u&gt;&lt;br&gt;
Find the guards name, encode it. This is the username&lt;br&gt;
For password: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;go to devtools &amp;gt; network. Then refresh the page. Then, from the left bar, click on "Llvel2". In the headers tab, look for the "X-Magic" header.&lt;/li&gt;
&lt;li&gt;Encode it from CyberChef("to base64"), ask the chat, decode the reply again and again, until you find the &lt;u&gt;plaintext&lt;/u&gt; password.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyzjxm58u2fsg9svrzjwi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyzjxm58u2fsg9svrzjwi.png" alt="Level 2 Outer Wall" width="800" height="511"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Level 3: Guard House&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;What operation do we need to do now? THM tells use to ask "password please". Do that and after a minute you will get a reply. decode this "from base64" twice and apply XOR with key "Cyberchef"!&lt;br&gt;
Use CyberChef all the way!&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81qlfaoadoil94unz4ss.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F81qlfaoadoil94unz4ss.png" alt="Level 3 Login" width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Level 4: &lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Ask for the password again to the chatbox. The reply decodes into an md5 hash, not base64. You will know it because it does not have a trailing equal character.&lt;/p&gt;

&lt;p&gt;THM suggests &lt;a href="https://www.google.com/search?q=crackstation&amp;amp;oq=crackstation&amp;amp;gs_lcrp=EgRlZGdlKgwIABBFGDkYxwMYgAQyDAgAEEUYORjHAxiABDIKCAEQABjHAxiABDIKCAIQABjHAxiABDIGCAMQRRg8MgYIBBBFGEHSAQgxNzA4ajBqNKgCALACAQ&amp;amp;sourceid=chrome&amp;amp;ie=UTF-8" rel="noopener noreferrer"&gt;CrackStation&lt;/a&gt; to see if this hash already been broken. &lt;code&gt;passw0rd1&lt;/code&gt; is the answer. Login successful!&lt;/p&gt;

&lt;p&gt;Only one level left!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuup0n1ti8m1ggabc3je.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuup0n1ti8m1ggabc3je.png" alt="THM Day 17" width="800" height="902"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After asking for the password like before. Decode twice in CyberChef(from base64):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen1fn62afl3lbi3gbvsa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fen1fn62afl3lbi3gbvsa.png" alt="Cyber Chef" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that, &lt;br&gt;
&lt;strong&gt;Level 5&lt;/strong&gt; has a new header Recipe-id:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ritxve4h39tdcczakie.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ritxve4h39tdcczakie.png" alt="Network Tab Devtools" width="767" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This &lt;code&gt;recipe id&lt;/code&gt; is different for different people. Mine is R1. TryHackMe has mentioned four approaches for four kinds of id. My approach is this:&lt;br&gt;
From Base64 ⇒ Reverse ⇒ ROT13&lt;br&gt;
There is a search bar in CyberChef. Just place all the recipes like a chef and you get the answer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flus9nrzx9bx3nay5jjrg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flus9nrzx9bx3nay5jjrg.png" alt="Cyberchef From Base64 ⇒ Reverse ⇒ ROT13" width="800" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That would be the password and the username is of course the base64 encoding of the guard's name 'Carl'&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3uz02e21q1q3fwhjafz1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3uz02e21q1q3fwhjafz1.png" alt="Login Successful, Prison Tower, TryHackMe Day 17" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Done! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhyde8518nikhqzjp21az.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhyde8518nikhqzjp21az.png" alt="King Malhare's Fortress" width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the extra question, there is a hint leading to Side Quest 3 access key:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Looking for the key to Side Quest 3? Hopper has left us this &lt;a href="https://gchq.github.io/CyberChef/#recipe=To_Base64('A-Za-z0-9%2B/%3D')Label('encoder1')ROT13(true,true,false,7)Split('H0','H0%5C%5Cn')Jump('encoder1',8)Fork('%5C%5Cn','%5C%5Cn',false)Zlib_Deflate('Dynamic%20Huffman%20Coding')XOR(%7B'option':'UTF8','string':'h0pp3r'%7D,'Standard',false)To_Base32('A-Z2-7%3D')Merge(true)Generate_Image('Greyscale',1,512)&amp;amp;input=SG9wcGVyIG1hbmFnZWQgdG8gdXNlIEN5YmVyQ2hlZiB0byBzY3JhbWJsZSB0aGUgZWFzdGVyIGVnZyBrZXkgaW1hZ2UuIEhlIHVzZWQgdGhpcyB2ZXJ5IHJlY2lwZSB0byBkbyBpdC4gVGhlIHNjcmFtYmxlZCB2ZXJzaW9uIG9mIHRoZSBlZ2cgY2FuIGJlIGRvd25sb2FkZWQgZnJvbTogCgpodHRwczovL3RyeWhhY2ttZS1pbWFnZXMuczMuYW1hem9uYXdzLmNvbS91c2VyLXVwbG9hZHMvNWVkNTk2MWM2Mjc2ZGY1Njg4OTFjM2VhL3Jvb20tY29udGVudC81ZWQ1OTYxYzYyNzZkZjU2ODg5MWMzZWEtMTc2NTk1NTA3NTkyMC5wbmcKClJldmVyc2UgdGhlIGFsZ29yaXRobSB0byBnZXQgaXQgYmFjayE" rel="noopener noreferrer"&gt;cyberchef link&lt;/a&gt; as a lead. See if you can recover the key and access the corresponding challenge in our Side Quest Hub!&lt;/p&gt;
&lt;/blockquote&gt;







&lt;h1&gt;
  
  
  Day 18 Obfuscation
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;Obfuscation is the practice of making data hard to read and analyze. Attackers use it to evade basic detection and delay investigations. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Its easy to debunk(de-obfuscate) obfuscated code once we know what algorithm has been used. If it's not obvious then CyberChef has a "Magic" button that tries to detect on its own:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuv47h41txxvba7afpz00.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuv47h41txxvba7afpz00.png" alt="CyberChef.io Magic Button" width="800" height="210"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go to the Target Machine GUI &amp;gt; click on windows search type 'code' to open 'visual studio code'.&lt;br&gt;
Open the SantaStealer.ps file and look at line 15 &amp;amp; 16. Fix line 16 from cyberchef above.&lt;br&gt;
open powershell in the same way. &lt;code&gt;cd Desktop&lt;/code&gt; and then ./S[TAB] to run the  script, get the flag!&lt;/p&gt;

&lt;p&gt;For 2nd flag, read from line 20.&lt;br&gt;
Go to cyberchef, use XOR and HEX recipe, notice the delimiter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86xxnxxzeclvsrx4jnxk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F86xxnxxzeclvsrx4jnxk.png" alt="CyberChef xor hex" width="800" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzgp1gudzwp7p1skfg2i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxzgp1gudzwp7p1skfg2i.png" alt="THM Day 18 powershell" width="800" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  And we are done!
&lt;/h2&gt;




&lt;h1&gt;
  
  
  Day 19: ICS/Modbus
&lt;/h1&gt;

&lt;p&gt;You may not know about ICS or Modbus or PLC jargons even if you are in the cybersecurity field. These are some protocols used in industrial operational technology (OT) systems rather than IT systems.&lt;/p&gt;

&lt;p&gt;This is called a 'walkthrough room'. There is nothing to solve except to follow the guidelines step by step. Run the python code to get the flag.&lt;/p&gt;

&lt;h2&gt;
  
  
  Note that start the machines only after you reach the actual task because the reading material will take proper time.
&lt;/h2&gt;




&lt;h1&gt;
  
  
  Day 20: Race Conditions(no, not an actual race!)
&lt;/h1&gt;

&lt;p&gt;👉 &lt;a href="https://tryhackme.com/room/race-conditions-aoc2025-d7f0g3h6j9" rel="noopener noreferrer"&gt;Room Link&lt;/a&gt;&lt;br&gt;
There are three types of race conditions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;u&gt;Time-of-Check to Time-of-Use&lt;/u&gt;: An ecommerce web server checks the database for an item, only 1 left, and shows it to a buyer. The buyer places it in the cart and proceeds to pay.  A second buyer also visits this item, adds it to the cart, and buys it earlier than the first buyer! The website should have placed a condition to lock the last item as soon as someone adds it to their cart temporarily.&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Shared resource:&lt;/u&gt; A bank account(say 100 bitcoins!) is affected by two transactions: one credit(+20) and another debit(-20). If the system is very primitive logic then the result depends on which one finishes last, creating confusion. The credit transaction will add 20 to 100 = 120. The debit transaction will subtract 20 from 100 = 80. Hence The result will be either 120 or 80; though it should be just 100!&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Atomicity Validation&lt;/u&gt;: When a sequence of operations is considered part of a single transaction, it is supposed to be &lt;strong&gt;atomic&lt;/strong&gt;.  Meaning either all of them should successfully run without error or neither of the operations should run at all. Suppose in a business transaction, there are three database operations to be performed. For example:&lt;/li&gt;
&lt;li&gt;Adding an amount to a bank account&lt;/li&gt;
&lt;li&gt;Subtracting from another person's account&lt;/li&gt;
&lt;li&gt;Sending confirmation
If someone presses cancel midway, say step2, then all steps &lt;strong&gt;should&lt;/strong&gt; revert back to step 0. This is called atomicity. If the entire process does not revert back to square one, then we say 'the system does not have &lt;u&gt;atomicity&lt;/u&gt;'.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Start the attack box. Alternatively, if you already have OpenVPN turned on and have the Burp Suite Community Edition, you don't need the attack box.&lt;br&gt;
Start the Burp Suite, turn of intercepting and &lt;strong&gt;from burp suite&lt;/strong&gt; open a browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9q0ykt9sqpemg9xrqs5k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9q0ykt9sqpemg9xrqs5k.png" alt="burp suite" width="752" height="882"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you get this dialog saying "Allow browser to run without sandbox". Do this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiufir9xirtc9ox42rssy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiufir9xirtc9ox42rssy.png" alt="Allow browser to run without sandbox" width="762" height="717"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A chromium browser will slowly pop up. THM tells us to open Firefox and go to machine.IP.address, but actually we have to this in this chromium browser we opened. Purchase one unit of 'sleightoy'. Then go to Proxy tab &amp;gt; 'http history' sub-tab in Burp Suite.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttxdm1y2zyg3tbn8qxfk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttxdm1y2zyg3tbn8qxfk.png" alt="burp suite http history" width="725" height="435"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Read from the "Exploiting the Race Condition" section in THM room.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fun67k666gekwm7tspvef.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fun67k666gekwm7tspvef.png" alt="Race Condition" width="692" height="848"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Second Question: Do the same for the item 'bunny plush'&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start the browser from Burp Suite(already open)&lt;/li&gt;
&lt;li&gt;Make an order of 'bunny plush'&lt;/li&gt;
&lt;li&gt;Go to Proxy tab &amp;gt; HTTP History Tab&lt;/li&gt;
&lt;li&gt;Select 'payment checkout' &amp;gt; Right click and 'send to Repeater'&lt;/li&gt;
&lt;li&gt;Make a group with the tab.&lt;/li&gt;
&lt;li&gt;Duplicate the tab 20 times.&lt;/li&gt;
&lt;li&gt;Press the &lt;u&gt;dropdown&lt;/u&gt; in orange 'Send button' &amp;gt; Click "Send group in parallel"&lt;/li&gt;
&lt;li&gt;Click again.&lt;/li&gt;
&lt;li&gt;Go to the browser again and see the flag.&lt;/li&gt;
&lt;/ol&gt;







</description>
      <category>tryhackme</category>
    </item>
    <item>
      <title>Advent of Cyber 2025 Day 12 Writeup: Phishing | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Wed, 31 Dec 2025 07:27:48 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-12-writeup-phishing-tryhackme-al3</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-12-writeup-phishing-tryhackme-al3</guid>
      <description>&lt;p&gt;👉 &lt;a href="https://tryhackme.com/room/spottingphishing-aoc2025-r2g4f6s8l0" rel="noopener noreferrer"&gt;Room Link&lt;/a&gt;&lt;br&gt;
Let's clarify Spamming vs Phishing:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Spam focuses on quantity over precision. Unlike phishing, which aims to deceive specific users, spam messages are sent in bulk to flood inboxes with unwanted marketing or irrelevant content. Their goal isn’t usually to steal data, but to push exposure or engagement, Promotions, clickbait or even data harvesting.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Other jargons include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;u&gt;Social Engineering&lt;/u&gt;: Rather than hacking technology, connecting with someone on a personal level to lure out important data. You can look for the following approaches to see if someone might be using social engineering: Impersonation, Sense of urgency, Side channel(telling that "hey, we moved our helpline to this new number"! etc.&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Typosquatting and Punycode&lt;/u&gt;: &lt;strong&gt;тrуhackme.com&lt;/strong&gt; written with Cyrillic т, Cyrillic г, Cyrillic у&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Spoofing&lt;/u&gt;: An email's "From" field can look legit. But actually its coming from a different server. Spoofing checks on the mail server should always be on. Inspecting 'header fields' such as &lt;em&gt;Authentication-Result&lt;/em&gt; and &lt;em&gt;Return-Path&lt;/em&gt;. &lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Malicious Attachments&lt;/u&gt;: And there's always the classic way to just attach the malware in the email because someone will always click on stuff no matter what&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Legitimate Application&lt;/u&gt;: Attackers can also hide behind trusted services, such as Dropbox or Google Drive, and share a PDF or document file containing fake content and malicious code.&lt;/li&gt;
&lt;li&gt;Fake login pages.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Task Questions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Classify the 1st email, what's the flag?&lt;/strong&gt;&lt;br&gt;
=&amp;gt; Go to the target machine IP and click on the first email. Scroll down...&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4brffdlw5udgxc4k2th.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu4brffdlw5udgxc4k2th.png" alt="Email inspection" width="753" height="439"&gt;&lt;/a&gt;&lt;br&gt;
Is it a spam or a phishing attempt? The email is asking to make a payment from paypal, definitely phishing; Submit and find out!&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ut822xo8vq9gk0k0uk8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ut822xo8vq9gk0k0uk8.png" alt="THM Day 12" width="800" height="480"&gt;&lt;/a&gt;&lt;br&gt;
From the header, we know that even though the email says paypal.com, it is actually not from paypal.com but from someone else. That is why we can tick mark &lt;em&gt;spoofing&lt;/em&gt; and &lt;em&gt;fake invoice&lt;/em&gt;. And also tick mark 'urgency' because 'santa sending invoice' is supposed to be urgent!&lt;br&gt;
And &lt;u&gt;finally submit&lt;/u&gt; to get the flag.&lt;/p&gt;

&lt;p&gt;Classify the second email. The email is a audio attachment, the from field says &lt;code&gt;&amp;lt;calls@tbfc.com&amp;gt;&lt;/code&gt; But in the 'inspect' section, the 'from header' is different: &lt;code&gt;gibberish.outlook.com&lt;/code&gt; &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbbh5r856v98c38oaq8vg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbbh5r856v98c38oaq8vg.png" alt="Email Inspector" width="800" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hence, Spoofing, Impersonation and malicious attachment are the correct answer.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F33cs2bsiglm2wnr5fotp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F33cs2bsiglm2wnr5fotp.png" alt="THM Day 12 Question 2" width="800" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The 3rd email  comes from a gmail address and says:&lt;/strong&gt;&lt;br&gt;
McSkidy here — I'm currently unreachable by phone. We have an ongoing incident and need the Blue Team to get remote access now to investigate. Please create a new VPN access for me immediately. Send the access to my personal email address.&lt;br&gt;
=&amp;gt; Impersonation, sense of urgency and social networking!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The 4th email says:&lt;/strong&gt;&lt;br&gt;
TBFC HR Department (&lt;a href="mailto:hr.tbfc@outlook.com"&gt;hr.tbfc@outlook.com&lt;/a&gt;) invited you to view the file "Annual Salary Raise Approval.pdf" on Dropbox.&lt;br&gt;
"Hi there, You have a pending document to be signed regarding you recent Salary Raise Approval. You can copy and paste the URL below if you do not have a DropBox account: &lt;a href="https://www.dropbox.com/scl/fi/xzruzfwqa4w77ozxvq00i/annual-salary-raise-approval.pdf" rel="noopener noreferrer"&gt;https://www.dropbox.com/scl/fi/xzruzfwqa4w77ozxvq00i/annual-salary-raise-approval.pdf&lt;/a&gt;?&lt;u&gt;blablablabla&lt;/u&gt; Thank you, TBFC HR Department"&lt;/p&gt;

&lt;p&gt;It comes from external domain(dropbox), social engineering and impersonation. Dont know why malicious attachment is not the other answer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The 5th email is a promotional campaign. Just mark it as spam.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The last email to classify&lt;/strong&gt; contains cursive letters, meaning it is not from our domain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fakch5jfuh5lrvngr2vwe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fakch5jfuh5lrvngr2vwe.png" alt="Typosquatting/Punycodes" width="800" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Typosquatting/Punycodes, Impersonation are correct. But Malicious Attachment is not correct answer, Social Engineering is.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fql838lqbzuvtcy1y8s96.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fql838lqbzuvtcy1y8s96.png" alt="Typosquatting/Punycodes, Impersonation, Social Engineering" width="800" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Onwards and upwords...&lt;/p&gt;

</description>
      <category>tryhackme</category>
      <category>phishing</category>
    </item>
    <item>
      <title>Advent of Cyber 2025 Day 11 Writeup: Cross-Site Scripting (XSS) | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Tue, 30 Dec 2025 13:10:02 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-10-writeup-cross-site-scripting-xss-tryhackme-30i6</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-10-writeup-cross-site-scripting-xss-tryhackme-30i6</guid>
      <description>&lt;p&gt;Usually, a website or web app displays information from the server. However, as users, we can also provide information to the website via an input field. If a web server does not have appropriate user input validation, then malicious users can inject malicious code rather than harmless text. this malicious code will then execute and steal credentials, deface pages, or alter user information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stored XSS&lt;/strong&gt; attack: Lets say upon user input, the malicious code is now saved in the server e.g. html or js file of this website: &lt;code&gt;domain.com/tonybennet&lt;/code&gt;. Then whoever later visits this page will become a victim of this attack. The code will run for anyone who visits that page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reflected XSS&lt;/strong&gt; is more direct. Someone hands you a valid link: &lt;code&gt;facebook.com/profile/search?term=&amp;lt;script&amp;gt;alert(1)&amp;lt;/script&amp;gt;&lt;/code&gt; You clicked on it because its from facebook.com! If facebook server is vulnerable to this type of reflected XSS then you will become victim of this attack. Your browser will run the javascript code &lt;code&gt;alert(1)&lt;/code&gt; or any other malicious code for that matter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Protecting against XSS&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;u&gt;Disable dangerous rendering paths&lt;/u&gt;: Instead of using the innerHTML property, which lets you inject any content directly into HTML, use the textContent property instead, it treats input as text and parses it for HTML.&lt;br&gt;
&lt;u&gt;Make cookies inaccessible to JS:&lt;/u&gt; Set session cookies with the HttpOnly, Secure, and SameSite attributes to reduce the impact of XSS attacks.&lt;br&gt;
&lt;u&gt;Sanitise input/output and encode:&lt;/u&gt; In some situations, applications may need to accept limited HTML input—for example, to allow users to include safe links or basic formatting. However, it's critical to sanitize and encode all user-supplied data to prevent security vulnerabilities. Sanitising and encoding removes or escapes any elements that could be interpreted as executable code, such as scripts, event handlers, or JavaScript URLs while preserving safe formatting. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;Start the &lt;u&gt;target machine&lt;/u&gt;. Type the ip address in your browser if you have OpenVPN enabled; if you dont, start the Attackbox  machine.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4audf2myhx26q4jz9sa1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4audf2myhx26q4jz9sa1.png" alt="THM  Day  11" width="800" height="715"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; Notice there are some input boxes. We can start there. This is what &lt;u&gt;reflected xss&lt;/u&gt; looks like when we put malicious code in the input box:&lt;code&gt;&amp;lt;script&amp;gt;alert('Reflected Meow Meow')&amp;lt;/script&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftd39if5vy5gx8rayvllh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftd39if5vy5gx8rayvllh.png" alt="reflected xss alertbox" width="660" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Usually we first check if an input box is susceptible to XSS or not. Today's room is very easy, there are two input boxes for two kinds of XSS. Copy and paste them to get your flags.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>tryhackme</category>
      <category>xss</category>
      <category>security</category>
    </item>
    <item>
      <title>Advent of Cyber 2025 Day 10 Writeup: SOC Alert Triaging | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Mon, 29 Dec 2025 13:00:45 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-10-writeup-soc-alert-triaging-tryhackme-215g</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-10-writeup-soc-alert-triaging-tryhackme-215g</guid>
      <description>&lt;p&gt;👉&lt;a href="https://tryhackme.com/room/azuresentinel-aoc2025-a7d3h9k0p2" rel="noopener noreferrer"&gt;Room Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today we have to login into Microsoft's cloud platform called Azure. There are multiple access pass available in case Azure blocks the accounts for suspicious activity!. &lt;code&gt;usr-aoc25-eu@tryhackme.onmicrosoft.com&lt;/code&gt; email worked for me.  &lt;/p&gt;

&lt;p&gt;Today's tasks focuses on Triaging in the face of a digital attack. From the SOC tool we can see all kinds of logs and infiltrations done by foreign actors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fast Response:&lt;/strong&gt;&lt;br&gt;
Analysts should priorities first. Filter by security level(How bad?), timestamp and frequency, attack stage(Where in the attack lifecycle), and affected assets(what or who is affected). &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deep Dive Steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Investigate the alert in detail&lt;/li&gt;
&lt;li&gt;Check the related logs&lt;/li&gt;
&lt;li&gt;Coordinate multiple alerts&lt;/li&gt;
&lt;li&gt;Build context and timeline&lt;/li&gt;
&lt;li&gt;Decide on the following action&lt;/li&gt;
&lt;li&gt;Document findings and lessons learned&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Example Scenario of Deep Dive Steps&lt;/u&gt;&lt;/strong&gt;: &lt;br&gt;
An SOC receives an alert: “Multiple failed login attempts followed by a successful login”.&lt;/p&gt;

&lt;p&gt;Step 1. Alert checking&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The analyst opens the alert and reviews the details.&lt;/li&gt;
&lt;li&gt;Entity: user j.doe, source IP 203.0.113.45&lt;/li&gt;
&lt;li&gt;Detection logic: 10 failed logins within 5 minutes, then 1 success&lt;/li&gt;
&lt;li&gt;Initial assessment: This could indicate a brute-force attempt. The analyst confirms the behavior is suspicious and not explained by a known system process.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 2. Log checking  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The analyst checks authentication logs from the identity provider and VPN.&lt;/li&gt;
&lt;li&gt;Finds repeated failed login events from the same IP, followed by a successful login at an unusual time.&lt;/li&gt;
&lt;li&gt;Notices the IP is from a country where the user normally does not log in.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;In the azure portal, once you have logged in search for Sentinel and click the workspace called 'law-aoc2025'  &lt;/p&gt;

&lt;p&gt;Click Logs and then you will see an introductory video; click on the cross icon, and then you will see a &lt;strong&gt;query editor&lt;/strong&gt; like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb19pdsxjwy83l4wpli7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdb19pdsxjwy83l4wpli7.png" alt=" azure sentinel logs editor?" width="800" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on this table icon and look for syslog-cl&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwbnlqwy1usj6ikqnwwh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwbnlqwy1usj6ikqnwwh.png" alt="azure sentinel Log table" width="466" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you click on the log table 'syslog_cl', you will see "no results". We need to increase the time range.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff96s6xx5vmq523qnanxq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff96s6xx5vmq523qnanxq.png" alt="Sentinel logs, custom time range" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how we can pull up the logs form our cloud SIEM tool that is  Microsoft Sentinel.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Microsoft Sentinel, a cloud-native SIEM and SOAR platform, collects data from various Azure services, applications, and connected sources to detect, investigate, and respond to threats in real time.&lt;br&gt;
Through Sentinel, McSkidy can view and manage alerts, analyse incidents, and correlate activities across multiple logs. It provides visibility into what's happening within the Azure tenant and efficiently allows analysts to pivot from one alert to another. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Next is to analyze the incidents. Below "Logs", click on Incidents. You may see that its empty; refresh the page and you will see a 'different incident page' (dont worry thats just how microsoft is 😑)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F62yyfhqgl2x44zo7jccs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F62yyfhqgl2x44zo7jccs.png" alt="Microsoft Sentinel Incidents page" width="800" height="563"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Choose 'last 30 days' to see some incidents...  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb8vx3868oxly0ar66idp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb8vx3868oxly0ar66idp.png" alt="Microsoft Sentinel Incident Page Custom Date Range" width="800" height="546"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The column Incident number and dates are a little different than TryHackMe's literature. It does not matter, click on the High severity alert and see the details in the right sidebar.&lt;/p&gt;

&lt;p&gt;We will focus on this question:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xmrvhemw1rg1efj1xst.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8xmrvhemw1rg1efj1xst.png" alt="THM Day 10" width="800" height="77"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that the alert's name is: "Linux PrivEsc - User Added to Sudo Group". Search for this in the searchbar:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2y9xk2d8rbk3j6lztwad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2y9xk2d8rbk3j6lztwad.png" alt="Microsoft Sentinel Incidents" width="800" height="476"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I could not find how many &lt;strong&gt;accounts&lt;/strong&gt; were added to the sudoer &lt;strong&gt;group&lt;/strong&gt;, searched for other people's blogs but they just listed the single digit answer, not &lt;u&gt;how&lt;/u&gt; they found it!&lt;/p&gt;

&lt;p&gt;You can click the blue 'view full details' button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0tm72c3otrbpsci6xkv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0tm72c3otrbpsci6xkv.png" alt="Microsoft Sentinel View full Details" width="800" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I even went to the investigation graph! But 3 is not the answer.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb0j1t8p71wywd60v57pt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb0j1t8p71wywd60v57pt.png" alt=" Sentinel Investigation Graph" width="675" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4 is the answer :)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrhdxt9j2t6bcnwmz6tk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhrhdxt9j2t6bcnwmz6tk.png" alt="Find in page feature Microsoft sentinel" width="800" height="673"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Task 5&lt;/u&gt;&lt;/strong&gt;:&lt;br&gt;
I could not follow this instruction, the event is not clickable:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If we go back to the alert's full details view, we can try clicking the Events from the Evidence section.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Skipping down, open the query editor in KQL mode:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk6zzyc85j9b17ezjdhqr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fk6zzyc85j9b17ezjdhqr.png" alt="Microsoft Sentinel KQL Mode logs" width="800" height="195"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy paste the KQL query from THM, But change two things. The time range(in red arrow) and the date(yellow)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2iqt85653d1g6q15ci5d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2iqt85653d1g6q15ci5d.png" alt="logs at a specific time using KQL" width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task 5 Questions&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;What is the name of the kernel module installed in websrv-01?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can search for 'kernel'
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5bepttnbnzwg12l161pi.png" alt="KQL Output Search bar" width="800" height="243"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;What is the unusual command executed within websrv-01 by the ops user?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Search for 'ops' but you will also have to edit the query. Replace 'app-02' with 'websrv-01'.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Same approach for other questions. Search for sudo, ssh etc and change the KQL accordingly.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This took longer time than I thought... onto the next one!  &lt;/p&gt;

</description>
      <category>tryhackme</category>
    </item>
    <item>
      <title>Advent of Cyber 2025: Day 8 &amp; 9 Writeup Prompt Injection | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Sun, 28 Dec 2025 07:00:14 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-8-writeup-prompt-injection-tryhackme-4db1</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-8-writeup-prompt-injection-tryhackme-4db1</guid>
      <description>&lt;p&gt;👉 &lt;a href="https://tryhackme.com/room/promptinjection-aoc2025-sxUMnCkvLO" rel="noopener noreferrer"&gt;Room Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LLM breakthrough have unlocked a new field of AI called Agentic AI! It can accomplish a goal with minimal supervision with a planned approach. Think of a travel &lt;strong&gt;agent&lt;/strong&gt;. You tell them you're going to spend five days in the Maldives and then they manage all the required steps: 1. Applying for a visa 2. Booking airplane tickets 3. Arranging accommodation&lt;/p&gt;

&lt;p&gt;Agentic AI is not a novel idea. Before LLM-based AI hype, there was/is a similar field called &lt;a href="https://www.uipath.com/rpa/robotic-process-automation" rel="noopener noreferrer"&gt;RPA ie. Robot Process Automation&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Read all the literature in the THM room; how LLM agent tries to accomplish a task with minimal hallucination with 'Reason and Act' (ReAct) approach. Also how these processes can be compromised by attackers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The use of AI in different fields has opened the door to new types of weaknesses. When an AI agent follows a process to complete its tasks, attackers can try to interfere with that process. If the agent is not designed with &lt;u&gt;strong validation or control measures&lt;/u&gt;, this can result in security issues or unintended actions.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Our &lt;em&gt;goal today&lt;/em&gt; is to chat with an LLM and make it give out information it was not supposed to reveal, much like that 'psycho friend' you have in your circle who &lt;u&gt;always&lt;/u&gt; asks leading questi🤬ns (sorrynotsorry)!&lt;/p&gt;

&lt;p&gt;Go to Target Machine IP from the browser(Either from the Attackbox or your local browser if you have openvpn on)&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70qsr2of2usp7clqtsx7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70qsr2of2usp7clqtsx7.png" alt="THM Day 8 Chatbot" width="800" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How the chatbot is processing our sentences and formulating a reply is called 'Chain of Thought'. Unlike chatgpt, we can click on 'thinking' button and see the CoT.   &lt;/p&gt;

&lt;p&gt;Follow the steps in THM room...&lt;/p&gt;

&lt;p&gt;If the calender is not updating from 'eastmas' to 'christmas' then try a few more times:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9t3j67h354xurbd1d36.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn9t3j67h354xurbd1d36.png" alt="THM Day 8" width="800" height="111"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will find the flag &lt;u&gt;in the calender&lt;/u&gt; on the 25th date.&lt;/p&gt;







&lt;h2&gt;
  
  
  Day 09 Writeup Passwords Cracking
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://tryhackme.com/jr/attacks-on-ecrypted-files-aoc2025-asdfghj123" rel="noopener noreferrer"&gt;Room Link&lt;/a&gt;&lt;br&gt;
Warning: This is educational purposes only, &lt;u&gt;not to be utilized for personal gains.&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Follow the THM room's instructions. Turn on the Target Machine and the Attackbox. We have to gracefully guess the password of two files: file.pdf and file.zip; using linux commands.&lt;/p&gt;

&lt;p&gt;Though there are mentions of gpu utilization and everything, today's tasks are fairly easy to follow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhjmsmtd8hhy3oxkg0nr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhjmsmtd8hhy3oxkg0nr.png" alt="THM Day 9" width="587" height="292"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can use mouse right click on zip file &amp;gt; extract now and paste the password from &lt;code&gt;john&lt;/code&gt; command output.&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedtj8kgfedoqkjvm7a9t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fedtj8kgfedoqkjvm7a9t.png" alt="THM Day 9 Target Machine's Desktop" width="683" height="993"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tryhackme</category>
      <category>promptengineering</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Advent of Cyber 2025: Day 7 Writeup Network Discovery - Scan-ta Clause | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Thu, 25 Dec 2025 04:51:15 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-7-writeup-network-discovery-scan-ta-clause-tryhackme-cf9</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-7-writeup-network-discovery-scan-ta-clause-tryhackme-cf9</guid>
      <description>&lt;p&gt;Hellow! Lets get to  it fast! &lt;a href="https://tryhackme.com/room/networkservices-aoc2025-jnsoqbxgky" rel="noopener noreferrer"&gt;👉 Room Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You have to start the target machine. And if you dont have the &lt;a href="https://tryhackme.com/room/openvpn" rel="noopener noreferrer"&gt;openvpn&lt;/a&gt; in your own machine, start the attackbox too.&lt;/p&gt;

&lt;p&gt;Today's learning objectives:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn the basics of network service &lt;strong&gt;discovery with Nmap&lt;/strong&gt; &lt;br&gt;
Learn core &lt;strong&gt;network protocols and concepts&lt;/strong&gt; along the way&lt;br&gt;
Apply your knowledge to find a way back into the server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The plot is that our server &lt;u&gt;access&lt;/u&gt; has been compromised and we now have to perform counter-attacks! We know the ip address, let's start scanning first.&lt;/p&gt;

&lt;p&gt;In order to get into a house, we need to know where the door(or window) is. *&lt;em&gt;Nmap lets us discover which ports(windows) are open and closed.&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you dont have nmap in your own (debian-based?) machine then &lt;code&gt;sudo apt install nmap&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;nmap 10.48.157.85&lt;/code&gt; searches most 1000 'popular' ports.&lt;br&gt;&lt;br&gt;
&lt;code&gt;nmap -p- --script=banner 10.49.191.120&lt;/code&gt; scans all 65535 ports possible!&lt;br&gt;
 Whats 'banner' here? Its a name of a script (usually Lua langauge). We can 'script scan' the network. Nmap already comes with some scripts such as 'banner' here. You can see the banner script outputs after every open port found:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn1ghbww1dyv46ambdum7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn1ghbww1dyv46ambdum7.png" alt="Nmap script args output" width="800" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we know that ftp is running in a 'non default' port of 21212&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ftp ipadress 21212&lt;/code&gt; then type login username 'anonymous'. This brings us into that machine and a shell. explore the file that contains a tryhackme flag.&lt;/p&gt;

&lt;p&gt;Unlike the THM instructions, &lt;code&gt;ls&lt;/code&gt; in my case is not running. But it works in THM Attackbox :/&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fufm4z2ncuum16yhmgyt8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fufm4z2ncuum16yhmgyt8.png" alt="THM Attackbox" width="800" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;get tbfc_qa_key1 -&lt;/code&gt; 'downloads' the file and forwards it to &lt;em&gt;standard output&lt;/em&gt; so that we can see the contents in in the terminal.&lt;/p&gt;

&lt;p&gt;Copy the key1 fragment, go to browser and type the target machine ip &amp;gt; Click unlock &amp;gt;  paste the key1&lt;/p&gt;

&lt;p&gt;Get the 2nd key from netcat(&lt;code&gt;nc&lt;/code&gt;) command: &lt;code&gt;nc -v ipaddress 25251&lt;/code&gt; &lt;br&gt;
The 3rd key requires nmap scanning on the &lt;u&gt;UDP&lt;/u&gt; ports, not the default TCP we scanned so far: &lt;code&gt;nmap -sU  ipaddress&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fojwq7bzg9lfdnlzzikwb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fojwq7bzg9lfdnlzzikwb.png" alt="nmap UDP scanning" width="800" height="234"&gt;&lt;/a&gt;&lt;br&gt;
UDP 53 port, which is a DNS port, is open. Use &lt;a href="https://tldr.inbrowser.app/pages/common/dig" rel="noopener noreferrer"&gt;dig&lt;/a&gt; command to perform DNS queries: &lt;code&gt;dig @ipaddress TXT key3.tbfc.local +short&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After getting all 3 key fragments(easter_isthe_newxmas), we obtain access to the admin console. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff7rucg9a4aunlkmjp5qi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff7rucg9a4aunlkmjp5qi.png" alt="admin console" width="654" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Previously, we scanned for open ports with &lt;code&gt;nmap&lt;/code&gt;, now we can just 'ask the os' to list open ports with &lt;code&gt;ss&lt;/code&gt; command(socket statistics): &lt;code&gt;ss -tulnp&lt;/code&gt;&lt;br&gt;
mysql 3306 port is open. By default localhost access  do not require authorization. THM page tells use which database to look for: &lt;code&gt;mysql -D tbfcqa01 -e "select * from flags;"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To answer this question, "What evil message do you see on top of the website?", look at the top of the Target Machine webpage....&lt;/p&gt;

</description>
      <category>tryhackme</category>
      <category>networking</category>
    </item>
    <item>
      <title>Advent of Cyber 2025: Day 6 Writeup - War with Malware | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Tue, 16 Dec 2025 13:22:29 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-6-writeup-war-with-malware-tryhackme-30h8</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-6-writeup-war-with-malware-tryhackme-30h8</guid>
      <description>&lt;p&gt;&lt;a href="https://tryhackme.com/room/malware-sandbox-aoc2025-SD1zn4fZQt" rel="noopener noreferrer"&gt;Room Link &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The room expects us to learn these topics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The principles of malware analysis&lt;/li&gt;
&lt;li&gt;An introduction to sandboxes&lt;/li&gt;
&lt;li&gt;Static vs. dynamic analysis&lt;/li&gt;
&lt;li&gt;Tools of the trade: PeStudio, ProcMon, Regshot&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today's Target Machine itself is a full VM with GUI. We dont need an Attackbox today.&lt;/p&gt;

&lt;p&gt;Dont go around clicking random stuff in the VIM, the first task comes with a warning: "Please note, it is imperative that you do not execute the HopHelper.exe executable yet. The room will instruct you when to do so."&lt;/p&gt;

&lt;p&gt;First things first, some jargons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There are two main branches of malware analysis: &lt;u&gt;static and dynamic&lt;/u&gt;. Static analysis focuses on inspecting a file without executing it, whereas dynamic analysis involves execution. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandboxes&lt;/strong&gt; are safe, disposable, isolated environments. For example: each tab in our browsers is (supposed to be) sandboxed! My facebook tab should not be able to access anything in my dev.to tab. Cybersecurity professionals use sandboxes(usually &lt;a href="https://www.virtualbox.org/" rel="noopener noreferrer"&gt;VM&lt;/a&gt;s) to run potentially dangerous code. Another real life example would be: If you are a highly targeted or important individual working in a sensitive area, and you get spam emails from attackers a lot, it's a good idea to use your email client in a sandboxed environment! just saying 👀&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Information gathered from static analysis
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Checksum: A hash (e.g. a93f7e8c4d21b19f2e12f09a5c33e48a) of a file, corresponds exclusively to that file. Suppose someone gives you a file using a third-party medium(a pendrive that changes hands or via a network that is not monitored by bad people!) and texts you in a secure way( or just displays it in his website) the checksum of that un-altered file. You, upon receiving the file, will calculate the checksum and cross-match. Where does checksum fit in our static analysis? You can calculate the checksum and then search for it in a public repository whether our malware/file is already listed as malware by other security researchers.&lt;/li&gt;
&lt;li&gt;strings: Could be the linux 'strings' command or any other tool to check for readable text in the file.&lt;/li&gt;
&lt;li&gt;imports: What packages does the source code use? IO packages, network modules to connect to its attacker's own server address?&lt;/li&gt;
&lt;li&gt;resources: File Icons etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In THM Target box VM, start &lt;em&gt;pestudio&lt;/em&gt;, open our malware .exe file located in folder: ...Desktop\HopHelper&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F09s7z1jjm91btsw1scbv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F09s7z1jjm91btsw1scbv.png" alt="pestudio static analysis" width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Question 1, 2: copy the sha256 string visible in &lt;em&gt;pestudio&lt;/em&gt;, before you paste it in THM answerbox paste elsewhere to separate properly..&lt;/p&gt;

&lt;p&gt;Next tool to know about is &lt;em&gt;regshot&lt;/em&gt;, we take a snapshot of the registry, run our malware,  take a 2nd snapshot and compare.&lt;/p&gt;

&lt;p&gt;THM Question: What registry value has the HopHelper.exe modified for persistence?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3md6k0qmyttm6cg4i0d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi3md6k0qmyttm6cg4i0d.png" alt="THM Answer Field" width="800" height="95"&gt;&lt;/a&gt;&lt;br&gt;
Notice there are many results for 'HopHelper'. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frejn2nhzgmooq96m05ut.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frejn2nhzgmooq96m05ut.png" alt="regshot compare" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also notice the answer field start with 3 character and a slash. There's your answer 😐. If you are having issues with slash separator like me here, try pasting section by section...&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3xdh1fpifvvhe29rldoo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3xdh1fpifvvhe29rldoo.png" alt="THM Answer Field Slash issues" width="800" height="65"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And finally, filtering through processes with Process Monitor which "captures events of various processes on the system". Click the icon named &lt;em&gt;Procmon64 - Shortcut&lt;/em&gt;, run the malicious HopHelper.exe under Desktop\HopHelper, wait a minute and then pause capturing in ProcMon.&lt;/p&gt;

&lt;p&gt;After applying two filters in ProcMon, if you dont see anything like me then re-read THM instructions. The two fiters are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Process Name **is **HopHelper.exe&lt;/li&gt;
&lt;li&gt;Operation *&lt;em&gt;contains *&lt;/em&gt;'TCP'&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxd7kciswhj4a80s14yy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdxd7kciswhj4a80s14yy.png" alt="ProcMon64 Filter feature" width="800" height="644"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Question: THM wants know what 'network protocol' is in use. http is the obvious answer...&lt;/p&gt;

&lt;p&gt;Bonus question: Can you find the web panel that HopHelper.exe is communicating with?&lt;br&gt;
In above picture we can see connection to a machine named 'breachblocker-sandbox'(aka localhost!)  has been established by HopHelper, in port 49982 and 50055. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1ds3bnn4c6xij54yufl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa1ds3bnn4c6xij54yufl.png" alt="Ping command" width="800" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Does this mean the web panel is breachblocker-sandbox:50055/ or &lt;a href="http://breachblocker-sandbox:49882" rel="noopener noreferrer"&gt;http://breachblocker-sandbox:49882&lt;/a&gt; ? Nope. its at port 80. Open up chrome browser to go to the web panel:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwgzdau1r262ptojzdfgk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwgzdau1r262ptojzdfgk.png" alt="breachblocker-sandbox web panel" width="800" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tryhackme</category>
    </item>
    <item>
      <title>Advent of Cyber 2025: Day 5 IDOR this IDOR that| TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Sat, 13 Dec 2025 18:47:49 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-5-idor-this-idor-that-tryhackme-1lf</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-5-idor-this-idor-that-tryhackme-1lf</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;a href="https://tryhackme.com/room/idor-aoc2025-zl6MywQid9" rel="noopener noreferrer"&gt;Room Link: THM AoC Day 5&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Start both boxes; Or if you have the OpenVPN Connect &lt;a href="https://tryhackme.com/room/openvpn" rel="noopener noreferrer"&gt;connected&lt;/a&gt; in your machine then start the Target box only and then, in your machine, go to the challenge URL and login info mentioned in Task 2.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqh44m8ijl04ga5579bys.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqh44m8ijl04ga5579bys.png" alt="Target box and OpenVPN" width="787" height="592"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;IDOR, Insecure Direct Object Reference, is an authorization issue. A system with IDOR vulnerability will give me resources that I'm not supposed to have access to. All I have to do is change the http request parameters. Being able to access other peoples' accounts is called &lt;em&gt;Horizontal privilege escalation&lt;/em&gt; and being able to execute operations I am not supposed to, such as running an admin privileged program, is called &lt;em&gt;Vertical privilege escalation&lt;/em&gt;; IDOR is a form of horizontal privilege escalation.&lt;/p&gt;

&lt;p&gt;Follow all the THM literature to learn about IDOR. Note that at one point, they tell us to "navigate to the Storage tab and expand the Local Storage dropdown". But it's actually here:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F77p890oferwzwwknbgh8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F77p890oferwzwwknbgh8.png" alt="Storage Tab is now inside Application tab" width="800" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Relevant questions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Exploiting the IDOR found in the view_accounts parameter, what is the user_id of the parent that has 10 children?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;=&amp;gt;&lt;br&gt;
Logging in with the default user, we see 5 childs...&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64y20r1y4z547jc1p9t3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F64y20r1y4z547jc1p9t3.png" alt="AoC TryHackMe Day 5" width="800" height="396"&gt;&lt;/a&gt;&lt;br&gt;
We can change user_id parameter, to change into a different user (highlighted yellow above)&lt;/p&gt;

&lt;p&gt;Go to Inspect &amp;gt; Storage &amp;gt; Local storage &amp;gt; Expand Dropdown &amp;gt;  Click on the address http:/10.48...&lt;br&gt;
The &lt;em&gt;auth_user&lt;/em&gt; parameter has a &lt;em&gt;user_id&lt;/em&gt; attribute, change its values and test with 11 12 13 14 15 16 🥱 I am not telling you which one it is! Upon changing, hit refresh in the webpage, Notice that a new user profile loads every time with different number of childs...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrxg55bev43v1sny3e71.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrxg55bev43v1sny3e71.png" alt="AoC TryHackMe Day 5" width="800" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remaining two &lt;strong&gt;bonus questions&lt;/strong&gt;, requiring &lt;em&gt;Burp Intruder&lt;/em&gt; tool for automation, can be solved with the Attackbox, start that now... (If you dont have any remaining time left, you can still do it in your own machine with mouse-clicks aka &lt;a href="https://portswigger.net/burp/releases/professional-community-2025-11-4" rel="noopener noreferrer"&gt;ClickOps&lt;/a&gt;)&lt;br&gt;
Move the Attackbox to another tab with expand icon(below), Go to &lt;strong&gt;Burp Suite&lt;/strong&gt; and start a new project with the defaults.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo9uz1qfqg9amuidxvbrb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo9uz1qfqg9amuidxvbrb.png" alt="THM Attackbox Go to Burp Suite" width="800" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From &lt;em&gt;Target&lt;/em&gt; tab, click open browser. You may see this error. Settings icon is at top-right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Finidoa0gcapq2cu79pfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Finidoa0gcapq2cu79pfc.png" alt="Burp Suite Sandbox Allowed Browser Not Supported" width="510" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking 'open browser' again, wait a few seconds to see a Firefox tab. paste the Targetbox &lt;em&gt;URL&lt;/em&gt; and Login as usual. You will see that the website keeps 'loading'. Thats because the intercept is on. &lt;u&gt;Go to Proxy tab&lt;/u&gt; of Burp Suite and click the colorful "Intercept on". We will turn this on again when we have to modify our request.&lt;br&gt;
Lets catch our breath. This is what it looks like now:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsutfzgqcclyq7supy1b6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsutfzgqcclyq7supy1b6.png" alt="Burp Suite Browser" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On each interaction, the browser communicates with server using HTTP requests and response, we are going to modify that HTTP request using Burp. First we need to find which request is responsible for what.&lt;br&gt;&lt;br&gt;
After opening Inspect tool in the browser, refresh the webpage.   &lt;/p&gt;

&lt;p&gt;Revisiting the question: &lt;u&gt;Use either the base64 or md5 child endpoint and try to find the id_number of the child born on 2019-04-17?&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;In the webpage, click the &lt;u&gt;eye&lt;/u&gt; icon on a child card to see the 'ID Number'. But the birth date is not visible. Try the edit icon too.&lt;br&gt;
The plan is to send a formatted request via Burp, change its id hash values and then in the responses find our desired information ie. the birth date.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvdce5wjdez37y02zsqm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzvdce5wjdez37y02zsqm.png" alt="Browser Dev Tool" width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lets do it with Burp Suite.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Start from the dashboard webpage.&lt;/li&gt;
&lt;li&gt;Go to Burp &amp;gt; Proxy tab &amp;gt; turn on intercept&lt;/li&gt;
&lt;li&gt;In the webpage, click on the child edit icon.&lt;/li&gt;
&lt;li&gt;You will see that it is not showing. Burp has paused the request response cycle and its waiting for you to manually forward that request.&lt;/li&gt;
&lt;li&gt;Using Burp, we can send a formatted request with a different user ID or any other value we want. We can then receive responses for every child and find the birth date part that the question is looking for.
My Attackbox just expired, because I took a break :) Now using Burp &lt;a href="https://portswigger.net/burp/communitydownload" rel="noopener noreferrer"&gt;Community edition&lt;/a&gt; in my laptop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7q1cuxugtea216o6pxki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7q1cuxugtea216o6pxki.png" alt="Burp Suite Intercept" width="800" height="411"&gt;&lt;/a&gt;&lt;br&gt;
Here &lt;u&gt;I took a detour&lt;/u&gt;. the yellow highlighted string is an md5 hash, but of what? You cannot decode a hash, you can encode(hashify) some known string such as child name, child id, birth date etc to check if its a match.&lt;br&gt;
Though we cannot see the birth date &lt;u&gt;in the browser&lt;/u&gt; but in the THM task literature, clicking the 'view' button on a child returns the birthdate too. It is found in the response body in browser Inspect tool, not in the webpage. So lesson learned here, our investigation should be focused more on the request response cycle. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fda99v7s54wwq6mzqh3oe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fda99v7s54wwq6mzqh3oe.png" alt="Browser Inspect Tool Response Body" width="800" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lets follow the Burp Suite Steps again:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start from the dashboard webpage.&lt;/li&gt;
&lt;li&gt;Go to Burp &amp;gt; Proxy tab &amp;gt; turn on intercept&lt;/li&gt;
&lt;li&gt;In the webpage, click on the child &lt;strong&gt;view&lt;/strong&gt; icon.&lt;/li&gt;
&lt;li&gt;You will see that child item details is not showing. Burp has paused the request.&lt;/li&gt;
&lt;li&gt;Highlight just this part, and right click &amp;gt; send to intruder.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzb1c25bru6glx86wm7yo.png" alt=" send to intruder." width="539" height="203"&gt;
&lt;/li&gt;
&lt;li&gt;Go to 'intruder' tab. First make a list in the notepad and then paste the numbers here from 1 to 20. 
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F41zyc177oij7olger61h.png" alt="Burp Intruder Tab Payload configuration" width="800" height="326"&gt;
&lt;/li&gt;
&lt;li&gt;  In the Payload Processing section, Add a task, select Base64 encoding.&lt;/li&gt;
&lt;li&gt;Start attack button, graciously!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I can now use keyboard arrow key to just browse all the result to look for &lt;code&gt;2019-04-17&lt;/code&gt;. Looks like child_id:1x has this birth date :)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bonus Question 2&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"Using the /parents/vouchers/claim endpoint, find the voucher that is valid on 20 November 2025". None of the vouchers had November date. Frankly I had to look another blog for a hint. Lesson learned is look at the Literature again, which topic is not used so far? UUID!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;While this look completely random, we can see that the UUID version 1 was used. The issue with UUID 1 is that if we know the exact date when the code was generated, we can recover the UUID. For example, suppose we knew the elves always generated vouchers between 20:00 - 21:00. In that case, we can create UUIDs for that entire time period (3600 UUIDs since we have 60 minutes, and 60 seconds in a minute), which we could use in a brute force attack to aim to recover a valid voucher and get more gifts.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Go to this &lt;a href="https://www.lambdatest.com/free-online-tools/uuid-decoder" rel="noopener noreferrer"&gt;decoder&lt;/a&gt; and paste any of the vouchers you see from the webpage... But we have to &lt;u&gt;generate the UUID with our desired date value&lt;/u&gt;. I cannot find an online tool except chatgpt...&lt;br&gt;
So in &lt;a href="https://claude.ai/chat" rel="noopener noreferrer"&gt;https://claude.ai/chat&lt;/a&gt;, tell it to generate js code to build UUID v1 codes from &lt;a href="https://www.npmjs.com/package/uuid" rel="noopener noreferrer"&gt;uuid&lt;/a&gt; npm package, for every minute between 20:00 - 24:00 UTC on Nov 20 2025&lt;br&gt;
We will paste all the uuid into Burp a bit later!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8ltl1syr3kxwfw6zb21.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8ltl1syr3kxwfw6zb21.png" alt="Node.js code to generate UUID" width="800" height="624"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the webpage, when we use the "claim voucher" feature we will see the '/parent/vouchers/claim' endpoint that they are talking about&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxw3wsdoyteszn5wbdv1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxw3wsdoyteszn5wbdv1l.png" alt="Inspect Devtool" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Turn on Intercept right before clicking the green 'claim voucher'. Type something 'asdf' and enter.&lt;br&gt;
Go to Burp, highlight that 'asdf', right click and send to Intruder tab&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faw981dm9fwfhdfb0rtdx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faw981dm9fwfhdfb0rtdx.png" alt="Burp Request" width="800" height="314"&gt;&lt;/a&gt;&lt;br&gt;
Paste all those UUIDs and Start attack...&lt;/p&gt;

&lt;p&gt;Watch the magic and filter by 200 status code&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8hpqukmdq5hrp29pufd7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8hpqukmdq5hrp29pufd7.png" alt="Burp Suite Intruder use" width="800" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Go Touch Grass™® and come back a minute later. You are supposed to find a 200 request that returns a positive response, as opposed to "Voucher not found".&lt;/p&gt;

&lt;p&gt;Click the lightbulb icon to get the answer for this special task. If you dont get it right, work backwards. copy the answer and paste into UUID Decoder and see why your list of UUIDs did not work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3kbz3j4ytag48ire4mjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3kbz3j4ytag48ire4mjg.png" alt="THM Check Answer and Hint" width="800" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Did I get it correct? nope. Both the THM answer (&lt;code&gt;22643e00-c655-11f0-ac99-026ccdf7d769&lt;/code&gt;) and my gippity code generated (&lt;code&gt;22643e00-c655-11f0-9acd-a6c6a92e79aa&lt;/code&gt;) had the same timestamp in UUID Decoder.&lt;br&gt;
Both start with the same prefixes and give the same time in UUID Decoder. My guess is if we can re-generate the same UUID with the right timestamp, then it's not actually a robust UUID, is it? It definitely depends on &lt;a href="https://www.sohamkamani.com/uuid-versions-explained/" rel="noopener noreferrer"&gt;other factors&lt;/a&gt;, such as MAC address etc. So it has to be from the same computer(the Attackbox?) as well. Feel free to comment and add your observations.&lt;/p&gt;

</description>
      <category>tryhackme</category>
      <category>owasp</category>
    </item>
    <item>
      <title>Advent of Cyber 2025: Day 4 Writeup AI-AI-AI | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Mon, 08 Dec 2025 11:00:03 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-4-writeup-ai-ai-ai-tryhackme-10dd</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-4-writeup-ai-ai-ai-tryhackme-10dd</guid>
      <description>&lt;p&gt;&lt;a href="https://tryhackme.com/room/AIforcyber-aoc2025-y9wWQ1zRgB" rel="noopener noreferrer"&gt;Day 4 Challenge Room Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5gzjxbvqzd312pb9j2u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw5gzjxbvqzd312pb9j2u.png" alt="tryhackme Connection summary" width="800" height="561"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Look for this summary-picture what to start everyday. You dont need any special tools today, except for &lt;a href="https://wiki.python.org/moin/BeginnersGuide/Download" rel="noopener noreferrer"&gt;python&lt;/a&gt;. So if you have OpenVPN setup already then &lt;u&gt;you don't need to start the Attackbox&lt;/u&gt; which has a 1 hour limit each day. &lt;u&gt;Just start the Target Machine &lt;/u&gt;. &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqz266ff050tyou7t0pgw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqz266ff050tyou7t0pgw.png" alt="Attack box and Target Box" width="800" height="422"&gt;&lt;/a&gt;&lt;br&gt;
For the next step, open Firefox and follow this quote from the second task:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When you're ready, you can access Van SolveIT at &lt;a href="http://10.49.141.x4x" rel="noopener noreferrer"&gt;http://10.49.141.x4x&lt;/a&gt;. Remember, you will need to do so either from the AttackBox or your own device connected to the VPN.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You have to chat with the AI and finish the stages, to get the first flag. For the first stage, just click "Complete Stage to Continue"&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvbup5a6orqfksipncvu3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvbup5a6orqfksipncvu3.png" alt="AoC Day 4 Van SolveIT Stages" width="360" height="817"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stage 2: Act as an Attacker i.e. Red Team&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;From TryHackMe room, copy the Target Machine IP into the code highlighted as MACHINE_IP&lt;/li&gt;
&lt;li&gt;Save the file&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqociskpa6ysod1eq42ix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqociskpa6ysod1eq42ix.png" alt="Python code to sqli" width="761" height="647"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;run it &lt;code&gt;python3 file.py&lt;/code&gt; -_-. You will get a response, and flag, put that in TryHackme's &lt;u&gt;second&lt;/u&gt; flag's field.
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0vwatuksdh4avmqy6eis.png" alt="Python code to sqli" width="800" height="436"&gt;
&lt;/li&gt;
&lt;li&gt;click Complete&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stage 3: Act as defender i.e. Blue Team&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The chatbot tells us what to ask:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Let's solve this stage together. You can &lt;u&gt;ask me to analyse an example set of logs for the attack that we just performed!&lt;/u&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;So ask away, and wait a minute to load&lt;/li&gt;
&lt;li&gt;Read the reply, notice that the vulnerable file is called login.php&lt;/li&gt;
&lt;li&gt;Click Complete&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stage 4:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type 'yes' and wait for the reply 🥱&lt;/li&gt;
&lt;li&gt;Read and Learn about how to make login.php safe.&lt;/li&gt;
&lt;li&gt;Click to Complete Showcase to finish this last stage and get the flag!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The End... In a way, easy rooms are more stressful than harder ones...&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>python</category>
      <category>ai</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Advent of Cyber 2025: Day 3 Writeup Splunk | TryHackMe</title>
      <dc:creator>Mahin Ahmad</dc:creator>
      <pubDate>Mon, 08 Dec 2025 10:42:58 +0000</pubDate>
      <link>https://dev.to/mahin101/advent-of-cyber-2025-day-3-writeup-splunk-tryhackme-2gn</link>
      <guid>https://dev.to/mahin101/advent-of-cyber-2025-day-3-writeup-splunk-tryhackme-2gn</guid>
      <description>&lt;p&gt;&lt;a href="https://tryhackme.com/room/splunkforloganalysis-aoc2025-x8fj2k4rqp" rel="noopener noreferrer"&gt;Day 3 Challenge: &lt;em&gt;Splunk Basics - Did you SIEM?&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prelude:&lt;/strong&gt; &lt;br&gt;
Day 3 starts with an alarm in the SOC dashboard. What is SOC? Think of it as your country's Border Guards! Security Operations Center is a basically a team of cyber security experts who prevent all incoming attacks through monitoring, detection and coordinating responses to attacks. (&lt;a href="https://deepstrike.io/blog/red-team-vs-blue-team-cybersecurity#:~:text=Is%20a%20SOC%20part%20of%20the%20Red%20Team%20or%20Blue%20Team%3F" rel="noopener noreferrer"&gt;read more&lt;/a&gt;). A sophisticated dashboard and analysis tools(e.g. Splunk here) are the minimum set of tools SOC teams utilize everyday.&lt;/p&gt;

&lt;p&gt;In laymen's term, Splunk is a web-styled platform to analyze logs or any kind of machine data. Think &lt;em&gt;journalctl&lt;/em&gt; but with more features and more diverse sources of data, in today's case: web traffics.&lt;/p&gt;

&lt;p&gt;Jumping to the task, you are probably confused like me that there are no 'Start Attackbox' button and they tell you to click on Splunk! Dont skip reading the introduction task 😐. There is a web-link there. You dont need an Attackbox today. &lt;/p&gt;

&lt;p&gt;Now, read and follow all the instructions in the second task. If you cannot get to step 6 below, then notice the arrow icon &lt;code&gt;&amp;gt;&lt;/code&gt; adjacent to the &lt;u&gt;Time &lt;/u&gt; column.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7r36jrsv8evgbvr49i04.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7r36jrsv8evgbvr49i04.png" alt="Splunk" width="800" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When was the peak traffic in the logs? You can hover over the histogram to see the date.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5y06jih3e9eioq1ym3mu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5y06jih3e9eioq1ym3mu.png" alt="Splunk Peak Traffic" width="800" height="132"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What is the count of Havij user_agent events? Run this query: &lt;code&gt;index=main sourcetype=web_traffic user_agent=*Havij*&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;ul&gt;
&lt;li&gt;How many path traversal attempts to access sensitive files on the server were observed?
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;Approach:&lt;/u&gt;&lt;br&gt;
I thought this query &lt;code&gt;index=main sourcetype=web_traffic  path="*..*" OR path="*redirect*"&lt;/code&gt;  would do but when The answer 1291 is too big for the Answer field:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffkqi3608i7l9o56k7het.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffkqi3608i7l9o56k7het.png" alt="TryHackMe Answer Field" width="445" height="155"&gt;&lt;/a&gt;&lt;br&gt;
Focus on the "sensitive files" part and check the corresponding command they showed to us:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft73ee3xszt3g0wittck9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ft73ee3xszt3g0wittck9.png" alt="Find in Page Browser" width="667" height="440"&gt;&lt;/a&gt;&lt;br&gt;
Running the query in the picture returns 347 results, not the correct answer either. Ask yourself if backups and logs are sensitive, yes, but from the lessons we know another sensitive file &lt;em&gt;bunnylock.bin&lt;/em&gt;. So I tried &lt;code&gt;index=main sourcetype=web_traffic  path=*bunnylock.bin*&lt;/code&gt; and its showed 833 results, still incorrect.&lt;/p&gt;

&lt;p&gt;Our only clues are 'path traversal' and 'sensitive files'. Lets refocus on 'path traversal' here. But we already tried the query they taught us:&lt;br&gt;
&lt;code&gt;sourcetype=web_traffic client_ip="&amp;lt;REDACTED&amp;gt;" AND path="*..*" OR path="*redirect*"&lt;/code&gt;&lt;br&gt;
... So lets try without the redirects? Result count is now 658✅. 'Dont beat around the bush' they say, so we beat around the &lt;em&gt;correct&lt;/em&gt; bush!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next question : How many bytes were transferred to the C2 server IP from the compromised web server?
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Leverage the autocomplete, no need cram every column:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ytn26zb2vrv5nk0qiji.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ytn26zb2vrv5nk0qiji.png" alt="Splunk sum of bytes_transferred" width="800" height="181"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Done! &lt;br&gt;
These kinds of rooms are called walkthrough rooms.&lt;/p&gt;

</description>
      <category>ctf</category>
      <category>tryhackme</category>
      <category>splunk</category>
    </item>
  </channel>
</rss>
