I.T. Security and Linux Administration


October 13, 2011  11:13 AM

ArchLinux Package for sinfo

Eric Hansen Eric Hansen Profile: Eric Hansen

In this month’s issue of Linux Journal, they wrote about a CLI network monitoring tool called sinfo. At first it looked like a great program to explore the network a little bit, as you can use it to also monitor remote computers as well (LAN and such). As a side note, since I had a little bit of trouble figuring out how exactly to make that work, I’ll write up a short tutorial on that soon. But, back on topic, I soon realized that sinfo is not in either AUR or any “official” repos for Arch Linux, and so I took it upon myself to do so. The end result can be found here: https://aur.archlinux.org/packages.php?ID=53144.

If you use Arch Linux (the official site has a repo for Debian systems already), and you want to try out an, in all actuality very quite useful tool, give it a try.

October 12, 2011  1:00 PM

Bash Script for SSH Key Generation

Eric Hansen Eric Hansen Profile: Eric Hansen

I’ve mentioned a good couple of times here on how to set up SSH key authentication, as well as some benefits to it.  But, I was always wondering how (and if) I could make it more automated.  Then it hit me, there’s always ssh-keygen’s wonderful man pages!  A good hour or two later, I’ve come up with two different methods of doing this.  One is purely automated (minus asking for the passphrase), and the other has default answers for each prompt.

The (almost) purely automated script can be found here: http://itknowledgeexchange.techtarget.com/itanswers/ssh-key-authentication-generator/ Underneath the cut, you’ll see the less-automated script.

Continued »


October 2, 2011  11:33 PM

[PHP] Page Authentication

Eric Hansen Eric Hansen Profile: Eric Hansen

Ever wondered how you can make sure people don’t view a page they’re not supposed to (i.e.: restrict them from accessing certain files in /var/www/domain.com/topsecretdocs/files_list.php)? Well, most people come up with the idea of putting a define() in the page that calls the file in question (in this case, files_list.php), and then do a simple if(!defined(…)){ die(“HACKER”); } kind of thing, similar to what phpBB does with its files. But, there is a simplier way of handling this particular situation.

Continued »


September 30, 2011  9:22 PM

[PHP] Lighttpd Access Log Viewer

Eric Hansen Eric Hansen Profile: Eric Hansen

In an earlier post I made, Lighttpd Access Log Parsing, I wrote a quick Bash line to parse Lighttpd’s access log file that you can easily port over to any other log file.  This time, I’ve done the same thing, but with PHP (using HTML for output, but you can change that if you like).  Click continue to see the awesome powers PHP can have with some regex magic, and basic HTML!

Continued »


September 28, 2011  7:06 PM

Linux & Windows 8 Secure Boot

Eric Hansen Eric Hansen Profile: Eric Hansen

While I normally don’t write about Windows on here, ITKE asked me via Twitter to write down my thoughts about the controversy surrounding Linux and Secure Boot, Windows’ answer to what TrueCrypt and BitLocker have been doing for a while now.  I’m not going to be biased and say that Windows is the spawn of all that is evil, as there are good and bad things involving all of this mess.  What I’m going to be doing is outlining some of the finer grained details and expand on them from an article I read on ZDNet.

Continued »


September 28, 2011  11:37 AM

Bandwidth Monitoring With bwbar

Eric Hansen Eric Hansen Profile: Eric Hansen

There’s quite a few systems out there that like to present to you a fancy graph and such information on the system’s bandwidth usage.  However, if you’re looking for something simple and straight to the point (and optionally have a web server running), bwbar is what you should be using.  Its a lightweight, easy to use, and easy on resources solution for displaying current bandwidth usage, written in C (or C++).  (More information about the program itself can’t be found as kernel.org is down…still…).  But, in this article I will show you how to use this tool to give you an overview of your bandwidth usage.

Continued »


September 27, 2011  9:36 PM

Lighttpd Access Log Parsing

Eric Hansen Eric Hansen Profile: Eric Hansen

If you’re like me, you’re always wanting to parse those pesky log files to make analyzing them easier.  Thankfully, with my constant desire to make my jobs easier (read: make me lazier), and passion for programming, I’ve written up a quick Bash script to do just this.

Now, I’ll say this right off the bat…this isn’t pretty (i.e.: it’s straight forward, and quite bland currently), but I’m going to be writing a better one in PHP soon, using regex and all that other fancy stuff.  But, this is something to get the engines roaring while I work on the script of the week tomorrow.

Continued »


September 26, 2011  9:47 PM

Duo Security Review

Eric Hansen Eric Hansen Profile: Eric Hansen

I’ve written about two-factor authentication methods before (namely using the Google Authenticator to log in to SSH).  While that method was fine, there’s also a new product that’s come out over the year or so, and is also local to my home.  It’s called Duo Security, and they have an authenticator system that takes it one step further than your every day method of secure authorization. Continued »


September 18, 2011  6:57 PM

Postfix and Post Queue

Eric Hansen Eric Hansen Profile: Eric Hansen

A lot of talk and discussions can be found online in regards to mail systems like sendmail, Qmail, etc…but, at least for me, Postfix is more of the silent assassin of sorts.  Out of the systems though, I’d have to say Postfix is one of the easier and more versatile MTA’s to use for Linux.  sendmail is sort of the de facto standard, and Postfix has always been intended to be a superset of sendmail.  In this post, I’d like to discuss the mail queue, and how to handle it.

Continued »


September 9, 2011  12:00 PM

Parsing E-mails via Postfix and PHP

Eric Hansen Eric Hansen Profile: Eric Hansen

While not everyone is going to have a need for this, there are a lot of good reasons to parse e-mail.  Perhaps the best is if you use a help desk/bug tracking/ticket system (Bugtraq, Clientexec, etc…), and want to allow people to send in requests and such via e-mail.  Among other things, this is the easiest way to do this with Postfix.  Since this works whether you are using virtual or real domains, you don’t have to worry about this.  There are methods to do this with MySQL as well, but I have yet to get it to work. Continued »


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: