ACM Home Page
Please provide us with feedback. Feedback
Characterizing insecure javascript practices on the web
Full text PdfPdf (1.07 MB)
Source
International World Wide Web Conference archive
Proceedings of the 18th international conference on World wide web table of contents
Madrid, Spain
SESSION: Web engineering/session: client side web engineering table of contents
Pages 961-970  
Year of Publication: 2009
ISBN:978-1-60558-487-4
Authors
Chuan Yue  The College of William and Mary, Williamsburg, VA, USA
Haining Wang  The College of William and Mary, Williamsburg, VA, USA
Sponsor
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 65,   Downloads (12 Months): 244,   Citation Count: 0
Additional Information:

abstract   references   index terms   collaborative colleagues  

Tools and Actions: Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1526709.1526838
What is a DOI?

ABSTRACT

JavaScript is an interpreted programming language most often used for enhancing webpage interactivity and functionality. It has powerful capabilities to interact with webpage documents and browser windows, however, it has also opened the door for many browser-based security attacks. Insecure engineering practices of using JavaScript may not directly lead to security breaches, but they can create new attack vectors and greatly increase the risks of browser-based attacks. In this paper, we present the first measurement study on insecure practices of using JavaScript on the Web. Our focus is on the insecure practices of JavaScript inclusion and dynamic generation, and we examine their severity and nature on 6,805 unique websites. Our measurement results reveal that insecure JavaScript practices are common at various websites: (1) at least 66.4% of the measured websites manifest the insecure practices of including JavaScript files from external domains into the top-level documents of their webpages; (2) over 44.4% of the measured websites use the dangerous eval() function to dynamically generate and execute JavaScript code on their webpages; and (3) in JavaScript dynamic generation, using the document.write() method and the innerHTML property is much more popular than using the relatively secure technique of creating script elements via DOM methods. Our analysis indicates that safe alternatives to these insecure practices exist in common cases and ought to be adopted by website developers and administrators for reducing potential security risks.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
2
 
3
4
 
5
 
6
 
7
8
 
9
 
10
S. Fogie, J. Grossman, R. Hansen, A. Rager, and P. D. Petkov. XSS Exploits: Cross Site Scripting Attacks and Defense. Syngress, ISBN 1-597-49154-3, 2007.
11
12
13
14
 
15
16
17
 
18
 
19
E. Mendes and N. M. (Eds.). Web Engineering. Springer, ISBN 3-540-28196-7, 2005.
 
20
A. Moshchuk, T. Bragin, S. D. Gribble, and H. M. Levy. A crawler-based study of spyware in the web. In Proc. of the NDSS, 2006.
 
21
S. Murugesan and Y. D. (Eds.). Web Engineering : Managing Diversity and Complexity of Web Application Development. Springer, ISBN 3-540-42130-0, 2001.
22
 
23
 
24
 
25
26
 
27
 
28
Y.-M. Wang, D. Beck, X. Jiang, R. Roussev, C. Verbowski, S. Chen, and S. T. King. Automated web patrol with strider honeymonkeys: Finding web sites that exploit browser vulnerabilities. In Proc. of the NDSS, 2006.
29
 
30
 
31
32
 
33
34
 
35
24 ways: Don't be eval(). http://24ways.org/2005/dont-be-eval.
 
36
Alexa Top Sites. http://www.alexa.com/browse?CategoryID=1.
 
37
CERT Advisory CA-2000-02 Malicious HTML Tags Embedded in Client Web Requests. http://www.cert.org/advisories/CA-2000-02.html.
 
38
Cross-site scripting. http://en.wikipedia.org/wiki/Cross-site_scripting.
 
39
eval -- MDC. http://developer.mozilla.org/en/ Core_JavaScript_1.5_Reference/Global_Functions/eval.
 
40
JavaScript. http://en.wikipedia.org/wiki/JavaScript.
 
41
JSAPI reference -- MDC. http://developer.mozilla.org/en/JSAPI_Reference.
 
42
JSON in JavaScript. http://www.json.org/js.html.
 
43
JSPrincipals -- MDC. http://developer.mozilla.org/en/JSPrincipals.
 
44
MSDN: innerHTML property. http://msdn.microsoft.com /en-us/library/ms533897(VS.85).aspx.
 
45
Same origin policy. http://en.wikipedia.org/wiki/Same_origin_policy.
 
46
SANS Top-20 2007 Security Risks (2007 Annual Update). http://www.sans.org/top20/2007/.
 
47
SpiderMonkey (JavaScript-C) Engine. http://www.mozilla.org/js/spidermonkey/.
 
48
Symantec Internet security threat report volume XIII: April, 2008. http://www.symantec.com/ business/theme.jsp?themeid=threatreport.
 
49
Unobtrusive Javascript. http://www.onlinetools.org/articles/unobtrusivejavascript/.
 
50
XMLHttpRequest. http://www.w3.org/TR/XMLHttpRequest/.