Hack Tools

Tracy – Web Application Penetration Testing Tool

Tracy is a pentesting tool designed to assist with finding all sinks and sources of a web application and display these results in a digestible manner.

tracy should be used during the mapping-the-application phase of the pentest to identify sources of input and their corresponding outputs. tracy can use this data to intelligently find vulnerable instances of XSS, especially with web applications that use lots of JavaScript.

tracy is a browser extension and light-weight HTTP proxy that records all user input to a web application and monitors any time those inputs are output, for example in a DOM write, server response, or call to eval.

There are many different ways to trigger XSS, especially considering the large number of frontend frameworks that have been made popular in the last few years. For example, some of the less traditional ways of exploiting XSS can be through:

  • DOM clobbering
  • DOM injection
  • Frontend template injection
  • Backend template injection
  • Open redirects

These attack vectors are significantly different than traditional stored and reflected XSS cases and they require new tools for finding them effectively.

Many related tools only look for server response reflection, however this is not very helpful if all output encoding is performed by the frontend. In order to really gain knowledge about all the true sinks of the application, we need a tool that grants us “X-ray vision into the DOM”.

tracy was written with the goal of eliminating XSS by assisting a penetration tester in identifying every source of input into an application and following that input to all of its sinks. These cases are documented and stored as references that can be used to identify the locations of potentially risky input.

 

Sinks vs Sources

As tracy develops, these lists might grow to include other types of inputs and ouptuts. But for now, when we say sources, we are talking about:

  • Form fields
  • Query parameters
  • Post body parameters
  • Header values

and when we say sinks, we are talking about:

  • Server responses
  • DOM writes
  • Instances of eval
  • Instances of setTimeout
  • Instances of setInterval

 

How it works

While browsing a web application, a user flags particular input they would like to be traced. The extension marks this input with a reference and documents any time this reference is seen in a server response, written to the DOM, or used in one of the other dangerous method mentioned above.

The extension makes use of a light-weight proxy to monitor server responses and MutationObserver to monitor DOM writes. Additionally, the extension proxies a few functions that are considered dangerous and checks to see if these functions are executing arguments that contain one of the collected references.

 

What it is not

  • It is not a web application scanner or automated tool. It requires human interaction and guidance about what the sources of input are.
  • It is not an AI XSS finder.
  • It is not a static analyzer.

 

To Top

Pin It on Pinterest

Share This