Cross-Site Scripting: Computer and Network Security Seminar
Cross-Site Scripting: Computer and Network Security Seminar
Cross-Site Scripting: Computer and Network Security Seminar
(XSS)
Computer and Network Security Seminar
Fabrice Bodmer ([email protected])
UNIFR - Winter Semester 2006-2007
(Marc Slemko)
XSS CSS
In short, XSS is a class of vulnerabilities which allow injection
of code into the client side of a web application.
It often involves or is used in conjunction with socialengineering techniques (often the victim is fooled with a
prepared URL).
All this piqued our interest and we decided to see how secure other
popular social networking sites are against "wormable" XSS
vulnerabilities. We picked two among the top social networking sites
with a reported combined user base of 80 million. Within half an hour
we had discovered over half a dozen potentially "wormable" XSS
vulnerabilities in each site! We stopped looking after finding half a
dozen, but we are sure there are a lot more holes in there. With about a
day's work a malicious attacker with a half-decent knowledge of
javascript could create a worm using just one of these vulnerabilities.
SGMasood on f-secure weblog (July 27, 2006)
Some statistics...
Redirection
Phishing
Path Traversal
Known Vulnerabity
Insufficient Anti-automation
HTTP Response Splitting
Directory Indexing
Denial of Service
Defacement
Brute Force
Worm
Other
Content Spoofing
Abuse of Functionality
Weak Password Recovery Validation
Information Leakage
Predictable Resource Location
OS Commanding
Insufficient Authentication
SQL Injection
Credential/Session Prediction
Insufficient Authorization
Unknown
Cross-site Scripting
Other / Unknown
39%
Insufficient authorisation & authentication
16%
SQL injection
9%
Credential / Session prediction
9%
Cross-site scripting
27%
12.5
25.0
37.5
50.0
[number of incidents]
<div style="background:url('java\nscript:alert(1)')">
If the keyword javascript is filtered out, you can try to write it as follows, some browser will still interpret it...
2.
Non-persistent or reflected
3.
Hole which allowed the injection: Myspace was only partially filtering out
html tags... the <embed> tag was still allowed...
Demonstration
2 real-life examples !
1.
2.
Conclusion
XSS is an easy to abuse security hole... in particular if the
user-inputs are not validated...
kiddy-hackers will enjoy making funny scripts if you dont
validate user-inputs...
New XSS techniques are discovered regularly that find new
ways to evade various security measures implemented by the
browser scripting languages and new ways to fool users into
falling into an XSS trap
References
(1)
(2)
Amit Klein, 4.7.2005, DOM Based Cross Site Scripting or XSS of the Third Kind
http://www.webappsec.org/projects/articles/071105.html
(3)
(4)
(5)
(6)
(7)