Deception Strategies for Web Application Security: Application-Layer Approaches and a Testing Platform
Total Page:16
File Type:pdf, Size:1020Kb
Deception strategies for web application security: application-layer approaches and a testing platform Mikel Izagirre Information Security, master's level (120 credits) 2017 Luleå University of Technology Department of Computer Science, Electrical and Space Engineering Master Thesis Project Deception strategies for web application security: application-layer approaches and a testing platform Author: Mikel Izagirre E-mail: [email protected] Supervisor: Dr. Ali Ismail Awad June 2017 Master of Science in Information Security Luleå University of Technology Department of Computer Science, Electrical and Space Engineering Abstract The popularity of the internet has made the use of web applications ubiquitous and essential to the daily lives of people, businesses and governments. Web servers and web applications are commonly used to handle tasks and data that can be critical and highly valuable, making them a very attractive target for attackers and a vector for successful attacks that are aimed at the application layer. Existing misuse and anomaly-based detection and prevention techniques fail to cope with the volume and sophistication of new attacks that are continuously appearing, which suggests that there is a need to provide new additional layers of protection. This work aims to design a new layer of defense based on deception that is employed in the context of web application-layer traffic with the purpose of detecting and preventing attacks. The proposed design is composed of five deception strategies: Deceptive Comments, Deceptive Request Parameters, Deceptive Session Cookies, Deceptive Status Codes and Deceptive JavaScript. The strategies were implemented as a software artifact and their performance evaluated in a testing environment using a custom test script, the OWASP ZAP penetration testing tool and two vulnerable web applications. Deceptive Parameter strategy obtained the best security performance results, followed by Deceptive Comments and Deceptive Status Codes. Deceptive Cookies and Deceptive JavaScript got the poorest security performance results since OWASP ZAP was unable to detect and use deceptive elements generated by these strategies. Operational performance results showed that the deception artifact could successfully be implemented and integrated with existing web applications without changing their source code and adding a low operational overhead. i Acknowledgements I would like to thank everyone who has contributed in some way to this work. Firstly, I would like to thank LTU and its staff for making this learning experience possible. I would like to specially acknowledge all the lecturers and assistants who have participated in different courses of the MSc. Information Security Programme, including the students I’ve had the opportunity to work with. The diversity of backgrounds and the participation of both on-campus and distance students have made this learning journey very enrichening. Secondly, I would like to express my sincere gratitude to Dr. Ali Ismail Awad for being the supervisor of this work and also to my thesis opponents Marcus Hufvudsson and Peter Ken Bediako for their useful comments and suggestions provided during the seminars. Lastly, I would like to thank my family for their support and especially recognize my sister Miren Izagirre and my sister-in-law Itsaso Noya for their interesting comments and discussions. ii Table of Contents Abstract .......................................................................................................................................... i Acknowledgements ....................................................................................................................... ii Table of Contents ......................................................................................................................... iii List of Tables ..................................................................................................................................vi List of Figures ............................................................................................................................... vii Abbreviations ................................................................................................................................ ix CHAPTER ONE ...................................................................................................................... 1 1. INTRODUCTION ............................................................................................................ 1 1.1. Problem statement ....................................................................................................... 2 1.2. Research questions ....................................................................................................... 2 1.3. Proposed solution and research goals .......................................................................... 2 1.4. Research contributions ................................................................................................. 3 1.5. Delimitation ................................................................................................................... 4 1.6. Thesis outline ................................................................................................................ 4 CHAPTER TWO ..................................................................................................................... 5 2. BACKGROUND .............................................................................................................. 5 2.1. Web application vulnerabilities..................................................................................... 5 2.2. Intrusion Detection Systems (IDS) ............................................................................... 10 2.3. Web Application Firewalls (WAF) ................................................................................ 12 2.4. Computer Deception ................................................................................................... 12 CHAPTER THREE ................................................................................................................ 14 3. LITERATURE REVIEW .................................................................................................. 14 3.1. Deception and its use for computer security defenses .............................................. 14 3.2. Web application security testing ................................................................................. 18 3.3. Research gap ............................................................................................................... 20 CHAPTER FOUR .................................................................................................................. 22 4. RESEARCH METHODOLOGY ........................................................................................ 22 iii CHAPTER FIVE .................................................................................................................... 26 5. DESIGN OF DECEPTION STRATEGIES FOR HTTP ............................................................ 26 5.1. Deceptive Comments .................................................................................................. 27 5.2. Deceptive Request Parameters ................................................................................... 29 5.3. Deceptive Session Cookies .......................................................................................... 33 5.4. Deceptive HTTP Status Codes ..................................................................................... 36 5.5. Deceptive JavaScript ................................................................................................... 38 CHAPTER SIX...................................................................................................................... 42 6. IMPLEMENTATION AND EVALUATION ......................................................................... 42 6.1. Testing environment design and implementation ...................................................... 43 6.1.1. Deception artifact implementation ..................................................................... 43 6.1.2. Penetration testing tool: OWASP ZAP .................................................................. 48 6.1.3. Vulnerable web applications: BodgeIt Store and WAVSEP .................................. 49 6.2. Testing procedure ....................................................................................................... 50 6.2.1. Deception artifact implementation functional tests ............................................ 50 6.2.2. Performance evaluation ...................................................................................... 51 CHAPTER SEVEN ................................................................................................................ 58 7. RESULTS AND DISCUSSION ......................................................................................... 58 7.1. Operational Performance ............................................................................................ 58 7.1.1. Request Round-Trip Times ................................................................................... 58 7.1.2. CPU and memory usage ....................................................................................... 59 7.2. Security Performance .................................................................................................