<?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 MikiVirus on Medium]]></title>
        <description><![CDATA[Stories by MikiVirus on Medium]]></description>
        <link>https://medium.com/@mumairs3636?source=rss-ab4986b029b2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Inhedgd6kYHgvwJOMSHOZg.jpeg</url>
            <title>Stories by MikiVirus on Medium</title>
            <link>https://medium.com/@mumairs3636?source=rss-ab4986b029b2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 23:10:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mumairs3636/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[Industrial Control Systems (ICS) and SCADA Pentesting]]></title>
            <link>https://medium.com/@mumairs3636/industrial-control-systems-ics-and-scada-pentesting-7ad62a92723c?source=rss-ab4986b029b2------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ad62a92723c</guid>
            <category><![CDATA[ics-pentesting]]></category>
            <category><![CDATA[iot-security-industry]]></category>
            <category><![CDATA[scada-cyber-security]]></category>
            <category><![CDATA[black-box-testing]]></category>
            <category><![CDATA[scada]]></category>
            <dc:creator><![CDATA[MikiVirus]]></dc:creator>
            <pubDate>Thu, 05 Jun 2025 22:40:53 GMT</pubDate>
            <atom:updated>2025-06-05T22:40:53.418Z</atom:updated>
            <content:encoded><![CDATA[<p>Industrial Control Systems (ICS) are integrated combinations of controllers, PLCs, HMIs, sensors and network devices used to automate and control physical processes. They appear in many industries — manufacturing plants, power generation, water/wastewater, oil &amp; gas, transportation, etc. — and often span wide areas (e.g. power grid or pipelines) using SCADA (Supervisory Control and Data Acquisition) systems. Because ICS devices directly manage physical machinery, they have unique security concerns: the focus is on safety and continuous operation. Historically ICS networks were “air-gapped,” but modern digital/Internet connectivity has made them exposed to cyber threats. Attacks on ICS can have severe consequences — for example, the Stuxnet worm (2010) halted an Iranian nuclear program, and the 2021 Colonial Pipeline attack disrupted fuel supply. In short, ICS security is critical because breaches can cause operational downtime, physical damage or safety hazards. (SCADA is technically a subset of ICS, focused on remote monitoring of dispersed assets, but the terms are often used together.)</p><h3>Pentesting Methodology: Phases Aligned to MITRE ATT&amp;CK ICS</h3><p>A <strong>black-box ICS pentest</strong> proceeds step-by-step like a standard network pentest, but must account for ICS uniqueness. The MITRE ATT&amp;CK for ICS framework describes relevant tactics (Reconnaissance, Discovery, Initial Access, Lateral Movement, Persistence, Collection, Impact, etc. — see Nozomi Networks’ summary). We will follow these phases: <strong>Reconnaissance</strong>, <strong>Enumeration</strong>, <strong>Initial Access</strong>, <strong>Lateral Movement</strong>, <strong>Persistence</strong>, and <strong>Exfiltration/Collection</strong>, each with ICS-specific focus. Throughout, always be mindful that ICS devices are fragile; tests must be <em>safe</em> and non-disruptive (see “Safety” section).</p><h3>Reconnaissance</h3><ul><li><strong>Goal:</strong> Map the ICS network and gather information without touching devices. This can include passive discovery of network architecture, device types, and potential entry points.</li><li><strong>Techniques:</strong> Look for network diagrams, vendor equipment lists, engineering documentation, Internet-exposed services, personnel (via LinkedIn, etc.). Use public sources (DNS records, Shodan/Censys, corporate websites) to identify IPs and technologies. Even project documentation or ICS standards (IEC, ISA) can give clues about deployed systems.</li><li><strong>Tools/Commands:</strong></li><li>Standard <em>IT</em> tools like whois, nslookup, and web searches for known assets (e.g. search for “PLC vendor HMI” plus company name). <a href="http://shodan.io/">Shodan.io</a> (free tier) can reveal internet-connected ICS gear.</li><li><strong>Network scanning:</strong> Perform <em>safe</em> network scans (e.g. ping sweeps, low-and-slow TCP/UDP scans) to detect live hosts. Focus on ICS-specific ports: Modbus/TCP (port 502), Siemens S7comm (102), EtherNet/IP (44818/UDP), DNP3 (20000), BACnet/IP (47808), Profinet (34964), etc. For example, using Nmap:nmap -sU -p 502 --script modbus-discover.nse &lt;target-IP&gt; nmap -sV -p 102 --script s7-info.nse &lt;target-IP&gt;</li><li>These commands use Nmap’s ICS NSE scripts to identify Modbus slaves and Siemens S7 PLCs. Scanning these known ports helps locate ICS devices and often pulls basic device info (vendor, model, firmware) that aids later attacks.</li><li><strong>Safety Notes:</strong> Use non-invasive scans. For example, avoid NSE scripts marked [intrusive] on live systems. Always scan in maintenance windows and verify that scanning won’t trigger alarms or safety trips.</li></ul><h3>Enumeration (Discovery)</h3><ul><li><strong>Goal:</strong> Probe discovered devices/services to learn details (protocols, firmware, user accounts) without yet exploiting vulnerabilities.</li><li><strong>Techniques:</strong> Once ICS hosts are identified, query them using protocol-specific tools: read device IDs, firmware versions, tag names, etc. Examine any available services (web interfaces, Telnet/SSH, SNMP) for weak/default credentials. Catalog network segmentation, VLANs and firewalls in place.</li><li><strong>Tools/Commands:</strong></li><li><strong>Nmap/Zenmap:</strong> In addition to discovery scripts, use A (aggressive) and -script=safe options carefully. For example:</li><li>nmap -sV -p 44818 --script enip-info.nse &lt;target-IP&gt;(enip-info for EtherNet/IP).</li><li><strong>Modbus utilities:</strong> Tools like mbpoll or modbus-cli (open-source) let you query Modbus registers. E.g. mbpoll -m tcp -a 1 &lt;IP&gt; to read holding registers, which can reveal sensor values or device status.</li><li><strong>Snap7/s7cmd:</strong> For Siemens S7 PLCs, use Snap7 library (Python or C) or tools like s7scan/s7querty to read PLC information (some PLCs allow reading block lists).</li><li><strong>Packet capture:</strong> Use Wireshark or Tshark with ICS protocol dissectors to sniff legitimate traffic (e.g. between PLCs and HMIs) and extract details (tag names, vendor names, process values). This passive method is very safe if you have a network tap.</li><li><strong>Nmap NSE examples:</strong> The modbus-discover.nse script enumerates Modbus slave IDs and device IDs. Example output shows slave IDs and vendor strings:</li></ul><pre>nmap ... -p502 --script modbus-discover.nse &lt;host&gt; 502/tcp open  modbus | modbus-discover: |   sid 0x64: Slave ID data: Schneider Electric PM710 PowerMeter ... ```. Similarly, `s7-info.nse` on port 102 yields PLC model and serial. Leverage these to fingerprint ICS assets.</pre><ul><li><strong>Key Points:</strong> Document everything (IP, port, device type). Verify segmentation: ICS zones often follow the Purdue model (Level 3–5 for IT, Level 0–2 for OT). Do <em>not</em> write any configuration or send commands that change state. Use only read commands at this stage.</li></ul><h3>Initial Access</h3><ul><li><strong>Goal:</strong> Gain a foothold inside the ICS network or device. In a black-box test, this often means exploiting an exposed interface, default credentials, or weak service.</li><li><strong>Techniques:</strong> Attempt to leverage publicly accessible management interfaces (VPNs, remote HMIs) or known ICS vulnerabilities. Try manufacturer <em>default or hardcoded credentials</em> on devices (e.g. default PLC passwords). If there are Windows/Linux hosts (engineering stations, HMIs), treat them like IT targets: exploit vulnerabilities or use phishing/lateral phishing if in scope.</li><li><strong>Tools/Commands:</strong></li><li><strong>Password guessing:</strong> Tools like hydra or medusa can test default creds on Telnet/SSH or web logins. For example, if an HMI runs SSH, try hydra -l admin -P passwords.txt ssh://&lt;hmi-ip&gt; (ensure this is allowed in scope and safe). Always throttle attempts to avoid locking accounts.</li><li><strong>Exploitation frameworks:</strong> Metasploit or ICS-specific frameworks (e.g. ISF — Industrial Exploitation Framework, ISEF) have modules for some ICS products. For example, Metasploit’s pcworx_hmi_shell module exploits an old Inductive Automation FactoryTalk vulnerability. Use caution: prefer non-disruptive exploits (try vulnerability checks only).</li><li><strong>Software APIs:</strong> Some ICS software exposes APIs or scripting (e.g. OPC UA methods). Tools like ncat or custom Python/PowerShell with opcua libraries can probe these for default accounts.</li><li><strong>MITRE Alignment:</strong> Attacks may include <strong>Drive-by/Phishing</strong> (compromising an engineering PC), <strong>Exploit Public-Facing Application</strong> (web HMI vulnerabilities), or <strong>Default/Hardcoded Credentials</strong> (T0812/T0891). Use found credentials to log into devices.</li></ul><h3>Lateral Movement</h3><ul><li><strong>Goal:</strong> From the initial foothold, move deeper into the ICS network or to higher-privilege devices. Often this means pivoting across network zones or between OT segments.</li><li><strong>Techniques:</strong> After compromising one device, use it to attack others. This may involve ARP poisoning or network proxying to intercept ICS traffic (Adversary-in-the-Middle). If you control a Windows host, use netsh to add a route or port-forward to reach PLC subnets. Use any “trust” relationships (like OPC or database connectivity) to hop.</li><li><strong>Tools/Commands:</strong></li><li><strong>Proxy and pivot tools:</strong> Tools like socat or SSH local/remote forwarding can proxy connections. For example, SSH an engineering box to your machine and forward a port:</li></ul><pre>ssh -L 502:PLC-IP:502 user@eng-machine</pre><ul><li><strong>Exploitation from inside:</strong> Rerun the Enumeration tools (nmap NSE scripts, Snap7, etc.) from the compromised host or network segment to discover new ICS targets. You may also try exploit tools again if appropriate (e.g. mbpoll to write to a Modbus register if safe/authorized).</li><li><strong>MITRE Alignment:</strong> Techniques like <strong>Adversary-in-the-Middle</strong> (arp spoofing) and <strong>Connection Proxy</strong> (using intermediate systems to reach other segments) are common in ICS lateral movement. Always check segmentation barriers: ICS networks often use firewalls/DMZs per the Purdue model, so lateral moves may require additional vulnerability or credentials to cross.</li></ul><h3>Persistence</h3><ul><li><strong>Goal:</strong> Establish a way to maintain access even if devices reboot or passwords change. This often means altering the control logic or firmware of ICS devices, rather than just dropping files on a workstation.</li><li><strong>Techniques:</strong> Modify the controller logic or firmware so that the system continues to operate while the attacker’s presence is hidden. Examples include injecting malicious code into PLC programs, altering startup scripts on HMIs, or creating new administrative accounts in ICS software.</li><li><strong>Tools/Commands:</strong></li><li><strong>PLC Programming tools:</strong> If you have captured a PLC’s programming software or project files, you might attempt to modify them. (In practice, this is highly delicate: e.g. replacing a ladder logic program with a backdoored version). Tools like <strong>AttkFinder</strong> (for IEC 61131–3 code analysis) or vendor PLC software (CodeSys, TIA Portal) could be used to craft a new program.</li><li><strong>Firmware flashing:</strong> Some modular ICS devices allow firmware upload over the network. If you can access the update function (perhaps via a web interface or engineering station), you could upload a malicious firmware image. This is covered by MITRE’s “Module Firmware” (T0839) technique.</li><li><strong>Credential persistence:</strong> Steal or set <em>valid accounts</em> that survive reboots (MITRE T0859). For example, copy the contents of a configured user database from a PLC or HMI so you can restore your access later.</li><li><strong>MITRE Alignment:</strong> Adversaries may <strong>Modify Programs</strong> on controllers (T0889) or perform <strong>Project File Infection</strong> by injecting malicious code into engineering project files. They also rely on <strong>Valid Accounts</strong> (T0859) by capturing or creating user credentials. Persistence steps must be tested with extreme care — even small mistakes can disrupt real systems.</li></ul><h3>Exfiltration / Collection</h3><ul><li><strong>Goal:</strong> Extract useful data from the ICS environment (e.g. configuration files, schematics, logs, or proprietary logic code) without detection. In ICS, this often means copying engineering documents or sensor data that could aid an attacker or meet the test’s objectives.</li><li><strong>Techniques:</strong> Identify where sensitive information resides. This could be on engineering workstations (project files, HMI screens), historians/SQL servers (process data logs), or even in PLC configuration files. Collection may involve downloading files over network shares, copying via compromised USB keys, or tunneling data out through compromised gateways.</li><li><strong>Tools/Commands:</strong></li><li>Standard file transfer tools (if network access is available): e.g. scp or SMB copies, as with any environment. For example: scp admin@hmi:/opt/hmi/config/* localdir/.</li><li>ICS protocol data: If an asset sends telemetry to a central system, tools like Wireshark can capture that traffic. Also, some ICS protocols (like OPC UA) allow reading data values; a script could periodically read and save PLC tags.</li><li><strong>MITRE Data Exfiltration (ICS):</strong> MITRE ICS includes techniques <strong>Data from Information Repositories</strong> and <strong>Data from Local System</strong>. This means grabbing things like engineering diagrams, PLC code, sensor I/O logs, etc. For example, ICS reference manuals or PLC tag databases often live on file shares — find and copy them. MITRE notes collecting “specifications, schematics, diagrams” from ICS hosts as a goal.</li><li><strong>Safety Note:</strong> Ensure exfiltration does not affect control logic or process timing (e.g. don’t overload a PLC with configuration reads). Use quiet channels (e.g. a VPN tunnel over an allowed port) and exfiltrate small increments if necessary.</li></ul><h3>Safety and Do’s vs Don’ts in ICS Testing</h3><ul><li><strong>Do plan thoroughly:</strong> Coordinate with OT engineers. Define a strict scope and rollback plan. Schedule tests during <em>approved maintenance windows</em> only. Ensure backups are available.</li><li><strong>Do use non-intrusive methods first:</strong> Favor passive monitoring and simulation. If possible, test against a replica or honeypot. Use tools marked “safe” (for instance, Nmap’s safe NSE category) and low-intensity scans. Simulations or “dry runs” can help predict impact.</li><li><strong>Do monitor the process:</strong> Have operators on standby. Watch for any alarms or abnormal behavior when running scans or exploits. Immediately stop if a device misbehaves (PLC stops scanning, HMI crashes, etc.).</li><li><strong>Don’t cause downtime:</strong> Never send control commands that could actuate equipment (e.g. open a valve, change setpoints) unless explicitly allowed. Avoid firmware updates or resets on production devices. In particular, <em>avoid Denial-of-Service</em> on ICS devices, as that can halt processes.</li><li><strong>Don’t brute-force in production:</strong> Repeated login attempts might trigger lockouts or block remote access. Test credential brute-forcing only in lab setups or with permission.</li><li><strong>Don’t assume resets are safe:</strong> Many ICS devices do not handle crashes gracefully; a single malformed packet can crash a PLC. Use out-of-band testing where possible (e.g. against simulators or during a power-down).</li><li><strong>Do use lab environments first:</strong> Before touching real systems, validate your tools and techniques in a lab (see below). The Redbot ICS guide warns that <em>“SCADA networks are sensitive”</em> and you should “thoroughly investigate and test any tools in a lab”. Always prioritize safety: ICS tests should carry “negligible risk of service disruption”.</li></ul><h3>Lab and Simulation Environment Setup</h3><p>Testing ICS tools and techniques safely requires a dedicated lab or honeypot environment. Several open-source projects allow you to replicate ICS networks:</p><ul><li><strong>Conpot (ICS Honeypot):</strong> An open-source ICS honeypot that simulates PLC/RTU devices supporting many protocols (Modbus, BACnet, IEC 60870–5–104, S7comm, etc.). Conpot presents realistic device IDs and data, making it useful to learn reconnaissance and scanning. (It is <strong>safe</strong> since it’s just software emulating devices). Conpot can also run on Raspberry Pi or Docker.</li><li><strong>CryPLH:</strong> A honeypot that simulates a Siemens S7–300 PLC. It provides a web interface (MiniWeb) and SNMP, mimicking Siemens PLC behavior. This lets you safely practice S7 attacks (e.g. using the Snap7 library) without touching real hardware.</li><li><strong>XPot:</strong> Another PLC honeypot focused on Siemens devices (S7comm). Like Conpot, it can be used to test Nmap s7-info, PLCscan, or custom exploits against a pretend PLC environment.</li><li><strong>OpenPLC:</strong> An <strong>open-source</strong> PLC runtime and IDE that follows IEC-61131–3 standards. You can install the OpenPLC Runtime on a PC or Raspberry Pi, write simple ladder or C programs, and interact with them over Modbus/TCP. This is excellent for writing and testing safe “PLC code” and learning how PLCs respond. The <a href="https://openplcproject.com/">Autonomy OpenPLC</a> project provides a GUI and code examples.</li><li><strong>MiniCPS / Simulator Frameworks:</strong> Projects like MiniCPS or Power TAC simulate both control logic and physical processes (e.g. water tank level). These allow end-to-end testing of ICS attacks in Python. (Search GitHub for “MiniCPS”).</li><li><strong>Vendor Simulators:</strong> Many PLC vendors offer free (or demo) simulators: for example, Siemens PLCSIM (part of TIA Portal demo) or Schneider Electric Virtual PLC. These closed-source tools can simulate actual hardware, useful if you have access.</li><li><strong>Network Emulators:</strong> Use tools like GNS3 or Cisco Packet Tracer to model ICS network topology (firewalls, switches). Then connect your virtual ICS devices (above) to build a lab that reflects production segmentation.</li><li><strong>Honey Pots and References:</strong> In addition to Conpot/CryPLH, projects like Honeyd or Digital Bond’s GazingCoyote can emulate ICS assets. INCIBE’s ICS deception blog lists Conpot, XPOT, and CryPLH as examples. (They simulate IEC-104, Modbus, etc. safely.)</li></ul><p>In sum, <strong>build a complete isolated lab</strong>: include a mix of emulated PLCs, HMIs (e.g. a simple web HMI interface), historians or SCADA software (open-source alternatives: ScadaBR or Ignition Demo), and segmentation devices. This way you can try out commands (e.g. writing to a fake Modbus register) without risk.</p><h3>Learning Path: From Basics to Advanced</h3><p>Becoming proficient in ICS security involves both understanding control systems and practicing attacks in a safe environment. A recommended learning path:</p><ul><li><strong>Begin with ICS Fundamentals:</strong> Learn how control systems work. Study PLC basics and industrial protocols. Free resources include <em>The PLC Professor</em> videos or the DOE Energy 101 series on specific industries. Understand the <em>mission</em> of ICS — e.g. water treatment, power generation — so you appreciate why uptime matters.</li><li><strong>Study ICS vs IT Security Differences:</strong> Read material (like the Palo Alto and Bitsight content above) to grasp how ICS goals (safety, reliability) differ from IT. SANS offers ICS courses (ICS410, ICS455) that teach these fundamentals.</li><li><strong>Hands-On Practice:</strong> Set up your own lab using the tools above (Conpot, OpenPLC, etc.). Start with basic scanning and monitoring in the lab. For example, practice Nmap NSE scripts on Conpot. Gradually introduce real ICS software — program a ladder logic in OpenPLC and see how Modbus reads change.</li><li><strong>ICS Capture-the-Flag (CTF) and Challenges:</strong> Participate in ICS-specific CTFs. Organizations like the ICS Village (at S4, DEF CON ICS Village, etc.) run ICS CTF competitions. These often provide downloadable scenarios (e.g. simulated water plant) and write-ups. Exercism sites like <strong>Tennessee Valley Authority ICS-CERT Hacking Challenge</strong> or <strong>DOSBox Lab</strong> can be very instructive.</li><li><strong>Structured Training:</strong> Take advantage of free and paid courses: CISA/INL provides <strong>free ICS courses</strong> (ICS300, ICS400, etc.). SANS offers in-depth ICS pentesting classes (with hands-on labs). Also explore online cyber ranges (ICS-focused) if available.</li><li><strong>Community Resources:</strong> Follow blogs and repositories. The <em>ICS-Community</em> site (formerly <a href="http://scadahacker.com/">scadahacker.com</a>, now <a href="http://icscsi.org/">icscsi.org</a>) collects papers, tool lists, and training info. The GitHub “awesome-industrial-control-system-security” list is a curated set of tools and references. Reading research papers on ICS vulnerabilities (e.g. HMI vulnerabilities) builds insight.</li><li><strong>Certifications:</strong> Consider certification paths like GIAC GICSP (Global Industrial Cyber Security Professional) to validate knowledge. Vendor training (e.g. Siemens, Schneider Electric courses) can also help understand proprietary products.</li><li><strong>Advanced Practice:</strong> Finally, design and attack a full ICS scenario. Build or download a complete virtual plant (e.g. OpenPLC + Node-RED + database) and try end-to-end attack chains: from network breach to PLC reprogramming and data theft. Review MITRE ATT&amp;CK for ICS techniques along the way to make sure you cover all stages.</li></ul><p>By progressing from fundamental concepts to hands-on labs, and leveraging the wealth of (mostly free) ICS training material out there, a penetration tester can develop expertise in OT security. Always remember to <strong>test only on safe environments or with full authorization</strong>, as ICS systems must remain reliable above all.</p><p><strong>Sources:</strong> Industry publications and frameworks have informed this guide, as well as resources like Bitsight, Palo Alto Networks, MITRE ATT&amp;CK for ICS, and Redbot Security’s ICS testing guide.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ad62a92723c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>