Don’t write off the iPhone just yet

This may seem and odd premise, given that Apple flogged 4 million of the new iPhone 6 units as soon as it was launched. It doesn’t sound like a failure. But I’m hearing voices…

The theory is that the smartphone market is saturated. In the US, an often quoted statistic is that 75% of Americans already have one. In the UK, research from Deloitte puts the figure at 72% a year ago, rising at about 15% a year. Selling something everyone already has is not a good place to be.

Then there’s the inexorable rise of Android. Google launched the low cost, very capable and very affordable Android One phone in June. Never heard of it? Well it’s not available in the west – they’re going after the huge third world market, starting with India. There are a billion punters there, eager for the western tech. And the same with China, although they can make their own (as well as handsets for the rest of the world).

Generic Chinese Android handsets are good. I have one. It takes two SIMs at once and works under water, at a fraction of the prices of a western branded unit. Manufactures like Huawei, ZTE and Foxconn own this space and will be hard to shift. Google doesn’t make money from Android, and I doubt that the Android One will contribute much to their balance sheet. But Google is a data capture company, and have Google-controlled smartphones out there is strategically very good.

So, Apple must be doomed – a saturated market and cheaper smartphones that do it better. But that’s never been a problem Apple’s business model.

Apple’s products are aspirational – they say, “Look at me – I’m wealthy enough to spend £100s every year for the latest iPhone and therefore I’m a good prospect when it comes to making babies.” The more they cost, the more people want them. Fanbois may protest, saying that they iPhones work better (not so) and look nicer. Sony sells nice looking kit too, but is forecasting a $1.2B loss from its Android smartphones. The same with HT; it’s just breaking even on declining sales. Samsung is making a good profit ($6B), but there’s a suspicion this has been generated on a huge marketing spend.

Apple doesn’t need to spend too much on marketing. It just has to look cool and remain aspirational.

According to Juniper, shipments of smartphones will be close to 1.2B units this year (with 985M shipped in 2013). That’s a high volume, but if it’s the Android One and low cost units going to emerging markets (those not yet saturated), the bulk of that will be making meagre profit.

Apple, on the other hand, makes a very nice margin, thanks. Fanbois will happily hand over $100s simply to have one with a larger flash memory; several thousand percent more than the memory itself costs elsewhere. They’ll accept that the limited-life battery is ;sealed inside and will die, taking the iPhone with it in a couple of years. They’ll accept that there’s no memory card slot as an alternative to buying the ridiculously expensive internally upgraded models. They’ll even put up with the poor telephone performance; after all the screen looks very nice (don’t tell them that Samsung beat them too it).

I used to work with Cuppertino in the late 1970’s and early 1980’s – lots of people did because the Apple II was a major player; a de-facto standard. Then in 1981 the IBM PC was launched, became the new de-facto standard and Apple was marginalised with the Mac, losing market-share big time until it was less than 10%. 25 years ago I was discussing their demise with Guy Kewney, a good and wise pundit and friend. “You’re wrong”, he said. “The PC market is much bigger. Other PC makers would be very happy to have 9% of the current market, and they have much lower margins than Apple.”

Google geek lives on site for year. Yawn

Matthew weaver told the BBC he lived on site on Google’s. Mountain view campus. for 54 weeks between 2005 and 2006. Are we supposed to be impressed? Well it’s a long time but the story continues to reveal he was living in a camper van. How soft modern techies have become. Back in the early 1980’s living on site while a project was on was not at all uncommon. I certainly was not the only programmer in small tech startups to spend the night under the workbench in a sleeping bag. It was an alternative soft option to simply working through the night.

These young techies simply don’t know they’re even born. Camper van indeed!

Change your password frequently(?)

You might be forgiven for wondering why this advice is given out – or mandated by your IT department. There is logic behind it, but I think it does more harm than good.

So-called hackers don’t actually break into systems by guessing the password, assuming the password is non-trivial. It would take too long. If you’re using “Pa$$word1” or “admin” and think it’s non-trival, you’ve got it coming. But a reasonably long string of random letters would simply take too long to guess. It’s not like they show it in the movies.

So if your password is too long to guess, why change it? Paranoia that someone might have read the post-it note on your monitor? If that’s the case then changing it every month won’t exactly help as the horse will be well clear of the stable.

There is a reason, and it’s to do with maths and the way passwords are stored. If the system holds your password in file so it can compare it with whatever you typed in then it’s a primary school programming project. In the real world that is a very bad idea, because if someone ever got into the system and was able to read the file then they’d have everyone’s passwords, leading to access to everything else. They will be using the same password for other things.

Instead any sensible system stores a hash of the password. Take the password, pass it through a hash algorithm, and end up with a string of random-looking characters and store that. Because an algorithm always produces the same output from the same input, you can take the entered password, run it through the hash and see if it matches the stored hash version. The trick is that if you only have the hashed version it’s impossible to reverse the algorithm to get the original password back.

To see how this works, let’s use a numeric password. As computer data is always numeric anyway, a string of characters is actually a number, but the number is too large to make a good example.

Our hash algorithm could be to divide the password (or passnumber?) by Pi and throw away the integer part.

123 becomes 1521160006
456 becomes 1493080998
789 becomes 1465001990

And so on…

It’s not the worlds greatest hash algorithm, but try figuring out what password 994384198 is hashed from and you’ll get my point.

So if the password is non-trival and stored as a hash, why change it every month? Why indeed! Because if you throw enough computing power at a hash and know the hashing algorithm you can always work back and find the password by brute force – that’s to say trying every possible password. You can always open a combination lock if you go through every possible combination. The key to why this doesn’t matter is “enough computing power”. If it takes the fastest computer a month to break a hash then by the time it’s been reversed you’d have changed it anyway.

In reality, of course, you’re not looking to cut things so fine – if it can’t be broken in 100,000 years then it’s reasonably safe – the odds against reversing the hash in time are greater than 1 in a million.

Unless the password can be guessed. It might take “forever” to reverse a random hash, but if it’s a word or a name or a “clever” variation on a word or a name substituting 1 for L and $ for s, adding a number on the end and capitalising the first letter then it’ll be much quicker. Safe passwords are reasonably long and completely random.

And there’s the rub. If some genius IT manager, government cyber-security agency or Microsoft tells users to change their password every 30 days they are not going to pick a new sequence of random letters. They’re going to take their old password and increment a couple of digits on the end. Once an attacker has reversed an older hashed password it becomes trivial to reverse the current one, and if users are forced into using words or something they can re-remember easily every few weeks they’re going to be quicker to break from scratch.

So what to do? Two things: make sure users have reasonably long and properly random passwords and make sure the hashes aren’t stolen. What you shouldn’t do is implement a policy where human nature will wear them down into using weak ones.

And if you’re using ssh, use a certificate login – not a password.

Barclays launches biometric finger scanner

In a headline-grabbing move, Barclays bank has launched a finger-scanner for its customers to use when identifying themselves on-line. It’s not an easy-to-fool fingerprint scanner; this one examines the veins in the user’s finger to determine a match.

Like most biometric identity verification methods, I think this is anything more than a gimmick – at least as it’s being reported (encouraged by Barclays) as some kind of future for consumer banking. They’re actually launching it for corporate users, where it probably does have a niche.

The problem with biometric identification is that it’s just as susceptible attack as a password, but a lot more expensive. In fact, if someone uses a secure password, fooling biometrics is often quite easy in comparison.

Imagine how it works: The scanner examines the finger and passes metrics to the bank – just like a password. Because fingers are squishy and organic, the metrics will vary each time so the bank’s computer is only looking for a “close enough” match. Passwords have to be spot on.

So how can a vein scanner be fooled? Well, I’m sure they’re encrypting the data end-to-end to make a replay attack difficult (sending the same scan data twice). At least I hope they are! But at some point the data is unencrypted – it’s coming from analogue sensors looking at the finger. Hack the sensor and you’re away.

Barclays may have done something very cleaver, and I will watch to see if this is true with interest, but however it works, I can’t see it being any more secure.

So why bother? Simple – it’s more convenient. If you’ve got a load computers in a corporation with different employees wandering around making bank transfers, you really want to know who’s doing what. Passwords in the public are one thing, but within an organisation, they get passed around. Usually the employees do this willingly, but someone with crooked intent can find they by other methods.

You can use smart-cards to identify employees, but these can be “borrowed” too. Using a finger makes sense. Vein scanners don’t work on dead fingers, so you an be fairly confident that the user is who you think it is. Weighed against the cost and reduction in total security, it’s probably a good thing.

As an ID form for the public, I think not! A corporate environment is controlled; it’s not the Internet. I would hope that companies can avoid having thousands of criminals trying to defraud them 24/7 working on the inside, but that’s exactly what you have on the wider Net.

(more to come)

Leaky iCloud

As I picked up my copy of Private Eye at the station Newsagent just now I noticed the headlines on certain of the dailies going on about hackers stealing naked photos of celebrities from their Apple on-line storage areas. The fact that they were (apparently) celebrities and that the weren’t wearing clothes was the main point for the tabloids, but the big story is really the security of cloud storage.

Personally, I’d be very surprised if attackers had actually compromised Apple’s servers. More likely explanations would be an inside job, or the lusers endpoints. But my money would be a phishing attack.

It does highlight, however, the danger of outsourcing your sensitive data to anyone.

In the 1980’s the fad for outsourcing really took off. Professional engineers all said it was a bad idea then. If your company data is important, the last thing any business should do is trust it to someone else.

The term ‘cloud’ has become a trendy marketing concept in recent years. What it really means is “I have no idea and don’t care.”. It was used in context as follows:

“Where is that service your using actually running?”

“Don’t know, somewhere up in the clouds!”

It’s was ironic. In the real would, admitting you’ve lost control of your data is hardly something anyone would be proud of. But suits heard the new buzzword and wanted some of it. And the punters quickly accepted the benefits (free stuff) without a thought to the risks.

So has Apple’s on line storage been compromised? I doubt it’s been hacked. The technology is fairly robust. If you want to access iCloud data, Apple’s servers themselves are not the soft attack vector. The obvious method is to trick users into handing out their passwords. After all, any coy celebrity foolish enough to (a) take pictures of themselves in the buff; and (b) store them on someone else’s computer, are hardly going to be the brightest stars in the sky.

The fact that fanbois seem to have been the victims in this case is irrelevant. They may have been easier targets if, indeed, it was a phishing attack. However, the general principle remains the same whoever is providing the service – Amazon, Google, Dropbox, Microsoft or one of the many startups trying to get a bit of the action. And the same goes for Facebook and the like – anyone uploading anything remotely sensitive to their servers needs to consider the implications. If you wouldn’t publish something directly on your web page for all to see, don’t send it to “the cloud” either.

The American gun-selling industry has long used the argument that firearms in themselves aren’t dangerous. It’s the users that are the problem. They’re right, in so far as the argument goes. Unfortunately, adding the human factor to cloud services makes the encryption, data centre security and other precautions taken by the providers irrelevant in the same way. People will be hurt. And “celebrities” will caught with their pants down.

FreeBSD ports build fails because of gfortran

I’ve been having some fun. I wanted to install the latest ported versions of Apache and PHP for test purposes, so set the thing compiling. There are a couple of gotchas!

First off, the current ports tree will throw errors on the Makefile due to invalid ‘t’ options and other fun things. That’s because make has been updated. In order to prevent you from using old “insecure” versions of FreeBSD, it’s considered “a good thing” to cause the build to break. I’m not kidding – it’s there in the bug reports.

You can get around this by extracting the new version of make for the 8.4 iso image (oldest updated version) – just copy it over the old one.

Some of the ports also require unzip, which you can build and install from its port in archivers.

Now we get to the fun part – because the current system uses CLANG but some of the ports disagree, when you go to build things like php5_extensions (I think the gd library in particular) it depends gcc, the GNU ‘C’ compiler, and other GNU tools – so it tries to build them. The preferred version appears to be 4.7, so off it goes. Until it goes crunch. On inspection it was attempting to build Fortran at the time. Fortran? It wasn’t obvious why it broke, but I doubted I or anyone else wanted stodgy old Fortran anyway, so why was it being built?

If you look in the config options you can choose whether or not you want Java. (No thanks). But in the Makefile it lists
LANGUAGES:=    c,c++,objc,fortran
I’m guessing that’s Objective C in there – no thanks to that too. Unfortunately removing them from this assignment doesn’t solve the problem, but it helps. The next problem will come when, thanks to the new binary package system, it tries to make a tarball of the fortran stuff it never compiled. I haven’t found how this mechanism works, but if you create a couple of empty directories and a an empty file for the man page it’ll proceed oblivious. I haven’t noticed and adverse effects yet.

A final Pooh trap if you’re trying to build Apache 2.4, mod_php5 and php5-extensions is the Zen Thread-Safe options (ZTS). If you’re not consistent with these then Apache/mod_php will fail to load the extensions and print a warning in httpd-error.log. If you build www/mod_php5 you’ll see a warning like:

 

/!\ WARNING /!\
!!! If you have a threaded Apache, you must build lang/php5 with ZTS support to enable thread-safety in extensions !!!

 

Naturally, this was scary enough to make me stop the build “make config” to select the option. Unfortunately it’s also an option on lang/php5 and if you didn’t set it there then it’ll go crunch. Many, many thanks to Matthew Seaman from FreeBSD.org, who figured out what I’d done wrong.

No-IP, no sales

No IP is my Dynamic DNS provider of choice. They provide a fuss free service if you need to assign a DNS entry to a dynamic address, and it’s also free of charge. What’s not to like?

If that’s not reason enough to support them, they had a bit of bullying from Microsoft lately, but are now back on-line. If I needed an external DNS provider, I reckon they deserve my business. So how curious that they don’t have a sales department? At least none that I’ve been able to contact. Out of desperation I emailed the webmaster (the most likely contact in their published list) and got an (automated) reply suggesting I raise a support ticket.

Needless to say, when I tried to raise a ticket it asked me a load of questions about the product I had. “Not applicable”.

If it turns to be too much hassle trying to buy a service from them, I’ll just have to peer with someone. Does anyone with BIND running in a DS that I’m not in want to do a swap on DNS replication? Why? 512K day, that’s why!

Windstream spammers

Poor old Windstream, or should that be Spamstream? Okay, perhaps not a laughing matter for them as stuff is coming from their outgoing mail cluster thick and fast, but we’ve just sent off a dozen samples and are awaiting a response. Pretty unremarkable, really, except they have an on-line help/chat facility and we just had to have a go…

Wendy: Hello, I am Wendy our Virtual Agent. I am here to help you with your support questions on High-Speed Internet, Digital TV and Home Phone.
You: We’re getting a lot of spam from a couple of your SMTP servers. Is there any reason why we shouldn’t blacklist all your IP addresses?
Wendy: I would be happy to help you set up your e-mail. Choose what you would like help with from the options below:
– Server and port settings for Windstream e-mail
– Detailed instructions to set up e-mail
Ho hum! Let’s help their abuse department is better than their on-line support service. And sorry guys, but you are spewing…

Scammers ask for money for Ukrainian Government

We have intercepted a large number of spam e-mails sent from various compromised systems, pretending to be from the Ukrainian government and asking for donations to fight off those nasty Russian backed separatists. Having checked, there is a pretty good chance that the scammers are actually based in Russia. It’s unclear whether this is in fact the work of president Putin, but perhaps he is trying to collect extra cash before the sanctions come into effect.

We have yet to see any serious attempt at exploiting the situation in Gaza, which is something of a surprise. Most likely they’re not making it through the basic spam filters.

Does freezing a broken hard disk help with data recovery?

The idea that freezing an unreadable hard disk could bring it back to life has been around for a long time. Ordinarily I’d say “No way, don’t do it”. If you’ve lost your hard disk the last thing you want to do is mess with it in any way. Take it to an expert; a real expert that is – not some shop on the high street with a sign up saying “Data recovery and virus removal”.

However, this story doesn’t go away. And there is a grain of truth in it. I remember some mid-1990’s drives did benefit from the freezer treatment – it shrunk the platters slightly and realigned the bearings. Or that was the theory. Anyway, it sometimes worked. Back then. However, luser forums are full of stories where people have used this technique on modern drives and claimed success.

On my desk at the moment I have a 160Gb SATA Maxtor, vintage 2002. And it wouldn’t read. This is partly because parts of the platter are now unreadable, and partly because the NTFS filing system is mangled. I know this kind of stuff. After a couple of days I reckon I’ve got all the blocks off it that it’s going to yield, but repeatedly retrying the bad sectors. Some read eventually, other’s don’t.

Now it’s an observable fact with dodgy platters on winchesters that they’ll sometimes, briefly, come good. It’s worth powering down the drive, letting it cool and trying again later. It’s even worth trying it at different angles. Having a few fans around it to keep it cool is a good idea anyway. Using these techniques I’ve recovered about 80% of the bad sectors, with about 2500 left that aren’t doing it. A good candidate for the freezer perhaps? Well, as a last resort – I’ve tried the drive at room temperature, working temperature (about 35C) – where’s the harm in trying it sub-zero?

I mus emphasise here – this is a last resort – 99.999% of the data is off it and it’s stuck a that. There’s nothing to lose.

So, in to an airtight box and into the freezer with it.

Did it work? No! In fact the whole drive ended up unreadable. I’d put that down to the condensation. If you want to knacker a drive without leaving marks, condensation on the platters is a good way to go.

Leaving it to get back to room temperature did result in it coming back to life, although I only got two more sectors back.

So why do all these people keep insisting it worked for them? Coincidence, I reckon. If they’d left the drive alone for 12 hours it might have started working anyway. They often do, even for a brief period. This drive had proved that some sectors were heat-sensitive; more could be read while it was still cool and the recovery rate dropped off when it was warm. If it didn’t help with this drive, I seriously doubt it would work on other candidates.