Skip to content

Commit

Permalink
Update for Burp 2020
Browse files Browse the repository at this point in the history
  • Loading branch information
putsi authored and Jarmo Puttonen committed Jul 15, 2020
1 parent 16f35e0 commit f48fc0e
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 168 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Please see [this blog post](https://teamrot.fi/2019/05/23/self-hosted-burp-colla
## TL;DR:

1. Clone this repository.
2. Place your burp jar to the privatecollaborator-directory.
3. Run `sudo ./install.sh your.domain.fi`.
2. Install Burp to /opt/BurpSuitePro.
3. Run `sudo ./install.sh yourdomain.fi`.
4. You should now have Let's encrypt certificate for the domain and a private burp collaborator properly set up.
5. Start the collaborator with `sudo service burpcollaborator start`.
6. Configure your Burp Suite Professional to use it.
Expand Down
1 change: 1 addition & 0 deletions dnshook.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash

python /usr/local/lib/python2.7/dist-packages/dnslib/fixedresolver.py -r "_acme-challenge.$CERTBOT_DOMAIN. 10 IN TXT \"$CERTBOT_VALIDATION\"" -a $1 &>/dev/null &disown
sleep 5
44 changes: 0 additions & 44 deletions extendburp/dnsmitm.py

This file was deleted.

13 changes: 0 additions & 13 deletions extendburp/dnsmitm.service

This file was deleted.

31 changes: 0 additions & 31 deletions extendburp/extend_burp.sh

This file was deleted.

37 changes: 0 additions & 37 deletions extendburp/renewcert.sh

This file was deleted.

9 changes: 4 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

ls *.jar >/dev/null 2>&1 ||(echo "No Burp JAR found, place it in this directory!" && kill $$ && exit)
ls /opt/BurpSuitePro/BurpSuitePro >/dev/null 2>&1 ||(echo "Install Burp to /opt/BurpSuitePro and run script again" && kill $$ && exit)

DOMAIN=$1

Expand Down Expand Up @@ -30,9 +30,8 @@ if [ 0 -eq $? ]; then
fi
fi;

apt update -y && apt install -y default-jre python-pip && pip install dnslib
apt update -y && apt install -y python-pip && pip install dnslib
mkdir -p /usr/local/collaborator/
cp *.jar /usr/local/collaborator/burp.jar
cp dnshook.sh /usr/local/collaborator/
cp cleanup.sh /usr/local/collaborator/
cp collaborator.config /usr/local/collaborator/collaborator.config
Expand Down Expand Up @@ -61,8 +60,8 @@ echo ""
read -p "Press enter to continue"

rm -rf /usr/local/collaborator/keys
./certbot-auto certonly --manual-auth-hook "./dnshook.sh $MYPRIVATEIP" --manual-cleanup-hook ./cleanup.sh \
-d "$DOMAIN,*.$DOMAIN" \
./certbot-auto certonly --manual-auth-hook "/usr/local/collaborator/dnshook.sh $MYPRIVATEIP" --manual-cleanup-hook /usr/local/collaborator/cleanup.sh \
-d "*.$DOMAIN" \
--server https://acme-v02.api.letsencrypt.org/directory \
--manual --agree-tos --no-eff-email --manual-public-ip-logging-ok --preferred-challenges dns-01

Expand Down
36 changes: 1 addition & 35 deletions renewcert.sh
Original file line number Diff line number Diff line change
@@ -1,37 +1,3 @@
#!/bin/bash

# Yeah, my bash scripting skills suck.

# Use public IP in case not running on AWS or Digitalocean.
MYPRIVATEIP=$(curl http://checkip.amazonaws.com/ -s)

# Get private IP if running on AWS.
curl http://169.254.169.254/latest -s --output /dev/null -f -m 1
if [ 0 -eq $? ]; then
MYPRIVATEIP=$(curl http://169.254.169.254/latest/meta-data/local-ipv4 -s)
fi;

# Get private IP if running on Digitalocean.
curl http://169.254.169.254/metadata/v1/id -s --output /dev/null -f -m1
if [ 0 -eq $? ]; then
# Use Floating IP if the VM has it enabled.
FLOATING=$(curl http://169.254.169.254/metadata/v1/floating_ip/ipv4/active -s)
if [ "$FLOATING" == "true" ]; then
MYPRIVATEIP=$(curl http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address -s)
fi
if [ "$FLOATING" == "false" ]; then
MYPRIVATEIP=$(curl http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address -s)
fi
fi;

# Only stop&start burp collaborator if it's already running.
systemctl is-active --quiet burpcollaborator
[ $? -eq "0" ] && \
/usr/local/collaborator/certbot-auto renew --manual-auth-hook "./dnshook.sh $MYPRIVATEIP" --manual-cleanup-hook ./cleanup.sh \
--server https://acme-v02.api.letsencrypt.org/directory \
--pre-hook "service burpcollaborator stop" --post-hook "service burpcollaborator start" \
--manual --agree-tos --no-eff-email --manual-public-ip-logging-ok --preferred-challenges dns-01 \
||/usr/local/collaborator/certbot-auto renew --manual-auth-hook "./dnshook.sh $MYPRIVATEIP" --manual-cleanup-hook ./cleanup.sh \
--server https://acme-v02.api.letsencrypt.org/directory \
--manual --agree-tos --no-eff-email --manual-public-ip-logging-ok --preferred-challenges dns-01

certbot-auto renew
2 changes: 1 addition & 1 deletion startcollab.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

java -Xms10m -Xmx200m -XX:GCTimeRatio=19 -jar /usr/local/collaborator/burp*.jar --collaborator-server --collaborator-config=/usr/local/collaborator/collaborator.config
/opt/BurpSuitePro/BurpSuitePro --collaborator-server --collaborator-config=/usr/local/collaborator/collaborator.config

0 comments on commit f48fc0e

Please sign in to comment.