Sunday, 18 May 2008

xkcd.com - Security Holes

Follow on from my last post the wonderful xkcd.com has a humorous take on the whole matter

Photobucket

Labels: , , , ,

Bookmark and Share

Friday, 16 May 2008

Debian/Ubuntu: Serious OpenSSL/SSH vulnerability

Debian - you can never be sure

Debian - guaranteed entropy

Back in September 2006 a line of code was removed from the Debian distributed OpenSSL package. The reason? That one line of code was responsible for causing an uninitialized data warning in Valgrind, the linux based programming tool used for memory debugging, memory leak detection, and profiling, by removing it the error went away!

Unfortunately that one line of code also seeded the random number generator used by OpenSSL, so as a result the keyspace used by affected systems went from 2^1024 to about 2^15.

Secure Sockets Layer (SSL), and the newer Transport Layer Security (TLS) are the cryptographic protocols that provide secure communications on the Internet for such things as web browsing, e-mail, instant messaging and other data transfers. There are slight differences between SSL and TLS, but they are essentially the same.

The problem is when creating a encryption key with the affected version of OpenSSH, there are only 32,767 possible outcomes for a given architecture, key size, and key type (as opposed to the intended 1.79769 × 10308), leaving it wide open to attack.

A large majority of Debian and Ubuntu systems are affected. To correct the problem, users need to not only update OpenSSL, but also revoke and replace any cryptographic keys and certificates that were generated on the affected systems. From the Debian security advisory:
Affected keys include SSH keys, OpenVPN keys, DNSSEC keys, and key material for use in X.509 certificates and session keys used in SSL/TLS connections. Keys generated with GnuPG or GNUTLS are not affected, though.
For most people this affects the SSH server's host key and any public key pairs used for remote SSH authentication. However it is a more of a headache for people with web servers as any keys or certificates generated on the affected machines for SSL/Https use also need to be revoked and regenerated.

There is a lot to think about here. I have worked with many software developers and have noticed that many have this natural tendency to want to fix and re engineer things that aren't even broken. (I am guilty of it myself)

This stems from an engineer's weird desire to make sense of thing, by taking something apart and putting it back together is a common way to increases familiarity and understanding of the machine, engine or indeed the code they are working on. But it hard to restrict the tendency is to try and make 'improvements'.

More discussion of the problem here
Debian OpenSSL Predictable PRNG Toys

Labels: , , , , , , ,

Bookmark and Share

Thursday, 24 April 2008

Tomato Firmware installed on my WRT54G

Tomato
Well I took the plunge and just installed it - will report as I discover any benefits/bugs.

I am hoping it will improve the reliability of my wireless connection to my XBox/XBMC setup, it's been a bit flaky lately.

Labels: , , ,

Bookmark and Share

Sunday, 16 March 2008

To quote David Coverdale "Here I Go Again!"

Whitesnake - Here I Go Again!
Click the picture for some classic 1980s rock ballad and insane hairstyles!

Back in January before I split my online ramblings into two distinct blogs I posted about some problems with my main Dell Windows XP box and it's recurrent BSOD problem.

Well last Thursday I found my computer hung up again and after being forced to power it down and rebooting found it extremely sluggish and within a few minutes the familiar "Stop 0x000000F4 BSOD" appeared. Checking the event viewer it was apparent that yet again bad blocks on the hard drive were the problem so I had to run a "chkdsk /r" which this time took the best part of 24 hours!

While it was doing that I decided I would have another look at getting a desktop Linux box running. I was tempted by openSUSE but opted for Fedora8, I have had good experiences with both distributions in the past as opposed to my awful experiences with Ubuntu, I think it may be the hideous brown colour scheme!

shit box

My target hardware came courtesy of my neighbour who was disposing of some old pcs. On investigation this old Packard Bell came with a MSI K7TM Pro (MS-6340) motherboard an AMD Athlon 800MHz, 256MB of RAM and NVidia Vanta TNT2 video card and on board sound and a DVD-CD/RW combo drive. I installed a spare 80GB harddrive, boosted the memory to 640MB and stuck in a network card. I upgraded the BIOS (which made a remarkable difference to the options available) and stuck in the Fedora8 Install DVD and off it went.

Fedora8
You can see the Fedora8 running on the left while the XP box on the right struggles to correct itself!

I have been pleasantly surprised how reasonably it runs on relative underpowered hardware and more surprised how much easier I found it to get things running. In the past I have always hardware incompatibility problems, often in the install failing completely, or software problems. So all I have ever done is get a rudimentary server running, mainly so I could use it as a SSH proxy to bypass my previous companies web block and logging! That is not to say I did encounter a few minor problems but they were easily corrected and I will post some of the solutions later.

The machine called "INSANE" is fully integrated into the Windows network, prints and scans using my HP 3210 All-in-one printer/scanner. It plays videos, mp3s and I even compiled the last.fm client!

Labels: , , , ,

Bookmark and Share

Wednesday, 5 March 2008

Warning on Firewire Insecurity

Photobucket

It is already being wildly reported elsewhere but Firewire (IEEE1394) ports on computers are a potential security risk.

The insecurity has been known about for many years, but with the recent publicity about the Disk Encryption ram hack Adam Boileau has decided to release his tool, which he claims to have sat on for two years waiting for a response from Microsoft.

The insecurity is because the specification of the protocol allows devices on a FireWire bus to communicate by direct memory access (DMA), where a device can use hardware to map internal memory to FireWire's "Physical Memory Space". The SBP-2 (Serial Bus Protocol 2) used by FireWire disk drives uses this capability to minimize interrupts and buffer copies. In SBP-2, the initiator (controlling device) sends a request by remotely writing a command into a specified area of the target's FireWire address space. This command usually includes buffer addresses in the initiator's FireWire "Physical Address Space", which the target is supposed to use for moving I/O data to and from the initiator.

On many implementations, particularly those like PCs and Macs using the popular OHCI, the mapping between the FireWire "Physical Memory Space" and device physical memory is done in hardware, without operating system intervention. While this enables high-speed and low-latency communication between data sources and sinks without unnecessary copying (such as between a video camera and a software video recording application, or between a disk drive and the application buffers), this can also be a security risk if untrustworthy devices are attached to the bus.

Adam Boileau released a Linux Firewire utility that will give you immediate Administrator to an XP machine:
It's two years later, and I think anyone who was going to get the message about Firewire has already got it, and anyone who was going to be upset about it has got over it. Besides, according to Microsoft's definition, it never was a Security Vulnerability anyway - screensavers and login prompts are - as Bruce says - about the Feeling of Security. Anyway, today's release day for Winlockpwn, the tool I demoed at Ruxcon for bypassing windows auth, or popping an admin shell at the login window....
  • Yes, you can read and write main memory over firewire on windows.
  • Yes, this means you can completely own any box who's firewire port you can plug into in seconds.
  • Yes, it requires physical access. People with physical access win in lots of ways. Sure, this is fast and easy, but it's just one of many.
  • Yes, it's a FEATURE, not a bug. It's the Fire in Firewire. Yes, I know this, Microsoft know this. The OHCI-1394 specification knows this. People with firewire ports generally don't.

Adam's tools include a few Python apps that can copy and impersonate Firewire device signatures, dump RAM on a remote machine, bypass Windows authentication, and extract BIOS passwords. It's not exactly comforting, but I've got a new appreciation for Firewire now. This is the sort of access that used to only be possible by creating hardware that physically connects to the PCI bus. Now all you need is a cable and a laptop.

Labels: , , , ,

Bookmark and Share