| Line 1: |
Line 1: |
| − | == Install Burp Suite ==
| + | '''<u>IMPORTANTE: Instalar sólo en Linux, no en Windows!!!!!</u>''' |
| − | (Only Linux)
| + | |
| − | * Create rra user | + | |
| − | $ sudo adduser rra
| + | 1- Solicita a alguna de las siguientes personas una copia del binario de Burp Suite Pro y del fichero "prefs.xml" si todavía no los tienes: |
| − | * Add the following entries to /etc/hosts
| + | |
| − | <nowiki>127.0.0.1 portswigger.net | + | *Andrés Arrowsmith Patiño |
| − | 127.0.0.1 pro.portswigger.net | + | *Rafael Herrero Solís |
| − | 127.0.0.1 releases.portswigger.net | + | |
| − | 127.0.0.1 perfdata.portswigger.net</nowiki> | + | |
| − | * Copy prefs.xml to /home/rra/.java/.userPrefs/burp/prefs.xml
| + | |
| − | * Block outgoing connections to the IP 54.246.133.196 (Make this rule persistent ej: [http://www.microhowto.info/howto/make_the_configuration_of_iptables_persistent_on_debian.html iptables-persistent]
| + | 2- Crear un usuario local en la máquina Linux llamado "rra". Burp Suite Pro tendrá que ejecutarse con este usuario.<syntaxhighlight lang="bash"> |
| − | $ sudo iptables -I OUTPUT -d 54.246.133.196 -j DROP
| + | sudo adduser rra |
| − | * Download [https://home.rra.lan/media/rrahomeapp/static/download/2019/01/11/BurpSuite.tar.gz BurpSuite.tar.gz] and extract the .jar file
| + | </syntaxhighlight>3- Añadir el usuario al fichero "/etc/sudoers" para darle privilegios agregando la siguiente línea:<syntaxhighlight lang="bash"> |
| − | * Run Burp Suite (-xmx to specify max RAM)
| + | rra ALL=(ALL) NOPASSWD:ALL |
| − | $ java -xmx2G -jar burpsuite_pro_v1.7.37.jar
| + | </syntaxhighlight>4- Añadir estas líneas al fichero "/etc/hosts":<syntaxhighlight lang="bash"> |
| | + | 127.0.0.1 portswigger.net |
| | + | 127.0.0.1 pro.portswigger.net |
| | + | 127.0.0.1 releases.portswigger.net |
| | + | 127.0.0.1 perfdata.portswigger.net |
| | + | </syntaxhighlight>5- Añadir una regla de iptables para bloquear el tráfico de salida a la dirección IP 54.246.133.196. Es importante hacer esta regla persistente. Para ello lo más sencillo es instalar el paquete "iptables-persistent". Si alarrancar Burp se muestra un mensaje indicando que hay una actualización, significa que la IP no está correctamente bloqueada (o que hay otra IP y habría que bloquearla también, avisa si ocurre esto).<syntaxhighlight lang="bash"> |
| | + | # Instalar el paquete "iptables-persistent" |
| | + | sudo apt install iptables-persistent |
| | + | |
| | + | # Habilitar el servicio "netfilter-persistent" (Ubuntu y Debian) |
| | + | sudo systemctl enable netfilter-persistent.service |
| | + | |
| | + | # Añadir la regla a iptables |
| | + | sudo iptables -A OUTPUT -d 54.246.133.196/32 -j DROP |
| | + | |
| | + | # Hacer la regla persistente |
| | + | sudo iptables-save > /etc/iptables/rules.v4 |
| | + | </syntaxhighlight> |
| | + | 6- Copiar el fichero prefs.xml a la ruta "/home/rra/.java/.userPrefs/burp". En caso de que la ruta no exista en tu máquina, deberás ejecutar el binario de Burp con el usuario "rra". Esto hará que se cree toda la estructura de directorios y ficheros necesarios. Una vez tengamos creada la estructura copiaremos el fichero "prefs.xml" y le daremos los permisos adecuados.<syntaxhighlight lang="bash"> |
| | + | # Copiar el fichero prefs.xml |
| | + | cp prefs.xml /home/rra/.java/.userPrefs/burp/ |
| | + | |
| | + | # Cambiar permisos del fichero prefs.xml |
| | + | chmod 644 /home/rra/.java/.userPrefs/burp/prefs.xml |
| | + | |
| | + | # Cambiar propietario del fichero prefs.xml |
| | + | chown rra:rra /home/rra/.java/.userPrefs/burp/prefs.xml |
| | + | </syntaxhighlight>7- Para ejecutar Burp bastará el siguiente comando (suponiendo que el binario esté ubicado en la ruta /home/rra). Esto sólo funcionará si hemos hecho login en la interfaz gráfica con el usuario "rra":<syntaxhighlight lang="bash"> |
| | + | java -jar /home/rra/burpsuite_pro_x.x.xx.jar # sustituir las "x" por número de versión |
| | + | </syntaxhighlight>En caso de que queramos ejecutar Burp Suite Pro desde la sesión de un usuario diferente a "rra", tendremos que utilizar alguna utilidad como gksu, xhost o pkexec. |
| | + | |
| | + | '''gksu''' |
| | + | |
| | + | En Parrot el paquete ya viene instalado por defecto, en Kali retiraron el paquete y para poderlo instalarlo con apt hay que añadir un source en /etc/apt/sources.list "deb <nowiki>http://old.kali.org/kali</nowiki> sana main non-free contrib" (añadir sin las comillas) y luego para instalarlo (apt update && apt install gksu). Se recomienda quitar o comentar del "sources.list" la línea añadida tras instalar gksu y volver a hacer "apt update". Una vez tenemos gksu, La línea de comandos que debemos ejecutar para lanzar Burp sería esta:<syntaxhighlight lang="bash"> |
| | + | gksu -u rra "java -jar /home/rra/burpsuite_pro_x.x.xx.jar" |
| | + | </syntaxhighlight>'''xhost''' |
| | + | |
| | + | Utilizando xhost se puede ejecutar Burp Suite Pro la siguiente forma:<syntaxhighlight lang="bash"> |
| | + | xhost +local:all > /dev/null 2>&1; su rra -c "java -jar /home/rra/burpsuite_pro_x.x.xx.jar > /dev/null 2>&1" |
| | + | </syntaxhighlight> |
| | + | '''pkexec''' |
| | + | |
| | + | Utilizando pkexec se puede ejecutar Burp Suite Pro la siguiente forma:<syntaxhighlight> |
| | + | pkexec --user rra env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY java -jar /home/rra/burpsuite_pro_x.x.xx.jar |
| | + | </syntaxhighlight> |
| | + | |
| | | | |
| | * Recomended: Use [[Oracle Java JDK]] instead of OpenJDK | | * Recomended: Use [[Oracle Java JDK]] instead of OpenJDK |
| | | | |
| | [[Category: Pentesting Tools]] | | [[Category: Pentesting Tools]] |