[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7AA7B7SS5FHZ6PRZ23YX56A":3,"skill-same:01M7AA7B7SS5FHZ6PRZ23YX56A":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":14,"repositoryHtmlUrl":52,"repositoryHomepageUrl":6,"ownerHtmlUrl":53,"ownerBlogUrl":6,"ownerDescription":54,"updatedAt":55,"install":56,"resources":69},"01M7AA7B7SS5FHZ6PRZ23YX56A","performing-plc-firmware-security-analysis",null,"This skill covers analyzing Programmable Logic Controller (PLC) firmware for security vulnerabilities including hardcoded credentials, insecure update mechanisms, backdoor functions, memory corruption flaws, and undocumented debug interfaces. It addresses firmware extraction from common PLC platforms (Siemens S7, Allen-Bradley, Schneider Modicon), static analysis of firmware images, dynamic analysis in emulated environments, and comparison against known-good baselines to detect tampering.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-plc-firmware-security-analysis\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-plc-firmware-security-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-plc-firmware-security-analysis\ndescription: 'This skill covers analyzing Programmable Logic Controller (PLC) firmware\n  for security vulnerabilities including hardcoded credentials, insecure update mechanisms,\n  backdoor functions, memory corruption flaws, and undocumented debug interfaces.\n  It addresses firmware extraction from common PLC platforms (Siemens S7, Allen-Bradley,\n  Schneider Modicon), static analysis of firmware images, dynamic analysis in emulated\n  environments, and comparison against known-good baselines to detect tampering.\n\n  '\ndomain: cybersecurity\nsubdomain: ot-ics-security\ntags:\n- ot-security\n- ics\n- scada\n- industrial-control\n- iec62443\n- firmware-analysis\n- plc-security\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-05\n- GV.OC-02\nmitre_attack:\n- T1078\n- T1190\n- T1059\n- T1003\n- T1110\n---\n\n# Performing PLC Firmware Security Analysis\n\n## When to Use\n\n- When assessing PLC security as part of an IEC 62443 component security evaluation (IEC 62443-4-2)\n- When validating firmware integrity after a suspected compromise or supply chain attack\n- When evaluating the security of a new PLC platform before deployment in critical infrastructure\n- When performing vulnerability research on industrial control system devices in an authorized lab\n- When responding to an incident where PLC logic or firmware tampering is suspected\n\n**Do not use** on live production PLCs without explicit authorization and safety controls in place. Firmware extraction and analysis should be performed on lab devices or offline backups. Never upload PLC firmware to public analysis services. See performing-ics-penetration-testing for authorized live testing procedures.\n\n## Prerequisites\n\n- Isolated lab environment with the target PLC hardware or an emulated environment\n- PLC programming software for the target platform (Siemens TIA Portal, Rockwell Studio 5000, Schneider EcoStruxure)\n- Firmware extraction tools (binwalk, firmware-mod-kit, JTAG\u002FSWD debugger)\n- Static analysis tools (Ghidra, IDA Pro, Binary Ninja with ARM\u002FMIPS\u002FPowerPC support)\n- Understanding of PLC architecture (real-time OS, ladder logic execution, I\u002FO scanning)\n- Reference copy of known-good firmware for integrity comparison\n\n## Workflow\n\n### Step 1: Acquire PLC Firmware for Analysis\n\nExtract or obtain PLC firmware through authorized methods. This can be done by downloading from the vendor, extracting from a lab device, or obtaining from a project backup.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"PLC Firmware Acquisition and Integrity Verification.\n\nSupports firmware extraction from project files, network downloads,\nand binary image comparison against known-good baselines.\n\"\"\"\n\nimport hashlib\nimport json\nimport os\nimport struct\nimport sys\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\n\n\nclass PLCFirmwareAcquisition:\n    \"\"\"Handles PLC firmware acquisition from various sources.\"\"\"\n\n    def __init__(self, output_dir=\"firmware_analysis\"):\n        self.output_dir = Path(output_dir)\n        self.output_dir.mkdir(exist_ok=True)\n        self.manifest = {\n            \"acquisition_date\": datetime.now().isoformat(),\n            \"firmware_samples\": [],\n        }\n\n    def extract_from_siemens_project(self, project_path):\n        \"\"\"Extract firmware\u002Fprogram blocks from Siemens TIA Portal project.\n\n        TIA Portal projects (.ap16\u002F.ap17) are ZIP archives containing\n        XML-encoded PLC program blocks and system configuration.\n        \"\"\"\n        print(f\"[*] Analyzing Siemens project: {project_path}\")\n        results = {\"platform\": \"Siemens\", \"blocks\": []}\n\n        if zipfile.is_zipfile(project_path):\n            with zipfile.ZipFile(project_path, \"r\") as zf:\n                for info in zf.infolist():\n                    # Program blocks are stored as XML in specific paths\n                    if \"ProgramBlocks\" in info.filename or \"SystemBlocks\" in info.filename:\n                        block_data = zf.read(info.filename)\n                        block_hash = hashlib.sha256(block_data).hexdigest()\n\n                        block_path = self.output_dir \u002F info.filename.replace(\"\u002F\", \"_\")\n                        block_path.write_bytes(block_data)\n\n                        results[\"blocks\"].append({\n                            \"name\": info.filename,\n                            \"size\": info.file_size,\n                            \"sha256\": block_hash,\n                            \"extracted_to\": str(block_path),\n                        })\n                        print(f\"  [+] Extracted: {info.filename} ({info.file_size} bytes)\")\n\n        self.manifest[\"firmware_samples\"].append(results)\n        return results\n\n    def extract_from_rockwell_project(self, acd_path):\n        \"\"\"Extract program data from Rockwell Studio 5000 ACD file.\n\n        ACD files contain controller program, tags, and configuration.\n        \"\"\"\n        print(f\"[*] Analyzing Rockwell project: {acd_path}\")\n        results = {\"platform\": \"Rockwell\u002FAllen-Bradley\", \"blocks\": []}\n\n        with open(acd_path, \"rb\") as f:\n            header = f.read(256)\n            # ACD files have a specific signature\n            if b\"RSLogix\" in header or b\"Studio 5000\" in header:\n                f.seek(0)\n                full_data = f.read()\n                file_hash = hashlib.sha256(full_data).hexdigest()\n\n                results[\"blocks\"].append({\n                    \"name\": os.path.basename(acd_path),\n                    \"size\": len(full_data),\n                    \"sha256\": file_hash,\n                    \"header_signature\": header[:16].hex(),\n                })\n                print(f\"  [+] Project hash: {file_hash}\")\n\n        self.manifest[\"firmware_samples\"].append(results)\n        return results\n\n    def compute_firmware_hash(self, firmware_path):\n        \"\"\"Compute multiple hashes of a firmware image for integrity tracking.\"\"\"\n        data = Path(firmware_path).read_bytes()\n        return {\n            \"file\": str(firmware_path),\n            \"size\": len(data),\n            \"md5\": hashlib.md5(data).hexdigest(),\n            \"sha256\": hashlib.sha256(data).hexdigest(),\n            \"sha512\": hashlib.sha512(data).hexdigest(),\n        }\n\n    def compare_firmware_integrity(self, current_fw, baseline_fw):\n        \"\"\"Compare current firmware against known-good baseline.\"\"\"\n        current_hash = self.compute_firmware_hash(current_fw)\n        baseline_hash = self.compute_firmware_hash(baseline_fw)\n\n        match = current_hash[\"sha256\"] == baseline_hash[\"sha256\"]\n\n        result = {\n            \"comparison_date\": datetime.now().isoformat(),\n            \"current_firmware\": current_hash,\n            \"baseline_firmware\": baseline_hash,\n            \"integrity_match\": match,\n            \"verdict\": \"PASS - Firmware matches baseline\" if match else \"FAIL - Firmware modified!\",\n        }\n\n        if not match:\n            # Find the offset where files diverge\n            current_data = Path(current_fw).read_bytes()\n            baseline_data = Path(baseline_fw).read_bytes()\n            min_len = min(len(current_data), len(baseline_data))\n\n            first_diff = None\n            diff_count = 0\n            for i in range(min_len):\n                if current_data[i] != baseline_data[i]:\n                    if first_diff is None:\n                        first_diff = i\n                    diff_count += 1\n\n            result[\"first_difference_offset\"] = f\"0x{first_diff:08x}\" if first_diff else None\n            result[\"total_different_bytes\"] = diff_count\n            result[\"size_difference\"] = len(current_data) - len(baseline_data)\n\n        return result\n\n    def save_manifest(self):\n        \"\"\"Save acquisition manifest.\"\"\"\n        manifest_path = self.output_dir \u002F \"acquisition_manifest.json\"\n        with open(manifest_path, \"w\") as f:\n            json.dump(self.manifest, f, indent=2)\n        print(f\"\\n[*] Manifest saved: {manifest_path}\")\n\n\nif __name__ == \"__main__\":\n    acq = PLCFirmwareAcquisition()\n\n    if len(sys.argv) \u003C 2:\n        print(\"Usage:\")\n        print(\"  python process.py extract-siemens \u003Cproject.ap17>\")\n        print(\"  python process.py extract-rockwell \u003Cproject.acd>\")\n        print(\"  python process.py compare \u003Ccurrent.bin> \u003Cbaseline.bin>\")\n        sys.exit(1)\n\n    cmd = sys.argv[1]\n    if cmd == \"extract-siemens\" and len(sys.argv) > 2:\n        acq.extract_from_siemens_project(sys.argv[2])\n    elif cmd == \"extract-rockwell\" and len(sys.argv) > 2:\n        acq.extract_from_rockwell_project(sys.argv[2])\n    elif cmd == \"compare\" and len(sys.argv) > 3:\n        result = acq.compare_firmware_integrity(sys.argv[2], sys.argv[3])\n        print(json.dumps(result, indent=2))\n    else:\n        print(\"Invalid command\")\n        sys.exit(1)\n\n    acq.save_manifest()\n```\n\n### Step 2: Perform Static Analysis of Firmware Image\n\nUse binwalk for firmware unpacking and Ghidra for disassembly to identify security issues in the firmware binary.\n\n```bash\n# Step 2a: Unpack firmware image with binwalk\nbinwalk -e firmware.bin\n# Output: _firmware.bin.extracted\u002F\n\n# Identify firmware components\nbinwalk firmware.bin\n# Look for: file system images, compressed sections, bootloader, RTOS kernel\n\n# Extract strings for credential and configuration analysis\nstrings -n 8 firmware.bin > firmware_strings.txt\n\n# Search for hardcoded credentials\ngrep -iE \"(password|passwd|pwd|secret|key|credential|login|admin|root)\" firmware_strings.txt\n\n# Search for network configuration\ngrep -iE \"(http|ftp|telnet|ssh|snmp|modbus|192\\.168|10\\.|172\\.)\" firmware_strings.txt\n\n# Search for debug\u002Fbackdoor indicators\ngrep -iE \"(debug|backdoor|test_mode|factory|service_port|hidden)\" firmware_strings.txt\n\n# Search for cryptographic material\ngrep -iE \"(BEGIN RSA|BEGIN CERTIFICATE|AES|DES|private.key)\" firmware_strings.txt\n\n# Step 2b: Entropy analysis to detect encrypted\u002Fcompressed sections\nbinwalk -E firmware.bin\n# High entropy sections may contain encrypted payloads or compressed data\n\n# Step 2c: Analyze with Ghidra (headless mode)\nanalyzeHeadless \u002Ftmp\u002Fghidra_project PLC_FW \\\n  -import firmware.bin \\\n  -processor ARM:LE:32:Cortex \\\n  -postScript FindCryptoConstants.java \\\n  -postScript FindHardcodedStrings.java \\\n  -log \u002Ftmp\u002Fghidra_analysis.log\n```\n\n### Step 3: Analyze PLC Communication Stack Security\n\nExamine how the PLC handles industrial protocol requests, focusing on authentication bypass, buffer overflows in packet parsing, and command injection vulnerabilities.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"PLC Protocol Security Analyzer.\n\nTests PLC protocol implementation for common vulnerabilities\nincluding authentication bypass, malformed packet handling,\nand function code access control.\n\nWARNING: Only run against lab\u002Ftest PLCs, never production systems.\n\"\"\"\n\nimport socket\nimport struct\nimport sys\nimport time\nfrom dataclasses import dataclass\n\n\n@dataclass\nclass ProtocolTestResult:\n    test_name: str\n    target: str\n    protocol: str\n    result: str  # PASS, FAIL, ERROR\n    severity: str\n    detail: str\n\n\nclass ModbusSecurityTester:\n    \"\"\"Tests Modbus\u002FTCP implementation security.\"\"\"\n\n    def __init__(self, target_ip, target_port=502):\n        self.target = target_ip\n        self.port = target_port\n        self.results = []\n\n    def _send_modbus(self, unit_id, func_code, data=b\"\"):\n        \"\"\"Send a Modbus\u002FTCP request and return response.\"\"\"\n        # MBAP Header: transaction_id(2) + protocol_id(2) + length(2) + unit_id(1)\n        mbap = struct.pack(\">HHHB\", 0x0001, 0x0000, len(data) + 2, unit_id)\n        pdu = struct.pack(\"B\", func_code) + data\n\n        try:\n            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n            sock.settimeout(5)\n            sock.connect((self.target, self.port))\n            sock.send(mbap + pdu)\n            response = sock.recv(1024)\n            sock.close()\n            return response\n        except Exception as e:\n            return None\n\n    def test_authentication_required(self):\n        \"\"\"Test if PLC requires authentication for read\u002Fwrite operations.\"\"\"\n        # Test unauthenticated read\n        read_data = struct.pack(\">HH\", 0, 10)  # Read 10 registers from address 0\n        response = self._send_modbus(1, 3, read_data)\n\n        if response and len(response) > 8 and response[7] != 0x83:\n            self.results.append(ProtocolTestResult(\n                test_name=\"Modbus Authentication - Read\",\n                target=self.target,\n                protocol=\"Modbus\u002FTCP\",\n                result=\"FAIL\",\n                severity=\"high\",\n                detail=\"PLC accepts unauthenticated Modbus read commands. No authentication required.\",\n            ))\n\n        # Test unauthenticated write\n        write_data = struct.pack(\">HH\", 100, 0)  # Write 0 to register 100\n        response = self._send_modbus(1, 6, write_data)\n\n        if response and len(response) > 8 and response[7] != 0x86:\n            self.results.append(ProtocolTestResult(\n                test_name=\"Modbus Authentication - Write\",\n                target=self.target,\n                protocol=\"Modbus\u002FTCP\",\n                result=\"FAIL\",\n                severity=\"critical\",\n                detail=\"PLC accepts unauthenticated Modbus WRITE commands. Any host can modify registers.\",\n            ))\n\n    def test_function_code_access_control(self):\n        \"\"\"Test if PLC restricts dangerous function codes.\"\"\"\n        dangerous_funcs = {\n            8: \"Diagnostics (can restart communications)\",\n            17: \"Report Slave ID (information disclosure)\",\n            43: \"Encapsulated Interface Transport (device identification)\",\n        }\n\n        for fc, desc in dangerous_funcs.items():\n            response = self._send_modbus(1, fc, b\"\\x00\\x00\")\n            if response and len(response) > 8:\n                error_code = response[7]\n                if error_code != (fc | 0x80):  # Not an exception response\n                    self.results.append(ProtocolTestResult(\n                        test_name=f\"Function Code Access - FC{fc}\",\n                        target=self.target,\n                        protocol=\"Modbus\u002FTCP\",\n                        result=\"FAIL\",\n                        severity=\"medium\",\n                        detail=f\"PLC responds to FC{fc} ({desc}) without access control\",\n                    ))\n\n    def test_invalid_unit_id(self):\n        \"\"\"Test PLC response to broadcast and invalid unit IDs.\"\"\"\n        # Broadcast (unit ID 0) - should be carefully handled\n        read_data = struct.pack(\">HH\", 0, 1)\n        response = self._send_modbus(0, 3, read_data)\n\n        if response and len(response) > 8 and response[7] != 0x83:\n            self.results.append(ProtocolTestResult(\n                test_name=\"Broadcast Unit ID Handling\",\n                target=self.target,\n                protocol=\"Modbus\u002FTCP\",\n                result=\"FAIL\",\n                severity=\"high\",\n                detail=\"PLC responds to broadcast unit ID 0. This enables broadcast write attacks.\",\n            ))\n\n    def test_malformed_packet_handling(self):\n        \"\"\"Test PLC resilience against malformed Modbus packets.\"\"\"\n        # Oversized length field\n        malformed = struct.pack(\">HHH\", 0x0001, 0x0000, 0xFFFF) + b\"\\x01\\x03\\x00\\x00\\x00\\x01\"\n        try:\n            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n            sock.settimeout(5)\n            sock.connect((self.target, self.port))\n            sock.send(malformed)\n            time.sleep(1)\n\n            # Verify PLC is still responsive\n            read_data = struct.pack(\">HH\", 0, 1)\n            response = self._send_modbus(1, 3, read_data)\n            sock.close()\n\n            if response is None:\n                self.results.append(ProtocolTestResult(\n                    test_name=\"Malformed Packet - Oversized Length\",\n                    target=self.target,\n                    protocol=\"Modbus\u002FTCP\",\n                    result=\"FAIL\",\n                    severity=\"critical\",\n                    detail=\"PLC became unresponsive after receiving oversized length field. Possible DoS vulnerability.\",\n                ))\n            else:\n                self.results.append(ProtocolTestResult(\n                    test_name=\"Malformed Packet - Oversized Length\",\n                    target=self.target,\n                    protocol=\"Modbus\u002FTCP\",\n                    result=\"PASS\",\n                    severity=\"info\",\n                    detail=\"PLC correctly handles oversized length field without crashing\",\n                ))\n        except Exception as e:\n            pass\n\n    def run_all_tests(self):\n        \"\"\"Run all Modbus security tests.\"\"\"\n        print(f\"\\n{'='*60}\")\n        print(f\"PLC MODBUS SECURITY ANALYSIS - {self.target}:{self.port}\")\n        print(f\"{'='*60}\")\n\n        self.test_authentication_required()\n        self.test_function_code_access_control()\n        self.test_invalid_unit_id()\n        self.test_malformed_packet_handling()\n\n        for r in self.results:\n            icon = \"[FAIL]\" if r.result == \"FAIL\" else \"[PASS]\"\n            print(f\"\\n  {icon} {r.test_name}\")\n            print(f\"    Severity: {r.severity}\")\n            print(f\"    Detail: {r.detail}\")\n\n        return self.results\n\n\nif __name__ == \"__main__\":\n    if len(sys.argv) \u003C 2:\n        print(\"Usage: python plc_protocol_tester.py \u003Ctarget_plc_ip> [port]\")\n        print(\"WARNING: Only use against lab\u002Ftest PLCs!\")\n        sys.exit(1)\n\n    target = sys.argv[1]\n    port = int(sys.argv[2]) if len(sys.argv) > 2 else 502\n\n    tester = ModbusSecurityTester(target, port)\n    tester.run_all_tests()\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| PLC Firmware | The embedded software running on a Programmable Logic Controller, including the real-time operating system, protocol stacks, and I\u002FO drivers |\n| Ladder Logic | Graphical programming language for PLCs that represents relay logic circuits, stored as program blocks in PLC memory |\n| Function Block | Reusable PLC programming element that encapsulates logic with defined inputs\u002Foutputs, can be analyzed for malicious modifications |\n| Firmware Integrity | Verification that PLC firmware has not been modified from the vendor-supplied or approved version using cryptographic hash comparison |\n| IEC 62443-4-2 | Component security requirements in the IEC 62443 standard, defining security capabilities required for IACS components including PLCs |\n| JTAG\u002FSWD | Hardware debug interfaces (Joint Test Action Group \u002F Serial Wire Debug) used for firmware extraction and low-level analysis |\n\n## Tools & Systems\n\n- **Binwalk**: Firmware analysis tool for scanning, extracting, and analyzing embedded firmware images\n- **Ghidra**: NSA-developed reverse engineering framework supporting ARM, MIPS, PowerPC architectures common in PLCs\n- **EMUX\u002FFIRMADYNE**: Firmware emulation frameworks for dynamic analysis of embedded device firmware\n- **PLCinject**: Research tool for analyzing PLC logic injection vulnerabilities (use only in authorized lab settings)\n- **OpenPLC**: Open-source PLC platform useful as a test target for security research\n\n## Output Format\n\n```\nPLC Firmware Security Analysis Report\n=======================================\nDevice: [PLC Model and Firmware Version]\nAnalysis Date: YYYY-MM-DD\nMethodology: Static + Dynamic Analysis\n\nFIRMWARE INTEGRITY:\n  SHA-256: [hash]\n  Baseline Match: [Yes\u002FNo]\n  Vendor Signature Valid: [Yes\u002FNo\u002FNot Signed]\n\nVULNERABILITIES FOUND:\n  [PLC-001] [Severity] [Title]\n    CWE: [CWE-ID]\n    Detail: [Technical description]\n    Impact: [Operational impact]\n    Remediation: [Fix or mitigation]\n```\n","# Performing PLC Firmware Security Analysis\n\n## When to Use\n\n- When assessing PLC security as part of an IEC 62443 component security evaluation (IEC 62443-4-2)\n- When validating firmware integrity after a suspected compromise or supply chain attack\n- When evaluating the security of a new PLC platform before deployment in critical infrastructure\n- When performing vulnerability research on industrial control system devices in an authorized lab\n- When responding to an incident where PLC logic or firmware tampering is suspected\n\n**Do not use** on live production PLCs without explicit authorization and safety controls in place. Firmware extraction and analysis should be performed on lab devices or offline backups. Never upload PLC firmware to public analysis services. See performing-ics-penetration-testing for authorized live testing procedures.\n\n## Prerequisites\n\n- Isolated lab environment with the target PLC hardware or an emulated environment\n- PLC programming software for the target platform (Siemens TIA Portal, Rockwell Studio 5000, Schneider EcoStruxure)\n- Firmware extraction tools (binwalk, firmware-mod-kit, JTAG\u002FSWD debugger)\n- Static analysis tools (Ghidra, IDA Pro, Binary Ninja with ARM\u002FMIPS\u002FPowerPC support)\n- Understanding of PLC architecture (real-time OS, ladder logic execution, I\u002FO scanning)\n- Reference copy of known-good firmware for integrity comparison\n\n## Workflow\n\n### Step 1: Acquire PLC Firmware for Analysis\n\nExtract or obtain PLC firmware through authorized methods. This can be done by downloading from the vendor, extracting from a lab device, or obtaining from a project backup.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"PLC Firmware Acquisition and Integrity Verification.\n\nSupports firmware extraction from project files, network downloads,\nand binary image comparison against known-good baselines.\n\"\"\"\n\nimport hashlib\nimport json\nimport os\nimport struct\nimport sys\nimport zipfile\nfrom datetime import datetime\nfrom pathlib import Path\n\n\nclass PLCFirmwareAcquisition:\n    \"\"\"Handles PLC firmware acquisition from various sources.\"\"\"\n\n    def __init__(self, output_dir=\"firmware_analysis\"):\n        self.output_dir = Path(output_dir)\n        self.output_dir.mkdir(exist_ok=True)\n        self.manifest = {\n            \"acquisition_date\": datetime.now().isoformat(),\n            \"firmware_samples\": [],\n        }\n\n    def extract_from_siemens_project(self, project_path):\n        \"\"\"Extract firmware\u002Fprogram blocks from Siemens TIA Portal project.\n\n        TIA Portal projects (.ap16\u002F.ap17) are ZIP archives containing\n        XML-encoded PLC program blocks and system configuration.\n        \"\"\"\n        print(f\"[*] Analyzing Siemens project: {project_path}\")\n        results = {\"platform\": \"Siemens\", \"blocks\": []}\n\n        if zipfile.is_zipfile(project_path):\n            with zipfile.ZipFile(project_path, \"r\") as zf:\n                for info in zf.infolist():\n                    # Program blocks are stored as XML in specific paths\n                    if \"ProgramBlocks\" in info.filename or \"SystemBlocks\" in info.filename:\n                        block_data = zf.read(info.filename)\n                        block_hash = hashlib.sha256(block_data).hexdigest()\n\n                        block_path = self.output_dir \u002F info.filename.replace(\"\u002F\", \"_\")\n                        block_path.write_bytes(block_data)\n\n                        results[\"blocks\"].append({\n                            \"name\": info.filename,\n                            \"size\": info.file_size,\n                            \"sha256\": block_hash,\n                            \"extracted_to\": str(block_path),\n                        })\n                        print(f\"  [+] Extracted: {info.filename} ({info.file_size} bytes)\")\n\n        self.manifest[\"firmware_samples\"].append(results)\n        return results\n\n    def extract_from_rockwell_project(self, acd_path):\n        \"\"\"Extract program data from Rockwell Studio 5000 ACD file.\n\n        ACD files contain controller program, tags, and configuration.\n        \"\"\"\n        print(f\"[*] Analyzing Rockwell project: {acd_path}\")\n        results = {\"platform\": \"Rockwell\u002FAllen-Bradley\", \"blocks\": []}\n\n        with open(acd_path, \"rb\") as f:\n            header = f.read(256)\n            # ACD files have a specific signature\n            if b\"RSLogix\" in header or b\"Studio 5000\" in header:\n                f.seek(0)\n                full_data = f.read()\n                file_hash = hashlib.sha256(full_data).hexdigest()\n\n                results[\"blocks\"].append({\n                    \"name\": os.path.basename(acd_path),\n                    \"size\": len(full_data),\n                    \"sha256\": file_hash,\n                    \"header_signature\": header[:16].hex(),\n                })\n                print(f\"  [+] Project hash: {file_hash}\")\n\n        self.manifest[\"firmware_samples\"].append(results)\n        return results\n\n    def compute_firmware_hash(self, firmware_path):\n        \"\"\"Compute multiple hashes of a firmware image for integrity tracking.\"\"\"\n        data = Path(firmware_path).read_bytes()\n        return {\n            \"file\": str(firmware_path),\n            \"size\": len(data),\n            \"md5\": hashlib.md5(data).hexdigest(),\n            \"sha256\": hashlib.sha256(data).hexdigest(),\n            \"sha512\": hashlib.sha512(data).hexdigest(),\n        }\n\n    def compare_firmware_integrity(self, current_fw, baseline_fw):\n        \"\"\"Compare current firmware against known-good baseline.\"\"\"\n        current_hash = self.compute_firmware_hash(current_fw)\n        baseline_hash = self.compute_firmware_hash(baseline_fw)\n\n        match = current_hash[\"sha256\"] == baseline_hash[\"sha256\"]\n\n        result = {\n            \"comparison_date\": datetime.now().isoformat(),\n            \"current_firmware\": current_hash,\n            \"baseline_firmware\": baseline_hash,\n            \"integrity_match\": match,\n            \"verdict\": \"PASS - Firmware matches baseline\" if match else \"FAIL - Firmware modified!\",\n        }\n\n        if not match:\n            # Find the offset where files diverge\n            current_data = Path(current_fw).read_bytes()\n            baseline_data = Path(baseline_fw).read_bytes()\n            min_len = min(len(current_data), len(baseline_data))\n\n            first_diff = None\n            diff_count = 0\n            for i in range(min_len):\n                if current_data[i] != baseline_data[i]:\n                    if first_diff is None:\n                        first_diff = i\n                    diff_count += 1\n\n            result[\"first_difference_offset\"] = f\"0x{first_diff:08x}\" if first_diff else None\n            result[\"total_different_bytes\"] = diff_count\n            result[\"size_difference\"] = len(current_data) - len(baseline_data)\n\n        return result\n\n    def save_manifest(self):\n        \"\"\"Save acquisition manifest.\"\"\"\n        manifest_path = self.output_dir \u002F \"acquisition_manifest.json\"\n        with open(manifest_path, \"w\") as f:\n            json.dump(self.manifest, f, indent=2)\n        print(f\"\\n[*] Manifest saved: {manifest_path}\")\n\n\nif __name__ == \"__main__\":\n    acq = PLCFirmwareAcquisition()\n\n    if len(sys.argv) \u003C 2:\n        print(\"Usage:\")\n        print(\"  python process.py extract-siemens \u003Cproject.ap17>\")\n        print(\"  python process.py extract-rockwell \u003Cproject.acd>\")\n        print(\"  python process.py compare \u003Ccurrent.bin> \u003Cbaseline.bin>\")\n        sys.exit(1)\n\n    cmd = sys.argv[1]\n    if cmd == \"extract-siemens\" and len(sys.argv) > 2:\n        acq.extract_from_siemens_project(sys.argv[2])\n    elif cmd == \"extract-rockwell\" and len(sys.argv) > 2:\n        acq.extract_from_rockwell_project(sys.argv[2])\n    elif cmd == \"compare\" and len(sys.argv) > 3:\n        result = acq.compare_firmware_integrity(sys.argv[2], sys.argv[3])\n        print(json.dumps(result, indent=2))\n    else:\n        print(\"Invalid command\")\n        sys.exit(1)\n\n    acq.save_manifest()\n```\n\n### Step 2: Perform Static Analysis of Firmware Image\n\nUse binwalk for firmware unpacking and Ghidra for disassembly to identify security issues in the firmware binary.\n\n```bash\n# Step 2a: Unpack firmware image with binwalk\nbinwalk -e firmware.bin\n# Output: _firmware.bin.extracted\u002F\n\n# Identify firmware components\nbinwalk firmware.bin\n# Look for: file system images, compressed sections, bootloader, RTOS kernel\n\n# Extract strings for credential and configuration analysis\nstrings -n 8 firmware.bin > firmware_strings.txt\n\n# Search for hardcoded credentials\ngrep -iE \"(password|passwd|pwd|secret|key|credential|login|admin|root)\" firmware_strings.txt\n\n# Search for network configuration\ngrep -iE \"(http|ftp|telnet|ssh|snmp|modbus|192\\.168|10\\.|172\\.)\" firmware_strings.txt\n\n# Search for debug\u002Fbackdoor indicators\ngrep -iE \"(debug|backdoor|test_mode|factory|service_port|hidden)\" firmware_strings.txt\n\n# Search for cryptographic material\ngrep -iE \"(BEGIN RSA|BEGIN CERTIFICATE|AES|DES|private.key)\" firmware_strings.txt\n\n# Step 2b: Entropy analysis to detect encrypted\u002Fcompressed sections\nbinwalk -E firmware.bin\n# High entropy sections may contain encrypted payloads or compressed data\n\n# Step 2c: Analyze with Ghidra (headless mode)\nanalyzeHeadless \u002Ftmp\u002Fghidra_project PLC_FW \\\n  -import firmware.bin \\\n  -processor ARM:LE:32:Cortex \\\n  -postScript FindCryptoConstants.java \\\n  -postScript FindHardcodedStrings.java \\\n  -log \u002Ftmp\u002Fghidra_analysis.log\n```\n\n### Step 3: Analyze PLC Communication Stack Security\n\nExamine how the PLC handles industrial protocol requests, focusing on authentication bypass, buffer overflows in packet parsing, and command injection vulnerabilities.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"PLC Protocol Security Analyzer.\n\nTests PLC protocol implementation for common vulnerabilities\nincluding authentication bypass, malformed packet handling,\nand function code access control.\n\nWARNING: Only run against lab\u002Ftest PLCs, never production systems.\n\"\"\"\n\nimport socket\nimport struct\nimport sys\nimport time\nfrom dataclasses import dataclass\n\n\n@dataclass\nclass ProtocolTestResult:\n    test_name: str\n    target: str\n    protocol: str\n    result: str  # PASS, FAIL, ERROR\n    severity: str\n    detail: str\n\n\nclass ModbusSecurityTester:\n    \"\"\"Tests Modbus\u002FTCP implementation security.\"\"\"\n\n    def __init__(self, target_ip, target_port=502):\n        self.target = target_ip\n        self.port = target_port\n        self.results = []\n\n    def _send_modbus(self, unit_id, func_code, data=b\"\"):\n        \"\"\"Send a Modbus\u002FTCP request and return response.\"\"\"\n        # MBAP Header: transaction_id(2) + protocol_id(2) + length(2) + unit_id(1)\n        mbap = struct.pack(\">HHHB\", 0x0001, 0x0000, len(data) + 2, unit_id)\n        pdu = struct.pack(\"B\", func_code) + data\n\n        try:\n            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n            sock.settimeout(5)\n            sock.connect((self.target, self.port))\n            sock.send(mbap + pdu)\n            response = sock.recv(1024)\n            sock.close()\n            return response\n        except Exception as e:\n            return None\n\n    def test_authentication_required(self):\n        \"\"\"Test if PLC requires authentication for read\u002Fwrite operations.\"\"\"\n        # Test unauthenticated read\n        read_data = struct.pack(\">HH\", 0, 10)  # Read 10 registers from address 0\n        response = self._send_modbus(1, 3, read_data)\n\n        if response and len(response) > 8 and response[7] != 0x83:\n            self.results.append(ProtocolTestResult(\n                test_name=\"Modbus Authentication - Read\",\n                target=self.target,\n                protocol=\"Modbus\u002FTCP\",\n                result=\"FAIL\",\n                severity=\"high\",\n                detail=\"PLC accepts unauthenticated Modbus read commands. No authentication required.\",\n            ))\n\n        # Test unauthenticated write\n        write_data = struct.pack(\">HH\", 100, 0)  # Write 0 to register 100\n        response = self._send_modbus(1, 6, write_data)\n\n        if response and len(response) > 8 and response[7] != 0x86:\n            self.results.append(ProtocolTestResult(\n                test_name=\"Modbus Authentication - Write\",\n                target=self.target,\n                protocol=\"Modbus\u002FTCP\",\n                result=\"FAIL\",\n                severity=\"critical\",\n                detail=\"PLC accepts unauthenticated Modbus WRITE commands. Any host can modify registers.\",\n            ))\n\n    def test_function_code_access_control(self):\n        \"\"\"Test if PLC restricts dangerous function codes.\"\"\"\n        dangerous_funcs = {\n            8: \"Diagnostics (can restart communications)\",\n            17: \"Report Slave ID (information disclosure)\",\n            43: \"Encapsulated Interface Transport (device identification)\",\n        }\n\n        for fc, desc in dangerous_funcs.items():\n            response = self._send_modbus(1, fc, b\"\\x00\\x00\")\n            if response and len(response) > 8:\n                error_code = response[7]\n                if error_code != (fc | 0x80):  # Not an exception response\n                    self.results.append(ProtocolTestResult(\n                        test_name=f\"Function Code Access - FC{fc}\",\n                        target=self.target,\n                        protocol=\"Modbus\u002FTCP\",\n                        result=\"FAIL\",\n                        severity=\"medium\",\n                        detail=f\"PLC responds to FC{fc} ({desc}) without access control\",\n                    ))\n\n    def test_invalid_unit_id(self):\n        \"\"\"Test PLC response to broadcast and invalid unit IDs.\"\"\"\n        # Broadcast (unit ID 0) - should be carefully handled\n        read_data = struct.pack(\">HH\", 0, 1)\n        response = self._send_modbus(0, 3, read_data)\n\n        if response and len(response) > 8 and response[7] != 0x83:\n            self.results.append(ProtocolTestResult(\n                test_name=\"Broadcast Unit ID Handling\",\n                target=self.target,\n                protocol=\"Modbus\u002FTCP\",\n                result=\"FAIL\",\n                severity=\"high\",\n                detail=\"PLC responds to broadcast unit ID 0. This enables broadcast write attacks.\",\n            ))\n\n    def test_malformed_packet_handling(self):\n        \"\"\"Test PLC resilience against malformed Modbus packets.\"\"\"\n        # Oversized length field\n        malformed = struct.pack(\">HHH\", 0x0001, 0x0000, 0xFFFF) + b\"\\x01\\x03\\x00\\x00\\x00\\x01\"\n        try:\n            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n            sock.settimeout(5)\n            sock.connect((self.target, self.port))\n            sock.send(malformed)\n            time.sleep(1)\n\n            # Verify PLC is still responsive\n            read_data = struct.pack(\">HH\", 0, 1)\n            response = self._send_modbus(1, 3, read_data)\n            sock.close()\n\n            if response is None:\n                self.results.append(ProtocolTestResult(\n                    test_name=\"Malformed Packet - Oversized Length\",\n                    target=self.target,\n                    protocol=\"Modbus\u002FTCP\",\n                    result=\"FAIL\",\n                    severity=\"critical\",\n                    detail=\"PLC became unresponsive after receiving oversized length field. Possible DoS vulnerability.\",\n                ))\n            else:\n                self.results.append(ProtocolTestResult(\n                    test_name=\"Malformed Packet - Oversized Length\",\n                    target=self.target,\n                    protocol=\"Modbus\u002FTCP\",\n                    result=\"PASS\",\n                    severity=\"info\",\n                    detail=\"PLC correctly handles oversized length field without crashing\",\n                ))\n        except Exception as e:\n            pass\n\n    def run_all_tests(self):\n        \"\"\"Run all Modbus security tests.\"\"\"\n        print(f\"\\n{'='*60}\")\n        print(f\"PLC MODBUS SECURITY ANALYSIS - {self.target}:{self.port}\")\n        print(f\"{'='*60}\")\n\n        self.test_authentication_required()\n        self.test_function_code_access_control()\n        self.test_invalid_unit_id()\n        self.test_malformed_packet_handling()\n\n        for r in self.results:\n            icon = \"[FAIL]\" if r.result == \"FAIL\" else \"[PASS]\"\n            print(f\"\\n  {icon} {r.test_name}\")\n            print(f\"    Severity: {r.severity}\")\n            print(f\"    Detail: {r.detail}\")\n\n        return self.results\n\n\nif __name__ == \"__main__\":\n    if len(sys.argv) \u003C 2:\n        print(\"Usage: python plc_protocol_tester.py \u003Ctarget_plc_ip> [port]\")\n        print(\"WARNING: Only use against lab\u002Ftest PLCs!\")\n        sys.exit(1)\n\n    target = sys.argv[1]\n    port = int(sys.argv[2]) if len(sys.argv) > 2 else 502\n\n    tester = ModbusSecurityTester(target, port)\n    tester.run_all_tests()\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| PLC Firmware | The embedded software running on a Programmable Logic Controller, including the real-time operating system, protocol stacks, and I\u002FO drivers |\n| Ladder Logic | Graphical programming language for PLCs that represents relay logic circuits, stored as program blocks in PLC memory |\n| Function Block | Reusable PLC programming element that encapsulates logic with defined inputs\u002Foutputs, can be analyzed for malicious modifications |\n| Firmware Integrity | Verification that PLC firmware has not been modified from the vendor-supplied or approved version using cryptographic hash comparison |\n| IEC 62443-4-2 | Component security requirements in the IEC 62443 standard, defining security capabilities required for IACS components including PLCs |\n| JTAG\u002FSWD | Hardware debug interfaces (Joint Test Action Group \u002F Serial Wire Debug) used for firmware extraction and low-level analysis |\n\n## Tools & Systems\n\n- **Binwalk**: Firmware analysis tool for scanning, extracting, and analyzing embedded firmware images\n- **Ghidra**: NSA-developed reverse engineering framework supporting ARM, MIPS, PowerPC architectures common in PLCs\n- **EMUX\u002FFIRMADYNE**: Firmware emulation frameworks for dynamic analysis of embedded device firmware\n- **PLCinject**: Research tool for analyzing PLC logic injection vulnerabilities (use only in authorized lab settings)\n- **OpenPLC**: Open-source PLC platform useful as a test target for security research\n\n## Output Format\n\n```\nPLC Firmware Security Analysis Report\n=======================================\nDevice: [PLC Model and Firmware Version]\nAnalysis Date: YYYY-MM-DD\nMethodology: Static + Dynamic Analysis\n\nFIRMWARE INTEGRITY:\n  SHA-256: [hash]\n  Baseline Match: [Yes\u002FNo]\n  Vendor Signature Valid: [Yes\u002FNo\u002FNot Signed]\n\nVULNERABILITIES FOUND:\n  [PLC-001] [Severity] [Title]\n    CWE: [CWE-ID]\n    Detail: [Technical description]\n    Impact: [Operational impact]\n    Remediation: [Fix or mitigation]\n```\n",{"name":5,"tags":25,"author":33,"domain":34,"license":15,"version":35,"nist_csf":36,"subdomain":41,"description":42,"mitre_attack":43},[26,27,28,29,30,31,32],"ot-security","ics","scada","industrial-control","iec62443","firmware-analysis","plc-security","mahipal","cybersecurity","1.0.0",[37,38,39,40],"PR.IR-01","DE.CM-01","ID.AM-05","GV.OC-02","ot-ics-security","This skill covers analyzing Programmable Logic Controller (PLC) firmware for security vulnerabilities including hardcoded credentials, insecure update mechanisms, backdoor functions, memory corruption flaws, and undocumented debug interfaces. It addresses firmware extraction from common PLC platforms (Siemens S7, Allen-Bradley, Schneider Modicon), static analysis of firmware images, dynamic analysis in emulated environments, and comparison against known-good baselines to detect tampering.\n",[44,45,46,47,48],"T1078","T1190","T1059","T1003","T1110","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fperforming-plc-firmware-security-analysis","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":57,"prompt":67,"zipAvailable":68},[58,61,64],{"tool":59,"command":60},"npx","npx skills add NeelakshSaxena\u002FVayu --skill performing-plc-firmware-security-analysis",{"tool":62,"command":63},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill performing-plc-firmware-security-analysis",{"tool":65,"command":66},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill performing-plc-firmware-security-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-plc-firmware-security-analysis\u002FSKILL.md",true,[70,74,80],{"path":71,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":75,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":79},"references\u002Fapi-reference.md","REFERENCE","参考文档",1760,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-plc-firmware-security-analysis\u002Freferences\u002Fapi-reference.md",{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Fagent.py","SCRIPT","脚本",7482,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-plc-firmware-security-analysis\u002Fscripts\u002Fagent.py",[87,94,101,108,115,122],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":114,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":121,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]