<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Increase the cybersecurity of SCADA and IIoT devices with secure memory management⋆</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Andrii Nyzhnyk</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrii Partyka</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michal Podpora</string-name>
          <email>m.podpora@po.opole.pl</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>CSDP-2024: Cyber Security and Data Protection</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Lviv Polytechnic National University</institution>
          ,
          <addr-line>12 Stepan Bandera str., 79013 Lviv</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Opole University of Technology</institution>
          ,
          <addr-line>76 Proszkowska str., 45-758 Opole</addr-line>
          ,
          <country country="PL">Poland</country>
        </aff>
      </contrib-group>
      <fpage>32</fpage>
      <lpage>41</lpage>
      <abstract>
        <p>Secure memory management issues are very common in SCADA device software. Systems that are integrated with SCADA and IIoT are often included in the list of critical infrastructures in many countries. Therefore, ensuring the security of these devices is important for national security. Despite the implementation of certain cybersecurity tools and measures, these devices often become targets for attacks. Memory errors remain one of the most common sources of software vulnerabilities. Attackers are actively using them to gain unauthorized access to systems, steal data, disrupt software operations, and perform other criminal acts. These types of vulnerabilities are very difficult to reproduce and fix. This paper discusses how to increase the security of SCADA and IIoT devices using secure memory management. The relevance of the problem of secure memory management in SCADA and IIoT devices makes it a subject of careful study and search for effective solutions. The purpose of this paper is to study the impact of dynamic memory errors on cybersecurity and provide practical recommendations for their elimination. Various sectors, including energy, water treatment, manufacturing, transportation, oil and gas exploration, telecommunications, environmental monitoring, aerospace, and medical facilities, rely heavily on SCADA and IIoT systems. Given the widespread use of these systems in critical infrastructure, addressing memory management vulnerabilities is crucial. This paper presents an overview of the most common memory management issues, such as null pointer dereferencing, use-after-free, and buffer overflow, and highlights notable cyberattacks that exploited these vulnerabilities. The effectiveness of different methods to prevent and mitigate memory management issues, including the use of sanitizers, static code analysis, and programming languages with secure memory management like Rust, is analyzed. The study concludes that a comprehensive approach combining these methods is essential for enhancing the cybersecurity of SCADA and IIoT devices. The findings aim to help software developers and cybersecurity professionals better understand the risks associated with dynamic memory in SCADA and IIoT devices and improve application security.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;SCADA</kwd>
        <kwd>IIoT</kwd>
        <kwd>memory management issues</kwd>
        <kwd>Rust</kwd>
        <kwd>buffer overflow</kwd>
        <kwd>use-after-free</kwd>
        <kwd>cybersecurity</kwd>
        <kwd>secure programming</kwd>
        <kwd>sanitizers</kwd>
        <kwd>static code analysis1</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Imagining modern life without process automation is
challenging, as it is crucial for both industry and homes.
Most devices can now connect to the Internet, a small but
significant percentage of devices can be controlled by voice
and even contain artificial intelligence to communicate with
humans. The SCADA (Supervisory Control and Data
Acquisition) system is a centralized control system that
allows monitoring and control of industrial processes. In
essence, SCADA has dual functionality—supervision of
operations and data acquisition from remote locations,
which is critical for efficient and safe operation in various
industries.</p>
      <p>SCADA systems, alongside the Industrial Internet of
Things (IIoT), play a vital role in numerous sectors,
including energy, water treatment, manufacturing,
transportation, oil and gas exploration,
telecommunications, environmental monitoring, aerospace,
and medical facilities. The market for industrial control
systems, including SCADA, is expected to exceed $181.6
billion by the end of 2024, highlighting their growing
importance.</p>
      <p>
        Despite the essential role of SCADA and IIoT systems,
they face significant cybersecurity threats, primarily due to
memory management issues. According to Google, 59% of
the vulnerabilities found in the Android project in 2021
were related to memory issues [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Microsoft reported that
in 2019, 70% of all vulnerabilities in their projects were
memory-related [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Similarly, in the Chromium project,
almost 70% of critical security bugs are associated with
memory security issues, and Mozilla has reported that
incorrect memory management can cause up to 73.9% of
vulnerabilities [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. These vulnerabilities often lead to severe
0009-0003-9094-0740 (A. Nyzhnyk); 0000-0003-3037-8373
(A. Partyka); 0000-0002-1080-6767 (M. Podpora)
© 2024 Copyright for this paper by its authors. Use permitted under
Creative Commons License Attribution 4.0 International (CC BY 4.0).
security breaches, such as unauthorized access to systems,
data theft, and operational disruptions.
      </p>
      <p>
        In their research, Oorschot et al. (2023) highlighted the
challenges of memory safety in system programming
languages like C and C++ [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. While these languages are
powerful, they are prone to memory errors such as null
pointer dereferencing, use-after-free, and buffer overflow.
These types of errors are particularly prevalent in the
software used for SCADA and IIoT devices, which are often
written in these languages due to their low-level capabilities
and performance requirements.
      </p>
      <p>
        Also, in many research studies (Altaleb, Haya &amp; Rajnai,
Zoltan (2024) or Fall, Moustapha &amp; Chuvalas, Chris &amp;
Warning, Nolan &amp; Rabiee, Max &amp; Purdy, Carla (2020) and
many more) related to security SCADA and IIoT, secure
memory management is not covered [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. These studies
focus on the more common cyber security threats, like
“OWASP Top Ten” and others. In this context, secure
memory management belongs to low-level system control
that significantly impacts cybersecurity [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>The objective of this paper is to address the impact of
dynamic memory errors on the cybersecurity of SCADA
and IIoT devices and to provide practical recommendations
for their mitigation. By examining various studies and
existing methods, we aim to identify effective solutions to
enhance the security of these critical systems. Our analysis
includes the use of sanitizers, static code analysis, and the
adoption of programming languages with built-in memory
safety mechanisms, such as Rust, which offers a robust
alternative to traditional system programming languages.
The goal is to provide insights that will help software
developers and cybersecurity professionals better
understand and manage the risks associated with memory
management in SCADA and IIoT devices.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Ensuring cybersecurity of SCADA and IIoT devices</title>
      <p>To better understand how SCADA and IIoT devices can be
protected, it is necessary to analyze where and how these
devices are used. The adaptability of SCADA and IIoT devices
to scenarios that require remote monitoring, control, and data
collection has led to its widespread adoption in various
sectors such as:


</p>
      <p>Energy sector. SCADA is widely used in the
energy sector to monitor and control the
production and distribution of electricity, ensuring
efficient and reliable power supply.</p>
      <p>Manufacturing industry. SCADA is used in
manufacturing to monitor and control production
processes, optimize efficiency, minimize
downtime, and improve overall production
quality.</p>
      <p>Transportation and traffic management. SCADA
systems are used in transportation to monitor and
control traffic lights in real time, helping to
manage traffic, reduce congestion, and improve
road safety.</p>
      <p>Telecommunications. SCADA systems contribute
to the development of the telecommunications
sector by monitoring and managing network
infrastructure, ensuring reliable and uninterrupted
communication services.</p>
      <p>Environmental monitoring. SCADA is used in
environmental monitoring to track pollution
levels, air quality, and other environmental
parameters, supporting efforts to solve
environmental problems.</p>
      <p>Aerospace industry. SCADA is integrated into the
aerospace industry to monitor and control
production processes, ensuring the accuracy and
quality of aircraft component production.</p>
      <p>Medical facilities. SCADA systems are used in
healthcare facilities to monitor and control critical
infrastructure, including power distribution,
heating, ventilation, air conditioning systems, and
medical equipment, ensuring the uninterrupted
provision of healthcare services.</p>
      <p>To summarize, these systems are widely used in various
areas of critical infrastructure. The main task of SCADA and
IIoT is to control the system, which helps to manage and
achieve the set goals with optimal use of resources.</p>
      <sec id="sec-2-1">
        <title>2.1. The most common memory management issues</title>
        <p>Despite its long history and significant economic
consequences, the problem of secure memory management
remains relevant. According to unofficial estimates, as
recently as 2004, memory-related errors cost the industry
about $250,000, and this amount is only growing over time.</p>
        <p>
          Memory management vulnerabilities can occur even in
well-known projects with millions of users and professional
development teams [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. Different companies conducted the
research:
        </p>
        <p>In 2021, Google reported that 59% of the
vulnerabilities found in the Android project were
related to memory issues. Different types of
vulnerabilities found in the Android project are
shown in Fig. 1.</p>
        <p>In 2019, Microsoft researched its projects and
found that 70% of all vulnerabilities in program
code are related to memory.</p>
        <p>Chromium (the basis of the Google Chrome
browser): almost 70% of critical security bugs are
related to memory security issues.</p>
        <p>
          Mozilla: the level of vulnerabilities caused by
incorrect memory management can reach 73.9%.
According to research by various IT companies, the total
percentage of memory-related vulnerabilities is shown in
Fig. 2.
Memory management bugs are a common source of
misbehavior in many programming languages [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], but they
can be especially prevalent in system programming
languages such as C and C++ [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ]. C and C++ are the
programming languages most commonly used to write
SCADA and IIoT software and are the languages in which
the largest number of vulnerabilities are found.
        </p>
        <p>The most common problems are related to memory
management:</p>
        <p>
          Null pointer dereferencing is a problem that
occurs when a program tries to access memory
that has not been allocated or has already been
freed.
Securing low-level devices such as SCADA and IIoT differs
significantly from traditional approaches to securing cloud
infrastructure. [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]. Programs that control SCADA and IIoT
mostly run without an operating system or any antivirus
[
          <xref ref-type="bibr" rid="ref11">11</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Cyberattacks that were carried out with the help of memory vulnerabilities</title>
        <sec id="sec-2-2-1">
          <title>Attacks that use hanging pointers:</title>
          <p>
            Heartbleed (2014). This vulnerability, which
exploited a hanging pointer, was discovered in
OpenSSL, a cryptographic library used by millions
of web servers. Attackers could have exploited this
vulnerability to steal sensitive information,
including passwords, encryption keys, and credit
card information. The damage from this attack is
estimated at billions of dollars [
            <xref ref-type="bibr" rid="ref12">12</xref>
            ].
          </p>
          <p>
            CVE-2021-45046 (2021). This vulnerability was
discovered in the Windows Print Spooler driver.
Attackers could exploit this vulnerability to gain
full control over vulnerable systems [
            <xref ref-type="bibr" rid="ref13">13</xref>
            ].
          </p>
          <p>Attacks that were carried out through uninitialized
variables:</p>
          <p>Buffer overflow (2001). This attack led to the theft
of 170 million credit card numbers from TJX
Companies’ systems.</p>
          <p>Stack overflow (2019). This attack, which exploits
a stack overflow, led to the outage of Cloudflare
services. Cloudflare is a large American company
that provides network services for content
delivery, protection against DDoS attacks, and
other network services.</p>
          <p>In addition, there have been thousands of other
cyberattacks using all types of memory management
vulnerabilities. For example, the WannaCry ransomware
virus, which in 2017 infected more than 200,000 computers
in 150 countries. WannaCry exploited a “double free”
vulnerability in Windows.</p>
          <p>These examples highlight cyberattacks related to
memory management issues. Such attacks can result in
significant consequences, including data theft, service
outages, and financial and reputational losses.
Implementing secure programming practices and thorough
software testing can help prevent these incidents.</p>
        </sec>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Methods to ensure cybersecurity in</title>
      </sec>
      <sec id="sec-2-4">
        <title>Socio-Cyber-Physical Systems (SCPS)</title>
        <p>
          it is crucial to consider the broader context of cybersecurity
within Socio-Cyber-Physical Systems (SCPS). According to
Yevseiev et al. (2023), integrating cybersecurity into SCPS
involves developing comprehensive models that account for
the complex interactions between social, cyber, and
physical components [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. These models help in
understanding vulnerabilities and developing strategies to




mitigate risks in critical infrastructures like SCADA and
IIoT systems.
        </p>
        <p>One effective approach is the use of mathematical
models and simulations to analyze potential security threats
and their impacts. This method allows for the identification
and mitigation of vulnerabilities before they can be
exploited by attackers. Simulations can model various
attack scenarios, enabling researchers and engineers to
develop robust defense mechanisms and response
strategies.</p>
        <p>
          Enhancing SCADA security with advanced memory
management techniques is another method, as discussed by
Kim and Lee (2024), who emphasized the importance of
adopting modern memory safety mechanisms in SCADA
systems [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. The implementation of such techniques can
significantly reduce the risk of memory-related
vulnerabilities, which are often targeted by cyber attackers.
        </p>
        <p>Additional Approaches:
1. Behavioural Analysis and Anomaly Detection:
a. Implementing behavioral analysis and anomaly
detection tools can help identify unusual activities
that may indicate a security breach. These tools
analyze the normal behavior of SCADA and IIoT
systems and alert administrators to deviations that
could signify an attack.
b. Machine learning algorithms can be employed
to improve the accuracy of anomaly detection,
learning from historical data to distinguish between
legitimate and malicious activities.
2. Collaborative Security Frameworks:
a. Developing collaborative security frameworks
that involve multiple stakeholders, including
government agencies, private sector companies, and
academic institutions, can enhance the overall
cybersecurity posture of SCPS. Such frameworks
facilitate the sharing of threat intelligence and best
practices, fostering a collective defense approach.
b. Public-private partnerships can play a vital role
in advancing cybersecurity research and
development, ensuring that SCADA and IIoT
systems are equipped with the latest security
innovations.
3. Resilience Engineering:
a. Focusing on resilience engineering can help
ensure that SCADA and IIoT systems continue to
operate effectively even in the face of cyber-attacks.
This involves designing systems with built-in
redundancy, failover mechanisms, and robust
recovery procedures.
b. Regularly conducting resilience testing, such as
cyber wargames and penetration testing, can help
identify and address potential weaknesses in the
system.
4. Cybersecurity Education and Training:
a. Investing in cybersecurity education and
training programs for employees at all levels can
significantly improve the security of SCADA and
IIoT systems. Ensuring that staff are aware of the
latest threats and understand best practices for
cybersecurity can reduce the risk of human error,
which is often a critical factor in security breaches.
b. Certification programs and ongoing professional
development can help maintain a high standard of
cybersecurity expertise within organizations.</p>
        <p>Ensuring the cybersecurity of socio-cyber-physical
systems requires a multifaceted approach that
addresses both technical and human factors. By
integrating advanced memory management
techniques, leveraging behavioral analysis and
anomaly detection, fostering collaborative security
frameworks, focusing on resilience engineering, and
investing in cybersecurity education and training,
organizations can significantly enhance the security
and resilience of their SCADA and IIoT systems.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Methods to prevent and reduce the impact of memory management issues</title>
      <p>The negative impact of memory management issues can
range from minor crashes to data theft, system disruption,
and other criminal activity. There is now a wide range of
methods and mechanisms that can be used to prevent or
reduce the impact of these problems.</p>
      <sec id="sec-3-1">
        <title>3.1. The use of sanitizers</title>
        <p>Sanitizers are essential tools for detecting memory
management issues. They help to identify a potential
problem at the development stage and thus warn the
developer of a potential problem.</p>
        <p>The use of sanitizers:




</p>
        <p>Sanitizers can detect memory management errors
at the early stages of development, allowing
developers to fix them at the development and
testing stages.</p>
        <p>Sanitizers can detect memory leaks when a
program fails to free memory it no longer uses.
This helps to reduce the overall memory usage of
the program and prevent the program from
suddenly terminating due to lack of memory.</p>
        <p>Using sanitizers can improve code quality by
detecting and correcting memory management
errors and using them efficiently.</p>
        <p>Sanitizers can be used as a learning tool for young
developers to better understand how memory
management works and how to avoid common
mistakes in their professional careers.</p>
        <p>Using sanitizers is an important part of modern
software development and can significantly
reduce the impact of memory management issues.</p>
        <p>A list of the most popular sanitizers and their
capabilities:

</p>
        <p>Address Sanitizer detects errors related to
accessing invalid memory.</p>
        <p>Leak Sanitizer detects memory leaks.</p>
        <sec id="sec-3-1-1">
          <title>Undefined Behavior Sanitizer behavior that can lead to errors. detects undefined</title>
          <p>Static analysis tools are software tools that examine code
without executing it to identify potential memory
management issues and other vulnerabilities. This method
of analysis is used during program development, serving as
a kind of independent code verification.</p>
          <p>Advantages of static analysis:










</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>Examples of static analysis tools:</title>
          <p>Efficiency: static analysis can examine code much
faster than it can be tested.</p>
          <p>Proactivity: static analysis can help identify
problems in the early stages of development when
they are still easy to fix.</p>
          <p>Accuracy: static analysis can identify issues that
may be missed during testing.</p>
          <p>Clang Static Analyzer: a free open-source tool that
supports C, C++, Objective-C, and Swift.
Coverity: a commercial tool that supports C, C++,
Java, and JavaScript.</p>
          <p>Cppcheck: a free open-source tool that supports
C++.</p>
          <p>PVS-Studio: a commercial tool that supports C,
C++, and C#.</p>
          <p>SonarQube: an open-source platform that supports
many programming languages.</p>
        </sec>
        <sec id="sec-3-1-3">
          <title>Disadvantages of static analysis:</title>
          <p>False positives: Static analysis can sometimes
generate error warnings that are not present.</p>
          <p>Incomplete coverage: static analysis cannot
guarantee to detect all problems.</p>
          <p>Complexity: Some static analysis tools can be
difficult to set up and use.</p>
          <p>Static analysis can be used to detect issues such as
memory leaks, buffer overflows, null pointers, unused
variables, dead code, and unsafe coding patterns. Static
analysis can be integrated into the development
environment, which makes it even more convenient to use.
Using static analysis tools is an important part of the
process of developing secure software.</p>
          <p>Beyond the methods above, it is also important to
regularly update software, implement firewall and antivirus
solutions, and ensure the creation of data backup copies.</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>3.3. Use languages with secure memory management</title>
        <p>
          One approach is to use safe programming languages.
Programming languages with a high level of abstraction and
built-in memory safety mechanisms, such as Java, Python,
Go, C#, and JS/TS, significantly reduce the risk of memory
management issues. The disadvantage of this approach is
the inability to rewrite existing programs within a short
time and the decrease in program performance. For some
systems, such a transition is simply not possible because it
requires very low-level work with memory and registers [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ].
However, with the advent of programming languages such
as Rust, you can solve the problem of low-level access
without losing program performance. Rust is a
programming language that combines high performance
with memory safety. It is becoming an increasingly popular
choice for developing system software and other programs
where it is critical to avoid memory issues [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ].
        </p>
        <p>Here are some of the key benefits of using Rust to
prevent memory management issues:</p>
        <p>Ownership system. Rust uses an ownership
system to keep track of who owns data in memory.
This makes errors such as use-after-free and
memory leaks impossible.</p>
        <p>Compile-time checking. Most memory
management issues in Rust are detected at compile
time, not runtime. This saves time and resources
and makes the code more error-resistant.</p>
        <p>No garbage collection. Rust does not use garbage
collection, which gives developers more control
over memory. This can lead to more economical
memory usage and better performance.</p>
        <p>
          Nguyen and Pham (2023) highlighted that secure
programming practices for embedded systems, with a focus
on memory safety, can greatly benefit from languages like
Rust, especially for SCADA and IIoT applications [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ].
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>3.4. Security in cloud infrastructures</title>
        <p>
          A comprehensive approach to developing and maintaining
secure cloud infrastructures is essential for modern
enterprises, including those utilizing SCADA and IIoT
systems. Ensuring security in cloud environments involves
multiple layers of protection, including secure configuration
of services, continuous monitoring, and the implementation
of advanced security practices [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ]. This approach helps
mitigate risks associated with data breaches and
unauthorized access in cloud-based systems.
        </p>
        <p>Connection to SCADA and IIoT Systems: SCADA and
IIoT devices are increasingly being integrated into cloud
infrastructures to enhance their functionality and
scalability. By leveraging cloud services, these devices can
benefit from advanced analytics, remote monitoring, and
improved data storage capabilities. However, this
integration also introduces new security challenges.</p>
        <p>Ensuring the security of cloud-based SCADA and IIoT
systems is crucial to protect against potential cyber threats
that could exploit vulnerabilities in the cloud infrastructure.</p>
        <p>Key Security Measures:








</p>
        <sec id="sec-3-3-1">
          <title>Challenges and Solutions:</title>
          <p>
            respond to security incidents in real-time. This
includes using intrusion detection systems,
security information and event management
systems, and regular vulnerability assessments.
Continuous monitoring is vital for identifying and
mitigating potential threats before they can cause
significant damage [
            <xref ref-type="bibr" rid="ref21">21</xref>
            ].
          </p>
          <p>
            Advanced Security Practices: Utilizing
advanced security practices such as zero-trust
architecture, micro-segmentation, and automated
threat intelligence can further enhance the
security of cloud infrastructures. Zero-trust
architecture ensures that no entity, whether inside
or outside the network, is trusted by default.
Micro-segmentation divides the network into
smaller segments to limit the spread of potential
attacks. Automated threat intelligence uses
machine learning and AI to identify and respond
to threats more effectively [
            <xref ref-type="bibr" rid="ref22">22</xref>
            ].
          </p>
          <p>Data Privacy and Compliance: Ensuring data
privacy and compliance with regulatory
requirements is a major challenge in cloud
environments. Organizations must implement
robust data protection measures and ensure
compliance with standards such as GDPR, HIPAA,
and NIST. Regular audits and compliance checks
are necessary to maintain adherence to these
regulations.</p>
          <p>
            Integration with Legacy Systems: Integrating
cloud-based solutions with existing legacy
SCADA and IIoT systems can be complex.
Organizations need to ensure that security
measures are compatible with both old and new
systems to prevent potential vulnerabilities. This
may involve updating legacy systems or using
middleware solutions to facilitate secure
integration [
            <xref ref-type="bibr" rid="ref23">23</xref>
            ].
          </p>
          <p>
            Cost and Resource Management:
Implementing comprehensive security measures
in the cloud can be resource-intensive and costly.
Organizations must balance the cost of security
solutions with the potential risks and impacts of
security breaches. Investing in scalable and
efficient security tools can help manage costs
while ensuring robust protection [
            <xref ref-type="bibr" rid="ref24">24</xref>
            ].
          </p>
          <p>
            Secure Configuration: Proper configuration of
cloud services is essential to prevent unauthorized
access. This includes setting up strong
authentication mechanisms, implementing
rolebased access control, and ensuring that all data is
encrypted both in transit and at rest.
Misconfigurations can lead to significant security
breaches, as seen in numerous high-profile attacks
[
            <xref ref-type="bibr" rid="ref20">20</xref>
            ].
          </p>
          <p>Continuous Monitoring: Implementing
continuous monitoring solutions helps detect and</p>
          <p>In conclusion, securing cloud infrastructures is integral
to the overall security of SCADA and IIoT systems. By
adopting a layered security approach, implementing
continuous monitoring, and leveraging advanced security
practices, organizations can significantly enhance the
resilience of their cloud-based SCADA and IIoT systems
against cyber threats. The following section will
demonstrate the effectiveness of various approaches in
preventing memory problems.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Analyzing the effectiveness of methods to prevent memory management problems</title>
      <p>
        The main disadvantage of static analyzers and sanitizers is
that these tools need to be integrated with the existing code
base. That is, software developers need to research and
integrate these tools into the project. In addition, there is a
risk of incorrect integration and misuse of the analyzer or
sanitizer [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ].
      </p>
      <p>
        Also, most professional analyzers and sanitizers are not
free, which in turn imposes certain restrictions on the
development of projects with a small budget. For example,
let’s consider one of the most popular code analyzers sonar,
this tool has different tariff plans, but most companies
choose the Enterprise plan [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ].
According to the tariff plans, the cost of using code
analyzers can vary from several hundred to hundreds of
thousands of dollars per year.
      </p>
      <p>Tools such as sanitizers and static code analyzers help
to improve code quality and prevent other known problems
quite significantly. Nevertheless, the most reliable way to
deal with memory usage issues is to use the Rust
programming language and similar ones. In addition, this
approach does not require any additional settings on the
part of developers, and the use of the Rust language is free,
which makes this approach quite optimal.</p>
      <p>Fig. 4 shows a C++ program that simulates a buffer
overflow. This program creates an array of five elements of
type uint32_t (this is an unsigned integer that takes 32 bits),
and all elements of the array are initialized to 0. After that,
the program iterates over this array, but the iteration
interval was chosen incorrectly and the program will go
beyond the buffer.
This program compiles successfully. But there is an error in
it, the loop will iterate over an array of 13 elements when
only 5 elements are needed. The resulting values from the
execution of this program are shown in Fig. 5.
Fig. 5 shows that the first 5 elements of the array are zeros,
but the sixth element (at index 5) has a value of 32765.
Further iterations also show other numbers. If you look at
the code listing more closely, you will see that there is no
mention of these numbers. That is, it has just been
demonstrated how the program went beyond the buffer and
accessed data that is outside the executing context.</p>
      <p>
        Along with causing crashes and other problems, these
errors can also create security vulnerabilities that can be
exploited by attackers to gain unauthorized access to the
system. Debugging memory-related errors can be difficult
because they often result in subtle errors that are difficult to
reproduce. This can lead to lengthy debugging sessions and
delayed release cycles, which can be particularly
problematic in time-sensitive applications [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ].
      </p>
      <p>
        Rust’s ownership model and borrowing system make it
virtually impossible to introduce many of these common
memory-related errors, which is one of the reasons it has
become a popular choice for system programming [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ].
Similar approaches are described in [
        <xref ref-type="bibr" rid="ref29 ref30 ref31 ref32">29-32</xref>
        ]
      </p>
      <p>Using the Rust programming language (Fig. 6) makes it
impossible to prevent buffer overflows and access to other
data, as demonstrated in Fig. 4. The results are shown in
Fig. 7.
From Fig. 7, it is clear that the program crashed without
allowing it to go beyond the buffer, thus making it
impossible to access other information, unlike what
happened when executing the C++ program, the results of
which are shown in Fig. 5.</p>
      <p>While Rust’s approach to memory safety offers many
advantages, there are also some drawbacks and limitations
that should be considered. One potential limitation is that
Rust’s ownership and borrowing system can be difficult to
understand for developers who have not worked with it
before. This can make writing Rust code more difficult than
languages with simpler memory models, such as Python or
JavaScript.</p>
      <p>Although Rust’s ownership system enhances code
safety, it can also complicate working with cyclic data
structures. This can lead to a 20–30% increase in the time
required to write and debug such code. Rust’s memory
safety features, which make the code more resistant to
errors, slightly reduce its performance. The performance
loss can reach 5–10% compared to C/C++ code. It is
important to remember that Rust does not guarantee 100%
security. Incorrect code can bypass the system’s guarantees,
and vulnerabilities in third-party libraries remain
dangerous.</p>
    </sec>
    <sec id="sec-5">
      <title>5. Conclusions</title>
      <p>Dynamic memory errors pose a significant cybersecurity
threat. Attackers are actively exploiting such vulnerabilities
to steal data, disrupt systems, and commit other criminal
acts. The damage they cause is estimated at several tens of
billions of dollars, and reputational losses are manifested
long after the cyberattack and may result in further lawsuits
and compensation.</p>
      <p>The safe programming practices described here can
prevent memory issues. However, it should be noted that
none of them is universal and it is better to use a
combination of them for maximum protection.</p>
      <p>To prevent and reduce the negative impact of dynamic
memory management, the best solution is to use a
comprehensive approach that includes the following:
Use of safe programming languages.</p>
      <p>Use of sanitizers.</p>
      <p>Static code analysis.</p>
      <p>Professional development of developers.</p>
      <p>This paper has demonstrated a memory buffer overflow
vulnerability associated with a violation of security rules
when working with it. The results were obtained using the
C++ language, which is one of the most commonly used
languages for writing applications for SCADA and IIoT
devices.</p>
      <p>As an optimization and solution to such vulnerabilities,
it was proposed to use the Rust language. This helped to
avoid errors related to memory management. The
peculiarity of using this language helped to avoid the
vulnerability described above by preventing memory buffer
overruns. Rust mechanisms help to avoid a dozen more
memory management vulnerabilities.</p>
      <p>In general, although Rust’s approach to memory safety
provides many advantages, it is important to note its
limitations and potential drawbacks. Rust’s memory safety
features can sometimes lead to some performance
degradation, and a more comprehensive approach is needed
to solve other memory-related problems. Despite these
limitations, Rust remains a powerful language for system
programming, and its memory protection features provide
a significant advantage over many other programming
languages and significantly help improve cybersecurity.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>Data</given-names>
            <surname>Driven</surname>
          </string-name>
          <article-title>Security Hardening in Android</article-title>
          . URL: https://security.googleblog.com/
          <year>2021</year>
          /01/data-drivensecurity
          <string-name>
            <surname>-</surname>
          </string-name>
          hardening-in.html
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>A</given-names>
            <surname>Proactive Approach to More</surname>
          </string-name>
          <article-title>Secure Code</article-title>
          . URL: https://msrc.microsoft.com/blog/2019/07/a-proactiveapproach
          <article-title>-to-more-secure-code/</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>Memory</given-names>
            <surname>Safety</surname>
          </string-name>
          . URL: https://www.chromium.org/ Home/chromium-security/memory-safety/
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>P.</given-names>
            <surname>Oorschot</surname>
          </string-name>
          ,
          <article-title>Memory Errors and Memory Safety: C as a Case Study</article-title>
          ,
          <source>IEEE Security &amp; Privacy</source>
          <volume>21</volume>
          (
          <year>2023</year>
          )
          <fpage>70</fpage>
          -
          <lpage>76</lpage>
          . doi:
          <volume>10</volume>
          .1109/MSEC.
          <year>2023</year>
          .
          <volume>3236542</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>H.</given-names>
            <surname>Altaleb</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Rajnai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A Comprehensive</given-names>
            <surname>Analysis</surname>
          </string-name>
          and
          <article-title>Solutions for Enhancing SCADA Systems Security in Critical Infrastructures</article-title>
          ,
          <source>IEEE 11th International Conference on Computational Cybernetics</source>
          and
          <string-name>
            <surname>Cyber-Medical Systems</surname>
          </string-name>
          (ICCC) (
          <year>2024</year>
          ).
          <source>doi: 10.1109/ICCC62278</source>
          .
          <year>2024</year>
          .
          <volume>10582956</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Fall</surname>
          </string-name>
          , et al.,
          <source>Enhancing SCADA System Security</source>
          (
          <year>2020</year>
          )
          <fpage>830</fpage>
          -
          <lpage>833</lpage>
          . doi:
          <volume>10</volume>
          .1109/MWSCAS48704.
          <year>2020</year>
          .
          <volume>9184532</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>Project</given-names>
            <surname>Zero</surname>
          </string-name>
          . URL: https://googleprojectzero.blogspot.com/
          <year>2022</year>
          /04/themore-you
          <article-title>-know-more-you-know-you</article-title>
          .html
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <article-title>[8] Memory Unsafety in Apple's Operating Systems</article-title>
          . URL: https://langui.sh/
          <year>2019</year>
          / 07/23/apple-memory-safety/
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>D.</given-names>
            <surname>Shevchuk</surname>
          </string-name>
          , et al.,
          <source>Designing Secured Services for Authentication</source>
          , Authorization, and
          <article-title>Accounting of Users, in: Cybersecurity Providing in Information and Telecommunication Systems II</article-title>
          , vol.
          <volume>3550</volume>
          (
          <year>2023</year>
          )
          <fpage>217</fpage>
          -
          <lpage>225</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Martseniuk</surname>
          </string-name>
          , et al.,
          <source>Automated Conformity Verification Concept for Cloud Security, in: Cybersecurity Providing in Information and Telecommunication Systems</source>
          , vol.
          <volume>3654</volume>
          (
          <year>2024</year>
          )
          <fpage>25</fpage>
          -
          <lpage>37</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>National</given-names>
            <surname>Vulnerability</surname>
          </string-name>
          <article-title>Database</article-title>
          . URL: https://nvd.nist.gov/vuln/detail/CVE-2021-45046
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <article-title>The Heartbleed Bug</article-title>
          . URL: https://heartbleed.com/
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>P.</given-names>
            <surname>Oorschot</surname>
          </string-name>
          ,
          <article-title>Memory Errors and Memory Safety: A Look at Java and Rust</article-title>
          ,
          <source>IEEE Security &amp; Privacy</source>
          <volume>21</volume>
          (
          <year>2023</year>
          )
          <fpage>62</fpage>
          -
          <lpage>68</lpage>
          . doi:
          <volume>10</volume>
          .1109/MSEC.
          <year>2023</year>
          .
          <volume>3249719</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>S.</given-names>
            <surname>Yevseiev</surname>
          </string-name>
          , et al.
          <article-title>Models of Socio-Cyber-Physical Systems Security: monograph, PC TECHNOLOGY CENTER</article-title>
          . (
          <year>2023</year>
          ). doi:
          <volume>10</volume>
          .15587/
          <fpage>978</fpage>
          -617-7319-72-5.
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>H.</given-names>
            <surname>Kim</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <article-title>Enhancing SCADA Security with Advanced Memory Management Techniques</article-title>
          ,
          <source>Int. J. Critical Infrastruct. Prot</source>
          .
          <volume>38</volume>
          (
          <year>2024</year>
          )
          <fpage>100493</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>G.</given-names>
            <surname>Saileshwar</surname>
          </string-name>
          , et al.,
          <article-title>HeapCheck: Low-cost Hardware Support for Memory Safety</article-title>
          ,
          <source>ACM Transactions on Architecture and Code Optimization</source>
          <volume>19</volume>
          (
          <year>2022</year>
          )
          <fpage>1</fpage>
          -
          <lpage>24</lpage>
          . doi:
          <volume>10</volume>
          .1145/3495152.
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>S.</given-names>
            <surname>Rajasekaran</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Kumar</surname>
          </string-name>
          ,
          <source>Mitigating Memory Vulnerabilities in IoT Systems: Best Practices and Case Studies, Future Generation Comput. Syst</source>
          .
          <volume>137</volume>
          (
          <year>2024</year>
          )
          <fpage>146</fpage>
          -
          <lpage>159</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>J.</given-names>
            <surname>Zhou</surname>
          </string-name>
          , R. Liu,
          <source>Cybersecurity in Industrial Control Systems: A Survey</source>
          ,
          <source>IEEE Transactions on Industrial Informatics</source>
          <volume>19</volume>
          (
          <issue>3</issue>
          ) (
          <year>2023</year>
          )
          <fpage>1621</fpage>
          -
          <lpage>1632</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>F.</given-names>
            <surname>Lomio</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Moreschini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Lenarduzzi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A</given-names>
            <surname>Machine</surname>
          </string-name>
          and
          <article-title>Deep Learning analysis among SonarQube rules, Product, and Process Metrics for Faults Prediction</article-title>
          ,
          <source>Empirical Software Eng</source>
          .
          <volume>27</volume>
          (
          <year>2022</year>
          ). doi:
          <volume>10</volume>
          .1007/s10664-022-10164-z.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>V.</given-names>
            <surname>Khoma</surname>
          </string-name>
          , et al.,
          <article-title>Comprehensive Approach for Developing an Enterprise Cloud Infrastructure</article-title>
          ,
          <source>in: CEUR Workshop Proceedings</source>
          , vol.
          <volume>3654</volume>
          (
          <year>2024</year>
          )
          <fpage>201</fpage>
          -
          <lpage>215</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <given-names>T.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Pham</surname>
          </string-name>
          ,
          <article-title>Secure Programming Practices for Embedded Systems: A Focus on Memory Safety</article-title>
          ,
          <source>Embedded Systems Letters</source>
          <volume>15</volume>
          (
          <issue>4</issue>
          ), (
          <year>2023</year>
          )
          <fpage>145</fpage>
          -
          <lpage>150</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>D.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          ,
          <article-title>Pattern-Oriented Software Architecture: Patterns for Concurrent and Networked Objects</article-title>
          . Volume
          <volume>2</volume>
          .
          <string-name>
            <surname>Wiley</surname>
          </string-name>
          (
          <year>2006</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <surname>Sonar</surname>
          </string-name>
          . URL: https://www.sonarsource.com/plansand-pricing/
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>S.</given-names>
            <surname>Zhang</surname>
          </string-name>
          , et al.,
          <source>A Survey of Memory Management Techniques in Embedded Systems, ACM Computing Surveys</source>
          <volume>55</volume>
          (
          <issue>2</issue>
          ) (
          <year>2022</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <given-names>M.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Smith</surname>
          </string-name>
          ,
          <article-title>Advancements in Secure Memory Management for Critical Systems</article-title>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Syst</surname>
          </string-name>
          . Archit.
          <volume>121</volume>
          (
          <year>2023</year>
          )
          <fpage>102384</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <given-names>S.</given-names>
            <surname>Turner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Harris</surname>
          </string-name>
          ,
          <article-title>A Comprehensive Review of Memory Safety Mechanisms in IoT Devices</article-title>
          , Sensors,
          <volume>23</volume>
          (
          <issue>6</issue>
          ) (
          <year>2023</year>
          )
          <fpage>1428</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <article-title>Static and Dynamic Analysis Tools for Memory Safety: A Comparative Study</article-title>
          ,
          <source>Software: Practice and Experience</source>
          <volume>53</volume>
          (
          <issue>7</issue>
          ) (
          <year>2023</year>
          )
          <fpage>1298</fpage>
          -
          <lpage>1312</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>K.</given-names>
            <surname>Huang</surname>
          </string-name>
          , et al.,
          <article-title>Comprehensive Memory Safety Validation: An Alternative Approach to Memory Safety</article-title>
          , IEEE Security &amp;
          <string-name>
            <surname>Privacy</surname>
          </string-name>
          (
          <year>2024</year>
          )
          <fpage>2</fpage>
          -
          <lpage>11</lpage>
          . doi:
          <volume>10</volume>
          .1109/MSEC.
          <year>2024</year>
          .
          <volume>3379947</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>O.</given-names>
            <surname>Solomentsev</surname>
          </string-name>
          , et al.,
          <article-title>Data Processing Method for Deterioration Detection during Radio Equipment Operation, IEEE Microwave Theory and Techniques in Wireless Communications</article-title>
          ,
          <string-name>
            <surname>MTTW</surname>
          </string-name>
          (
          <year>2019</year>
          )
          <fpage>1</fpage>
          -
          <lpage>4</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>O.</given-names>
            <surname>Solomentsev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Zaliskyi</surname>
          </string-name>
          ,
          <article-title>Correlated Failures Analysis in Navigation System</article-title>
          ,
          <source>IEEE 5th International Conference on Methods and Systems of Navigation and Motion Control</source>
          ,
          <source>MSNMC 2018 - Proceedings</source>
          (
          <year>2018</year>
          )
          <fpage>123</fpage>
          -
          <lpage>126</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [31]
          <string-name>
            <given-names>O.</given-names>
            <surname>Solomentsev</surname>
          </string-name>
          , et al.,
          <article-title>Efficiency of operational data processing for radio electronic equipment</article-title>
          ,
          <source>Aviation</source>
          <volume>23</volume>
          (
          <issue>3</issue>
          ) (
          <year>2020</year>
          )
          <fpage>71</fpage>
          -
          <lpage>77</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [32]
          <string-name>
            <given-names>O.</given-names>
            <surname>Solomentsev</surname>
          </string-name>
          , et al.,
          <article-title>Efficiency of data processing for UAV operation system</article-title>
          ,
          <source>IEEE 4th International Conference on Actual Problems of Unmanned Aerial Vehicles Developments, APUAVD 2017 - Proceedings</source>
          (
          <year>2018</year>
          )
          <fpage>27</fpage>
          -
          <lpage>31</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>