[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EWC67N9VXTD6JC6HQFXCXQ":3,"skill-same:01M6EWC67N9VXTD6JC6HQFXCXQ":107},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":68,"commitSha":69,"skillDirectory":70,"forksCount":14,"repositoryHtmlUrl":71,"repositoryHomepageUrl":72,"ownerHtmlUrl":73,"ownerBlogUrl":6,"ownerDescription":74,"updatedAt":75,"install":76,"resources":89},"01M6EWC67N9VXTD6JC6HQFXCXQ","securing-remote-access-to-ot-environment",null,"This skill covers implementing secure remote access to OT\u002FICS environments for operators, engineers, and vendors while preventing unauthorized access that could compromise industrial operations. It addresses jump server architecture, multi-factor authentication, session recording, privileged access management, vendor remote access controls, and compliance with IEC 62443 and NERC CIP-005 remote access requirements.","henriquescastilho\u002Fmy-claude","henriquescastilho","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F153296945?v=4","01M6ESH7EXPXTH9CVQ4K16SRG8","Henrique Scheer","01M6ESH7JHEK2PTNNH4HEH787Z",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"securing remote access to ot environment","remote","environment","access","pr","authentication","server","t1078","t1059","ICS-security","security","secure","architecture","session","cm","operators","factor","iec 62443","de","cybersecurity","2026-11-10 10:12:30",false,"---\nname: securing-remote-access-to-ot-environment\ndescription: 'This skill covers implementing secure remote access to OT\u002FICS environments\n  for operators, engineers, and vendors while preventing unauthorized access that\n  could compromise industrial operations. It addresses jump server architecture, multi-factor\n  authentication, session recording, privileged access management, vendor remote access\n  controls, and compliance with IEC 62443 and NERC CIP-005 remote access requirements.\n\n  '\ndomain: cybersecurity\nsubdomain: ot-ics-security\ntags:\n- ot-security\n- ics\n- scada\n- industrial-control\n- iec62443\n- remote-access\n- jump-server\n- mfa\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- T0816\n- T0836\n---\n\n# Securing Remote Access to OT Environment\n\n## When to Use\n\n- When implementing or upgrading remote access architecture for OT environments\n- When onboarding vendors who require remote access to OT systems for support and maintenance\n- When implementing CIP-005-7 R2 requirements for remote access management including MFA\n- When replacing legacy direct VPN access to OT networks with a secure jump server architecture\n- When responding to an incident involving unauthorized remote access to industrial control systems\n\n**Do not use** for securing IT-only remote access without OT components, for configuring VPN for corporate workers (see general VPN guides), or for physical access control to OT facilities.\n\n## Prerequisites\n\n- DMZ infrastructure (Level 3.5) between corporate IT and OT networks\n- Jump server\u002Fbastion host platform (CyberArk, BeyondTrust, or hardened Windows\u002FLinux server)\n- Multi-factor authentication solution (Duo, RSA SecurID, YubiKey, smart cards)\n- Session recording capability for audit trail compliance\n- Firewall rules permitting remote access only through the DMZ intermediate system\n\n## Workflow\n\n### Step 1: Design Secure Remote Access Architecture\n\nImplement a defense-in-depth remote access architecture with an intermediate system in the DMZ that prevents any direct network connectivity between external users and OT systems.\n\n```yaml\n# OT Remote Access Architecture\n# Key principle: NO direct connection from external networks to OT systems\n\narchitecture:\n  external_access_point:\n    location: \"Internet-facing firewall\"\n    service: \"VPN gateway (IKEv2\u002FIPsec or SSL VPN)\"\n    authentication: \"Certificate + MFA (CIP-005-7 R2.4)\"\n    controls:\n      - \"Source IP allowlisting for vendor access\"\n      - \"Time-based access windows\"\n      - \"Bandwidth rate limiting\"\n\n  dmz_intermediate_system:\n    location: \"Level 3.5 DMZ\"\n    platform: \"CyberArk Privileged Access Security or hardened jump server\"\n    function: \"Session broker - terminates external connection, initiates new internal connection\"\n    controls:\n      - \"All sessions terminate at jump server (no pass-through)\"\n      - \"Session recording with keystroke logging\"\n      - \"Clipboard and file transfer restrictions\"\n      - \"Session timeout after 30 minutes inactivity\"\n      - \"Concurrent session limits per user\"\n\n  ot_internal_access:\n    location: \"Level 3 \u002F Level 2 OT network\"\n    method: \"Jump server initiates RDP\u002FSSH\u002FVNC to OT systems\"\n    controls:\n      - \"Firewall allows only jump server IP to reach OT\"\n      - \"Protocol restricted (RDP 3389, SSH 22, VNC 5900)\"\n      - \"Destination-specific per user role\"\n\n  vendor_access:\n    description: \"Third-party vendor remote access\"\n    additional_controls:\n      - \"Vendor account disabled by default; enabled on request\"\n      - \"Time-limited access windows (enable\u002Fdisable per session)\"\n      - \"OT operator must co-attend vendor sessions\"\n      - \"Real-time session monitoring by OT security\"\n      - \"No persistent credentials - one-time access tokens\"\n\n# Network flow:\n# User -> VPN -> Firewall -> DMZ Jump Server -> Internal FW -> OT System\n# (Two separate authenticated connections; no direct routing)\n```\n\n### Step 2: Configure Jump Server with Privileged Access Management\n\nDeploy and harden the jump server in the DMZ with session management, recording, and role-based access controls.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"OT Remote Access Session Manager.\n\nManages authorized remote access sessions to OT environments\nincluding session creation, monitoring, recording, and termination.\nIntegrates with PAM solutions for credential vaulting.\n\"\"\"\n\nimport json\nimport hashlib\nimport sys\nfrom dataclasses import dataclass, field, asdict\nfrom datetime import datetime, timedelta\nfrom enum import Enum\n\n\nclass SessionState(str, Enum):\n    PENDING_APPROVAL = \"pending_approval\"\n    APPROVED = \"approved\"\n    ACTIVE = \"active\"\n    TERMINATED = \"terminated\"\n    EXPIRED = \"expired\"\n    DENIED = \"denied\"\n\n\nclass UserRole(str, Enum):\n    OT_OPERATOR = \"ot_operator\"\n    OT_ENGINEER = \"ot_engineer\"\n    VENDOR = \"vendor\"\n    SECURITY_ANALYST = \"security_analyst\"\n\n\n@dataclass\nclass RemoteAccessSession:\n    session_id: str\n    user_id: str\n    user_role: str\n    source_ip: str\n    target_system: str\n    target_ip: str\n    protocol: str\n    purpose: str\n    state: str = SessionState.PENDING_APPROVAL\n    mfa_verified: bool = False\n    approved_by: str = \"\"\n    created_at: str = \"\"\n    started_at: str = \"\"\n    ended_at: str = \"\"\n    max_duration_minutes: int = 120\n    recording_path: str = \"\"\n    actions_logged: list = field(default_factory=list)\n\n\nclass OTRemoteAccessManager:\n    \"\"\"Manages remote access sessions to OT environment.\"\"\"\n\n    def __init__(self):\n        self.sessions = {}\n        self.active_sessions = {}\n        self.access_policies = {}\n        self.audit_log = []\n\n    def define_access_policy(self, role, allowed_targets, protocols, max_duration):\n        \"\"\"Define access policy for a user role.\"\"\"\n        self.access_policies[role] = {\n            \"allowed_targets\": allowed_targets,\n            \"allowed_protocols\": protocols,\n            \"max_duration_minutes\": max_duration,\n            \"requires_co_attendance\": role == UserRole.VENDOR,\n            \"requires_approval\": role == UserRole.VENDOR,\n        }\n\n    def request_session(self, user_id, user_role, source_ip,\n                        target_system, target_ip, protocol, purpose):\n        \"\"\"Request a new remote access session.\"\"\"\n        # Generate unique session ID\n        session_id = hashlib.sha256(\n            f\"{user_id}{target_ip}{datetime.now().isoformat()}\".encode()\n        ).hexdigest()[:16]\n\n        # Check access policy\n        policy = self.access_policies.get(user_role)\n        if not policy:\n            return None, \"No access policy defined for role\"\n\n        if target_system not in policy[\"allowed_targets\"]:\n            self._audit(\"ACCESS_DENIED\", user_id, target_system,\n                       f\"Target not in allowed list for role {user_role}\")\n            return None, f\"Target {target_system} not authorized for role {user_role}\"\n\n        if protocol not in policy[\"allowed_protocols\"]:\n            self._audit(\"ACCESS_DENIED\", user_id, target_system,\n                       f\"Protocol {protocol} not allowed for role {user_role}\")\n            return None, f\"Protocol {protocol} not authorized\"\n\n        session = RemoteAccessSession(\n            session_id=session_id,\n            user_id=user_id,\n            user_role=user_role,\n            source_ip=source_ip,\n            target_system=target_system,\n            target_ip=target_ip,\n            protocol=protocol,\n            purpose=purpose,\n            max_duration_minutes=policy[\"max_duration_minutes\"],\n            created_at=datetime.now().isoformat(),\n        )\n\n        # Vendor sessions require approval\n        if policy.get(\"requires_approval\"):\n            session.state = SessionState.PENDING_APPROVAL\n        else:\n            session.state = SessionState.APPROVED\n\n        self.sessions[session_id] = session\n        self._audit(\"SESSION_REQUESTED\", user_id, target_system, purpose)\n\n        return session_id, \"Session created\"\n\n    def approve_session(self, session_id, approver_id):\n        \"\"\"Approve a pending vendor session.\"\"\"\n        session = self.sessions.get(session_id)\n        if not session:\n            return False, \"Session not found\"\n        if session.state != SessionState.PENDING_APPROVAL:\n            return False, \"Session not in pending approval state\"\n\n        session.state = SessionState.APPROVED\n        session.approved_by = approver_id\n        self._audit(\"SESSION_APPROVED\", approver_id, session.target_system,\n                    f\"Approved session {session_id} for {session.user_id}\")\n        return True, \"Session approved\"\n\n    def activate_session(self, session_id, mfa_token):\n        \"\"\"Activate an approved session after MFA verification.\"\"\"\n        session = self.sessions.get(session_id)\n        if not session or session.state != SessionState.APPROVED:\n            return False, \"Session not approved\"\n\n        # Verify MFA (simplified - real implementation calls MFA provider)\n        session.mfa_verified = True\n        session.state = SessionState.ACTIVE\n        session.started_at = datetime.now().isoformat()\n        session.recording_path = f\"\u002Frecordings\u002F{session_id}_{datetime.now().strftime('%Y%m%d')}.mp4\"\n\n        self.active_sessions[session_id] = session\n        self._audit(\"SESSION_ACTIVATED\", session.user_id, session.target_system,\n                    f\"MFA verified, recording to {session.recording_path}\")\n\n        return True, \"Session active\"\n\n    def terminate_session(self, session_id, reason=\"manual\"):\n        \"\"\"Terminate an active session.\"\"\"\n        session = self.active_sessions.pop(session_id, None)\n        if not session:\n            session = self.sessions.get(session_id)\n        if not session:\n            return False\n\n        session.state = SessionState.TERMINATED\n        session.ended_at = datetime.now().isoformat()\n        self._audit(\"SESSION_TERMINATED\", session.user_id, session.target_system, reason)\n        return True\n\n    def check_expired_sessions(self):\n        \"\"\"Terminate sessions that have exceeded their maximum duration.\"\"\"\n        now = datetime.now()\n        expired = []\n        for sid, session in list(self.active_sessions.items()):\n            started = datetime.fromisoformat(session.started_at)\n            if (now - started).total_seconds() > session.max_duration_minutes * 60:\n                self.terminate_session(sid, \"maximum_duration_exceeded\")\n                expired.append(sid)\n        return expired\n\n    def _audit(self, event_type, user_id, target, detail):\n        \"\"\"Write to audit log.\"\"\"\n        self.audit_log.append({\n            \"timestamp\": datetime.now().isoformat(),\n            \"event\": event_type,\n            \"user\": user_id,\n            \"target\": target,\n            \"detail\": detail,\n        })\n\n    def generate_report(self):\n        \"\"\"Generate remote access session report.\"\"\"\n        report = []\n        report.append(\"=\" * 70)\n        report.append(\"OT REMOTE ACCESS SESSION REPORT\")\n        report.append(f\"Date: {datetime.now().isoformat()}\")\n        report.append(\"=\" * 70)\n\n        # Session summary\n        total = len(self.sessions)\n        active = sum(1 for s in self.sessions.values() if s.state == SessionState.ACTIVE)\n        report.append(f\"\\nTotal Sessions: {total}\")\n        report.append(f\"Active Sessions: {active}\")\n\n        # Active sessions detail\n        if self.active_sessions:\n            report.append(\"\\nACTIVE SESSIONS:\")\n            for sid, s in self.active_sessions.items():\n                report.append(f\"  [{sid[:8]}] {s.user_id} ({s.user_role})\")\n                report.append(f\"    Target: {s.target_system} ({s.target_ip})\")\n                report.append(f\"    Started: {s.started_at}\")\n                report.append(f\"    MFA: {'Verified' if s.mfa_verified else 'NOT VERIFIED'}\")\n\n        return \"\\n\".join(report)\n\n\nif __name__ == \"__main__\":\n    manager = OTRemoteAccessManager()\n\n    # Define policies\n    manager.define_access_policy(\n        UserRole.OT_ENGINEER,\n        [\"HMI-01\", \"HMI-02\", \"EWS-01\", \"HISTORIAN-01\"],\n        [\"RDP\", \"SSH\"],\n        max_duration=240,\n    )\n    manager.define_access_policy(\n        UserRole.VENDOR,\n        [\"DCS-EWS-01\"],\n        [\"RDP\"],\n        max_duration=120,\n    )\n\n    # Request vendor session\n    sid, msg = manager.request_session(\n        \"vendor_honeywell_01\", UserRole.VENDOR,\n        \"203.0.113.50\", \"DCS-EWS-01\", \"10.30.1.20\",\n        \"RDP\", \"DCS firmware update per change request CR-2026-0045\")\n    print(f\"Session request: {msg} ({sid})\")\n\n    if sid:\n        manager.approve_session(sid, \"ot_manager_01\")\n        manager.activate_session(sid, \"123456\")\n        print(manager.generate_report())\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Intermediate System | System in the DMZ that terminates external connections and brokers new connections to OT, preventing direct network access per CIP-005 |\n| Jump Server | Hardened bastion host in the DMZ used for remote access sessions to OT systems with session recording and access controls |\n| Session Recording | Capture of all remote access session activity (screen, keystrokes, commands) for security audit and incident investigation |\n| Privileged Access Management (PAM) | System for vaulting credentials, controlling access, and auditing privileged sessions to critical OT systems |\n| Co-Attendance | Requirement for an OT operator to monitor vendor remote access sessions in real time |\n| Time-Limited Access | Vendor accounts enabled only for specific maintenance windows and automatically disabled after the window closes |\n\n## Tools & Systems\n\n- **CyberArk Privileged Access Security**: Enterprise PAM with session management, credential vaulting, and recording for OT remote access\n- **BeyondTrust Privileged Remote Access**: Purpose-built remote access solution with session recording and granular access policies\n- **Claroty Secure Remote Access (SRA)**: OT-specific remote access solution with protocol-aware session controls\n- **Duo Security**: MFA provider supporting push notifications, hardware tokens, and biometrics for OT access verification\n\n## Output Format\n\n```\nOT Remote Access Security Report\n===================================\nActive Sessions: [N]\nPending Approval: [N]\nSessions Today: [N]\n\nMFA COMPLIANCE:\n  All sessions MFA verified: [Yes\u002FNo]\n  Sessions without MFA: [N]\n\nVENDOR ACCESS:\n  Active vendor sessions: [N]\n  Co-attended: [N]\n  Recorded: [N]\n```\n","# Securing Remote Access to OT Environment\n\n## When to Use\n\n- When implementing or upgrading remote access architecture for OT environments\n- When onboarding vendors who require remote access to OT systems for support and maintenance\n- When implementing CIP-005-7 R2 requirements for remote access management including MFA\n- When replacing legacy direct VPN access to OT networks with a secure jump server architecture\n- When responding to an incident involving unauthorized remote access to industrial control systems\n\n**Do not use** for securing IT-only remote access without OT components, for configuring VPN for corporate workers (see general VPN guides), or for physical access control to OT facilities.\n\n## Prerequisites\n\n- DMZ infrastructure (Level 3.5) between corporate IT and OT networks\n- Jump server\u002Fbastion host platform (CyberArk, BeyondTrust, or hardened Windows\u002FLinux server)\n- Multi-factor authentication solution (Duo, RSA SecurID, YubiKey, smart cards)\n- Session recording capability for audit trail compliance\n- Firewall rules permitting remote access only through the DMZ intermediate system\n\n## Workflow\n\n### Step 1: Design Secure Remote Access Architecture\n\nImplement a defense-in-depth remote access architecture with an intermediate system in the DMZ that prevents any direct network connectivity between external users and OT systems.\n\n```yaml\n# OT Remote Access Architecture\n# Key principle: NO direct connection from external networks to OT systems\n\narchitecture:\n  external_access_point:\n    location: \"Internet-facing firewall\"\n    service: \"VPN gateway (IKEv2\u002FIPsec or SSL VPN)\"\n    authentication: \"Certificate + MFA (CIP-005-7 R2.4)\"\n    controls:\n      - \"Source IP allowlisting for vendor access\"\n      - \"Time-based access windows\"\n      - \"Bandwidth rate limiting\"\n\n  dmz_intermediate_system:\n    location: \"Level 3.5 DMZ\"\n    platform: \"CyberArk Privileged Access Security or hardened jump server\"\n    function: \"Session broker - terminates external connection, initiates new internal connection\"\n    controls:\n      - \"All sessions terminate at jump server (no pass-through)\"\n      - \"Session recording with keystroke logging\"\n      - \"Clipboard and file transfer restrictions\"\n      - \"Session timeout after 30 minutes inactivity\"\n      - \"Concurrent session limits per user\"\n\n  ot_internal_access:\n    location: \"Level 3 \u002F Level 2 OT network\"\n    method: \"Jump server initiates RDP\u002FSSH\u002FVNC to OT systems\"\n    controls:\n      - \"Firewall allows only jump server IP to reach OT\"\n      - \"Protocol restricted (RDP 3389, SSH 22, VNC 5900)\"\n      - \"Destination-specific per user role\"\n\n  vendor_access:\n    description: \"Third-party vendor remote access\"\n    additional_controls:\n      - \"Vendor account disabled by default; enabled on request\"\n      - \"Time-limited access windows (enable\u002Fdisable per session)\"\n      - \"OT operator must co-attend vendor sessions\"\n      - \"Real-time session monitoring by OT security\"\n      - \"No persistent credentials - one-time access tokens\"\n\n# Network flow:\n# User -> VPN -> Firewall -> DMZ Jump Server -> Internal FW -> OT System\n# (Two separate authenticated connections; no direct routing)\n```\n\n### Step 2: Configure Jump Server with Privileged Access Management\n\nDeploy and harden the jump server in the DMZ with session management, recording, and role-based access controls.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"OT Remote Access Session Manager.\n\nManages authorized remote access sessions to OT environments\nincluding session creation, monitoring, recording, and termination.\nIntegrates with PAM solutions for credential vaulting.\n\"\"\"\n\nimport json\nimport hashlib\nimport sys\nfrom dataclasses import dataclass, field, asdict\nfrom datetime import datetime, timedelta\nfrom enum import Enum\n\n\nclass SessionState(str, Enum):\n    PENDING_APPROVAL = \"pending_approval\"\n    APPROVED = \"approved\"\n    ACTIVE = \"active\"\n    TERMINATED = \"terminated\"\n    EXPIRED = \"expired\"\n    DENIED = \"denied\"\n\n\nclass UserRole(str, Enum):\n    OT_OPERATOR = \"ot_operator\"\n    OT_ENGINEER = \"ot_engineer\"\n    VENDOR = \"vendor\"\n    SECURITY_ANALYST = \"security_analyst\"\n\n\n@dataclass\nclass RemoteAccessSession:\n    session_id: str\n    user_id: str\n    user_role: str\n    source_ip: str\n    target_system: str\n    target_ip: str\n    protocol: str\n    purpose: str\n    state: str = SessionState.PENDING_APPROVAL\n    mfa_verified: bool = False\n    approved_by: str = \"\"\n    created_at: str = \"\"\n    started_at: str = \"\"\n    ended_at: str = \"\"\n    max_duration_minutes: int = 120\n    recording_path: str = \"\"\n    actions_logged: list = field(default_factory=list)\n\n\nclass OTRemoteAccessManager:\n    \"\"\"Manages remote access sessions to OT environment.\"\"\"\n\n    def __init__(self):\n        self.sessions = {}\n        self.active_sessions = {}\n        self.access_policies = {}\n        self.audit_log = []\n\n    def define_access_policy(self, role, allowed_targets, protocols, max_duration):\n        \"\"\"Define access policy for a user role.\"\"\"\n        self.access_policies[role] = {\n            \"allowed_targets\": allowed_targets,\n            \"allowed_protocols\": protocols,\n            \"max_duration_minutes\": max_duration,\n            \"requires_co_attendance\": role == UserRole.VENDOR,\n            \"requires_approval\": role == UserRole.VENDOR,\n        }\n\n    def request_session(self, user_id, user_role, source_ip,\n                        target_system, target_ip, protocol, purpose):\n        \"\"\"Request a new remote access session.\"\"\"\n        # Generate unique session ID\n        session_id = hashlib.sha256(\n            f\"{user_id}{target_ip}{datetime.now().isoformat()}\".encode()\n        ).hexdigest()[:16]\n\n        # Check access policy\n        policy = self.access_policies.get(user_role)\n        if not policy:\n            return None, \"No access policy defined for role\"\n\n        if target_system not in policy[\"allowed_targets\"]:\n            self._audit(\"ACCESS_DENIED\", user_id, target_system,\n                       f\"Target not in allowed list for role {user_role}\")\n            return None, f\"Target {target_system} not authorized for role {user_role}\"\n\n        if protocol not in policy[\"allowed_protocols\"]:\n            self._audit(\"ACCESS_DENIED\", user_id, target_system,\n                       f\"Protocol {protocol} not allowed for role {user_role}\")\n            return None, f\"Protocol {protocol} not authorized\"\n\n        session = RemoteAccessSession(\n            session_id=session_id,\n            user_id=user_id,\n            user_role=user_role,\n            source_ip=source_ip,\n            target_system=target_system,\n            target_ip=target_ip,\n            protocol=protocol,\n            purpose=purpose,\n            max_duration_minutes=policy[\"max_duration_minutes\"],\n            created_at=datetime.now().isoformat(),\n        )\n\n        # Vendor sessions require approval\n        if policy.get(\"requires_approval\"):\n            session.state = SessionState.PENDING_APPROVAL\n        else:\n            session.state = SessionState.APPROVED\n\n        self.sessions[session_id] = session\n        self._audit(\"SESSION_REQUESTED\", user_id, target_system, purpose)\n\n        return session_id, \"Session created\"\n\n    def approve_session(self, session_id, approver_id):\n        \"\"\"Approve a pending vendor session.\"\"\"\n        session = self.sessions.get(session_id)\n        if not session:\n            return False, \"Session not found\"\n        if session.state != SessionState.PENDING_APPROVAL:\n            return False, \"Session not in pending approval state\"\n\n        session.state = SessionState.APPROVED\n        session.approved_by = approver_id\n        self._audit(\"SESSION_APPROVED\", approver_id, session.target_system,\n                    f\"Approved session {session_id} for {session.user_id}\")\n        return True, \"Session approved\"\n\n    def activate_session(self, session_id, mfa_token):\n        \"\"\"Activate an approved session after MFA verification.\"\"\"\n        session = self.sessions.get(session_id)\n        if not session or session.state != SessionState.APPROVED:\n            return False, \"Session not approved\"\n\n        # Verify MFA (simplified - real implementation calls MFA provider)\n        session.mfa_verified = True\n        session.state = SessionState.ACTIVE\n        session.started_at = datetime.now().isoformat()\n        session.recording_path = f\"\u002Frecordings\u002F{session_id}_{datetime.now().strftime('%Y%m%d')}.mp4\"\n\n        self.active_sessions[session_id] = session\n        self._audit(\"SESSION_ACTIVATED\", session.user_id, session.target_system,\n                    f\"MFA verified, recording to {session.recording_path}\")\n\n        return True, \"Session active\"\n\n    def terminate_session(self, session_id, reason=\"manual\"):\n        \"\"\"Terminate an active session.\"\"\"\n        session = self.active_sessions.pop(session_id, None)\n        if not session:\n            session = self.sessions.get(session_id)\n        if not session:\n            return False\n\n        session.state = SessionState.TERMINATED\n        session.ended_at = datetime.now().isoformat()\n        self._audit(\"SESSION_TERMINATED\", session.user_id, session.target_system, reason)\n        return True\n\n    def check_expired_sessions(self):\n        \"\"\"Terminate sessions that have exceeded their maximum duration.\"\"\"\n        now = datetime.now()\n        expired = []\n        for sid, session in list(self.active_sessions.items()):\n            started = datetime.fromisoformat(session.started_at)\n            if (now - started).total_seconds() > session.max_duration_minutes * 60:\n                self.terminate_session(sid, \"maximum_duration_exceeded\")\n                expired.append(sid)\n        return expired\n\n    def _audit(self, event_type, user_id, target, detail):\n        \"\"\"Write to audit log.\"\"\"\n        self.audit_log.append({\n            \"timestamp\": datetime.now().isoformat(),\n            \"event\": event_type,\n            \"user\": user_id,\n            \"target\": target,\n            \"detail\": detail,\n        })\n\n    def generate_report(self):\n        \"\"\"Generate remote access session report.\"\"\"\n        report = []\n        report.append(\"=\" * 70)\n        report.append(\"OT REMOTE ACCESS SESSION REPORT\")\n        report.append(f\"Date: {datetime.now().isoformat()}\")\n        report.append(\"=\" * 70)\n\n        # Session summary\n        total = len(self.sessions)\n        active = sum(1 for s in self.sessions.values() if s.state == SessionState.ACTIVE)\n        report.append(f\"\\nTotal Sessions: {total}\")\n        report.append(f\"Active Sessions: {active}\")\n\n        # Active sessions detail\n        if self.active_sessions:\n            report.append(\"\\nACTIVE SESSIONS:\")\n            for sid, s in self.active_sessions.items():\n                report.append(f\"  [{sid[:8]}] {s.user_id} ({s.user_role})\")\n                report.append(f\"    Target: {s.target_system} ({s.target_ip})\")\n                report.append(f\"    Started: {s.started_at}\")\n                report.append(f\"    MFA: {'Verified' if s.mfa_verified else 'NOT VERIFIED'}\")\n\n        return \"\\n\".join(report)\n\n\nif __name__ == \"__main__\":\n    manager = OTRemoteAccessManager()\n\n    # Define policies\n    manager.define_access_policy(\n        UserRole.OT_ENGINEER,\n        [\"HMI-01\", \"HMI-02\", \"EWS-01\", \"HISTORIAN-01\"],\n        [\"RDP\", \"SSH\"],\n        max_duration=240,\n    )\n    manager.define_access_policy(\n        UserRole.VENDOR,\n        [\"DCS-EWS-01\"],\n        [\"RDP\"],\n        max_duration=120,\n    )\n\n    # Request vendor session\n    sid, msg = manager.request_session(\n        \"vendor_honeywell_01\", UserRole.VENDOR,\n        \"203.0.113.50\", \"DCS-EWS-01\", \"10.30.1.20\",\n        \"RDP\", \"DCS firmware update per change request CR-2026-0045\")\n    print(f\"Session request: {msg} ({sid})\")\n\n    if sid:\n        manager.approve_session(sid, \"ot_manager_01\")\n        manager.activate_session(sid, \"123456\")\n        print(manager.generate_report())\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| Intermediate System | System in the DMZ that terminates external connections and brokers new connections to OT, preventing direct network access per CIP-005 |\n| Jump Server | Hardened bastion host in the DMZ used for remote access sessions to OT systems with session recording and access controls |\n| Session Recording | Capture of all remote access session activity (screen, keystrokes, commands) for security audit and incident investigation |\n| Privileged Access Management (PAM) | System for vaulting credentials, controlling access, and auditing privileged sessions to critical OT systems |\n| Co-Attendance | Requirement for an OT operator to monitor vendor remote access sessions in real time |\n| Time-Limited Access | Vendor accounts enabled only for specific maintenance windows and automatically disabled after the window closes |\n\n## Tools & Systems\n\n- **CyberArk Privileged Access Security**: Enterprise PAM with session management, credential vaulting, and recording for OT remote access\n- **BeyondTrust Privileged Remote Access**: Purpose-built remote access solution with session recording and granular access policies\n- **Claroty Secure Remote Access (SRA)**: OT-specific remote access solution with protocol-aware session controls\n- **Duo Security**: MFA provider supporting push notifications, hardware tokens, and biometrics for OT access verification\n\n## Output Format\n\n```\nOT Remote Access Security Report\n===================================\nActive Sessions: [N]\nPending Approval: [N]\nSessions Today: [N]\n\nMFA COMPLIANCE:\n  All sessions MFA verified: [Yes\u002FNo]\n  Sessions without MFA: [N]\n\nVENDOR ACCESS:\n  Active vendor sessions: [N]\n  Co-attended: [N]\n  Recorded: [N]\n```\n",{"name":5,"tags":44,"author":53,"domain":38,"license":15,"version":54,"nist_csf":55,"subdomain":60,"description":61,"mitre_attack":62},[45,46,47,48,49,50,51,52],"ot-security","ics","scada","industrial-control","iec62443","remote-access","jump-server","mfa","mahipal","1.0.0",[56,57,58,59],"PR.IR-01","DE.CM-01","ID.AM-05","GV.OC-02","ot-ics-security","This skill covers implementing secure remote access to OT\u002FICS environments for operators, engineers, and vendors while preventing unauthorized access that could compromise industrial operations. It addresses jump server architecture, multi-factor authentication, session recording, privileged access management, vendor remote access controls, and compliance with IEC 62443 and NERC CIP-005 remote access requirements.\n",[63,64,65,66,67],"T1078","T1190","T1059","T0816","T0836","main","7925716f065257435fdb12e97f7e52842147d5ad",".claude\u002Fskills\u002Fsecuring-remote-access-to-ot-environment","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude","https:\u002F\u002Fclaude.com\u002Fclaude-code","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho","Software · Applied AI · Quantitative Modeling · Building with Claude.","2026-06-10 12:24:46",{"source":8,"skillName":5,"commands":77,"prompt":87,"zipAvailable":88},[78,81,84],{"tool":79,"command":80},"npx","npx skills add henriquescastilho\u002Fmy-claude --skill securing-remote-access-to-ot-environment",{"tool":82,"command":83},"bunx","bunx skills add henriquescastilho\u002Fmy-claude --skill securing-remote-access-to-ot-environment",{"tool":85,"command":86},"pnpm","pnpm dlx skills add henriquescastilho\u002Fmy-claude --skill securing-remote-access-to-ot-environment","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002FSKILL.md",true,[90,95,101],{"path":91,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002FLICENSE",{"path":96,"resourceType":97,"resourceTypeDesc":98,"sizeBytes":99,"sourceHtmlUrl":100},"references\u002Fapi-reference.md","REFERENCE","参考文档",1737,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002Freferences\u002Fapi-reference.md",{"path":102,"resourceType":103,"resourceTypeDesc":104,"sizeBytes":105,"sourceHtmlUrl":106},"scripts\u002Fagent.py","SCRIPT","脚本",7218,"https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fsecuring-remote-access-to-ot-environment\u002Fscripts\u002Fagent.py",[108,135,140,145,167,192],{"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":112,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":39},"01M6F0B6XPQ65AX2X0DWK8KT3E","markitdown","Convert files and office documents to Markdown. Supports PDF, DOCX, PPTX, XLSX, images (with OCR), audio (with transcription), HTML, CSV, JSON, XML, ZIP, YouTube URLs, EPubs and more.","MIT","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[],[110,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134],"docx","PDF","pptx","xlsx","documents","csv","ocr","Audio","Bash","markdown","convert","read","write","edit","html","images","files","youtube","with",{"skillNo":136,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":39},"01M6F06SBHR9F0SDWE282Y8075","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002Fscientific_writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[],[110,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134],{"skillNo":141,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":39},"01M6F02D4R14EJAPBWVDF9J9VQ","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-writer\u002F.claude\u002Fskills\u002Fmarkitdown\u002FSKILL.md",[],[110,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134],{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":39},"01M6F000KS6YB4MKS774G4R8ND","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fzarr-python\u002FSKILL.md",[],[152,153,154,155,156,157,158,159,160,161,162,163,164,165,166],"python","zarr python","storage","integration","s3","gcs","cloud","dask","parallel","pipelines","arrays","numpy","scientific computing","scale","scientific",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":39},"01M6EZZJWFXM1GR78KTW6J0DN8","what-if-oracle","Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like \"what if...\", \"what would happen if...\", \"what are the possibilities\", \"explore scenarios\", \"scenario analysis\", \"possibility space\", \"what could go wrong\", \"best case \u002F worst case\", \"risk analysis\", \"contingency planning\", \"strategic options\", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fwhat-if-oracle\u002FSKILL.md",[],[174,175,176,177,178,179,180,181,182,183,184,127,128,185,186,187,188,189,190,191],"oracle","what if oracle","go","run","ux","futures","analysis","explore","decision","branch","question","idea","exploration","options","stress-test","strategies","scenario","stress",{"skillNo":193,"name":194,"nameZh":6,"description":195,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":112,"licenseFileUrl":6,"sourceHtmlUrl":196,"categories":197,"keywords":198,"publishedAt":39},"01M6EZZCXAEB49RXGQCJX5E8GB","venue-templates","Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.","https:\u002F\u002Fgithub.com\u002Fhenriquescastilho\u002Fmy-claude\u002Fblob\u002Fmain\u002F.codex\u002Fvendor_imports\u002Fclaude\u002Fmarketplaces\u002Fclaude-scientific-skills\u002Fscientific-skills\u002Fvenue-templates\u002FSKILL.md",[],[199,200,201,202,203,204,205,206,124,22,127,128,129,207,208,209,210,211,166,212],"templates","venue templates","research","guidelines","NeurIPS","ICML","LaTeX","science","proposals","Academic","requirements","formatting","journal","chi"]