2013-12-13

ABS lock vs 3D printer

ABS make some nice kite mark 3 star rated euro profile locks.

These have a lot of security measures that make it very hard to pick the lock, or force it, or break it. They are almost impossible for a would be thief to get past, which is good news.

However, part of the security is the keys themselves. The keys are impressive, high precision flat keys that even include a magnet as part of the mechanism. You can't just walk in to a lock smith and get a replacement key cut!

For example this key (which is not my door key):-



However, these are no match for a 3D printer. Based on nothing more than a picture of the quality of the one shown above, an off the shelf 3D printer, and a magnet that costs 10p (bag of 50 for £5 next day from the internet), I can make a key that works.

A little bit of openscad, and a simple array for that key of no more complexity than d=[3,0,-1,2,1];
a=[-1,0,0,0,-1];

And we have a key in under 10 minutes!

Just add a small magnet (which took another 10 minutes for the glue to dry), and presto.

And it works! (video).

A few more details on how hard this really was. I measured the key this morning and made the openscad for it, about 30 lines of script. I printed, and it was a bit tight as the plastic tends to over print a fraction, so I adjusted the thickness 0.2mm. That fitted in the lock smoothly, so I then tried to glue the magnet in - I had to adjust the hole for that similarly and printed a new key. I found superglue was useless and managed to lose a magnet in the lock which I was able to fish out. One more time, and araldite for the magnet, and the key worked. I did not have to adjust my guess at the milling depths or positions at all! The most complex bit was the angled pointy bit at the end. The whole process took slightly longer as I had to print off a different key that was not actually my front door key for the pictures above - I am not quite that daft, honest.

Now I have a template I can easily print any more of these in around 10 minutes flat, and the levels are course enough that a simple picture like that shown above, or a modelling clay impression would easily be good enough.

This is not a slight on ABS - the vast majority of the security in these locks is the design that makes it hard to pick, force, jog, or break. Any mechanical lock will suffer that the key can be copied. The problem is that key copying used to need more specialised and harder to come by tools and key blanks, now something as simple as a 3D printer will suffice and no real skill needed. The time has come for proper keys with RF and encrypted codes - something that you cannot simply copy.

34 comments:

  1. Well I would watch the video except it needs Flash which doesn't exist on my iPad. I'd have thought you know better than to user Flash.

    ReplyDelete
    Replies
    1. It is on FaceBook - there is a FaceBook app for iPad that works to show it - I was being lazy!

      Delete
    2. Hi Adrian,

      Hi Adrian,
      Nice article - the idea of making a key out of plastic and a magnet that fits into a 'bomb proof' ABS Euro lock is fine for emergency use but not something that would survive the general abuse a typical house key goes through over it's typical 10 year life.
      Also If that snapped inside the lock then you could be in serious trouble!
      Another issue about replicating security keys via any method is many of them are patent protected - so like millions of other protected products, it may not be too hard to replicate - but you are breaking the law if you do it.
      I'm sure we could make a pretty convincing £50 note using the latest printing technology - but again I suspect we might end up on someones 'naughty list' lol

      Delete
    3. Obviously they would not last.
      Thankfully, non commercial personal use like this is *NOT* a breach of the patent, and quite different to forging money.

      Delete
    4. Ref is §60(5)(a) of Patents Act 1977

      Delete
    5. If I replicated a patented security key free of charge using anything but the official patented blanks that lock was designed to use (and having a licence from the patent owner) I would be in breach of patent - regardless if it was for non commercial personal use.
      The purchaser of a patented product does not purchase the right to replicate any part of the product without permission of the patent owner??

      Delete
    6. As I said, §60(5)(a) of Patents Act 1977 makes it not an infringement, sorry.

      Delete
    7. Well it seems the law is indeed on your side - however a euro cylinder needs to rotate 360 degrees to unlock. Your video shows an open door with the key turning the lock into the mech 90 degrees (already opened and unlocked so it won't go more than 90 degress anyway) can you make a video of the key opening and closing the deadlock please? IE locking and unlocking a uPVC door with an ABS lock in it! I can see it turning 90 degrees but you then have the 2nd layer of telescopic pins and the magnetic pin to convince - not obvious that your 3D key does the job of opening the lock!

      Delete
    8. Did you ever do the check?

      Once picked, the lock goes all the way around, so once the shear line goes with the plastic key, I can't see any reason it wouldn't work just fine to open the door.

      Oh, and regarding the patent, there's some bad news for ABS if they try to sue anyone, because they didn't get a patent on the key design, only on the mechanism that blocks the cam.
      The patents are https://www.google.co.uk/patents/US20110174030?dq=inassignee:%22Avocet+Hardware+Limited%22&hl=en&sa=X&ved=0CCcQ6AEwAWoVChMIkZyov_CIyAIVxFsaCh2G5Avg
      and
      https://www.google.co.uk/patents/WO2011051703A3?cl=en&dq=inassignee:%22Avocet+Hardware+Limited%22&hl=en&sa=X&ved=0CCAQ6AEwAGoVChMIkZyov_CIyAIVxFsaCh2G5Avg

      Personally I think that the Ultion euro cylinder is the new holder of the highest physical security crown.

      If you do swap back to a wooden door though, let me know - the strongest lock on the market, the Kibblock, protects the cylinder entirely from snapping anyway, as any sensible high security system should.

      Delete
    9. Hi There, Sorry to dig this one up from the past. I am reaching out in the hope that you may still have the " made the openscad for it, about 30 lines of script." for your ABS Lock.
      That's outside of my skill set, and would be appreciated if you could share that here ( Or elsewhere ) I checked your YouTube comments for links, and you GitHub and came up dry.
      Thanks in advance

      Delete
    10. https://www.thingiverse.com/thing:237998

      Delete
    11. Really appreciated, Thanks heaps. Sorry, I didn't think to look there.
      Take Care

      Delete
  2. This also emphasises that for any secure key, you must not let people take photos of it any more - a skilled 3D printer operator can use a photo of you showing off your bunch of keys to design a 3D printed equivalent.

    ReplyDelete
  3. But the key you used in the video is different to to the one above so I'm guessing you didn't swap out the cylinder for the test and the one in the video *is* your front door key.

    ReplyDelete
  4. Now you just need to use this http://hardware.slashdot.org/story/13/12/10/048245/affordable-3d-metal-printer-developed-based-on-reprap?utm_source=rss1.0mainlinkanon&utm_medium=feed

    ReplyDelete
  5. With most of those Euro profile locks, a burglar doesn't need to faff around attempting to pick the lock. A quick whack in the right place snaps them in half.

    ReplyDelete
    Replies
    1. Quite - the ABS locks are pretty good in that respect.

      Delete
    2. Indeed, that's the entire point of the ABS lock, and the other newer 3* locks.

      Delete
  6. IIRC Chubb make one with an RF chip, has all kinds of funky security involved in it. But very, very pricey.

    ReplyDelete
  7. The next step, surely, is once you have code for deriving this particular key's shape from a photo, get the algorithm for converting that shape to the master key for that range of keys - then generate 3d printer files for that master key...

    ReplyDelete
    Replies
    1. Not for all keys, of course, but enough are part of a range which has a master key that I'd expect some interest.

      Delete
    2. I really am not sure what you are getting at here. A "master key" is a key which will open a set of locks. The locks are specifically created to have more than one position for each lever that works so that a unique key and the master key can open the lock. This is a special order for a set of locks, e.g. for a set of rooms in a hotel. Normal locks on normal houses do not have a master key - they have the key for that lock and that is it. In a scenario where there is a master key, one simply copies the master key - you can't "get the algorithm for converting that shape to the master key" - that makes no sense at all.

      Delete
    3. Yes, for individual consumer locks that's (hopefully*) true. I was thinking of the commercial scenario, like my own office keys, where the key number (such as B11, B80, C3, C23) is encoded in the key's shape, with a master for each prefix (we have 'B master', 'C master' etc) where the numerical part is all-zero. (At least one of our ABS locks could also be opened with a coffee stirrer, due to sloppy installation, but that's a vulnerability for another day...)

      * I recall my grandfather getting a nasty shock once by getting into the wrong car by mistake: same model and colour in the same carpark - and his car key opened others of that model as well. I would like to think locks of all sorts are much better secured than that now, but what I've seen on the computer security side gives me little hope of that. On older cars, apparently it didn't even necessarily need to be the same *make* for car for the keys to be interchangeable - the car equivalent of a password of "password" I suppose.

      Delete
    4. Hi Jas,

      I don't think your locks are ABS locks - last time I looked a coffee stirrer didn't have a magnetic cylinder or any dimples that matched 5 telescopic pins?
      Commercial lockers, cabinets, desks etc tend to use the small cam locks made by Lowe & Fletcher or Eurolocks are built on a master keyed series - IE 400 different key combinations/locks available plus a master key on each series. There are however 100's of different series/profiles of keys in use today - but 80% probably fall into the classic Bisley office furniture range which ten to use the 92 series key blanks - 400 differs and one master key.
      The cam locks themselves can be easily picked as they are just a basic level of security and nothing like a modern ABS euro cylinder for a uPVC door!

      Delete
    5. The coffee stirrer didn't work in the ABS lock itself, sloppy installation meant it was nice and easy to open by poking the coffee stirrer between the door and the door frame, opening the latch itself rather than the lock. I'm not sure about a 'master' on those, but there were at least two variants of those keys opening different sets of locks ('staff' and 'student' keys, some locks opening for both, some only for staff).

      Most of the doors in the building are ERA type, or something similar - those are the ones with the alphanumeric series and master setup I described.

      Delete
    6. The series of alpha/numeric codes on the keys are probably on a registered master key chart - IE your code on the key = B10/12 and on the actual chart = 121536
      Master key systems convert the pinning arrangement in each lock into a cutting code and then converts them to another code that appears on the key.
      Knowing the actual cutting code is still useless as any 'real' master key system uses a patented blank profile meaning it can't be hard copied as the blanks are only available from the system supplier.
      Of course you can try 3D printing them! But not really a long term solution - nickel silver is much better than plastic!
      ERA don't make any patented master key systems, so I guess the kids can get a teachers key copied for £3.95 at the local cobblers!

      Delete
    7. The mapping looked direct or very close to it - and of course, the rest of this thread is all about the lack of need to buy blanks from the official supplier, particularly with metal 3d printers instead of plastic. I wouldn't expect the relevant people to have implemented a complex numerical mapping, either (it's done in-house, but not by people I know all that well). The various keys I've had within the system all seem to fit a linear mapping quite well, certainly; I might research it a bit more deeply now.

      ERA's lack of restrictions on blanks may explain why only the staff offices used those keys, so undergrads at least wouldn't be in possession of those to copy them - they'd only be issued with an ABS key, harder to copy without a 3D printer. (Which, appropriately enough, the building actually contains!)

      Delete
  8. I did this with an ABUS disc detainer padlock a while back after a friend did it successfully. His worked and mine didn't. However, that's a thin and fragile key in plastic, unlike an ABS blank, which isn't even warded!
    3d home printers will only work for the occasional lock type currently, but as the results improve that range of locks susceptible will increase.

    As for the coffee stirrer, way to sidetrack the conversation.

    As regards the patent laws: https://www.eff.org/deeplinks/2014/04/actually-mr-waxman-consumers-are-sued-patent-infringement-all-time so don't be too sure you won't get a letter or worse. Especially since you run Adwords and so make/made a profit from braving their patent. Just saying.

    ReplyDelete
  9. Brilliant works man! You just give me an idea on where I can use this filament http://www.3d2print.net/shop/product/taulman-645-nylon/. I just recently purchased this last week; my original plan was to make a mini study table for my toddler daughter. But I’ve change my mind, I’ll try your 3D printed flat keys with this.

    ReplyDelete
  10. Try using Nylon Filament for 3D printed key because unlike other plastic filament, this material is tougher. Take a look at some of the features of this material here: http://www.3d2print.net/shop/product-tag/nylon/

    ReplyDelete
  11. Have you seen this, 3D print a key only by looking at the outside of the lock:

    http://www.digitalspy.co.uk/tech/news/a593541/3d-printed-keys-can-now-be-made-without-ever-seeing-the-original.html#~oOwmuVrQgK3t46

    ReplyDelete

Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.

I²S

I²S is, err, fun. What is I²S Well, first off, it is grammatically like I²C which is an acronym with two Is in it which people then treat an...