Security testing with Google's ratproxy

Ratproxy is a passive web application security assessment tool released by Google. Basically you set it up as a proxy server between yourself and the target site, and then click around in the target site doing whatever it is you normally do, while ratproxy analyzes your activity in the background and looks for security holes. ...

September 24, 2010 · 6 min · Dave Perrett

SSH Authentication refused: bad ownership or modes for directory

I just spent 30 minutes trying to get login via public key working on a new server, and here’s a few tips that I wish I knew earlier : ...

September 14, 2010 · 2 min · Dave Perrett

External Sessions in CakePHP

If you are using CakePHP in conjunction with an existing PHP application, chances are you need to import the normal application’s session into cake. Create a file called session_import.php or something similar in your cake app/config directory with the following contents : ...

June 4, 2007 · 2 min · Dave Perrett

Change the SSH login message

To change the message displayed before login, edit /etc/ssh/sshd_config : $ sudo vi /etc/ssh/sshd_config and add (or uncomment) the line Banner /etc/banner ...

March 27, 2007 · 1 min · Dave Perrett

Stop cron emails

Dreamhost sends you an email by default every time you run a cron job. To turn this off, run $ crontab -e and add this line to the top of your cron file: MAILTO=""

March 22, 2007 · 1 min · Dave Perrett

Configure Ubuntu w/ Static IP

Ubuntu Enterprise 6 seems to install as DHCP out-of-the-box. To change to a static ip, open the file /etc/network/interfaces. It should contain some lines like : auto eth0 iface eth0 inet dhcp Change this to something like : ...

March 8, 2007 · 1 min · Dave Perrett

Install Ubuntu SSH server

Ubuntu Enterprise 6 doesn’t seem to install sshd out-of-the-box. To install : $ sudo apt-get install openssh-server

March 8, 2007 · 1 min · Dave Perrett

Stop SSH and SFTP timeout

Just add the following line to @/etc/ssh_config@ (on the machine you’re SSHing from) : ServerAliveInterval 60 Next time you SSH of SFTP you’ll be sending ‘keepalive’ packets every 60 seconds. No more Connection reset by peer! If you have root access on the remote server, you can also set ClientAliveInterval 60 in @/etc/sshd_config@ to achieve the same effect.

August 17, 2006 · 1 min · Dave Perrett

Opening a port on linux

Check if the port is being used or not (testing port 3000 in this example): bash$ netstat -na | grep 3000 If the port is in use, then most likely it will be the software firewall blocking you. You can check by running: bash$ sudo /sbin/iptables -L Check for the port. If it isn’t listed, you will need to add it: bash$ sudo vi /etc/sysconfig/iptables Copy one of the other lines that is allowing a connection to (–dport) a port, and edit to allow access to your new port. Save the file Restart iptables: bash$ sudo /sbin/service iptables restart ...

August 16, 2006 · 2 min · Dave Perrett