How Confusion Matrix can be used to avoid Cyber attacks

Ritesh Choudhary
4 min readAug 11, 2021

About 52 per cent of Indian organizations said they experienced a cybersecurity attack in the last 12 months, according to a survey released on Tuesday. Of these successful breaches, 71 per cent of organizations admitted it was a serious or very serious attack, and 65 per cent said it took longer than a week to remediate, showed the survey by global cybersecurity firm Sophos.

Cybercriminals use a variety of methods to launch a cyberattack including malware, phishing, ransomware, and man-in-the-middle attacks. Organizations are exposed to cyberattacks through inherent risks and residual risks.

Cyber attacks are performed for various reason:

  • Stealing of personal data
  • Identity stolen
  • For stealing organizational data
  • Steal bank card details.
  • Hack emails for gaining information.

Examples of cyberattacks:-

  • Brute force attacks: A popular cracking method that involves guessing usernames and passwords to gain unauthorized access to a system or sensitive data.
  • Cross-site scripting (XSS): A type of security vulnerability typically found in web applications. XSS enables attackers to inject client-side scripts into web pages viewed by other users and may be used to bypass access control, such as the same-origin policy.
  • Denial-of-service attacks (DoS): Occurs when legitimate users are unable to access information systems, devices, or other network resources due to the actions of a malicious cyber threat actor

What is Confusion Matrix?

A confusion matrix, in predictive analytics, is a two-by-two table that tells us the rate of false positives, false negatives, true positives and true negatives for a test or predictor. We can make a confusion matrix if we know both the predicted values and the true values for a sample set.

In machine learning and statistical classification, a confusion matrix is a table in which predictions are represented in columns and actual status is represented by rows. Sometimes this is reversed, with actual instances in rows and predictions in columns. The table is an extension of the confusion matrix in predictive analytics, and makes it easy to see whether mislabeling has occurred and whether the predictions are more or less correct.

Confusion Matrix
  • The accuracy of the prediction or test is defined as (a + d)/(a + c + d + e).
  • The proportion of the instances we correctly labeled as positive (per total positive prediction) is given by d/(b + d) and is called the precision.
  • The true positive rate is given by d/(c + d), and is also called the recall. It tells us what proportion of positive cases were correctly identified. It shows the amount of attack detected when it is actually attack.
  • The false positive rate, or proportion of negative cases (incorrectly) identified as positive, is given by b/(a + b). It shows the amount of attack detected when it is actually normal (False alarm).
  • The true negative rate is a/(a + b), and represents the proportion of negative cases that were correctly identified. It shows the amount of normal detected when it is actually normal.
  • The false negative rate is c/(c + d), and tells us what proportion of positive cases were incorrectly labeled as negative. It shows the amount of normal detected when it is actually attack.

Confusion matrix contains information actual and predicted classifications done by a classifier. The performance of cyber attack detection system is commonly evaluated using the data in a matrix.

Conclusion

While building an effective cyber attack detection and monitoring system it can have false positives i.e it will not be a major problem if it generates False alarms about the attacks. But the False Negative field should be near to zero because it would be vulnerable if system doesn’t generate alarms when there is actually an attack

The best ways to protect your computer and your personal data is to :
1] Keep software and operating system updated
2] Use anti-virus software and keep it updated
3] Use strong passwords
4] Never open attachments in spam emails
5] Do not click on links in spam emails or untrusted websites
6] Do not give out personal information unless secure
7] Contact companies directly about suspicious requests

Thank You! 😃

--

--