ASS2
ASS2
ASS2
Assignment 1I :
1. Choose any Penetration testing tool
2. Download and install it
3. Write down all steps you are following in the tool to
perform penetration testing
3
OUTLINE
4
THE WEB APPLICATION HACKER’S HANDBOOK
5
TOOLS NEEDED FOR WORKSHOP
6
INTRODUCTION
SECTION 1
WHY THE WEB?
We use websites for everything: e-commerce, online banking to social networking, social media, etc.
Web security has become a major concern for businesses.
Recent example: Equifax. The breach exposed the personal information of 143 million US users and an estimated
100,000 Canadian users.
According to Trustwave’s 2018 Global Security Report:
100% of the web applications scanned by Trustwave displayed at least one vulnerability.
Median number of 11 vulnerabilities detected per application.
8
HOW TO SECURE A WEB APPLICATION?
9
WHAT IS WEB APP PEN TESTING?
Combination of manual and automated tests to identify vulnerabilities, security flaws and/or threats in a web
application.
Categorized into three types:
White box: Tester has complete access and in-depth knowledge of the system. Access to source code is usually given.
Black box: Tester is given little to no information about the system. Just the URL of the application is usually given.
Grey box: Combination of white box and black box penetration testing. Limited information and access is given to the tester.
10
WHAT IS OWASP?
11
ABSTRACT PEN TESTING METHODOLOGY
Mapping +
Reconnaissance Discovery Exploitation
Analyzing
12
SOFTWARE SETUP
SECTION 2
SOFTWARE SETUP
14
HOW DOES A PROXY WORK?
15
SOFTWARE SETUP
Setup Demonstration
16
MAPPING AND ANALYZING THE APPLICATION
SECTION 3
MAPPING THE APPLICATION
18
ANALYZING THE APPLICATION
Identify functionality
Identify data entry points
Identify the technologies used
Map the attack surface
19
EXERCISE #1: WACKOPICKO
Web Spidering
Your goal is to use ZAP spider to crawl the application.
1. Configure browser to work with ZAP
2. Load the application on configured browser
3. Include root application URL in context.
4. Right click on the root URL in the Sites tree map >
select Attack > select Spider.
5. Right click on the root URL in the Sites tree map >
select Attack > select Ajax Spider.
20
EXERCISE #1: WACKOPICKO
21
BYPASSING CLIENT-SIDE CONTROLS
SECTION 4
CLIENT-SIDE VS SERVER-SIDE VALIDATION
Client-side Server-side
3 2 3
1 1
2
23
BYPASSING CLIENT-SIDE CONTROLS
Allowing clients to submit arbitrary input is a core security problem in web applications.
Users have full control of everything submitted from the client.
Can cause a range of problems including corrupting data stores, allowing unauthorized access to users and buffer overflows.
In general, there are two ways client-side controls are used to restrict user input:
Transmitting data via the client using mechanisms that “prevent” user interaction. Examples include hidden form fields,
disabled elements, referrer header, URL parameters, etc.
Controlling user input using measures that “restrict” user input. Examples include HTML form features, client-side scripts,
etc.
24
TRANSMITTING DATA VIA THE CLIENT
Code
Request
25
TRANSMITTING DATA VIA THE CLIENT
Response: Request:
26
EXERCISE #2: WEBGOAT
27
EXERCISE #2: WEBGOAT
Solution Demonstration
28
RESTRICTING USER DATA
29
RESTRICTING USER DATA
30
EXERCISE #3: WEBGOAT
31
EXERCISE #3: WEBGOAT
Solution Demonstration
32
RESTRICTING USER DATA
33
EXERCISE #4: WEBGOAT
34
EXERCISE #4: WEBGOAT
Solution Demonstration
35
ATTACKING AUTHENTICATION
SECTION 5
AUTHENTICATION
37
DESIGN FLAWS IN AUTHENTICATION MECHANISMS
Bad passwords*
Brute-forcible logins
Verbose Failure messages
Vulnerable transmission of credentials
Weaknesses in password change functionality
Weaknesses in forgotten password functionality*
etc.
38
BAD PASSWORDS
39
EXERCISE #5: WEBGOAT
Forgot Password
The goal is to retrieve the password of another user.
40
EXERCISE #5: WEBGOAT
Solution Demonstration
41
IMPLEMENTATION FLAWS IN AUTHENTICATION
42
EXERCISE #6: WEBGOAT
Multi Level Login 2
Your goal is to log in as Jane.
43
EXERCISE #6: WEBGOAT
Solution Demonstration
44
ATTACKING SESSION MANAGEMENT
SECTION 6
ATTACKING SESSION MANAGEMENT
46
EXERCISE #7: WACKOPICKO
Session Management
Try to determine how the session is being calculated for the admin interface. Log in as admin/admin multiple
times to solve this exercise.
47
EXERCISE #7: WACKOPICKO
Solution Demonstration
48
ATTACKING DATA STORES
SECTION 7
ATTACKING DATA STORES
50
EXERCISE #8: WEBGOAT
51
EXERCISE #8: WEBGOAT
Solution Demonstration
52
CONCLUSION
SECTION 8
WHAT NEXT?
Concepts
we learned
today
Remaining
concepts
54
WHAT NEXT?
Read books
Get a mentor
So many free online resource! (Cybrary, coursera, MIT open
courseware, etc.)
Practice on intentionally vulnerable web applications
Participate in CTF competitions
Attend conferences
Contribute to open-source security projects
Apply to security jobs (Even if you don’t have all the
qualifications. Most people don’t!)
Take life one step at a time. You can do this!
55
GET IN TOUCH!
/ranakhalil1
https://rkhal101.github.io/
@rana__khalil
/rkhal101
56
GET IN TOUCH!
Laptop stickers
generously donated
by OWASP!
57