Skip to main content

Evolving Rules for Detecting Cross-Site Scripting Attacks Using Genetic Programming

  • Conference paper
  • First Online:
Book cover Advances in Cyber Security (ACeS 2020)

Part of the book series: Communications in Computer and Information Science ((CCIS,volume 1347))

Included in the following conference series:

Abstract

Web services are now a critical element of many of our day-to-day activities. Their applications are one of the fastest-growing industries around. The security issues related to these services are a major concern to their providers and are directly relevant to the everyday lives of system users. Cross-Site Scripting (XSS) is a standout amongst common web application security attacks. Protection against XSS injection attacks needs more work. Machine learning has considerable potential to provide protection in this critical domain. In this article, we show how genetic programming can be used to evolve detection rules for XSS attacks. We conducted our experiments on a publicly available and up-to-date dataset. The experimental results showed that the proposed method is an effective countermeasure against XSS attacks. We then investigated the computational cost of the detection rules. The best-evolved rule has a processing time of 177.87 ms and consumes memory of 8,600 bytes.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Ahmed, M.A., Ali, F.: Multiple-path testing for cross site scripting using genetic algorithms. J. Syst. Arch. 64, 50–62 (2016)

    Article  Google Scholar 

  2. Alyasiri, H., Clark, J.A., Kudenko, D.: Evolutionary computation algorithms for detecting known and unknown attacks. In: Lanet, J.-L., Toma, C. (eds.) SECITC 2018. LNCS, vol. 11359, pp. 170–184. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-12942-2_14

    Chapter  Google Scholar 

  3. Aydogan, E., Yilmaz, S., Sen, S., Butun, I., Forsström, S., Gidlund, M.: A central intrusion detection system for RPL-based industrial Internet of Things. In: 2019 15th IEEE International Workshop on Factory Communication Systems (WFCS), pp. 1–5. IEEE (2019)

    Google Scholar 

  4. Chen, X.L., Li, M., Jiang, Yu., Sun, Y.: A comparison of machine learning algorithms for detecting XSS attacks. In: Sun, X., Pan, Z., Bertino, E. (eds.) ICAIS 2019. LNCS, vol. 11635, pp. 214–224. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-24268-8_20

    Chapter  Google Scholar 

  5. Chicco, D., Jurman, G.: The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genomics 21(1), 6 (2020)

    Article  Google Scholar 

  6. Ellis, J.: Java agent for memory measurements. https://github.com/jbellis/jamm. Accessed 02 Oct 2018

  7. Fang, Y., Li, Y., Liu, L., Huang, C.: DeepXSS: cross site scripting detection based on deep learning. In: Proceedings of the 2018 International Conference on Computing and Artificial Intelligence, pp. 47–51 (2018)

    Google Scholar 

  8. Hydara, I., Sultan, A.B.M., Zulzalil, H., Admodisastro, N.: Current state of research on cross-site scripting (XSS)-a systematic literature review. Inf. Softw. Technol. 58, 170–186 (2015)

    Article  Google Scholar 

  9. Internetworldstats.Com: Internet growth statistics 1995 to 2019. https://www.internetworldstats.com/emarketing.htm. Accessed 19 Aug 2020

  10. Kearney, M.W., Hvitfeldt, E.: textfeatures: Extracts Features from Text (2019). https://CRAN.R-project.org/package=textfeatures, r package version 0.3.3

  11. Koza, J.R., Koza, J.R.: Genetic Programming: On the Programming of Computers by Means of Natural Selection, vol. 1. MIT press (1992)

    Google Scholar 

  12. Likarish, P., Jung, E., Jo, I.: Obfuscated malicious javascript detection using classification techniques. In: 2009 4th International Conference on Malicious and Unwanted Software (MALWARE), pp. 47–54. IEEE (2009)

    Google Scholar 

  13. Liu, M., Zhang, B., Chen, W., Zhang, X.: A survey of exploitation and detection methods of XSS vulnerabilities. IEEE Access 7, 182004–182016 (2019)

    Article  Google Scholar 

  14. Luke, S.: ECJ evolutionary computation library (1998). https://cs.gmu.edu/~eclab/projects/ecj/

  15. Marashdih, A.W., Zaaba, Z.F., Omer, H.K.: Web security: detection of cross site scripting in PHP web application using genetic algorithm. Int. J. Adv. Comput. Sci. Appl. (IJACSA) 8(5) (2017)

    Google Scholar 

  16. Montana, D.J.: Strongly typed genetic programming. Evol. Comput. 3(2), 199–230 (1995)

    Article  Google Scholar 

  17. NTT: 2020 global threat intelligence report. https://hello.global.ntt/en-us/insights/2020-global-threat-intelligence-report. Accessed 19 Aug 2020

  18. Nunan, A.E., Souto, E., Dos Santos, E.M., Feitosa, E.: Automatic classification of cross-site scripting in web pages using document-based and url-based features. In: 2012 IEEE Symposium on Computers and Communications (ISCC), pp. 000702–000707. IEEE (2012)

    Google Scholar 

  19. OWASP: Owasp top ten. https://owasp.org/www-project-top-ten/. Accessed 19 Aug 2020

  20. Pham, T.A., Nguyen, Q.U., Nguyen, X.H.: Phishing attacks detection using genetic programming. In: Huynh, V.N., Denoeux, T., Tran, D.H., Le, A.C., Pham, S.B. (eds.) Knowledge and Systems Engineering. AISC, vol. 245, pp. 185–195. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-02821-7_18

    Chapter  Google Scholar 

  21. Poli, R., Langdon, W.B., McPhee, N.F., Koza, J.R.: A field guide to genetic programming. Lulu.com (2008)

    Google Scholar 

  22. Rathore, S., Sharma, P.K., Park, J.H.: XSSClassifier: an efficient XSS attack detection approach based on machine learning classifier on SNSS. J. Inf. Process. Syst. 13(4) (2017)

    Google Scholar 

  23. Sen, S.: A survey of intrusion detection systems using evolutionary computation. In: Bio-Inspired Computation in Telecommunications, pp. 73–94. Elsevier (2015)

    Google Scholar 

  24. Sen, S., Clark, J.A.: Evolutionary computation techniques for intrusion detection in mobile ad hoc networks. Comput. Netw. 55(15), 3441–3457 (2011)

    Article  Google Scholar 

  25. Sommer, R., Paxson, V.: Outside the closed world: on using machine learning for network intrusion detection. In: 2010 IEEE Symposium on Security and Privacy, pp. 305–316. IEEE (2010)

    Google Scholar 

  26. Wang, R., Jia, X., Li, Q., Zhang, S.: Machine learning based cross-site scripting detection in online social network. In: 2014 IEEE International Conference on High Performance Computing and Communications, 2014 IEEE 6th International Symposium on Cyberspace Safety and Security, 2014 IEEE 11th International Conference on Embedded Software and System (HPCC, CSS, ICESS), pp. 823–826. IEEE (2014)

    Google Scholar 

  27. Wang, Y., Cai, W.D., Wei, P.C.: A deep learning approach for detecting malicious javascript code. Secur. Commun. Netw. 9(11), 1520–1534 (2016)

    Article  Google Scholar 

  28. Wu, S.X., Banzhaf, W.: The use of computational intelligence in intrusion detection systems: a review. Appl. Soft Comput. 10(1), 1–35 (2010)

    Article  Google Scholar 

  29. Zhang, B.: Detecting XSS attacks by combining CNN with LSTM (2019). http://dx.doi.org/10.21227/css6-ds36

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Hasanen Alyasiri .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Singapore Pte Ltd.

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Alyasiri, H. (2021). Evolving Rules for Detecting Cross-Site Scripting Attacks Using Genetic Programming. In: Anbar, M., Abdullah, N., Manickam, S. (eds) Advances in Cyber Security. ACeS 2020. Communications in Computer and Information Science, vol 1347. Springer, Singapore. https://doi.org/10.1007/978-981-33-6835-4_42

Download citation

  • DOI: https://doi.org/10.1007/978-981-33-6835-4_42

  • Published:

  • Publisher Name: Springer, Singapore

  • Print ISBN: 978-981-33-6834-7

  • Online ISBN: 978-981-33-6835-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics