Getting Yubikey to work with LastPass

In the beginning of this year I got a YubiKey NEO from a colleague. As I was already using LastPass to manage my passwords I wanted use my YubiKey as part of the two factor authentication process.

Registering the YubiKey

You can register your YubiKey by going to the premium “Multi-factor options” in your LastPass account settings and enabling the YubiKey option. For the two factor authentication to work you need to press the button on the YubiKey to generate a OTP (One Time Password) which will be stored with LastPass.

Close but no cigar ūüôĀ

When I tried this for the first time I ran into a problem and got the following error: “At least one of the YubiKey tokens provided failed to validate.”. Copy and pasting this error in Google led me to a post on the LastPass support forum in which the solution was provided.

Thank you for contacting LastPass Support.

You need to set your YubiKey configuration to OTP authentication mode:

http://www.yubico.com/products/services … bikey-otp/

Once that is done, visit the following URL: https://lastpass.com/debug.php and where it says ‘YubiKey with LastPass’, run the authenticator to make sure everything is working properly.

If no issues found, try to setup the YubiKey once again:

https://helpdesk.lastpass.com/security- … ntication/

Let me know how it goes.

Best,
Jed

After enabling OTP I could register my key and start using it with LastPass.

Enable wireless on a Acer Aspire 5040 running Windows 7

I recently upgraded a Acer Aspire 5040 to Windows 7. After the upgrade¬†I installed all the drivers and found the wifi was not working correctly. ¬†Everything¬†looked¬†fine but I could not see any access points to connect to. To fix this issue I had to go Acer’s support website and download and install the Launch Manager. Before installing I had to enable compatibility mode for Windows XP and select run as administrator on the setup.exe. After rebooting the lights on the front of the laptop turned on and¬†¬†I could now detect access points.

Sites used:

  1. http://www.acer.com/ac/en/GB/content/drivers
  2. http://www.sevenforums.com/network-sharing/57483-wireless-acer-aspire-5020-a.html

flashing a bios chip with an Arduino

In this post I will share the process of flashing a bios chip with an Arduino.

What you’ll need:

Hardware:

  • A flash chip with the following characteristics
    • supported by flashrom (a list of supported chips can be found here)
    • SPI
    • 3.3V or 5V (both can be provided by the Arduino)
  • An Arduino Uno or¬†Duemilanove and usb cable
  • Some wires (make sure they are not too long as these will not work)
  • 3 x 10k resistors (for the 3.3v version)
  • 3 x 15k resistors (for the 3.3v version)

Software:

  • flashrom
  • frser-duino (formerly known as serprog-duino)
  • AVR toolchain

Connecting the Arduino-flasher

Before you can actually flash the chip you must first connect the flasher to the chip. Some motherboards have a SPI header which makes connecting the Arduino a breeze. Other motherboards may have a removable chip which you transport to a breadboard. If your motherboard doesn’t have either one you will still be able to use this method but you might need some wires/clips specially designed for working with chips and or microprocessors.

The ASUS P5B motherboard has a SPI header located near the BIOS chip. The pinout can be seen in the picture below. Please note that pin names can differ between chips ( i.e. the SO pin can also be named MISO or DO depending on the chip).

[Header Pins] <--> [Arduino Pins]
-----------------------------------
[1] VCC (3.3V in my case)<-->[3.3V]
[3] SO(MISO,DO)<-->[12]
[4] SI(MOSI,DIO)<-->[11]
[5] CS#(SS)<-->[10]
[6] SCLK(CLK,SCK)<-->[13]
[7] GND<-->[GND]

If your motherboard does not have a SPI header you can use the following information

Left pins of the BIOS chip:
-------------------------------------
[pin1 of the bios chip] /CS<->10k resistor<->VCC 
[pin1 of the bios chip] /CS<->Arduino pin10(SS, PORTB2)
[pin2 of the bios chip] DO<->Arduino pin12(MISO, PORTB4)
[pin3 of the bios chip] /WP<->VCC
[pin4 of the bios chip] GND<->GND on the power pins

Right pins of the BIOS chip:
--------------------------------------
[pin8 of the bios chip] VCC<->+3.3V on the power pins of the Arduino
[pin7 of the bios chip] /HOLD<->VCC
[pin6 of the bios chip] CLK<->Arduino pin13(SCK, PORTB5)
[pin5 of the bios chip] DIO<->Arduino pin11(MOSI, PORTB3)

Downloading and building the software

First you’ll need flashrom, the AVR toolchain and Git which can be installed¬†with some simple “apt-get’s” (I’ve used a Ubuntu live CD for this part).

sudo apt-get install flashrom gcc-avr binutils-avr gdb-avr avr-libc avrdude git

Next we’ll download and build frser-duino.

$ git clone --recursive git://github.com/urjaman/frser-duino
$ cd frser-duino

If you have a Arduino with an FTDI chip (which my Duemilanove has) you can use the command below. If not skip to the part about the 8u2 or 16u2 boards.

$ make ftdi && make flash-ftdi

Edit: If you execute the command above and receive an error stating that LTO has not been enabled you will either have to build avr-gcc with LTO enabled or remove -flto and -fwhole-program from the makefile. I’ve opted for the latter which did the trick.

For a board with an Atmega 8u2 (Arduino Uno) or a 16u2(Due) you can use:

$ make u2 && make flash-u2

Fla$hing the chip

Hooray ūüėÄ !You’ve reached the best part! In this step we’ll use flashrom to flash our chip.

To flash the chip you can use this command:

flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -w P5B.rom

If all goes well flashrom will write the specified file to the chip(in my case the P5B bios rom).

IMG-20120831-WA0003
Writing and reading the mx25l8005 with flashrom

To check if everything went according to plan you can dump the¬†chip’s content¬†by¬†using this command.

flashrom -p serprog:dev=/dev/ttyUSB0:2000000 -r good.rom

After completing the dump you can use a hex editor to compare the files. If they match it means you’ve successfully flashed your chip ūüôā .

Rom compare
Final comparison of the dumped rom and the original one from Asus

Links used:

Sansa Clip+ Repair

My girlfriend was almost in tears when she told me her beloved Sansa Clip+ would not power on anymore. She handed me the little music player and told me that earlier that day, she pressed the power button a bit too hard after which she heard something break.

When inspecting the power button I noticed it was a bit loose where it usually has some tension from the switch underneath. I decided to have a closer look and used a tutorial to help me disassemble the Sansa.

Looking at the board the problem quickly revealed itself. The “extreme” use of force had broken the solder connections between the power switch and the board and as a result the switch fell off. Time to get out the soldering iron!

After reseating the switch and repairing the broken solder connections the Sansa powered up again meaning my girlfriend could listen to here favourite music again and dry her tears.

Edit: After a week my girlfriend returned to me with her Sansa. This time she was only hearing sound from one of her earbuds instead of both. Because I taught her well she had already tried multiple headphones to verify the problem was not the headphones but rather the Sansa itself. I did some research and found that this problem can be fixed by reheating the solder connections between the headphone jack and the board. It appears that the “stress” resulting from removing and plugging in the headphones weakens the connections.¬†