Friday, February 08, 2008

Error 1402. Could not open key

I was trying to install Microsoft Platform SDK for Windows Server 2003 R2 Web Install on my Windows XP SP2 machine and received the message:

Error 1402. Could not open key: HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders. System error 5. Verify that you have sufficient access to that key, or contact your support personnel.



Most annoying was the fact that when I clicked OK to the error message, the installation rolled-back. No chance to even Retry?

My first thought was that this must be a permissions issue to I fired-up regedit and checked the permissions. My user had full control and read permissions to the Shell Folders key, so did the administrators group and SYSTEM. I gave Power Users, Users and Everyone Full Control too, but I was thinking at the time that this probably wouldn't help as, on the face of it, the original permissions were permissive enough.
I tried the Web Install again and was horrified to find that it seemed to be downloading the packages all over again. I went out to walk the dog.
I returned an hour later to the same poxy message. Permissions still not good enough.

I downloaded the FULL install package and tried the installation many more times with no success. I used ProcMon which confirmed that msiexec was not able to read the key:


Sequence: 1080206
Date & Time: 08/02/2008 20:46:36
Event Class: Registry
Operation: RegOpenKey
Result: ACCESS DENIED
Path: HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
TID: 3028
Duration: 0.0000186
Desired Access: Read


Eventually, I found the thing I'd been missing. SYSTEM permissions for the Shell Folders key were:

Read:Allow
Full Control:Allow
Special:Deny

and removing Deny from Special was all that was required!

Sequence: 2550649
Date & Time: 08/02/2008 21:12:10
Event Class: Registry
Operation: RegOpenKey
Result: SUCCESS
Path: HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
TID: 3320
Duration: 0.0000153
Desired Access: Read

Saturday, May 12, 2007

Google Hacking at it's worst!

I did the following search:
http://www.google.co.uk/search?hl=en&q=The+driver+detected+a+controller+error+on+%5CDevice%5CHarddisk+disk.sys&meta=

and got three results, two of which were pages at tutorials-ke.com
I've seen this domain in google search results quite a number of times now and am always disappointed with what I find.

Pages at tutorials-ke arrived at from a google result have the same title as the google search term and the same is used for the sub heading. Below that, there are some google ads and the rest of the content is obviously scraped off other websites. The pages I've seen so far have all been made up of several (50-100) random, but vaguely targeted forum or newsgroup posts - all starting posts. They'll typically be a question and each post is just a block of text - sometimes with a title and sometimes without - either way the title is usually the first words in the block of text (same style) and will be hyperlinked. This links to a page where the rest of the thread (apparently) is shown. The remainder of the page is filled up with more first-posts with links to the rest of the thread and more first posts with links to - you get the picture.
Ad-effing-infinitum.

Do a google for one of the titles and you only get that same page. Do one elsewhere and you get nothing at all...

I did a whois query and got:

Checking server [whois.crsnic.net]
Checking server [whois.enom.com]

Results:
=-=-=-=
Visit AboutUs.org for more information about tutorials-ke.com
a href="http://www.aboutus.org/tutorials-ke.com"AboutUs: tutorials-ke.com
Registration Service Provided By: NameCheap.com
Contact: support@NameCheap.com
Domain name: tutorials-ke.com
Registrant Contact:
Wetzeltutorialske
Dan Wetzel (tutorialske@gmail.com)
+1.8005247738
Fax: +1.5555555555
1000 NE Circle Blvd
MS 413G
Corvallis, OR 97330
US

Administrative Contact:
Wetzeltutorialske
Dan Wetzel (tutorialske@gmail.com)
+1.8005247738
Fax: +1.5555555555
1000 NE Circle Blvd
MS 413G
Corvallis, OR 97330
US

Technical Contact:
Wetzeltutorialske
Dan Wetzel (tutorialske@gmail.com)
+1.8005247738
Fax: +1.5555555555
1000 NE Circle Blvd
MS 413G
Corvallis, OR 97330
US

Status: Locked
Name Servers:
dns1.name-services.com
dns2.name-services.com
dns3.name-services.com
dns4.name-services.com
dns5.name-services.com

So I duly followed the link to http://www.aboutus.org/tutorials-ke.com

and arrived at a wiki page for tutorials-ke.com :

Title

tutorials-ke.com >> Tutorials for pc photoshop and more Agadir net AnimeSeat.com Submission Directory Mobile Phones UK Free MySpace Layouts Canaricultura Multidesk.be TabHeaven Universidades.org video flash phpBB-Es Satis Nisi Optimum CoolMiniOrNot Panjab University

more automated rubbish.

Also on the wiki page is a link to alexa for tutorials-ke.com where the traffic rank is 484,017

There are 250,000 results of the query site:http://www.tutorials-ke.com

someone ought to stop this kind of google hacking!!

Monday, April 09, 2007

Installing VMWare Tools in BackTrack

back|track 2 works much better on vmware when vmware tools is installed. I followed these instructions and hit a snag when the setup asked me for the location of some directories which didin't exist. This forum post helped me with:

for x in 0 1 2 3 4 5 6
do ln -s /etc/rc.d/ /etc/rc$x.d
done

which creates the files needed for vmware-install.pl
and the default answers can be accepted for the rest of the process.
Unless you're unlucky, vmware tools installs nicely.

Sunday, April 08, 2007

Installing back|track 2 (final) on VMWare Workstation 5.5 on Windows XP

Having had an issue when trying to boot back|track 2 after installing it to a virtual disk in a VMWare virtual machine and having resolved the issue, I thought it might be helpful to publish a step-by-step guide.

So here it is:

  1. Download the back|track 2 iso from remote-exploit.org which you'll need later.
  2. Load VMWare Workstation and start the New Virtual Machine Wizard (Ctrl+N or File > New > Virtual Machine).
  3. Choose to create a custom configuration and choose the New Version 5 format if you're asked.
  4. On the next page choose Linux operating system with version "Other Linux 2.6.x kernel".
  5. Give new virtual machine a name and choose a place for it's virtual disk and stuff.
  6. For the next four pages accept the defaults for number of processors, memory, networking and I/O adapter.
  7. Choose to create a new virtual disk.
  8. Choose SCSI.
  9. Choose a disk size (at least 3GB - I made mine 4GB).
  10. Make your own decision as to whether to "Allocate all disk space now" - I prefer to have the virtual disk pre-allocated rather than allocated on the fly.
  11. Make your own decision as to whether to split disk into 2GB files - I guess this boils down to your filesystem. On NTFS there should be no issues with huge files, but I always elect to split them into 2GB files anyway.
  12. Finish the wizard. If you've opted to pre-allocate disk space, wait until it's done.
  13. Change the settings for the virtual machine's CD-ROM and choose to use the back|track 2 iso image you previously downloaded. Ensure the "Connect at power on" is checked. When started, the VM will check the CD drive for a boot volume and with the iso image mounted it will boot off the back|track 2 Live CD iso image.
  14. Start the VM and wait for the green back|track 2 login screen.
  15. Login as root
  16. Password is toor
  17. Type fdisk /dev/sda and hit Enter
  18. Type n and hit Enter
  19. Type p and hit Enter
  20. Type 1 and hit Enter
  21. Hit Enter (Using default value)
  22. Type +50M and hit Enter
  23. Type n and hit Enter
  24. Type p and hit Enter
  25. Type 2 and hit Enter
  26. Hit Enter (Using default value)
  27. Type +512M and hit Enter
  28. Type n and hit Enter
  29. Type p and hit Enter
  30. Type 3 and hit Enter
  31. Hit Enter (Using default value)
  32. Hit Enter (Using default value)
  33. Type a and hit Enter
  34. Type 1 and hit Enter
  35. Type t and hit Enter
  36. Type 2 and hit Enter
  37. Type 82 and hit Enter
  38. Type w and hit Enter
  39. Type mkfs.ext3 /dev/sda1 and hit Enter and wait.
  40. Type mkfs.ext3 /dev/sda3 and hit Enter and wait.
  41. Type cd /tmp and hit Enter
  42. Type mkdir boot and hit Enter
  43. Type mkdir bt2 and hit Enter
  44. Type mount /dev/sda1 boot and hit Enter
  45. Type mount /dev/sda3 bt2 and hit Enter
  46. Type startx and hit Enter and the X window system will load with a desktop.
  47. When the desktop has loaded, load the backtrack installer via K > System > Backtrack Installer.
  48. Leave the "Source(BackTrackCD)" blank (This resolves the issue I had)
  49. Type /tmp/bt2 in "Install BackTrack to"
  50. /dev/sda should automatically appear in "Write MBR to"
  51. Choose either the Live or Real installations.
  52. Click Install and wait for the installation to complete.
  53. Close Backtrack Installer. Log off and at the command prompt type poweroff and hit enter.
  54. Change the VM settings for CD-ROM so that the iso image is no longer being used.
  55. Start the Virtual Machine.
  56. Click into the window and if you're not going to add any boot paramaters just hit Enter.
  57. Voila
The remote-exploit.org guide to installing to a Hard Drive on which this guide is based misled me into typing /boot into "Source(BackTrackCD)" in the Backtrack installer and I have seen quite a lot of forum posts that attest to the fact that this worked fine in back|track 2 beta, but in the final version, back|track hangs at boot time.
Leaving this field blank resolves this issue in this instance and I hope it will for you too.