Advanced use cases ================== Complex Web applications ------------------------ Some Web applications use browser-side technologies such as JavaScript, Flash and Java applets, technologies that the browsers understand; and ``w4af`` is still unable to. A plugin called ``spider_man`` was created to solve this issue, allowing users to analyze complex Web applications. The plugin starts an HTTP proxy which is used by the user to navigate the target site, during this process the plugin will extract information from the requests and send them to the enabled ``audit`` plugins. .. note:: The ``spider_man`` plugin can be used when Javascript, Flash, Java applets or any other browser side technology is present. The only requirement is for the user to manually browse the site using ``spider_man`` as HTTP(s) proxy. .. note:: See :doc:`ca-config` for details about how to configure ``w4af``'s certificate authority (CA) in your browser. A simple example will clarify things, let's suppose that ``w4af`` is auditing a site and can't find any links on the main page. After a closer inspection of the results by the user, it is clear that the main page has a Java applet menu where all the other sections are linked from. The user runs ``w4af`` once again and now activates the ``crawl.spider_man`` plugin, navigates the site manually using the browser and the spiderman proxy. When the user has finished his browsing, w4af will continue with all the hard auditing work. This is a sample ``spider_man`` plugin run: .. code-block:: none w4af>>> plugins w4af/plugins>>> crawl spider_man w4af/plugins>>> audit sqli w4af/plugins>>> back w4af>>> target w4af/target>>> set target http://localhost/ w4af/target>>> back w4af>>> start spider_man proxy is running on 127.0.0.1:44444 . Please configure your browser to use these proxy settings and navigate the target site. To exit spider_man plugin please navigate to http://127.7.7.7/spider_man?terminate . Now the user configures his browser to use the ``127.0.0.1:44444`` address as HTTP proxy and navigates the target site, when he finishes navigating the site sections he wants to audit he navigates to ``http://127.7.7.7/spider_man?terminate`` which will stop the proxy and finish the plugin. The ``audit.sqli`` plugin will run over the identified HTTP requests. Ignoring specific forms ----------------------- ``w4af`` allows users to configure which forms to ignore using a feature called form ID exclusions. This feature was created when users identified limitations in the previous (more simplistic) exclusion model which only allowed forms to be ignored using URL matching. Exclusions are configured using a list of form IDs provided in the following format: .. code-block:: json [{"action":"/products/.*", "inputs": ["comment"], "attributes": {"class": "comments-form"}, "hosted_at_url": "/products/.*", "method": "get"}] Where: * ``action`` is a regular expression matching the URL path of the form action, * ``inputs`` is a list containing the form inputs, * ``attributes`` is a map containing the ``