5 research outputs found

    Log-based Anomaly Detection of CPS Using a Statistical Method

    Full text link
    Detecting anomalies of a cyber physical system (CPS), which is a complex system consisting of both physical and software parts, is important because a CPS often operates autonomously in an unpredictable environment. However, because of the ever-changing nature and lack of a precise model for a CPS, detecting anomalies is still a challenging task. To address this problem, we propose applying an outlier detection method to a CPS log. By using a log obtained from an actual aquarium management system, we evaluated the effectiveness of our proposed method by analyzing outliers that it detected. By investigating the outliers with the developer of the system, we confirmed that some outliers indicate actual faults in the system. For example, our method detected failures of mutual exclusion in the control system that were unknown to the developer. Our method also detected transient losses of functionalities and unexpected reboots. On the other hand, our method did not detect anomalies that were too many and similar. In addition, our method reported rare but unproblematic concurrent combinations of operations as anomalies. Thus, our approach is effective at finding anomalies, but there is still room for improvement

    Code Integrity Attestation for PLCs using Black Box Neural Network Predictions

    Full text link
    Cyber-physical systems (CPSs) are widespread in critical domains, and significant damage can be caused if an attacker is able to modify the code of their programmable logic controllers (PLCs). Unfortunately, traditional techniques for attesting code integrity (i.e. verifying that it has not been modified) rely on firmware access or roots-of-trust, neither of which proprietary or legacy PLCs are likely to provide. In this paper, we propose a practical code integrity checking solution based on privacy-preserving black box models that instead attest the input/output behaviour of PLC programs. Using faithful offline copies of the PLC programs, we identify their most important inputs through an information flow analysis, execute them on multiple combinations to collect data, then train neural networks able to predict PLC outputs (i.e. actuator commands) from their inputs. By exploiting the black box nature of the model, our solution maintains the privacy of the original PLC code and does not assume that attackers are unaware of its presence. The trust instead comes from the fact that it is extremely hard to attack the PLC code and neural networks at the same time and with consistent outcomes. We evaluated our approach on a modern six-stage water treatment plant testbed, finding that it could predict actuator states from PLC inputs with near-100% accuracy, and thus could detect all 120 effective code mutations that we subjected the PLCs to. Finally, we found that it is not practically possible to simultaneously modify the PLC code and apply discreet adversarial noise to our attesters in a way that leads to consistent (mis-)predictions.Comment: Accepted by the 29th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE 2021

    Спосіб виявлення неоптимального використання програмного коду мовою Kotlin

    Get PDF
    Актуальність теми. На сьогодні активно розвивається область розробки програмного забезпечення. Кожен день створюється величезна кількість рядків програмного коду. Найчастіше при розгляді вихідного коду програм можна виявити окремі частини коду, що за тією чи іншою ознакою виділяються на загальному тлі розглянутого набору даних. Такі приклади нетипового коду в рамках даної роботи називаються кодовими аномаліями або неоптимальним використанням коду. Kotlin - це досить молода мова програмування зі швидко зростаючою спільнотою користувачів і значною екосистемою різноманітних проектів з відкритим вихідним кодом. Розробники вже не перший рік ведуть дослідження з пошуку кодових аномалій в програмах мовою Kotlin. У зв'язку з актуальністю вирішення такого завдання в роботі пропонується розширити існуючі рішення і створити систему виявлення нових фрагментів неоптимального коду. Мета роботи: підвищення ефективності системи виявлення кодових аномалій за рахунок розширення переліку функцій та виявлення нових класів прикладів коду, що виділяються своїм нестандартним змістом в програмах мовою Kotlin. Об’єктом дослідження є методи векторизації, токенізації для розбиття коду та збору статистичного аналізу неоптимального використання програмного коду (аномалій). Предметом дослідження є системи пошуку неоптимального використання програмного коду мовою Kotlin на основі токенів. Методи дослідження. В роботі використовуються методи токенізації, методи веркторизації та кластеризації даних. Наукова новизна одержаних результатів полягає в наступному. 1. Проаналізовано основні методики пошуку неоптимального використання коду та показано, шо на сьогодні залишається недостатньо дослідженим питання пошук неоптимального коду написаних мовою програмування Kotlin. 2. Запропоновано спосіб пошуку неоптимального коду, який відрізняється від існуючих методами векторизації та пошуку аномалій, та дозволяє знайти більше неоптимального коду 3. Проведено апробацію і отримано набір кодових аномалій, які зібрані у класи та порівняно з існуючими рішеннями. 4. Отримано експертну оцінку користі знайдених аномалій. Практична цінність одержаних результатів полягає в тому, що запропонований спосіб підвищує ефективність пошуку неоптимального використання коду, що дозволяє отримати більш якісний код за такими параметрами як швидкодія, пам’ять та поломки програми. Апробація роботи. Основні положення і результати роботи були представлені та обговорювались на: • XIII науковій конференції молодих вчених «Прикладна математика та комп’ютинг» ПМК-2020; • VІ міжнародна науково-технічна Internet-конференція Публікації. За тематикою проведених досліджень опубліковано 2 наукові праці, а саме 2 тези доповідей на конференціях. Структура та обсяг роботи. Магістерська дисертація складається з вступу, трьох розділів, висновків та додатків. У вступі надано загальну характеристику програмного коду, проблематику пошуку неоптимального використання програмного коду сформульовано мету дослідження, показано практичну цінність роботи. У першому розділі надано детальне обґрунтування актуальності напрямку досліджень, виконано оцінку поточного стану в даній сфері, представлено теоретичний огляд особливостей пошуку аномалій. У другому розділі розроблено та описано систему пошуку неоптимального використання програмного коду мовою Kotlin. У третьому розділі проведено апробацію. У висновках проаналізовано отримані результати роботи.Actuality of theme. Today the field of software development is actively developing. Every day a huge number of lines of program code are created. Most often, when considering the source code of programs, you can find individual parts of the code, which in one way or another stand out against the general background of the data set. Such examples of atypical code in this work are called code anomalies or suboptimal use of code. Kotlin is a fairly young programming language with a fast-growing user community and a large ecosystem of various open source projects. The developers have been conducting research on the search for code anomalies in Kotlin programs for more than a year. Due to the urgency of solving this problem, the paper proposes to expand existing solutions and create a system for detecting new fragments of suboptimal code. The purpose of the work is improving the efficiency of the code anomaly detection system by expanding the list of functions and identifying new classes of code examples that stand out for their non-standard content in Kotlin programs. The object of the study is the methods of vectorization, tokenization for code splitting and collection of statistical analysis of suboptimal use of program code (anomalies). The subject of the research is systems for searching for suboptimal use of program code in Kotlin language based on tokens. Research methods. The paper uses methods of tokenization, methods of vectorization and clustering of data. The scientific novelty of the obtained results is as follows. 1. The main methods of searching for suboptimal use of code are analyzed and it is shown that today the question of searching for suboptimal code written in Kotlin programming language remains insufficiently researched. 2. A method for finding a suboptimal code is proposed, which differs from the existing methods of vectorization and anomaly search, and allows to find more suboptimal code 3. Approbation was carried out and a set of code anomalies was obtained, which were collected in classes and compared with existing solutions. 4. An expert assessment of the benefits of the found anomalies was obtained. The practical novelty of the obtained results is that the proposed method increases the efficiency of search for suboptimal use of code, which allows to obtain better quality code in such parameters as speed, memory and program crashes. Approbation of work. The main provisions and results of the work were presented and discussed at: • XIII scientific conference of young scientists "Applied Mathematics and Computing" PMK-2020; • VI International Scientific and Technical Internet Conference Publications. Two scientific papers were published on the subject of the conducted researches, namely 2 abstracts of reports at conferences. Structure and scope of work. The master's dissertation consists of an introduction, three sections, conclusions and appendices. The introduction provides a general description of the program code, the problem of finding suboptimal use of program code, formulates the purpose of the study, shows the practical value of the work. In the first section the detailed substantiation of urgency of a direction of researches is given, the estimation of a current condition in the given sphere is executed, the theoretical review of features of search of anomalies is presented. The second section develops and describes a system for searching for suboptimal use of program code in the Kotlin language. In the third section the approbation is carried out. The results of the work are analyzed in the conclusions
    corecore