Claude
Skills
Sign in
Back

performing-oil-gas-cybersecurity-assessment

Included with Lifetime
$97 forever

This skill covers conducting cybersecurity assessments specific to oil and gas facilities including upstream (exploration/production), midstream (pipeline/transport), and downstream (refining/distribution) operations. It addresses SCADA systems controlling pipeline operations, DCS for refinery process control, safety instrumented systems for hazardous processes, remote terminal units at unmanned wellhead sites, and compliance with API 1164, TSA Pipeline Security Directives, IEC 62443, and NIST Cybersecurity Framework for critical infrastructure.

Backend & APIsot-securityicsscadaindustrial-controliec62443oil-gaspipeline-securityapi1164scripts

What this skill does


# Performing Oil & Gas Cybersecurity Assessment

## When to Use

- When conducting a cybersecurity assessment of a refinery, pipeline, or production facility
- When preparing for TSA Pipeline Security Directive compliance (SD-01, SD-02)
- When assessing cybersecurity posture against API Standard 1164 (Pipeline SCADA Security)
- When evaluating the security of remote wellhead SCADA systems and satellite communications
- When a merger, acquisition, or regulatory audit requires a comprehensive OT security evaluation

**Do not use** for IT-only corporate network assessments of oil and gas companies, for physical security assessments without a cyber component, or for environmental compliance assessments.

## Prerequisites

- Written authorization from facility management and operations team
- Understanding of oil and gas operations (upstream, midstream, downstream processes)
- Familiarity with API 1164, TSA SD-01/SD-02, IEC 62443, and NIST CSF
- Passive monitoring tools for OT network traffic capture
- Access to network diagrams, SCADA architecture documentation, and safety studies (HAZOP)

## Workflow

### Step 1: Scope Assessment Based on Facility Type

Oil and gas facilities have unique characteristics based on their operational segment that affect the assessment approach.

```yaml
# Oil & Gas Cybersecurity Assessment Scope
facility:
  name: "Gulf Coast Refinery"
  segment: "Downstream"
  capacity: "250,000 barrels per day"
  regulatory: ["TSA SD-02", "API 1164", "IEC 62443", "NIST CSF"]

assessment_areas:
  process_control:
    description: "Refinery DCS and SCADA systems"
    systems:
      - "Honeywell Experion DCS - main process control"
      - "Yokogawa CENTUM VP - hydrocracker unit"
      - "Triconex SIS - emergency shutdown systems"
      - "Allen-Bradley PLCs - utilities and tank farm"
    protocols: ["Modbus/TCP", "OPC UA", "HART", "Foundation Fieldbus"]

  pipeline_scada:
    description: "Pipeline SCADA for crude receipt and product dispatch"
    systems:
      - "ABB RTU560 - pipeline RTUs at pump stations"
      - "GE iFIX SCADA - pipeline control center"
      - "Flow computers - custody transfer metering"
    protocols: ["DNP3", "Modbus RTU over serial", "IEC 60870-5-104"]
    communications: ["Licensed radio", "Leased line", "Satellite (VSAT)"]

  safety_systems:
    description: "Safety Instrumented Systems and fire/gas detection"
    systems:
      - "Schneider Triconex 3008 - process SIS"
      - "Honeywell FSC - fire and gas"
      - "Combustion turbine protection systems"
    criticality: "SIL 2/3 rated - highest priority"

  remote_access:
    description: "Vendor and operator remote access to OT"
    methods:
      - "Citrix-based remote access to SCADA terminals"
      - "VPN to vendor support for DCS maintenance"
      - "Satellite communication to remote pump stations"

  physical_security:
    description: "Physical security integration with cyber"
    systems:
      - "Access control systems (badge readers)"
      - "CCTV with IP network connectivity"
      - "Perimeter intrusion detection"

compliance_mapping:
  tsa_sd_02:
    - "Implement network segmentation between IT and OT"
    - "Develop and maintain a Cybersecurity Implementation Plan (CIP)"
    - "Establish a Cybersecurity Assessment Program"
    - "Report cybersecurity incidents to CISA within 24 hours"
    - "Implement access control measures for critical OT systems"
  api_1164:
    - "Risk-based cybersecurity program for pipeline SCADA"
    - "Asset identification and classification"
    - "Network security and access control"
    - "Personnel security and training"
    - "Incident response and recovery"
```

### Step 2: Assess Pipeline SCADA Security

Pipeline SCADA systems have unique challenges including long-distance communications over untrusted media, unmanned remote sites, and custody transfer integrity requirements.

```python
#!/usr/bin/env python3
"""Pipeline SCADA Security Assessment Tool.

Evaluates security of pipeline SCADA systems against
API 1164 and TSA Pipeline Security Directive requirements.
"""

import json
import sys
from dataclasses import dataclass, field, asdict
from datetime import datetime


@dataclass
class AssessmentFinding:
    finding_id: str
    category: str
    severity: str
    title: str
    description: str
    affected_systems: list
    regulatory_reference: str
    remediation: str
    timeline: str


@dataclass
class ComplianceCheck:
    requirement_id: str
    description: str
    standard: str
    status: str  # compliant, partial, non-compliant
    evidence: str
    gap: str = ""


class PipelineSCADAAssessment:
    """Pipeline SCADA security assessment per API 1164 / TSA SD-02."""

    def __init__(self, facility_name):
        self.facility = facility_name
        self.findings = []
        self.compliance_checks = []
        self.finding_counter = 1

    def assess_network_architecture(self, architecture_data):
        """Evaluate pipeline SCADA network architecture."""
        checks = []

        # TSA SD-02: Network segmentation between IT and OT
        if not architecture_data.get("it_ot_segmentation"):
            self.findings.append(AssessmentFinding(
                finding_id=f"OG-{self.finding_counter:03d}",
                category="Network Architecture",
                severity="critical",
                title="No IT/OT Network Segmentation",
                description=(
                    "Pipeline SCADA network is not segmented from corporate IT. "
                    "An attacker compromising the corporate network could pivot "
                    "directly to pipeline control systems."
                ),
                affected_systems=["Pipeline SCADA servers", "RTU communications"],
                regulatory_reference="TSA SD-02 Section 2.1; API 1164 Section 7",
                remediation="Deploy DMZ with industrial firewall between IT and pipeline SCADA",
                timeline="30 days",
            ))
            self.finding_counter += 1

        # Check for encrypted RTU communications
        if architecture_data.get("rtu_comm_encrypted") is False:
            self.findings.append(AssessmentFinding(
                finding_id=f"OG-{self.finding_counter:03d}",
                category="Communication Security",
                severity="high",
                title="Unencrypted Pipeline RTU Communications",
                description=(
                    "DNP3 communications between control center and remote RTUs "
                    "traverse radio/satellite links without encryption. An attacker "
                    "with radio access could intercept or inject SCADA commands."
                ),
                affected_systems=["Pipeline RTUs", "SCADA master station"],
                regulatory_reference="API 1164 Section 7.3; IEC 62351",
                remediation="Deploy DNP3 Secure Authentication or VPN tunnel for RTU links",
                timeline="90 days",
            ))
            self.finding_counter += 1

        # Check remote pump station physical security
        if not architecture_data.get("remote_site_intrusion_detection"):
            self.findings.append(AssessmentFinding(
                finding_id=f"OG-{self.finding_counter:03d}",
                category="Physical-Cyber Convergence",
                severity="high",
                title="Remote Pump Stations Lack Physical Intrusion Detection",
                description=(
                    "Unmanned pump stations along the pipeline corridor lack physical "
                    "intrusion detection systems. An attacker could gain physical access "
                    "to RTUs and SCADA communication equipment without detection."
                ),
                affected_systems=["Remote pump station RTUs and networking equipment"],
                regulatory_reference="TSA SD-02 Section 2.3; API 1164 Section 10",
                remediation="Install intrusion detection with cellular alerting at rem

Related in Backend & APIs