<?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 Angel on Medium]]></title>
        <description><![CDATA[Stories by Angel on Medium]]></description>
        <link>https://medium.com/@salmamohamed23999?source=rss-36c9c9a65d06------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*iEA5MiUdebkGTMKq</url>
            <title>Stories by Angel on Medium</title>
            <link>https://medium.com/@salmamohamed23999?source=rss-36c9c9a65d06------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:57:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@salmamohamed23999/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[From a Hidden Webshell to Root: Investigating a Multi-Stage Linux Compromise with Docker Escape]]></title>
            <link>https://medium.com/@salmamohamed23999/from-a-hidden-webshell-to-root-investigating-a-multi-stage-linux-compromise-with-docker-escape-f4aed71ce65b?source=rss-36c9c9a65d06------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4aed71ce65b</guid>
            <dc:creator><![CDATA[Angel]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 21:54:52 GMT</pubDate>
            <atom:updated>2026-10-21T21:54:52.907Z</atom:updated>
            <content:encoded><![CDATA[<p>When I started this challenge with my teammate <a href="https://medium.com/u/993f1af61905"><em>Elher</em></a>, it looked like a normal SOC investigation: a high-severity alert, thousands of background events, and several seemingly suspicious activities competing for attention. By the end, it turned into a complete attack chain involving a webshell, container abuse, host compromise, persistence, and lateral movement.</p><p>This post walks through our investigation process. Unlike simply following alerts, the objective was to reconstruct the attacker’s actions chronologically and separate genuine malicious activity from noise and decoys. The challenge report identified a high-confidence malicious chain involving WEB-01, DOCKER-01, and JUMP-01.</p><h3>The Alert That Started Everything</h3><p>The investigation ultimately centered on a Wazuh high-severity alert indicating suspicious Linux account and command activity. Our report documented the event as a critical incident involving web compromise, container escape, credential access, persistence, and lateral movement.</p><p>However, the alert itself was not the first sign of malicious activity.</p><p>The official timeline shows the earliest significant activity began before the SIEM alert, with external communication directed toward WEB-01 from an external address.</p><blockquote><strong>Phase 1: Initial Access Through the Web Application<em><br></em></strong>The first critical event occurred when the web server account executed a Python script from a hidden temporary directory:</blockquote><pre>python3 /tmp/.cache/worker.py</pre><p>This Execution happened under:</p><pre>User: www-data<br>Parent Process: nginx</pre><p>This raised oursuspicion, Why is a python file running from /tmp/.cache/ ?<br>This is not a normal behaviour for a web server. Moments later ,the script created a new file:</p><pre>/var/www/html/uploads/.cache/health.php</pre><p>under a web-accessible uploads directory. Our investigation identified this file as a likely webshell because it was written by the same process that executed under the web service account.</p><p>The official solution also identifies the sequence as suspicious server-side execution followed by creation of a PHP backdoor.</p><pre>worker.py<br>        ↓<br>Creates health.php<br>        ↓<br>External request executes health.php</pre><blockquote>Phase 2: Webshell Validation<br><em>Six seconds later, the attacker validated that the webshell worked.</em></blockquote><p>A request was sent to:</p><pre>/uploads/.cache/health.php?cmd=id</pre><p>From IP<strong><em> 203.0.113.77</em></strong> and the server returned <em>200 </em><strong><em>ok.<br></em></strong>The same request appeared in both Nginx and Zeek telemetry, providing independent confirmation that command execution was occurring successfully.</p><p>Note: Attackers commonly use the cmd command “id” after achieving code execution to confirm what user they are running as, the command working shows that the payload works.</p><blockquote>Phase 3: Docker Abuse and Privilege Escalation<br><em>The investigation then pivoted to DOCKER-01, a new container named “debugger” was launched using:</em></blockquote><pre>docker run -d --privileged -v /:/host alpine:3.20</pre><p>Both Falco and Docker telemetry captured this activity. The official solution specifically flagged the privileged container and host-mounted filesystem as high-risk indicators.</p><p>This command tells us several things:</p><ul><li>The container ran using --privileged</li><li>The entire host filesystem was mounted inside the container</li><li>An Alpine image was used as the attack platform</li></ul><p>At this point, the attacker effectively gave themselves host visibility.</p><blockquote>Phase 4: Container Escape<br><em>A few seconds later, this shell code was executed</em></blockquote><pre>mount -t proc proc /host/proc<br>nsenter -t 1 -m -u -i -n -p /bin/bash</pre><p>This is one of the most important events in the entire investigation.<br>The attacker joined the namespaces associated with PID 1, effectively escaping normal container isolation and entering the host context. The official solution identifies this as strong host-access behavior.</p><blockquote>Phase 5: Credential Access<br><em>Right after, this code appeared in the logs:</em></blockquote><pre>cat /etc/shadow</pre><p>This is a major escalation in attacker capability since “shadow” provides password hashes for local Linux accounts.<br>The logs proved access occurred, although they do not prove the hashes were exfiltrated or cracked.</p><p>shortly after, the attacker accessed:</p><pre>/var/log/auth.log</pre><p>which is consistent with post-compromise discovery activity. Ouranalysis interpreted this as an attempt to identify existing users, administrative activity, and authentication patterns.</p><blockquote>Phase 6: Persistence<br><em>The chain introduced a new account: “svc_sync” which was added to the group “sudo”.</em></blockquote><p>Later, Persistence activity was noted through:</p><pre>system-update.service</pre><p>Note: the attacker was gaining access to different accounts through another account called “cyberjunkie” from the attacker’s IP <em>203.0.113.77 </em>getting added to “sudo” group through different devices, although it wasn’t the attacker’s main persistence account.</p><blockquote>Phase 7: External Communications<br><em>The challenge solution documented DNS activity involving:</em></blockquote><pre>cdn-sync-update.com<br>203.0.113.120:443</pre><p>and later a successful SSH login from that same address. This sequence suggested possible command-and-control activity.</p><blockquote>Phase 8: SSH Re-Entry<br><em>One of the strongest indicators of persistence was the successful SSH authentication that occurred later in the chain.</em></blockquote><pre>Accepted publickey for svc_sync<br>With IP 203.0.113.120 on JUMP-01.</pre><h3>Decoys and False Leads</h3><p>One of the most valuable parts of the challenge was learning not to chase every suspicious-looking event.</p><p>Eventually we identified three intended decoys:</p><blockquote>Decoy A: Masscan reconnaissance activity</blockquote><p>From IP <em>198.51.100.44 </em>Targeting:</p><pre>/wp-login.php<br>/phpmyadmin/</pre><p>The activity looked hostile but never connected to the actual compromise chain.</p><blockquote>Decoy B :Maintenance activity associated with approved operational changes.</blockquote><blockquote>Decoy C: Legitimate Jenkins pipeline activity involving Docker builds, Git fetches, and automated testing.</blockquote><p>Note: This is a reminder that in the SOC world, correlation matters, not every suspicious event is a part of the incident and these logs could be noise.</p><h3>MITRE ATT&amp;CK Mapping</h3><blockquote>Throughout the investigation We mapped the attack to ATT&amp;CK techniques such as:</blockquote><ul><li>Exploit Public-Facing Application -&gt; T1190</li><li>Command and Scripting Interpreter -&gt; T1059</li><li>Web Shell -&gt; T1505.003</li><li>Deploy Container -&gt; T1610</li><li>Escape to Host -&gt; T1611</li><li>Credential Access -&gt; T1003</li><li>Remote Services (SSH) -&gt; T1021.004</li><li>Create Account -&gt; T1136</li><li>Create/Modify Systemd Service -&gt; T1543.002</li></ul><h3>Lessons learned from the challenge:</h3><ul><li>Correlation Beats Individual Alerts: Falco, Wazuh, Auditd, Zeek, Nginx, Docker, DNS, and SSH logs each showed only part of the story, Only correlation revealed the full attack chain.</li><li>Process Ancestry Matters : parent-child relationships often reveal malicious execution.</li></ul><pre>nginx<br>   ↓<br>python3<br>   ↓<br>worker.py</pre><ul><li>Container Security Is Host Security: A single command transformed a web compromise into a full host compromise.</li></ul><pre>docker run --privileged -v /:/host</pre><ul><li>Persistence Is the Real Goal Of Any Attacker: The most dangerous moment was not webshell creation, It was when the attacker gained a reusable administrative foothold.</li></ul><h3>Final Verdict</h3><p>The evidence supports a high-confidence malicious intrusion that progressed from web execution to host-level control. The attack chain involved:</p><pre>Initial Web Access<br>        ↓<br>worker.py<br>        ↓<br>health.php Webshell<br>        ↓<br>Remote Command Execution<br>        ↓<br>Privileged Docker Container<br>        ↓<br>Container Escape<br>        ↓<br>Credential Access<br>        ↓<br>Persistence<br>        ↓<br>SSH Re-Entry</pre><p>By the end of the investigation, the attacker demonstrated the ability to execute code, access sensitive credentials, establish persistence, and operate across multiple systems. The challenge provided a realistic example of how seemingly isolated alerts can be connected into a complete intrusion narrative through disciplined log analysis and evidence correlation.</p><p><em>This investigation was completed as part of an Archon Vanguard Linux SOC Incident Investigation challenge and documented in a full Tier 2 incident report.</em></p><p><em>It wouldn’t have been possible without their continuous support and great knowledge base, and the help and support from my teammate as well !</em></p><p>-Our Report: <a href="https://drive.google.com/file/d/1rWMo35lv1rtczUzsG-JTRSHtMw9nHdI1/view?usp=sharing">https://drive.google.com/file/d/1rWMo35lv1rtczUzsG-JTRSHtMw9nHdI1/view?usp=sharing</a> <br>-Archon Vangaurd: <a href="https://www.linkedin.com/company/archonvanguard/posts/?feedView=all">https://www.linkedin.com/company/archonvanguard/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4aed71ce65b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[THM Passive Recon Room]]></title>
            <link>https://medium.com/@salmamohamed23999/thm-passive-recon-room-5c2c5ea3668f?source=rss-36c9c9a65d06------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c2c5ea3668f</guid>
            <category><![CDATA[socanalysis]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[reconnaissance]]></category>
            <dc:creator><![CDATA[Angel]]></dc:creator>
            <pubDate>Fri, 10 Jul 2026 16:14:48 GMT</pubDate>
            <atom:updated>2026-07-10T18:42:53.516Z</atom:updated>
            <content:encoded><![CDATA[<p>I will be going through this room as a way to get to know more about gathering info “ reconnaissance” about domains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/0*Fb5UkCQJiGZnuDDL" /><figcaption>Reconnaissance</figcaption></figure><p>1st</p><p>what is reconnaissance?</p><p>It is the act of gathering information on a party, it can either be passive or active.</p><p>&gt;passive: the party doesn’t know, the info is public and the act can’t be traced back to a certain ip address e.g. querying public records from open resolvers (A, MX, TXT, etc.)</p><p>&gt;Active: requires direct engagement the act can be traced back to someone or an ip address e.g. port scanning, or sending packets.</p><blockquote>Main take:</blockquote><p>Active is traceable, while passive uses 3rd party software so it is not traceable to the main client who is doing the investigating.</p><p>2nd</p><p>Room notes<br>The room introduces us to websites &amp;commands that will help us navigate through the module.</p><p>&gt;WHOIS: a command that helps us know more about a domain like registrar , date of creation..etc.</p><p>&gt;nslookup: a command used to troubleshoot DNS issues and gather information about domains.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*boaCc3hATvlU6XVEvdPLog.png" /><figcaption>nslookup example</figcaption></figure><p>&gt;dig: is the more powerful alternative for nslookup; since it gathers more information.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kbv5LhVHVolmeJL7jCOB4A.png" /><figcaption>Dig example</figcaption></figure><blockquote>NOTE</blockquote><p>1.Keep in mind that while searching for info about a domain, you need to specify your query type i.e.</p><ul><li>A: ipv4</li><li>AAAA: ipv6</li><li>TXT: text records</li><li>MX: Mail records</li></ul><p>2. We notice that using dig is more extensive and beneficial if I am looking for more details.</p><p>&gt;Shodan.io: a website used to discover publically accessible ports, routers and firewalls, web servers..etc.</p><p>&gt;DNSDumpster: it helps in revealing subdomains and records, just like dig and nslookup, but with dashboards.</p><p>3rd</p><p>Room Answers</p><p>Task 2 is generally answering whether a situation is passive or active reconn, which is fairly easy to navigate.</p><p>starting from task 3:</p><p>after using the command “whois tryhackme.com”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*AAiNCuaZV-2jhVgNGge5-Q.png" /><figcaption>Creation date, Registrar and name of the servers company.</figcaption></figure><p>the highlighted parts in the results are the answers to each question in the task.</p><p>Task 4:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*lKDvahZLwpu0LUyrEfSuCw.png" /><figcaption>THM Flag</figcaption></figure><p>The flag i got after using dig command : THM{a5b83929888ed36acb0272971e438d78}</p><p>Task 5&amp;6:</p><p>generally can be solved by search on the websites mentioned above, learning how to use filters to get the answer you seek.</p><p>Task 5 answer: cloudflare</p><p>Task 6 answers:</p><ul><li>United States</li><li>8080</li><li>80</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c2c5ea3668f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My take on Protocol Tunneling]]></title>
            <link>https://medium.com/@salmamohamed23999/my-take-on-protocol-tunneling-14cbcffa2935?source=rss-36c9c9a65d06------2</link>
            <guid isPermaLink="false">https://medium.com/p/14cbcffa2935</guid>
            <category><![CDATA[socanalysis]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[it]]></category>
            <dc:creator><![CDATA[Angel]]></dc:creator>
            <pubDate>Tue, 30 Jun 2026 20:00:54 GMT</pubDate>
            <atom:updated>2026-06-30T20:00:54.063Z</atom:updated>
            <content:encoded><![CDATA[<p>As I’m beginning my journey as a soc analyst, I’ll be sharing new things i encounter &amp; learn.</p><p>Starting with protocol tunneling, to keep it as brief as possible:<br>“it is the act of encapsulating a certain protocol inside another protocol”</p><p>Okay, cool, why would i need to hide a protocol in another? Simple, to bypass certain restrictions on firewalls or network access controls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*oMyOBX_xm49Hbqx2eZh72Q.png" /></figure><p>Let’s say a firewall only allows packets transferred with HTTP protocol only and my packets are FTP, by encapsulating them using HTTP tunneling, firewall typically checks the header and since it matches the allowed protocol, it passes without checking the actual protocol.</p><p>I will be going more in depth about a specific type of protocol tunneling: HTTP tunneling.</p><p>1st</p><blockquote><em>HTTP Tunneling in theory:</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*L2Z7oJ8dodBQZmwMycsHMg.gif" /></figure><p>Encapsulating payload inside 80 or 443 packet to ensure it bypasses a firewall that only allows these ports.</p><p>One tool that allows this is ufw (Uncomplicated FireWall) on linux, which is a user-friendly frontend for managing firewall rules in.</p><p>We will be needing two hosts: a server and a client that are connected via network on a VirtualBox/ Vmware.</p><blockquote>NOTE:</blockquote><p>&gt;Server: is the host who will setup and operate the tunnel for users/clients.</p><p>&gt;Client: is the person who is going to use the httptunnel command to bypass their firewall.</p><p>2nd</p><blockquote>HTTP tunneling in action:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*lWV6o9IGQi-axXIBEo4E5g.png" /></figure><p>Here, i set the rules i want</p><p>&gt; Deny incoming acts as my shield, if a device from outside my network tries connecting it is rejected</p><p>&gt; Allow outgoing is my open door to the outside world.</p><p>How do i get a reply back in? using the stateful inspection method:</p><p><strong><em>Request&gt;Notebook&gt;Response&gt;Exception</em></strong>, visiting a website sends an outgoing packet-&gt; Firewall notes the ip address of the address, hence the stateful part-&gt; the response is checked by firewall, since the ip address of the website is saved with the certain protocol thats used, it is bypassed-&gt; since it is established through the rules, the firewall allows dynamic entry through the incoming shield created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/249/1*aS-IDoApGQdUcBkRiux6oA.png" /><figcaption>server side</figcaption></figure><p>This is the bridge between server and client, where I’m trying to wrap my ssh packet inside a HTTP packet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/212/1*P2nNv0Rvi0I1OIJ7iBRANw.png" /><figcaption>client side</figcaption></figure><p>at the end, we ensure that what the firewall saw is just HTTP traffic.</p><p>Now if we try to ssh the ip that’s hidden in the previous figure, it will work without the firewall suspecting a single thing (unless of course you are a seasoned SOC analyst capturing traffic)</p><h3>How to know if this is a protocol tunneling attack?</h3><p>It is quite simple really, as a soc analyst, we capture traffic using wireshark, we will notice that the packet itself holds a HTTP protocol but the contents of the packet is raw binary, ssh handshakes, or encrypted text.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ts7xCa9Jfy74YalKSnZu-A.png" /><figcaption>HTTP Tunneling captured in wireshark</figcaption></figure><p>HTTP packets always contain readable content and json or css files.</p><p>Another indicator is that the HTTP connection is closed after being established, while HTTP tunneling is persistent ( stays open ).</p><h3><strong>Helpful references:</strong></h3><ol><li><a href="https://mewbies.com/how_to_setup_http_tunnel_htc_tutorial.htm">https://mewbies.com/how_to_setup_http_tunnel_htc_tutorial.htm</a></li><li><a href="https://youtu.be/_J1agy5XbPE?si=-NYUCwIeCyRKZUs8">https://youtu.be/_J1agy5XbPE?si=-NYUCwIeCyRKZUs8</a></li><li><a href="https://github.com/Sarath-P-2/ufw-firewall-kali">https://github.com/Sarath-P-2/ufw-firewall-kali</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=14cbcffa2935" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>