skip to main content
10.1145/2635868.2635916acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
research-article

SAFEWAPI: web API misuse detector for web applications

Published:11 November 2014Publication History

ABSTRACT

The evolution of Web 2.0 technologies makes web applications prevalent in various platforms including mobile devices and smart TVs. While one of the driving technologies of web applications is JavaScript, the extremely dynamic features of JavaScript make it very difficult to define and detect errors in JavaScript applications. The problem becomes more important and complicated for JavaScript web applications which may lead to severe security vulnerabilities. To help developers write safe JavaScript web applications using vendor-specific Web APIs, vendors specify their APIs often in Web IDL, which enables both API writers and users to communicate better by understanding the expected behaviors of the Web APIs. In this paper, we present SAFEWAPI, a tool to analyze Web APIs and JavaScript web applications that use the Web APIs and to detect possible misuses of Web APIs by the web applications. Even though the JavaScript language semantics allows to call a function defined with some parameters without any arguments, platform developers may require application writers to provide the exact number of arguments. Because the library functions in Web APIs expose their intended semantics clearly to web application developers unlike pure JavaScript functions, we can detect wrong uses of Web APIs precisely. For representative misuses of Web APIs defined by software quality assurance engineers, our SAFEWAPI detects such misuses in real-world JavaScript web applications.

References

  1. Caja. http://code.google.com/p/google-caja.Google ScholarGoogle Scholar
  2. ECMAScript Language Specification. Edition 5.1. http://www.ecma-international.org/ publications/standards/Ecma-262.htm.Google ScholarGoogle Scholar
  3. HTML5. http://www.w3.org/TR/html5/.Google ScholarGoogle Scholar
  4. SAFE: Scalable Analysis Framework for ECMAScript. http://safe.kaist.ac.kr.Google ScholarGoogle Scholar
  5. Samsung Smart TV apps developer forum. http://www. samsungdforum.com/.Google ScholarGoogle Scholar
  6. Samsung web API on developer site. http: //developer.samsung.com/samsung-web-api.Google ScholarGoogle Scholar
  7. Web IDL. http://www.w3.org/TR/WebIDL.Google ScholarGoogle Scholar
  8. ActionScript.org. ActionScript. http://www. actionscript.org.Google ScholarGoogle Scholar
  9. C. Anderson, P. Giannini, and S. Drossopoulou. Towards type inference for JavaScript. In Proceedings of the 19th European Conference on Object-Oriented Programming, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J. Ashkenas. CoffeeScript. http://coffeescript. org.Google ScholarGoogle Scholar
  11. R. Chugh, J. A. Meister, R. Jhala, and S. Lerner. Staged information flow for JavaScript. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Crockford. ADsafe. http://www.adsafe.org.Google ScholarGoogle Scholar
  13. D. Crockford. JSLint. http://www.jslint.com.Google ScholarGoogle Scholar
  14. L. Foundation. Tizen. http://tizen.org.Google ScholarGoogle Scholar
  15. A. Guha, S. Krishnamurthi, and T. Jim. Using static analysis for Ajax intrusion detection. In Proceedings of the 18th International Conference on World Wide Web, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Guha, B. Lerner, J. G. Politz, and S. Krishnamurthi. Web API verification: Results and challenges. In Analysis of Security APIs, 2012.Google ScholarGoogle Scholar
  17. P. Heidegger and P. Thiemann. Recency types for analyzing scripting languages. In Proceedings of the 24th European Conference on Object-Oriented Programming, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. H. Jensen, A. Møller, and P. Thiemann. Type analysis for JavaScript. In Proceedings of the 16th International Symposium on Static Analysis, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. S. H. Jensen, A. Møller, and P. Thiemann. Interprocedural analysis with lazy propagation. In Proceedings of the 17th International Symposium on Static Analysis, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. H. Lee, S. Won, J. Jin, J. Cho, and S. Ryu. SAFE: Formal specification and implementation of a scalable analysis framework for ECMAScript. In Proceedings of the 2012 International Workshop on Foundations of Object-Oriented Languages, 2012.Google ScholarGoogle Scholar
  21. S. Maffeis, J. C. Mitchell, and A. Taly. Isolating JavaScript with filters, rewriting, and wrappers. In 14th European Symposium on Research in Computer Security, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Maffeis, J. C. Mitchell, and A. Taly. Object capabilities and isolation of untrusted web applications. In IEEE Symposium on Security and Privacy, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Microsoft. TypeScript. http://www. typescriptlang.org.Google ScholarGoogle Scholar
  24. Mozilla.org. Firefox OS. http://www.mozilla.org/ en-US/firefox/os/.Google ScholarGoogle Scholar
  25. F. Ocariza, K. Bajaj, K. Pattabiraman, and A. Mesbah. An empirical study of client-side JavaScript bugs. In Proceedings of the 7th IEEE International Symposium on Empirical Software Engineering, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  26. J. G. Politz, S. A. Eliopoulos, A. Guha, and S. Krishnamurthi. ADsafety: type-based verification of JavaScript sandboxing. In Proceedings of the 20th USENIX conference on Security, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. SAFEWAPI: web API misuse detector for web applications

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      FSE 2014: Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering
      November 2014
      856 pages
      ISBN:9781450330565
      DOI:10.1145/2635868

      Copyright © 2014 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 11 November 2014

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate17of128submissions,13%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader