API Security in Large Enterprises: Leveraging Machine Learning for Anomaly Detection

Gaspard Baye, Fatima Hussain, Alma Oracevic, Rasheed Hussain, S. M. Ahsan Kazmi

Research output: Chapter in Book/Report/Conference proceedingConference Contribution (Conference Proceeding)

15 Citations (Scopus)

Abstract

Large enterprises offer thousands of micro-services applications to support their daily business activities by using Application Programming Interfaces (APIs). These applications generate huge amounts of traffic via millions of API calls every day, which is difficult to analyze for detecting any potential abnormal behaviour and application outage. This phenomenon makes Machine Learning (ML) a natural choice to leverage and analyze the API traffic and obtain intelligent predictions. This paper proposes an ML-based technique to detect and classify API traffic based on specific features like bandwidth and number of requests per token. We employ a Support Vector Machine (SVM) as a binary classifier to classify the abnormal API traffic using its linear kernel. Due to the scarcity of the API dataset, we created a synthetic dataset inspired by the real-world API dataset. Then we used the Gaussian distribution outlier detection technique to create a training labeled dataset simulating real-world API logs data which we used to train the SVM classifier. Furthermore, to find a trade-off between accuracy and false positives, we aim at finding the optimal value of the error term (C) of the classifier. The proposed anomaly detection method can be used in a plug and play manner, and fits into the existing micro-service architecture with little adjustments in order to provide accurate results in a fast and reliable way. Our results demonstrate that the proposed method achieves an F1-score of 0.964 in detecting anomalies in API traffic with a 7.3% of false positives rate.

Original languageEnglish
Title of host publication2021 International Symposium on Networks, Computers and Communications, ISNCC 2021
PublisherInstitute of Electrical and Electronics Engineers (IEEE)
ISBN (Electronic)978-1-6654-0304-7
ISBN (Print)978-1-6654-4829-1
DOIs
Publication statusPublished - 2021
Event2021 International Symposium on Networks, Computers and Communications, ISNCC 2021 - Dubai, United Arab Emirates
Duration: 31 Oct 20212 Nov 2021

Publication series

Name2021 International Symposium on Networks, Computers and Communications, ISNCC 2021

Conference

Conference2021 International Symposium on Networks, Computers and Communications, ISNCC 2021
Country/TerritoryUnited Arab Emirates
CityDubai
Period31/10/212/11/21

Bibliographical note

Publisher Copyright:
© 2021 IEEE.

Keywords

  • Anomalies
  • Application Programming Interface (API)
  • Machine Learning
  • Micro-service
  • Support Vector Machine (SVM)

Fingerprint

Dive into the research topics of 'API Security in Large Enterprises: Leveraging Machine Learning for Anomaly Detection'. Together they form a unique fingerprint.

Cite this