Question

XSS = cross site scripting 6. Please answer following questions related to defenses to XSS attack...

XSS = cross site scripting

6. Please answer following questions related to defenses to XSS attacks. (15’ compulsory for Msc, 10’ bonus for Undergraduate)

1) Input escaping. Essentially, evey Web page will include a piece of JavaScript code that will search for tags like “

0 0
Add a comment Improve this question Transcribed image text
Answer #1

XSS - Cross-site Scripting in which the attacker manages to sneak a script (Usually javascript) into a website to run malicious code thereby leaking sensitive information, stealing a users cookies and session tokens, etc.

Mainly three types of defenses are used for preventing XSS, one of which is Input escaping.

Input Escaping refers to processing the data before its rendered. Simply put, when the web application can take user input, the user input is first made secure before it is rendered for the end user. By escaping user input, key characters in the data received by the web page will be prevented from being intercepted in any malicious way. Its something like the data is censored in such a way that the characters like [space] % * + , - / ; < = > ^ and | , are disallowed from being rendered.

If at all these characters are being entered, the javascript encodes the characters, meaning data sanitation happens. For example, < becomes &lt; and > becomes &gt; which necessarily mean the same thing to the web browser. In other cases, the application may remove certain characters or expressions in an attempt to cleanse your input of malicious content.

The script that is usually entered has script tags,

<script>alert('...ESCAPE UNTRUSTED DATA BEFORE PUTTING HERE...')</script>  

and the application could be designed in a way, so as to remove the script tags, thus preventing the attack. and if this is not done then the code between the code " ", basically a js code which may harm the application will get its work done.

Even this can be bypassed in as in the case of using escaping shortcuts, example: \" where the HTML attribute parser will run first and it will thus take it as a quote. These escaping shortcuts are also susceptible to escape-the-escape attacks where the attacker sends \" and the vulnerable code turns that into \\" which enables the quote.

Add a comment
Know the answer?
Add Answer to:
XSS = cross site scripting 6. Please answer following questions related to defenses to XSS attack...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • For milestone #1, we will start the CARIT site with three static HTML pages and a...

    For milestone #1, we will start the CARIT site with three static HTML pages and a CSS file. Create a dedicated folder for this project. This folder should contain all related files in this project. The future milestones are cumulative and built directly on top of your prior work. Function/content requirements: A home page named “index.html”, which include these contents at least: Description of the center. You may reference the example sites. Latest news: use list tags; make up some...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT