{"id":2389,"date":"2023-08-30T12:12:20","date_gmt":"2023-08-30T10:12:20","guid":{"rendered":"https:\/\/security.humanativaspa.it\/?p=2389"},"modified":"2026-05-05T12:23:49","modified_gmt":"2026-05-05T12:23:49","slug":"extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4","status":"publish","type":"post","link":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/","title":{"rendered":"Extending Burp Suite for fun and profit &#8211; The Montoya way &#8211; Part 4"},"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><strong>-&gt; Creating new tabs for processing HTTP requests and responses<\/strong><\/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><a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-7\/\">Using the Collaborator in Burp Suite plugins<\/a><\/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>Today we will see how to add components to the Burp Suite interface that are useful for conveniently managing different scenarios. In detail, we will focus on <strong>how to create new tabs for processing HTTP requests and responses.<\/strong><\/p>\n<p>But as always, let&#8217;s start with a use case and explore some ways it can be handled. We are analyzing a mobile application that adds an encryption layer to the HTTP request and response bodies. The mobile application encrypts the body using AES before sending the request and decrypts the response body in the same way, as it is encrypted by the backend application. I mention mobile applications because this scenario is more common in the mobile world, but over the years, we have also seen web applications behaving in a similar manner, encrypting and decrypting in the browser using JavaScript libraries.<\/p>\n<p>A simple Flask Python application that does this job is the following (encryption\/decryption stuff taken obviously from <a href=\"https:\/\/stackoverflow.com\/questions\/12524994\/encrypt-and-decrypt-using-pycrypto-aes-256\">StackOverflow<\/a> &#8211; necessary Python packages: <em>flask<\/em> and <em>pycryptodome<\/em>):<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">import flask\r\nfrom flask import request\r\nimport base64\r\nfrom Crypto import Random\r\nfrom Crypto.Cipher import AES\r\n\r\napp = flask.Flask(__name__)\r\n\r\n# Encryption stuff from:\r\n# https:\/\/stackoverflow.com\/questions\/12524994\/encrypt-and-decrypt-using-pycrypto-aes-256\r\n\r\nbs = AES.block_size\r\nkey = bytes.fromhex(\"eeb27c55483270a92682dab01b85fdea\")\r\niv = bytes.fromhex(\"ecbc1312cfdc2a0e1027b1eaf577dce8\")\r\n\r\ndef encrypt(raw):\r\n    raw = _pad(raw)    \r\n    cipher = AES.new(key, AES.MODE_CBC, iv)\r\n    return base64.b64encode(cipher.encrypt(raw.encode()))\r\n\r\ndef decrypt(enc):\r\n    enc = base64.b64decode(enc)\r\n    cipher = AES.new(key, AES.MODE_CBC, iv)\r\n    return _unpad(cipher.decrypt(enc)).decode('utf-8')\r\n\r\ndef _pad(s):\r\n    return s + (bs - len(s) % bs) * chr(bs - len(s) % bs)\r\n\r\ndef _unpad(s):\r\n    return s[:-ord(s[len(s)-1:])]\r\n\r\n\r\n@app.route('\/', methods=['POST'])\r\ndef handle_request():\r\n\r\n    encrypted_body = request.get_data()\r\n    decrypted_body = decrypt(encrypted_body)\r\n\r\n    response = \"Your request was: \\\"\" + decrypted_body + \"\\\"\"\r\n    encrypted_response = encrypt(response)\r\n\r\n    return encrypted_response\r\n    \r\n\r\napp.run(host=\"127.0.0.1\", port=5000, debug=True)<\/pre>\n<p>This simple application takes an input request with a body encrypted using AES\/CBC (fixed Key and IV) and encoded in Base64 (since the output of AES\/CBC is binary) and returns a similarly encrypted and encoded response that contains part of the input message. So, both request and response are encrypted and not easy to pentest without the help of a Burp Suite extension.<\/p>\n<p>Creating a mini demo mobile application seems excessive, so we will simply forge an example HTTP request directly in the Burp Suite Repeater. We will use <a href=\"https:\/\/github.com\/gchq\/CyberChef\">CyberChef<\/a> (a powerful web app for encryption, encoding, compression, data analysis) for the encryption of the body of our forged HTTP request (and for decryption of the related HTTP response). Once we have implemented our plugin, it will handle the encryption and decryption for us.<\/p>\n<p>First, let&#8217;s encrypt a test sentence, taking fixed key and IV from the backend Python code:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2395\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/1-2.png\" alt=\"\" width=\"1278\" height=\"672\" \/><\/p>\n<p>Then we send the encrypted content to the backend server with Burp Suite Repeater tool:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2397\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/3-2.png\" alt=\"\" width=\"1135\" height=\"297\" \/><\/p>\n<p>And we decrypt the obtained response again using CyberChef:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2396\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/2-2.png\" alt=\"\" width=\"1279\" height=\"653\" \/><\/p>\n<p>Well, our backend Python code works correctly.<\/p>\n<p>Now that we have a working use case, let&#8217;s think about how to approach the problem. Our goal is to be able to analyze the application conveniently, without having to manually encrypt the request after entering each payload and decrypting the response to determine if the attack was successful.<\/p>\n<p>One approach could be to implement an <strong>HttpHandler<\/strong> plugin (see <a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-2\/\">part 2<\/a> of <a href=\"https:\/\/hnsecurity.it\/tag\/extending-burp-suite\/\">the series<\/a> for further details) to transparently decrypt the requests sent by the application upon entering Burp Suite and automatically re-encrypt them on the way out. This way, the traffic we see in Burp Suite will appear as if the encryption layer is not even present. This approach has the advantage that we can also seamlessly use Burp Suite Scanner. The scanner will see the requests in their decrypted form and can apply its payloads. Similarly, it will see the responses in their decrypted form and can analyze them to determine if the attack was successful.<\/p>\n<p>Personally, I usually use a plugin of this type only for the Scanner and Intruder, but not for the Proxy and Repeater. The reason is that I want to keep the original traffic in Burp Suite&#8217;s history, rather than the traffic already processed by the plugin, in order to have a &#8220;clean&#8221; record. This can be helpful for later reference and analysis purposes.<\/p>\n<p>Now let&#8217;s explore two alternative approaches that we can use in these cases: using a plugin of type <strong>HttpRequestEditor<\/strong>\/<strong>HttpResponseEditor<\/strong> (which is what I usually use) and a plugin of type <strong>ContextMenuItem<\/strong> (a bit less convenient, but useful in situations where there is a lot of variability in the request and\/or response format). Both plugins can be registered from the <em><a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/ui\/UserInterface.html\">UserInterface<\/a><\/em> object that we can get from the usual <a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/MontoyaApi.html\"><em>MontoyaApi<\/em><\/a> (the object supplied as argument to the <em>initialize<\/em> function of the plugin).<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2403\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/4-1-2.png\" alt=\"\" width=\"1248\" height=\"891\" \/><\/p>\n<p>In this article we will see how to implement a plugin of type <strong>HttpRequestEditor<\/strong>\/<strong>HttpResponseEditor<\/strong>. We will cover the <strong>ContextMenuItem<\/strong> in the next article of the series.<strong>\u00a0<\/strong>With a plugin of this type, we can add a tab to the section of the Burp Suite interface that displays requests and responses. Once clicked, our tab will decrypt the HTTP request and show the decrypted version (same for responses). If we are in a tool that allows request modification (e.g., Repeater or Intercept), we can also modify the decrypted content, and our plugin will automatically re-encrypt it before sending the request to the backend (same for responses but in the opposite direction). This way, we will keep the original traffic while being able to work comfortably as if the encryption layer was not there. The <em>HttpRequestEditor<\/em>\/<em>HttpResponseEditor<\/em> plugin looks as follows in Burp Suite:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2405\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/5-2.png\" alt=\"\" width=\"1134\" height=\"293\" \/><\/p>\n<p>As usual, we start from the Hello World plugin skeleton we wrote in the <a href=\"https:\/\/hnsecurity.it\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-1\">part 1<\/a> of <a href=\"https:\/\/hnsecurity.it\/tag\/extending-burp-suite\/\">the series<\/a>.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">package org.fd.montoyatutorial;\r\n\r\nimport burp.api.montoya.BurpExtension;\r\nimport burp.api.montoya.MontoyaApi;\r\nimport burp.api.montoya.logging.Logging;\r\n\r\npublic class HttpRequestResponseEditorExample implements BurpExtension {\r\n\r\n    MontoyaApi api;\r\n    Logging logging;\r\n\r\n    @Override\r\n    public void initialize(MontoyaApi api) {\r\n\r\n        \/\/ Save a reference to the MontoyaApi object\r\n        this.api = api;\r\n\r\n        \/\/ api.logging() returns an object that we can use to print messages to stdout and stderr\r\n        this.logging = api.logging();\r\n\r\n        \/\/ Set the name of the extension\r\n        api.extension().setName(\"Montoya API tutorial - HttpRequestResponseEditorExample\");\r\n\r\n        \/\/ Print a message to the stdout\r\n        this.logging.logToOutput(\"*** Montoya API tutorial - HttpRequestResponseEditorExample loaded ***\");\r\n\r\n        \/\/ TODO - Register our listeners\r\n\r\n    }\r\n}<\/pre>\n<p>Here, our extension should register two different listeners, one for requests and one for responses, as we can see in the documentation:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2407\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/6-2.png\" alt=\"\" width=\"1221\" height=\"129\" \/><\/p>\n<p>As in most Burp Suite extension, each listener requires a different object that implements a specific interface supplied as argument:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2409\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/7-2.png\" alt=\"\" width=\"1258\" height=\"343\" \/><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2411\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/8-1-1.png\" alt=\"\" width=\"1255\" height=\"348\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/8-1-1.png 1255w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/8-1-1-300x83.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/8-1-1-1024x284.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/8-1-1-768x213.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/8-1-1-350x97.png 350w\" sizes=\"(max-width: 1255px) 100vw, 1255px\" \/><\/p>\n<p>Since the two interfaces are very simple and require only one method each we will use a single Java class that implements both interfaces. However, if you prefer, you can use two separate classes, each implementing one of the interfaces.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">package org.fd.montoyatutorial;\r\n\r\nimport burp.api.montoya.MontoyaApi;\r\nimport burp.api.montoya.ui.editor.extension.*;\r\n\r\npublic class CustomHttpRequestResponseEditor implements HttpRequestEditorProvider, HttpResponseEditorProvider {\r\n\r\n    MontoyaApi api;\r\n\r\n    public CustomHttpRequestResponseEditor(MontoyaApi api) {\r\n        this.api = api;\r\n    }\r\n\r\n    @Override\r\n    public ExtensionProvidedHttpRequestEditor provideHttpRequestEditor(EditorCreationContext creationContext) {\r\n        \/\/ TODO\r\n    }\r\n\r\n    @Override\r\n    public ExtensionProvidedHttpResponseEditor provideHttpResponseEditor(EditorCreationContext creationContext) {\r\n        \/\/ TODO\r\n    }\r\n}<\/pre>\n<p>The two functions should return an object of type <em>ExtensionProvidedHttpRequestEditor<\/em> and an object of type <em>ExtensionProvidedHttpResponseEditor<\/em>, respectively. As we can guess from the name of the interfaces, these functions should create and return a new graphical tab for HTTP requests and for HTTP responses, respectively. Fortunately for us all, unless you have specific requirements, the Burp Suite APIs provide methods to create graphical tabs without the need to deal with Java&#8217;s graphic libraries (and that&#8217;s a goooood thing :D). All we need to do is to create those graphical tabs using a specific API of Burp Suite and implement our encryption\/decryption logic in there.<\/p>\n<p>Let&#8217;s return to the <em>provideHttpRequestEditor<\/em> and <em>provideHttpResponseEditor<\/em> functions we have to implement. These two methods have the same argument, an object of type <em>EditorCreationContext, <\/em>which contains information on the context of the current request\/response (which Burp Suite tool generated the request\/response and if it is editable or not)<em>:<\/em><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2414\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/10-1.png\" alt=\"\" width=\"1238\" height=\"420\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/10-1.png 1238w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/10-1-300x102.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/10-1-1024x347.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/10-1-768x261.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/10-1-350x119.png 350w\" sizes=\"(max-width: 1238px) 100vw, 1238px\" \/><\/p>\n<p>Let&#8217;s have a look of how we can create this <em>ExtensionProvidedHttpRequestEditor <\/em>object (we will see in detail the process only for requests because it is exactly the same for responses; the plugin example on the <a href=\"https:\/\/github.com\/federicodotta\/Burp-Suite-Extender-Montoya-Course\">GitHub repository<\/a> will have also the code to handle responses).<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2412\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/9-1.png\" alt=\"\" width=\"1231\" height=\"657\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/9-1.png 1231w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/9-1-300x160.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/9-1-1024x547.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/9-1-768x410.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/9-1-350x187.png 350w\" sizes=\"(max-width: 1231px) 100vw, 1231px\" \/><\/p>\n<p>We have to create a class that implements this interface, defining all the following functions:<\/p>\n<ul>\n<li><em><strong>caption<\/strong><\/em>: this method should return the name of our custom tab (in this example &#8220;Decrypted&#8221;).<\/li>\n<li><strong><em>isEnabledFor<\/em><\/strong>: this method will return true or false depending on whether we want the current request to have our custom tab or not. We can use the current request and the current context for the choice (this way we can build plugins that add graphical tab only for specific requests).<\/li>\n<li><strong>uiComponent<\/strong>: this method will return the actual UI component of our tab. As I said, we don&#8217;t have to write Java Swing code because Burp Suite has a couple of methods we can use to generate tabs.<\/li>\n<li><strong>setRequestResponse<\/strong>: in this method we will create the content of our new tab (in our example, we will decrypt the body of the request and put the decrypted version in the tab).<\/li>\n<li><strong>isModified<\/strong>: this method will return true or false depending on whether the user has made any modifications in our custom tab.<\/li>\n<li><strong>getRequest<\/strong>: this method will be called when the user exits from our custom tab and returns to Burp Suite default tabs or when the request is sent. If the content of our custom tab has been modified by the user, in this method we have to take the edited content, encrypt it and build the request with the updated encrypted body.<\/li>\n<li><strong>selectedData<\/strong>: this method should return the data actually selected by the user in our custom tab (if any). As we will see, the tab generated using Burp Suite APIs already has methods that will take care of this although our current extension does not need to let the user select a portion of the request.<\/li>\n<\/ul>\n<p>Let&#8217;s start with the skeleton of the class with the code of straightforward methods and then we will implement the <em>setRequestResponse<\/em> and the <em>getRequest<\/em>, that contain the encryption\/decryption logic of our plugin.<\/p>\n<p>First we will code the <strong>constructor<\/strong>:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">public class CustomHttpRequestEditorTab implements ExtensionProvidedHttpRequestEditor {\r\n\r\n    static String keyHex = \"eeb27c55483270a92682dab01b85fdea\";\r\n    static String ivHex = \"ecbc1312cfdc2a0e1027b1eaf577dce8\";\r\n\r\n    MontoyaApi api;\r\n    Logging logging;\r\n    EditorCreationContext creationContext;\r\n    RawEditor requestEditorTab;\r\n    Base64Utils base64Utils;\r\n\r\n    public CustomHttpRequestEditorTab(MontoyaApi api, EditorCreationContext creationContext) {\r\n\r\n        \/\/ Save argument of constructor in object\r\n        this.api = api;\r\n        this.creationContext = creationContext;\r\n\r\n        \/\/ Save references to object that we will use\r\n        this.logging = api.logging();\r\n        this.base64Utils = api.utilities().base64Utils();\r\n\r\n        \/\/ Initialize our editor tab (Type RawEditor) in read only mode if the request is read only,\r\n        \/\/ read\/write otherwise\r\n        if (creationContext.editorMode() == EditorMode.READ_ONLY) {\r\n            requestEditorTab = api.userInterface().createRawEditor(EditorOptions.READ_ONLY);\r\n        } else {\r\n            requestEditorTab = api.userInterface().createRawEditor();\r\n        }\r\n    }\r\n\r\n    [...]<\/pre>\n<p>To our constructor we will pass the usual <em>MontoyaApi<\/em> object (necessary for every task) and the context we just see (in order to let our plugin take decisions based on the tool in which the tab is created and if the tab should be editable or not). Then we save references to some object we will use in our plugin offered by Burp Suite Montoya APIs (a logging object and Base64 encoding\/decoding utilities). Finally we have the graphical object of our tab. As I said before, Burp Suite provides some API functions that can be used to generate tabs of different types in the <a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/ui\/UserInterface.html\"><em>UserInterface<\/em><\/a> object, one for raw text (that we will use in our plugin), one for HTTP requests (that we will not use because our custom tab will not contain an entire HTTP request but only the decrypted body), one for HTTP responses, and one for WebSockets:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2416\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/11-1.png\" alt=\"\" width=\"1235\" height=\"609\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/11-1.png 1235w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/11-1-300x148.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/11-1-1024x505.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/11-1-768x379.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/11-1-350x173.png 350w\" sizes=\"(max-width: 1235px) 100vw, 1235px\" \/><\/p>\n<p>In our constructor we created a <em><a href=\"https:\/\/portswigger.github.io\/burp-extensions-montoya-api\/javadoc\/burp\/api\/montoya\/ui\/editor\/RawEditor.html\">RawEditor<\/a> <\/em>object<em>, <\/em>that offers a graphical tab that should be used for raw text. This editor can be created as read-only or as read-write: we used the context object to generate the right type of editor, basing on the location of the current request our plugin is processing (e.g., read only for the History, read\/write for the Repeater or Intercept, etc.). The <em>RawEditor<\/em> object offers many functionalities that we will use later in our plugin:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2417\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/12-1.png\" alt=\"\" width=\"1261\" height=\"650\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/12-1.png 1261w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/12-1-300x155.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/12-1-1024x528.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/12-1-768x396.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/12-1-350x180.png 350w\" sizes=\"(max-width: 1261px) 100vw, 1261px\" \/><\/p>\n<p>Now let&#8217;s return to the implementation of our <em>CustomHttpRequestEditorTab <\/em>object:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">[...]\r\n\r\n@Override\r\npublic boolean isEnabledFor(HttpRequestResponse requestResponse) {\r\n\r\n    \/\/ Our tab is always enabled. In this method you can choose if you want to enable\r\n    \/\/ the custom tab, basing on the value of the request, the context, etc.\r\n    return true;\r\n\r\n}\r\n\r\n@Override\r\npublic String caption() {\r\n\r\n    \/\/ The name of the tab\r\n    return \"Decrypted\";\r\n\r\n}\r\n\r\n@Override\r\npublic Component uiComponent() {\r\n\r\n    \/\/ Get the UI component of the tab (returned by the RawEditor object we use)\r\n    return requestEditorTab.uiComponent();\r\n\r\n}\r\n\r\n@Override\r\npublic Selection selectedData() {\r\n\r\n    \/\/ This method should return selected data in tab, if any. We can use method offered\r\n    \/\/ by the RawEditor object to check if any data is selected and, if so, return this data\r\n    if(requestEditorTab.selection().isPresent()) {\r\n        return requestEditorTab.selection().get();\r\n    } else {\r\n        return null;\r\n    }\r\n\r\n}\r\n\r\n@Override\r\npublic boolean isModified() {\r\n\r\n    \/\/ This method should return true if the data inside our custom tab has been modified by\r\n    \/\/ the user. The RawEditor tab has a method with the same name that return this information\r\n    return requestEditorTab.isModified();\r\n\r\n}\r\n\r\n[...]<\/pre>\n<p>The implementation of the <em>isEnabledFor<\/em>, <em>caption<\/em>, <em>uiComponent<\/em>, <em>selectedData<\/em> and <em>isModified<\/em> is quite simple because they use functions offered by our <em>RawEditor, <\/em>that already implemented all the logic of these functions.<\/p>\n<p>Now we will implements the body of the <em>setRequestResponse <\/em>function, that will decrypt our encrypted content and put the result in our tab.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">static String keyHex = \"eeb27c55483270a92682dab01b85fdea\";\r\nstatic String ivHex = \"ecbc1312cfdc2a0e1027b1eaf577dce8\";\r\n\r\nHttpRequestResponse currentRequestResponse;\r\n[...]\r\n\r\n@Override\r\npublic void setRequestResponse(HttpRequestResponse requestResponse) {\r\n\r\n    \/\/ Extract the request and its body\r\n    HttpRequest request = requestResponse.request();\r\n    ByteArray body = request.body();\r\n\r\n    \/\/ Base64 decode\r\n    ByteArray decodedBody = this.base64Utils.decode(body);\r\n\r\n    \/\/ Save current requestResponse (we will need this object to build a new request\r\n    \/\/ if the decrypted content will be modified)\r\n    this.currentRequestResponse = requestResponse;\r\n    try {\r\n\r\n        \/\/ Create a specific object containing the IV for encryption\r\n        byte[] iv = HexFormat.of().parseHex(this.ivHex);\r\n        IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\r\n\r\n        \/\/ Create a specific object containing the key for encryption\r\n        byte[] key = HexFormat.of().parseHex(this.keyHex);\r\n        SecretKey SecKey = new SecretKeySpec(key, 0, key.length, \"AES\");\r\n\r\n        \/\/ Initialize our AES cipher in DECRYPT mode\r\n        Cipher aesCipher= Cipher.getInstance(\"AES\/CBC\/PKCS5Padding\");\r\n        aesCipher.init(Cipher.DECRYPT_MODE, SecKey, ivParameterSpec);\r\n\r\n        \/\/ Decrypt the body\r\n        byte[] decryptedBody = aesCipher.doFinal(decodedBody.getBytes());\r\n\r\n        \/\/ Set the decrypted value in our custom tab\r\n        this.requestEditorTab.setContents(byteArray(decryptedBody));\r\n\r\n    } catch (Exception e) {\r\n\r\n        \/\/ Log exceptions (if any)\r\n        this.logging.logToError(e);\r\n\r\n    }\r\n\r\n}\r\n\r\n[...]<\/pre>\n<p>The method simply extracts the body of the request, Base64 decodes it and then decrypts it using the key and IV we chose in our backend code. Finally it puts the result in the tab using the <em>setContents\u00a0<\/em>function of the <em>RawEditor<\/em> object. A reference to the <em>HttpRequestResponse <\/em>object is saved in an instance variable because we will need this object later to recreate our request if the user modifies the decrypted content (for example in the Repeater to add some sort of attack payload).<\/p>\n<p>Now we just need one last method, <em>getRequest<\/em>, which will be responsible for recreating the HTTP request with the encrypted body in case it is modified by the user in its decrypted form within our custom tab.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">[...]\r\n\r\n@Override\r\npublic HttpRequest getRequest() {\r\n\r\n    if(isModified()) {\r\n\r\n        ByteArray newBody = requestEditorTab.getContents();\r\n\r\n        try {\r\n\r\n            \/\/ Create a specific object containing the IV for encryption\r\n            byte[] iv = HexFormat.of().parseHex(this.ivHex);\r\n            IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);\r\n\r\n            \/\/ Create a specific object containing the key for encryption\r\n            byte[] key = HexFormat.of().parseHex(this.keyHex);\r\n            SecretKey SecKey = new SecretKeySpec(key, 0, key.length, \"AES\");\r\n\r\n            \/\/ Initialize our AER cipher in DECRYPT mode\r\n            Cipher aesCipher = Cipher.getInstance(\"AES\/CBC\/PKCS5Padding\");\r\n            aesCipher.init(Cipher.ENCRYPT_MODE, SecKey, ivParameterSpec);\r\n\r\n            \/\/ Decrypt the body\r\n            byte[] encryptedBody = aesCipher.doFinal(newBody.getBytes());\r\n\r\n            \/\/ Encode the encrypted value in Base64\r\n            ByteArray encodedBody = this.base64Utils.encode(ByteArray.byteArray(encryptedBody));\r\n\r\n            \/\/ Extract the request from the HttpRequestResponse we save in the setRequestResponse\r\n            HttpRequest oldRequest = this.currentRequestResponse.request();\r\n\r\n            \/\/ Replace its body with the new encrypted and encoded body and return the modified request\r\n            HttpRequest newRequest = oldRequest.withBody(encodedBody);\r\n            return newRequest;\r\n\r\n        } catch (Exception e) {\r\n\r\n            \/\/ Log exceptions (if any)\r\n            this.logging.logToError(e);\r\n\r\n            \/\/ Return original request\r\n            return this.currentRequestResponse.request();\r\n\r\n        }\r\n\r\n    } else {\r\n\r\n        \/\/ Return original request if decrypted body was not modified\r\n        return this.currentRequestResponse.request();\r\n\r\n    }\r\n\r\n}\r\n\r\n[...]<\/pre>\n<p>This code is quite similar to the previous one, but it encrypts and Base64 encodes the modified content (retrieved using the <em>getContents<\/em> function of the <em>RawEditor<\/em> object), instead of decoding and decrypting it. After encryption and encoding the new body is replaced in the <em>HttpRequestResponse<\/em> object we saved in the <em>setRequestResponse<\/em> function.<\/p>\n<p>The implementation of the <em>CustomHttpResponseEditorTab, <\/em>that will handle the responses, is almost identical. For this reason I will not paste the code here but you can find it in the <a href=\"https:\/\/github.com\/federicodotta\/Burp-Suite-Extender-Montoya-Course\">GitHub repository for this series<\/a>. The only difference in the implementation is that it extract the response from the <em>HttpRequestResponse <\/em>argument instead of the request. In the example on the GitHub repository I copied and pasted the code used to handle requests in the function that handles responses to keep the example as clear as possible, but obviously it&#8217;s better to avoid having such repetitive code if possible.<\/p>\n<p>Before building our plugin we only need to add references to the objects we just coded in the first two classes we created, the editor class (<em>CustomHttpRequestResponseEditor<\/em>) and the plugin main class (<em>HttpRequestResponseEditorExample<\/em>).<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"java\">public class CustomHttpRequestResponseEditor implements HttpRequestEditorProvider, HttpResponseEditorProvider {\r\n\r\n    MontoyaApi api;\r\n\r\n    public CustomHttpRequestResponseEditor(MontoyaApi api) {\r\n        this.api = api;\r\n    }\r\n\r\n    @Override\r\n    public ExtensionProvidedHttpRequestEditor provideHttpRequestEditor(EditorCreationContext creationContext) {\r\n        return new CustomHttpRequestEditorTab(api, creationContext);\r\n    }\r\n\r\n    @Override\r\n    public ExtensionProvidedHttpResponseEditor provideHttpResponseEditor(EditorCreationContext creationContext) {\r\n        return new CustomHttpResponseEditorTab(api, creationContext);\r\n    }\r\n}<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">public class HttpRequestResponseEditorExample implements BurpExtension {\r\n   \r\n    [...]\r\n\r\n    @Override\r\n    public void initialize(MontoyaApi api) {\r\n\r\n        [...]\r\n\r\n        \/\/ Register our CustomHttpRequestResponseEditor for both requests and responses\r\n        \/\/ Note: we used a single class for both requests and responses (that implements both\r\n        \/\/ HttpRequestEditorProvider and HttpResponseEditorProvider interfaces but we can also use\r\n        \/\/ two different classes, one for requests and one for responses).\r\n        CustomHttpRequestResponseEditor customHttpRequestResponseEditor = new CustomHttpRequestResponseEditor(api);\r\n        api.userInterface().registerHttpRequestEditorProvider(customHttpRequestResponseEditor);\r\n        api.userInterface().registerHttpResponseEditorProvider(customHttpRequestResponseEditor);\r\n\r\n    }\r\n}<\/pre>\n<p>And voil\u00e0! Let&#8217;s build and try our extension.<\/p>\n<p>If we click on the &#8220;Decrypted&#8221; tab in both requests and responses we get the decrypted body:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2426\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/13-1.png\" alt=\"\" width=\"1137\" height=\"240\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/13-1.png 1137w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/13-1-300x63.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/13-1-1024x216.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/13-1-768x162.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/13-1-350x74.png 350w\" sizes=\"(max-width: 1137px) 100vw, 1137px\" \/><\/p>\n<p>We can now change the decrypted value and click &#8220;Send&#8221; (or return to the Raw tab) to have our extension encrypt the new body for us!<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2427\" src=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/14-1.png\" alt=\"\" width=\"1140\" height=\"216\" srcset=\"https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/14-1.png 1140w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/14-1-300x57.png 300w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/14-1-1024x194.png 1024w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/14-1-768x146.png 768w, https:\/\/hnsecurity.it\/wp-content\/uploads\/2023\/06\/14-1-350x66.png 350w\" sizes=\"(max-width: 1140px) 100vw, 1140px\" \/><\/p>\n<p>This way our powerful extension will let us test easily without losing the original requests and responses in the proxy history. As I said, we can make use of this plugin for manual testing while using a plugin of type <strong>HttpListener<\/strong> to handle Scanner and Intruder!<\/p>\n<p>In the next chapter we will see a different way to handle the same scenario using a <strong>ContextMenuItem<\/strong> plugin!<\/p>\n<p>As always, the complete code of the backend and of the plugin can be downloaded from <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 -&gt; [&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":[88,91],"tags":[104,115,185,186,187,188,189],"class_list":["post-2389","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tools","category-articles","tag-burp-suite","tag-web","tag-extender","tag-extender-course","tag-extending-burp-suite","tag-montoya-api","tag-tutorial"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 4 -<\/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-4\/\" \/>\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 4 -\" \/>\n<meta property=\"og:description\" content=\"Setting up the environment + Hello World Inspecting and tampering HTTP requests and responses Inspecting and tampering WebSocket messages -&gt; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/\" \/>\n<meta property=\"og:site_name\" content=\"HN Security\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-30T10:12:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-05T12:23:49+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=\"13 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-4\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\\\/\"},\"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 4\",\"datePublished\":\"2023-08-30T10:12:20+00:00\",\"dateModified\":\"2026-05-05T12:23:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\\\/\"},\"wordCount\":2279,\"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-4\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hnsecurity.it\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/BURP.jpg\",\"keywords\":[\"Burp Suite\",\"web\",\"Extender\",\"Extender course\",\"Extending Burp Suite\",\"Montoya API\",\"Tutorial\"],\"articleSection\":[\"Tools\",\"Articles\"],\"inLanguage\":\"it-IT\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\\\/\",\"url\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\\\/\",\"name\":\"HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 4 -\",\"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-4\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/hnsecurity.it\\\/wp-content\\\/uploads\\\/2025\\\/09\\\/BURP.jpg\",\"datePublished\":\"2023-08-30T10:12:20+00:00\",\"dateModified\":\"2026-05-05T12:23:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\\\/#breadcrumb\"},\"inLanguage\":\"it-IT\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"it-IT\",\"@id\":\"https:\\\/\\\/hnsecurity.it\\\/it\\\/blog\\\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\\\/#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-4\\\/#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 4\"}]},{\"@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 4 -","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-4\/","og_locale":"it_IT","og_type":"article","og_title":"HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 4 -","og_description":"Setting up the environment + Hello World Inspecting and tampering HTTP requests and responses Inspecting and tampering WebSocket messages -&gt; [&hellip;]","og_url":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/","og_site_name":"HN Security","article_published_time":"2023-08-30T10:12:20+00:00","article_modified_time":"2026-05-05T12:23:49+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":"13 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-4\/#article","isPartOf":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/"},"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 4","datePublished":"2023-08-30T10:12:20+00:00","dateModified":"2026-05-05T12:23:49+00:00","mainEntityOfPage":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/"},"wordCount":2279,"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-4\/#primaryimage"},"thumbnailUrl":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2025\/09\/BURP.jpg","keywords":["Burp Suite","web","Extender","Extender course","Extending Burp Suite","Montoya API","Tutorial"],"articleSection":["Tools","Articles"],"inLanguage":"it-IT"},{"@type":"WebPage","@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/","url":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/","name":"HN Security - Extending Burp Suite for fun and profit - The Montoya way - Part 4 -","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-4\/#primaryimage"},"image":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/#primaryimage"},"thumbnailUrl":"https:\/\/hnsecurity.it\/wp-content\/uploads\/2025\/09\/BURP.jpg","datePublished":"2023-08-30T10:12:20+00:00","dateModified":"2026-05-05T12:23:49+00:00","breadcrumb":{"@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/#breadcrumb"},"inLanguage":"it-IT","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/"]}]},{"@type":"ImageObject","inLanguage":"it-IT","@id":"https:\/\/hnsecurity.it\/it\/blog\/extending-burp-suite-for-fun-and-profit-the-montoya-way-part-4\/#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-4\/#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 4"}]},{"@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\/2389","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=2389"}],"version-history":[{"count":4,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/posts\/2389\/revisions"}],"predecessor-version":[{"id":161505,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/posts\/2389\/revisions\/161505"}],"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=2389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/categories?post=2389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hnsecurity.it\/it\/wp-json\/wp\/v2\/tags?post=2389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}