Create a Linux Server Status MOTD

For those of us who manage multiple servers in multiple locations it can be beneficial to have a quick “system briefing” provided when we login to a Linux server via SSH. The Linux Message of the Day (MOTD) can be used for this.

I’ve created a simple script which will provide basic system information including the servers name, public IP, OS version, load averages, uptime etc.

To install the script:

1. Create a new text file named systemstats.sh:

# nano -w /usr/local/bin/systemstats.sh

2. Paste the following into the text file:

#!/bin/bash
#
# Server Status Script
# Version 0.1.3 m
# Updated: July 26th 2011 m

CPUTIME=$(ps -eo pcpu | awk ‘NR>1’ | awk ‘{tot=tot+$1} END {print tot}’)
CPUCORES=$(cat /proc/cpuinfo | grep -c processor)
UP=$(echo `uptime` | awk ‘{ print $3 ” ” $4 }’)
echo ”
System Status Continue reading “Create a Linux Server Status MOTD”

Install ClamAV on CentOS 6.0

To install ClamAV antivirus on CentOS 6.0 along with automatic updates and a nightly full system scan please use the following process:

1. Change to your SRC install directory:

# cd /usr/src

2. Download the ClamAV installation package, ClamAV database, ClamAV development libraries and ClamAV daemon for your operating system type (32 bit of 64 bit):

For 32 bit:

# wget http://pkgs.repoforge.org/clamav/clamav-0.97.1-1.el6.rf.i686.rpm http://pkgs.repoforge.org/clamav/clamav-db-0.97.1-1.el6.rf.i686.rpm http://pkgs.repoforge.org/clamav/clamav-devel-0.97.1-1.el6.rf.i686.rpm http://pkgs.repoforge.org/clamav/clamd-0.97.1-1.el6.rf.i686.rpm

For 64 bit:

# wget http://pkgs.repoforge.org/clamav/clamav-0.97.1-1.el6.rf.x86_64.rpm http://pkgs.repoforge.org/clamav/clamav-db-0.97.1-1.el6.rf.x86_64.rpm Continue reading "Install ClamAV on CentOS 6.0"

Securing WordPress

With a growing number of small to medium sized businesses leveraging WordPress as their website content management system (CMS), security of WordPress installations has become an issue. The WordPress developers have provided a reasonable ‘hardening’ outline, available here, but there are a number of other steps you can take to enhance the security of your WordPress site.

There are four main area’s of WordPress security we will briefly address in this article:

  1. Host Security
  2. Version Maintenance
  3. Restricting Access & Permissions
  4. Encryption

Host Security

Your WordPress site will only be as secure as the web servers its hosted on. If you are hosting your WordPress site on a virtual hosting account then you need to take extra care in making sure you site is secured from both external (Internet) attacks as well as attacks from other users on the same server (Internal). I recommend considering a secure hosting provider which provides hardened server operating systems and secure upload mechanisms such as a SFTP and SSL. Your hosting provider should also make sure they are running current, patched versions of their Apache web server, PHP and MySQL database software. Be sure the discuss security concerns with your hosting provider directly.

Version Maintenance

Keeping your WordPress site up-to-date with the latest WordPress release is important not just for stability but also for security. The WordPress development team does a good job of Continue reading “Securing WordPress”

Running KeePass 2.x on OSX using MacPack

There is no native OSX installer for KeePass. An alternative is running KeePassX but the the 2.0 password safe database format is not cross-compatible with KeePass on Windows. For those of us who keep KeePass databases syncronized between our Windows machines, Apple iPhone’s and Linux desktops, standard file format is important.

One option is to run KeePass under Mono in OSX but this can be a hassle to setup and maintain. The best solution is to install the Mono framework then use MacPack to compile a native OSX APP, as follows:

  1. Install Mono Framework
  2. Download latest version of KeePass 2.x and unpack it
  3. Open Terminal and navigate to unpacked KeePass folder
  4. Run the following command:

    macpack -o:. -m:winforms -r:/Library/Frameworks/Mono.framework/Versions/Current/lib/ libCocoaSharpGlue.dylib -r:KeePass.chm -r:KeePass.XmlSerializers.dll -r:KeePassLibC32.dll -r:KeePassLibC64.dll -r:License.txt -r:ShinstUtil.exe -r:./XSL -n:KeePass -a:KeePass.exe

  5. Confirm the file is built and no errors occur.

This will create a KeePass.app file that you can drag into your \Applications folder or desktop.

Six Biggest Rising Threats from Cybercriminals

Watch out for these cyberattacks that can turn smartphones into texting botnets, shut off electricity, jam GPS signals and more

Hackers never sleep, it seems. Just when you think you’ve battened down the hatches and fully protected yourself or your business from electronic security risks, along comes a new exploit to keep you up at night. It might be an SMS text message with a malevolent payload or a stalker who dogs your every step online. Or maybe it’s an emerging technology like in-car Wi-Fi that suddenly creates a whole new attack vector.

Whether you’re an IT manager protecting employees and corporate systems or you’re simply trying to keep your own personal data safe, these threats — some rapidly growing, others still emerging — pose a potential risk. Fortunately, there are some security procedures and tools available to help you win the fight against the bad guys.

Read this article about six emerging threats and what you might be able to do about them, including:

  • Text messaging malware
  • Hacking into smart grids
  • Social network account spoofing
  • Cyberstalking
  • Hackers controlling your car
  • GPS jamming or spoofing.

View the article online here or download it here.