Monday, March 23, 2009

Exposing Flash Application Vulnerabilities with SWFScan

Via The HP Security Laboratory Blog -

After months of hard work and late caffeine-fueled nights, HP’s Web Security Research Group is proud to release HP SWFScan.

HP SWFScan is a free security tool to help developers find and fix security vulnerabilities in applications developed with the Adobe Flash Platform. The tool is the first of its kind to decompile applications developed with the Flash platform and perform static analysis to understand their behaviors. This helps developers without security backgrounds identify vulnerabilities hidden within the application which cannot be detected with dynamic analysis methods.

Simply, point HP SWFScan at the SWF file for any Flash application and it will:

  • Decompile the ActionScript 2 or ActionScript 3 bytecode back to the original source code.
  • Audit the code for over 60 vulnerabilities including exposure of confidential data, Cross-Site Scripting (XSS) and cross-domain privilege escalation.
  • Validate the Flash application adherence with Adobe's security best practices.

HP SWFScan is not the first free Flash tool. Excellent decompilers such as Flare or OWASP’s SWFIntruder security tool have existed for a few years now. Unfortunately, the capabilities of free tools have not kept up with new Flash innovations such as the introduction of Flash 9 and 10, ActionScript 3, and Adobe’s Flex framework. HP’s SWFScan is the first and only free tool to decompile both ActionScript 2 and ActionScript 3 and analyze them for security vulnerabilities.

In addition, HP SWFScan offers several other features to help developers, code auditor/reviewers, and pen-testers examine the contents of Flash applications, including:

  • Highlighting the line of source code that contains the vulnerability to help better understand the context of the issue.
  • Providing summaries, details and remediation advice for each vulnerability in accordance with Adobe’s recommendation for secure Flash development.
  • Generating a vulnerability report to share and solve the detected issues.
  • Exporting the decompiled source code for use with other external tools.
  • Revealing all the URLs and web services the Flash Application contacts.
  • Flagging class names, function names, or variable names that may be of interest such as loadedUserXml or crypt()

While developing HP SWFScan, we downloaded and audited over 4000 Flash applications. We encountered numerous insecure applications and collected some interesting statistics:

  • Of 250 Flash applications we tested that had a login form 15% had user names or passwords hard-coded inside the application code.
  • 16% of SWF applications targeting Flash Player 8 and earlier contained XSS vulnerabilities.
  • 35% of all SWF applications violated Adobe's security best practices.
  • 77% of SWF applications targeting Flash Player 9 and 10 contained developer debugging information and source code file references.

(You can learn more about how we got these figures in our SWFScan FAQ)

A few things to note: HP SWFScan only looks at the portion a Flash applications that runs inside the browser. This is the SWF file that contains the Flash code Adobe's Flash player executes. It does not look at the components that run on the server. To conduct a complete security assessment of your applications, HP provides a suite of software and services for testing applications throughout the application lifecycle.

No comments:

Post a Comment