Kali Pentest SQL Injection and Prevent with Varnish 4

kali_linuxKali is a useful collection of tools for penetration testing. This tutorial shows how to detect web sites with SQL Injection vulnerabilities using OWASP. More importantly it shows how to block such attacks using Varnish. This setup uses three virtual machines. A web server virtual machine running Badstore and a Kali virtual machine. The final debian virtual machine is running Varnish 4 reverse proxy software which is where the Web Application Firewall (WAF) will be installed. New WordPress tutorials and security are now posted on WP Bullet.
Continue reading

Kali 2.0 Access point + Man in the middle

We are doing a Special subject related to penetration testing with Kali 2.0 and spoofing https traffic was the thing that I wanted to achieve. First things first – I had to find out a bit more about MITM attacks, how to initiate them, how they work, etc. Establishing a MITM attack on the same network might be fairly easy, but it is too noisy and you might get caught if the administrators monitor the network. That’s why I decided to combine the MITM with my own hotspot

Continue reading

Kali Pentest and Prevent XSS Attacks using Varnish 3

kali_linuxKali is a useful collection of tools for penetration testing. This tutorial shows how to detect web sites with XSS vulnerabilities using nikto. More importantly it shows how to block such attacks using Varnish. This setup uses two virtual machines. A web server virtual machine and a Kali virtual machine. The web server is running Debian Wheezy with nginx and Varnish. If you are looking to secure WordPress see this post. More tutorials for WordPress are on WP Bullet.
Continue reading

Use Junos-PyEZ to upload a configuration to FTP

You can use Python for set, save a rescue, show, upgrade the Junos version and a few other commands, but we couldn’t find a way to remotely execute a command which saves a configuration to an FTP server. We failed in finding an example of such script so a little research and 1 hour later I managed to assemble one. This script actually copies an existing .conf file from the Juniper device to the FTP server.

Continue reading

Load Junos Config using Ansible + Console + Bash Part 2

junos-ansibleAnsible is a very powerful tool for automating provisioning and maintenance tasks on Junos devices using the Py-EZ module. Usually you require at least SSH or Netconf set on the device for ansible to work but there will be times a student breaks your ansible-able configuration. Using the Juniper device’s console port we can have Ansible re-upload a configuration. In this guide we use a bash script to prompt the user for the device, configuration file to load and credentials.
Continue reading

Load Junos Config using Ansible + Console + Bash Part 1

junos-ansibleAnsible is a very powerful tool for automating provisioning and maintenance tasks on Junos devices using the Py-EZ module. Usually you require at least SSH or Netconf set on the device for Ansible to work but there will be times a student breaks your ansible-able configuration. Using the Juniper device’s console port we can have Ansible overwrite the Junos configuration. In this guide we use a bash script to define variables which are passed to Ansible. In part 2 the bash script will prompt the user for the device, configuration file to load and login credentials.
Continue reading

Use Python for Junos Software Upgrades on Vagrant VMs

junos-pythonYou can install Junos software upgrades using Python which can automate the process for you. We use Ansible to roll out upgrades to 16 routers at once (it’s very cool) but we wanted to test it using the Junos Py-EZ module first using virtual machines with Vagrant since that is how Ansible connects to Juniper devices. This python for Junos software upgrades on Vagrant virtual machines works on Windows and Linux (tested on Debian and Ubuntu)
Continue reading