Showing posts with label UNIX. Show all posts
Showing posts with label UNIX. Show all posts

Saturday, February 23, 2008

SeamlessRDP - Seamless Remote Desktop Connection Shells for Terminal Services

SeamlessRDP is basically like VirtualBox or VMware Fusion Seamless Mode, but for Windows Applications. Or like doing ssh -X, but with Windows :-). Or Citrix or Tarantella (Sun Secure Global Desktop), etc.

It works with RDesktop/TSClientX.

Saturday, January 26, 2008

Disk monitoring and tuning with dd and S.M.A.R.T. - Reallocating bad sectors and predicting disk failure

What is S.M.A.R.T.?

Modern disk drives will automagically reallocate bad sectors on the fly, as soon as they encounter some kind of R/W/ECC error. But in order for this to happen, it must first access that sector. This is why you never see surface errors on modern disks.

Modern hard drives (ATA and SATA) have S.M.A.R.T. - Self-Monitoring, Analysis, and Reporting Technology. Once you have that enabled in BIOS (assuming you have a S.M.A.R.T. capable disk and controller) you can monitor a number of disk health and performance parameters.

What you should keep an eye on is the Reallocated Sectors Count (if the drive has a problem with a R/W/ECC error it will mark the sector "Reallocated" and transfer the data to a spare area on the disk). This will result in some performance decrease, and is a sign of imminent disk failure.


Monitoring S.MA.R.T.

ATA and SATA disks:

To monitor S.M.A.R.T. data you can use HDTune on Windows or SmartMonTools (smartd, smartctl) on Darwin (Mac OSX), Linux, FreeBSD, NetBSD, OpenBSD, Solaris, OS/2, or eComStation systems. If you're up to it, you can also use SmartMonTools on Windows.

USB Enclosures:
While in most cases you should have no trouble using HDTune or SmartMonTools, some USB drive enclosures may be resilient to monitoring with S.M.A.R.T. programs and will require vendor software. In such cases, you can download vendor software to perform monitoring, like "Western Digital Data LifeGuard Diagnostics".

iPods:
You can also get S.M.A.R.T. info on your iPod. You can either configure it to act as a pass through device (regular USB media) or boot your iPod in diagnostic mode. You can check S.M.A.R.T. disk data and perform more test on your iPod. To do so, you must reset your iPod and hold REW + Select (5G) at the Apple boot menu. For other iPod models, see here (or Google Apple Diagnostic Mode your iPod Model).

Forcing the disk to remap damanged sectors

Now you should know that if you see any problems with Reallocated Sector Count, Reallocated Event Count, Seek Error Rate, Offline Uncorrectable, UDMA CRC Error Count, Multizone Error Rate, Hardware ECC Recovered values, you should consider getting a new disk. These are all signs of a failing disk. Learn more about S.M.A.R.T. attributes and their meaning here. Note that depending on vendor, there may also be enhanced or propriotary S.M.A.R.T. attributes. Read your HDD vendor documentation.

But sometimes you just need to get a bit more life out of a disk, and force the disk to reallocated damaged sectors. You can do so easily by performing a full raw disk read and write operation. For this, you can use the UNIX "dd" tool. Make sure your target disks aren't mounted (Type "mount" to list mounted disks then use "umount disk").

You can perform a disk read operation (reading the whole disk) using a syntax similar to:

# dd if=/dev/disk of=/dev/null bs=2048
You can perform a disk write operation (zero out the disk, this WILL result in data loss) using syntax similar to:
# dd if=/dev/zero of=/dev/disk bs=2048
Now you may wish to perform both a read and write at the same time, and not wipe out your disk data (zero it out). You can perform such a "disk refresh" using syntax similar to:
# dd if=/dev/disk of=/dev/disk bs=1m
This will read and rewrite the data to disk in 1MB chunks to prevent presently recoverable read errors from progressing into unrecoverable read errors.

Of course, you should read the dd manpage for your OS (on Windows you could use a dd for Windows implementation or resort to some sort of Linux or BSD LiveCD). Replace /dev/disk with your disk (make sure you're using the right disk). On Linux you can find out what disk you need to use from "dmesg" or /proc/partitions:
# cat /proc/partitions
You can also use "fdisk -l" to list partitons on your disk, see if that's the right disk
# fdisk -l /dev/hda
Do note that you need root permissions for all of this activity, so on some Linux systems you may need to use "sudo -i" to get a root shell, or precede all operations with "sudo".

While you're doing this rewrite operation, you should monitor the kernel log (dmesg). You can monitor /var/log/messages for this:
# tail -f /var/log/messages
You usually watch out for "DriveReady SeekComplete Error status=0x51 DriveStatusError error=0x04" or some other error.

You should also keep an eye on the Reallocated Sectors and other Interesting Parameters in smartctl:
# smartctl -A /dev/hda
Do this every now and then, and note the values before you've started the operation.

Once you begin the "dd" operations you can send dd a SIGINFO signal (use pkill / kill / whatever) to make it print out I/O information (progress). Some shells / TERMS also respond to Ctrl-T by sending SIGINFO.
# pkill -SIGINFO dd

Once you're done with dd and S.M.A.R.T. tools you should also perform a filesystem check (fsck / chkdsk / whatever).

Conclusions:
  1. Monitor S.M.A.R.T. data with smartclt, keep an eye on Reallocs. Consider getting a new disk if you see reallocated sectors
  2. Perform a disk refresh with dd in order to prevent recoverable read errors from progressing into unrecoverable errors. You don't need fancy tools like SpinRite.
  3. You can use a simple Linux or BSD LiveCD to perform the disk refresh.
  4. This is NOT a data recovery procedure. If you're doing data recovery, use something like dd_recover to a separate media.
  5. This is NOT a step by step tutorial. Read your OS manpages to make sure you're not wiping out the wrong disk or something.
  6. Always monitor S.M.A.R.T. parameters in order to spot disk failure before it happens.
  7. Always keep backups.

Links and resources:

Friday, January 18, 2008

WinDirStat - KDirStat graphical disk usage utility clone for Windows

If you're familiar with KDirStat (or even Baobab) Disk Usage Analyzers in *NIX, you'll be happy to know there's a clone for Windows (yes, WinDirStat is the clone). Makes disk cleanup so much easier.

Just grab WinDirStat from the SourceForce page, and run it. You'll get a nice graphical view of disk usage.


Anyway, if you use Linux/BSD/whatever just use Baobab (Gnome Disk Usage Analyzer - part of gnome-utils package), KDirStat part of KDE or Filelight.

You can also get Scanner if you like that Baobab / Filelight PIE chart view, get Scanner on Windows.

Wednesday, January 09, 2008

Latest ZFS binaries and source code for MacOS available

The latest binaries and source code of the Zettabyte Filesystem for MacOS are now available:
http://zfs.macosforge.org/

Friday, January 04, 2008

DragonFlyBSD - HAMMER Filesystem

The DragonFlyBSD HAMMER Filesystem has made progress. DragonFlyBSD 2.0 is expected shortly, so it may well be worth a look.

Wednesday, January 02, 2008

Using GNU screen as a terminal emulator for serial null modem connections

Don't have tip / cu / minicom / kermit / hyperterminal / securecrt / an old vt100 / whatever around or just love GNU Screen? Here's a cool tip:

Start a screen session on the serial console at 9600baud:

$ screen /dev/ttyS0 9600

Too slow and your setup can handle it? Use 115200 baud:

$ screen /dev/ttyS0 115200
So, how do you send a break? C-a B. Just use Ctrl-a ? for help.

Monday, December 24, 2007

Run ancient UNIX v5 on your Gameboy with gbaunix

Bored? Why not run UNIX 5th edition on your gameboy..

http://www.kernelthread.com/publications/gbaunix/



Double bored? Emulate the GBA :P.

Sunday, December 23, 2007

Free Veritas Cluster Server (VCS) Simulator

Veritas Cluster Server (VCS) is a High Availability (HA) cluster software for Linux, UNIX and Windows systems.

Symantec (they have bought Veritas) offers a freely available VCS emulator software that lets you train your skills :-).

You can also use the freely available documentation. Here is the Solaris Veritas Cluster Server (VCS) manual.

Of course, you could just grab the trial and run 2 Solaris (or Linux) virtual machines in VMware Server :-).

Friday, December 21, 2007

A brief look at ClamAV security - Open Source Antivirus

A brief (over)look at ClamAV security and performance. Comparing Open Source Antivirus products with commercial products.

I've been looking into signature based open source security products lately, namely Antivirus software (for SMTP E-Mail gateways or File Servers or anything that would be used as a distribution point for example as well as for Desktop systems).

I've had a pretty good look at ClamAV and other ClamAV based products (ClamWin or Spyware Terminator which include the ClamAV Engine) and found them rather weak, both from a security point of view (vulnerabilities) and in terms of detection rates, as well as performance (speed) and usability (interface, features, etc).

Clam AntiVirus (ClamAV) is an open source (GPL) anti-virus toolkit for UNIX (also ported to Windows, and used by GUI products such as ClamWin) designed especially for e-mail scanning on mail gateways. It provides a number of utilities including a flexible and scalable multi-threaded daemon, a command line scanner and advanced tool for automatic database updates. The core of the package is an anti-virus engine available in a form of shared library.


I. Security track record - a look at common vulnerabilities

So let's take a look at ClamAV's security track record. A simple look on Secunia at the vulnerability summary reveals a stunning 25 security advisories (1 unpattched), 31 % of which lead to System Access and 91 % are exploitable from remote. 40 % of vulnerabilities are "Highly Critical". I realize that some of these are in 3rd party plugins and compression tools and such, but when an attacker just sends a specially crafted archive via E-mail or whatever means, and manages to buffer overflow and gain system access when ClamAV scans it, that's when you need to look at other products. There are ways to mitigate it, with permissions, limited users, chroots, jails and such, but still...




So let's compare that with another security product, Avira Antivir, basically multi-platform Antivirus software (also has a free version for non-commercial usage). We can see only 2 security vulnerabilities reported, both local and privilege escalation (Windows only too).



Vulnerabilities range from Denial of Service: "A NULL-pointer dereference error exists within the "cli_scanrtf()" function in libclamav/rtf.c. This can potentially be exploited to crash ClamAV via a specially crafted RTF file." to Buffer Overflow and System Access: "An integer overflow error in rebuildpe.c when rebuilding PE files after unpacking can be exploited to cause a heap-based buffer overflow via a specially crafted executable. Successful exploitation of this vulnerability may allow execution of arbitrary code."


II. Vulnerability assessment tools - Static Code Analsys


What about a source code audit of ClamAV? Well, I don't really have the time for that, but I did parse it through Flawfinder, RATS and other Static Code Analysis tools looking for simple lexical "bad practices" and functions (strings functions for example) that may overflow buffers and so on.

So, I download the source code for the latest stable release: ClamAV 0.91.2 (signature) and stumble across a ton of bad programming practices. While most of the time, they mean nothing (as they aren't really vulnerabilities or even exploitable, they are usually where most errors occur, and, as such, should be avoided). We basically have hundreds of such occurrences (537 marked as High and 83 marked as Medium by RATS), so I'm just going to paste a few interesting examples here:

..\clamav-0.91.2/clamav-milter/clamav-milter.c:266: High: fixed size local buffer
Extra care should be taken to ensure that character arrays that are allocated on the stack are used safely. They are prime targets for buffer overflow attacks.

..\clamav-0.91.2/clamav-milter/clamav-milter.c:859: High: getopt_long
Truncate all input strings to a reasonable length before passing them to this function

..\clamav-0.91.2/shared/getopt.c:961: High: fprintf
Check to be sure that the non-constant format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle.

..\clamav-0.91.2/sigtool/vba.c:1127: High: sprintf
Check to be sure that the format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. Additionally, the format string could contain `%s' without precision that could result in a buffer overflow.

..\clamav-0.91.2/clamav-milter/clamav-milter.c:1205: High: popen
Argument 1 to this function call should be checked to ensure that it does not come from an untrusted source without first verifying that it contains nothing dangerous.

..\clamav-0.91.2/clamav-milter/clamav-milter.c:1404: High: getenv
Environment variables are highly untrustable input. They may be of any length, and contain any data. Do not make any assumptions regarding content or length. If at all possible avoid using them, and if it is necessary, sanitize them and truncate them to a reasonable length.

..\clamav-0.91.2/shared/output.c:159: High: umask
umask() can easily be used to create files with unsafe priviledges. It should be set to restrictive values.

..\clamav-0.91.2/clamav-milter/clamav-milter.c:1585: High: gethostbyname
DNS results can easily be forged by an attacker (or arbitrarily set to large values, etc), and should not be trusted.

..\clamav-0.91.2/clamav-milter/clamav-milter.c:1703: High: strcpy
Check to be sure that argument 2 passed to this function call will not copy more data than can be handled, resulting in a buffer overflow.


..\clamav-0.91.2/shared/misc.c:132: High: printf
Check to be sure that the non-constant format string passed as argument 1 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle.

..\clamav-0.91.2/shared/output.c:235: High: syslog
Truncate all input strings to a reasonable length before passing them to this function

..\clamav-0.91.2/freshclam/manager.c:1307: High: system
Argument 1 to this function call should be checked to ensure that it does not come from an untrusted source without first verifying that it contains nothing dangerous.

..\clamav-0.91.2/sigtool/sigtool.c:815: High: strcat
Check to be sure that argument 2 passed to this function call will not copy more data than can be handled, resulting in a buffer overflow.

..\clamav-0.91.2/libclamav/hashtab.c:408: High: sscanf
Check to be sure that the format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. Additionally, the format string could contain `%s' without precision that could result in a buffer overflow.

..\clamav-0.91.2/shared/options.c:194: High: strncat
Consider using strlcat() instead.

..\clamav-0.91.2/shared/options.c:194: High: strncat
Check to be sure that argument 1 passed to this function call will not copy more data than can be handled, resulting in a buffer overflow.

..\clamav-0.91.2/shared/getopt.c:983: High: getopt
Truncate all input strings to a reasonable length before passing them to this function

..\clamav-0.91.2/shared/output.c:212: High: vfprintf
Check to be sure that the non-constant format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle.

..\clamav-0.91.2/sigtool/sigtool.c:609: High: scanf
Check to be sure that the format string passed as argument 2 to this function call does not come from an untrusted source that could have added formatting characters that the code is not prepared to handle. Additionally, the format string could contain `%s' without precision that could result in a buffer overflow.

..\clamav-0.91.2/test/pe/debugpe.c:165: Medium: signal
When setting signal handlers, do not use the same function to handle multiple signals. There exists the possibility a race condition will result if 2 or more different signals are sent to the process at nearly the same time. Also, when writing signal handlers, it is best to do as little as possible in them. The best strategy is to use the signal handler to set a flag, that another part of the program tests and performs the appropriate action(s) when it is set.
See also: http://razor.bindview.com/publish/papers/signals.txt

..\clamav-0.91.2/libclamav/mbox.c:4659: Medium: getc
Check buffer boundaries if calling this function in a loop and make sure you are not in danger of writing past the allocated space.

..\clamav-0.91.2/sigtool/sigtool.c:172: Medium: read
Check buffer boundaries if calling this function in a loop and make sure you are not in danger of writing past the allocated space.

..\clamav-0.91.2/clamav-milter/clamav-milter.c:4260: Medium: stat
A potential TOCTOU (Time Of Check, Time Of Use) vulnerability exists. This is the first line where a check has occured. The following line(s) contain uses that may match up with this check: 4269 (open)

..\clamav-0.91.2/sigtool/vba.c:1063: Medium: realloc
Don't use on memory intended to be secure, because the old structure will not be zeroed out.

..\clamav-0.91.2/libclamav/lockdb.c:246: Medium: SetSecurityDescriptorDacl
If the third argument, pDacl, is NULL there is no protection from attack. As an example, an attacker could set a Deny All to Everyone ACE on such an object.

..\clamav-0.91.2/libclamav/msexpand.c:130: Medium: fgetc
Check buffer boundaries if calling this function in a loop and make sure you are not in danger of writing past the allocated space.

..\clamav-0.91.2/libclamav/others.c:433: Medium: srand
Standard random number generators should not be used to generate randomness used for security reasons. For security sensitive randomness a crytographic randomness generator that provides sufficient entropy should be used.

..\clamav-0.91.2/libclamav/others.c:697: Medium: lstat
A potential TOCTOU (Time Of Check, Time Of Use) vulnerability exists. This is
the first line where a check has occured.
The following line(s) contain uses that may match up with this check:
699 (rmdir), 715 (unlink)

..\clamav-0.91.2/contrib/Windows/Projects/clamAV/libclamav/regex.c:70: Medium: realloc
Don't use on memory intended to be secure, because the old structure will not be zeroed out.


You should keep in mind that ClamAV also relies on 3rd party libraries and tools, and it's security also depends on those. Again, I remind you that these aren't actual vulnerabilities, just bad practices that MAY lead to such vulnerabilities. You would need to look at the code and employ various testing tools to find them.

The authors of ClamAV should really solve these problems like OpenBSD developers do, even if it is something as simple as replacing strncat() with strlcat() - functions designed to be safer, more consistent, and less error-prone (this would be an issue on other platforms though, so it's not as simple as that).


III. Detection rates
So, here are some tests made by various research projects:

AV-Test is an anti-virus research project at the Institute of Technical and Business Information Systems at the Otto-von-Guericke University Magdeburg (Germany).

They measured the detection times for six of the malware programs released last week utilizing the MS05-039 Plug and Play vulnerability under 36 different anti-virus products. Eleven of the products were able to detect one or more of the attacks proactively, without any special pattern update to identify it specifically. Here are the numbers for each of the eleven:

Product Score
BitDefender 6 of 6 Fortinet 6 of 6 Nod32 5 of 6 eSafe 3 of 6 F-Prot 3 of 6 Panda 3 of 6 QuickHeal 3 of 6 McAfee 2 of 6 Norman 2 of 6 AntiVir 1 of 6 ClamAV 1 of 6

AV Comparatives did a test on various other Antivirus products not in their current testing process, including the ClamAV based ClamWin. Here are the results:
http://www.av-comparatives.org/seiten/ergebnisse/2ndgrouptest.pdf

This test also places ClamAV among the last in terms of detection rates:
http://www.sunbelt-software.com/ihs/alex/malwarereportjun3007.pdf

ClamAV also scores a 17 % (sig: 99% / heur: 1%) in retrospective Antivirus Performance Statistics, which also placed it among the last.

At VirusPool Tested Products ClamAV scores:

Number of descriptions in the database: 31928 out of 45159 live samples ( 70.7 %)
Number of 'in the wild' descriptions in the database: 25 out of 30 live samples ( 83.3 %)
(not very good, but not all that bad)

IV. Signature Updates:


How often is the clamav-virusdb updates? According to the FAQ, multiple times a week, and the response should be rather prompt. Anyway, to get an idea on that, take a look at http://lurker.clamav.net/list/clamav-virusdb.html

Conclusion:

I definitely need to investigate this further, but so far I find ClamAV to be highly overrated, simply based on the fact it is "part of the open source movement". It lacks a real time scanner (that's fair seeing how it was designed for mail gateways though), it has a horrible security track record, poor detection rates and dreadful performance. I somewhat doubt that it would last long as a commercial product. Still, it is available on multiple platforms, and the cost is just about right :-).

Things aren't all bad though (and I may have been to rash and only brushed the surface here). ClamAV is a free product (open source even), and it does leave a lot of room an opportunity to evolve. I just don't see this happening without powerful commercial backing. If you plan on using it though, make sure you've got at least another product scanning your emails :-).

Other links:
http://www.av-comparatives.org/
http://www.virustotal.com/

Windows Automated Installation Kit - Unattended Vista installation

Windows Automated Installation Kit (WAIK) lets you install, customize, and deploy the Microsoft Windows Vista. It lets you perform unattended installations of Windows, create Windows Images with ImageX and create Windows PE images. This is basically like vLite (Windows Vista Configuration Tool), but, well.. official :-).

Download the Windows Automated Installation Kit (WAIK) User's Guide for Windows Vista here.

Download the Windows Automated Installation Kit (AIK) here.

Deploying Windows Vista TechNet.

You may also want to look at Business Desktop Deployment 2007 for Windows Vista and Office 2007 deployment scripting and tools.

Download Business Desktop Deployment 2007 here.

More tools and ways for Enterprise mass Windows deployment here.

For UNIX deployment tools and procedures go here.

Monday, December 17, 2007

Unlocking MacOS FileVault Whitepapers, Video and Audio

FileVault is an encryption system found in Apple's Mac OS X v10.3 and later. It has quite a history of being vulnerable to watermarking attacks, not encrypting the swap file by default (although that option has been added later) so that the keys could be carved out of the page file, etc...

A few resources on FileVault (AKA VileFault) shortcomings:

Tuesday, December 11, 2007

PersonalAlpha - Alpha CPU Emulator lets you run OpenVMS or Tru64 UNIX on your PC

I already told you about SIMH, the VAX emulator, now it's time to look at a working Alpha emulator (there is another one I know of that works, but it's rather expensive and intended for development purposes). This means you can run OpenVMS or Tru64 UNIX right at home, on your PC :-).



PersonalAlpha is a Alpha emulator that can run OpenVMS or Tru64 right on your i386 desktop machine.

You can use 128 MB of emulated Alpha memory, 1 Ethernet adapter, VT-terminal emulation and 4 disks.

Minimum requirements: A Windows machine, 1 GHz CPU, 1 GB of memory(512 MB will run with performance penalty), 1 Ethernet adapter and 4 GB of free disk space.

Now all you need to do is join the DECUS society (or Encompassus) and get yourself that free OpenVMS hobbyist kit and you're good to go :-).

Also, check out Virtutech Simics.


Various links and resources to other Alpha emulators / simulators /whatever:
http://www.simplescalar.com/
http://www.yuba.is.uec.ac.jp/~kis/SimCore/functional.htm
http://www.cs.ucsd.edu/users/tullsen/smtsim.html
https://systems.cs.colorado.edu/DistributedSoftware/Aint/
http://www.encompasserve.org/DECUServe/DECnotes/VMS/3411.1.HTML
https://systems.cs.colorado.edu/DistributedSoftware/Aint/

Monday, December 10, 2007

Xenix - a blast from the past - Looking back at Microsoft UNIX

Xenix was Microsoft's version of UNIX, licensed from AT&T back in the late 70s, then later acquired by the Santa Cruz Operation (SCO) and distributed as SCO UNIX. Microsoft did not sell Xenix directly to end-users, but instead licensed it to OEMs.

Xenix was originally based AT&T UNIX System III, but also incorporated elements from BSD. Version 2.0 was based on UNIX System V, and later ported to 32bit / i386, and also introduced TCP/IP and SCSI support.

Trusted Information systems also developed a Trusted Xenix variant, using the Bell-LaPadula model of multilevel security and achieved a NSA B2 rating (TCSEC) - the second highest rating ever achieved by an evaluated operating system.

Overall, it was a pretty complete UNIX system (later versions got as large as 96 5.25" floppy disks) and came with The X Window System, ed, vi, sh, csh, vsh, uucp, terminfo, mapchan and so on.

Good news is, you can run it yourself. There's at least 3 ways to run Xenix:

I. i386 Xenix

  1. Track down a 386 version... my floppies are all dead X-D
  2. Install using qemu
II. Tandy Xenix
  1. Get the Xenix floppy images from http://www.catcorner.org/Tandy/ - This is a complete Xenix install for the Tandy 6000 series.
  2. Get a Tandy 6000 or write an emulator (none exists from what I've seen).
III. Apple LISA Xenix!
  1. Get a copy of Xenix for LISA: http://memo5.dyndns.org/Sites/Lisa/softs/othersofts.html - it took me a while to track this one down.
  2. Get a LISA Emulator: http://lisa.sunder.net - LisaEM is an Open Source multiplatform LISA Emulator.
  3. Enjoy!



Here's some Xenix documentation to get you started: http://www.tenox.tc/docs/
Discussions: http://groups.google.com/group/comp.unix.xenix.sco/topics

Thursday, November 29, 2007

Malware and rootkit detection with Strider, RootKitRevealer and Rootkit Hunter

Removing nasty rootkits or spyware protected by "Hacker defender" and friends:

Strider GhostBuster detects API-hiding rootkits by doing a "cross-view diff" between "the truth" and "the lie". It's not based on a known-bad signature, and it does not rely on a known-good state. It targets the fundamental weakness of hiding rootkits, and turns the hiding behavior into its own detection mechanism.

It is similar to Mark Russinovich's RootkitRevealer from Sysinternals. Another interesting tool is Sophos Anti-Rootkit.

Also worth taking a look at LiveKd - run Kd and WinDBG kernel debuggers on a live system.

For a Linux/BSD/UNIX tool, take a look at Rootkit Hunter.

Wednesday, November 21, 2007

UNIX Deployment Tools - JumpStart, IgniteUX, NIM, KickStart, AutoYaST, FAI

Bare metal recovery and mass deployment tools for UNIX and UNIX-like systems:

On Windows there's RIS, WDS or tools like Ghost, on UNIX platforms we have tools like JumpStart, IgniteUX, NIM, FAI, KickStart, etc. to help with massive deployment of operating systems.

UNIX:

  • Sun Solaris - Custom JumpStart and Advanced Installations - The custom JumpStart installation method is a command–line interface that enables you to automatically install or upgrade several systems, based on profiles that you create. The profiles define specific software installation requirements. You can also incorporate shell scripts to include preinstallation and postinstallation tasks. You choose which profile and scripts to use for installation or upgrade. The custom JumpStart installation method installs or upgrades the system, based on the profile and scripts that you select. Also, you can use a sysidcfg file to specify configuration information so that the custom JumpStart installation is completely hands-off.
  • Sun Solaris - JumpStart Enterprise Toolkit: provides a framework to simplify and extend the JumpStart functionality provided within the Solaris Operating System.
  • Sun Solaris Flash Archives (flar) - can be used with JumpStart technology to automate and speed up deployment or disaster recovery.
  • HP HP-UX Ignite-UX - is an administration toolset that allows: Simultaneous installation of HP-UX on multiple clients, The creation and use of custom installations, The remote recovery of clients, The creation of recovery media.
  • IBM AIX mksysb/mkcd/mkdvd: The mksysb command creates a backup of the operating system (that is, the root volume group). You can use this backup to reinstall a system to its original state after it has been corrupted. If you create the backup on tape, the tape is bootable and includes the installation programs needed to install from the backup.
  • IBM AIX NIM - Network Installation Management - is an excellent feature of the AIX operating system and is very important for teams or companies that have a need to install or upgrade many RS/6000 machines with the same images at the same time. NIM supports the use of mksysb images. Performing a NIM mksysb installation is faster than performing a NIM rte installation, and with mksysb, you can optionally include other installed software. You can use a mksysb image to install the nodes of a CSM cluster.

Linux:
  • RedHat Linux Kickstart provides automation of Linux installation that uses a single kickstart file to install the system on multiple machines.
  • SUSE Linux AutoYaST - Automatic Linux Installation and Configuration with YaST2. AutoYaST allows unattended and automated installation. With AutoYaST, administrators can create a consistent baseline configuration for new installations in large or expanding deployments. In addition to AutoYaST, other installation methods include PXE Boot, CD-ROM, NFS, CIFS/SMB, HTTP, FTP, and the Service Location Protocol (SLP), which allows autodetection of install servers. ALICE, SuSEs former auto-installation system was a system built around the auto-installation features that were available with YaST1. In order to be able to use existing ALICE configuration files and resources, a special option is provided in the configuration system will let you convert ALICE configuration files into a control file readable by AutoYaST.
  • Debian GNU/Linux FAI - Fully Automatic Installation - is an automated installation tool to install or deploy Debian GNU/Linux and other distributions on a bunch of different hosts or a Cluster. FAI can also be used for configuration management of a running system.

BSD:
  • Automatic OpenBSD Installation - Jumpstart-style procedure for installing OpenBSD servers
  • FreeBSD "JumpStart" Guide - This article details the method used to allow machines to install FreeBSD using the Intel PXE method of booting a machine over a network. Use sysinstall install.cfg for scripting.
  • BSD PXEBoot - while not unassisted, BSD systems can easily boot from PXE and install over the network.

Tools:
  • Cfengine - an adaptive system configuration management engine - is an automated suite of programs for configuring and maintaining Unix-like computers. It has been used on computing arrays of between 1 and 20000 nodes.

Tuesday, November 20, 2007

Sun Shared Shell - Collaborative Remote Access

Sun Shared Shell (Shared Shell) is a collaborative service tool that allows, under your control, Sun Services engineers to remotely view and diagnose your Sun products. It is a Java application that provides secure, shared, remote access to a shell session that both customers and Sun Services engineers view at the same time. You can invite your collegues or additional Sun engineers to participate in the conference as needed. You are always in control of who participates and who has access to the remote access session.

It provides SSH or Telnet proxy services (tunneling SSH or telnet over HTTPS proxy).

Monday, November 19, 2007

VMware - using named pipes to redirect serial console output

Most kernel debuggers (and some headless operating systems) require the use of a serial console. When running inside a VMware virtual machine, this could complicate things.

A neat way to solve this problem (and get your self a home made "LOM") is to use named pipes (well, it's actually a Unix Domain Socket) to redirect serial output to a TCP port.

Just add a Serial Port to your Virtual Machine, set the Virtual Machine end as the client, and the other end to an application.



Now we'll need to make use of a Named Pipe TCP Proxy Utility.

Windows users will probably pick NPTP (it has an easy to use GUI) and UNIX users (well, Linux, since VMware supports that) will pick something like Socat (an extended netcat that supports pipes, etc).



Some Windows user may prefer a command line alternative (with source code available). VMwareGateway also supports running as a service. It listens on localhost on port 567. The name of the pipe is \\.\pipe\vmwaredebug.




So, what about those who run VMware on Linux?

Well, we'll create a serial port in VMware, same as above, and point it to a file.
Then, we'll use socat:


% socat -d -d -d /path/to/port tcp4-listen:6666


See the socat manpage and examples for more info.


What about people who can't run VMware (eg: not running Linux or Windows)?

Well, qemu supports serial port redirection! See the '-nographic' option.

Friday, November 16, 2007

qemu - kqemu accelerator ported to other platforms

QEMU is a generic and open source machine emulator and virtualizer. When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. A host driver called the QEMU accelerator (also known as KQEMU) is needed in this case. The virtualizer mode requires that both the host and guest machine use x86 compatible processors.

QEMU Accelerator (KQEMU) is a driver allowing the QEMU PC emulator to run much faster when emulating a PC on an x86 host. It basically makes qemu speeds comparable to those of VirtualBox or VMware.

KQemu has been ported to various platforms (x86):

Wednesday, November 14, 2007

IBM's AIX 6.1 released, Open BETA ended

The AIX 6.1 open beta has ended, and AIX 6.1 has been released. Those with older processors such as Power 3 will need to upgrade (to POWER6, POWER5, Power 4 or PPC970 processors) if they plan to run AIX 6.1.

Cool new features in 6.1:

  • Workload Partitions
    A new, software based, virtualization approach that complements the existing IBM System Logical Partitions by reducing the number of operating system images that have to be managed when consolidating workloads.
  • Role Based Access Control
    Provides improved security and manageability by allowing administrators to grant authorization for management of specific AIX resources to users other than root by associating those resources with a role that is then associated with a particular system user.
  • AIX Security Expert enhancements
    The AIX Security Expert has been enhanced to provide an option to store security templates directly in a Lightweight Directory Protocol (LDAP) directory—simplifying implementation of a consistent security across an entire enterprise.
  • Name Resolver Caching Daemon
    The Name Resolver Caching Daemon is a new facility to cache host lookup information locally which can improve the performance of applications that access this type of information multiple times.
  • probevue dynamic tracing
    probevue is a new dynamic tracing tool that can simplify debugging complex system or application code. This tool allows a developer or system administrator to dynamically insert trace breakpoints in existing code without having to recompile the code.
  • System Director Console for AIX
    This new facility provides direct access to the System Management Interface Tool (SMIT) in a Web browser. The System Director Console for AIX is included with AIX 6 and does not require any other Web server or other software.

MIT releases the source code for MULTICS

Multics (Multiplexed Information and Computing Service) was early mainframe time-sharing operating system, and a predecessor to UNIX. Thanks to MIT, Multics is now OpenSource!