os-scripts
os-scripts copied to clipboard
Burpsuite CA import failing
Issue with the Burpsuite CA import code failing in 2017.3 Kali rolling. Flipped to using certutil code that was commented out and looks like it works fine. The extract of CA info from prefs.js doesn't work anymore. Proposing the below code fix
#--- Extract CA
find /tmp/ -maxdepth 1 -name 'burp*.tmp' -delete
# export DISPLAY=:0.0
timeout 120 burpsuite >/dev/null 2>&1 &
PID=$!
rm -f /tmp/burp.der
while test -d /proc/${PID}; do
sleep 1s
curl --progress -k -L -f "http://localhost:8080/cert" -o /tmp/burp.der 2>/dev/null # || echo -e ' '${RED}'[!]'${RESET}" Issue downloading burp.crt" 1>&2
[ -f /tmp/burp.der ] && break
done
timeout 5 kill ${PID} 2>/dev/null \
|| echo -e ' '${RED}'[!]'${RESET}" Failed to kill ${RED}burpsuite${RESET}"
#--- Installing CA
if [[ -f /tmp/burp.der ]]; then
apt -y -qq install libnss3-tools \
|| echo -e ' '${RED}'[!] Issue with apt install'${RESET} 1>&2
folder=$(find ~/.mozilla/firefox/ -maxdepth 1 -type d -name '*.default' -print -quit)
certutil -A -n Burp -t "CT,c,c" -d "${folder}" -i /tmp/burp.der
timeout 15 firefox >/dev/null 2>&1
timeout 5 killall -9 -q -w firefox-esr >/dev/null```
So the problem is getting Burp Community to spinup without prompt for updates and project. Seems to not be a headless way of getting proxy listening.
Apparently this is the way: https://support.portswigger.net/customer/portal/questions/16805563-burp-command-line java -Djava.awt.headless=true -Xmx1g -jar burpsuite_file.jar I'll try once I get to my machine
Thanks for the heads up. Will get a fix out for this shortly.
I test the command above with BurpSuite Free and BurpSuite Pro, both successful. The message in the console reads "Proxy: Proxy service started on 127.0.0.1:8080" and no GUI ever shows.