Thursday, May 29, 2008

Screen, Fruity and Nikto

These are the latest applications I've found extremely useful.

GNU Screen- Terminal multiplexer with ability to detach and reattach a session
Useful when:
  • You want to be sure that a terminal program you started on a server keeps running even if you lose your ssh session
  • You want to leave a terminal program and resume it exactly where you left off.
  • You want multiple sessions within single window. Many other terminals do this, but screen will do it even when there's no GUI(like from the console)
Quickstart:
Start it: screen or screen yourprogram
Detach it: Ctrl-a d
Reattach it: screen -r -d

The beauty of it is, that you can do the reattach from a different computer logging in from an entirely different ssh session. And even if your ssh session dies, you can reconnect and reattach it. That's brilliant! There's lots more cool things you can do with screen. To have multiple terminals within one, do "Ctrl-a C" to create a new window, and Ctrl-A (or Ctrl-a n) to switch to the next window. And yes, when you detach all those windows will stay there.

Fruity- Web-based Nagios configuration tool. (nagios2 only)
Useful when:

  • Your nagios configs are not setup in a logical concise way-this often happens if you start small and add over time.
  • You're not taking advantage of the advanced features of config file modularity, such as separate client/site directories, services, or even service groups applied per hostgroup, or templates.
  • You want a powerful tool, that will easily let you organize and maintain your nagios config file.
Quickstart:
  • Generally you want to install fruity on the same machine that you have Nagios2 on. If that's a production box, then you can tar up /etc/nagios2 and untar it on the test box where you install Fruity on.
  • untar and unzip(tar -zxvf) the source file and move the directory to your Apache DocumentRoot(mv fruity1.0-rc2 /var/www/fruity )
  • Import the DB schema(mysql -u root -p < /var/www/fruity/sqldata/fruity.sql
  • The web interface(ie. http://localhost/fruity) should now "just work". It won't automatically import your configs, nor will it change the actual config files when you make changes. These are done via import and export tabs.
Nikto - Nikto is an HTTP security scanner. It will scan for common files and directories which may reveal versions of not just Apache, but PHP and even MySQL.
Useful when: You want to secure your website against fingerprinting and ensure that nothing more is revealed than necessary.

Quickstart:
Nikto is a perl script, so after you unzip/tar the source, you just run it:
nikto.pl -host yourtargetwebsite

It takes quite a while to run(took about 20min for the site I tried), but it gives you lots of very useful information, and presents it in a concise way. I have yet to figure out how to run it on an SSL(https) website.


Wednesday, May 28, 2008

Starting by Popular Request

I've been a *nix sysadmin for 8 years now. Damn, has it been that long? :)

Along the way I've learned a lot, and continue to learn and discover new tools that make my life easier.

I'm a devout fan of Open Source Software and have discovered, that you can find virtually any open source tool that rivals or exceeds its commercial equivalent. Network security and testing is another one of my main interests, which often overlaps with the above, so hopefully I can mesh the two.

On the same premise, I love to share information which I find with my colleagues. Since they're probably getting tired of me spamming that with that information, I decided to start this blog. Let's hope I have time to update it, and that others find it useful.