Despite all the problems circulating the web about Windows XP Service Pack 3, I thought I would go ahead anyway on a new installation. The installation part went fine and the system restarted properly with no lock ups, stops or looping restarts. So far so good, unfortunately I celebrated my good fortune too soon – Windows Update stopped functioning. Whilst updates were being downloaded, Windows XP would fail to actually perform the update.
I did a bit of googling and whilst I didn’t find any accounts exactly matching my problem, I decided to follow the advice on this Microsoft KB article.
First of all, stop the automatic update service from the command prompt.
1. Open up Start Menu > Run
2. Type “cmd” and press Enter.
3. In the command box, type “net stop wuauserv”, should should get the following confirmation:
Now we need to reregister the DLL involved in the Windows Update process.
4. Type in “regsvr32 %windir%\system32\wups2.dll”. The following control box should pop up after a moment:
Now we need to start the update service and hopefully all should be well again.
5. Type “net start wuauserv” which should yield this confirmation:
Thats it, updates started working for me immediately afterwards. If this didn’t do the trick for you, follow the alternative methods on Microsoft’s KB article linked above.
Update 07/02/10: Please note that there is now an official wordpress widget for twitter. As such, hosted wordpress accounts are no longer constrained by not being able to use third party addins described in my previous update.
Update 22/03/09: Please note this method describes integrating your twitter account / feed with your hosted wordpress blog. If you are hosting your wordpress CMS yourself, there are a number of plugins and / or widgets you can use (nice round up here) instead as you can change the templates and are also not bound by the ‘no scripting’ limitation of hosted wordpress blogs. I initially wrote it back in June 08 but the method still works well to this day. If you have any questions please feel free to ask me via email (on my about page) or on Twitter @KonradS.
Many of you will be familiar with Twitter, a short message microblogging platform used by the ‘technorati’. I wanted to utilise this platform in order to display my updates as a widget on my wordpress blog. Initially I encountered difficulties given that WordPress sanitises all scripting. As such, default twitter ‘badges’ are useless. I was about ready to give up, when I found out that Twitter has RSS feeds for every account.
Initially I hit a brick wall with this as well, the main RSS feed (http://twitter.com/statuses/friends_timeline/insertuseridhere.rss) was for your friend’s updates, not yours and required you to be logged in with Twitter. This clearly is not that useful. However, there is a second feed, a user_timeline feed which does not require you to be logged in and only shows your updates.
The URL for this is : http://twitter.com/statuses/user_timeline/14526317.rss (substitute 14526317 for your twitter user id.) It is a little tricky to find this URL and to be truthful – I did this a few weeks ago and have completely forgotten where I found it, but it is there somewhere.
To find your own twitter ID, the quickest way is to goto the RSS button on your Home page. This is found on the bottom left part of the feed section. This RSS feed is not the right one, but it contains your numerical ID number. By substituting your twitter ID into the user timeline in the above paragraph, you will save yourself some ferreting.
Anyway, combine your RSS feed with the WordPress RSS widget and hey presto – a customisable, configurable Twitter feed widget. :)
Its unusual to see such a user-unfriendly way of managing (or changing) the default settings in a program. Windows Vista ships with Vista Sidebar, a gadget/widget engine which brings limited but extensible functionality to Windows Vista.
The main criticism I had initially was with the RSS widget – there seemed to be no way of changing the default feeds that shipped with Vista from the default and fairly bland MSN rss feeds. Despite tinkering with the widget and sidebar program, I eventually conceded defeat and did a bit of digging.
It turns out, rather counter-intuitively that the way to change the RSS feeds is via Internet Explorer. Fire up Internet Explorer and hit “Control+J“, this is the keyboard shortcut to bring up the feed window.
Once here, you can add / delete / modify the RSS feeds that Vista shows to your heart’s content. In doing so, you expose the greatest weakness of Vista’s default RSS widget, it does not scale very well. Whilst in “at-a-glance” RSS perusal for a few feeds works rather well, its over simplification is its greatest downfall.
There is no easy way to change between RSS feeds / groups (it has to be done via a menu each time) nor is there a way to dismiss headlines which have been read. This greatly limits the usefulness of this widget for any serious RSS subscriber.
I had a brief look, but I could not find a 3rd party, general purpose RSS feed widget on the Microsoft Live Widget site. Whilst this gadget is certainly of use, its limitations greatly diminish its usefulness.
UPDATE: Just a brief note to say this works in exactly the same way for Windows 7.
I was bemused to read on bbc news earlier that a trivially simply ploy stung half a million file sharers. The concept is nothing new having been started a fair few years ago by virus / malware writers and adopted by Copyright enforcement agencies in recent years. Do the anatomy of a decentralised file sharing system, anyone can seed a file. Once this seeded file is made available to the peer-to-peer network it either becomes advertised to a localised central file distributor (referred to as a Super Node or Server) or is found during a spider search query run by another user logged into the peer to peer network. If these files are topical or sought after, they can be transferred onto a different node (client) rapidly. There they are stored in the second user’s ‘shared’ directory where more people can download it.
Once a seeded file has been downloaded and spread over a few tens of nodes the rate at which it can be downloaded by others increases almost exponentially with a cascade like effect. Other people of the peer to peer network are lured into downloading this file based on the number of people who have it therefore assuming it must be genuine and would be comparatively quick to obtain. Couple this with a topical or sought-after song / album or file aimed at the masses (who statistically would contain a fair percentage of PC-illiterate users and those with a penchance for agreeing to all the pop ups they come across) means these files explode across networks.
This malicious file in question appears to have masqueraded as a MP3 by Girls Aloud. Given the fact that on running the file pops up a message saying the computer requires a codec to play the song and tries to direct you to a website in order to download it, most computer users would stop and reexamine what they had just downloaded. People that brazenly proceeded and downloaded the malicious ‘codec’ package had spyware installed on their system which would ‘bombard’ users with pop ups. Also, the download file would spawn copies of itself within the User’s shared folder under different names to try to make itself attractive to a greater audience.
But what happened? How were people tricked into downloading an MP3 file but ended up running a malicuous program? The answer to this lies in the file type. Broadly speaking, there are two ways in which a file can be opened:
1) via script or binary execution (e.g. .exe, .com, .vbs, .java, .scr … and some others)
2) via program read from an external application (e.g. .txt, .doc, .wav, .mpg, .avi …. and MANY more.)
MP3 files (Moving Picture Experts Group version 1 audio layer 3) are the latter, upon execution, Windows searches through its list of known file extensions stored in the registry to see what it should do. It instantly finds the entry for MP3 and sees this type of file is handled by a media player like Windows Media Player, WinAMP, iTunes etc etc. Windows then executes the media player which, on loading, opens the MP3 file specified in the command line argument, decodes a block, fills its buffer and starts to play. Unless a clever trick like a buffer overflow is used, which have historically been responsible for security breaches in various Windows programs as well as console homebrew development, this renders all ‘program read’ type files harmless*. As such we have to look elsewhere for the source of this problem.
That brings us nicely to the point I wanted to raise in this post, file extensions and more specifically, security vulnerabilities in their implementation. Recent versions of Windows from XP (and possibly earlier, I can not remember) have automatically hidden the file extension by default leaving the user to distinguish between file types by iconographic representations. Whilst at times this is both cleaner looking and more functional, it does present an interesting security problem, what if there are two file extensions? Window will quite happily truncate the file .xxx from a file name leaving the first extension, despite the fact Windows ignores anything before the final .xxx . As a result, if you name a file SomethingInteresting.mp3.exe, in its default state, Windows will happily display the file as SomethingInteresting.mp3 but will execute the file as an EXE when double clicked. Obviously, if you quieried the file by right clicking on it and selecting properties you would be immediately told what type of file it is, but most people will take the file at face value.
Luckily there is a very simple way to gaurd against such black magic, in Windows XP and Vista** in the file browser, goto the Tools menu and select Folder Options.
In this dialog, uncheck ‘Hide extensions for known file types’ and click Apply followed by clicking Apply to all folders.
And that’s it! A simple check box and some common sense now separates you from being lured into downloading fake or malicious files.
* Some files like some movies can have containers which direct the media player or operating system to web pages. It is not just media files which are vulnerable but this is a completely different topic.
** In Vista you may have to enable the classic menu
Since I was on the topic of passwords, I ended up writing a brief post about how to choose a good password and general password security.
A good password should be four things:
1) Use at least two cases* (e.g. lower case, upper case, ‘number’ case and ‘character’ case.)
2) Be a suitable length – anything less than 7 characters should be avoided.
3) Not include repetition within the password and should not be used for more than one application.
4) Be something personal or easy to guess (a birthday, pet or family member name or related to the application – for example ‘email’ as a password for your email account would be ludicrous.)
Let look at some examples:
The old favourite: “password”. As you can see from the rating below, it is a terrible password. Not only is it predictable (and one of the most commonly used passwords) but it uses only one case and has some repetition (sequential double ‘s’.)
A slightly better version of the old classic: “pa55word”. This time, all I had done is replaced the ‘s’ with the 733t-ified version. By adding numbers, the complexity of the password has increased dramatically although it is still hindered by repetition.
Lets go even further: “Pa55Word”. Now we are using three cases and the result is predictably much stronger than using two cases alone.
And finally, lets go nuts: “Pa5!Word”. Using all the cases available on the Roman alphabet and removing all sequential characters. It is still not a brilliant password, but it is head and shoulders above the others.
Whilst choice and selection of password is important, it is not always essential to pick random strings as your password. Whilst passwords like gY$5c0p[ are very strong (it scored 92%) it is difficult for most people to remember them due to their entropic nature. It is therefore important to marry practicality with security and my advice to anyone picking a password would be to think of a word (or phrase) and substitute some of the letters for numbers / capitals / characters as in the example above**.
1) If you are choosing a very important password, pick a passage from a book. For example, the first 3 (or as many as you want) words from the first line of a particular page** and add a good degree of randomness to it as described above. If you need to jog your memory in the future, simply refer to that page and it should normally come back to you.
2) If you must write or record your password, obfuscate (via a stenographic method) it! Split it in half (or more pieces) and hide the password/passphrase in several bits of innocuous data. For example: If you made your password Nice225 Woods987 then you could store the following contacts somewhere:
William Nice +44207 750 1225
Christian Woods +43133 987 3245
The same method can be applied for card PIN numbers which can be stored as part of a dummy contact on a mobile phone.
3) Never stick to the same password for more than one service – if someone compromises one password, all your services will be vulnerable.
4) Scale your password to the particular security environment. A password that is used for an unencrypted email account need not be as strong as one for a SSH / VPN / Remote Terminal or VNC account.
5) For accounts you are particularly cautions with, rotate your password frequently. This need not be very week or even every month. If you change your password every 2 or 3 months, it will provide a much better protection against online stalkers who may be lurking and checking your accounts / emails periodically.
6) Passwords can be passphrases! It is much easier to remember a line of a story / poem etc than a bunch of rubbish. Unfortunately, even if that line of text is long enough, it will not offset the problems** caused by character repetition, although it would be important to obfuscate it in some way.
* The reason cases are so important is simply a matter of maths. If an attacker knows the password is only one (or two) cases, it significantly reduces the amount of computational time to brute force (or guess) the password. Take for example, a password with only one case (lets assume its lower case). There are only, 26 characters in the Western (Roman) alphabet meaning the complexity of the password is:
…if the password is 4 characters long, there are : 456976 combinations.
If the password is 8 characters long, there are : 208827064576 combinations.
Now lets assume two cases (lower and upper case) are used. Now the attacker has to try a total of 52 character combinations for every character suspected to be in the password.
…if the password is 4 characters long, there are : 7311616 combinations.
If the password is 8 characters long, there are : 53459728531456 combinations.
You can quickly see the significance in the numbers. If to round it off, we try all the (printable) characters available (94), an 8 character long password would have 6095689385410816 combinations!!
** Generally speaking, when trying to create a password, we are trying to create as entropic an outcome as possible as this will be the most computationally time consuming to break. The entropic value measured per key is calculated on the basis that each key press is independent and the entropy per key essentially increases with increased character range.
Due to the manner in which language is constructed, the occurrence of letter like vowels is dramatically increased leading to a much decreased entropy per key. This means, in order to create a reasonable secure 64bit key, you would need approximately 58 characters as opposed to only 10 if all characters are used.e
I just came across a great site called MyVistaBoot.com . As the name suggests, it is dedicated to sprucing up that fairly boring Vista boot screen. Each new boot screen is packaged with an installer so it is trivial to get them on your system without resorting to the use of third party applications as was necessary with Windows XP. Take a look, there are some very elegant ones on there to suit every taste.
UPDATE: My mistake, the file downloaded replaces the winload.exe.mui file directly. It is not as simple as just replacing the Windows file but the instructions are clear and concise.
After using Hardy Heron for about twelve hours now (at least eight of those tweaking and fiddling) I must say I am impressed although, it sometimes feels a bit more clunky than previous releases. This release builds greatly on the previous release 7.10 and feels more feature complete and compatible as well. This is largely due to native inclusion of the b43 driver over the depreciated bcm43xx driver for the wireless as well as an improved restricted driver manager.
Here is an overview of how things work with my Fujitsu Siemens A1650 Amilo laptop:
CPU: Works perfectly (including frequency scaling and power management)
WiFi (Broadcom 4318 ) : Works *! (After the install of Acer_acpi tools and a bit of tweaking)
Graphics (Ati x200m) : Works perfectly! (With Ati Non-Free driver)
Flash (in Firefox) : Works perfectly (I had lots of problems with this in 7.10 Gutsy Gibbon.)
Memory Card Reader : Not tested.
PCMCIA : Works perfectly (tested with IDE > CF converter and tried a CF memory card)
Hot Keys : Can be made to work, but I have not got around to this yet.
* Although it picks up and connects to wireless networks, I need to do a bit of testing before I am 100% sure all the problems have been sorted. Bloody Broadcom….
I had do install a few extra packages to get it all working however and I am going to detail this now.
To get the wireless working we need to install the firmware (not shipped with Ubuntu) via the new firmware cutter b43-fwcutter. In a terminal window, type:
sudo apt-get update
sudo apt-get install bc43-fwcutter
Once that is done, follow these instructions to obtain and load the correct firmware module.
Now we need to install the Acer_acpi packages. Do not follow the instructions on the project website relating to acer_acpi as you will end up trying to install the depreciated version of b43 (bcm43xx.)
We need to add the following line to the package manager to enable the repository containing the acer_acpi code:
deb http://www.mumblyworld.info/ubuntu gutsy main
Once that is done, open a console window.
wget http://www.mumblyworld.info/ubuntu/depot.key -O- | sudo apt-key add -
apt-get install aceracpi-source
m-a a-i aceracpi-source
This first downloads the repository public signing key and then gets the acer_acpi source package. In the process you will likely be asked to install other dependancies, agree to this as these will be required during the compiling process. Once the above commands have completed, you will need to activate the module:
The wireless light on the A1650 will now light up showing the wireless module has been activated. For future reference, it can be activated and deactivated with the following commands:
echo 1 > /proc/acpi/acer/wireless (to activate)
echo 0 > /proc/acpi/acer/wireless (to deactivate)
Restart and your wireless should be operational :) For reference, I followed parts of the guide found here. I would not recommend you do the same, as you will end up trying to install the depreciate version of the b43 driver, bcm43xx.
Another thing which I installed was the Compiz manager as well as emerald. Compiz has a lot of options, but window decoration is still one I prefer to use Emerald for. These are installed in much the same way as they were in 7.10 with a few key exceptions.
sudo apt-get install compizconfig-settings-manager compiz-fusion-plugins-main compiz-fusion-plugins-extra compiz-gnome compiz-plugins libcompizconfig-backend-gconf libcompizconfig0
Then install emerald:
sudo apt-get install emerald
Once these packages (and their dependancies) have installed, you will find two new options under System > Preferences gnome menu. One will give you complete control over the effects Compiz uses and the other will let you load/tweak and create Emerald themes. However, as per default metacity is the window decorator. In the Compiz “Advanced Desktop Effects Settings” find the window decoration option and replace the command field with “Emerald –replace”
Save and restart if required.
One of the main programs I use is Photoshop, I use it mostly for simple image editing / cropping and resizing for my blog. I am trying to move over from Windows to Linux for blogging and as such, I decided to finally get to grips with the Gnu Image Manipulation Program (The GIMP) which is the GNU photoshop equivalent for GNU Linux. Whilst the Wine project have made great leaps forward in recent years to the point where Photoshop can be run inside Wine, it is still not an ideal solution.
In this post, I just want to very briefly explain how to do something simple : take a screenshot, crop it, shrink it and compress it using the GIF interlaced format.
2 ) Once it is installed, lets assume we have a screen we want to capture. Fire up the program and goto “File>Acquire>Screen Shot”. This will bring up the WinSnap dialog which will allow you to take a screenshot of the entire screen (after a defined pause) or a specific window. The specific window feature didn’t work particularly well so I recommend taking a snapshot of the entire screen. (If you have pressed the Print Screen button, you can instead use the “Past as new image” option.
3) Now we have the entire desktop, we need to use the select tool to highlight the area we want to capture.
4) Next we goto the menu, select “Image > Crop to Selection”
5 ) Finally, I tend to scale the image to 80%, this is achieved by going to the menu “Image > Scale Image” and selecting 80% width and 80% height. If you constrain the proportions of the image (the chain icon) then selecting a 80% width will automatically select 80% height.
6 ) Now simply goto “File > Save As..” and append “.gif” to the end of the filename. This will launch the GIF exporter.
7 ) You will be told that the GIF exporter can only handle Greyscale or indexed images. Select “Convert to Indexed” and click “Export”.
8 ) Check “Interlaced” and uncheck the “GIF Comment” field and click “Save”.
And thats it! :) When I get some time to play with GIMP’s more advanced features I will write more on the subject.
Today I came across an ACER PC (M1610) at work that needed restored back to the manufacturer’s settings. Acer ship their desktop systems with part of the hard drive hidden in a recovery partition that can range in size from 6 Gb to 20 Gb depending on the specific PC model. The problem was the customer who owned the PC had set a password on the recovery interface and had promptly forgotten it. I had a chat with Acer who were naturally very happy to take the PC and charge the customer to reformat and re-image the entire drive. Unfortunately I spoke with a rather arrogant technician at Acer who claimed there was no way to get around this password, those that know me will know this is like mixing firecrackers with a kid with matches. I decided to fix the issue myself.
What you will need:
2 – About ten minutes.
Recovery tools are glorified branded imaging/cloning tools (like Ghost or Acronis True Image.) They have three main components, the program binaries (i.e. the GUI/UI and low level formatting/writing tools), the configuration files and the backed up / imaged data itself inside an image file. This image file can be one large multi gigabyte file or lots of smaller chunks and it contains not only all the files and folders, but NTFS file table system/ bootloader and MBR information. This means the entire image can be written onto a hard disk (or hard disk partition) and after reboot, the user could be presented with a fully functional system. Its for this simplicity that companies like Acer do their recovery in this manner.
I booted using a WinPE XP cd (but you can use anything mentioned above) and took a look at the partitions on the hard drive finding the following:
C: NTFS 69.5Gb (Formatted total)
D: NTFS (although reported as unformatted) 69.8Gb (Formatted total)
Hidden (Not mounted by default) NTFS 9.8Gb (Formatted total)
4Gb Unallocated space. (Wasted)
I mounted the hidden partition and eventually after some trial and error, found the file containing the password and password hint details. This was the file called “aimdrs.dat” (found on the root of the recovery partition) and could be opened in notepad (although I used and would recommend a good hex editor) and showed a very simple file layout as shown below:
Where “12345” is the password, encapsulated between the equals and two full stops. “abcd efgh” was the hint. This was literally the entire file.
Changing either of these simple strings is very easy and after a reboot into the recovery software (via [Alt] and [F10] during BIOS POST) you will once again be able to access the recovery software. I would recommend you do not change anything else in this hidden partition unless you know exactly what you are doing.
I hope this helps someone stuck in a similar position and is likely applicable to many more systems than just Acer PCs.