Mikroservis tabanlı ağ uygulamalarında zararlı davranışların saptanması
Detecting malicious behavior in microservices-based web applications
- Tez No: 548301
- Danışmanlar: DR. ÖĞR. ÜYESİ MEHMET TAHİR SANDIKKAYA
- Tez Türü: Yüksek Lisans
- Konular: Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol, Computer Engineering and Computer Science and Control
- Anahtar Kelimeler: Belirtilmemiş.
- Yıl: 2019
- Dil: Türkçe
- Üniversite: İstanbul Teknik Üniversitesi
- Enstitü: Fen Bilimleri Enstitüsü
- Ana Bilim Dalı: Bilgisayar Mühendisliği Ana Bilim Dalı
- Bilim Dalı: Bilgisayar Mühendisliği Bilim Dalı
- Sayfa Sayısı: 66
Özet
Tez çalışmasına, İnternet üzerinden çalışan sistemlerin zararlı kullanıcılar tarafından saldırı altında tutulmalarını öngörerek, bu sistemlerin saldırılarını erkenden tespit edilebilmesini sağlayacak sistemlerin belirlenmesi için başlanmıştır. Bu doğrultuda, sistem üzerindeki işlemler mikro servis tabanlı yazılımlar kullanılan İnternet tabanlı sistemler üzerinde çalışılmıştır. Haberleşme ağlarında karşılaşılan zararlı davranışlar modern toplum için büyük bir tehdit haline geldi. Zararlı davranışların sadece artan karmaşıklığı değil, aynı zamanda üstel artış gösteren yeni saldırı metotları da İnternet hizmetlerinin güvenilirliğini sarsmaktadır. Kötücül kullanıcı tarafından yapılan kasıtlı saldırılar ile ağ uygulamalarında servis yavaşlığı ve ya servisin tamamı ile durması sonucu saldırıya uğrayan ağ uygulaması, diğer hizmetlerde de kısıtlamalara sebep olacaktır. Ağ uygulamalarında illa kötücül kullanıcı da bu sıkıntılara sebep olmamaktadır. İlgili ağ uygulamasını kullanmayı bilmeyen olağan bir kullanıcı da yaptığı hatalı işlemlerden dolayı hizmette yavaşlık veya hizmetin durmasına sebep olabilmektedir. Kötücül davranışlar, sadece hizmet veya hizmetlerin yavaşlaması veya durması dışında, hizmetlerin kullandığı veritabanları veya sistemlere, kötücül kullanıcıların izinsiz erişimine de sebep olabilmektedir. Bunun sonucunda da, kendi yetkisi dışında diğer kullanıcıların özel bilgilerine erişebilmektedirler. Ayrıca bilgilere ulaşım dışında, kullanıcı bilgilerini de değiştirerek hem kullanıcıları zor durumda bırakırlar hem de hizmetlerin güvenirliliğini sorgulatırlar. İnternetteki uygulama güvenliği ile ilgilenen, OWASP (Açık İnternet Uygulamalarının Güvenliği Projesi), gerekli verileri toplayan ve İnternet güvenliği hakkında uygulamalar ve makaleler yazdıran özgür bir kuruluştur. Her iki yılda bir, geri bildirimler doğrultusunda en çok kullanılan 10 zafiyet listesini yayınlamaktadır. Çalışmada baz alınan açıklar, 2017 yılında OWASP kuruluşu tarafından listelenen aşağıdaki zafiyetleri ele almaktadır: Kod İliştirme, Asıllamanın Aşılması, Hassas Verilerin Açığa Çıkması, XML Kodundan Dışarıya Atıflar, Erişim Denetiminin Aşılması, Yanlış Yapılandırılmış Güvenlik Ayarları, Yöreler Arası Betik Çalıştırma, Kozalanmış Zararlı Bileşen Kullanma, Bilinen Açıkları Olan Bileşenlerin Kullanılması ve Yetersiz Günlük Tutma ve İzleme. Bu güvenlik açıkları genel olarak sistemin güncel tutulmaması ve gelen verilerin ön kontrol yapılmadan işleme maruz bırakılmasından kaynaklıdır. Çalışmada güvenlik açıklarını görmek için örnek bir ağ uygulaması yapılmıştır. Bu ağ uygulamasının mimarisi için monolitik mimari, temel SOA mimarisi ve mikro servis mimarisi üzerinde incelemeler yapılmıştır. Monolitik mimari ile verileri saklayan katman ile işi yapan katman gibi birden çok katmanlar aynı yapı veya yalıtılmış olan taşıyıcı ortamların içinde yer alarak tek bir sistem üzerinde bulunmaktadır. Temel SOA yani Temel Servis Odaklı Mimari'de de platform veya ortak veri katmanı ile kullanılan veritabanı işlemlerinden dolayı sistem servis odaklı olmasına rağmen hizmetler birbirine bağımlı çalışmaktadır. Mikroservis mimari uygulamaları incelendiğinde, sadece bir işi yapan, bir fonksiyonaliteyi gerçekleştiren çok küçük kod parçacıklarından oluştuğu görülmektedir. Yaptığı iş, diğer hizmetlere bağımlılıkları, hizmetin boyutu, geliştirme süreçlerindeki karmaşıklığın azlığı olabildiğince küçük olan atomik hizmetlerdir. Bu atomik hizmetlerin, diğer hizmetler ile herhangi bir bağlılığı bulunmamaktadır. Örnek olarak diğer mimarilerde olan dile bağımlılık kısıtlaması, mikroservis mimarisinde geçerli değildir. Bu hizmetler, farklı platformlarda farklı yazılım dilleri ile yazılarak birbirleri ile haberleşebilirler. Aynı zamanda mikroservisler durumdan bağımsızdır. Herhangi bir nesnenin durumunu tutmaz. Ayrıca sistemde yapılabilecek değişikliklerde, tüm sistemi test etmek yerine sadece değişen atomik mikroservislerin etkilendiği parçalar test edileceğinden, sürüm yönetimi ve hızlı geçiş sağlanacaktır. Teknolojide olan gelişmeler de, atomik yapıların birbirinden bağımsızlığı ve farklı platformları destekleme özelliğinden dolayı kolayca takip edilir. Tüm sistem geçmese de atomik servisler sadece kendini etkileyen yapı test edilerek güncelleme ve teknoloji değişimi kolaylıkla sağlanır. Mikrosevis mimarisi, yapı gereği atomik parçalar olduğundan monolitik ve temel SOA bazlı mimariye göre daha az boyutlu işleri yapması ve birbirinden yalıtılmış ortamlarda olabilmesinden dolayı daha korunabilir olduğu düşünüldü. Mikroservis mimarisi yapısını bu çalışmada kullanabilmek için Java yazılım dili kullanılarak Spring platformunda ilgili hizmetler gerçekleştirildi. Mikroservis mimarilerinde, her bir hizmet farklı yazılım dillerinde geliştirilebilir. Kötücül davranışların tespit edilmesi çalışmasında, mikroservisler arası haberleşme, Zuul Api ağ geçiti ve Eureka Sunucu ile gerçekleştirilmiştir. Sistemde kullanıcıların öncelikli olarak ağ geçidinden geçmesi sağlanmıştır. Ağ geçidinde yer alan özelliklerden olan ön filtre sayesinde öncelikli olarak sistemde kontrol yapılarak gerekirse mikroservislere işlemin gitmemesi sağlanır. Ağ geçidinden geçebilen hareketler, Eureka sunucu uygulamasından ilgili hizmete gönderilir. Bu sayede ilgili mikroservisler, farklı veya yalıtılmış taşıyıcı ortamlarda çalışabilir. Bu çalışmada, mikroservis tabanlı bir ağ uygulamasındaki zararlı davranışlar, CRUD (ekleme, okuma, güncelleme, silme) davranış kalıpları gözlenerek saptanmaktadır. Bu yayının amacı, zararlı kullanıcıları (hatta güvenilir bir kullanıcının kötü niyetli ilk teşebbüsünü), mikroservislerin kullanım karakteristiklerine göre davranış gerçekleşir gerçekleşmez belirlemektir. Önerilen düzenek, yukarıda bahsedilen ve madde olarak verilen OWASP Vakfı'nın en tehlikeli 10 ağ uygulama riskleri listesini göz önüne almaktadır. Bu bağlamda, sözü edilen saldırıları içeren bir veri kümesi, iyi huylu yaygın davranışlar da kapsanarak oluşturulup mikroservis tabanlı bir örnek ağ uygulamasında davranışların karakteristiği ölçülmüştür. İlgili veri kümesi daha sonra makine öğrenmesi algoritmaları olan RandomForest, NaiveBayes, J48, AdaBoost, ZeroR, Bagging, Lojistik Regresyon, K-Star algoritmaları ile olağan ve kötücül davranışları sınıflandırmak için kullanılmıştır. Sonuçta, kötücül davranışların sınıflandırılmasından sonra, ilgili kullanıcının kaynaklara erişimi önlenir. Deneyler sırasında karşılaşılan en iyi kötücül davranış algılama doğruluğu % 99,36 olarak gerçekleşmiştir.
Özet (Çeviri)
The systems running on the internet can be kept under attacks by malicious users. This thesis study has been started to determine this kind of attacks at early stage. In this respect, the operations on the system have been runned on web based systems that are using microservice architecture. Malicious acts have become a major threat to nowadays modern society. Not only due to the increased complexity of the malicious acts themselves, but also due to the exponential increase of new methods to compromise Internet-based services. Malicious behavior can cause unauthorized access to the databases or systems that the services use by malicious users, as well as slowing down or stopping the service or services. As a result, they can access the private information of other users outside their jurisdiction. In addition to accessing information, it modifies user information that puts users in a difficult situation and questions the reliability of services. In this study, malicious behavior in a micro-serviced web application is detected by observing the patterns of CRUD (create, read, update, delete) behavior. The aim of this paper is to detect malicious users (or even malicious initial trial of a trustworthy user) as soon as the behavior happened according to the characteristics of the sequential use of micro-services. The proposed mechanism renders OWASP Foundation's Top 10 critical web based application's security risks as possible attack vectors. Thus, a data set including such attacks together with mostly benign behavior is generated and measured on the microservice based web application. The OWASP (OpenWeb Applications Security Project) is a free organization that deals with application security on the Internet, collects necessary data and prepares articles about Internet security. Every two years, it publishes the list of the 10 most used vulnerabilities based on feedback. The vulnerabilities based on the study address the following vulnerabilities listed by the OWASP organization in 2017: Code Injection, Broken Authentication, Sensitive Data Exposure, XML External Entities (XXE), Broken Access Control, Security Misconfiguration, Cross-Site Scripting (XSS), Insecure Deserialization, Using Components with Known Vulnerabilities and Insufficient Logging and Monitoring. These vulnerabilities are generally due to the fact that the system is not kept up-to-date and that incoming data is processed without prior controlling. In the study, a sample network application was made to see the vulnerabilities. Monolithic architecture, basic SOA architecture and microservice architecture are examined for the architecture of this web application. In monolithic architecture, multiple layers, such as the layer that stores data and the work layer, are located in the same structure or in a single system in an insulated deployment container. Although the system is service-oriented in the underlying SOA (Basic Service Oriented Architecture) because of database operations used with the platform or common data layer, the services are interconnected. When the microservice architecture applications are examined, it is seen that it consists of very small code snippets that do only one job and perform a functionality. The microservices perform atomic tasks that are as small as possible in dependency on other services, the size of the task, complexity of development processes. One of the disadvantage of the microservice architecture is rewriting some business codes more than once for each microservice. Thus, microservices are only access the necessary part of the database structure and business layer for fast response time and security to access data. Although the microservices have some disadvantages, many communication and media companies such as Netflix and Amazon use microservice architecture to serve and support millions of their users at the same time. In other words, these services are small, highly decoupled and focus on doing a small task at a time. The advantages of using microservices are the single responsibility principle, flexible (failure in one service does not impact other services like monolithic architecture), high scalability (demanding services can be deployed in multiple servers to enhance performance and keep away from other services so that they don't impact other services), easy to enhance (less dependency and easy to change and test), low impact on other services (being an independent service, this has less chance to impact other services), easy to understand since they represent the small piece of functionality, ease of deployment, freedom to choose technology (allows to choose technology that is best suited for a particular functionality). These atomic services are not dependent with all other services. For example, the restriction of programming language dependency of other architectures does not exist in microservice architecture. These services can communicate with each other even if they are coded in different software languages on different platforms. Microservices are also stateless. They does not hold the state of any object. Microservice architecture is thought to be more easy to protect because it has seperated atomic parts due to its structure and because it can do more fragmentary works than monolithic and basic SOA based architecture and since the services can hosted in different isolated environments or any virtual environment that can be extensible. In order to implement the microservice architecture structure in this study, Java software language used on Spring framework. In the study, communication between microservices was realized with Zuul Api gateway and Eureka Server. In the system, the users are provided to pass through the gateway firstly, and thanks to this pre-filter of the gateway, the user authentication checked firstly. If the authentication fails, the request will be rejected in the gateway and the request will not go to the microservice. Transactions that can pass through the gateway are sent from the Eureka server application to the relevant microservice. In this way, the microservices can operate in different or isolated deployment environments such as Docker. Each container has just one microservice that handled on one atomic service. Using the project, two data sets are created which have 1 500 000 data for each data set. The features of the datas are: user name, microservice name, the operation type, the processor usage, the process time of microservice, the sequence of the operation list. The features are prepared and labeled as benign or malicious using JMeter program or directly using ˙Internet application. Classification algorithms learn from labeled data using supervised learning method. After understanding the data, the algorithm determines which label should be given to new data based on pattern and associating the patterns to the unlabeled new data. Different algorithms were applied to the data set processed by Weka, and each experiment data set 10-fold cross validation. The results obtained for each algorithm whose parameters are improved by looking at the error matrix, accuracy, precision, sensitivity and F-criterion values were calculated. The data set is then used to classify benign and malicious behavior using Random-Forest, NaiveBayes, J48, AdaBoost, ZeroR, Bagging and Logistic Regression, K-Star algorithms of machine learning. As a result, after the classification of malicious behavior, the respective user's further access to microservices is precluded. The best malicious behavior detection accuracy encountered during experiments is an auspicious 99.36%.
Benzer Tezler
- Kod kalıp analizi yöntemleri ile mikroservis mimarilerinde iyileştirme önerileri
Improvement suggestions for software based on microservice architecture with code analysis techniques
TUĞRUL AŞIK
Yüksek Lisans
Türkçe
2017
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve KontrolYıldız Teknik ÜniversitesiBilgisayar Mühendisliği Ana Bilim Dalı
YRD. DOÇ. DR. YUNUS EMRE SELÇUK
- Çeşitli mikroşerit antenlerin karakteristik parametrelerinin farklı algoritmalarla eğitilen yapay sinir ağları ile hesaplanması
Computation of characteristics parameters of various type microstrip antennas with the use of artificial neural networks trained by different learning algorithms
SEYFETTİN SİNAN GÜLTEKİN
Doktora
Türkçe
2002
Elektrik ve Elektronik MühendisliğiSelçuk ÜniversitesiElektrik-Elektronik Mühendisliği Ana Bilim Dalı
PROF. DR. KERİM GÜNEY
- Yönlü quasi-yagi mikroşerit antenler ile bluetooth RF işaretlerinin appr algoritması kullanarak güç ve doa analizi
Power and doa analysis of bluetooth RF signals with directive quasi-yagi microstrip antennas using appr algorithm
GÖKHAN SERT
Yüksek Lisans
Türkçe
2024
Elektrik ve Elektronik Mühendisliğiİstanbul Kültür ÜniversitesiElektrik-Elektronik Mühendisliği Ana Bilim Dalı
DR. ÖĞR. ÜYESİ ERTUĞRUL SAATÇI
- Zıgbee - IEEE 802.15.4 temelli kablosuz sensör ağı kontrol sistemi ve sistem performansı için bir mikroşerit anten tasarımı, simülasyonu ve gerçekleştirilmesi
Zigbee - IEEE 802.15.4 based wireless sensor network control system and system application for a microstrip antenna design, simulation and implementation
EMRAH BAKIRCI
Yüksek Lisans
Türkçe
2019
Elektrik ve Elektronik MühendisliğiKonya Teknik ÜniversitesiElektrik-Elektronik Mühendisliği Ana Bilim Dalı
DOÇ. DR. SEYFETTİN SİNAN GÜLTEKİN
- Design and analysis of microstrip antenna with frequency selective surface superstrate
Başlık çevirisi yok
MAS MOHAMMED SALIH KHUDHAIR AL-QUTBI
Yüksek Lisans
İngilizce
2023
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve KontrolAltınbaş ÜniversitesiElektrik ve Bilgisayar Mühendisliği Ana Bilim Dalı
DR. ÖĞR. ÜYESİ ABDULLAHI ABDU IBRAHIM