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.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
La commande reste sur une seule ligne. Faites défiler horizontalement pour la vérifier avant de la copier.
Vous préférez une copie locale ? Téléchargez les fichiers actuellement disponibles dans SkillsMP.
Explorateur de fichiers
4 fichiers
Affichage de SKILL.md
SKILL.md
Instructions source · Aperçu en lecture seule
name
performing-s7comm-protocol-security-analysis
description
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]