Software and Web Security
Software and Web Security
Dr Ayman El Hajjar
March 05, 2024
School of Computer Science and Engineering
University of Westminster
Web Application Attacks Application Exploitation Countermeasures Software Development Security
O UTLINE
2. Application Exploitation
3. Countermeasures
1
Web Application Attacks Application Exploitation Countermeasures Software Development Security
2
Web Application Attacks Application Exploitation Countermeasures Software Development Security
3
Web Application Attacks Application Exploitation Countermeasures Software Development Security
S ECURITY F LAWS
4
Web Application Attacks
Web Application Attacks Application Exploitation Countermeasures Software Development Security
5
Web Application Attacks Application Exploitation Countermeasures Software Development Security
6
Web Application Attacks Application Exploitation Countermeasures Software Development Security
↓
❏ Subsequent text is ignored at execution time
End-of-line comment
❏ After injecting code into a particular feld, legitimate code that
follows are nullifed through usage of end of line comments
Piggybacked queries
❏ The attacker adds additional queries beyond the intended
query, piggy-backing the attack on top of a legitimate request
Inferential Attack
❏ There is no actual transfer of data, but the attacker is able to
reconstruct the information by sending particular requests and
observing the resulting behaviour of the Website/database
9
server.
Web Application Attacks Application Exploitation Countermeasures Software Development Security
10
Web Application Attacks Application Exploitation Countermeasures Software Development Security
11
Web Application Attacks Application Exploitation Countermeasures Software Development Security
12
Web Application Attacks Application Exploitation Countermeasures Software Development Security
F ILE T RAVERSAL
❏ File traversal is a way to get out of what the web server wanted
you to originally see, and be able to see more.
❏ For example: The default web-server public folder for Apache
server on Linux is /var/www/html
❏ If we visit the website of this web-server. the server will point
us to the /var/www/html , usually an index.html page (or
whatever language the site is written in)
❏ File Traversal is the ability to browse the web server and see
fles outside the contents of /var/www/html , for example root
folder of the web server
❏ The web-server public folder for Apache server on our
OWASP VM is /var/www/
14
Application Exploitation
Web Application Attacks Application Exploitation Countermeasures Software Development Security
15
Web Application Attacks Application Exploitation Countermeasures Software Development Security
16
Web Application Attacks Application Exploitation Countermeasures Software Development Security
19
Countermeasures
Web Application Attacks Application Exploitation Countermeasures Software Development Security
20
Web Application Attacks Application Exploitation Countermeasures Software Development Security
21
Web Application Attacks Application Exploitation Countermeasures Software Development Security
Security issues
❏ Correct algorithm implementation
❏ Correct machine instructions for algorithm
❏ Valid manipulation of data
22
Web Application Attacks Application Exploitation Countermeasures Software Development Security
23
Web Application Attacks Application Exploitation Countermeasures Software Development Security
C ORRECT U SE OF M EMORY
24
Web Application Attacks Application Exploitation Countermeasures Software Development Security
❏ Three Types
Defensive coding
❐ Manual defensive coding practices
❐ Parameterised query insertion
Detection
❐ Signature based
❐ Anomaly based
❐ Code analysis
Run-time prevention
❐ Check queries at runtime to see if they conform to a model of
expected queries
25
Web Application Attacks Application Exploitation Countermeasures Software Development Security
26
Web Application Attacks Application Exploitation Countermeasures Software Development Security
27
Software Development Security
Web Application Attacks Application Exploitation Countermeasures Software Development Security
28
Web Application Attacks Application Exploitation Countermeasures Software Development Security
D EFENSIVE P ROGRAMMING
29
Web Application Attacks Application Exploitation Countermeasures Software Development Security
S ECURITY BY D ESIGN
30
Web Application Attacks Application Exploitation Countermeasures Software Development Security
❏ Fundamental tasks
❐ Understand the requirements of the system
❐ Analyse the requirements in detail
❐ Determine the appropriate technology for the system
based on its purpose and use
❐ Identify and design program functions
❐ Code the programs
❐Test the programs, individually and collectively
❐ Install the system into a secure “production” environment
31
Web Application Attacks Application Exploitation Countermeasures Software Development Security
❏ Phases of SDLC
❐ Phase zero (project inception)
❐ System requirements
❐ System design
❐ Development
❐ Test
❐ Deployment
❏ To make software secure, security must be built into the
development life cycle
❏ The earlier in the development life cycle security is
implemented, the cheaper software development will be
32
Web Application Attacks Application Exploitation Countermeasures Software Development Security
33
Web Application Attacks Application Exploitation Countermeasures Software Development Security
Requirements:
❏ Map security and privacy requirements
❐ Business system analysis should be familiar with
organisational security policies and standards such as
organisation privacy policy and regulatory requirements.
Development
❏ Threat modelling
❐ Used to determine the technical security posture of the
application being developed
❏Design reviews
❐ Carried out by a security subject matter expert and
typically iterative in nature
34
Web Application Attacks Application Exploitation Countermeasures Software Development Security
Testing
❏Critical step for discovering vulnerabilities not found earlier
❐ Build security test cases
❐ Tests are used during dynamic analysis
❐ Software is loaded and operated in a test environment
Deployment
❐ Final security review
❐ Create application security monitoring and response plan
❏ Security training 35
Web Application Attacks Application Exploitation Countermeasures Software Development Security
R EFERENCES