<?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 Mohamad on Medium]]></title>
        <description><![CDATA[Stories by Mohamad on Medium]]></description>
        <link>https://medium.com/@b0rn2burn?source=rss-6d5bd84eb8b6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nFrqd82BeN4QCB6nn-aegQ.jpeg</url>
            <title>Stories by Mohamad on Medium</title>
            <link>https://medium.com/@b0rn2burn?source=rss-6d5bd84eb8b6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 10:49:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@b0rn2burn/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[Exploring ICS/OT Attack Surface Discovery: Building a Small Reconnaissance Tool]]></title>
            <link>https://medium.com/@b0rn2burn/exploring-ics-ot-attack-surface-discovery-building-a-small-reconnaissance-tool-1098302eb61c?source=rss-6d5bd84eb8b6------2</link>
            <guid isPermaLink="false">https://medium.com/p/1098302eb61c</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ci]]></category>
            <category><![CDATA[ot-security]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[network-security]]></category>
            <dc:creator><![CDATA[Mohamad]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 10:45:28 GMT</pubDate>
            <atom:updated>2026-11-16T10:45:28.348Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Understanding how exposed industrial systems can be discovered, scanned, and exploited using publicly available information.</em></p><h3>Introduction</h3><p>Industrial Control Systems (ICS) and Operational Technology (OT) are becoming increasingly important targets in the cybersecurity landscape.</p><p>Recent cybersecurity incidents affecting industrial environments, particularly in France, have highlighted the potential real-world consequences of attacks against critical infrastructure. Beyond traditional industrial facilities, sectors such as food retail and healthcare can also be affected. For example, a cyberattack targeting supermarket refrigeration systems could disrupt cold-chain operations and compromise food preservation, while attacks affecting blood storage systems could put critical medical supplies at risk. These scenarios raise an important question: <strong>how easily can an attacker identify exposed industrial systems connected to the internet, and potentially target the infrastructure behind essential services?</strong></p><p>Driven by my interest in offensive security and industrial cybersecurity, I decided to explore this question by building a small proof of concept.</p><p>The objective was not to develop a complete vulnerability assessment platform, but rather to experiment with the initial stages of an attacker’s reconnaissance process: discovering exposed systems, collecting technical information, and identifying potential matches against known device signatures.</p><p>This project is an ongoing experiment, and there is still plenty of room for improvement.</p><h3>1. The idea behind the tool</h3><p>The underlying idea is relatively simple.</p><p>Several publicly available tools and services already provide valuable information about internet-connected systems. By combining them into a single workflow, it becomes possible to automate part of the reconnaissance and exploitation phases.</p><p>The prototype currently combines three main components:</p><ul><li><strong>Shodan:</strong> Identifies internet-exposed devices based on specific search queries.</li><li><strong>Nmap:</strong> Performs host discovery and service detection on selected ports.</li><li><strong>Exploitation:</strong> Performs login attack (can be extended to exploit known vulnerable services).</li><li><strong>SQLite:</strong> Stores collected information and maintains a small database of device signatures.</li></ul><p>The workflow is orchestrated through Bash scripts, with Python handling API interactions, data processing, and database operations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WPr5zfOqkI8toOAj907U3A.png" /><figcaption>tool architecutre</figcaption></figure><h3>2. How does it work?</h3><p>The current implementation follows three main stages.</p><h3>Step 1: Discovery with Shodan</h3><p>The process starts with a user-defined Shodan query.</p><p>For example, a search could target specific manufacturers, industrial technologies, or web interfaces exposed to the internet.</p><p>The Python script uses the Shodan API to retrieve matching results, extracting:</p><ul><li>IP addresses</li><li>Service banners (limited to the first 50 characters in the current implementation)</li></ul><p>These results are exported to a temporary CSV file for further processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0k26k-rlZ4g3BlIDfPC4Sw.png" /><figcaption>shodan query example using shodan api</figcaption></figure><h3>Step 2: Network scanning with Nmap</h3><p>Once the initial targets have been collected, the next stage performs additional network reconnaissance.</p><p>For each discovered IP address, the script:</p><ol><li>Checks whether the host responds.</li><li>Performs service detection.</li><li>Extracts open ports, detected services, and available version information.</li><li>Stores the results in the SQLite database.</li></ol><p>Nmap XML output is parsed using Python’s XML processing capabilities before being inserted into the database.</p><p>This provides additional context beyond the information initially returned by Shodan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lU7sHXM4523cZsETBWiNkg.png" /><figcaption>nmap scan output saved to DB</figcaption></figure><h3>Step 3 : Device fingerprinting</h3><p>This is where the project starts bringing the collected information together.</p><p>I implemented a basic signature database containing information about several manufacturers and device categories.</p><p>Each entry can include:</p><ul><li>Manufacturer and device type</li><li>Associated banner keywords</li><li>Potential service characteristics</li><li>References to known exploit identifiers</li></ul><p>The fingerprinting mechanism compares the collected Shodan banner against these predefined keywords.</p><p>When a match is identified, the tool reports the corresponding manufacturer and device category.</p><p>Depending on the detected service and signature, it can also identify potential credential-validation or exploit-validation candidates.</p><p>At this stage, these matches should be considered <strong>indicators for further investigation, not proof of a vulnerable device</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yY_fjZSwBouxEKfpn43yBQ.png" /><figcaption>sample devices with default credentials and known exploits</figcaption></figure><h3>Step 4: Exploitation &amp; Validation</h3><p>This phase transitions from passive reconnaissance to active validation, executing targeted attacks based on the fingerprinting results from Step 3. The tool queries table2 for the target IP, extracting the discovered ports, services, and banners to determine the appropriate attack vector.</p><ol><li><strong>Credential-Based Validation (HTTP/SSH)</strong></li></ol><ul><li>The tool identifies if the service is HTTP or SSH.</li><li>It retrieves candidate credentials from table1, filtered by the specific banner keywords matched during fingerprinting.</li><li>Hydra is invoked to perform a login attack using these specific candidates.</li><li>If authentication succeeds, the exploit_status in table2 is updated to 1, and the valid username and password are persisted to the database record.</li></ul><p><strong>2. Protocol-Specific Exploitation</strong></p><ul><li>For non-standard services, the tool cross-references the detected service name and version against table1 to identify known vulnerabilities.</li><li>If a specific exploit identifier is found, the tool should execute the corresponding payload.</li><li>Upon successful exploitation, the exploit_status is updated to 1, documenting the specific vulnerability that was compromised.</li></ul><p>(This module is designed as a foundation block, allowing for the integration of external exploit repositories (e.g., exploit-db) and Metasploit scripting capabilities (Rex) for complex multi-stage attacks.)</p><h3>3. Database and project structure</h3><p>SQLite was chosen to keep the prototype lightweight and easy to experiment with.</p><p>The database currently contains two main tables:</p><ul><li>table1: Stores device signatures, manufacturers, banner keywords, and associated references (default credentials and some exploits).</li><li>table2: Stores discovered IP addresses, ports, services, versions, banners, and assessment status fields.</li></ul><p>This separation makes it possible to maintain a small reference database while progressively enriching the information collected during reconnaissance.</p><p>It also provides a foundation for future features, such as improved fingerprinting, vulnerability correlation, and structured reporting.</p><h3>4. Running the tool</h3><p>The main workflow is intentionally simple:</p><pre>./main.sh &quot;&lt;shodan_query&gt;&quot;</pre><p>The tool expects a configured Shodan API key through the SHODAN_API_KEY environment variable.</p><p>Python 3, SQLite, Nmap, and the required Shodan Python library must also be available.</p><p>The repository contains the scripts responsible for discovery, scanning, fingerprinting, database initialization, and additional experimental validation capabilities like basic attacks.</p><h3>5. Current limitations and next steps</h3><p>This project is still a proof of concept, rather than a production-ready security assessment tool.</p><p>Some of the current limitations include:</p><ul><li>Limited port coverage in the Nmap scanning stage.</li><li>Basic keyword-based fingerprinting, which can generate false positives.</li><li>A relatively small and manually populated device signature database.</li><li>No automated correlation with vulnerability databases.</li><li>No centralized reporting or visualization interface.</li><li>Exploitation phase: login attacks works for ssh and http (should develop http part to adapt to different type of forms). Service exploitation should include an exploit db (or point to a one), possibility to use metasploit framework scripting capabilities.</li></ul><p>There are several directions I would like to explore next:</p><ul><li>Expanding the device fingerprinting database.</li><li>Integrating CVE and vulnerability intelligence sources.</li><li>Improving service detection and fingerprint accuracy.</li><li>Introducing structured reports and a more accessible interface.</li></ul><h3>Conclusion</h3><p>One of the most interesting aspects of this experiment is how accessible the initial reconnaissance stages can be.</p><p>With a few existing tools, a public intelligence source, and some automation, it is possible to narrow down a large internet-facing attack surface into a much smaller set of systems that deserve further investigation.</p><p>For industrial environments, this raises an important security consideration: <strong>visibility is the first step towards understanding exposure.</strong></p><p>This project is still evolving, and I am sharing it as a learning exercise and a starting point for further development.</p><p>The code and implementation are available on <a href="https://github.com/mohamad522/ics-ot-recon">GitHub</a>. Feedback, suggestions, and contributions are welcome.</p><p><strong>That’s it for this first look into ICS/OT security. More experiments, improvements, and technical deep dives to come. Until next time!</strong></p><p><em>Note: This tool is intended for educational research and authorized security assessments only. Identifying an exposed system does not establish authorization to scan, test credentials, or execute exploits against it.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1098302eb61c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>