Showing posts with label Security. Show all posts
Showing posts with label Security. Show all posts

Thursday, February 15, 2018

Disrupting über-surveillance: a five point plan

Yesterday I wrote about the potential for new sensor, effector and AI technologies to create a totalitarian surveillance state (after Charles Stross). What could be done to defy such measures?

At the extremes there is, plainly, no solution. If you're thrown naked into a hardened cell, they junk the key and never visit you again .. you're going nowhere.

But real-world security systems are not like that. They're constructed of real, fallible and resource-limited components. Think of the surveillance system as a security agent, as shown below.

A functional diagram of the surveillance-enforcement system - with countermeasures

The surveillance systems are top right: cameras, microphones, pressure pads, .. whatever.

Sensor data is interpreted into symbolic form via low-level primary processing. Interpretation can be informed by feed-forward of higher-level hypotheses - as in the predictive processing model.

In a context of the system's present beliefs and goals, the perceptual world-view is acted upon by a planning system to determine the appropriate response. This is the point where humans are likely in the loop.

Finally, going down to mid-bottom of the diagram, resources are chosen and marshalled and tasked to execute the operational response: "stop and search", "arrest", "kill" .. .

Each of these modules has a possible attack point from the viewpoint of the adversary.

  1. Sensors can be physically attacked - cameras can be painted over or depowered.

  2. Interpretation can be confused: some AI vision classifiers have had problems with patterned spectacles; there are opportunities with disguises and bogus roles.

  3. Planning and resource-assembly can be disrupted by physical attacks and/or resource-intensive diversions. Or directly by an insider.

  4. The beliefs and goals of the system can be subverted: from the outside by subtle misdirection (eg use of an apparently-benign front organisation); or internally by hacking.

  5. The final execution stage can be met with misdirection, attacks or diversions.

As the surveillance and enforcement systems get ever more ubiquitous and sophisticated, the rigidities of AI transform into vulnerabilities. Absent an AGI (and they will be absent), security systems are baffled by human subtleties while human overseers flounder in alert-trivia.

Adversary cleverness, preparation and resources on the ground make for a more even contest than one might imagine.

---

You can usefully think of the security state as a vast, distributed, rather rigid and not-terribly-bright personality. An ESTJ most likely. Then consider how you might fool, or con such a person.

Most of the time this will work, but beware: eventually - if you are successful - they will put someone smart and imaginative on your case.

The security state can change its personality on a sixpence if sufficiently provoked.

Monday, October 16, 2017

Time to go post-Google

For a long time I used to not care about Internet privacy. And then Google got into SJW mode and ceased to be my friend. I read about its business model, the Amazonian torrents of cash that advertisers pour into its coffers .. and I wondered if it would always have my best interests at heart.

So I decided to use DuckDuckGo for all those searches which I'd like to keep from the planetary AI. But Google, and my ISP, still know way too much.

... but you're never alone with a keylogger

On my Android devices, the DuckDuckGo app has a setting to 'enable Tor' which I checked. It then helpfully prompts you to install the Tor router Orbot and the Tor browser Orfox. It's easy.

Orbot does not provide generic anonymous Internet access; programs have to be configured to work with it. Basically things work best if you access websites via the Tor Browser .. which is the search term for Windows PCs.

The thing is, I know that the AI assistant we're slowly crawling towards will only work if it knows more about you than your closest confidante. And it will live in the Cloud. But I would pay to have that knowledge base under my control and lodged with a trusted third party (like the folks running ProtonMail).

Keyloggers

Google's middleman offer to advertisers and you & me is based on the twin peaks of narrow domain expertise, increasingly based on neural net AI such as Google Translate and voice recognition, and its ability to integrate across its apps which thread to so much of our lives: email, photos, calendar, notes, search queries, etc.

Google does the bulk of this information centralisation and synthesis in the Cloud: that is, on its own servers. The resulting real-time data model of you both repopulates your apps (Chrome talks to Gmail talks to Calendar talks to Google Now talks to GPS talks to Maps ...) and is sold to advertisers for targeting.

If we're to bring that level of integration back into our own hands, then we need to capture our activity across many different apps and device functions. Perhaps one day all apps will have a standard API with which to talk to our personal assistant app .. but until then it's a benign keylogger I'm afraid.

The other people who are big fans of keyloggers are the intelligence services and those vendors (like Microsoft) who are losing out in the race for ubiquitous ownership of our most popular apps.

Sunday, October 16, 2016

The Bitcoin Transaction Process Model

The process of setting up and validating a Bitcoin transaction is complex and seems under-explained in the literature. For what it's worth, here is my own attempt to figure it out.

Some caveats. I have oversimplified, not taking account of transaction fees. I have not tried to be faithful to the syntactic format of a transaction; I'm after maximum conceptual clarity.

As is traditional, Alice is going to pay Bob 12 milliBitcoins, which I estimate today is worth £6.36.

The idea of Bitcoin is that everything is transactions. For Alice to pay Bob, someone else must have already paid her. I'm going to make it real easy and assume Alice has already received a single payment (from someone else) of 12 mBTC - this is called an 'unspent transaction output - UTXO', and she is merely going to 'pass along' that 12 mBTC to Bob.

---


This is how Alice got her 12 milliBitcoins

The transaction I'm calling TX: Pre was set up by someone else to pay Alice 12 mBTC. The payment was to Alice's Bitcoin address, a designator (like a bank account), which was constructed by hashing one of Alice's Public Keys and encoding it into an alphanumeric format (Base58). There are no security issues here, Alice published this Bitcoin address freely to accept payments. It all worked.

---


Alice constructs a transaction to pay Bob 12 mBTC

So TX: A2B (my name for the purposes of this post, not a Bitcoin term) is a new transaction. Alice (Alice's wallet software in fact) first inserts a pointer to TX: Pre, to its location on the public Blockchain - recall this is the source of Alice's 12 mBTC.

Secondly, she combines (most of) the fields in TX: Pre along with Bob's Bitcoin address to produce a hash code. This is then encrypted with her Private Key (corresponding to the already mentioned Public Key) to produce a digital signature. Only Alice can produce this digital signature as only Alice knows her own secret private key.

She then adds Bob's Bitcoin address as the destination, the amount of 12 mBTC to pay, and some other stuff (of course!) and the transaction is now ready to be launched onto the Bitcoin peer-to-peer network. Every node that receives it will check the transaction for validity (there are many checks in fact).

---

How can the Bitcoin network ensure Alice is the only one who can spend that 12 mBTC on prominent public display on the Blockchain as TX: Pre? Note that like all transactions on the Blockchain, TX: Pre is read only and cannot be altered. To do so would constitute a successful attack on the Blockchain - the 'confirmations' mechanism is one way this risk is mitigated.




The transaction validation  process model (carried out by all full nodes) 

A validating node (including Bob, who has perhaps the greatest interest in determining that Alice is legitimately able to pay him) first repeats Alice's hash.

TX: A2B has a pointer to TX: Pre so this can be retrieved from the public Blockchain and concatenated with Bob's Bitcoin address which is stored in the 'output locking script' part of TX: A2B. So these two items of data are hashed.

At the same time, Alice's public key (in the 'input unlocking script' of TX: A2B) is used to decrypt Alice's digital signature, uncovering Alice's original hash. If the two hashes are equal, this proves that Alice originated this transaction.

We finally make sure that Alice's Public Key (which we know to be valid because it unlocked Alice's digital signature) matches Alice's Bitcoin address (the latter is a hash of the former) from TX: Pre. Once this is done we are assured that the Alice who was the recipient of 12 mBTC in TX: Pre is the same Alice as the one who has originated (and signed) TX: A2B.

Bob can breathe a sigh of relief.

Note that formally, the above validation procedure is a concatenation of the 'input unlocking script' from TX: A2B and the 'output locking script' from TX: Pre.

And once TX: A2B has been lodged on the public Blockchain, transaction TX: Pre will be 'chained' to it, so will now be considered 'spent'. No-one else can spend it.

---

If anyone sees an error in this account which is more than just sloppy over-simplification, I'd be grateful if you could put something in the comments and I will fix it.

You may also be interested in my review of "Mastering Bitcoin: Unlocking Digital Cryptocurrencies" by Andreas M. Antonopoulos, and the diagram (from Satoshi Nakamoto's original paper) there.

Wednesday, August 24, 2016

One small error on the Internet ...



This interesting Guardian article, "The takeover: how police ended up running a paedophile site", is discussed by Bruce Schneier.

Two high-profile, security-savvy paedophiles were taken down based on the smallest of errors.

The paedophile site
“... ran as a company or business,” Rouse says. Senior administrators took charge of individual boards, grouped around categories such as boys or girls, hardcore or non-nude. Users had to upload material at least every 30 days or risk exile. Each of its 45,000 accounts were ranked according to the quality of their output, with a “producer’s area” walled off to all but the most feted.

At the top was one man, “effectively the CEO”. He regularly started his messages with the cheery greeting “hiyas”.
The article explains how that one idiosyncrasy was enough to identify him.

The second paedophile took exhaustive steps to cleanse his uploaded material of any identifying information.
"Access to the full suite of Huckle’s material provided the breakthrough. It was not what he photographed, but what he photographed with. Embedded in some of his images, overlooked when he swept the files of metadata, was the brand and model of his Olympus camera. A tiny clue – but enough.

"Officers exhaustively swept photography sites such as Flickr and TrekEarth for photos taken in south-east Asia using the make and model."
Following that flimsy thread was, it turned out, enough.

I've long been convinced that it's essentially impossible to stay secret on the Internet if a major intelligence agency is on your case.

The article describes a fair amount of labour-intensive Internet searching by Australian police, but it's not hard to see how that could be mostly automated. And if the intelligence agency is allowed AI-based filtering of generic Internet streams, then security through obscurity doesn't really work either.

It would be interesting to know how agencies such as the NSA and GCHQ assess the Internet tradecraft of Islamic fundamentalists. Based on the levels of smartness and training we've heard about to date, I would guess that to any efficient agency with legal access to the right tools the wannabe terrorist is effectively saying, "Here's where I live. Come on in, rummage freely and stay as long as you want."

I think this explains the lack of successful attacks (touch wood) that we've seen in the UK the last few years. It's certainly not for want of attempts.

Of course, if your communications security agency is not up to speed - Hello, Belgium? - even incompetent jihadis can still make it happen.

Tuesday, July 26, 2016

A Memo to the Interior Minister



Dear Minister,

Following the latest Islamic-inspired atrocity, you asked for a list of security policy options.

Let us start with the obvious: there are no good security policy options.

Suppose we have twenty million Muslims in Europe with relatively free movement, and suppose only one in a thousand (0.1%) presents a risk of active violence, then that's still twenty thousand very dangerous young men (yes, they do seem to be mostly young men).
  1. In some cases we know who they are, but more often than not, we don't.
  2. Even if we're suspicious, at present we don't have powers to detain them.
  3. The population of 'bad guys' is subject to continual immigration churn.
Here are your options:

1. Deport all the Muslims and reinstate border controls

There are historical precedents: expulsion of the Jews in the Middle-Ages, Stalin's population transfers in the first half of the twentieth century.

Still, so much hardship would be caused to the 99.9% of non-terrorist Muslims that public opinion would never support such a policy. Plus it seems logistically impossible - where would they go?

2. Intern all the bad guys we know about

Illegal at present but perhaps that could be fixed. It would remove some of the potential bad guys but recall we know only a fraction of the potential perpetrators. Plus various Middle-East organisations such as ISIS could always infiltrate clean skins.

There's the injustice factor too. Just because we think someone's potentially bad, doesn't mean we're right. Think Guantanamo Bay.

And remember the old adage: remove one, create one. These guys are big into 'never forgive, never forget'.

3. Guard the schools, churches, synagogues, sports stadiums, ...

Yes, there's the problem. Too many targets, not enough guards, and the bad guys just choose a category we didn't get around to guarding. You can't stop the car driven into a random crowd.

4. Vastly increased spy and surveillance network

The population has been brought up on civil liberties scares but this, at least, has some potential. With considerably more resources poured into informer networks, plus more CCTV and surveillance automation we can massively up our 'prevented in advance' statistics. But some will always get through, and you will not get credit for the potential atrocities we were able to prevent.

5. Stop bombing Middle-East Muslims

It's been a political dogma that terrorist attacks in our country are completely decoupled from our own armed actions in Muslim countries. But you know that's rubbish.

If we stop offensive actions and leave the Middle-East to stew in its own Cauldron of Hell, then arguably we become less visible as a target. However, even if we call it a day, other European countries would need to as well. Whatever our problems in seeing ourselves as a 'United Europe', our Muslim attackers don't really differentiate amongst the 'Crusader nations'.

In any event, if we stopped dropping bombs on them the pace of their attacks on us would undoubtedly slacken but they would hardly cease, since our whole culture is an abomination to them. So this option is by no means a panacea.

The alternative is the old Roman one: go in with overwhelming force and annihilate them. This would work against state-sponsored terrorism, but unfortunately turning the desert sands to glass works less well against religious zealotry.

We would caution against following the Trump line on that one.

5. Just Keep Calm and Carry On

Yes, Minister. We are well aware that this is your de facto policy and that you see no alternative. You were even unwise enough to say so in public.

You have privately stated many times that Islamic terrorism does not pose an existential threat to our country and you are surely correct in this.

It does, however, pose an existential threat to your continuing in office - arguably of equal importance in your thinking.

---

In conclusion, and taking everything in the present conjuncture into account, we would recommend option 4: a massive increase in resources to the security services and a transition to a much more authoritarian role for the state.

If you would be so kind as to take the political flak, Minister, we'll get right on with spending the money.

Yours in confidence.

The Joint Security Committee.

Friday, April 01, 2016

ISIS infosec seems to be rubbish

How ISIS does information security

CNN reports:
"Last summer, a French student was arrested in Paris on suspicion of a plot to take hostages at a concert hall. His name was Reda Hame. According to a transcript of his interrogation obtained by CNN, Hame claimed he had been provided weapons training, including in the use of Kalashnikovs, by Abaaoud in a park in Raqqa in early June. But he'd backed out of the plot when he arrived in France."
According to security researcher the grugq, CNN further reported:
"Hame also revealed to interrogators that ISIS had set up an elaborate encrypted communication system so that it could keep in touch with its European operatives.

"While with ISIS in Raqqa, he said he was instructed to encrypt communications with a software tool called “Truecrypt,” which authorities found on a thumb drive he had been given by Abaaoud. Hame said he had been taught to copy a message into the software, select an encryption option and then paste the message into a password-protected sharing site."
The grugq asks: "How Crap Is This System?"

It's pretty bad - Errata Security has a post suggesting how any half-decent intelligence agency might hack into this ISIS protocol.

ISIS won't have any autonomous cryptographic capabilities - you have to be a first-world state to do that kind of thing right. It's forced to use third party tools and systems. But it's very, very difficult as amateurs to design a system that the NSA, GCHQ or half a dozen other competent organisations can't address.

If the ISIS operatives are not using a VPN, then a 'listener on the wire' will get the IP addresses of dead-drop users. As Errata Security explained, TrueCrypt volumes are not hard to detect in transit. Metadata like IP addresses lead straight to identities. But I doubt that most VPNs are safe either, not when their logs and traffic can also be monitored.

Perhaps the bad guys should just send a courier, clunky as that sounds. But last I heard, couriers speak in plain, not ciphertext; they say that bugging with microphones is pretty good these days.

I like a one-time pad, but distributing it is the trick. If you send those very long random bit sequences on a USB drive, how do you know the intelligence services haven't covertly grabbed and copied it in transit? And then you're toast.

I begin to see why ISIS has been so singularly unsuccessful in the UK this last decade.

---

Note: from one of the comments: "Counterterror experts who reviewed this protocol tell me it reminds them of what al-Qaeda did for yrs: saving "drafts" in Yahoo inboxes" - (these were apparently in plaintext).

*Head-in-hands*.

---

Our transition to a Planetary Hospital

Interesting and reasonably accessible article via Jess Riedel, "Mutation and Human Exceptionalism: Our Future Genetic Load" by Michael Lynch, GENETICS March 1, 2016. From the abstract:
"What is exceptional about humans is the recent detachment from the challenges of the natural environment and the ability to modify phenotypic traits in ways that mitigate the fitness effects of mutations, e.g., precision and personalized medicine.

"This results in a relaxation of selection against mildly deleterious mutations, including those magnifying the mutation rate itself. The long-term consequence of such effects is an expected genetic deterioration in the baseline human condition, potentially measurable on the timescale of a few generations in westernized societies, and because the brain is a particularly large mutational target, this is of particular concern.

"Ultimately, the price will have to be covered by further investment in various forms of medical intervention. "
The famous population geneticist W. D. Hamilton coined the phrase "Planetary Hospital", explained by Bruce Charlton like this:
"It is becoming hard to avoid the conclusion that we have been, for several generations, living in what WD Hamilton (in Narrow Roads of Gene Land, Volume 2) called the Planetary Hospital - in other words, a world in which almost everyone is suffering from significant genetic damage, and an increasing proportion of the population are suffering from genetic disease. "
The dystopian effects of relaxed selection and the removal of purifying selection are well-documented in the population genetics literature. The effects in just a few generations are, however, slight (c. 1% per generation).

Despite Dr Charlton's vividly-expressed concerns. I like to think we may still avoid Idiocracy.

Friday, January 15, 2016

Surveillance Escrow - a new business opportunity



Here's a true story.
We're in the boy's toilets of a primary school. A kid has dropped a toilet roll into the pan and pulled the flush - what a lark! Somehow, the whole bathroom has flooded, causing thousands of pounds worth of damage. The headteacher is incandescent, the miscreant can't be identified and so a new rule is introduced. All toilet rolls are removed: if a child wishes to use the toilet, they have to come first to the headteacher's room where they will be issued with the requisite strips of paper.
What a disaster.

The problem here is that there is no supervision. Cameras can't be put into the toilet facility because of the potential for abuse - you can see the 'paedophile' headlines right now. But there is a solution - surveillance escrow.

Put the cameras in to supervise the toilets and connect them, via a broadband link, to a remote server controlled by a third-party - let's say Surveillance Escrow Services (SES). There the imagery is encrypted and archived, but no-one looks.

If there is a problem, suitably-accredited individuals (not the school staff) decrypt and review footage to determine what actually occurred and execute the agreed procedures vis-a-vis reporting back to the client (this has been discussed in a similar scenario here).

A variant approach, similar to the way Google treats Gmail: AI systems review the sensor feeds (which might be video, image, audio, textual or some other kind of sensor-data) in real-time, looking for anomalies before encrypting and archiving. They deliver alerts and summary reports to SES management who in turn, in conformance with appropriate privacy legislation, report back to the client.

I can imagine a number of possible applications of surveillance escrow (care homes, hospitals, secure workplaces) and offer the idea to any entrepreneur or new product development manager who's interested.

Thursday, October 08, 2015

We know who you are


Bruce Schneier has an interesting article:
"Walk into a store, and the salesclerks will know your name. The store's cameras and computers will have figured out your identity, and looked you up in both their store database and a commercial marketing database they've subscribed to. They'll know your name, salary, interests, what sort of sales pitches you're most vulnerable to, and how profitable a customer you are. Maybe they'll have read a profile based on your tweets and know what sort of mood you're in. Maybe they'll know your political affiliation or sexual identity, both predictable by your social media activity. And they're going to engage with you accordingly, perhaps by making sure you're well taken care of or possibly by trying to make you so uncomfortable that you'll leave.
...
The critical technology here is computer face recognition. Traditionally it has been pretty poor, but it's slowly improving. A computer is now as good as a person. Already Google's algorithms can accurately match child and adult photos of the same person, and Facebook has an algorithm that works by recognizing hair style, body shape, and body language ­- and works even when it can't see faces. And while we humans are pretty much as good at this as we're ever going to get, computers will continue to improve. Over the next years, they'll continue to get more accurate, making better matches using even worse photos."
There is a gap in this example. The store's computers will know who you are, but how will the sales assistant? I foresee something akin to Google Glass, the optical head-mounted display which Google discontinued for consumer use. Glass would seem to have more specialised application for augmented reality in areas such as security ... and as described above, in retail.

If this ever comes to pass, expect a large banner header on this blog:

'Don't bother me, I'm just looking!'

Thursday, March 26, 2015

One more for the bad guys

Barcelona to Dusseldorf air crash. This morning the most likely scenario seems to be that one pilot left the cockpit - perhaps to go to the toilet - and according to anti-hijack protocol the remaining pilot then locked the cabin door.

Some kind of medical emergency, perhaps a heart attack, occurs and the pilot slumps forward. Controlled flight into terrain follows.

I guess the risk analysts just figured this as an ultra low probability event.

No longer.

What's the fix? As we can't weaken the anti-hijack rules it seems an extension of ground-based surveillance and control is the way to go. Video cameras and remote door unlocking might have prevented this one.

---

You know, I so didn't want this to be murder-suicide.

Saturday, January 24, 2015

Time to enter the Dark Web?



Here are three (mildly) transgressive Internet links you might or might not care to follow:

  1. Recently-deceased Leon Brittan's link to that paedophile ring
  2. The Sun's Page 3 website
  3. Adolf Hitler's "Mein Kampf"

Let's suppose you clicked on any of the above, who knows you've done it?

Ignoring the person standing behind you, then anyone who clicks "back" on your browser, who looks at your browser history or perhaps who inspects your machine's cookies. You can address this problem, partially, by using private browsing - although any downloads will still be on your machine, and who knows about temp files buried away?

If you had logged into Google, or Amazon, or other website owners, then they certainly know where you went, keep extensive records, .. and could be subpoenaed.

They also know your location. You may be unaware that your browser can run a script asking the operating system for the WiFi SSID you're currently attached to. The big players like Google keep vast databases which link SSIDs with their geographical location: this is how Google Maps magically knows where you are. Hard to stop this happening without disabling scripts, which will stop most websites working.

Even if you were maximally careful on your own machine, your ISP - the provider of your Internet service - keeps a record of your site-visits. It can correlate your personal details (name, address, bank details) with your allocated IP address and link that with the websites you visit.

Normally this is like, who cares? These logs get to Terabyte size and no human scans them. They're expensive to keep and are wiped after some months. But the Government is pushing to legally mandate ISPs to keep these records, on everyone, for at least a year - and make them available to the security services. Is it time to get worried?

If the proposal gets through (and there's a good case for it on anti-terrorist grounds) then everyone can potentially be hoovered-up by a log-searching algorithm. Perhaps one day soon they'll start to care about 'mildly-transgressive' Internet behaviour, and your name will go down on a file somewhere. Between Google's profiling us for targeted advertising, and GCHQ tagging us for subversion, most of us might want to draw a line somewhere.

A common response is to suggest using Internet proxies (eg anonymouse, vtunnel) for any web searches beyond the most anodyne. But these are cumbersome and ad-infested - and who knows what the proxy guys are doing with the correlation between your identity and your surfing information (which they have even if your target sites don't),

The best answer is an Internet VPN service, which unfortunately involves paying some modest fee. Your traffic goes through an encrypted tunnel (eg IPsec) and is proxied at the VPN service provider's Internet breakout point. The rest of the Internet doesn't see your IP address so your web searches appear to come from the VPN service provider; meanwhile your ISP only sees your traffic going to the VPN service provider and has no idea where it's destined for afterwards. It only remains to trust the VPN service provider to not keep your transaction logs for any length of time. When 'The Man' comes asking for the last six months of your usage, there's nothing to show. This is quite a big business for a variety of reasons (watching BBC iPlayer when out of the UK is one) and the market leaders appear trustworthy enough - their business depends upon it.

They tell a good story but I somehow doubt that these VPN service providers can really evade an after-the-fact subpoena. The utility is to prevent speculative trawling.

Do we care enough? Today, probably not .. but it's nice to know we have the option going forwards.

Note: Private Internet Access was named PC Magazine's Editor's Choice in 2013. Read their review.

Saturday, August 09, 2014

Secure backups after TrueCrypt

I had been using TrueCrypt (v. 7.0) for a while to archive my data onto USB drives. One drive (64 GB) with the car keys and another couple in the car itself. If the house burns down ...

A couple of days ago I was checking and found I couldn't open these TrueCrypt volumes. The message came back "Incorrect password or not a TrueCrypt volume". Bad news. TrueCrypt 7.2 (the 'broken version') succeeded in opening the archives - proving it wasn't a password problem or data corruption - but this latest version has had the encryption modules removed, apparently. Time to move on.

An Internet search reveals that there is nothing which really replaces TrueCrypt's 'volume' facility as I don't want to encrypt drives or entire USB devices. I tried some freeware with AES encryption (7-zip) but it's clunky and awkward. In the end I've paid my £26 and bought WinZip v. 18.5. The user interface is well-designed and pretty intuitive, and enormous (10+ GB) AES-encrypted archives can be created.

A downside is that file-names can be read-off when an encrypted zip-archive has been opened, although without the password the files themselves can't be accessed. For my purposes that's enough. I have spent hours and hours today reorganising my 30+ GB DropBox folder and creating multiples backups onto three different USB drives.

One small issue: it's not too clear how many licences I got for my money. I installed WinZip on the two house laptops and it hasn't complained - but some of the documentation suggests you only get the one licence.

Thursday, May 15, 2014

Guessing a PIN

A few posts ago I was musing about the security of a PIN-protected smartphone. We all know that if you choose a four digit PIN (0000 - 9999) then on average it would take 5,000 guesses to break-in. But how many attempts would give a thief, say, a 5% chance of breaking-in (i.e. a 95% chance of you being safe)?

This matters because you want to set a thief a lengthy guessing-task, which still has a low probability of success.

So we want to know the probability of bad-guy success (guessing the PIN) in X attempts from N possibilities (where N = 10,000 for a four-digit PIN) .. as X varies. The distribution we want is one where we keep taking samples (i.e. guessing four digits) without replacement until we sample the one success, then the thief stops and prepares to ransack your account.

My first intuition was that the curve would be cumulative-binomial. The first few trials you have no information so the probability of an early guess working is rather low. About half way through the process, you have rejected about half the possible values so now your chances of getting the PIN are rising, while at the end you've rejected so many wrong choices that your chances of the next guess being right is almost certain. But I was wrong (about the binomial).

Cumulative Binomial Distribution Function

After some googling I came upon this. It turns out that the probability of taking exactly X attempts to correctly guess the PIN is exactly the same, 1/N, for any sequence-length of guesses. So in the case of the four-digit PIN, your chances of guessing right the first time are 1/10,000 .. as are your chances of guessing right on the second, third and indeed ten-thousandth attempt.

(Note: this means that all sequence lengths are equally likely before the thief has started his guessing game. Obviously the conditional probabilities change as the thief is going along - if the first 9,999 guesses are wrong, the final guess will be correct with probability one. This is explained in the link.)

The actual distribution is rectangular - what is called a uniform distribution. If the PIN can take N different values, then the x-axis registers the length of possible guess-sequences going from 1 to N, and the Y-axis shows the probability of guessing correctly in that sequence-length. The distribution is a horizontal line of height (i.e. y-intercept) 1/N. For absolute clarity, we are considering the space of all possible guessing-sequences from length 1 (first guess gets it) to N (last 'guess' gets it). The thief will actually execute only one sequence but doesn't know in advance the length of the one which will work. We assume he doesn't give up. Since the sequences are mutually-exclusive (you get it in one, or you get it in two, or you ...) we can add the various probabilities in what follows.

Example: uniform distribution for N=6 possible choices

If your PIN is four digits then N=10,000 and the chances of correctly guessing your PIN in guess-sequences ranging in length from 1 to 500 attempts is 500/10,000 = 1/20 = 5%. If an attempt takes 6 seconds, this is 50 minutes. Note that searching the whole space of 10,000 choices takes twenty times as long = 1,000 minutes = nearly 17 hours.

If your PIN is six digits then N=1,000,000 and the chances of correctly guessing your PIN in up to 50,000 attempts is 50,000/1,000,000 = 1/20 = 5%. If an attempt takes 6 seconds, this is 5,000 minutes = around three and a half days.

The security services advise nothing shorter than six digits for secure material.

Wednesday, May 14, 2014

Tablet and smartphone security

When my new Nexus 10 tablet arrived my first thought was to reproduce my Galaxy S3 experience. I downloaded the same set of apps and put a lengthy security code on it. But that doesn't really work. The security soon had to come off as the tablet became a shared and "to hand" family facility. It's got the newspaper, the crossword for Clare and it's good for books and the iPlayer.

Where's the sweet spot between usability and security? What I've done is uninstall Dropbox and Blogger, and not install any financial apps (Bank etc). It wouldn't be great to lose it but at least the impact would be bounded and more manageable.

The smartphone is altogether better protected but only I have to navigate its security.

Saturday, November 02, 2013

Distrusting your telecoms provider

Telecoms companies sell communications services to companies and governments. In the wake of the Snowden revelations about NSA spying (the NSA has penetrated American telecoms and Internet companies) how would you feel - if you were a non-US Government - on contracting with AT&T (say) as your Service Provider?

Most telecom products contain the built-in assumption that the carrier is to be trusted. Carrier Virtual Private Networks transport customer traffic in clear (if using MPLS VRFs) or in multiple encrypted hops with the traffic decrypted in-between (for IPsec VPNs). The ability of a telecoms carrier to read its customers' traffic is pretty much required by 'legalized intercept' legislation.

If you decide that you don't want intelligence agencies checking your traffic at will, then you have to relabel your carrier as an untrusted network - like the Internet. This dramatically collapses the service portfolio you should buy from them.

You will have to encrypt the traffic on your own premises to create your own Internet VPN across the carrier network. You can buy a quality of service (QoS) product from the carrier, marking your IP packets yourself, but you can't let the carrier have any access to content: so almost no hosted services. Life gets awfully hard.