Cross Site Scripting
Cross Site Scripting
(XSS)
POOJA
Roll no. 7215
Btech [IT] 3rd Year
Why XSS ?
Instead of CSS...
Contents
Introduction
Pie chart
Some points regarding it
Types and working
Examples
Functions
How to prevent
Advantages and disadvantages
Conclusion
Future scope
References
Introduction
Xss was firstly discovered around 1996 and is still in the top ten
vulnerability list for the web application.
XSS is one of the most common application-layer web attacks.
And most major websites like Google, Yahoo, Facebook have all been
affected by XSS flaws:
Steal cookies
# Hijack of users session
# Unauthorized access
In 2011
By: WHID
output.
http://test.searchengine.com/
search.php?q=%3Cscript
%3Ealert%28%91This%20is
%20an%20XSS
%20Vulnerability
%92%29%3C%2Fscript%3E
Occur when attacker injects browser executable code within a single HTTP reponse,
Easiest to exploit.
Typically delivered by email or a neutral website.
In this type ,the injected code will be send to the server via HTTPrequest(POST,GET)
<script type="text/javascript">
alert ('This is an XSS
Vulnerability')
</script>
User
Server
1. User login.
2. Attacker gives malicious url to use.
3 User request attackers url.
4 Server responds with attackers JavaScript.
attacker
User
Server
1. Attacker in his blog post
some
m
malicious code using JavaScript.
2 user logs in.
3. User view attackers blog.
4. server browser responds with attackers
javaScript which executes in users browser.
session
code.
User
1.
Server
User logs in
5. Attackers url is processed by JavaScript executing the attack & attacker through JavaScript can can get hold of user;s
session.
6.
How to prevent?
Escaping
Client side
Disable JS
Verify email
Always update
Server side
Input validation (Black listing VS White listing)
Encode all meta characters send to the client
keep track of user sessions
Web application firewall
Advantages :-
Microsoft Anti-XSS library makes handling that much easier and abstract.
Stolen session cookie may expire before its used .
Never makes a direct request to our server.
Disadvantages :-
XSS is a serious problem that can allow identity theft and financial loss.
XSS ,by its nature is highly complex.
Time consuming.
Conclusion
Although user scripts seem to be reasonably safe, always
investigate their code before using them.
By now you should be aware that any sort of data that can land
on your web page from an external source has the potential of
being infected with a malicious script, but in what form does
the data come?
Future Scope: The future of XSS Attacks are very limited or nonexisting if the CSP in FIREFOX is implemented correct
on any website in the world .
We will see how also other browser vendors will act
with CSP.
References :
www.YouTube.com/Blind XSS
_http://googleweblight.com/?(websecurity.com).ua/3878future_scope
_http://google.com/?www.globalspec.com/reference/ch1-xss fundamentals.
_http://www.google.co.in/about/appaecurity/learning/xss/
Beware of
ATTACKERS
Thank You