Burpsuite - Extension: Bulk Requests

Site Map Fetcher, This extension fetches the responses of unrequested items in the site map. When browsing a target, Burp adds to the site map any items that are inferred from actual responses. Some of these items may never get requested, and will show up as gray in the site map. This extension takes care of those by requesting each of them and adding its response to the site map. No more gray nodes in Burp’s site map!

Site Map Fetcher

Site Map Fetcher vs Bulk Requests

Get Empty Reponse

Bulk Requests

Bulk Requests

from burp import IBurpExtender
from burp import IContextMenuFactory

from javax.swing import JMenuItem
from java.util import List, ArrayList
from java.net import URL

import threading


class BurpExtender(IBurpExtender, IContextMenuFactory):
    """This is a burp extension that will get the responses of empty requests
       in Burp's Sitemap. When spidering a host, it happens that some requests
       are queued but never get actually requested by the spider. These usually
       show up as grey nodes in the sitemap. This extension takes care of those
       by requesting each of them and adding its response to the sitemap.
       No more gray nodes in Burp's sitemap!
    """
    def registerExtenderCallbacks(self, callbacks):
        self.callbacks = callbacks
        self.helpers = callbacks.getHelpers()
        self.callbacks.setExtensionName("SiteMap Bulk Requests")
        self.callbacks.registerContextMenuFactory(self)
        return

    def createMenuItems(self, IContextMenuInvocation):
        self.selectedRequest = IContextMenuInvocation.getSelectedMessages()
        menulist = ArrayList()
        menulist.add(JMenuItem("Bulk Requests", actionPerformed=self.send_requests))
        return menulist

    def makeRequest(self, r):
        self.callbacks.addToSiteMap(self.callbacks.makeHttpRequest(r.getHttpService(), r.getRequest()))

    def send_requests(self, event):
        # http://target.net:80/code/newarticle.html
        # http://target.net/code/newarticle.html

        # https://target.net:443/code/newarticle.html
        # https://target.net/code/newarticle.html

        burp_IHttpRequestResponse = self.selectedRequest[0]
        url = burp_IHttpRequestResponse.url
        if url.port in (80, 443):
            url = '{}://{}{}'.format(url.protocol, url.host, url.path)
        else:
            url = url.toString()

        for sitemap_item in self.callbacks.getSiteMap(url):
            t = threading.Thread(target=self.makeRequest, args=[sitemap_item])
            t.daemon = True
            t.start()

# Platform:           Mac OS X / Windows 7
# Brupsuite Version:  1.7.11
# Author: Nixawk
# Fork from Site_Map_Fetcher, But it's different.
# https://portswigger.net/burp/help/extender.html
# https://portswigger.net/burp/extender/api/index.html
# https://www.foote.pub/2015/04/08/burp-extender-python.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值