All posts by bsdman

Currently working as an IT Manager. Worked for an OIT company as a Network Engineer in 2011. Worked for a Medical IT company as the Network Administrator 2009-2011. Worked as the Senior Systems Administrator at a computer reseller from 2005-2009. Worked as a Computer Consultant for several small companies from 2007-2009. Worked as a Computer Technician at a computer reseller from 2002-2004.

LAMP on Debian

LAMP is Linux Apache MySQL PHP. Debian is the primary for Ubuntu.

Tried to install Ubuntu server 8.10 on an HP DL380 G4 with mixed results. Grub was failing on me. Instead of trying to fix it I just took a Debian 5 CD and wrote it over. Only problem is no LAMP – Ubuntu is much better for setting up initially, but both OSes are basically the same.

nano /etc/apt/sources.list
remove the cdrom

apt-get update
apt-get upgrade
apt-get install ssh-server

apt-get install apache2
apt-get install apache2-mpm-prefork
apt-get install php5

apt-get install mysql-server php5-mysql
apt-get install phpmyadmin
apt-get install webmin
apt-get install libapache2-mod-php5 php5-cli php5-common php5-cgi

nano /etc/apache2/apache2.conf
AddType application/x-httpd-php .php
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.shtml index.htm

I installed SSH so I could remotely do the rest of the work.

At this point, you should be able to go to http://youripaddress and see a generic “IT WORKS!” apache page.
You can also go to http://youripaddress/phpmyadmin and load up the phpmyadmin page. I suggest prohibiting this from being viewed outside your internal subnet using access rules in apache.
Then you can go to http://youripaddress:10000 and view the webmin page

Potential Problems:
Your repository list is incorrect.
nano /etc/apt/sources.list
deb ftp://ftp2.fr.debian.org/debian/ stable main contrib non-free
deb-src ftp://ftp2.fr.debian.org/debian/ stable main

You can not apt-get webmin:
wget http://voxel.dl.sourceforge.net/sourceforge/webadmin/webmin_1.460_all.deb
dpkg -i webmin-1.460_all.deb
apt-get install -f

You want ASP support on this Linux Box:
apt-get install libapache-asp-perl

You want to edit the sudoers list:
apt-get install sudo
visudo
Uncomment the following line:
%sudo ALL=NOPASSWD: ALL

Install XP From USB Key

I say USB Key, but there are a number of other buzzwords you can use: key fob, flash drive, thumb drive… the list goes on for a little while.

Things you need:
Computer that allows booting via USB/removable drives
USB Key with at least 1GB of free space – your key will be erased during the steps, so make sure nothing important resides on your device
A copy of Windows XP

After searching for a little bit on how to install XP from an external source, I found this script suite:
USB_MultiBoot_10.rar (10.9MB RAR format). Obviously you’ll need a program like WinRAR to open it.

How to run the script:

1.) Open USB_MultiBoot_10.cmd
2.) Press any key to pass the instructions
3.) Press P – this will load up the PeToUSB.exe (Preinstallation Environment To USB) that will format your USB key to allow it to be bootable. Make sure Quick Format and Enable LBA (FAT16X) are checked. Then press Start.
4.) When you close out of PeToUSB.exe, the command script will continue.
5.) Options – press the option number or letter and then hit enter:
Option 0 should already be set to USB-stick
Option 1 should be setup to point to your XP CD
The other options generally will not be needed/do not apply.
6.) When finished, press C and enter. This will add all the files needed to the USB key.
7.) When finished, try it out on your laptop/desktop
8.) My installation actually had an error – it was missing a flash file DLL, I skipped the error and everything else worked just fine.

I also recommend using nLite or another program to slipstream all necessary files on your Windows Disk BEFORE going through all these steps. But that is not a necessary step.

PDF Exploits

I usually don’t do this, but since not all the information seems to be in a single spot I’m compiling a bit.

Adobe released the following:
http://www.adobe.com/support/security/advisories/apsa09-01.html

A critical vulnerability has been identified in Adobe Reader 9 and Acrobat 9 and earlier versions. This vulnerability would cause the application to crash and could potentially allow an attacker to take control of the affected system. There are reports that this issue is being exploited.

Adobe is planning to release updates to Adobe Reader and Acrobat to resolve the relevant security issue. Adobe expects to make available an update for Adobe Reader 9 and Acrobat 9 by March 11th, 2009. Updates for Adobe Reader 8 and Acrobat 8 will follow soon after, with Adobe Reader 7 and Acrobat 7 updates to follow. In the meantime, Adobe is in contact with anti-virus vendors, including McAfee and Symantec, on this issue in order to ensure the security of our mutual customers. A security bulletin will be published on http://www.adobe.com/support/security as soon as product updates are available.

All documented security vulnerabilities and their solutions are distributed through the Adobe security notification service. You can sign up for the service at the following URL: http://www.adobe.com/cfusion/entitlement/index.cfm?e=szalert

It affects all versions of Adobe’s Acrobat (Pro, Standard, and Reader) version 9, 8, 7, and potentially 6/5. Currently the exploit uses JavaScript to call on memory that hasn’t been allocated properly and causes exceptions and an application failure. So, at a minimum, this exploit will crash out your Adobe Acrobat. At a maximum, it can open up your entire system to “bad things”. The exploit in the wild, as of right now, only uses javascript. Therefore, one can simply follow these steps:

Open Adobe Acrobat Reader (version 8 or 9)
Click Edit >> Preferences
Scroll down to JavaScript and uncheck Enable Acrobat JavaScript
Click OK

Or if you would prefer to use registry keys (and if you’re like me and use GPO’s to deploy the registry key imports at startup) here they are:

Add the key HKCU\software\adobe\acrobat reader\x.0\JSPrefs
Add a DWORD "bEnableJS", set value to 0
also make sure you look in HKCU\software\adobe\adobe acrobat\.. as well. The same thing applies to all versions.

It should be noted that JavaScript is merely used as the compiling tool in this case. Without JS enabled, the exploit STILL EXISTS, it’ll just be harder (in theory) to write for.

ESXi Enable SSH

This is one of those topics that is very easy to find on google, but I’m posting anyway.

Go to the console of your VM ESXi machine
Press Alt + F1
The password is “unsupported”
vi /etc/inetd.conf
Find the #SSH, and move the cursor over the #
x
X will delete the character under the cursor. i for insert before cursor. r for replace the current character with the character typed next.
:wq
: puts the vi editor into the command mode, w for write, q for quit.
Reboot your server

Reprogram Your ATT Phone

I don’t recommend doing this as it may actually make your phone unusable. I recently acquired an iPhone (November 2008) and have been itching to mod it a little bit. No, I haven’t tried the jailbreak technique as I prefer to keep everything simple on my phones. But as soon as the warranty is up, you betcha.

Anyway, I just signed up for a service called TrapCall (TrapCall.com) and it required me to setup my phone to do automatic forwarding of voicecalls. So I decided to write down the steps required to undo and redo this setup (in case this company goes bye bye).

Program:
All you have to do is dial *004*18669676590*11# and hit SEND!

Unprogram:
All you have to do is dial ##004# and hit SEND!

That got me to thinking, what if I typed in 1800XXXXXXX*11# instead? Can I actually get this to forward anywhere I want? That’s pretty cool actually.

Format Large HD FAT32

If anyone has done disk backups using the DOS Ghost client (or other DOS based clients) you have probably had some issues with NTFS. Don’t get me wrong, NTFS is a pretty decent file system, but FAT32 is noticeably more compatible.

Getting a drive that’s NTFS to work on DOS/MAC/Pre-Windows 98/Linux is sometimes a PITA.

Most external drives come preformatted as FAT32 for this very reason. If you need it NTFS that’s no big deal – just open up the disk manager in Windows and blast away (diskmgmt.msc). Windows, however, has a limit on formatting for FAT partitions: 32GB. Whoopie.

The easiest way is to use a disk formatting utility (Hiren’s has some good ones on there). The second easiest is to use DOS style commands.

Start
Run
CMD
format /FS:FAT32 G:
Y

The command can be broken down as follows:
Format – this is the actual command
/FS:FAT32 – Filesystem Fat32
G: – the drive letter of the drive you want to reformat

***EDIT***
Apparently you can also use several freeware programs. One that was given to me is called Swissknife.

VMWare HA ESXi

I’ve been reading a ton about high availability servers. A ton. And since we’ve been using the vmware free servers since 1.0, I guess it’s about time to get caught up on them again.

VMWare server 1.* was great – it’s free, ran reasonably well, and is free. The problem, however, was no native 64bit support, horrible RAM management, and no USB 2.0 support.

Welcome to VMWare server 2.*. Runs fairly well, is still free, and has 64bit support. No other options/features though.

So then I wanted to dabble in with HA – I need ESX right? ESX server costs money. My budget is pretty low at the moment so not-free is out of the question.

ESXi is free, however, so we’ll use that. Unfortunately you need to have at least 3 full-time servers for this to work (1 as a server manager, 2 as the mirrored servers)

First, download ESXi 3.5.*.
Then, burn the image to a CD
Load said CD into a server
Install on said server
Repeat on at least one other server

You should now have two fully functioning ESXi servers.

On your third server, install some version of Windows. I know, I know, windows blows. But in this case it’s not bad. Hard to break windows if you only use it for 1 single purpose. I ended up installing a VL version of Windows Server 2003 Enterprise R2 SP2.

Then, here’s where it gets a little expensive, you need to acquire a copy of VMWare Infrastructure. And by little expensive I really mean you should buy some lube to prepare for the… nevermind.

Without Infrastructure you cannot HA your vmware machines.

Install Infrastructure.

Tricky part: DNS settings. If you have only a few virtual hosts, you may as well hand edit your DNS hosts settings. If you have several hundred, a DNS server is more handy.

Power on one of your VMWare ESXi servers – then press alt + F1
Now type in “unsupported” without the quotes
Then type in your root password when prompted

vi /etc/hosts
Shift + I
Scroll down to the last line, hit enter to start a new line, and then type in your OTHER server’s IP information:
192.168.2.101 host2.localdomain host2
:wq!

Test the settings by pinging the host:
ping host2
If you get a response that’s a good thing. No response is a bad thing.

Now, do the same thing on the other host:
Press alt + F1
Now type in “unsupported” without the quotes
Then type in your root password when prompted

vi /etc/hosts
Shift + I
Scroll down to the last line, hit enter to start a new line, and then type in your OTHER server’s IP information:
192.168.2.100 host1.localdomain host1
:wq!

Ping test once again and it should work just fine.

Then, and only then, do we start to work on the infrastructure side of things.

Create a new datacenter
Right-Click and create new cluster. I’m choosing HA.
Right-Click and add a host. Type in the IP of the first host and root/password.
Right-Click and add the second host using the same method.
Infrastructure should automatically add them to the HA area.