Secure PLC coding
The Top 20 Secure PLC Coding Practices. Part 3 - Track operating modes
Integrity of PLC Logic | Integration / Maintenance Service Provider Asset Owner
Eugen WypiorPublished 4 min read
Contents
- **Keep the PLC in RUN mode. If PLCs are not in RUN mode, there should be an alarm to the operators. **
- Guidance
- Example
- Why?
- References
- What’s next?
- Do you require help with secure coding of your PLCs?
- If you have any questions or require help in securely coding your PLCs, please contact SEQRED. SEQRED specialises in providing bespoke OT and IoT cybersecurity solutions. Our services cover such areas as Critical Infrastructure Protection, Cloud Services Security or Audits, and Threat Intelligence. For a full list of our services visit our services page – https://seqred.pl/en/services/
- About this article
Part 3 of the Top 20 Secure PLC Coding Practices series, originally published by admeritia GmbH (Langenfeld, Germany). SEQRED reproduces the series under the open license granted by the copyright holder. Full specification: plc-security.com.
**Keep the PLC in RUN mode. If PLCs are not in RUN mode, there should be an alarm to the operators. **
| Security Objective | Target Group |
|---|---|
| Integrity of PLC Logic | Integration / Maintenance Service Provider Asset Owner |
Guidance
If PLCs are not in RUN mode (e.g., PROGRAM mode), their code could be changed to track the RUN mode. Some PLCs have a checksum to alert for code changes, but if they do not, there’s at least an indirect indicator of a potential issue while tracking operating modes:
- If PLCs are not in RUN mode, there should be an alarm to the operators. If they are aware that someone is supposed to be working on that control system, they can acknowledge the alarm and move on.
- The HMI should be configured to re-alert the operator toward the end of the shift about the presence of the alarm. The goal should be to keep track of any staff or contractors in the plant doing work that might impact the process.
Exception case: If the plant is in a testing or development phase, consider disabling this alarm but the plant should be isolated from higher levels of the network.
Example
If the PLC does not have a hardware switch for changing operating modes, it is recommended to at least make use of software mechanisms that can restrict changing PLC code, e.g., password protection in engineering software for reading and writing PLC code.
Why?
| Beneficial for …? | Why? |
|---|---|
| Security | The operating mode (run / edit / write; for Allen Bradley PLCs: RUN / PROGram / REMote) determines if PLC can be tampered with. If the key-switch is in REMote state, it is technically possible to make changes to the PLC program over the communication interfaces even if the PLC is running. |
| **Reliability ** | / |
| **Maintenance ** | / |
References
| Standard / framework | Mapping |
|---|---|
| **MITRE ATT &CK for ICS ** | Tactic: TA009 - Inhibit Response Function Technic: T0858 - Utilize/Change Operating Mode |
| **ISA/IEC 62443-4-1 ** | SI-1 : Security implementation review |
What’s next?
In the next article of The Top 20 Secure PLC Coding Practices series, you will find out about the importance of leaving the operational logic in the PLC wherever feasible.
Do you require help with secure coding of your PLCs?
If you have any questions or require help in securely coding your PLCs, please contact SEQRED. SEQRED specialises in providing bespoke OT and IoT cybersecurity solutions. Our services cover such areas as Critical Infrastructure Protection, Cloud Services Security or Audits, and Threat Intelligence. For a full list of our services visit our services page – https://seqred.pl/en/services/
About this article
This article is reproduced from the Top 20 Secure PLC Coding Practices project coordinated by Sarah Fluchs (admeritia GmbH) and Vivek Ponnada (Nozomi Networks), with support from ISA Global Cybersecurity Alliance and S4 Events.
The full copy of the document is available at plc-security.com.
License
Copyright (c) 2021 admeritia GmbH, Langenfeld/Rheinland, Germany.
Permission is hereby granted, free of charge, to any person obtaining a copy of “Top 20 Secure PLC Coding Practices” and associated documentation files, to deal in the work without restriction, including the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies, subject to preserving this copyright notice.
The work is provided “as is”, without warranty of any kind. Full license at plc-security.com.
See also
- SEQRED’s synthesis article: Top 20 Secure PLC Coding Practices - a condensed guide
- Full series: browse all 21 parts under the
secure codingtag
Need help in this area?
Our experts will help you assess the risk and plan next steps.