Inductive Intrusion Detection in Flow-Based Network Data Using One-Class Support Vector Machines

Total Page:16

File Type:pdf, Size:1020Kb

Inductive Intrusion Detection in Flow-Based Network Data Using One-Class Support Vector Machines Inductive Intrusion Detection in Flow-Based Network Data using One-Class Support Vector Machines Philipp Winter DIPLOMARBEIT eingereicht am Fachhochschul-Masterstudiengang Sichere Informationssysteme in Hagenberg im Juli 2010 © Copyright 2010 Philipp Winter All Rights Reserved ii Erklärung Hiermit erkläre ich an Eides statt, dass ich die vorliegende Arbeit selbst- ständig und ohne fremde Hilfe verfasst, andere als die angegebenen Quellen und Hilfsmittel nicht benutzt und die aus anderen Quellen entnommenen Stellen als solche gekennzeichnet habe. Hagenberg, am 14. Juli 2010 Philipp Winter iii Contents Erklärung iii Preface xii Kurzfassung xiii Abstract xiv 1 Introduction1 1.1 Motivation.............................1 1.2 Hypothesis............................2 1.3 Related Work...........................2 1.4 Thesis Outline..........................5 2 Analysed Network Data6 2.1 Overview.............................6 2.2 Network Data Sources......................7 2.2.1 Requirements.......................7 2.2.2 Protocol-Based......................8 2.2.3 Packet-Based.......................9 2.2.4 Flow-Based........................ 11 2.2.5 Comparison........................ 12 2.3 Flow-Based Network Data.................... 14 2.3.1 Protocols......................... 14 2.3.2 Definition......................... 15 2.3.3 Technical Details..................... 16 3 Machine Learning 19 3.1 Overview............................. 19 3.2 Introduction............................ 20 3.2.1 Definition......................... 20 3.2.2 Supervised Learning................... 22 3.2.3 Unsupervised Learning.................. 26 3.2.4 Training Data....................... 29 iv Contents v 3.3 Dimensionality.......................... 34 3.3.1 Feature Selection..................... 35 3.3.2 Feature Extraction.................... 39 3.4 Support Vector Machines.................... 40 3.4.1 Operating Mode..................... 40 3.4.2 One-Class Support Vector Machines.......... 42 3.5 Performance Evaluation..................... 42 3.5.1 Performance Measures.................. 43 3.5.2 ROC-Curves....................... 45 3.5.3 Cross Validation..................... 45 3.5.4 Further Criteria...................... 46 4 Experimental Results 48 4.1 Overview............................. 48 4.2 Proposed Approach........................ 49 4.2.1 System Design...................... 49 4.2.2 Discussion......................... 50 4.3 The Data Sets........................... 53 4.3.1 Training Data....................... 53 4.3.2 Testing Data....................... 60 4.3.3 Data Set Allocation................... 64 4.4 Model and Feature Selection................... 64 4.4.1 Approach......................... 65 4.4.2 Feature Optimisation................... 66 4.4.3 Parameter Optimisation................. 67 4.4.4 Joint Algorithmic Optimisation............. 67 4.5 Evaluation............................. 73 4.5.1 Model Testing....................... 74 4.5.2 Data Set Limitations................... 76 4.5.3 Discussion......................... 77 5 Conclusions 80 5.1 Thesis Summary......................... 80 5.2 Interpretation........................... 81 5.3 Future Work........................... 82 A Content of the enclosed CD-ROM 84 A.1 Diploma Thesis.......................... 84 A.2 Code................................ 84 A.3 Data Sets for Coarse Grained Optimisation.......... 84 A.4 Data Sets for Fine Grained Optimisation............ 85 A.5 Results............................... 85 Contents vi B Code 86 B.1 nfdump Patch........................... 86 B.2 svm-scale Patch.......................... 87 B.3 Feature and Model Optimisation................ 88 B.3.1 One-Class SVM Wrapper................ 88 B.3.2 Cross Validation..................... 90 B.3.3 Feature Subset Generator................ 91 B.3.4 Coarse Grained Feature and Model Selection..... 92 B.3.5 Fine Grained Model Selection.............. 95 B.3.6 Utility Functions..................... 97 Acronyms 98 Bibliography 100 List of Figures 2.1 Bidirectional communication between two computers on a net- work. The network traffic monitored by the NetFlow router results in two unidirectional flow records............. 16 2.2 A common scenario for the use of NetFlow. Several NetFlow probes send their records to a central collector. The collector stores the flows and provides an analysis interface for net- work operators who are responsible for network accounting and monitoring........................... 17 3.1 The concept behind supervised machine learning. A training set is used by a machine learning algorithm to build a hy- pothesis which is a generalisation of the training data. This hypothesis is then used to classify as yet unknown data.... 23 3.2 A linear two-class classification problem. There are two differ- ent data distributions, namely male and female points. These 2 two data sets can be linearly separated in R as illustrated by the black line............................ 24 3.3 A linear regression problem. The distribution of all the points 2 of the training set can be approximated by a line in R as illustrated by the red line..................... 25 3.4 Scatter plot which explains the idea of unsupervised learn- ing. Diagram (a) shows unstructured data points. Diagram (b) shows the same data points after a clustering algorithm assigned all points to one of the two clusters.......... 27 3.5 A hierarchical clustering algorithm creates three clusters out of the four data points. First, two points together form a cluster and finally the two clusters form another final cluster. 28 3.6 A dendrogram which represents four iterations of a hierarchi- cal clustering algorithm. The dendrogram can be seen as a binary tree with the data points as its leafs........... 28 3.7 A hypothesis which fits the training data very well. In fact, there are some minor training errors but the generalisation ability is adequate......................... 33 vii List of Figures viii 3.8 Two hypotheses which over and underfit, respectively. Dia- gram (a) illustrates an overfitting hypothesis. The training errors are minimised whereas the generalisation ability can be considered poor. Diagram (b) features an underfitting hy- pothesis. Training errors are high and the generalisation abil- ity will also be far from good................... 33 3.9 Sequential forward selection which resulted in the selection of three features, namely BAD. After each iteration, the feature yielding the best intermediate error rate is added to the list of features............................. 36 3.10 Sequential backward elimination which resulted in the selec- tion of a single feature, namely B. After each iteration, an attribute is eliminated until the algorithm ended up with B.. 37 3.11 The basic functionality of genetic algorithms as described in [88, p. 1]. An initial random population is created out of the input features. Then, mutation and/or crossover is performed as long as the cost function does not decide that the current feature set is “good enough”.................... 39 3.12 Optimal (a) and poorly (b) separating hyperplanes of an SVM. The poorly separating hyperplane offers bad generalisation ability whereas the optimal separating hyperplane perfectly divides both data sets by maximising the margin of the hy- perplane.............................. 41 3.13 Two data sets which contain linearly inseparable vectors. Lin- ear separation would be attended by many training errors. Nonlinear separation, as realised by the black curve, permits the division of both data sets................... 42 3.14 ROC-curve which is often found in evaluations of NIDS’s. The curve illustrates how the detection rate and the false alarm rate change when a parameter of the machine learning model is modified. A good tradeoff between the false alarm rate and the detection rate seems to be at the point with the false alarm rate being 8 and the detection rate being 75........... 46 4.1 The high-level view on the proposed approach for inductive network intrusion detection. An incoming flow is first prepro- cessed. Then, two independent SVMs are used to first detect malicious flows and then, if the flow turns out to be malicious, to perform network traffic classification............. 49 4.2 ER-model of the training data set. The model shows how the tables are interconnected and what information they hold. The actual flows are stored in the table “flows”. The remaining tables provide the correlation to alerts and alert clusters.... 54 List of Figures ix 4.3 Illustrates the distribution of the services of the training set. By far the most flows have been collected for the SSH protocol. The remaining flows belong to auth/ident, HTTP or IRC... 56 4.4 Illustrates the attack types of the training set. Almost all ma- licious flows are part of automated attacks. Only 6 attacks are manual. Furthermore, far more attacks failed than succeeded. 57 4.5 Relationship between the time necessary to train a training set and the size of the respective training set. For each training set size three randomly sampled sets were created and trained. The time necessary to train the respective sets is plotted. Al- though the training time seems to increase with additional set size, it often varies drastically................... 58 4.6 Setup for the creation of benign network flows. A clean host inside a virtual machine creates benign network traffic heading towards the Internet. All this attack-free network traffic is captured and transformed to flow format............ 61 4.7 The two created data sets are divided into a validation
Recommended publications
  • Protocol Design in an Uncooperative Internet
    Protocol Design in an Uncooperative Internet Stefan R. Savage A dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy University of Washington 2002 Program Authorized to Offer Degree: Computer Science and Engineering University of Washington Graduate School This is to certify that I have examined this copy of a doctoral dissertation by Stefan R. Savage and have found that it is complete and satisfactory in all respects, and that any and all revisions required by the final examining committee have been made. Co-Chairs of Supervisory Committee: Thomas E. Anderson Brian N. Bershad Reading Committee: Thomas E. Anderson Brian N. Bershad David J. Wetherall Date: c Copyright 2002 Stefan R. Savage In presenting this dissertation in partial fulfillment of the requirements for the Doctorial degree at the University of Washington, I agree that the Library shall make its copies freely available for inspection. I further agree that extensive copying of this thesis is allowable only for scholary purposes, consistent with “fair use” as prescribed in the U.S. Copyright Law. Requests for copying or reproduction of this dissertation may be referred to ProQuest Information and Learning, 300 North Zeeb Road, Ann Arbor, MI 48106-1346, to whom the author has granted “the right to reproduce and sell (a) copies of the manuscript in microform and/or (b) printed copies of the manuscript made from microform.” Signature Date University of Washington Abstract Protocol Design in an Uncooperative Internet by Stefan R. Savage Co-Chairs of Supervisory Committee Associate Professor Thomas E. Anderson Computer Science and Engineering Associate Professor Brian N.
    [Show full text]
  • Message from the Ceo of Cybersecurity Malaysia
    ii e-Security | Vol: 50 - (1/2021) © CyberSecurity Malaysia 2021 - All Rights Reserved WELCOME MESSAGE FROM THE CEO OF CYBERSECURITY MALAYSIA Dear Readers, In 2020, there was a global shift in the way businesses operate due to the COVID-19 pandemic. Conversations became digital, social distancing became the norm, and paper was phased out in favor of technology. Yes, this year, we are still fighting the pandemic. Most industries had to adjust in some way in order to survive this pandemic. Years of digital advancement transpired in months, putting cybersecurity at the forefront. Many businesses still had no plans or were reluctant to return to an entirely 100% on-site workforce, since many states in Malaysia remain in lockdown or partial lockdown. This situation has forced organisations to immediately implement work-from-home policies and mechanisms for their staff. However, the rush to set up remote work programs had left security gaps that cybercriminals are aggressively exploiting. Companies will continue to face threats in 2021, facilitated by widespread teleworking. As the world shifted to a remote work model in reaction to the COVID-19 pandemic, a stream of new threats, technologies, and business models emerged in the cybersecurity arena. In Malaysia, during the period from January to June 2021, Cyber999 received a total of 5,737 cyber incident reports. People need to be vigilant in the ways they perform daily tasks. With more people working, schooling and shopping from home than before, it is no surprise the types of incidents experienced have changed. For example, ransomware and cyber harassment have become quite common as compared to previous years.
    [Show full text]
  • Security Best Practices for Manufacturing OT
    Security Best Practices for Manufacturing OT May 20, 2021 Notices Customers are responsible for making their own independent assessment of the information in this document. This document: (a) is for informational purposes only, (b) represents current AWS product offerings and practices, which are subject to change without notice, and (c) does not create any commitments or assurances from AWS and its affiliates, suppliers or licensors. AWS products or services are provided “as is” without warranties, representations, or conditions of any kind, whether express or implied. The responsibilities and liabilities of AWS to its customers are controlled by AWS agreements, and this document is not part of, nor does it modify, any agreement between AWS and its customers. © 2021 Amazon Web Services, Inc. or its affiliates. All rights reserved. Contents Introduction .......................................................................................................................... 6 Scenarios ............................................................................................................................. 8 Gaining insights from manufacturing data ....................................................................... 8 Device control / machine learning inference at edge .................................................... 10 Edge computing infrastructure management ................................................................ 11 Integrated manufacturing ..............................................................................................
    [Show full text]
  • Security Challenges and Building Blocks for Robust Industrial Internet of Things Systems
    Fakultät für Elektrotechnik und Informationstechnik Technische Universität München Security Challenges and Building Blocks for Robust Industrial Internet of Things Systems Matthias Niedermaier Vollständiger Abdruck der von der Fakultät für Elektrotechnik und Informationstechnik der Technischen Universität München zur Erlangung des akademischen Grades eines Doktor-Ingenieurs (Dr.-Ing.) genehmigten Dissertation. Vorsitzender: Prof. Dr.-Ing. Wolfgang Kellerer Prüfende der Dissertation: 1. Prof. Dr.-Ing. Georg Sigl 2. Prof. Dr.-Ing. Dominik Merli, Hochschule Augsburg Die Dissertation wurde am 15.01.2020 bei der Technischen Universität München eingereicht und durch die Fakultät für Elektrotechnik und Informationstechnik am 23.04.2020 angenommen. Abstract Digitalization is an ongoing process in home automation, automotive, and industrial processes. In the home environment, it is not surprising anymore that almost everything can now be controlled remotely. However, this trend can also be observed in the industrial environment, where systems are no longer controlled and monitored on-site, but can be done almost from anywhere in the world by using tablets and smartphones. Furthermore, in the course of predictive maintenance, where servicing is performed before damage causes outages, sensors are analyzed in industrial plants and the data is transmitted over the Internet to the vendor. Consequently, industrial components are getting increasingly connected and remotely accessible. This higher connectivity also enlarges the attack surface, because now attackers have new possibilities which did not exist in the times of air-gaped industrial plants. Overall, in the first part of this work, problems of current Industrial Control System (ICS) in terms of robustness will be shown and potential solutions are demonstrated. In the second part, further concepts and future building blocks for increasing IT security in ICS will be introduced.
    [Show full text]
  • Efficient Passive ICS Device Discovery and Identification By
    EFFICIENT PASSIVE ICS DEVICE DISCOVERY AND IDENTIFICATION BY MAC ADDRESS CORRELATION A PREPRINT Matthias Niedermaier Thomas Hanka Sven Plaga [email protected] [email protected] [email protected] Hochschule Augsburg Hochschule Augsburg Fraunhofer AISEC Alexander von Bodisco Dominik Merli [email protected] [email protected] Hochschule Augsburg Hochschule Augsburg August 14, 2019 ABSTRACT Owing to a growing number of attacks, the assessment of Industrial Control Systems (ICSs) has gained in importance. An integral part of an assessment is the creation of a detailed inventory of all connected devices, enabling vulnerability evaluations. For this purpose, scans of networks are crucial. Active scanning, which generates irregular traffic, is a method to get an overview of connected and active devices. Since such additional traffic may lead to an unexpected behavior of devices, active scanning methods should be avoided in critical infrastructure networks. In such cases, passive network monitoring offers an alternative, which is often used in conjunction with complex deep-packet inspection techniques. There are very few publications on lightweight passive scanning methodologies for industrial networks. In this paper, we propose a lightweight passive network monitoring technique using an efficient Media Access Control (MAC) address-based identification of industrial devices. Based on an incomplete set of known MAC address to device associations, the presented method can guess correct device and vendor information. Proving the feasibility of the method, an implementation is also introduced and evaluated regarding its efficiency. The feasibility of predicting a specific device/vendor combination is demonstrated by having similar devices in the database.
    [Show full text]
  • The Case of Data Diodes for Cybersecurity
    Understanding the Strategic and Technical Significance of Technology for Security Together we Understanding the Strategic Secure the Future and Technical Significance www.thehaguesecuritydelta.com of Technology for Security The Case of Data Diodes for Cybersecurity Understanding the Strategic and Technical Significance of Technology for Security The Case of Data Diodes for Cybersecurity Table of Contents 1 – Introduction: Technology and Cybersecurity 5 2 – Context 9 3 – What is Data Diode Technology and How Does it Work? 11 3.1 What does a data diode look like? 12 3.1.1 Configuration 12 3.1.2 Integration of hardware and software 13 3.1.3 Use of protocols 14 4 – Strengths and Weaknesses of Data Diode Technology 17 4.1 Strengths 17 4.2 Weaknesses 18 4.3 Data Diode, Firewall and Air Gap: How Do They Compare? 20 5 – Data Diode Stakeholder Landscape 23 5.1 Use Case Environment 23 5.2 Vendors 23 5.3 Opportunities for Dutch Stakeholders 25 6 – New Developments in Data Diodes 27 6.1 The Market Condition of Data Diodes 27 6.2 Compliance 27 6.3 Export and Innovation Possibilities 28 6.4 New Fields and the Internet of Things 29 6.5 Open Source vs. Closed Source 30 7 – Conclusions 33 8 – Recommendations 35 Annexes 37 Annex 1 – Interview Questionnaire 38 Annex 2 – List of Interviewees 39 Bibliography 41 3 4 1 – Introduction: Technology and Cybersecurity Our society is undergoing a digital transformation. The The policy is based on setting up collaboration, already characteristics of this transformation are determined by initiated within the Top Sectors2, in four central themes: the convergence of technologies and social activities that blur the boundaries between physical, digital, • energy transition and sustainability; and biological systems.
    [Show full text]
  • Guide to Industrial Control Systems (ICS) Security
    NIST Special Publication 800-82 Revision 2 Guide to Industrial Control Systems (ICS) Security Supervisory Control and Data Acquisition (SCADA) Systems, Distributed Control Systems (DCS), and Other Control System Configurations such as Programmable Logic Controllers (PLC) Keith Stouffer Victoria Pillitteri Suzanne Lightman Marshall Abrams Adam Hahn This publication is available free of charge from: http://dx.doi.org/10.6028/NIST.SP.800-82r2 NIST Special Publication 800-82 Revision 2 Guide to Industrial Control Systems (ICS) Security Supervisory Control and Data Acquisition (SCADA) systems, Distributed Control Systems (DCS), and other control system configurations such as Programmable Logic Controllers (PLC) Keith Stouffer Intelligent Systems Division Engineering Laboratory Victoria Pillitteri Suzanne Lightman Computer Security Division Information Technology Laboratory Marshall Abrams The MITRE Corporation Adam Hahn Washington State University This publication is available free of charge from: http://dx.doi.org/10.6028/NIST.SP.800-82r2 May 2015 U.S. Department of Commerce Penny Pritzker, Secretary National Institute of Standards and Technology Willie May, Under Secretary of Commerce for Standards and Technology and Director SPECIAL PUBLICATION 800-82 REVISION 2 GUIDE TO INDUSTRIAL CONTROL SYSTEMS (ICS) SECURITY Authority This publication has been developed by NIST to further its statutory responsibilities under the Federal Information Security Modernization Act (FISMA) of 2014, 44 U.S.C. § 3541 et seq., Public Law (P.L.) 113-283. NIST is responsible for developing information security standards and guidelines, including minimum requirements for federal information systems, but such standards and guidelines shall not apply to national security systems without the express approval of appropriate federal officials exercising policy authority over such systems.
    [Show full text]
  • Überwachung Sicherheitskritischer Bahnnetzwerke Mittels Eines Einweg-Gateways Monitoring Safety-Critical Railway Networks Using Unidirectional Gateways
    www.eurailpress.de/archiv/cyber+sicherheit IT-SICHERHEIT | IT SECURITY Homepageveröffentlichung unbefristet genehmigt für Siemens AG / Rechte für einzelne Downloads und Ausdrucke für Besucher der Seiten genehmigt von DVV Media Group, 2018. Überwachung sicherheitskritischer Bahnnetzwerke mittels eines Einweg-Gateways Monitoring safety-critical railway networks using unidirectional gateways Ricarda Weber | Martin Wimmer ie war es so einfach wie in diesen Zeiten von Digitalisierung hanks to modern digitisation and connectivity, it has Nund Vernetzung, Daten über den Zustand von Automatisie- T never been easier to collect and analyse data relating to rungs- oder Produktionsanlagen zu sammeln, zu analysieren the state of production or automation equipment, for exam- und dadurch etwa Ausfallzeiten solcher kritischer Infrastruk- ple in order to reduce the downtime of critical infrastructure. turen zu verringern. Um Digitalisierung und Konnektivität re- Digitisation and connectivity mean that infrastructures are alisieren zu können, müssen kritische Infrastrukturen mit dem connected to the internet and / or cloud computing platforms. Internet oder Cloud-Plattformen verbunden sein. Durch diese However, opening up and interlinking networks comes with a Öffnung und Anbindung der Netze nimmt die Bedrohung durch dramatic increase in the risk of attacks on infrastructure sys- Angriffe auf Infrastrukturen jedoch dramatisch zu. Wie also kön- tems. How can operational data be made available for diag- nen Betriebsdaten zu Diagnosezwecken genutzt werden, ohne nostic purposes without compromising the safety of rail op- die Sicherheit des Bahnbetriebs zu kompromittieren? erations in the process? 1 Data Capture Unit (DCU) von Siemens 1 Data Capture Unit (DCU) from Siemens Eine Antwort darauf bietet die Data Capture Unit (DCU, Bild 1).
    [Show full text]