<?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 Mohamed khattab on Medium]]></title>
        <description><![CDATA[Stories by Mohamed khattab on Medium]]></description>
        <link>https://medium.com/@mohamedkhattab1892?source=rss-9b1e3f6f5fda------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hU5EHcqv4tscev63zOcaqA.jpeg</url>
            <title>Stories by Mohamed khattab on Medium</title>
            <link>https://medium.com/@mohamedkhattab1892?source=rss-9b1e3f6f5fda------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:43:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mohamedkhattab1892/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[Verifying a Vendor’s Answer Key the Hard Way: Threat-Modeling a Siemens S7–1200 PLC]]></title>
            <link>https://medium.com/@mohamedkhattab1892/verifying-a-vendors-answer-key-the-hard-way-threat-modeling-a-siemens-s7-1200-plc-458346e17ca0?source=rss-9b1e3f6f5fda------2</link>
            <guid isPermaLink="false">https://medium.com/p/458346e17ca0</guid>
            <category><![CDATA[siemens]]></category>
            <category><![CDATA[plc]]></category>
            <category><![CDATA[threat-modelling]]></category>
            <category><![CDATA[cve]]></category>
            <dc:creator><![CDATA[Mohamed khattab]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 02:21:20 GMT</pubDate>
            <atom:updated>2026-09-26T02:21:20.564Z</atom:updated>
            <content:encoded><![CDATA[<p>What a datasheet, four candidate CVEs, and a classification mistake taught me about OT vulnerability research.</p><p>Most introductions to vulnerability assessment treat it as a lookup problem: find the device, search a database, copy the CVE ID into a report. Working through a full threat model of a Siemens S7–1200 PLC as part of the CyManII OT Cybersecurity Bootcamp showed why that’s not enough — and why the verification step matters more than the search itself.</p><h4>The Device</h4><p>The target was a SIMATIC S7–1200 CPU 1212C AC/DC/Relay (part number 6ES7212–1BE40–0XB0), running firmware V4.4. On paper it’s a small, unremarkable industrial controller: 75 KB of work memory, a single PROFINET port with no integrated switch, and support for S7 Communication, Modbus, OPC UA, and a built-in web server.</p><p>That single detail — no integrated switch — turned out to matter more than any single protocol. With one physical interface and no internal isolation between services, every protocol the device exposes shares the same trust boundary. Whatever segmentation exists has to come entirely from the network around it, not from the device itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BM-z1mmUhDuEYcdDgPXQSQ.png" /><figcaption>SIMATIC S7–1200</figcaption></figure><h4>Classifying an Attack Surface Isn’t as Obvious as It Sounds</h4><p>The first real task was sorting every extracted spec into “physical” or “logical” attack surface. The first pass got two things wrong.</p><p>Firmware version and programming package were initially marked as physical attributes — they’re not. They don’t grant access to anything; they determine which CVEs even apply. That’s a logical property, not a physical one.</p><p>The network interface caused a second problem. The RJ45 port itself is physical hardware, sure. But “single port, no integrated switch” isn’t a hardware fact so much as a <em>topology</em> fact — it defines a trust-boundary implication that has nothing to do with touching the device. That single spec had to be split across both categories.</p><p>A third issue surfaced once memory (work, load, retentive) came up: it doesn’t fit either category, because it isn’t an entry point at all. It describes what happens <em>after</em> an attacker is already in — whether a change survives a reboot — not how they got in. That distinction needed its own category: <strong>Impact/Persistence</strong>.</p><p>The general lesson here isn’t really about PLCs. It’s that “attack surface” answers <em>how does someone get in</em>, and conflating that with <em>what happens once they’re in</em> produces a classification that looks tidy but is quietly wrong.</p><h4>The CVE List Wasn’t What It First Appeared to Be</h4><p>Two candidate CVEs — CVE-2022–31802 and CVE-2021–32974 — were the starting point for the vulnerability research phase. Both are real, published CVEs. Neither one turned out to apply to this device.</p><p>Direct verification against NVD showed CVE-2022–31802 actually describes a CODESYS Gateway Server issue, and CVE-2021–32974 belongs to a Moxa NPort serial device server — two completely different vendors, unrelated to the Siemens S7–1200. Both were dropped from the assessment.</p><p>This is the part of the process that’s easy to skip and expensive to skip badly: a CVE ID resolving successfully in a database is not, by itself, confirmation that it applies to the device sitting in front of you. It’s a reminder that the “product” field in an advisory deserves as much scrutiny as the CVE number itself — especially when working from a secondhand reference rather than a primary source.</p><p>The two CVEs that survived direct verification told a more specific story:</p><ul><li><strong>CVE-2024–47100</strong> — a cross-site request forgery flaw in the web interface (<strong>CWE-352</strong>) that lets an unauthenticated attacker alter the CPU’s operating mode, provided a legitimate authenticated user is tricked into the interaction. CVSS 7.1. Affects firmware below V4.7 — this device’s V4.4 is in range.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JRJnyCYdwNAimXxE8oEoVg.png" /></figure><ul><li><strong>CVE-2025–24812</strong> — malformed S7comm/ISO-TSAP packets on port 102/tcp causing denial of service (CWE-1286). CVSS 6.5. Same affected-firmware window.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LTL50JcYLkEwIqeV0ZAcYg.png" /></figure><p>Both were confirmed against the exact part number listed in each advisory — not just the product family name, but the specific 6ES7212–1BE40–0XB0.</p><h4>Mapping to MITRE ATT&amp;CK Meant Rejecting the Obvious-Sounding Options First</h4><p>Mapping CVE-2024–47100 to a MITRE ATT&amp;CK for ICS technique looked simple until several plausible-sounding candidates turned out to be wrong on closer reading: <em>Brute Force I/O</em> (concerns physical I/O values, not CPU mode), <em>Modify Firmware</em> (describes replacing firmware entirely, not toggling a mode), <em>Modify Parameter</em> (concerns process setpoints, not operating state). The correct match was <strong>T0858 — Change Operating Mode</strong>, under the Execution tactic.</p><p>CVE-2025–24812 had a similar near-miss: <em>Denial of Control</em> looked right at first — it’s filed under “Inhibit Response Function,” which matches the tactic — but its actual definition describes an operator being locked out of a still-running process, not a device becoming unresponsive. The correct technique was <strong>T0814 — Denial of Service</strong>, still under Inhibit Response Function, just not the first one considered.</p><p>The pattern across both cases: technique names that sound alike often describe meaningfully different attacker behaviors, and only the definition paragraph — not the label — should decide the match.</p><h4>Three Risks, Not Just Two CVEs</h4><p>The final risk assessment deliberately included a third risk that didn’t come from any CVE at all: the absence of an integrated switch. A report built only from patchable CVEs implies that patching solves the problem, which isn’t true here — some risks are architectural and persist regardless of firmware version.</p><p>Risk Evidence Mitigation Unauthenticated CSRF can change CPU RUN/STOP stateCVE-2024–47100, CVSS 7.1Update to firmware V4.7+; until then, restrict web interface access to trusted engineering workstations Malformed S7comm packets cause DoSCVE-2025–24812, CVSS 6.5Deploy ICS-aware intrusion detection (e.g. Zeek with S7comm signatures) on port 102/tcpNo internal segmentation between exposed protocolsDatasheet — single interface, no switchExternal VLAN/firewall segmentation, plus the device’s own built-in Read/Write access protection</p><h4>What This Actually Taught</h4><p>The recurring lesson wasn’t about Siemens specifically — it was about process discipline. A CVE ID resolving in a database doesn’t confirm relevance; the product association needs independent verification. Attack surface and impact are different questions and get confused easily. And a datasheet-only assessment has to state its own limitation explicitly — it describes the device, not how it’s actually deployed, and any conclusion drawn from it should carry that caveat rather than imply false certainty.</p><p><em>This assessment was conducted as part of the CyManII OT Cybersecurity Bootcamp. No exploitation was performed against a live system — all findings are based on datasheet review and cross-referenced public vulnerability advisories from CISA and NVD.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=458346e17ca0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A PLC With No Patch: Assessing the Hardware Security of a Phoenix Contact Inline Controller]]></title>
            <link>https://medium.com/@mohamedkhattab1892/a-plc-with-no-patch-assessing-the-hardware-security-of-a-phoenix-contact-inline-controller-119b061b41d8?source=rss-9b1e3f6f5fda------2</link>
            <guid isPermaLink="false">https://medium.com/p/119b061b41d8</guid>
            <category><![CDATA[phoenix]]></category>
            <category><![CDATA[plc]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[hardware]]></category>
            <dc:creator><![CDATA[Mohamed khattab]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 02:19:33 GMT</pubDate>
            <atom:updated>2026-09-26T02:19:33.046Z</atom:updated>
            <content:encoded><![CDATA[<p>What happens when a device’s strongest feature — tool-free, automatic installation — turns out to be its weakest security control.</p><p>Not every vulnerability assessment ends with a firmware update. Sometimes the vendor’s own answer is: there is no patch, and there isn’t going to be one. That was the case with a hardware security assessment of a Phoenix Contact ILC 171 ETH 2TX inline controller, conducted as part of the CyManII OT Cybersecurity Bootcamp — and it forced a different kind of report, one built around network architecture rather than a version number to update.</p><h4>The Device, and a Distinction That Shapes Everything After It</h4><p>The ILC 171 ETH 2TX is an inline controller supporting three protocols: INTERBUS as a local-bus master, PROFINET as a device, and Modbus/TCP as a client. None of the three has authentication built into the protocol itself.</p><p>Before touching the manual, the assessment needed one foundational distinction clarified: hardware security versus network security. Hardware threats require physical presence — tampering with terminals, reading flash memory directly, exploiting an exposed debug port. Network threats arrive remotely over Ethernet. The practical test: does the attacker need to be standing in front of the cabinet, or can they reach it from any device on the same segment? Every finding in the assessment had to be sorted against that line.</p><p>A second distinction mattered just as much: safety versus security. Safety protects people and equipment from accidents; security protects the device from a deliberate third party. A device can be safety-rated to EN ISO 13849–1 standards and have zero security features — and this one is a clear example of exactly that.</p><h4>A Wiring Exception That Looks Like a Vulnerability but Isn’t</h4><p>The manual documents mechanical keying between voltage zones — 24V DC, 120/230V AC, and 400V AC — using a keyway shape on each terminal housing, so a low-voltage connector physically cannot snap into a high-voltage slot. Except for one case: a 24V DC power terminal <em>can</em> physically be forced into a 120/230V AC area, even though the manual explicitly states this isn’t permitted.</p><p>The classification question here mattered more than it first appeared. Is this a security finding? The answer is no — and the reasoning is the useful part. It requires a technician’s installation mistake, not an attacker’s deliberate action. No malicious intent is needed to trigger it, and the consequence is malfunction or shock, not unauthorized access. Any threat that needs a third party’s malicious intent is a security issue; any threat that comes from an operational mistake with no attacker involved is a safety issue. Conflating the two would have put a miswiring risk in the same category as a remote logic-tampering vulnerability, which would misrepresent both.</p><h4>The Feature That’s Also the Weakness</h4><p>Inline terminals snap onto a DIN rail without tools, and the potential/data jumpers connecting them form automatically on installation — a genuine deployment convenience. But automatic, unauthenticated bus formation means any terminal accepted onto the rail joins the local bus with zero verification of what it actually is. The local bus is a shared physical medium: every terminal talks over the same daisy-chained connection, with no encryption or segmentation at the physical layer. That makes both passive eavesdropping (with a logic analyzer) and active injection — replacing a legitimate terminal with a rogue device wired to the same pins — genuinely possible once someone has cabinet access.</p><p>This is the pattern worth naming explicitly: a device’s ease of installation and maintenance can be a real operational strength and a real security weakness at the same time. The two aren’t mutually exclusive, and a report that only states one of them is incomplete.</p><h4>No Secure Boot, and How That Got Confirmed Rather Than Assumed</h4><p>Firmware on the ILC 171 deploys through the PC Worx Firmware Updater over Ethernet. No vendor documentation for the ILC 1x1 family mentions secure boot, firmware signing, or a code-integrity check. A 2020 Product Change Notification covering a hardware revision discusses firmware/hardware compatibility only — nothing about verification.</p><p>An absence of documentation is a weak claim on its own; it could just mean the manual is incomplete. It became a strong, defensible finding once corroborated: Phoenix Contact’s newer PLCnext Control platform <em>does</em> implement boot integrity checks, signed firmware containers, SHA-256 checksums, and mandatory authentication for firmware deployment. That comparison converts “we found nothing” into “the vendor demonstrably has this technology elsewhere, and chose not to include it in this product line” — a generational gap, not an oversight in documentation.</p><h4>Two CVEs, and a Lesson in Not Trusting the First Number You Find</h4><p><strong>CVE-2023–46141</strong> (CVSS 9.8, Critical) describes logic files that can be manipulated on the engineering station and uploaded to the PLC without tamper detection — and the tampering can be hidden so the modified logic self-conceals. <strong>CVE-2023–46143</strong> (CVSS 7.5, High) confirms the firmware-integrity gap directly: there’s no function to verify the authenticity of an uploaded application, and the CRC check meant to catch a mismatch can itself be bypassed.</p><p>The more instructive moment came from a source discrepancy. A third-party aggregator listed CVE-2023–46143’s score as 8.6. The official CERT VDE advisory — the primary source — gives 7.5, with a different Scope value in the vector string entirely. Had the secondary figure gone unchecked, the final report would have carried an incorrect severity rating. The rule that followed from this: an aggregator score is provisional until confirmed against the primary source, every time — not just when something looks off.</p><p>Five additional CVEs surfaced during research, all affecting the PC Worx/Config+ engineering software rather than the PLC itself, each requiring an engineer to open a manipulated project file. These were documented but not deep-dived, since they represent a supply-chain and social-engineering risk vector rather than a direct network attack on the controller — a different category of exposure worth naming separately rather than folding into the same list.</p><h4>Why the Mitigations Don’t Start With “Apply the Patch”</h4><p>No patch exists for either primary CVE, and the vendor isn’t planning one for this product line. That reshapes what a mitigation section can responsibly recommend:</p><p><strong>Risks and Mitigations</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*q_ChhsSsHZNTWhlpMuzGUg.png" /><figcaption><strong>CVE-2023–46141 &amp; CVE-2023–46143 Risks and Mitigations</strong></figcaption></figure><p>For any new deployment, migrating to PLCnext Control is the only route that actually closes these gaps at the device level rather than compensating around them.</p><h4>The Takeaway</h4><p>This assessment didn’t end with “update the firmware,” because that option doesn’t exist here. What it produced instead was a report built entirely around external, architectural controls — network segmentation, physical access, offline verification — because the device’s own security posture depends on all three by design, not by oversight. A finding is only as strong as the source it traces back to: a manual section number, a CVE ID cross-checked against its primary advisory, or a named vendor comparison — never an assumption left unverified.</p><p><em>This assessment was conducted as part of the CyManII OT Cybersecurity Bootcamp, based entirely on the official installation manual, datasheet, and public vulnerability advisories. No exploitation was performed against a live device.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=119b061b41d8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When “Healthy” Doesn’t Mean “Working”: Building a Detection Pipeline on the Elastic Stack]]></title>
            <link>https://medium.com/@mohamedkhattab1892/when-healthy-doesnt-mean-working-building-a-detection-pipeline-on-the-elastic-stack-c1a837601314?source=rss-9b1e3f6f5fda------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1a837601314</guid>
            <category><![CDATA[elasticsearch]]></category>
            <dc:creator><![CDATA[Mohamed khattab]]></dc:creator>
            <pubDate>Sat, 26 Sep 2026 02:17:30 GMT</pubDate>
            <atom:updated>2026-09-26T02:17:30.949Z</atom:updated>
            <content:encoded><![CDATA[<p>An agent that reported perfect health while silently dropping every event — and what that taught me about the difference between deployment and detection.</p><p>It’s easy to assume a monitoring pipeline works because it looks deployed. An agent shows “Healthy,” a policy is assigned, dashboards load without errors. None of that confirms data is actually arriving. Building an end-to-end detection pipeline on the Elastic Stack — Fleet Server, a Windows 10 endpoint, and a Dockerized Elasticsearch/Kibana deployment — surfaced exactly that gap, and fixing it turned out to matter more than writing the detection rules themselves.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jTCT9e3KJfsCzdBlz-DNsA.png" /><figcaption>Elastic Agent overview confirming Status: Healthy</figcaption></figure><h4>Enrolled and “Healthy” — but Was Data Actually Arriving?</h4><p>The setup itself was straightforward: Fleet Server running, a Windows 10 Elastic Agent enrolled against it, feeding into a Dockerized Elasticsearch and Kibana stack. The Fleet dashboard reported the agent as Healthy immediately.</p><p>Healthy in Fleet means the agent is checking in and reporting its own status — it says nothing about whether the actual security event data behind it is reaching the SIEM. That distinction is exactly where the pipeline broke.</p><p>A localhost resolution and port-binding conflict was silently blocking telemetry delivery from the endpoint to the SIEM. Nothing in the UI flagged it directly. There was no error banner, no failed-status indicator — just an absence of data that would only become visible by actually looking for it in Discover and finding nothing where events should have been.</p><h4>The Fix Isn’t the Interesting Part — Noticing the Gap Is</h4><p>Diagnosing this meant working backward from “no documents in Discover” to the actual network layer: confirming the agent’s outbound connection was resolving and binding correctly rather than silently failing against a local address conflict. Once resolved, event data started flowing end-to-end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gYpH81AFU5g7D735ngaUCA.png" /><figcaption>Kibana Discover showing system.security documents matching</figcaption></figure><p>That screenshot is the moment the fix confirmed itself — Windows Security events (event code 4625, failed logon attempts) now visible directly in Kibana Discover, with a proper time-series histogram showing when they occurred. Before the fix, this view was empty despite the agent showing Healthy the entire time.</p><p>The lesson generalizes past this one pipeline: agent-health checks and data-delivery checks are two different questions, and a monitoring setup isn’t validated until someone has confirmed the second one directly — not inferred it from the first.</p><h4>Rule One: A Threshold Rule for Failed Logons</h4><p>With telemetry confirmed flowing, the first detection rule targeted repeated authentication failures — a Threshold rule matching event.code: 4625 AND winlog.channel: &quot;Security&quot;, configured to fire once results reached 4 or more within the evaluation window.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nUC388T8NT2ryxMZHVi0kw.png" /><figcaption><em>Threshold rule definition: event.code: 4625 AND winlog.channel: “Security”, Threshold ≥ 4, Severity Low.</em></figcaption></figure><p>The rule definition here does double duty as documentation: the KQL query, the index patterns it runs against, the threshold value, and the severity are all visible in one place — useful both for the assessment itself and for anyone auditing the rule later.</p><h4>Rule Two: A Direct-Match Rule Mapped to MITRE ATT&amp;CK</h4><p>The second rule targeted a more specific, higher-signal event: local Administrators group modification, Windows Event ID 4732. Unlike the threshold rule, this one used a direct-match query — a single occurrence is significant enough to alert on immediately, no aggregation needed.</p><p>To validate it end-to-end, the test had to actually generate that exact event rather than assume the rule would fire correctly in theory:</p><pre>net localgroup Administrators labtest /delete<br>net localgroup Administrators labtest /add<br>Get-WinEvent -FilterHashtable @{LogName=&#39;Security&#39;;Id=4732} -MaxEvents 1</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*Dm_8cE650A-Js8meUWKt2g.png" /><figcaption>PowerShell adding the labtest account to the local Administrators group</figcaption></figure><p>Removing and re-adding a test account to the local Administrators group reliably regenerates Event ID 4732 on demand — a repeatable way to fire the exact trigger condition rather than waiting for it to happen naturally. This event maps to <strong>MITRE ATT&amp;CK T1098.007 — Account Manipulation: Additional Local or Domain Group Membership</strong>, which is what gives the rule its actual security relevance rather than being just a log-matching exercise.</p><h4>Confirming Both Rules Actually Alerted</h4><p>Writing a detection rule and confirming it works are two different milestones. The final validation step was checking the Security Alerts view directly, rather than trusting that a correctly-configured rule would necessarily produce a correctly-triggered alert.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8frLinn1MEXwBJQC31bOKg.png" /><figcaption><em>Security Alerts page showing “Local Administrator Group Modification Detected” (2 alerts, Medium severity).</em></figcaption></figure><p>One alert for the failed-logon threshold rule, and two for the Administrators-group modification rule — three alerts total, correctly attributed to their respective rules with severity and risk score visible in the same triage view used for real incidents.</p><h4>What This Pipeline Actually Taught</h4><p>The technical difficulty in this lab wasn’t writing detection logic — a threshold query and a direct-match query are both fairly simple once the target event ID is known. The real difficulty was diagnosing why data wasn’t arriving in the first place, when every surface-level indicator said the deployment was fine.</p><p>That’s a pattern worth carrying into any future SIEM work: a “Healthy” agent status is a starting point for verification, not a substitute for it. And a detection rule is only proven once it’s watched to fire against a real, deliberately generated event — not once it’s saved.</p><p><em>This project was built as part of the CyManII OT Cybersecurity Bootcamp (ISCS-3523 Lab) in a lab environment.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1a837601314" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>