Prefetch Technologies // Keeping your cache lines cozy

Using the rsyslog MySQL plug-in to send syslog data to a SQL database

securitymonitoringdatabasesFeb 12, 2012 6 min read

I have been experimenting with ways to better manage the logs my servers generate. Depending on who you ask, folks will recommend sending your logs to a remote syslog server that writes the logs to disk, some may recommend sending it to a log analysis tool similar to splunk, and others would recommend feeding it to a SQL database. I've talked before about setting up syslog-ng for remote logging, and in this case I wanted to experiment with something new. I also didn't have money to buy a tool like splunk, so I decided to start experimenting with funneling syslog data into a MyQSL database…

$ read more →

Integrating ssh-agent into your login process

securityJan 28, 2012 3 min

Most of my readers utilize SSH keys to access remote systems. The security bene fits are well known, and key-based authentication makes automating remote t asks a whole lot easier. When you use key-based authentication it becomes imperative to protect your private key, since a third party could access your systems if they were able to gain access to your account. The SSH key generator (ssh-keygen) will attempt to encrypt your private key by default, and can also be used ssh-keygen to add a password to a private key after the fact…

$ read more →

How to figure out if a processes has been chroot()'ed

securityJan 23, 2012 1 min

A number of applications (e.g., custom chroot jails, openssh, vsftp, apache) support the ability to chroot themselves. To find out if a process called chroot() at startup, you can check the /proc/ /root entry for the process. For non-chrooted processes this entry will point to /: For a chrooted process the root directory will point to the directory passed to the chroot() system call: Chroot environments can be made secure, especially if you follow the coding practices discussed in Building Secure Software and Using Chroot Securely. These are must reads for anyone who plans to use chroot()!

$ read more →

A couple of gotchas with the OpenSSH chroot() implementation

securityJan 21, 2012 2 min

I previously discussed the OpenSSH Match directive, and how it can be used to chroot SSH and SFTP users. Over the past couple of months I've encountered some gotchas with the chroot implementation in OpenSSH. Since I had to figure these items out myself, I figured I would share my findings here so folks wouldn't need to spend hours looking at source code (if you want to geek out and see how this works, check out session.c in the OpenSSH source code). The first gotcha occurs when the users home directory doesn't have the correct permissions…

$ read more →

How to encrypt an SSH private key

securityJan 20, 2012 1 min

If you are using SSH key-based authentication you should be encrypting your private key. This ensures that if someone breaks into your server and steals your keys, they won't be able to utilize them to access other systems. If your private key isn't encrypted you can use the ssh-keygen utilities "-p" option to do so: This option can be used to change the password used to encrypt a private key, and to add a password to an existing private key. Viva la OpenSSH!

$ read more →