Taint Analysis Untuk Deteksi Celah Keamanan Cross Site Scripting Pada Kode PHP

Rohman, Abdur (2025) Taint Analysis Untuk Deteksi Celah Keamanan Cross Site Scripting Pada Kode PHP. Other thesis, Institut Teknologi Sepuluh Nopember.

[thumbnail of 05111840000100-Undergraduate_Thesis.pdf] Text
05111840000100-Undergraduate_Thesis.pdf - Accepted Version
Restricted to Repository staff only until 1 April 2027.

Download (2MB) | Request a copy

Abstract

Peningkatan penggunaan aplikasi berbasis web PHP pada berbagai aspek kehidupan membuat keamanan aplikasi menjadi hal yang harus lebih diperhatikan. Salah satu celah keamanan yang dapat ditemukan pada aplikasi web berbasis PHP adalah celah keamanan cross-site scripting. Cross-site scripting (XSS) merupakan serangan injeksi yang memanfaatkan masukan pengguna pada aplikasi untuk memasukkan skrip berbahaya yang akan dieksekusi pada saat korban membuka aplikasi web. Celah keamanan XSS bisa menyebabkan berbagai masalah mulai dari gangguan pada tampilan pada aplikasi hingga tercurinya data pengguna. Untuk itu perlu dikembangkan alat untuk mendeteksi adanya celah keamanan XSS pada aplikasi web. Alat yang dikembangkan menggunakan metode static taint analysis melakukan penelusuran terhadap penggunaan masukan pengguna yang tidak dipercaya tanpa menjalankan kode. Alat bekerja dengan mengubah kode menjadi abstract syntax tree. Kemudian abstract syntaxt tree diubah menjadi bentuk static single assignment (SSA). Selama pembentukan SSA dilakukan pencatatan terhadap setiap instruksi dan variabel yang digunakan. Kemudian untuk setiap variabel yang mengandung masukan pengguna di lakukan penelusuran alur data untuk melakukan pengecekan dengan aturan deteksi XSS yang telah didefinisikan. Alat yang dikembangkan kemudian memberikan laporan hasil deteksi celah keamanan. Alat yang dikembangkan diuji untuk mendeteksi celah keamanan pada dataset berlabel dari SARD. Hasil deteksi dari alat yang dikembangkan kemudian dibandingkan dengan hasil deteksi dari Semgrep menggunakan aturan deteksi XSS yang disediakan pada edisi komunitas. Dari hasil pengujian, alat yang dikembangkan menunjukkan performa yang relatif rendah, dengan akurasi sebesar 78,29%, presisi 25,99%, recall 21,20% dan f1-score 23,35%. Di sisi lain, Semgrep memiliki akurasi dan presisi yang lebih tinggi, namun kalah dalam nilai recall dan f1-score, dengan hasil akurasi sebesar 83,31%, presisi 30,37%, recall 5,44%, dan f1-score 9,22. Dari segi efisiensi durasi yang diperlukan untuk melakukan deteksi, alat yang dikembangkan mampu melakukan pemindaian pada 154.980 berkas dalam waktu 235,42 detik. Sementara pada Semgrep dengan jumlah berkas yang sama membutuhkan waktu 2666 detik.
================================================================================================================================
The increasing use of PHP web-based applications in various aspects of life makes application security a matter that must be given more attention. One of the security vulnerabilities that can be found in PHP-based web applications is cross-site scripting. Cross-site scripting (XSS) is an injection attack that utilizes user input on an application to insert a malicious script that will be executed when the victim opens the web application. XSS security vulnerabilities can cause a variety of problems ranging from interference with the appearance of the application to theft of user data. For this reason, it is necessary to develop a tool to detect the presence of XSS security holes in web applications. The tool developed using the static taint analysis method traces the use of untrusted user input without running the code. The tool works by converting the code into an abstract syntax tree. Then the abstract syntax tree is converted into a static single assignment (SSA). During SSA construction, every instruction and variable used is recorded. Then for each variable that contains user input, a data flow trace is performed to check with the XSS detection rules that have been defined. The developed tool then provides a report of the security vulnerability detection results. The developed tool is tested to detect security vulnerabilities in labeled datasets from SARD. The detection results from the developed tool are then compared with the detection results from Semgrep using the XSS detection rules provided in the community edition. From the test results, the developed tool showed relatively low performance, with an accuracy of 78.29%, precision of 25.99%, recall of 21.20% and f1-score of 23.35%. On the other hand, Semgrep has higher accuracy and precision, but loses in recall and f1-score values, with an accuracy of 83.31%, precision of 30.37%, recall of 5.44%, and f1-score of 9.22. In terms of the efficiency of the duration required for detection, the developed tool was able to scan 154,980 files in 235.42 seconds. While Semgrep with the same number of files takes 2666 seconds.

Item Type: Thesis (Other)
Uncontrolled Keywords: celah keamanan, cross-site scripting, static analysis, taint analysis, cross-site scripting, security vulnerability, static analysis, taint analysis
Subjects: T Technology > T Technology (General) > T174.5 Technology--Risk assessment.
T Technology > T Technology (General) > T58.5 Information technology. IT--Auditing
Divisions: Faculty of Information Technology > Informatics Engineering > 55201-(S1) Undergraduate Thesis
Depositing User: Abdur Rohman
Date Deposited: 01 Feb 2025 08:50
Last Modified: 01 Feb 2025 08:50
URI: http://repository.its.ac.id/id/eprint/117378

Actions (login required)

View Item View Item