Web Application Security
Web Application Security
Web Application Security
Module Title
Module Code (listed on QAC020N256S
Moodle and in LTAFP)
Shahbaz Ahmad
Module Convenor
Design and Develop Web Application Security
Coursework Title Testing
Academic Declaration:
Students are reminded that the electronic copy of their essay may be checked, at
any point during their degree, with Turnitin or other plagiarism detection software
for plagiarised material.
2237 Date
Word Count 06/03/2020
Submitted
DIM18457528
Table of Contents:
1. Introduction 3
2. Set up a fully functioning Web Applications 4
2.1. Configuration details of the environment setup Virtual Box 4
2.2. Configuration details of the environment setup XAMPP/WAMP 9
2.3. Web/application and back-end database 15
3. Web Application Security Testing 20
3.1. Nmap scanning 20
3.2. Wireshark Sniffing 26
3.3. SQL Injection using SQLMAP 30
4. Design and Implement a web security model 35
4.1. Firewall 35
4.2. IDS/IPS 36
4.3. Antivirus 37
4.4. Encryption 38
5. Referencing and Bibliography 39
2
DIM18457528
1. Introduction
For the following assignment, it was offered a scenario which will give opportunity
to explain what a security analysis means, as our role is a trainee Web Application
Security Analyst. Our responsibilities are to deliver the web/application security
testing, as our client web site contains possible security vulnerabilities, and deliver
answers that might give responsible assumptions.
3
DIM18457528
Under the VirtualBox binaries we are looking the correct version of VirtualBox
depending of what operate system we are using. Because I use Windows, I will
choose Windows hosts. Web page will provide the last version for downloading
day.
4
DIM18457528
Once the downloading is completed, lunch the downloading file to start the
installation, and follow the required steps.
5
DIM18457528
6
DIM18457528
Once the installation is complete press Finish and the VirtualBox Machine will be
open.
7
DIM18457528
Click Start button to open VirtualBox application window. Click Change Network
Settings to set Bridged Adapter.
When the process will be completed, we have to set up username and password,
for our project we will use:
8
DIM18457528
9
DIM18457528
10
DIM18457528
11
DIM18457528
12
DIM18457528
13
DIM18457528
14
DIM18457528
15
DIM18457528
16
DIM18457528
17
DIM18457528
18
DIM18457528
19
DIM18457528
20
DIM18457528
21
DIM18457528
22
DIM18457528
that Nmap scanning is giving a free testing scanning machine that they will allow you to
scan this scanme.nmap.org. This web site is giving permission to scan an IP address
23
DIM18457528
24
DIM18457528
25
DIM18457528
26
DIM18457528
To run Wireshark, we have 2 options: First is to lunch it from terminal screen with option
sudo wireshark-gtk and second is to Start the CyberOps from Workstation VM:
Applications → CyberOPS → Wireshark.
27
DIM18457528
With Wireshark I will choose to attack line 16 because it has HTTP request.
28
DIM18457528
Source traffic is in red color, blue color is the device destination which respond
back to source:
29
DIM18457528
I will register a query (1’ or 1=1 union select database (), user () #) into a UserID
exploration box on the target 10.0.2.15, as a result, we will receive an error message as
a failure to identify:
30
DIM18457528
31
DIM18457528
32
DIM18457528
Scan database
In the following picture ca can notice that after scanning it was found 6 databases:
33
DIM18457528
Scan table
To specify the wanted database use –D and tell SQLmap to show the tables following
–tables command:
34
DIM18457528
35
DIM18457528
4.1. Firewall
Being designed as a system to prevent unauthorized access to a private network,
Firewall creates a security barrier between the public internet and a private network,
because hackers and malicious traffic will always appear in the private Network. The
firewall is the principal component to block this and is very essential for big
organizations that have plenty of workstations and servers on them because they don’t
want hackers to swap totally their organization. Firewall operates by filter incoming
network data and has some laws to allow or deny traffic using an access control list
(ACL).
36
DIM18457528
4.2. IDS/IPS
These two systems, one intrusion detection (IDS) and the other intrusion
prevention (IPS) are part of the network infrastructure. Those systems compare network
packets to a database called cyberthreat, which contains cyberattacks signatures - and
marks any fitting packets.
37
DIM18457528
4.3. Antivirus
The antivirus program detects applications and documents from infection. Usually,
running as a background process, antivirus software scans computers, servers or
mobile devices to detect and restrict the spread of viruses. Antivirus software programs
include real-time threat detection and protection, protecting the private network from
potential vulnerabilities, regularly scanning device files and looking for potential risks.
38
DIM18457528
4.4. Encryption
Encryption represent the process of encoding a message so that its meaning is
not obvious. First step or encryption is to create a new key. When encrypting data, it is
highly recommended to use a different key for each piece of data. Fortunately, Ionic
makes creating new keys very simple with a single line of code. Second step is
initializing AES cipher. In order to initialize an AES cipher, we need to provide a key. In
this example we are using the newly created key. After the AES cipher has been
initialized, encryption is simply a matter of calling encrypt. After data has been
encrypted, it is typically encoded into a payload that includes both the data and the key
ID. Remember, the recipient of the data must have the key ID, or an external ID, in
order to request to correct key from the Ionic platform. Before encrypted data can be
stored or transmitted, it needs to be packaged with the keyId. Keeping
the ciphertext and the keyId together is critical. Without the keyId, it would be
impossible to determine which key is needed to decrypt the data.
39
DIM18457528
Bryan Sullivan, V. L. (2011). Web Application Security, A Beginner's Guide. McGraw Hill Professional.
Carlos Serrao, V. A. (2010). Web Application Security: Iberic Web Application Security Conference, IBWAS
2009, Madrid, Spain, December 10-11, 2009. Revised Selected Papers. Springer.
Dafydd Stuttard, M. P. (2011). The Web Application Hacker's Handbook: Finding and Exploiting Security
Flaws. John Wiley & Sons.
Hoffman, A. (2020). Web Application Security: Exploitation and Countermeasures for Modern Web
Applications. O'Reilly Media, Incorporated.
Joel Scambray, M. S. (2006). Hacking Exposed Web App. McGraw-Hill Education (India) Pvt Limited.
Joel Scambray, V. L. (2010). Hacking Exposed Web Applications, Third Edition. McGraw Hill Professional.
Khawaja, G. (2018). Practical Web Penetration Testing: Secure web applications using Burp Suite, Nmap,
Metasploit, and more. Packt Publishing Ltd.
Kim, P. (2018). The Hacker Playbook 3: Practical Guide to Penetration Testing. Independently Published.
Lepofsky, R. (2014). The Manager's Guide to Web Application Security: A Concise Guide to the Weaker
Side of the Web. Apress.
Prasad, P. (2016). Mastering Modern Web Penetration Testing. Packt Publishing Ltd.
Splaine, S. (2002). Testing Web Security: Assessing the Security of Web Sites and Applications. Wiley.
Vittie, L. M. (2015). Web Application Security is a Stack: How to CYA. IT Governance Ltd.
Zalewski, M. (2011). The Tangled Web: A Guide to Securing Modern Web Applications. No Starch Press.
40