<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.4 20241031//EN"
        "https://jats.nlm.nih.gov/publishing/1.4/JATS-journalpublishing1-4.dtd">
<article  article-type="research-article"        dtd-version="1.4">
            <front>

                <journal-meta>
                                    <journal-id></journal-id>
            <journal-title-group>
                                                                                    <journal-title>Balkan Journal of Electrical and Computer Engineering</journal-title>
            </journal-title-group>
                            <issn pub-type="ppub">2147-284X</issn>
                                        <issn pub-type="epub">2147-284X</issn>
                                                                                            <publisher>
                    <publisher-name>MUSA YILMAZ</publisher-name>
                </publisher>
                    </journal-meta>
                <article-meta>
                                        <article-id pub-id-type="doi">10.17694/bajece.927417</article-id>
                                                                <article-categories>
                                            <subj-group  xml:lang="en">
                                                            <subject>Artificial Intelligence</subject>
                                                            <subject>Computer Software</subject>
                                                    </subj-group>
                                            <subj-group  xml:lang="tr">
                                                            <subject>Yapay Zeka</subject>
                                                            <subject>Bilgisayar Yazılımı</subject>
                                                    </subj-group>
                                    </article-categories>
                                                                                                                                                        <title-group>
                                                                                                                        <article-title>A Hybrid Machine Learning Model to Detect Reflected XSS Attack</article-title>
                                                                                                                                        </title-group>
            
                                                    <contrib-group content-type="authors">
                                                                        <contrib contrib-type="author">
                                                                    <contrib-id contrib-id-type="orcid">
                                        https://orcid.org/0000-0002-9455-1537</contrib-id>
                                                                <name>
                                    <surname>Buz</surname>
                                    <given-names>Beraat</given-names>
                                </name>
                                                                    <aff>ISTANBUL TECHNICAL UNIVERSITY</aff>
                                                            </contrib>
                                                    <contrib contrib-type="author">
                                                                    <contrib-id contrib-id-type="orcid">
                                        https://orcid.org/0000-0002-2282-5404</contrib-id>
                                                                <name>
                                    <surname>Gülçiçek</surname>
                                    <given-names>Berke</given-names>
                                </name>
                                                                    <aff>ISTANBUL TECHNICAL UNIVERSITY</aff>
                                                            </contrib>
                                                    <contrib contrib-type="author">
                                                                    <contrib-id contrib-id-type="orcid">
                                        https://orcid.org/0000-0003-0314-2621</contrib-id>
                                                                <name>
                                    <surname>Bahtiyar</surname>
                                    <given-names>Şerif</given-names>
                                </name>
                                                                    <aff>İSTANBUL TEKNİK ÜNİVERSİTESİ, BİLGİSAYAR VE BİLİŞİM FAKÜLTESİ</aff>
                                                            </contrib>
                                                                                </contrib-group>
                        
                                        <pub-date pub-type="pub" iso-8601-date="20210730">
                    <day>07</day>
                    <month>30</month>
                    <year>2021</year>
                </pub-date>
                                        <volume>9</volume>
                                        <issue>3</issue>
                                        <fpage>235</fpage>
                                        <lpage>241</lpage>
                        
                        <history>
                                    <date date-type="received" iso-8601-date="20210425">
                        <day>04</day>
                        <month>25</month>
                        <year>2021</year>
                    </date>
                                                    <date date-type="accepted" iso-8601-date="20210727">
                        <day>07</day>
                        <month>27</month>
                        <year>2021</year>
                    </date>
                            </history>
                                        <permissions>
                    <copyright-statement>Copyright © 2013, Balkan Journal of Electrical and Computer Engineering</copyright-statement>
                    <copyright-year>2013</copyright-year>
                    <copyright-holder>Balkan Journal of Electrical and Computer Engineering</copyright-holder>
                </permissions>
            
                                                                                                <abstract><p>Since web technologies are getting more advanced with longer codes, the number of vulnerabilities has increased considerably. Cross-site scripting (XSS) attacks are one of the most common attacks that use vulnerabilities in web applications. There are three types of cross-site scripting attacks namely, reflected, stored, and DOM-based attacks. Reflected XSS attacks are the most common type that is usually implemented by injecting a malicious code into the URL and then sending the URL to the targeted system by using phishing methods, which is a significant threat for recent web applications. Our motivation is the lack of a high performance detection method of reflected XSS attacks with high accuracy. In this paper, we propose a hybrid machine learning model to detect vulnerabilities related to reflected XSS attacks for a given URL of a website. Our model uses a scanner to discover vulnerabilities in a web site and convolutional neural networks to predict the most common vulnerabilities that may be used for reflected XSS attacks, which makes the proposed model hybrid. We analyzed the model experimentally. Analyses results show that the proposed model is able to detect vulnerable attack surfaces with 99 % accuracy.</p></abstract>
                                                                                    
            
                                                            <kwd-group>
                                                    <kwd>Reflected XSS</kwd>
                                                    <kwd>  Deep Learning</kwd>
                                                    <kwd>  Detection</kwd>
                                                    <kwd>  Vulnerability</kwd>
                                                    <kwd>  N-gram</kwd>
                                                    <kwd>  XSS Scanner</kwd>
                                            </kwd-group>
                                                        
                                                                                                                                                    </article-meta>
    </front>
    <back>
                            <ref-list>
                                    <ref id="ref1">
                        <label>1</label>
                        <mixed-citation publication-type="journal">[1] “Web Applications vulnerabilities and threats: statistics for 2019.” [Online]. Available: https://www.ptsecurity.com/ww en/analytics/web-vulnerabilities-2020/</mixed-citation>
                    </ref>
                                    <ref id="ref2">
                        <label>2</label>
                        <mixed-citation publication-type="journal">[2] S. Gupta and B. B. Gupta, “Cross-Site Scripting (XSS) attacks and defense mechanisms: classification and state-of-the-art,” International Journal of System Assurance Engineering and Management, vol. 8, no. S1, pp. 512–530, Jan. 2017. [Online]. Available: http://link.springer.com/10.1007/s13198-015-0376-0</mixed-citation>
                    </ref>
                                    <ref id="ref3">
                        <label>3</label>
                        <mixed-citation publication-type="journal">[3] “OWASP Top Ten Web Application Security Risks j OWASP.” [Online]. Available: https://owasp.org/www-project-top-ten/</mixed-citation>
                    </ref>
                                    <ref id="ref4">
                        <label>4</label>
                        <mixed-citation publication-type="journal">[4] V. Nithya, S. L. Pandian, and C. Malarvizhi, “A Survey on Detection and Prevention of Cross-Site Scripting Attack,” International Journal of Security and Its Applications, vol. 9, no. 3, pp. 139–152, Mar. 2015.</mixed-citation>
                    </ref>
                                    <ref id="ref5">
                        <label>5</label>
                        <mixed-citation publication-type="journal">[5] U. Sarmah, D. Bhattacharyya, and J. Kalita, “A survey of detection methods for XSS attacks,” Journal of Network and Computer Applications, vol. 118, pp. 113–143, Sep. 2018. [Online]. Available: https://linkinghub.elsevier.com/retrieve/pii/S1084804518302042</mixed-citation>
                    </ref>
                                    <ref id="ref6">
                        <label>6</label>
                        <mixed-citation publication-type="journal">[6] M. Liu, B. Zhang, W. Chen, and X. Zhang, “A Survey of Exploitation and Detection Methods of XSS Vulnerabilities,” IEEE
Access, vol. 7, pp. 182 004–182 016, 2019. [Online]. Available:https://ieeexplore.ieee.org/document/8935148/</mixed-citation>
                    </ref>
                                    <ref id="ref7">
                        <label>7</label>
                        <mixed-citation publication-type="journal">[7] G. E. Rodr´ıguez, J. G. Torres, P. Flores, and D. E. Benavides, “Crosssite scripting (XSS) attacks and mitigation: A survey,” Computer Networks, vol. 166, p. 106960, Jan. 2020. [Online]. Available:
https://linkinghub.elsevier.com/retrieve/pii/S1389128619311247</mixed-citation>
                    </ref>
                                    <ref id="ref8">
                        <label>8</label>
                        <mixed-citation publication-type="journal">[8] E. Gal´an, A. Alcaide, A. Orfila, and J. Blasco, “A multi-agent scanner to detect stored-xss vulnerabilities,” in 2010 International Conference for Internet Technology and Secured Transactions, 2010, pp. 1–6.</mixed-citation>
                    </ref>
                                    <ref id="ref9">
                        <label>9</label>
                        <mixed-citation publication-type="journal">[9] L. Li and L. Wei, “Automatic XSS Detection and Automatic Anti-Anti-Virus Payload Generation,” in 2019 International Conference on Cyber-Enabled Distributed Computing and Knowledge Discovery (CyberC). Guilin, China: IEEE, Oct. 2019, pp. 71–76. [Online]. Available: https://ieeexplore.ieee.org/document/8945988/</mixed-citation>
                    </ref>
                                    <ref id="ref10">
                        <label>10</label>
                        <mixed-citation publication-type="journal">[10] S. Syaifuddin, D. Risqiwati, and H. A. Sidharta, “Automation Snort Rule for XSS Detection with Honeypot,” in 2018 5th International Conference on Electrical Engineering, Computer Science and Informatics (EECSI). Malang, Indonesia: IEEE, Oct. 2018, pp. 584–588. [Online]. Available: https://ieeexplore.ieee.org/document/8752961/</mixed-citation>
                    </ref>
                                    <ref id="ref11">
                        <label>11</label>
                        <mixed-citation publication-type="journal">[11] X.-Y. Hou, X.-L. Zhao, M.-J. Wu, R. Ma, and Y.-P. Chen, “A Dynamic Detection Technique for XSS Vulnerabilities,” in 2018 4th Annual International Conference on Network and Information Systems for Computers (ICNISC). Wuhan, China: IEEE, Apr. 2018, pp. 34–43. [Online]. Available: https://ieeexplore.ieee.org/document/8842866/</mixed-citation>
                    </ref>
                                    <ref id="ref12">
                        <label>12</label>
                        <mixed-citation publication-type="journal">[12] G. Habibi and N. Surantha, “XSS Attack Detection With Machine Learning and n-Gram Methods,” in 2020 International Conference on Information Management and Technology (ICIMTech). Bandung, Indonesia: IEEE, Aug. 2020, pp. 516–520. [Online]. Available:https://ieeexplore.ieee.org/document/9210946/</mixed-citation>
                    </ref>
                                    <ref id="ref13">
                        <label>13</label>
                        <mixed-citation publication-type="journal">[13] G. Dong, Y. Zhang, X. Wang, P. Wang, and L. Liu, “Detecting cross site scripting vulnerabilities introduced by HTML5,” in 2014 11th International Joint Conference on Computer Science and Software Engineering (JCSSE). Chon Buri: IEEE, May 2014, pp. 319–323. [Online]. Available: https://ieeexplore.ieee.org/document/6841888/</mixed-citation>
                    </ref>
                                    <ref id="ref14">
                        <label>14</label>
                        <mixed-citation publication-type="journal">[14] L. Lei, M. Chen, C. He, and D. Li, “XSS Detection Technology Based on LSTM-Attention,” in 2020 5th International Conference on Control, Robotics and Cybernetics (CRC). Wuhan, China: IEEE, Oct. 2020, pp. 175–180. [Online]. Available: https://ieeexplore.ieee.org/document/9253484/</mixed-citation>
                    </ref>
                                    <ref id="ref15">
                        <label>15</label>
                        <mixed-citation publication-type="journal">[15] D. M. W. Powers, “What the F-measure doesn’t measure: Features, Flaws, Fallacies and Fixes,” arXiv:1503.06410 [cs, stat], Sep. 2019, arXiv: 1503.06410. [Online]. Available: http://arxiv.org/abs/1503.06410</mixed-citation>
                    </ref>
                            </ref-list>
                    </back>
    </article>
