Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"serverDomain" : "BDOMAIN", | ||
"workerThreads" : 10, | ||
"eventCapture": { | ||
"localAddress" : ["INT_IP"], | ||
"publicAddress" : "EXT_IP", | ||
"http": { | ||
"ports" : 80 | ||
}, | ||
"https": { | ||
"ports" : 443 | ||
}, | ||
"smtp": { | ||
"ports" : [25, 587] | ||
}, | ||
"smtps": { | ||
"ports" : 465 | ||
}, | ||
"ssl": { | ||
"certificateFiles" : [ | ||
"/usr/local/collaborator/keys/privkey.pem", | ||
"/usr/local/collaborator/keys/cert.pem", | ||
"/usr/local/collaborator/keys/fullchain.pem" ] | ||
} | ||
}, | ||
"polling" : { | ||
"localAddress" : "INT_IP", | ||
"publicAddress" : "EXT_IP", | ||
"http": { | ||
"port" : 9090 | ||
}, | ||
"https": { | ||
"port" : 9443 | ||
}, | ||
"ssl": { | ||
"certificateFiles" : [ | ||
"/usr/local/collaborator/keys/privkey.pem", | ||
"/usr/local/collaborator/keys/cert.pem", | ||
"/usr/local/collaborator/keys/fullchain.pem" ] | ||
} | ||
}, | ||
"metrics": { | ||
"path" : "jnaicmez8", | ||
}, | ||
"dns": { | ||
"interfaces" : [{ | ||
"name": "ns1.BDOMAIN", | ||
"localAddress" : "INT_IP", | ||
"publicAddress" : "EXT_IP" | ||
}], | ||
"ports" : 53 | ||
}, | ||
"logLevel" : "DEBUG" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
ls *.jar >/dev/null 2>&1 ||(echo "No Burp JAR found, place it in this directory!" && exit) | ||
|
||
DOMAIN=$1 | ||
MYPRIVATEIP=$(curl http://169.254.169.254/latest/meta-data/local-ipv4 -s) | ||
MYPUBLICIP=$(curl http://169.254.169.254/latest/meta-data/public-ipv4 -s) | ||
|
||
apt update -y && apt install -y default-jre python-pip && pip install dnslib | ||
mkdir -p /usr/local/collaborator/ | ||
cp *.jar /usr/local/collaborator/burp.jar | ||
|
||
cp collaborator.config /usr/local/collaborator/collaborator.config | ||
sed -i "s/INT_IP/$MYPRIVATEIP/g" /usr/local/collaborator/collaborator.config | ||
sed -i "s/EXT_IP/$MYPUBLICIP/g" /usr/local/collaborator/collaborator.config | ||
sed -i "s/BDOMAIN/$DOMAIN/g" /usr/local/collaborator/collaborator.config | ||
|
||
cd /usr/local/collaborator/ | ||
wget https://dl.eff.org/certbot-auto | ||
chmod +x /usr/local/collaborator/* | ||
|
||
systemctl disable systemd-resolved.service | ||
systemctl stop systemd-resolved | ||
echo "nameserver 1.1.1.1" > /etc/resolv.conf | ||
echo "options edns0" >> /etc/resolv.conf | ||
echo "search eu-north-1.compute.internal" >> /etc/resolv.conf | ||
|
||
echo "" | ||
echo "" | ||
echo "IMPORTANT: When certbot shows you the DNS TXT-record, don't press enter." | ||
echo "Run the below cmd and give it the value from certbot: " | ||
echo "sudo python /usr/local/lib/python2.7/dist-packages/dnslib/fixedresolver.py -r '_acme-challenge.$DOMAIN. 10 IN TXT \"TXT_VALUE_HERE\"'" | ||
echo "COPY THE ABOVE COMMAND BEFORE CONTINUING!" | ||
echo "" | ||
echo "CTRL-C if you don't need to obtain certificates." | ||
echo "" | ||
read -p "Press enter to continue" | ||
|
||
rm -rf /usr/local/collaborator/keys | ||
./certbot-auto certonly -d $DOMAIN -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 | ||
|
||
CERT_PATH=/etc/letsencrypt/live/$DOMAIN/ | ||
mkdir -p /usr/local/collaborator/keys/ | ||
cp $CERT_PATH/privkey.pem /usr/local/collaborator/keys/ | ||
cp $CERT_PATH/fullchain.pem /usr/local/collaborator/keys/ | ||
cp $CERT_PATH/cert.pem /usr/local/collaborator/keys/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 |