Comments (12)
Give this a shot:
- Build the jar (these instructions are for OSX, see issue 8 for more details) and run the service:
mkdir -p build/libs
mkdir lib &&
cd lib &&
ln -s /Applications/Burp\ Suite\ Professional.app/Contents/java/app/burpsuite_pro.jar burpsuite_pro.jar &&
cd -
./gradlew clean build
cd build/libs
# Run it
java -jar burp-rest-api-1.0.0.jar --headless.mode=true
- Set up dvwa. If you use docker, here's a one-liner to get you started:
docker run -d -p 85:80 --name=dvwa citizenstig/dvwa
- Run burp against dvwa using the API:
# Add the target to scope
curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' 'http://localhost:8080/burp/target/scope?url=http://127.0.0.1:85'
# Spider the target
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' 'http://localhost:8080/burp/spider?baseUrl=http://127.0.0.1:85'
# Scan the target
curl -X POST --header 'Content-Type: application/json' --header 'Accept: */*' 'http://localhost:8080/burp/scanner/scans/active?baseUrl=http://127.0.0.1:85'
# Get Status of Scan
curl -X GET --header 'Accept: application/json' 'http://localhost:8080/burp/scanner/status'
# Create HTML Report
curl -X GET --header 'Accept: application/octet-stream' 'http://localhost:8080/burp/report?urlPrefix=http://127.0.0.1:85&reportType=HTML' -o testReport.html
This should give you some results to help you determine if things are working. Keep in mind that for this example you're not logging into the vulnerable web application, so there won't be a ton of vulnerability data.
from burp-rest-api.
I got the same problem on my side:
mkdir -p build/libs
mkdir lib &&
cd lib &&
ln -s /Applications/Burp\ Suite\ Professional.app/Contents/java/app/burpsuite_pro.jar burpsuite_pro.jar &&
cd -
./gradlew clean build
cd build/libs
# Run it
java -jar burp-rest-api-1.0.0.jar --headless.mode=false
Then i call the endpoint for adding my url to the scope:
curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' 'http://localhost:8090/burp/target/scope?url=https://xxxxxxxxx.com/adexchange'
It works fine, my url is indeed in the scope, so i create a scan:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: */*' 'http://localhost:8090/burp/scanner/scans/active?baseUrl=https://xxxxxxxxxxx/adexchange'
And nothing happen, nothing is scanned, in the UI, i can't see either my scan in progress.
2017-03-14 10:48:11.654 INFO 38489 --- [nio-8090-exec-5] c.v.burp.extension.service.BurpService : Getting percentage complete.
2017-03-14 10:48:11.654 INFO 38489 --- [nio-8090-exec-5] c.v.b.e.domain.internal.ScanQueueMap : Scan Queue is empty. Returning the Percent Complete as 100%.
Burp Pro 1.7.19.
OSX 10.12.3
Any help would be greatly appreciated.
Thanks
NB: if i run spider, it works fine, only the scanner (the things i would need to be run by jenkins) fail :/
from burp-rest-api.
Same here...
from burp-rest-api.
As per https://portswigger.net/burp/help/scanner_pointandclick.html, I'm pretty sure you're going to need to spider a site before you can scan it (so that it knows what to scan). Why not have jenkins run the spider and follow that action up with running a scan? You could write a little script that would run the spider, wait until spidering was finished, and then run your scan. Here's a rough idea of what I'm talking about in terms of the middle piece:
def wait_until_finished_spidering(self):
finished_spidering = False
while not finished_spidering:
prev_resp = get_resp()
time.sleep(5)
resp = get_resp()
# Responses haven't changed, we're ready to scan and have finished crawling the site
if len(prev_resp.content) == len(resp.content):
return
You can use something like this to get the response:
resp = requests.post("%s:%s/burp/scanner/scans/active?baseUrl=%s://%s%s%s" % (
api_host, api_port, service, target, port, uri))
from burp-rest-api.
@l50, and how do I know that spidering has finished? I haven't seen any API endpoint related to that. Thanks for your help!
from burp-rest-api.
There is not an endpoint for that, which is why I provided the python snippet that you could potentially use to determine if spidering has finished. Or you can take the logic and turn it into whatever language meets your needs. That's the beauty of REST API's, right?
from burp-rest-api.
Regarding your code: What should get_resp()
do? Get a response from what ?
from burp-rest-api.
Nobody?!
from burp-rest-api.
@dorneanu get_resp() returns response from API call /burp/scanner/scans/active.
This is how i am using these APIs.
- check_burp_sitemap() : /burp/target/sitemap
- add_site_to_scope() : /burp/target/scope
- start_active_scan() : /burp/scanner/scans/active
- poll_scan_status() : /burp/scanner/status
- get_burp_scan_html_report() : /burp/report?reportType=HTML
from burp-rest-api.
closing this issue due to inactivity.
from burp-rest-api.
@steve-heslouin
@stevespringett
Hello guys,thanks for posting out your issues,i have not yet automated scans,however was curious to know,was this issue fixed?,as it would probably be a good reference point for many people including myself,for solving,if this issue appears.
Thanks
from burp-rest-api.
I had similar issues and fixed with this change #30, FYI. Details of my specific issue in the PR.
from burp-rest-api.
Related Issues (20)
- Partial history HOT 2
- Unable to Get Scan Status HOT 6
- New release scheduled? HOT 2
- Sitemap not responding | Bad Request HOT 1
- Windows server 2019 - The supplied licence key was not recognized HOT 2
- Sitemap TimeoutException HOT 1
- Persisting extension settings HOT 2
- Getting '400-Bad Request' response with '/burp/proxy/history' HOT 3
- Burp Start with custom listeners (This is not a bug. It's just a query) HOT 1
- Burp is not starting with burp-rest-api.sh via Jenkins HOT 2
- Activate burp license using API HOT 1
- Include in Scope - no complex url handled HOT 1
- Getting NullPointerException on Remote Server HOT 2
- Custom config file not properly running with the api script HOT 4
- burp-rest-api.bat is showing "The supplied license key was not recognized.." error even after providing a valid license key HOT 5
- Newer version of Burp is not using reflection to call IBurpExtender#registerExtenderCallbacks HOT 1
- how to solve recover vulnerabilities in a report via swagger? HOT 3
- Crash with latest Burp Suite v2022.12.6 HOT 6
- /burp/report?urlPrefix=target returns 400 Bad request HOT 1
- the API cannot accept any requests when I pass the burp user configurations json file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from burp-rest-api.