Ethical Hacking OWASP
Ethical Hacking OWASP
358
OWASP Introduction
• OWASP or Open Web Application Security Project is a non-profit
charitable organization focused on improving the security of software
and web applications.
• The organization publishes a list of top web security vulnerabilities
based on the data from various security organizations.
• The web security vulnerabilities are prioritized depending on
exploitability, detectability and impact on software.
359
359
1
2023-06-25
OWASP Introduction-cont.
• Exploitability –
• What is needed to exploit the security vulnerability? Highest exploitability
when the attack needs only web browser and lowest being advanced
programming and tools.
• Detectability –
• How easy is it to detect the threat? Highest being the information displayed
on URL, Form or Error message and lowest being source code.
• Impact or Damage –
• How much damage will be done if the security vulnerability is exposed or
attacked? Highest being complete system crash and lowest being nothing at
all.
360
360
1) SQL Injection
361
361
2
2023-06-25
1) SQL Injection-cont.
Description
• Injection is a security vulnerability that allows an attacker to alter
backend SQL statements by manipulating the user supplied data.
• Injection occurs when the user input is sent to an interpreter as part
of command or query and trick the interpreter into executing
unintended commands and gives access to unauthorized data.
• The SQL command which when executed by web application can also
expose the back-end database.
362
362
1) SQL Injection-cont.
Implication
• An attacker can inject malicious content into the vulnerable fields.
• Sensitive data like User Names, Passwords, etc. can be read from the
database.
• Database data can be modified (Insert/Update/ Delete).
• Administration Operations can be executed on the database
Vulnerable Objects
• Input Fields
• URLs interacting with the database.
363
363
3
2023-06-25
1) SQL Injection-cont.
Examples:
• SQL injection on the Login Page
Logging into an application without having valid credentials.
Valid userName is available, and password is not available.
Test URL: http://demo.testfire.net/default.aspx
User Name: sjones
Password: 1=1' or pass123
SQL query created and sent to Interpreter as below
SELECT * FROM Users WHERE User_Name = sjones AND Password = 1=1'
or pass123;
364
364
1) SQL Injection-cont.
• Recommendations
1. White listing the input fields
2. Avoid displaying detailed error messages that are useful to an attacker.
365
365
4
2023-06-25
366
367
367
5
2023-06-25
368
368
369
369
6
2023-06-25
370
370
371
371
7
2023-06-25
372
372
373
373
8
2023-06-25
374
374
375
375
9
2023-06-25
376
376
377
377
10
2023-06-25
378
378
379
379
11
2023-06-25
380
380
381
381
12
2023-06-25
382
382
6) Security Misconfiguration
• Description
• Security Configuration must be defined and deployed for the application,
frameworks, application server, web server, database server, and platform. If
these are properly configured, an attacker can have unauthorized access to
sensitive data or functionality.
• Sometimes such flaws result in complete system compromise. Keeping the
software up to date is also good security.
383
383
13
2023-06-25
6) Security Misconfiguration-cont.
• Implication
• Making use of this vulnerability, the attacker can enumerate the underlying
technology and application server version information, database information
and gain information about the application to mount few more attacks.
• Vulnerable objects
• URL
• Form Fields
• Input fields
384
384
6) Security Misconfiguration-cont.
• Examples
1. The application server admin console is automatically installed and not
removed. Default accounts are not changed. The attacker can log in with
default passwords and can gain unauthorized access.
2. Directory Listing is not disabled on your server. Attacker discovers and can
simply list directories to find any file.
385
385
14
2023-06-25
6) Security Misconfiguration-cont.
• Recommendations
1. A strong application architecture that provides good separation and security
between the components.
2. Change default usernames and passwords.
3. Disable directory listings and implement access control checks.
386
386
387
387
15
2023-06-25
388
388
389
389
16
2023-06-25
390
390
391
391
17
2023-06-25
392
392
393
393
18
2023-06-25
394
394
395
395
19
2023-06-25
396
396
397
397
20
2023-06-25
398
398
399
399
21
2023-06-25
400
400
22