Software

Some software that I have personally developed:

NetAthlon2::RAW

NetAthlon2::RAW is a perl module to parse RAW files from NetAthlon2.  It was developed on Mac OS X 10.4.11 and ported to Windows XP using Strawberry perl.  You can find the latest source code at CPAN.

Unix::Mknod

Unix::Mknod is a portable perl interface to the mknod(2) system call.  It was developed to work on several different platforms:

  • AIX 4.3.3 and 5.1
  • Fedora Core 4
  • FreeBSD 4, 5, and 6
  • Mac OS X 10.3.9
  • RedHat Linux EL 4
  • Solaris 8, 9 and 10 (both SPARC and x86)

Since then, I’ve tested on these additional platforms

  • CentOS 5.x – 6.2
  • Fedora Core 5 – 15
  • FreeBSD 7.x, 8.x
  • Mac OS X 10.4.x, 10.6.x, 10.7.x
  • OpenSuSE 11.x – 12.1
  • Ubuntu 11.x

You can find the source code at CPAN and DAG provides RPMs for additional platforms here.

Security Script

A perl script to check for inconsistent, incorrect configurations that may be a sign of a security issue.  Checks for the following:

  • files assigned a UID or GID that has no associated account on the system
  • accounts with the following errors:
    • no password set and not locked
    • duplicate password hash
    • known password hash
    • duplicate names and UIDs
    • negative UIDs/GIDs
    • non-alphanumeric characters in loginname
    • login name greater than 31 characters long
    • login is expired (on platforms that support it)
  • group accounts with the following errors:
    • no password set and not locked
    • duplicate password hash
    • duplicate names and GIDs
    • negative GIDs
    • non-alphanumeric characters in group name
    • group name greater than 31 characters long
  • checksums changing on:
    • set UID/GID files
    • shared libraries
    • kernel modules
    • sudo configured commands
    • system admin defined files
  • block or character special devices in unusual locations
  • world exportable and writable NFS filesystems
  • intruder files (files that should not exist on the system).
  • users’s dot files with invalid permissions or ownership.
  • compare files with what the package management system expects:
    • Supports the following packaging systems
      • RPM
      • SVR4 (Solaris)
      • FreeBSD pkg_* and pkgng
      • Debian dpkgs
      • Apple macports (currently only building the security package itseif)
    • packages signed by a trusted gpg/pgp signature, RPM only
    • no untrusted gpg/pgp signatures installed, RPM only
    • file type, ownership, group, mode, modify time, checksum or size inconsistencies
    • missing files
  • what ports root is allowed to login to.
  • root default umask value.
  • sudoers configuration errors:
    • World or group writable scripts
    • commands not owned by root (bin on Solaris) or the user the command is run as
    • Accounts without password prompts
    • Commands that do not exist
  • Set UID/GID commands that are world writable

Results are mailed to an email address or logged to a file on the system.  The software currently is used on the following platforms:

  • CentOS 6.5
  • FreeBSD 10.0
  • Ubuntu 12.04
  • Mac OS X 10.9 (Mavericks)

It has been used in the past on the following platforms.

  • AIX 3.5, 4.3.3, 5.1
  • CentOS 5.2 – 6.4
  • Fedora 4 – 17
  • FreeBSD 1 – 9.3
  • IRIX 5.3, 6.2 – 6.5
  • RedHat Linux 5 – 9, Enterprise Linux 4, 5.x
  • Solaris 1.x, 2.0 – 2.6, 7 – 10
  • OpenSuSE 11.x, 12.1
  • Ubuntu 11.04
  • Mac OS 10.7 (Lion) & 10.8 (Mountain Lion)

Several releases, including the latest, are available here.

getresolution

A simple perl(1) script which will query the GUI root window to get the dimensions. Works on most UNIX systems as well as Max OS X. Uses xwininfo(1) on UNIX systems and system_profiler on Mac OS X. Script is available here.

xsysstats_wrapper

A little more complex perl(1) script than getresolution. This one will generate a valid xsysstats(1) command line options. Works on all X11 based UNIX systems that also has rpc.rstatd(8) support (not Mac OS X). Script is available here. Does require the use of getresolution

lscolors

A perl(1) script that will generate environment variables to control the color mapping for the GNU and BSD ls(1) commands so they are the same on both platforms.  The script will work for most shells.  Script is available here.

Usage: lscolors [ --help ] [ --layout LAYOUT ] [ --shell SHELL ] [ --n ]
	--help	This help screen
	--layout (bsd|gnu|modified)	Which color layout to use.
	--shell (ash|bash|borne|c|csh|cshell|korn|ksh|sh|t|tcsh|z|zsh) Which compatible shell syntax to use (defaults to ksh)
	--n	Just print the value and not the shell syntax

Leave a Reply