[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71CT8N4TP9Z6SQ90GPS87YH":3,"skill-same:01M71CT8N4TP9Z6SQ90GPS87YH":100},{"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":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":73,"commitSha":74,"skillDirectory":75,"forksCount":14,"repositoryHtmlUrl":76,"repositoryHomepageUrl":6,"ownerHtmlUrl":77,"ownerBlogUrl":6,"ownerDescription":78,"updatedAt":79,"install":80,"resources":93},"01M71CT8N4TP9Z6SQ90GPS87YH","cloud-nerc-audit",null,"This skill covers implementing North American Electric Reliability Corporation Critical Infrastructure Protection (NERC CIP) compliance controls for Bulk Electric System (BES) cyber systems. It addresses asset categorization (CIP-002), electronic security perimeters (CIP-005), system security management (CIP-007), configuration management (CIP-010), supply chain risk management (CIP-013), and the 2025 updates including mandatory MFA for remote access and expanded low-impact asset requirements.","DCx7C5\u002Fai-marketplace","DCx7C5","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42419559?v=4","01M71C01G2AZV3NTNGWAWSHJPP","DC","01M71C01GQW6G50S2BYMS7PP3E",0,"MIT","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fcompliance\u002Fcloud\u002Fnerc\u002Faudit\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"audit","cloud","cloud nerc audit","ICS-security","security management","de","Bash","updates","critical","access","cybersecurity","impact","remote","2025","implementing","cm","chain","power","reliability","bulk","2026-11-10 10:12:30",false,"---\nname: cloud-nerc-audit\ndescription: This skill covers implementing North American Electric Reliability Corporation Critical Infrastructure Protection (NERC CIP) compliance controls for Bulk Electric System (BES) cyber systems. It addresses asset categorization (CIP-002), electronic security perimeters (CIP-005), system security management (CIP-007), configuration management (CIP-010), supply chain risk management (CIP-013), and the 2025 updates including mandatory MFA for remote access and expanded low-impact asset requirements.\ndomain: cybersecurity\nsubdomain: ot-ics-security\ntags:\n- ot-security\n- ics\n- scada\n- industrial-control\n- iec62443\n- nerc-cip\n- power-grid\n- compliance\nnist_csf:\n- PR.IR-01\n- DE.CM-01\n- ID.AM-05\n- GV.OC-02\nmodel: sonnet\nmaxTurns: 20\ntools: [Read, Bash, Glob, Grep]\nmitre_attack:\n- T0855\ncapec: []\n---\n\n# Implementing NERC CIP Compliance Controls\n\n## When to Use\n\n- When a registered entity must achieve or maintain NERC CIP compliance for BES cyber systems\n- When preparing for a NERC CIP compliance audit by the Regional Entity\n- When implementing the 2025 CIP standard updates (CIP-003-9, CIP-005-7, CIP-010-4, CIP-013-2)\n- When categorizing BES cyber systems after commissioning new generation, transmission, or control center assets\n- When developing a compliance monitoring and evidence collection program\n\n**Do not use** for non-BES industrial systems (see implementing-iec-62443-security-zones), for general IT compliance frameworks (see auditing-cloud-with-cis-benchmarks), or for physical security of substations without cyber components.\n\n## Prerequisites\n\n- Understanding of NERC CIP standards (CIP-002 through CIP-014)\n- BES cyber system inventory with impact ratings (high, medium, low)\n- Access to Electronic Security Perimeter (ESP) network diagrams and firewall configurations\n- Compliance management system for evidence collection and audit documentation\n- Familiarity with NERC Glossary of Terms (BES Cyber Asset, BES Cyber System, Electronic Access Point)\n\n## Workflow\n\n### Step 1: Categorize BES Cyber Systems (CIP-002-5.1a)\n\nIdentify and categorize all BES cyber systems based on their impact to the reliable operation of the Bulk Electric System.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"NERC CIP BES Cyber System Categorization Tool.\n\nImplements CIP-002-5.1a categorization criteria to classify\nBES cyber systems as high, medium, or low impact.\n\"\"\"\n\nimport json\nimport sys\nfrom dataclasses import dataclass, field, asdict\nfrom datetime import datetime\n\n\n@dataclass\nclass BESCyberSystem:\n    \"\"\"Represents a BES Cyber System for CIP-002 categorization.\"\"\"\n    system_id: str\n    name: str\n    description: str\n    location: str\n    asset_type: str  # control_center, generation, transmission, distribution\n    connected_mw: float = 0\n    transmission_kv: float = 0\n    is_control_center: bool = False\n    is_backup_control_center: bool = False\n    has_cranking_path: bool = False\n    has_blackstart: bool = False\n    is_sps_ras: bool = False  # Special Protection System \u002F Remedial Action Scheme\n    impact_rating: str = \"\"  # high, medium, low\n    categorization_basis: str = \"\"\n    cyber_assets: list = field(default_factory=list)\n\n\nclass CIP002Categorizer:\n    \"\"\"NERC CIP-002-5.1a BES Cyber System categorization engine.\"\"\"\n\n    def __init__(self):\n        self.systems = []\n        self.categorization_date = datetime.now().isoformat()\n\n    def add_system(self, system: BESCyberSystem):\n        self.systems.append(system)\n\n    def categorize_all(self):\n        \"\"\"Apply CIP-002 Attachment 1 criteria to all systems.\"\"\"\n        for system in self.systems:\n            self._categorize_system(system)\n\n    def _categorize_system(self, sys):\n        \"\"\"Apply high, medium, low impact criteria per CIP-002 Attachment 1.\"\"\"\n\n        # HIGH IMPACT criteria (CIP-002 Attachment 1, Criterion 1)\n        if sys.is_control_center and sys.asset_type == \"control_center\":\n            # Control Centers that perform the functional obligations\n            # of a Reliability Coordinator, Balancing Authority, or TOP\n            sys.impact_rating = \"high\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 1.1: Control Center performing \"\n                \"RC\u002FBA\u002FTOP functional obligations\"\n            )\n            return\n\n        if sys.is_backup_control_center and sys.asset_type == \"control_center\":\n            sys.impact_rating = \"high\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 1.2: Backup Control Center performing \"\n                \"RC\u002FBA\u002FTOP functional obligations\"\n            )\n            return\n\n        if sys.connected_mw >= 3000:\n            sys.impact_rating = \"high\"\n            sys.categorization_basis = (\n                f\"CIP-002 Att.1 Criterion 1.3: Generation >= 3000 MW \"\n                f\"(actual: {sys.connected_mw} MW)\"\n            )\n            return\n\n        # MEDIUM IMPACT criteria (CIP-002 Attachment 1, Criterion 2)\n        if sys.connected_mw >= 1500 and sys.asset_type == \"generation\":\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                f\"CIP-002 Att.1 Criterion 2.1: Generation >= 1500 MW \"\n                f\"(actual: {sys.connected_mw} MW)\"\n            )\n            return\n\n        if sys.transmission_kv >= 500:\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                f\"CIP-002 Att.1 Criterion 2.5: Transmission >= 500 kV \"\n                f\"(actual: {sys.transmission_kv} kV)\"\n            )\n            return\n\n        if sys.has_cranking_path:\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 2.6: Cranking path element\"\n            )\n            return\n\n        if sys.has_blackstart:\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 2.7: Blackstart resource\"\n            )\n            return\n\n        if sys.is_sps_ras:\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 2.9: SPS\u002FRAS component\"\n            )\n            return\n\n        if sys.is_control_center and sys.asset_type == \"generation\":\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 2.11: Generation control center \"\n                \"for medium impact generation\"\n            )\n            return\n\n        # LOW IMPACT - all other BES Cyber Systems\n        sys.impact_rating = \"low\"\n        sys.categorization_basis = (\n            \"CIP-002 Att.1 Criterion 3: BES Cyber System not meeting \"\n            \"high or medium impact criteria\"\n        )\n\n    def generate_report(self):\n        \"\"\"Generate CIP-002 categorization report.\"\"\"\n        high = [s for s in self.systems if s.impact_rating == \"high\"]\n        medium = [s for s in self.systems if s.impact_rating == \"medium\"]\n        low = [s for s in self.systems if s.impact_rating == \"low\"]\n\n        report = []\n        report.append(\"=\" * 70)\n        report.append(\"NERC CIP-002-5.1a BES CYBER SYSTEM CATEGORIZATION\")\n        report.append(f\"Date: {self.categorization_date}\")\n        report.append(\"=\" * 70)\n        report.append(f\"\\nTotal BES Cyber Systems: {len(self.systems)}\")\n        report.append(f\"  High Impact: {len(high)}\")\n        report.append(f\"  Medium Impact: {len(medium)}\")\n        report.append(f\"  Low Impact: {len(low)}\")\n\n        for category, systems in [(\"HIGH\", high), (\"MEDIUM\", medium), (\"LOW\", low)]:\n            if systems:\n                report.append(f\"\\n--- {category} IMPACT SYSTEMS ---\")\n                for s in systems:\n                    report.append(f\"  [{s.system_id}] {s.name}\")\n                    report.append(f\"    Location: {s.location}\")\n                    report.append(f\"    Type: {s.asset_type}\")\n                    report.append(f\"    Basis: {s.categorization_basis}\")\n                    report.append(f\"    Cyber Assets: {len(s.cyber_assets)}\")\n\n        return \"\\n\".join(report)\n\n    def export_json(self, output_file):\n        \"\"\"Export categorization to JSON for compliance evidence.\"\"\"\n        data = {\n            \"categorization_date\": self.categorization_date,\n            \"standard\": \"CIP-002-5.1a\",\n            \"systems\": [asdict(s) for s in self.systems],\n        }\n        with open(output_file, \"w\") as f:\n            json.dump(data, f, indent=2)\n\n\nif __name__ == \"__main__\":\n    categorizer = CIP002Categorizer()\n\n    # Example BES Cyber Systems\n    categorizer.add_system(BESCyberSystem(\n        system_id=\"BCS-001\", name=\"Main Energy Control Center EMS\",\n        description=\"Energy Management System for BA operations\",\n        location=\"Control Center Alpha\", asset_type=\"control_center\",\n        is_control_center=True))\n\n    categorizer.add_system(BESCyberSystem(\n        system_id=\"BCS-002\", name=\"Wind Farm SCADA\",\n        description=\"SCADA for 500MW wind generation facility\",\n        location=\"Wind Farm Delta\", asset_type=\"generation\",\n        connected_mw=500))\n\n    categorizer.add_system(BESCyberSystem(\n        system_id=\"BCS-003\", name=\"Substation Alpha RTU\",\n        description=\"345kV transmission substation\",\n        location=\"Substation Alpha\", asset_type=\"transmission\",\n        transmission_kv=345))\n\n    categorizer.categorize_all()\n    print(categorizer.generate_report())\n```\n\n### Step 2: Implement Electronic Security Perimeters (CIP-005-7)\n\nDefine and enforce Electronic Security Perimeters (ESP) around high and medium impact BES cyber systems with Electronic Access Points (EAP) at all boundary crossing points.\n\n```bash\n# Electronic Security Perimeter - Firewall Configuration\n# CIP-005-7 R1: Electronic Security Perimeter\n\n# Define ESP boundary for Control Center EMS (High Impact)\n# All BES Cyber Assets within the ESP boundary\n\n# Palo Alto PA-3260 - ESP Boundary Firewall\n\n# Inbound rules - strictly limit what enters the ESP\n# CIP-005-7 R1.3: All inbound\u002Foutbound access permissions documented\n\n# Allow ICCP (Inter-Control Center Communications Protocol) from neighbor BA\nset rulebase security rules ICCP-Inbound from Corporate-Zone to ESP-Zone\nset rulebase security rules ICCP-Inbound source 192.168.100.10\nset rulebase security rules ICCP-Inbound destination 10.20.1.50\nset rulebase security rules ICCP-Inbound application iccp\nset rulebase security rules ICCP-Inbound service application-default\nset rulebase security rules ICCP-Inbound action allow\nset rulebase security rules ICCP-Inbound log-setting CIP-Audit-Log\n\n# Allow NTP for time synchronization (CIP-007 R5.7)\nset rulebase security rules NTP-Inbound from Corporate-Zone to ESP-Zone\nset rulebase security rules NTP-Inbound source 192.168.100.1\nset rulebase security rules NTP-Inbound destination 10.20.1.1\nset rulebase security rules NTP-Inbound application ntp\nset rulebase security rules NTP-Inbound action allow\n\n# CIP-005-7 R2: Remote Access Management\n# Require Intermediate System for all remote access sessions\n# CIP-005-7 R2.4: Multi-factor authentication required (2025 update)\n\nset rulebase security rules RemoteAccess from External to DMZ-Zone\nset rulebase security rules RemoteAccess destination 172.16.1.10\nset rulebase security rules RemoteAccess application ssl-vpn\nset rulebase security rules RemoteAccess action allow\n# MFA enforced on Intermediate System (jump server)\n\n# Default deny all other traffic\nset rulebase security rules ESP-Default-Deny from any to ESP-Zone\nset rulebase security rules ESP-Default-Deny action deny\nset rulebase security rules ESP-Default-Deny log-setting CIP-Audit-Log\n```\n\n### Step 3: Implement System Security Management (CIP-007-6)\n\nConfigure security controls for BES cyber assets including port management, security patching, malicious code prevention, and security event monitoring.\n\n```yaml\n# CIP-007-6 Implementation Checklist\n\ncip_007_controls:\n  R1_ports_services:\n    description: \"Ports and Services Management\"\n    requirements:\n      - \"Disable or restrict all unnecessary physical ports (USB, serial)\"\n      - \"Disable all unnecessary logical ports and services\"\n      - \"Document all enabled ports\u002Fservices with business justification\"\n    implementation:\n      windows_servers: |\n        # Disable unnecessary services on Windows BES Cyber Assets\n        Set-Service -Name \"RemoteRegistry\" -StartupType Disabled\n        Set-Service -Name \"WinRM\" -StartupType Disabled\n        Set-Service -Name \"Spooler\" -StartupType Disabled\n        # Disable USB storage via Group Policy\n        # Computer Config > Admin Templates > System > Removable Storage Access\n      linux_servers: |\n        # Disable unnecessary services\n        systemctl disable cups bluetooth avahi-daemon\n        systemctl mask cups bluetooth avahi-daemon\n        # Disable USB storage\n        echo \"blacklist usb-storage\" > \u002Fetc\u002Fmodprobe.d\u002Fdisable-usb.conf\n\n  R2_security_patches:\n    description: \"Security Patch Management\"\n    requirements:\n      - \"Track security patches for all BES Cyber Systems\"\n      - \"Evaluate patches within 35 days of availability\"\n      - \"Apply patches or document mitigation plan\"\n      - \"Test patches in non-production before deployment\"\n    implementation:\n      tracking: \"Use WSUS\u002FSCCM for Windows; yum\u002Fdnf for Linux\"\n      testing: \"Maintain staging environment mirroring production\"\n      evidence: \"Document patch evaluation in compliance tracking system\"\n\n  R3_malicious_code:\n    description: \"Malicious Code Prevention\"\n    requirements:\n      - \"Deploy anti-malware on all applicable BES Cyber Assets\"\n      - \"Update signatures or use application allowlisting\"\n      - \"Mitigate threats from transient cyber assets\"\n    implementation:\n      servers: \"CrowdFalcon or Carbon Black with OT-optimized policy\"\n      hmi_stations: \"Application allowlisting (Carbon Black App Control)\"\n      transient_devices: \"Scan all removable media before connection to BCA\"\n\n  R4_security_event_monitoring:\n    description: \"Security Event Monitoring\"\n    requirements:\n      - \"Log security events on all high\u002Fmedium impact BCS\"\n      - \"Generate alerts for detected security events\"\n      - \"Retain logs for minimum 90 days (CIP-007-6 R4.3)\"\n      - \"Review logs at minimum every 15 days\"\n    implementation:\n      siem: \"Splunk Enterprise Security with CIP content pack\"\n      log_sources:\n        - \"ESP boundary firewall logs\"\n        - \"EAP authentication logs\"\n        - \"BES Cyber Asset authentication success\u002Ffailure\"\n        - \"Remote access session logs\"\n        - \"Malicious code detection events\"\n      retention: \"90 days online, 3 years archived\"\n\n  R5_system_access:\n    description: \"System Access Control\"\n    requirements:\n      - \"Enforce authentication for all interactive access\"\n      - \"Implement least-privilege access control\"\n      - \"Change default passwords\"\n      - \"Enforce password complexity (CIP-007-6 R5.5)\"\n      - \"Limit unsuccessful login attempts\"\n    implementation:\n      password_policy:\n        min_length: 8\n        complexity: \"Mixed case + numbers + special characters\"\n        max_age_days: 365\n        lockout_threshold: 5\n        lockout_duration_minutes: 30\n      shared_accounts: \"Document all shared\u002Fservice accounts with authorization\"\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| BES Cyber System | Group of one or more BES Cyber Assets that perform a reliability function for the Bulk Electric System |\n| Electronic Security Perimeter (ESP) | Logical border surrounding a network containing BES Cyber Systems, with all traffic flowing through Electronic Access Points |\n| Electronic Access Point (EAP) | Interface on the ESP boundary that controls traffic flowing in and out of the ESP |\n| Intermediate System | System used for remote access that prevents direct connectivity to BES Cyber Assets (jump server) |\n| Transient Cyber Asset | Device that is directly connected to a BES Cyber System for less than 30 consecutive calendar days (laptops, USB drives) |\n| NERC Glossary | Official definitions used in CIP standards; precise terminology required for compliance |\n\n## Tools & Systems\n\n- **Tripwire Enterprise**: Configuration compliance monitoring and file integrity monitoring for CIP-010 baseline management\n- **Splunk with CIP Content Pack**: SIEM with pre-built CIP-007 security event monitoring dashboards and alerts\n- **Carbon Black App Control**: Application allowlisting for HMI stations and BES cyber assets (CIP-007 R3)\n- **Trellix\u002FMcAfee ePO**: Endpoint protection with OT-optimized scanning policies for BES cyber assets\n\n## Output Format\n\n```\nNERC CIP Compliance Assessment Report\n=======================================\nEntity: [Registered Entity Name]\nDate: YYYY-MM-DD\nStandards: CIP-002 through CIP-014\n\nBES CYBER SYSTEM CATEGORIZATION:\n  High Impact: [N] systems\n  Medium Impact: [N] systems\n  Low Impact: [N] systems\n\nCOMPLIANCE STATUS BY STANDARD:\n  CIP-002: [Compliant\u002FPartial\u002FNon-Compliant]\n  CIP-005: [Status] - [N] gaps identified\n  CIP-007: [Status] - [N] gaps identified\n  CIP-010: [Status] - [N] gaps identified\n  CIP-013: [Status] - [N] gaps identified\n```\n","# Implementing NERC CIP Compliance Controls\n\n## When to Use\n\n- When a registered entity must achieve or maintain NERC CIP compliance for BES cyber systems\n- When preparing for a NERC CIP compliance audit by the Regional Entity\n- When implementing the 2025 CIP standard updates (CIP-003-9, CIP-005-7, CIP-010-4, CIP-013-2)\n- When categorizing BES cyber systems after commissioning new generation, transmission, or control center assets\n- When developing a compliance monitoring and evidence collection program\n\n**Do not use** for non-BES industrial systems (see implementing-iec-62443-security-zones), for general IT compliance frameworks (see auditing-cloud-with-cis-benchmarks), or for physical security of substations without cyber components.\n\n## Prerequisites\n\n- Understanding of NERC CIP standards (CIP-002 through CIP-014)\n- BES cyber system inventory with impact ratings (high, medium, low)\n- Access to Electronic Security Perimeter (ESP) network diagrams and firewall configurations\n- Compliance management system for evidence collection and audit documentation\n- Familiarity with NERC Glossary of Terms (BES Cyber Asset, BES Cyber System, Electronic Access Point)\n\n## Workflow\n\n### Step 1: Categorize BES Cyber Systems (CIP-002-5.1a)\n\nIdentify and categorize all BES cyber systems based on their impact to the reliable operation of the Bulk Electric System.\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"NERC CIP BES Cyber System Categorization Tool.\n\nImplements CIP-002-5.1a categorization criteria to classify\nBES cyber systems as high, medium, or low impact.\n\"\"\"\n\nimport json\nimport sys\nfrom dataclasses import dataclass, field, asdict\nfrom datetime import datetime\n\n\n@dataclass\nclass BESCyberSystem:\n    \"\"\"Represents a BES Cyber System for CIP-002 categorization.\"\"\"\n    system_id: str\n    name: str\n    description: str\n    location: str\n    asset_type: str  # control_center, generation, transmission, distribution\n    connected_mw: float = 0\n    transmission_kv: float = 0\n    is_control_center: bool = False\n    is_backup_control_center: bool = False\n    has_cranking_path: bool = False\n    has_blackstart: bool = False\n    is_sps_ras: bool = False  # Special Protection System \u002F Remedial Action Scheme\n    impact_rating: str = \"\"  # high, medium, low\n    categorization_basis: str = \"\"\n    cyber_assets: list = field(default_factory=list)\n\n\nclass CIP002Categorizer:\n    \"\"\"NERC CIP-002-5.1a BES Cyber System categorization engine.\"\"\"\n\n    def __init__(self):\n        self.systems = []\n        self.categorization_date = datetime.now().isoformat()\n\n    def add_system(self, system: BESCyberSystem):\n        self.systems.append(system)\n\n    def categorize_all(self):\n        \"\"\"Apply CIP-002 Attachment 1 criteria to all systems.\"\"\"\n        for system in self.systems:\n            self._categorize_system(system)\n\n    def _categorize_system(self, sys):\n        \"\"\"Apply high, medium, low impact criteria per CIP-002 Attachment 1.\"\"\"\n\n        # HIGH IMPACT criteria (CIP-002 Attachment 1, Criterion 1)\n        if sys.is_control_center and sys.asset_type == \"control_center\":\n            # Control Centers that perform the functional obligations\n            # of a Reliability Coordinator, Balancing Authority, or TOP\n            sys.impact_rating = \"high\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 1.1: Control Center performing \"\n                \"RC\u002FBA\u002FTOP functional obligations\"\n            )\n            return\n\n        if sys.is_backup_control_center and sys.asset_type == \"control_center\":\n            sys.impact_rating = \"high\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 1.2: Backup Control Center performing \"\n                \"RC\u002FBA\u002FTOP functional obligations\"\n            )\n            return\n\n        if sys.connected_mw >= 3000:\n            sys.impact_rating = \"high\"\n            sys.categorization_basis = (\n                f\"CIP-002 Att.1 Criterion 1.3: Generation >= 3000 MW \"\n                f\"(actual: {sys.connected_mw} MW)\"\n            )\n            return\n\n        # MEDIUM IMPACT criteria (CIP-002 Attachment 1, Criterion 2)\n        if sys.connected_mw >= 1500 and sys.asset_type == \"generation\":\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                f\"CIP-002 Att.1 Criterion 2.1: Generation >= 1500 MW \"\n                f\"(actual: {sys.connected_mw} MW)\"\n            )\n            return\n\n        if sys.transmission_kv >= 500:\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                f\"CIP-002 Att.1 Criterion 2.5: Transmission >= 500 kV \"\n                f\"(actual: {sys.transmission_kv} kV)\"\n            )\n            return\n\n        if sys.has_cranking_path:\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 2.6: Cranking path element\"\n            )\n            return\n\n        if sys.has_blackstart:\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 2.7: Blackstart resource\"\n            )\n            return\n\n        if sys.is_sps_ras:\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 2.9: SPS\u002FRAS component\"\n            )\n            return\n\n        if sys.is_control_center and sys.asset_type == \"generation\":\n            sys.impact_rating = \"medium\"\n            sys.categorization_basis = (\n                \"CIP-002 Att.1 Criterion 2.11: Generation control center \"\n                \"for medium impact generation\"\n            )\n            return\n\n        # LOW IMPACT - all other BES Cyber Systems\n        sys.impact_rating = \"low\"\n        sys.categorization_basis = (\n            \"CIP-002 Att.1 Criterion 3: BES Cyber System not meeting \"\n            \"high or medium impact criteria\"\n        )\n\n    def generate_report(self):\n        \"\"\"Generate CIP-002 categorization report.\"\"\"\n        high = [s for s in self.systems if s.impact_rating == \"high\"]\n        medium = [s for s in self.systems if s.impact_rating == \"medium\"]\n        low = [s for s in self.systems if s.impact_rating == \"low\"]\n\n        report = []\n        report.append(\"=\" * 70)\n        report.append(\"NERC CIP-002-5.1a BES CYBER SYSTEM CATEGORIZATION\")\n        report.append(f\"Date: {self.categorization_date}\")\n        report.append(\"=\" * 70)\n        report.append(f\"\\nTotal BES Cyber Systems: {len(self.systems)}\")\n        report.append(f\"  High Impact: {len(high)}\")\n        report.append(f\"  Medium Impact: {len(medium)}\")\n        report.append(f\"  Low Impact: {len(low)}\")\n\n        for category, systems in [(\"HIGH\", high), (\"MEDIUM\", medium), (\"LOW\", low)]:\n            if systems:\n                report.append(f\"\\n--- {category} IMPACT SYSTEMS ---\")\n                for s in systems:\n                    report.append(f\"  [{s.system_id}] {s.name}\")\n                    report.append(f\"    Location: {s.location}\")\n                    report.append(f\"    Type: {s.asset_type}\")\n                    report.append(f\"    Basis: {s.categorization_basis}\")\n                    report.append(f\"    Cyber Assets: {len(s.cyber_assets)}\")\n\n        return \"\\n\".join(report)\n\n    def export_json(self, output_file):\n        \"\"\"Export categorization to JSON for compliance evidence.\"\"\"\n        data = {\n            \"categorization_date\": self.categorization_date,\n            \"standard\": \"CIP-002-5.1a\",\n            \"systems\": [asdict(s) for s in self.systems],\n        }\n        with open(output_file, \"w\") as f:\n            json.dump(data, f, indent=2)\n\n\nif __name__ == \"__main__\":\n    categorizer = CIP002Categorizer()\n\n    # Example BES Cyber Systems\n    categorizer.add_system(BESCyberSystem(\n        system_id=\"BCS-001\", name=\"Main Energy Control Center EMS\",\n        description=\"Energy Management System for BA operations\",\n        location=\"Control Center Alpha\", asset_type=\"control_center\",\n        is_control_center=True))\n\n    categorizer.add_system(BESCyberSystem(\n        system_id=\"BCS-002\", name=\"Wind Farm SCADA\",\n        description=\"SCADA for 500MW wind generation facility\",\n        location=\"Wind Farm Delta\", asset_type=\"generation\",\n        connected_mw=500))\n\n    categorizer.add_system(BESCyberSystem(\n        system_id=\"BCS-003\", name=\"Substation Alpha RTU\",\n        description=\"345kV transmission substation\",\n        location=\"Substation Alpha\", asset_type=\"transmission\",\n        transmission_kv=345))\n\n    categorizer.categorize_all()\n    print(categorizer.generate_report())\n```\n\n### Step 2: Implement Electronic Security Perimeters (CIP-005-7)\n\nDefine and enforce Electronic Security Perimeters (ESP) around high and medium impact BES cyber systems with Electronic Access Points (EAP) at all boundary crossing points.\n\n```bash\n# Electronic Security Perimeter - Firewall Configuration\n# CIP-005-7 R1: Electronic Security Perimeter\n\n# Define ESP boundary for Control Center EMS (High Impact)\n# All BES Cyber Assets within the ESP boundary\n\n# Palo Alto PA-3260 - ESP Boundary Firewall\n\n# Inbound rules - strictly limit what enters the ESP\n# CIP-005-7 R1.3: All inbound\u002Foutbound access permissions documented\n\n# Allow ICCP (Inter-Control Center Communications Protocol) from neighbor BA\nset rulebase security rules ICCP-Inbound from Corporate-Zone to ESP-Zone\nset rulebase security rules ICCP-Inbound source 192.168.100.10\nset rulebase security rules ICCP-Inbound destination 10.20.1.50\nset rulebase security rules ICCP-Inbound application iccp\nset rulebase security rules ICCP-Inbound service application-default\nset rulebase security rules ICCP-Inbound action allow\nset rulebase security rules ICCP-Inbound log-setting CIP-Audit-Log\n\n# Allow NTP for time synchronization (CIP-007 R5.7)\nset rulebase security rules NTP-Inbound from Corporate-Zone to ESP-Zone\nset rulebase security rules NTP-Inbound source 192.168.100.1\nset rulebase security rules NTP-Inbound destination 10.20.1.1\nset rulebase security rules NTP-Inbound application ntp\nset rulebase security rules NTP-Inbound action allow\n\n# CIP-005-7 R2: Remote Access Management\n# Require Intermediate System for all remote access sessions\n# CIP-005-7 R2.4: Multi-factor authentication required (2025 update)\n\nset rulebase security rules RemoteAccess from External to DMZ-Zone\nset rulebase security rules RemoteAccess destination 172.16.1.10\nset rulebase security rules RemoteAccess application ssl-vpn\nset rulebase security rules RemoteAccess action allow\n# MFA enforced on Intermediate System (jump server)\n\n# Default deny all other traffic\nset rulebase security rules ESP-Default-Deny from any to ESP-Zone\nset rulebase security rules ESP-Default-Deny action deny\nset rulebase security rules ESP-Default-Deny log-setting CIP-Audit-Log\n```\n\n### Step 3: Implement System Security Management (CIP-007-6)\n\nConfigure security controls for BES cyber assets including port management, security patching, malicious code prevention, and security event monitoring.\n\n```yaml\n# CIP-007-6 Implementation Checklist\n\ncip_007_controls:\n  R1_ports_services:\n    description: \"Ports and Services Management\"\n    requirements:\n      - \"Disable or restrict all unnecessary physical ports (USB, serial)\"\n      - \"Disable all unnecessary logical ports and services\"\n      - \"Document all enabled ports\u002Fservices with business justification\"\n    implementation:\n      windows_servers: |\n        # Disable unnecessary services on Windows BES Cyber Assets\n        Set-Service -Name \"RemoteRegistry\" -StartupType Disabled\n        Set-Service -Name \"WinRM\" -StartupType Disabled\n        Set-Service -Name \"Spooler\" -StartupType Disabled\n        # Disable USB storage via Group Policy\n        # Computer Config > Admin Templates > System > Removable Storage Access\n      linux_servers: |\n        # Disable unnecessary services\n        systemctl disable cups bluetooth avahi-daemon\n        systemctl mask cups bluetooth avahi-daemon\n        # Disable USB storage\n        echo \"blacklist usb-storage\" > \u002Fetc\u002Fmodprobe.d\u002Fdisable-usb.conf\n\n  R2_security_patches:\n    description: \"Security Patch Management\"\n    requirements:\n      - \"Track security patches for all BES Cyber Systems\"\n      - \"Evaluate patches within 35 days of availability\"\n      - \"Apply patches or document mitigation plan\"\n      - \"Test patches in non-production before deployment\"\n    implementation:\n      tracking: \"Use WSUS\u002FSCCM for Windows; yum\u002Fdnf for Linux\"\n      testing: \"Maintain staging environment mirroring production\"\n      evidence: \"Document patch evaluation in compliance tracking system\"\n\n  R3_malicious_code:\n    description: \"Malicious Code Prevention\"\n    requirements:\n      - \"Deploy anti-malware on all applicable BES Cyber Assets\"\n      - \"Update signatures or use application allowlisting\"\n      - \"Mitigate threats from transient cyber assets\"\n    implementation:\n      servers: \"CrowdFalcon or Carbon Black with OT-optimized policy\"\n      hmi_stations: \"Application allowlisting (Carbon Black App Control)\"\n      transient_devices: \"Scan all removable media before connection to BCA\"\n\n  R4_security_event_monitoring:\n    description: \"Security Event Monitoring\"\n    requirements:\n      - \"Log security events on all high\u002Fmedium impact BCS\"\n      - \"Generate alerts for detected security events\"\n      - \"Retain logs for minimum 90 days (CIP-007-6 R4.3)\"\n      - \"Review logs at minimum every 15 days\"\n    implementation:\n      siem: \"Splunk Enterprise Security with CIP content pack\"\n      log_sources:\n        - \"ESP boundary firewall logs\"\n        - \"EAP authentication logs\"\n        - \"BES Cyber Asset authentication success\u002Ffailure\"\n        - \"Remote access session logs\"\n        - \"Malicious code detection events\"\n      retention: \"90 days online, 3 years archived\"\n\n  R5_system_access:\n    description: \"System Access Control\"\n    requirements:\n      - \"Enforce authentication for all interactive access\"\n      - \"Implement least-privilege access control\"\n      - \"Change default passwords\"\n      - \"Enforce password complexity (CIP-007-6 R5.5)\"\n      - \"Limit unsuccessful login attempts\"\n    implementation:\n      password_policy:\n        min_length: 8\n        complexity: \"Mixed case + numbers + special characters\"\n        max_age_days: 365\n        lockout_threshold: 5\n        lockout_duration_minutes: 30\n      shared_accounts: \"Document all shared\u002Fservice accounts with authorization\"\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| BES Cyber System | Group of one or more BES Cyber Assets that perform a reliability function for the Bulk Electric System |\n| Electronic Security Perimeter (ESP) | Logical border surrounding a network containing BES Cyber Systems, with all traffic flowing through Electronic Access Points |\n| Electronic Access Point (EAP) | Interface on the ESP boundary that controls traffic flowing in and out of the ESP |\n| Intermediate System | System used for remote access that prevents direct connectivity to BES Cyber Assets (jump server) |\n| Transient Cyber Asset | Device that is directly connected to a BES Cyber System for less than 30 consecutive calendar days (laptops, USB drives) |\n| NERC Glossary | Official definitions used in CIP standards; precise terminology required for compliance |\n\n## Tools & Systems\n\n- **Tripwire Enterprise**: Configuration compliance monitoring and file integrity monitoring for CIP-010 baseline management\n- **Splunk with CIP Content Pack**: SIEM with pre-built CIP-007 security event monitoring dashboards and alerts\n- **Carbon Black App Control**: Application allowlisting for HMI stations and BES cyber assets (CIP-007 R3)\n- **Trellix\u002FMcAfee ePO**: Endpoint protection with OT-optimized scanning policies for BES cyber assets\n\n## Output Format\n\n```\nNERC CIP Compliance Assessment Report\n=======================================\nEntity: [Registered Entity Name]\nDate: YYYY-MM-DD\nStandards: CIP-002 through CIP-014\n\nBES CYBER SYSTEM CATEGORIZATION:\n  High Impact: [N] systems\n  Medium Impact: [N] systems\n  Low Impact: [N] systems\n\nCOMPLIANCE STATUS BY STANDARD:\n  CIP-002: [Compliant\u002FPartial\u002FNon-Compliant]\n  CIP-005: [Status] - [N] gaps identified\n  CIP-007: [Status] - [N] gaps identified\n  CIP-010: [Status] - [N] gaps identified\n  CIP-013: [Status] - [N] gaps identified\n```\n",{"name":5,"tags":49,"capec":58,"model":59,"tools":60,"domain":34,"maxTurns":64,"nist_csf":65,"subdomain":70,"description":7,"mitre_attack":71},[50,51,52,53,54,55,56,57],"ot-security","ics","scada","industrial-control","iec62443","nerc-cip","power-grid","compliance",[],"sonnet",[61,30,62,63],"Read","Glob","Grep",20,[66,67,68,69],"PR.IR-01","DE.CM-01","ID.AM-05","GV.OC-02","ot-ics-security",[72],"T0855","main","a91f1293287ffa9f4f1b8f486cd6e835a1568c84","skills\u002Fcompliance\u002Fcloud\u002Fnerc\u002Faudit","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace","https:\u002F\u002Fgithub.com\u002FDCx7C5","#Python","2026-09-01 11:21:00",{"source":8,"skillName":5,"commands":81,"prompt":91,"zipAvailable":92},[82,85,88],{"tool":83,"command":84},"npx","npx skills add DCx7C5\u002Fai-marketplace --skill cloud-nerc-audit",{"tool":86,"command":87},"bunx","bunx skills add DCx7C5\u002Fai-marketplace --skill cloud-nerc-audit",{"tool":89,"command":90},"pnpm","pnpm dlx skills add DCx7C5\u002Fai-marketplace --skill cloud-nerc-audit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fcompliance\u002Fcloud\u002Fnerc\u002Faudit\u002FSKILL.md",true,[94],{"path":95,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":98,"sourceHtmlUrl":99},"index.json","REFERENCE","参考文档",669,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fcompliance\u002Fcloud\u002Fnerc\u002Faudit\u002Findex.json",[101,111,134,155,176,198],{"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":105,"licenseFileUrl":106,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":110},"01M73MDK3NT5XHNYTQ5P5172V9","devel-jb-algorithmic-art","- Embed algorithms inline in the HTML artifact (don't create separate .","Apache-2.0","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fdevel-jb-algorithmic-art\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":44},"01M71HAPZ01KQ30RKTB0FFSQ05","services-wmi-persistence-detect","Detect WMI event subscription persistence by enumerating ActiveScriptEventConsumer, CommandLineEventConsumer, and permanent subscriptions in the WMI repository.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fpersistence\u002Fdetect\u002FSKILL.md",[],[118,119,120,121,122,123,124,34,125,126,127,128,129,130,131,132,133,39,29],"services","detect","services wmi persistence detect","wmi","persistence","process-forensics","process","forensics","t1546.003","event-subscription","subscription","repository","commandline-consumer","subscriptions","event","activescript",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":44},"01M71HAK6JTTTS229T17WJMMCG","services-wmi-exec-exploit","Perform lateral movement across Windows networks using WMI-based remote execution techniques including Impacket wmiexec.py, CrackMapExec, and native WMI commands for stealthy post-exploitation during red team engagements.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fservices\u002Fwmi\u002Fexec\u002Fexploit\u002FSKILL.md",[],[141,121,142,118,143,144,30,145,146,34,147,36,148,149,150,151,152,153,29,154],"exec","services wmi exec exploit","exploit","across","analysis","team","traffic","crackmapexec","Impacket","lateral-movement","read","lateral movement","command","native",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":44},"01M71HAG6MHKNQV8KDZKMT4886","registry-artifact-extract","Extract and analyze Windows Registry hives to uncover user activity, installed software, autostart entries, and evidence of system compromise.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fregistry\u002Fartifact\u002Fextract\u002FSKILL.md",[],[162,163,164,165,166,59,167,168,169,170,151,29,171,172,145,173,30,34,174,175],"extract","registry artifact extract","registry","artifact","digital-forensics","regripper","windows-registry","evidence-collection","software","uncover","analyze","collection","artifact-analysis","activity",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":182,"publishedAt":44},"01M71HACR4A8XTWTTSXK4124AA","processes-token-impersonate-detect","Detect Windows token impersonation and privilege abuse including SeImpersonatePrivilege exploitation via Potato attacks and token stealing techniques.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Ftoken\u002Fimpersonate\u002Fdetect\u002FSKILL.md",[],[183,184,185,119,34,186,39,187,188,189,123,29,190,191,192,193,194,195,196,197],"processes","token","processes token impersonate detect","techniques","escalation","windows","attacks","via","impersonation","potato","exploitation","printspoofer","token-impersonation","seimpersonate","privilege-escalation",{"skillNo":199,"name":200,"nameZh":6,"description":201,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":202,"categories":203,"keywords":204,"publishedAt":44},"01M71HAABSB4Z6QFSXEG00R4RK","processes-thread-injection-detect","Detect Windows thread injection techniques including CreateRemoteThread, QueueUserAPC, NtCreateThreadEx, and thread hijacking via process memory analysis.","https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fwindows\u002Fprocesses\u002Fthread\u002Finjection\u002Fdetect\u002FSKILL.md",[],[205,183,206,119,207,208,124,29,190,209,210,211,145,123,34,186,212,39,213,188],"thread","injection","processes thread injection detect","thread-injection","nt-api","apc-injection","api","process-injection","memory"]