<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Omer Poyraz, PhD on Medium]]></title>
        <description><![CDATA[Stories by Omer Poyraz, PhD on Medium]]></description>
        <link>https://medium.com/@omerpoyraz_16318?source=rss-192b86951b8d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7gB7OHFe7jXj0-ORG6tnMQ.jpeg</url>
            <title>Stories by Omer Poyraz, PhD on Medium</title>
            <link>https://medium.com/@omerpoyraz_16318?source=rss-192b86951b8d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 00:46:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@omerpoyraz_16318/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Whodunit: Cyber-attack Attribution: Part 3]]></title>
            <link>https://medium.com/@omerpoyraz_16318/whodunit-cyber-attack-attribution-part-3-8d7ac23e021d?source=rss-192b86951b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d7ac23e021d</guid>
            <category><![CDATA[cyber-risk]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[imbalanced-data]]></category>
            <category><![CDATA[ibm-autoai]]></category>
            <category><![CDATA[cyber-attack-attribution]]></category>
            <dc:creator><![CDATA[Omer Poyraz, PhD]]></dc:creator>
            <pubDate>Tue, 21 Mar 2023 04:50:06 GMT</pubDate>
            <atom:updated>2023-03-21T04:50:06.637Z</atom:updated>
            <content:encoded><![CDATA[<h3>Results</h3><p>In Part 3, we will review the metrics scores for the pipelines that came up with the top score for F1, Precision, and Recall. Here, there is a snapshot of the scores of all pipelines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lo5EGwkxXFtTRnWUnOQkoA.png" /><figcaption>Experiment results for all pipelines</figcaption></figure><h3>F1 score</h3><p>Pipelines 15 and 16 have the highest F1 score. Pipeline 16 has an additional round of hyperparameter optimization. The algorithm used in these pipelines is Snap Random Forest. Let’s review the results of Pipeline 16.</p><p><strong>ROC curve</strong></p><p>The ROC curve plots the true positive rate (TPR) against the false positive rate (FPR) at various classification thresholds. The ROC curve helps to evaluate the model’s performance by showing the trade-off between sensitivity (the TPR) and specificity (the true negative rate) for different threshold values.</p><p>The small circles in the figure represent the thresholds and the corresponding TPR and FPR. We want to maximize the TPR while minimizing the FPR. However, eventually, we will have a trade-off between the TPR and FPR. Let’s say we want our TPR to be 0.9. Then, we would have an FPR of 0.15.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*RdplAJuUPct6Db4XBNNMrg.jpeg" /><figcaption>ROC Curve for Pipeline 16</figcaption></figure><p><strong>Confusion Matrix</strong></p><p>The confusion matrix summarizes the number of correct and incorrect predictions made by the model compared to the actual outcomes. It is a non-technical explanation of the binary classification model. Here we have a very good Precision for positive (state-affiliated) and negative (nonstate) classes. Although the Precision for the positive class is very high, we have a low recall of 60.7%.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J0QdZtbCdvERLz_HZ_ZWpQ.png" /><figcaption>Pipeline 16 Confusion Matrix</figcaption></figure><p><strong>Precision-Recall Curve</strong></p><p>The Precision-Recall curve is a graphical representation of the trade-off between the Positive Predictive Value and the Recall of the classifier. The decision threshold is the probability that an instance is classified as positive and below which it is classified as negative. As the RRecall increases, the PPrecision decreases almost sharply.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*XhWEFCJYnbOB7enO1hhbsg.jpeg" /><figcaption>Pipeline 16 Precision-Recall Curve</figcaption></figure><h3>Precision</h3><p>The top results for the Precision are Pipeline 13 and Pipeline 14, which have the same results. The only difference for Pipeline 14 is that a final round of hyperparameter optimization is applied.</p><p><strong>ROC Curve</strong></p><p>The ROC curve below is a skillful classifier. It shows the thresholds of how TPR and FPR change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*D4HkEvPiMIigEJANFTAJnQ.jpeg" /><figcaption>Pipeline 13 ROC Curve</figcaption></figure><p><strong>Confusion Matrix</strong></p><p>The confusion matrix has the same values as the previous pipeline. This model also has good Precision, but the Recall for the minority class is low.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XHpTvhVxMiehV6JBgMu9lA.png" /><figcaption>Pipeline 13 Confusion Matrix</figcaption></figure><p><strong>Precision-Recall Curve</strong></p><p>The precision-Recall curve sharply decreases as Recall increases from 0.6 to 0.8.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*od8wGoxFJtE_UUs-M8Kngg.jpeg" /><figcaption>Pipeline 13 P-R Curve</figcaption></figure><h3>Recall</h3><p>Pipeline 9 has the highest recall score. The ROC curve, confusion matrix, and Precision-Recall curve are provided below.</p><p><strong>ROC Curve</strong></p><p>We have a slightly improved ROC curve.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*Gwxfx77hj84LEi_sgt8GKA.jpeg" /><figcaption>Pipeline 9 ROC Curve</figcaption></figure><p><strong>Confusion Matrix</strong></p><p>The Recall for the minority class is the highest compared to the previous models. Yet, the number of False Positives is much higher.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wk7h_j0lKKDqVhq-uGXtnA.png" /><figcaption>Pipeline 9 Confusion Matrix</figcaption></figure><p><strong>Precision-Recall Curve</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*8itz1lS5EaO_HVRHFEP0-g.jpeg" /><figcaption>Pipeline 9 Precision-Recall Curve</figcaption></figure><p>Although IBM AutoAI provides the ROC curve, Precision-Recall curve, confusion matrix, and other relevant scores, we only provide the top performers’ for F1, Precision, and Recall.</p><h3>Additional Pipelines confusion Matrix</h3><p>Some of the Pipelines’ confusion matrix and Model Performance Comparison Chart for Test data are provided to compare the scores and to have an idea of how models differ from each other. A confusion matrix can benefit imbalanced data more than balanced data. Since we can see the TP, FP, TN, and FN for each class, depending on the need of the organization or the domain, we may choose the model based on the model’s performance on the minority class without the need to understand F1, AUROC, and so on.</p><p><strong>Pipeline 7</strong></p><p>This one has the best precision rate for the minority class. If the priority is high Precision for the minority class, this pipeline would be the best to apply.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QpHUYPDEctmYUi8dkWzsFw.png" /><figcaption>Pipeline 7 Confusion Matrix</figcaption></figure><p><strong>Pipeline 3</strong></p><p>Although the TP value is higher, we also have a higher FP in this model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P0jLtMwD5t5wwVrFERKV5g.png" /><figcaption>Pipeline 3 Confusion Matrix</figcaption></figure><p><strong>Pipeline 5</strong></p><p>This model has improved regarding FP, but our TP is lower now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i_vuY4ml9eZlJehXKQGdOw.png" /><figcaption>Pipeline 5 Confusion Matrix</figcaption></figure><p>We already covered how to evaluate F1, Precision, Recall, and AUROC. Another metric, Average Precision, is also used to assess imbalanced data. Average Precision is the weighted mean of precisions at every threshold.</p><p><strong>Model Performance Comparison Chart for Test data</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jrDx8m9zacfIdHAOYuUdsA.png" /><figcaption>Models’ Comparison</figcaption></figure><p><strong>Top 5 original features according to their importance for Pipeline 15</strong></p><p>The ranking of the features per feature importance changes per model. The top 10 feature summary per model is provided in the <a href="https://github.com/opoyraz/Whodunit-Cyber-attack-attribution/tree/main/10%20Feature%20importance">GitHub</a> repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*oXfPj4yG1AbeMsmvEaMcjg.png" /><figcaption>Top 5 Features</figcaption></figure><h3>Conclusion</h3><p>Choosing the model depends on the business priorities and needs for classification with imbalanced data. The current situation tells us that there are increasing state-sponsored cyber-attacks, which are costly. Therefore, cyber insurers want to avoid including state-sponsored cyber-attacks in their policies. They need to identify if a cyber-attack is state-sponsored or not. If they fail to recognize a state-sponsored attack, they will cover the wrong victim considering the policy. Also, if they do not pay a state-sponsored attack victim client, they may later deal with lawsuits, legal fees, etc. There is a trade-off here to decide which one is more costly, covering a state-affiliated cyber-attack victim or not covering a nonstate cyber-attack victim.</p><p>The models developed with IBM AutoAI show that a cyber-attack can be identified as state-sponsored to a certain degree. You can go with Pipeline 3, including more state-sponsored attacks in the prediction. Or, you can go with the pipeline with the highest F1 score balancing the performance for both classes.</p><p>What pipeline would you select? What should be the priority of the insurers?</p><h4>Part 1: <a href="https://medium.com/@omerilkerpoyraz_16318/whodunit-cyber-attack-attribution-aca46fa5b7f2">Whodunit: Cyber-attack attribution</a></h4><h4>Part 2: <a href="https://medium.com/@omerpoyraz_16318/whodunit-cyber-attack-attribution-e2efadc2dace">How to evaluate the classifiers with an imbalanced dataset</a></h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d7ac23e021d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Whodunit: Cyber-attack Attribution: Part 2]]></title>
            <link>https://medium.com/@omerpoyraz_16318/whodunit-cyber-attack-attribution-e2efadc2dace?source=rss-192b86951b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2efadc2dace</guid>
            <category><![CDATA[imbalanced-data]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[cyber-risk]]></category>
            <category><![CDATA[classification]]></category>
            <dc:creator><![CDATA[Omer Poyraz, PhD]]></dc:creator>
            <pubDate>Sun, 19 Mar 2023 04:18:23 GMT</pubDate>
            <atom:updated>2023-03-21T18:35:14.917Z</atom:updated>
            <content:encoded><![CDATA[<h3>Part 2: How to evaluate the classifiers with an imbalanced dataset</h3><p>In Part 2, before evaluating the pipelines developed with IBM AutoAI, we need to review the metrics for evaluating imbalanced datasets.</p><h3>Imbalanced data analysis</h3><p>For imbalanced classification problems, the majority class is typically referred to as the negative outcome (e.g., such as “<em>nonstate</em>”), and the minority class is typically referred to as the positive outcome (e.g., “state-affiliated).</p><p>A confusion matrix table is an intuitive way to understand the model performance on the classification problem. It provides information about how well a classification model performs by comparing the actual target values with the model’s predicted values. It summarizes the number of correct and incorrect predictions made by the model compared to the actual outcomes.</p><p>The matrix is arranged in a table with rows and columns representing the actual and predicted classes, respectively. Each cell in the table represents the number of instances that belong to a particular class. The four key terms in a confusion matrix are:</p><p>True positive (TP) — sample’s actual label is positive, and it is predicted as positive</p><p>True negative (TN) — sample’s actual label is negative, and it is predicted as negative</p><p>False positive (FP) — sample’s actual label is negative, but it is predicted as positive</p><p>False negative (FN) — sample’s actual label is positive, but it is predicted as negative</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LAR2A0HIxKE3pxrM4JNhEw.png" /><figcaption>Confusion Matrix terms</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i_vuY4ml9eZlJehXKQGdOw.png" /><figcaption>An example of a Confusion Matrix</figcaption></figure><p>Based on the confusion matrix table above, the values are:</p><p>TP: 19</p><p>TN: 324</p><p>FP: 2</p><p>FN: 9</p><p>By looking at the distribution of these four terms in the confusion matrix, you can determine the model’s accuracy, Precision, Recall, and F1 score.</p><h3>True Positive Rate (TPR) / Recall / Sensitivity</h3><p>Recall or sensitivity refers to the true positive rate and summarizes how well the positive class was predicted.</p><p><strong>Recall (Sensitivity/TPR)</strong> = True Positive / (True Positive + False Negative)</p><h3>True Negative Rate / Specificity</h3><p>Specificity or the true negative rate summarizes how well the negative class was predicted.</p><p><strong>Specificity</strong> = True Negative / (False Positive + True Negative)</p><h3>Precision</h3><p>Precision measures the proportion of correctly classified positive instances among all the instances predicted as positive by the model.</p><p><strong>Precision</strong> = True Positive / (True Positive + False Positive)</p><h3>F1 Score</h3><p>F1 score is a performance metric commonly used in machine learning to measure the balance between the Precision and Recall of a model. It is the harmonic mean of Precision and Recall and is a single number that summarizes the performance of a binary classification model.</p><p>The F1 score provides a way to evaluate the overall effectiveness of a model in terms of both false positives and false negatives. It is particularly useful when there is an uneven class distribution.</p><p><strong>F1 Score</strong> = (2 * Precision * Recall) / (Precision + Recall)</p><p>The F1 score is a value between 0 and 1, where 1 represents perfect Precision and Recall, and 0 represents poor performance. A high F1 score indicates that the model has a good balance between Precision and Recall and is a reliable classifier.</p><p>In summary, the F1 score is a useful metric for evaluating the performance of a binary classification model, as it provides a single number that considers both Precision and Recall.</p><h3>The Receiver Operating Characteristic Curve</h3><p>The Receiver Operating Characteristic (ROC) curve is a graphical representation of the performance of a binary classification model. It plots the true positive rate (TPR) against the false positive rate (FPR) at various classification thresholds.</p><p>The model predicts whether the input belongs to a positive or negative class in a binary classification problem. The ROC curve helps to evaluate the model’s performance by showing the trade-off between sensitivity (the TPR) and specificity (the true negative rate or TNR) for different threshold values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*IJ4MTTaWTaYbV34x74EKMA.png" /></figure><p>The TPR represents the proportion of actual positive samples correctly identified by the model as positive. In contrast, the FPR represents the proportion of actual negative samples incorrectly identified by the model as positive.</p><p>TPR = TP / (TP + FN)</p><p>FPR = FP / (TN + FP)</p><p>The area under the ROC curve (AUC) is a commonly used metric to evaluate the overall performance of the binary classification model. The AUC ranges from 0 to 1, with a value of 1 indicating a perfect classifier and a value of 0.5 indicating a classifier that performs no better than random chance. Any points below this line are worse than no skill. A higher AUC indicates a better overall performance of the model.</p><h3>Precision-Recall Curve</h3><p>The Precision-Recall (PR) curve is an evaluation metric used particularly in binary classification problems to evaluate the performance of a classifier. It is a graphical representation of the trade-off between the Precision (positive predictive value) and Recall (sensitivity) of the classifier.</p><p>The PR curve plots Precision on the y-axis and Recall on the x-axis, with each point on the curve corresponding to a particular decision threshold of the classifier. The decision threshold is the probability or score value above which an instance is classified as positive and below which it is classified as negative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*W3KYDcZaLv2dNayDuZGtMQ.png" /></figure><p>The ideal PR curve is a curve that passes through the top-right corner of the graph, which represents perfect Precision and Recall, indicating that the classifier makes no false positive or false negative errors. A good classifier has a PR curve that is as close to the top-right corner as possible.</p><p>PR curve is useful when the dataset is imbalanced. In such cases, accuracy alone may not be a good metric to evaluate the performance of a classifier as it can be misleading. The PR curve provides a better understanding of how well the classifier performs on positive instances.</p><p><strong>Part 1: </strong><a href="https://medium.com/@omerilkerpoyraz_16318/whodunit-cyber-attack-attribution-aca46fa5b7f2"><strong>Whodunit: Cyber-attack attribution</strong></a></p><p><strong>Part 3: </strong><a href="https://medium.com/@omerpoyraz_16318/whodunit-cyber-attack-attribution-part-3-8d7ac23e021d"><strong>Results</strong></a></p><p><strong>References</strong></p><p><a href="https://machinelearningmastery.com/tour-of-evaluation-metrics-for-imbalanced-classification/">https://machinelearningmastery.com/tour-of-evaluation-metrics-for-imbalanced-classification/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2efadc2dace" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Whodunit: Cyber-attack Attribution]]></title>
            <link>https://medium.com/@omerpoyraz_16318/whodunit-cyber-attack-attribution-aca46fa5b7f2?source=rss-192b86951b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/aca46fa5b7f2</guid>
            <category><![CDATA[imbalanced-data]]></category>
            <category><![CDATA[cyber-risk]]></category>
            <category><![CDATA[attack-attribution]]></category>
            <category><![CDATA[ibm-autoai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Omer Poyraz, PhD]]></dc:creator>
            <pubDate>Sun, 19 Mar 2023 03:35:52 GMT</pubDate>
            <atom:updated>2023-03-21T18:34:24.795Z</atom:updated>
            <content:encoded><![CDATA[<h3>Whodunit: Cyber-attack Attribution: Part 1</h3><p>An investigation of cyber-attacks to discover who committed it: state and state-affiliated groups or nonstate groups!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z0WvbGBVFL5eBSUJXVXVNA.jpeg" /><figcaption>Image credit: Cottonbro Studio</figcaption></figure><p>Special thanks to <a href="https://www.linkedin.com/in/meryemvildansarikaya/">Meryem Vildan Sarikaya</a> for contributing to this series of articles. Also thanks to Ozkan Serttas and Hamdi Kavak PhD for guiding me to convert the data from JSON to tabular format.</p><h3>Part 1 Introduction</h3><p>The frequency and severity of state-sponsored cyber-attacks have been on the rise in recent years. These attacks are often aimed at stealing sensitive information, disrupting critical infrastructure as a part of warfare, or spreading propaganda. The impact of such attacks can be far-reaching and long-lasting, affecting businesses, governments, and individuals alike. In some cases, state-sponsored cyber-attacks can cause widespread power outages, financial losses, and reputational damage and compromise national security. According to the White House, the NotPetya malware ultimately caused more than $10bn in damage.</p><p>In the aftermath of NotPetya, some insurers denied claims for the resulting costs on the grounds that the attack was a “warlike act” because a government was behind it. Since many insurance policies exclude coverage for acts of war, the cyber-insurers reasoned that this same exclusion should apply to acts of cyber war or state-sponsored cyber-attacks.[1]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f4L20lvz29fhmeE6SBX1_g.jpeg" /><figcaption>Image credit: Cottonbro Studio</figcaption></figure><h3>Problem</h3><p>Merck &amp; Co. suffered more than $1.4 billion in losses in the NotPetya cyber-attack and filed a claim under its all-risk property insurance policies. However, the insurers rejected the claim citing the war exclusion clause, which denies coverage for losses caused by hostile or warlike action by a government or sovereign power. But the New Jersey Superior Court recently ruled in favor of Merck &amp; Co. in the case of Merck &amp; Co., Inc. v. ACE American Insurance Co., stating that the exclusion clause only applies to traditional forms of warfare and not to cyber-attacks. This is the first legal decision to consider the application of the war exclusion to a cyber-attack, and it may set a precedent for future cases. Nevertheless, insurers are already modifying their cyber insurance policies to exclude coverage for state-sponsored cyberattacks. Lloyd’s of London has issued four model exclusions that specifically exclude coverage for loss or damage caused by “cyber operations” by or on behalf of a state. [2]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0fupGLW_NHk_Clcec6Gb_A.jpeg" /><figcaption>Image credit: Cottonbro Studio</figcaption></figure><p>As cyberattacks continue to rise, the federal government is contemplating whether it should step in to help private insurance companies cover some of the costs related to severe cyber incidents.[3,4]</p><p>Unlike traditional cyber threats, state-sponsored attacks are often highly sophisticated and well-funded, making them difficult to defend against. As a result, many cyber insurance companies exclude coverage for these attacks in their policies. However, accurately predicting state-sponsored attacks can greatly benefit insurance companies. By understanding the motivations and methods behind these attacks, insurance companies can better evaluate the risks faced by their clients and develop more effective underwriting and pricing strategies. Attributing a cyber-attack is essential for insurance companies and their clients. Increasing state-sponsored attacks have led to a debate over whether these attacks should be covered under insurance policies. This may result in either:</p><blockquote><strong>- expensive policies if they are included or</strong></blockquote><blockquote><strong>- low demand for insurance if they are excluded</strong></blockquote><p>While it is not easy to prove the attribution of a cyber-attack [5], this article aims to develop a machine learning model using the public data from the VERIS Community Database (VCDB) to predict whether a cyber-attack on confidentiality, integrity, and availability is state-sponsored or not.</p><h3>The Data</h3><p>We will use the VCDB dataset to develop the model. Before diving deep into the data, let’s briefly cover the triad of Confidentiality, Integrity, and Availability.</p><p><strong>Confidentiality</strong> ensures that unauthorized users cannot read sensitive information on a computer or while it travels across a network. Encryption techniques and tools provide confidentiality, making it impossible for malefactors to read the data or information.</p><p><strong>Integrity</strong> guarantees that information, whether on a computer or traveling across a network, cannot be altered or destroyed by malicious actors. If any changes are made, the receiver will be able to detect them.</p><p><strong>Availability</strong> ensures that authorized users have access to the necessary information. Distributed Denial of Service attacks is a type of attack that prevents legitimate users from accessing a server or file by compromising the availability of networks or systems.</p><p>We’ll start with preparing the data for the machine learning model to predict if these attacks can be attributed to nation-states.</p><p><strong>What is a state-affiliated cyber-attack?</strong></p><p>A cyber-attack is only counted as state-affiliated if its directly carried out by a state or the state used a cyber-criminal organization or individual to carry out the attack as a proxy. The rest of the attacks are labeled as non-state affiliated cyber-attacks. Although, as the experts state [5], it is hard to prove that a cyber-attack can be attributed to a state, there are still some signs or indicators that a cyber-attack might be conducted or sponsored by a nation-state.</p><h3>What does the VCDB look like?</h3><p>The home page of the data source can be found at <a href="http://veriscommunity.net/index.html">VERIS</a>. The raw data is in JSON format and can be accessed at <a href="https://github.com/vz-risk/VCDB">VCDB</a>. The data was accessed and downloaded in 2020.</p><p>The home page provides information about the keys and values in the data. The data were converted from JSON to a tabular format using the JSON and Pandas libraries, but this was not enough to ensure the data was in the correct format. Therefore, we improved the data quality, corrected the columns and fields, and verified certain incidents. While much work must be done to improve the data quality, finding relevant information about incidents can sometimes be a dead-end, as it often depends on companies to share details about cyber-attacks.</p><p>The metadata is provided in a Word document in the <a href="https://github.com/opoyraz/Whodunit-Cyber-attack-attribution">GitHub repository </a>to help you understand the columns. The first 20 rows of the table are also provided.</p><h3>Exploratory Data Analysis</h3><p>Since several cybersecurity reports (e.g. Verizon DBIR, IBM Cost of Data Breach Report) analyze the cost, attack patterns, demographics of the victims, and so on, we will not dive deep into those details. We’ll touch base on the most relevant parts. More details can be found in the notebook provided in the <a href="https://github.com/opoyraz/Whodunit-Cyber-attack-attribution">GitHub repository</a>.</p><p>Let’s start with the descriptive statistic of the numeric variables and then continue reviewing the number of state-affiliated attacks vs. nonstate ones worldwide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*haTKTE_cFj6ZtvCPsgrx_w.png" /><figcaption>Descriptive Statistics of the numerical columns</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*TwpIr5rSGY-hcNzrnhCQnQ.png" /><figcaption>Number of Nonstate and State-affiliated cyber-attacks</figcaption></figure><p>The ratio of nonstate attacks to state-affiliated attacks is 11.48. The target class is severely imbalanced. To review the other figures please refer to the notebook.</p><h3>Data Wrangling</h3><p>Rare categorical values are transformed to ‘other’. First, we decided to group rare categorical values that consist of the lower 5% of the distribution of frequency. We need to find the threshold value for grouping rare categorical values into a single collection to do that. Therefore, the threshold for the ‘industry’, ‘compromise_variety_1’, ‘action’, ‘action_variety’, ‘action_vector’, ‘asset_group’, and ‘asset_variety_1&#39; columns are calculated. Here, there is the script for that.</p><pre>#finding the thresholds to group rare categorical values that consist of the lower 5%<br>def revise(df, cols):<br>    for col in cols:<br>        frequencies = df[col].value_counts(normalize=True, ascending=True)<br>        threshold = frequencies[(frequencies.cumsum() &gt; 0.05).idxmax()]<br>        df[col] = df[col].mask(df[col].map(df[col].value_counts(normalize=True)) &lt; threshold, &#39;other&#39;)<br>    return df</pre><p>Another mapping was done for the ‘employee_count’ and ‘confidence’ fields to reduce the dimensionality since we have so many categorical values. Also, after transforming the categorical values to numeric, the missing values are filled with the median for the number of employees and confidence.</p><p>The missing values for the “data_type” column are filled based on the industry.</p><p><strong>. If the industry is “healthcare”, then the data type is PHI,</strong></p><p><strong>· If the industry is “finance and insurance”, then the data type is PII</strong></p><p><strong>· If the industry is “government,” then the data type is ORG</strong></p><p><strong>· The rest of the industries are filled with PII</strong></p><p>The missing values in the ‘industry’, ‘confidentiality_state’, and ‘data_disclosure’ columns are filled with the most frequent value.</p><p>The missing values in the ‘action’,’action_variety’,’action_vector’, ‘asset_group’, and ‘asset_variety_1’ columns are filled with ‘unknown’ because the values in that columns probably have a relationship. The imputation requires domain knowledge and the interaction between values for these columns. Therefore, they are filled with the “unknown”.</p><p>The missing values in the ‘t_discovery_days’, ‘t_containment_days’, ‘t_exfiltration_days’, and ‘t_compromise_days’ columns are filled with -1 values.</p><p>The missing values in confidentiality_data_total are filled with the mean value.</p><h3>Model Development</h3><p>We use the IBM AutoAI tool to develop our machine-learning model. IBM Auto AI is an automated machine learning (AutoML) tool offered by IBM Watson Studio, which is a cloud-based data science and machine learning platform. Auto AI allows users to quickly and easily build and deploy machine learning models without requiring extensive knowledge of programming, data science, or machine learning. To learn more about IBM AutoAI please click <a href="https://www.ibm.com/cloud/watson-studio/autoai">here</a>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9xk2uu-VkBdPyvOze9P9XA.png" /><figcaption>Training and Holdout data</figcaption></figure><p>We split 90% of the data as training in 3 folds and 10% as test data. We also had the experiments to get optimized results for F1. You can choose which metric (Precision, Recall, F1) to be optimized so IBM AutoAI handles and yields the best results per selected metric.</p><p>The target variable is “state_nonstate” and 20 predictor variables are included in the model to predict if a cyber-attack is “<em>state-affiliated</em>” or “<em>nonstate</em>”. The columns not included in the model are highlighted in red in the metadata file.</p><h3>Experiment Overall Results</h3><p>There are 16 pipelines developed in the experiment. Here is the snapshot of the pipelines and the scores for F1, Precision, and Recall.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lo5EGwkxXFtTRnWUnOQkoA.png" /><figcaption>Experiment Results per F1, Precision, and Recall</figcaption></figure><p>We will continue with metrics on how to evaluate the classification models with imbalanced datasets in <strong>Part 2. </strong>In <strong>Part 3, </strong>we will analyze the models developed by IBM AutoAI.</p><h4>Part 2: <a href="https://medium.com/@omerpoyraz_16318/whodunit-cyber-attack-attribution-e2efadc2dace">How to evaluate the classifiers with an imbalanced dataset</a></h4><h4>Part 3: <a href="https://medium.com/@omerpoyraz_16318/whodunit-cyber-attack-attribution-part-3-8d7ac23e021d">Results</a></h4><h3>References</h3><p>1. <a href="https://www.ft.com/content/aa147054-ec14-4a75-a183-bee345319948">https://www.ft.com/content/aa147054-ec14-4a75-a183-bee345319948</a></p><p>2. <a href="https://www.reuters.com/legal/legalindustry/russia-ukraine-conflict-insurance-state-sponsored-cyberattacks-2022-03-25/">https://www.reuters.com/legal/legalindustry/russia-ukraine-conflict-insurance-state-sponsored-cyberattacks-2022-03-25/</a></p><p>3. <a href="https://thehill.com/policy/cybersecurity/3678662-federal-government-considers-sharing-costs-for-catastrophic-cyber-incidents%EF%BF%BC/">https://thehill.com/policy/cybersecurity/3678662-federal-government-considers-sharing-costs-for-catastrophic-cyber-incidents%EF%BF%BC/</a></p><p>4. <a href="https://hbr.org/2020/10/does-your-cyber-insurance-cover-a-state-sponsored-attack">https://hbr.org/2020/10/does-your-cyber-insurance-cover-a-state-sponsored-attack</a></p><p>5. <a href="https://carnegieendowment.org/2022/03/28/attribution-and-characterization-of-cyber-attacks-pub-86698">https://carnegieendowment.org/2022/03/28/attribution-and-characterization-of-cyber-attacks-pub-86698</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aca46fa5b7f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>