RhinoSecurityLabs / IPRotate_Burp_Extension

Extension for Burp Suite which uses AWS API Gateway to rotate your IP on every request.
814 stars 144 forks source link

Not a Issue But More of an Feature Request to Allow Wildcard Subdomain #64

Open BitThr3at opened 3 months ago

BitThr3at commented 3 months ago

First of all thanks mate for developing and maintaining such a good extension, i want to know it is possible to allow rotating traffic for *.example.com ?

i tried doing it in following way but failed and since you have better idea of the code and also as it is written in python2 i thought it would right to get advice from you.

  1. create a subdomain variable with default value "www"

            self.deploy_response = self.awsclient.create_deployment(
                restApiId=self.restAPIId,
                stageName=STAGE_NAME,
                variables={
                    'subdomain': 'www'  
                }
    
            )
  2. use the variable in integration
            self.awsclient.put_integration(
                restApiId=self.create_api_response['id'],
                resourceId=get_resource_response['items'][0]['id'],
                type='HTTP_PROXY',
                httpMethod='ANY',
                integrationHttpMethod='ANY',
                uri=self.getTargetProtocol()+'://${stageVariables.subdomain}'+ '/',
                connectionType='INTERNET',
                requestParameters={
                    'integration.request.path.proxy':'method.request.path.proxy',
                                        'integration.request.header.X-Forwarded-For': 'method.request.header.X-My-X-Forwarded-For'
                }
            )
  3. Map the request header value containing subdomain to subdomain variable
            self.awsclient.update_stage(
                restApiId=self.restAPIId,
                stageName=STAGE_NAME,
                patchOperations=[
                    {
                        'op': 'replace',
                        'path': '/variables/subdomain',
                        'value': "$input.params('X-My-X-Forwarded-For')"  
                    }
                ]
            )