Secure PLC coding
The Top 20 Secure PLC Coding Practices. Part 20 - Monitor PLC memory usage and trend it on the HMI
Monitoring | Integration / Maintenance Service Provider Asset Owner
Eugen WypiorPublished 3 min read
Contents
- 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 20 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.
Measure and provide a baseline for memory usage for every controller deployed in the production environment and trend it on the HMI.
| Security Objective | Target Group |
|---|---|
| Monitoring | Integration / Maintenance Service Provider Asset Owner |
Guidance
Since the increase of lines of code in the logic can also lead to increased memory consumption at runtime, it is recommended for PLC programmers to track any deviation from the baseline and dedicate an alarm class to this event.
Example
In Rockwell Allen Bradley PLCs, a baseline can be established on a controller and memory usage can be tracked using the RSLogix 5000 Task Monitor Tool. Not only the main memory but also the I/O memory and Ladder/Tag memory can be tracked using trends.
Why?
| Beneficial for …? | Why? |
|---|---|
| Security | Increased memory usage can be an indicator of the PLC running altered code. |
| **Reliability ** | Tracking memory usage for the running programs could be useful in avoiding total memory consumption and eventual fault state for the PLC controller. |
| **Maintenance ** | Tracking memory usage could be used in tuning and finding the best scan time for the monitored controller but also in troubleshooting problems and issues related to faulty states. |
References
| Standard/framework | Mapping |
|---|---|
| **MITRE ATT &CK for ICS ** | Tactic:TA002 - Execution Technique:T0873 - Project File Infection |
| **ISA 62443-3-3 ** | SR 3.4 : Software and information integrity |
| **ISA 62443-4-2 ** | EDR 3.2 : Protection from malicious code |
What’s next?
In the next article of The Top 20 Secure PLC Coding Practices series, you will find out about trapping false negatives and false positives for critical alerts.
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.