https://www.mdu.se/

mdu.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Formal Methods-based Security Testing Utilizing Threat Modeling, Automata Learning, and Model Checking
Mälardalen University, School of Innovation, Design and Engineering, Embedded Systems.ORCID iD: 0000-0001-8556-1541
2025 (English)Doctoral thesis, comprehensive summary (Other academic)
Abstract [en]

This thesis strives towards finding more efficient methods of automating security test case generation, which are currently in a state of infancy for automotive systems, in both white and, especially, black box settings. The thesis focuses on communication protocols used in vehicular systems and we base our research on formal methods. The rationale is their rigor, as they are based on sound logical principles, and their potential for efficiency gains, since formally defined systems can be more easily analyzed algorithmically and, therefore, tested automatically. Our contributions include:

• Methods for deriving automata: 

  • We provide a method to automatically obtain behavioral models in the form of state machines of communication protocol implementations in real-world settings using automata learning.   
  • We demonstrate a method to derive compound protocol state machines, i.e., state machines representing systems that communicate via more than one protocol at the same time

• Methods for checking automata:   

  • We provide a means to automatically check these state machines for their compliance with a specification (e.g., from a standard, like ISO/IEC 14443-3). 
  • We provide a scheme, Context-based Proposition Maps (CPMs), to aug    ment the state machines with propositions (i.e., attributes that can be checked).   
  • We define generic Linear Temporal Logic (LTL)-based properties to recognize cybersecurity-related specification violations.   
  • We provide a method to model-check inferred state machines utilizing the Rebeca modeling language providing a formally defined template.

• Methods to facilitate test case generation: 

  • We present a technique to automatically derive test cases to demonstrate deviations identified in a state machine on the actual system.   
  • We also present a method to create abstract cybersecurity test-case specifications from semi-formal threat models using attack trees.   
  • We provide a method for utilizing Large Language Models (LLMs) to derive test cases from threat models and inferred state machines.   
  • We present a method utilizing LLMs to derive security properties from threat models to model-check implemented state machines, determining the consistency of designs’ threat models and implementations’ state machines.
Place, publisher, year, edition, pages
Västerås: Mälardalens universitet, 2025.
Series
Mälardalen University Press Dissertations, ISSN 1651-4238 ; 445
Keywords [en]
Cybersecurity, Formal Methods, Model Checking, Threat Modeling, Testing, Verification
National Category
Security, Privacy and Cryptography
Research subject
Computer Science
Identifiers
URN: urn:nbn:se:mdh:diva-73534ISBN: 978-91-7485-726-9 (print)OAI: oai:DiVA.org:mdh-73534DiVA, id: diva2:2003097
Public defence
2025-11-28, Kappa, Mälardalens universitet, Västerås, 10:00 (English)
Opponent
Supervisors
Available from: 2025-10-03 Created: 2025-10-03 Last updated: 2025-11-07Bibliographically approved
List of papers
1. A Systematic Approach to Automotive Security
Open this publication in new window or tab >>A Systematic Approach to Automotive Security
Show others...
2023 (English)In: Lecture Notes in Computer Science, vol 14000, Springer Science and Business Media Deutschland GmbH , 2023, p. 598-609Conference paper, Published paper (Refereed)
Abstract [en]

We propose a holistic methodology for designing automotive systems that consider security a central concern at every design stage. During the concept design, we model the system architecture and define the security attributes of its components. We perform threat analysis on the system model to identify structural security issues. From that analysis, we derive attack trees that define recipes describing steps to successfully attack the system’s assets and propose threat prevention measures. The attack tree allows us to derive a verification and validation (V &V) plan, which prioritizes the testing effort. In particular, we advocate using learning for testing approaches for the black-box components. It consists of inferring a finite state model of the black-box component from its execution traces. This model can then be used to generate new relevant tests, model check it against requirements, and compare two different implementations of the same protocol. We illustrate the methodology with an automotive infotainment system example. Using the advocated approach, we could also document unexpected and potentially critical behavior in our example systems. 

Place, publisher, year, edition, pages
Springer Science and Business Media Deutschland GmbH, 2023
Series
Lecture Notes in Computer Science, ISSN 0302-9743 ; 14000
Keywords
Cybersecurity, Attack tree, Automotive Systems, Automotives, Black-box components, Concept designs, Cyber security, Design stage, Security attributes, Systems architecture, Threat, Black-box testing, Automotive, Testing, Threats
National Category
Software Engineering
Identifiers
urn:nbn:se:mdh:diva-62185 (URN)10.1007/978-3-031-27481-7_34 (DOI)000999132100034 ()2-s2.0-85151056923 (Scopus ID)9783031274800 (ISBN)
Conference
25th International Symposium on Formal Methods, FM 2023, Lübeck, 6 March 2023 through 10 March 2023
Available from: 2023-04-05 Created: 2023-04-05 Last updated: 2025-10-10Bibliographically approved
2. STAF: Leveraging LLMs for Automated AttackTree-Based Security Test Generation
Open this publication in new window or tab >>STAF: Leveraging LLMs for Automated AttackTree-Based Security Test Generation
Show others...
2025 (English)Conference paper, Published paper (Refereed)
Abstract [en]

In modern automotive development, security testing is critical for safeguarding systems against increasingly advanced threats. Attack trees are widely used to systematically represent potential attack vectors, but generating comprehensive test cases from these trees remains a labor-intensive, error-prone task that has seen limited automation in the context of testing vehicular systems. This paper introduces STAF (Security Test Automation Framework), a novel approach to automating security test case generation. Leveraging Large Language Models (LLMs) and a four-step self-corrective Retrieval-Augmented Generation (RAG) framework, STAF automates the generation of executable security test cases from attack trees, providing an end-to-end solution that encompasses the entire attack surface. We particularly show the elements and processes needed to provide an LLM to actually produce sensible and executable automotive security test suites, along with the integration with an automated testing framework. We further compare our tailored approach with general purpose (vanilla) LLMs and the performance of different LLMs (namely GPT-4.1 and DeepSeek) using our approach. We also demonstrate the method of our operation step-by-step in a concrete case study. Our results show significant improvements in efficiency, accuracy, scalability, and easy integration in any workflow, marking a substantial advancement in automating automotive security testing methodologies. Using TARAs as an input for verfication tests, we create synergies by connecting two vital elements of a secure automotive development process. 

National Category
Security, Privacy and Cryptography
Identifiers
urn:nbn:se:mdh:diva-73528 (URN)
Conference
23rd escar Europe, Nov 05-06, 2025, Frankfurt, Germany
Funder
Knowledge Foundation, 20220130
Available from: 2025-10-02 Created: 2025-10-02 Last updated: 2025-10-10Bibliographically approved
3. Using Automata Learning for Compliance Evaluation of Communication Protocols on an NFC Handshake Example
Open this publication in new window or tab >>Using Automata Learning for Compliance Evaluation of Communication Protocols on an NFC Handshake Example
2024 (English)In: Lecture Notes in Computer Science, Springer Science and Business Media Deutschland GmbH , 2024, p. 170-190Conference paper, Published paper (Refereed)
Abstract [en]

Near-Field Communication (NFC) is a widely adopted standard for embedded low-power devices in very close proximity. In order to ensure a correct system, it has to comply to the ISO/IEC 14443 standard. This paper concentrates on the low-level part of the protocol (ISO/IEC 14443-3) and presents a method and a practical implementation that complements traditional conformance testing. We infer a Mealy state machine of the system-under-test using active automata learning. This automaton is checked for bisimulation with a specification automaton modelled after the standard, which provides a strong verdict of conformance or non-conformance. As a by-product, we share some observations of the performance of different learning algorithms and calibrations in the specific setting of ISO/IEC 14443-3, which is the difficulty to learn models of system that a) consist of two very similar structures and b) very frequently give no answer (i.e. a timeout as an output).

Place, publisher, year, edition, pages
Springer Science and Business Media Deutschland GmbH, 2024
Series
Lecture Notes in Computer Science, ISSN 0302-9743 ; 14390 LNCS
Keywords
Automata Learning, Bisimulation, Formal Methods, NFC, Protocol Compliance, Automata theory, ISO Standards, Learning algorithms, Learning systems, Near field communication, Automaton learning, Bisimulations, Close proximity, Communications protocols, Compliance evaluations, Conformance testing, ISO/IEC-14443, Low-power devices, Near-field communication
National Category
Computer Sciences
Identifiers
urn:nbn:se:mdh:diva-65246 (URN)10.1007/978-3-031-49252-5_13 (DOI)2-s2.0-85180149916 (Scopus ID)9783031492518 (ISBN)
Conference
8th International Conference on Engineering of Computer-Based Systems, ECBS 2023, Västerås, 16 October 2023 through 18 October 2023
Available from: 2024-01-03 Created: 2024-01-03 Last updated: 2025-10-10Bibliographically approved
4. Black-Box Protocol Testing Using Rebeca and Automata Learning
Open this publication in new window or tab >>Black-Box Protocol Testing Using Rebeca and Automata Learning
2025 (English)In: Lecture Notes in Computer Science, Springer Nature , 2025, Vol. 15560 LNCS, p. 212-235Chapter in book (Other academic)
Abstract [en]

Industrial and critical infrastructure devices should be scrutinized with rigorous methods for inconsistencies with a specification. At the same time, this specification should also be correct, otherwise the specification conformance is of little value. On the example of eMRTDs (electronic Machine-Readable Travel Documents) we demonstrate an approach that combines model-checking a specification for correctness in terms of security with learning an implementation model using automata learning. Once the specification is modeled, we automatically mine a model of the implementation and check the model for compliance with the verified specification using simulation and trace preorder. Underspecification of the standard is in this setting modeled as non-deterministic behavior, so one of the possibilities has to simulate the implementation in order for the latter to be compliant. We also present a working tool chain realizing this method. When adopting the tool chain accordingly, the method might be used in practice for checking the correctness of any reactive system. 

Place, publisher, year, edition, pages
Springer Nature, 2025
Series
Lecture Notes in Computer Science, ISSN 03029743
Keywords
Afra, Automata Learning, Compliance Checking, eMRTD, Formal Methods, Model Checking, NFC, Rebeca, Adversarial machine learning, Automata theory, Black-box testing, Federated learning, Formal specification, Automaton learning, Black boxes, Electronic machine-readable travel document, Machine readable travel documents, Models checking, Protocol testing, Rebecum
National Category
Computer Sciences
Identifiers
urn:nbn:se:mdh:diva-70996 (URN)10.1007/978-3-031-85134-6_10 (DOI)2-s2.0-105001385156 (Scopus ID)9789819698936 (ISBN)
Available from: 2025-04-09 Created: 2025-04-09 Last updated: 2026-02-09Bibliographically approved
5. Approaches for Automating Cybersecurity Testing of Connected Vehicles
Open this publication in new window or tab >>Approaches for Automating Cybersecurity Testing of Connected Vehicles
2024 (English)In: Intelligent Secure Trustable Things / [ed] M. Karner et al., Cham: Springer, 2024, p. 219-234Chapter in book (Refereed)
Abstract [en]

Vehicles are on the verge building highly networked and interconnected systems with each other. Thisrequires open architectures with standardized interfaces. These interfaces provide huge surfaces forpotential threats from cyber attacks. Regulators therefore demand to mitigate these risks using structuredsecurity engineering processes. Testing the effectiveness of this measures, on the other hand, is lessstandardized. To fill this gap, this book chapter contains an approach for structured and comprehensivecybersecurity testing of contemporary vehicular systems. It gives an overview of how to define securesystems and contains specific approaches for (semi-)automated cybersecurity testing of vehicular systems,including model-based testing and the description of an automated platform for executing tests.

Place, publisher, year, edition, pages
Cham: Springer, 2024
Series
Studies in Computational Intelligence, ISSN 1860-949X, E-ISSN 1860-9503 ; 1147
National Category
Vehicle and Aerospace Engineering Computer and Information Sciences
Research subject
Computer Science
Identifiers
urn:nbn:se:mdh:diva-66161 (URN)10.1007/978-3-031-54049-3_13 (DOI)2-s2.0-85200456986 (Scopus ID)978-3-031-54048-6 (ISBN)978-3-031-54049-3 (ISBN)
Funder
European Commission
Available from: 2024-03-01 Created: 2024-03-01 Last updated: 2026-06-10Bibliographically approved
6. From TARA to Test: Automated Automotive Cybersecurity Test Generation Out of Threat Modeling
Open this publication in new window or tab >>From TARA to Test: Automated Automotive Cybersecurity Test Generation Out of Threat Modeling
Show others...
2023 (English)In: Proceedings: CSCS 2023 - 7th ACM Computer Science in Cars Symposium, Association for Computing Machinery, Inc , 2023Conference paper, Published paper (Refereed)
Abstract [en]

The United Nations Economic Commission for Europe (UNECE) demands the management of cyber security risks in vehicle design and that the effectiveness of these measures is verified by testing. Generally, with rising complexity and openness of systems via software-defined vehicles, verification through testing becomes a very important for security assurance. This mandates the introduction of industrial-grade cybersecurity testing in automotive development processes. Currently, the automotive cybersecurity testing procedures are not specified or automated enough to be able to deliver tests in the amount and thoroughness needed to keep up with that regulation, let alone doing so in a cost-efficient manner. This paper presents a methodology to automatically generate technology-agnostic test scenarios from the results of threat analysis and risk assessment (TARA) process. Our approach is to transfer the resulting threat models into attack trees and label their edges using actions from a domain-specific language (DSL) for attack descriptions. This results in a labelled transitions system (LTS), in which every labelled path intrinsically forms a test scenario. In addition, we include the concept of Cybersecurity Assurance Levels (CALs) and Targeted Attack Feasibility (TAF) into testing by assigning them as costs to the attack path. This abstract test scenario can be compiled into a concrete test case by augmenting it with implementation details. Therefore, the efficacy of the measures taken because of the TARA can be verified and documented. As TARA is a de-facto mandatory step in the UNECE regulation and the relevant ISO standard, automatic test generation (also mandatory) out of it could mean a significant improvement in efficiency, as two steps could be done at once.

Place, publisher, year, edition, pages
Association for Computing Machinery, Inc, 2023
Keywords
Automotive, CAL, Cybersecurity, Life Cycle, TAF, Testing
National Category
Computer Systems
Identifiers
urn:nbn:se:mdh:diva-65679 (URN)10.1145/3631204.3631864 (DOI)001150368200005 ()2-s2.0-85182016784 (Scopus ID)9798400704543 (ISBN)
Conference
7th ACM Computer Science in Cars Symposium, CSCS 2023, Darmstadt, 5 December 2023
Available from: 2024-01-24 Created: 2024-01-24 Last updated: 2025-10-10Bibliographically approved
7. Learning single and compound-protocol automata and checking behavioral equivalences
Open this publication in new window or tab >>Learning single and compound-protocol automata and checking behavioral equivalences
2025 (English)In: International Journal on Software Tools for Technology Transfer, ISSN 1433-2779, E-ISSN 1433-2787, Vol. 27, p. 35-52Article in journal (Refereed) Published
Abstract [en]

This paper presents a method and a practical implementation that complements traditional conformance testing. We infer a Mealy state machine of the system-under-test using active automata learning. This automaton is checked for bisimulation with a specification automaton modeled after the standard, which provides a strong verdict of conformance or nonconformance. We further present a method to learn models of multiple communication protocols running on the same device using a dispatcher system in conjunction with the same automata learning algorithms. We subsequently use similar checking methods to compare it with separately learned models. This allows for determining whether there is some interference or interaction between those protocols. In the practical execution of the system, we concentrate on lower levels of the Near-Field Communication (NFC, ISO/IEC 14443-3) and the Bluetooth Low-Energy (BLE) protocols. As a by-product, we share some observations of the performance of different learning algorithms and calibrations in the specific setting of ISO/IEC 14443-3, which is the difficulty to learn models of systems that a) consist of two very similar structures and b) timeout very frequently, as well as the role of conformance testing for compound models and speed optimizations for time-sensitive protocols.

Place, publisher, year, edition, pages
Springer Nature, 2025
Keywords
NFC, BLE, Automata learning, Protocol compliance, Bisimulation, Formal methods
National Category
Computer Sciences
Identifiers
urn:nbn:se:mdh:diva-71287 (URN)10.1007/s10009-025-00797-y (DOI)001467011100001 ()2-s2.0-105003122578 (Scopus ID)
Available from: 2025-04-30 Created: 2025-04-30 Last updated: 2026-04-30Bibliographically approved
8. Automated Passport Control: Mining and Checking Models of Machine Readable Travel Documents
Open this publication in new window or tab >>Automated Passport Control: Mining and Checking Models of Machine Readable Travel Documents
2024 (English)In: ACM International Conference Proceeding Series, Association for Computing Machinery , 2024, article id 171Conference paper, Published paper (Refereed)
Abstract [en]

Passports are part of critical infrastructure for a very long time. They also have been pieces of automatically processable information devices, more recently through the ISO/IEC 14443 (Near-Field Communication - NFC) protocol. For obvious reasons, it is crucial that the information stored on devices are sufficiently protected. The International Civil Aviation Organization (ICAO) specifies exactly what information should be stored on electronic passports (also Machine Readable Travel Documents - MRTDs) and how and under which conditions they can be accessed. We propose a model-based approach for checking the conformance with this specification in an automated and very comprehensive manner: we use automata learning to learn a full model of passport documents and use trace equivalence and primitive model checking techniques to check the conformance with an automaton modeled after the ICAO standard. Since the full behavior is underspecified in the standard, we compare a part of the learned model and apply a primitive checking ruleset to assure proper authentication. The result is an automated (non-interactive), yet very thorough test for compliance, despite the underspecification. This approach can also be used with other applications for which a specification automaton can be modeled and is therefore broadly applicable.

Place, publisher, year, edition, pages
Association for Computing Machinery, 2024
Keywords
Automata Learning, Bisimulation, Formal Methods, NFC, Passports, Protocol Compliance, Automata theory, Automation, Compliance control, Model checking, Automaton learning, Bisimulations, Information devices, International Civil Aviation Organization, ISO/IEC-14443, Machine readable travel documents, Passport, Processable
National Category
Computer and Information Sciences
Identifiers
urn:nbn:se:mdh:diva-68173 (URN)10.1145/3664476.3670454 (DOI)001283894700098 ()2-s2.0-85200364225 (Scopus ID)9798400717185 (ISBN)
Conference
19th International Conference on Availability, Reliability and Security, ARES, Vienna, 30 July-2 August, 2024
Available from: 2024-08-14 Created: 2024-08-14 Last updated: 2025-10-10Bibliographically approved
9. Learn, Check, Test - Security Testing Using Automata Learning and Model Checking
Open this publication in new window or tab >>Learn, Check, Test - Security Testing Using Automata Learning and Model Checking
(English)Manuscript (preprint) (Other academic)
Abstract [en]

Cyber-physical systems are part of industrial systems and critical infrastructure. Therefore, they should be examined in a comprehensive manner to verify their correctness and security. At the same time, the complexity of such systems demands such examinations to be systematic and, if possible, automated for efficiency and accuracy. A method that can be useful in this context is model checking. However, this requires a model that faithfully represents the behavior of the examined system. Obtaining such a model is not trivial, as many of these systems can be examined only in black box settings due to, e.g., long supply chains or secrecy. We therefore utilize active black box learning techniques to infer behavioral models in the form of Mealy machines of such systems and translate them into a form that can be evaluated using a model checker. To this end, we will investigate a cyber-physical systems as a black box using its external communication interface. We first annotate the model with propositions by mapping context information from the respective protocol to the model using Context-based Proposition Maps (CPMs). We gain annotated Mealy machines that resemble Kripke structures. We then formally define a template, to transfer the structures model checker-compatible format. We further define generic security properties based on basic security requirements. Due to the used CPMs, we can instantiate these properties with a meaningful context to check a specific protocol, which makes the approach flexible and scalable. The gained model can be easily altered to introduce non-deterministic behavior (like timeouts) or faults and examined if the properties still. Lastly, we demonstrate the versatility of the approach by providing case studies of different communication protocols (NFC and UDS), checked with the same tool chain and the same security properties.

National Category
Security, Privacy and Cryptography
Research subject
Computer Science
Identifiers
urn:nbn:se:mdh:diva-73529 (URN)10.48550/arXiv.2509.22215 (DOI)
Funder
Knowledge Foundation, 20220130
Note

Preprint of journal article submitted to Elsevier Computers & Security

Available from: 2025-10-02 Created: 2025-10-02 Last updated: 2025-10-10Bibliographically approved

Open Access in DiVA

fulltext(3973 kB)91 downloads
File information
File name FULLTEXT02.pdfFile size 3973 kBChecksum SHA-512
8f1885f628dbd3d1f913593e205f60bb913a7c79d02fb9fb4507a33c6b972d3065e3fa64f6fee537e9c857b01497cf518947397ebf49cb5998a9917c7e39221b
Type fulltextMimetype application/pdf

Authority records

Marksteiner, Stefan

Search in DiVA

By author/editor
Marksteiner, Stefan
By organisation
Embedded Systems
Security, Privacy and Cryptography

Search outside of DiVA

GoogleGoogle Scholar
Total: 91 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

isbn
urn-nbn

Altmetric score

isbn
urn-nbn
Total: 4498 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf