SlideShare a Scribd company logo
UNIT-V
WEB APPLICATION HACKING AND SECURITY
Content
╸ Introduction to Hacking Web Applications
╸ Cross-Site Scripting (XSS)
╸ Cross-Site Request Forgery (CSRF)
╸ XML External Entity (XXE)
╸ Injections: SQL Injection& Code Injection
╸ Denial of Service (DoS)
╸ Exploiting Third-Party Dependencies
╸ Web Application Security: Securing Modern Web Applications
╸ Secure Application Architecture
╸ OWASP Top 10 Web Application Security Risks and Tools
Introduction to Hacking Web Applications
╸ A web application is a program or software
that runs on a web browser to perform
specific tasks. Any web application has
several layers – the web server, the content
of the application that is hosted on the web
server, and the backend interface layer that
integrates with other applications. Web
application architecture is scalable and has
components that have high availability.
Introduction to Hacking Web Applications
╸ Ethical Hacking is the process of appropriating the web
application from its actual use by tinkering in various
ways. The web application hacker needs to have deep
knowledge of the web application architecture to
successfully hack it. To be a master, the hacker needs to
practice, learn and also tinker with the application.
╸ Web application hacking requires tenacity, focus,
attention to detail, observation and interfacing. There
are many types of web application hacking, and many
defense mechanisms available to counter and to
protect the application from being hacked.
Web Application Types
╸ Single Page Applications (SPAs)
╸ Web applications have changed a bit in the last
decade or two. Many modern web applications
today are Single Page Applications (SPAs).
Single page applications look like this. All
dynamic data on the page is dynamically
gathered and loaded by client-side JavaScript.
Web Application Types
╸ Traditional Web Applications
╸ More traditional web applications typically
look like this: entire pages are refreshed
every time data needs to be updated. The full
responses are typically prepared server-side
and sent to the browser in one big lump:
Cross-site Scripting (XSS)
Cross-site Scripting (XSS)
Cross-site scripting (also known as XSS) is a web security vulnerability that allows an
attacker to compromise the interactions that users have with a vulnerable application. It
allows an attacker to circumvent the same origin policy, which is designed to segregate
different websites from each other. Cross-site scripting vulnerabilities normally allow an
attacker to masquerade as a victim user, to carry out any actions that the user is able to
perform and to access any of the user's data. If the victim user has privileged access within
the application, then the attacker might be able to gain full control over all of the
application's functionality and data.
Cross-site Scripting (XSS)
How does XSS work?
Cross-site scripting works by
manipulating a vulnerable website so
that it returns malicious JavaScript to
users. When the malicious code
executes inside a victim's browser, the
attacker can fully compromise their
interaction with the application.
Cross-site Scripting (XSS) Working
How to prevent XSS attacks
Preventing cross-site scripting is trivial in some cases but can be much harder depending on the complexity of the application
and the ways it handles user-controllable data.
In general, effectively preventing XSS vulnerabilities is likely to involve a combination of the following measures:
•Filter input on arrival. At the point where user input is received, filter as strictly as possible based on what is expected or valid
input.
•Encode data on output. At the point where user-controllable data is output in HTTP responses, encode the output to prevent it
from being interpreted as active content. Depending on the output context, this might require applying combinations of HTML,
URL, JavaScript, and CSS encoding.
•Use appropriate response headers. To prevent XSS in HTTP responses that aren't intended to contain any HTML or
JavaScript, you can use the Content-Type and X-Content-Type-Options headers to ensure that browsers interpret the responses in
the way you intend.
•Content Security Policy. As a last line of defense, you can use a Content Security Policy (CSP) to reduce the severity of any XSS
vulnerabilities that still occur.

More Related Content

PPTX
Cross-Site Scripting (XSS)
PPTX
Cross Site Scripting Defense Presentation
PDF
Web Vulnerabilities And Exploitation - Compromising The Web
PPTX
Vulnerabilities in Web Applications
PDF
Xss 101 by-sai-shanthan
PPTX
Cross Site Scripting (XSS)
PDF
XSS Exploitation
Cross-Site Scripting (XSS)
Cross Site Scripting Defense Presentation
Web Vulnerabilities And Exploitation - Compromising The Web
Vulnerabilities in Web Applications
Xss 101 by-sai-shanthan
Cross Site Scripting (XSS)
XSS Exploitation

Similar to Web hacking refers to exploitation of applications via HTTP which can be done (20)

DOC
HallTumserFinalPaper
PPT
Cross site scripting (xss)
PDF
AJAX: How to Divert Threats
PPTX
Cross Site Scripting
PDF
Study of Cross-Site Scripting Attacks and Their Countermeasures
PDF
IBWAS 2010: Web Security From an Auditor's Standpoint
PDF
Luis Grangeia IBWAS
PDF
C01461422
PDF
Introduction to Cross Site Scripting ( XSS )
PPTX
LECTURE-DEC-6_web-application-attacks (1).pptx
PPT
Web Security Overview and Demo
PDF
cyber security-ethical hacking web servers.pdf
DOCX
Pantallas escaneo Sitio Web
PDF
Grey H@t - Cross-site Request Forgery
PDF
Web Application Security and Awareness
PDF
www.webre24h.com - Ajax security
PPTX
Security testing for web developers
PPTX
Vulnerabilities in modern web applications
PDF
Session7-XSS & CSRF
HallTumserFinalPaper
Cross site scripting (xss)
AJAX: How to Divert Threats
Cross Site Scripting
Study of Cross-Site Scripting Attacks and Their Countermeasures
IBWAS 2010: Web Security From an Auditor's Standpoint
Luis Grangeia IBWAS
C01461422
Introduction to Cross Site Scripting ( XSS )
LECTURE-DEC-6_web-application-attacks (1).pptx
Web Security Overview and Demo
cyber security-ethical hacking web servers.pdf
Pantallas escaneo Sitio Web
Grey H@t - Cross-site Request Forgery
Web Application Security and Awareness
www.webre24h.com - Ajax security
Security testing for web developers
Vulnerabilities in modern web applications
Session7-XSS & CSRF

Recently uploaded (20)

PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Computing-Curriculum for Schools in Ghana
PPTX
Institutional Correction lecture only . . .
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
TR - Agricultural Crops Production NC III.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Computing-Curriculum for Schools in Ghana
Institutional Correction lecture only . . .
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Renaissance Architecture: A Journey from Faith to Humanism
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
STATICS OF THE RIGID BODIES Hibbelers.pdf
O7-L3 Supply Chain Operations - ICLT Program
FourierSeries-QuestionsWithAnswers(Part-A).pdf
RMMM.pdf make it easy to upload and study
Final Presentation General Medicine 03-08-2024.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
2.FourierTransform-ShortQuestionswithAnswers.pdf
Supply Chain Operations Speaking Notes -ICLT Program
school management -TNTEU- B.Ed., Semester II Unit 1.pptx

Web hacking refers to exploitation of applications via HTTP which can be done

  • 2. Content ╸ Introduction to Hacking Web Applications ╸ Cross-Site Scripting (XSS) ╸ Cross-Site Request Forgery (CSRF) ╸ XML External Entity (XXE) ╸ Injections: SQL Injection& Code Injection ╸ Denial of Service (DoS) ╸ Exploiting Third-Party Dependencies ╸ Web Application Security: Securing Modern Web Applications ╸ Secure Application Architecture ╸ OWASP Top 10 Web Application Security Risks and Tools
  • 3. Introduction to Hacking Web Applications ╸ A web application is a program or software that runs on a web browser to perform specific tasks. Any web application has several layers – the web server, the content of the application that is hosted on the web server, and the backend interface layer that integrates with other applications. Web application architecture is scalable and has components that have high availability.
  • 4. Introduction to Hacking Web Applications ╸ Ethical Hacking is the process of appropriating the web application from its actual use by tinkering in various ways. The web application hacker needs to have deep knowledge of the web application architecture to successfully hack it. To be a master, the hacker needs to practice, learn and also tinker with the application. ╸ Web application hacking requires tenacity, focus, attention to detail, observation and interfacing. There are many types of web application hacking, and many defense mechanisms available to counter and to protect the application from being hacked.
  • 5. Web Application Types ╸ Single Page Applications (SPAs) ╸ Web applications have changed a bit in the last decade or two. Many modern web applications today are Single Page Applications (SPAs). Single page applications look like this. All dynamic data on the page is dynamically gathered and loaded by client-side JavaScript.
  • 6. Web Application Types ╸ Traditional Web Applications ╸ More traditional web applications typically look like this: entire pages are refreshed every time data needs to be updated. The full responses are typically prepared server-side and sent to the browser in one big lump:
  • 8. Cross-site Scripting (XSS) Cross-site scripting (also known as XSS) is a web security vulnerability that allows an attacker to compromise the interactions that users have with a vulnerable application. It allows an attacker to circumvent the same origin policy, which is designed to segregate different websites from each other. Cross-site scripting vulnerabilities normally allow an attacker to masquerade as a victim user, to carry out any actions that the user is able to perform and to access any of the user's data. If the victim user has privileged access within the application, then the attacker might be able to gain full control over all of the application's functionality and data.
  • 9. Cross-site Scripting (XSS) How does XSS work? Cross-site scripting works by manipulating a vulnerable website so that it returns malicious JavaScript to users. When the malicious code executes inside a victim's browser, the attacker can fully compromise their interaction with the application.
  • 11. How to prevent XSS attacks Preventing cross-site scripting is trivial in some cases but can be much harder depending on the complexity of the application and the ways it handles user-controllable data. In general, effectively preventing XSS vulnerabilities is likely to involve a combination of the following measures: •Filter input on arrival. At the point where user input is received, filter as strictly as possible based on what is expected or valid input. •Encode data on output. At the point where user-controllable data is output in HTTP responses, encode the output to prevent it from being interpreted as active content. Depending on the output context, this might require applying combinations of HTML, URL, JavaScript, and CSS encoding. •Use appropriate response headers. To prevent XSS in HTTP responses that aren't intended to contain any HTML or JavaScript, you can use the Content-Type and X-Content-Type-Options headers to ensure that browsers interpret the responses in the way you intend. •Content Security Policy. As a last line of defense, you can use a Content Security Policy (CSP) to reduce the severity of any XSS vulnerabilities that still occur.