os-scripts icon indicating copy to clipboard operation
os-scripts copied to clipboard

Burpsuite CA import failing

Open sp3nx0r opened this issue 7 years ago • 4 comments

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```

sp3nx0r avatar Feb 05 '18 22:02 sp3nx0r

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.

sp3nx0r avatar Feb 05 '18 22:02 sp3nx0r

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

chrisbensch avatar Feb 06 '18 00:02 chrisbensch

Thanks for the heads up. Will get a fix out for this shortly.

g0tmi1k avatar Feb 08 '18 17:02 g0tmi1k

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.

chrisbensch avatar Feb 09 '18 05:02 chrisbensch