XSS

What is XSS (cross site scripting) ?

Cross site scripting or XSS has consistency been ranked as one of the top of 10 threats a web application security project .In short XSS happens when attacker can inject something in to your website that you don’t want to be there.

Imagine a comment or reviews section on your site where costumer or visitor can leave their own remark. They are supposed to type a nice message in to field which will their be saved and shown on your website to other visitor. What if they type something else in there. What if they type malicious code in the field.

Basic example of xss.

<script>alert(xss)</script>

.Types of xss

1.reflected xss.

2.stored xss.

3.dom xss.

1. Reflected xss : Reflected xss occurs when user input is immediately returned by a web application in an error message search result , or any other response that include some or all of the input provided by the user part of the request ,without that data being being made safe to render in the browser ,and without permanently storing the user provided data.in some cases , the user provided data may never even leave the browser .

No alt text provided for this image

2. Stored xss : To successfully execute a stored xss attack a perpetrate has to locate a vulnerability in a web application and then inject malicious script into its server.

One of the most frequent target are websites that allow user to share content , including blogs, social networks ,video sharing platform and message board. Every time the injected page is viewed, the malicious script is transmitted to the victim browser.

No alt text provided for this image

3. Dom xss : Dom base xss is a form of xss where the entire tainted data flow from source to sink take place in the browser. The source of the data is in the dom, the sink is also in the dom , and the flow never leaves the browser. The source could be the URL of the page or it could be an element of the html and the sink is a sensitive method call that causes the execution of the malicious data.

No alt text provided for this image

Types of cross site scripting the research of two new term to help organize the types of xss that can occur=

.server xss

.client xss

Server xss :-

Server xss occurs when entrusted user supplied data is included in an html response generated by the server. The source of the data could be from of the request, or from a stored location. As such you can have both reflected server xss and stored server xss.

In this case the entire vulnerability is in server-side code and the browser is simply rendering the response and executing and valid script embedded in it.

Client xss : Client xss occur when entrusted user supplied data is used to update the DOM with an unsafe JavaScript call is considered unsafe if it can be used to introduce valid JavaScript in to the dom . this source of this data could be form the DOM or it could have been sent by the server . the ultimate source of the data could have been from the request or from a stored location on the client or the server. As such you can have both reflected client xss and stored client xss.

 

Written By : Rohit Jolly

To view or add a comment, sign in

More articles by Deepak Baghel

  • SYSTEM HIJACKING

    System Hijacking is a type of illegal security attack through which attacker/hacker gains unauthorized access to a…

  • REMOTE CODE EXECUTION (RCE)

    Command injection is an attack in which the goal is execution of arbitrary commands on the host operating system via a…

  • Local File Inclusion

    Local file inclusion is web based vulnerability in which the attacker can put any file on the place of other file in…

  • Unsupervised Learning

    Unsupervised Learning is a one of the types of machine learning . It's a part of learning where we don't offer focus to…

  • Supervised Learning

    In Supervised Learning, algorithms learn from labeled data. After understanding the data, the algorithm determines…

  • Pandas

    Why Pandas ? · Pandas are used for data framing . · Pandas are generally based on numpy and matplotlib to give you a…

  • List in Python

    LISTS In python, list is a type of array or a container where you can store different types of data. The elements…

  • Exploratory Data Analysis (EDA)

    Exploratory Data Analysis (EDA) is the process of visualizing and analyzing data to extract insights from it. In other…

  • DATA SCIENCE PIPELINE

    DATA SCIENCE PIPELINE What is Data Science? Data science is the extraction of relevant insights from data. It uses…

Others also viewed

Explore content categories