Wednesday, March 09, 2005

Windows NT/XP security

An update: The emergency boot CD is an ISO that provides you with a convenient boot CD. The boot CD provides you with a boot into Linux with a simple way to reset your admin passwords. (site - ebcd.pcministry.com). This was useful to reset the passwords of NT images of defunct hardware that I was migrating to a virtual PC.

It is dangerous to allow a person to boot your PC with his floppy disk. This link discusses how you can get administrative access to a Windows XP machine by booting from a floppy disk.

The approach is rather ingenious. It edits the NT SAM database using an offline registry editor.
http://www.cgsecurity.org/nt.html. The utility chgntpw is excellent as an offline registry editing tool. A while back I was trying to find such a utility (see the BLOG on reinstalling Windows), but gave up. This seems promising...

This website also has approaches for admin access to Linux. A link from one of these pages discusses how to change Administrative passwords on Domain controllers - useful for administrators who install NT/XP half asleep ;-)

http://home.eunet.no/~pnordahl/ntpasswd/editor.html

RockXP3
While we are on security, be careful about RockXP3. One of its features is displaying passwords stored in Internet Explorer, Outlook Express and RAS. So if you save such passwords , they can be viewed with RockXP3.

Tuesday, March 08, 2005

Setup SMTP on a Mandrake Linux

Mandrake Linux uses Postfix rather than Sendmail.
When I try to telnet localhost smtp - it does not show any response from SMTP.

Look at /etc/syslog.conf
Find out which directory are the log files stored. In my case it was /var/log
Look at the errors in /var/log/mail/errors
Mar 6 08:29:37 linux3 postfix/smtpd[19852]: fatal: open database /var/lib/mailman/data/aliases.db: No such file or directory

. You specified two hash files in your postfix configuration and one of them doesn't exist. Try removing the /var/lib/mailman/data/aliases.db from main.cf and see if you can get basic mail delivery working first. Only after you are satisfied with how postfix is functioning, add in the mailman stuff.

After removing the mailman aliases.db, it still did not start.
The problem was that SASL parameters were turned on but SASL libraries were not installed.
Removed SASL parameters by going back to the initial version of the config files.

This page discusses setting up outbound SMTP authentication.

http://www.thecabal.org/~devin/postfix/smtp-auth.txt

Friday, March 04, 2005

Quick notes

Trying to see how Agile can be adapted into our SAP development group.
  1. Installed TWIKI - very nice :-). Twiki is a WIKI site that allows users to modify the pages on the fly. It runs on Cygwin Perl and Apache. Found a very nice step-by-step install guide for Windows. Integrated this with Windows NTLM logins - again another step-by-step guide!
  2. Installed a pilot site of CommunityServer. Installing CS is really easy despite the size of CommunityServer. BTW - the source code is now available. Guess I was on the bleeding edge when I needed it last week.
  3. Emule - is a distributed file-sharing network. Tried it successfully today.
  4. ABAP2HTML - Converts your ABAP program to a color coded HTML. You can change the VBA macro code for this program to adapt it to your needs.

Tuesday, March 01, 2005

Agile Programming and SAP

Martin Fowler's web articles got me rethinking about Agile Programming. He discusses various applicable methods in the article The New Methodology. The paper Is Design Dead raises a lot of questions about whether the waterfall model is really applicable for software development. He also has a nice paper on Agile with Offshore development.

But Ron Jeffries site has a compact (and quick) introduction to Extreme Programming (XP). Martin Fowler has a page full of links to XP resources on the web.

These articles are written for general software development, not really tailored for ERP software. I am interested in seeing how these ideas could be adapted to a SAP development group. Can these advantages be translated into reality with SAP development?

Monday, February 28, 2005

Basecamp and Ruby on Rails.

While surfing, I came across Rails - a framework to write web applications in Ruby.
The first application was Basecamp - a web based project management software.
I applied to Basecamp and created my project site. http://dmahajan.projectpath.com/login/

Ruby is creating a niche for itself. Rails (http://www.rubyonrails.org/) is touted as the framework to launch Ruby.

Another interesting link is Martin Fowler's site on Enterprise Software.
http://martinfowler.com/articles.html

CD Keys, offline registry editing - migrating to the new Windows XP install

The fresh install of Windows XP generated a few interesting questions.
How can you read / change the registry of another Windows instance?
  1. The registry consists of 5 files in c:\winnt\system32\config. (see details here)
  2. Copy these files over to your new instance. (If you have access to the drive, use the recovery console).
  3. To read and manipulate these offline registry files, use regedit to load the 'hive' files. (see details here). You can even fix the offline registry and copy these files back to the original instance.

How can I recover my CD keys for Microsoft products (like Office XP, Visual Studio.NET, Office XP ....)?

There were a couple of programs that I found; RockXP , "Win KeyFinder 1.65" and "Office Keylight 1.00", "CD Key Finder: Magical JellyBean" . I liked RockXP. This thread discusses how these CD keys are stored in the registry.

Some other sites that I encountered along the way

PC Audit: http://www.belarc.com/free_download.html - shows all software and hardware in a nice local HTML page.

Windows IT Pro: http://www.jsifaq.com/

Registry tricks: http://www.mdgx.com/reg.htm

Free 60 day trial key for Office 2003: http://www.microsoft.com/office/trialkey

Creating a slipstream installer: http://www.jsifaq.com/SUBF/Tip2500/rh2529.htm

How to recover from a corrupted registry that prevents Windows XP from starting: http://support.microsoft.com/kb/307545

Sunday, February 27, 2005

Finished the Nephrotic Syndrome site

It feels really nice when you finish a project and sit back to look at the results. I have just finished creating a website for parents with kids who have the Nephrotic Syndrome.
What is the Nephrotic Syndrome?

The site is a ASP.NET based website. It has a DotNetNuke portal and a CommunityServer forums application. Both applications are easy to setup and install. A bit of experience with MS SQL helps though.

To jumpstart the discussion forum, I decided to import messages from an existing discussion site @ siteboard.de. This took some time. I spent two days trying to see if someone had written a utility to import messages. Most hints on the net seemed to point to writing your own code - but I couldn't download the source code for CommunityServer from anywhere.

So I broke the problem into two parts.
1. Scanning the webpage of the old site - and building a list of threads with their messages.
2. Posting these threads and messages into CommunityServer.

Both parts were written in Perl 5.8.
The first part used regular expressions to parse the HTML files and store the appropriate data sections in a array of SB_Message objects.
The second part was simple in the end. There is a stored procedure cs_PostCreateData that creates a new post and updates all the tables. So I can create messages directly from Perl!
The challenges were
1. Learning to use the DBI module in Perl.
2. Parsing the German dates into a HTTP::Date format.

The next challenge was to take this utility and allow it to update the messages ongoing. This would let people continue posting in the old forum, but repost it in the new forum. This required some thinking - finally I decided to use the PropertyValues field to store the old message post code.

Anyway enough said.

Tracing Windows API calls

The program Traceplus (http://www.sstinc.com/products.html) lets you trace all Windows calls and see how they work!

Thursday, February 24, 2005

Spyware infestation

Noticed that I have a Spyware infestation. It started with the installation of 180....
Then I noticed that this program installed a lot of other programs.
McAfee anti-virus scanner does not stop the installation of such spyware. That is SAD.

Time for help.
  1. Download and install Ad-aware. It found 241 objects that it quarantined. Run a deep level scan to check the entire C drive. The definitions file was dated 16-Feb-2005. But it did not detect "Powerscan".
  2. Go to a well known anti-spyware site. I chose the Computer Associates eTrust website to get more information about Powerscan,
I think that the best way is to restore your computer to a stable restore point that was created before the infestation.

Re-installing Windows XP

So I got a new harddisk!
I want to have a "clean" installation of Windows XP, since I've noticed that XP slows down after you install a lot of apps (typically that you never use).

A few learnings.
  1. The "Recovery" XP disks that come with Dell do not have any support packs. It also does not have the drivers for the hardware. In short, it is just a plain vanilla XP installation CD. There is no "recovery" in this CD. What I had expected was that the CD would put the system back to its original factory-shipped state. No luck.
  2. The following link discusses how to make your own custom recovery CDROM. It includes how you can combine SP2 with the installation files so that you don't have to do it seperately. http://www.pcmag.com/article2/0,1759,1750662,00.asp
  3. The next problem is that I don't have the Microsoft CD Keys for Office and XP etc. XP was easy since the Dell had a sticker with the number. For Office - try the programs is program http://www.petri.co.il/quickly_retrieve_windows_cd_key.htm.
    Magical Jelly Bean Keyfinder: http://www.magicaljellybean.com/keyfinder.shtml
    CD Key Reader: http://www.skaro.net/cd-keyreader
  4. I-Tunes - The XML database uses relative paths. So create the same directory structure in the I-Tunes music folder as in the old PC. I used sysinternals.com "Junction" utility to map folders to different drives.
  5. I am still slowly installing the applications that I "really" need. Since I still need to use applications on the "Old Windows", I wanted to find out how to setup "dual-boot" in Windows XP. It is really easy. You start up with the install CD and select recovery mode. Use the commands "fixboot","fixmbr" and "bootcfg". See the installing and using Recovery console link from Microsoft. Bootcfg will regenerate boot.ini which has a list of all operating systems for dual-boot.
    One web resource: http://windows.about.com/cs/dualboot/
    Microsoft notes: Win2000 and WinXP, Multiboot with XP, Installing and using Recovery Console in XP.
  6. You never know which applications are really important!

Web based forums and message boards

I was looking at how could I setup a web discussion forum.
I found that there were two easy choices
  1. Use PHPBB2 (www.phpbb.com) - This is PHP based. I found a site that provides free PHPBB2 forums. www.galacnet.com. PHPBB2 looks really good and easy to setup. Within 30 minutes, I had setup a simple structure (http://phpbb.galacforums.com/Nephrotic_Syndrome/). Using the free server had the issue that half the screen was filled with advertisements. One downside was that it is not easy to install plugins and mods for Phpbb on this server.
  2. Use Community Server::Forums (www.communityserver.org) - This is ASP.NET based. My hosting provider automatically installs this application. It is a nice Forums + BLOGs+ Photo Gallery application. On the plus side - it has built-in RSS feeds for all public forums. However in an anonymous post - it does not let the person type in a name. Slightly annoying because a lot of times, the anonymous user doesn't mind writing the name - just cannot register.

Final decision: Use Community Server::Forums since I can remove all advertisements on that Forum.

Migrating messages is the next challenge. The current message board is run on www.siteboard.de. So I needed a program to download all the messages, while preserving the message - response-reply relationships and dates etc. At this point I've written a short Perl program [download]that can download an entire forum from www.siteboard.de and save it as a Perl Data::Dumper file.