Perform security analysis of Siemens S7comm and S7CommPlus protocols used by SIMATIC S7 PLCs to identify vulnerabilities including replay attacks, integrity bypass, unauthorized CPU stop commands, and program download manipulation exploiting weaknesses in S7-300, S7-400, S7-1200, and S7-1500 controllers.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Perform security analysis of Siemens S7comm and S7CommPlus protocols used by SIMATIC S7 PLCs to identify vulnerabilities including replay attacks, integrity bypass, unauthorized CPU stop commands, and program download manipulation exploiting weaknesses in S7-300, S7-400, S7-1200, and S7-1500 controllers.
When assessing the security posture of Siemens SIMATIC S7 PLC environments
When building detection rules for S7comm-based attacks against S7-300/400/1200/1500 controllers
When performing a security audit of Siemens Step 7/TIA Portal communications
When investigating suspected unauthorized access to Siemens PLC programs
When evaluating S7CommPlus integrity mechanisms and their bypass potential
Do not use for scanning production Siemens PLCs without authorization and a test plan (this can crash controllers), for non-Siemens protocol analysis (see detecting-modbus-command-injection-attacks for Modbus), or for modifying PLC programs in a production environment.
Prerequisites
Network access to the S7comm communication segment (TCP port 102)
Wireshark with S7comm dissector or Zeek with S7comm protocol analyzer
Authorized access for security testing (never scan production PLCs without authorization)
Knowledge of the Siemens PLC models and firmware versions in scope
Understanding of S7comm protocol structure (COTP, S7 PDU, function codes)
Workflow
Step 1: Analyze S7comm Traffic and Identify Vulnerabilities
S7comm function that halts PLC program execution, a critical denial-of-service operation
Program Download (0x1A)
S7comm function initiating transfer of new control logic to a PLC, representing the highest risk operation
Common Scenarios
Scenario: Unauthorized PLC Program Modification
Context: A Dragos sensor alerts on S7comm program download traffic from an IP address that is not the authorized TIA Portal engineering workstation.
Approach:
Capture the complete S7comm session for forensic analysis
Identify the source host and determine if it is compromised or rogue
Compare the current PLC program against the last known-good backup
Check if the PLC CPU mode was changed (RUN to STOP to PROGRAM)
If the program was modified, restore from verified backup
Investigate the attack chain -- how did the attacker reach the S7comm network segment
Implement S7comm access protection (know-how protection, access passwords) on all PLCs
Pitfalls: S7-300/400 PLCs have no cryptographic integrity protection -- any device that can reach TCP port 102 can send commands. Do not rely solely on PLC passwords as they are transmitted in cleartext in S7comm (not S7CommPlus). Network segmentation is the primary defense.
Output Format
S7COMM SECURITY ANALYSIS REPORT
===================================
Date: YYYY-MM-DD
Scope: [Network segments analyzed]
SESSION INVENTORY:
Engineering stations: [count and IPs]
PLCs communicating: [count and IPs]
Unauthorized sources: [count]
CRITICAL FINDINGS:
CPU Stop commands: [count]
Program downloads: [count from unauthorized sources]
Replay attack potential: [assessment]
VULNERABILITY ASSESSMENT:
S7-300/400 (no integrity): [count of affected PLCs]
S7-1200/1500 (S7CommPlus): [firmware assessment]
Known CVEs applicable: [list]
RECOMMENDATIONS:
1. [Highest priority remediation]
2. [Network segmentation improvement]
3. [Monitoring enhancement]