30
Key Decoding and Duplication Attacks for the Schlage Primus High-Security Lock David Lawrence Robert Johnson Gabriel Karpman [email protected] DEF CON 21 August 3, 2013 dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 1 / 30

Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Key Decoding and Duplication Attacks for theSchlage Primus High-Security Lock

David Lawrence Robert Johnson Gabriel Karpman

[email protected]

DEF CON 21

August 3, 2013

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 1 / 30

Page 2: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Standard pin-tumbler locks

Photo credit: user pbroks13 on Wikimedia Commons. Licensed under GFDL or CC-BY-SA-3.0.

Vulnerabilities1 Key duplication: get copies made in any hardware store.

2 Manipulation: susceptible to picking, impressioning, etc.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 2 / 30

Page 3: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

The Schlage Primus

Based on a pin-tumbler lock, but with a second independent lockingmechanism.

Manipulation is possible but extremely difficult. Some people can pickthese in under a minute. Most people cannot.

We will focus on key duplication and the implications thereof.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 3 / 30

Page 4: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

1 Reverse-engineering the Primus

2 3D modeling Primus keys

3 Fabricating Primus keys

4 What it all means

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 4 / 30

Page 5: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

1 Reverse-engineering the Primus

2 3D modeling Primus keys

3 Fabricating Primus keys

4 What it all means

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 5 / 30

Page 6: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Security through patents

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 6 / 30

Page 7: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Look up the patent. . .

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 7 / 30

Page 8: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Primus service manual

w3.securitytechnologies.com/IRSTDocs/Manual/108482.pdf

(and many other online sources)

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 8 / 30

Page 9: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Sidebar operation

DO

NO

T D

UP

LIC

AT

EP

AT

.NO

.4,7

56

,17

7

PRIMUS

Finger pins must be lifted to the correct height.

Finger pins must be rotated to the correct angle.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 9 / 30

Page 10: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Disassembly

Fill in any missing details by obtaining a lock and taking it apart.

Photo credit: user datagram on lockwiki.com. Licensed under CC-BY-3.0.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 10 / 30

Page 11: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

1 Reverse-engineering the Primus

2 3D modeling Primus keys

3 Fabricating Primus keys

4 What it all means

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 11 / 30

Page 12: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Top bitting specifications

MACS = 7

.031"

1.012"

100°

.8558"

.6996"

.5434"

.3872"

.231"

1 2 3 4 5 6

0 .335”1 .320”2 .305”3 .290”4 .275”5 .260”6 .245”7 .230”8 .215”9 .200”

Increment:Progression:Blade Width:

Depth Tolerance:Spacing Tolerance:

.015”Two Step.343”+.002”-0”±.001”

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 12 / 30

Page 13: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Side bitting specifications

Schlage doesn’t publish exact dimensions for the side bitting.

Scan 10 keys on flatbed scanner, 1200 dpi, and extract parameters.

Index Position Height from bottom Horizontal offset

1 Shallow left 0.048 inches 0.032 inches left2 Deep left 0.024 inches 0.032 inches left3 Shallow center 0.060 inches None4 Deep center 0.036 inches None5 Shallow right 0.048 inches 0.032 inches right6 Deep right 0.024 inches 0.032 inches right

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 13 / 30

Page 14: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Modeling the side bitting

Design requirements

1 Minimum slope: finger pin must settle to the bottom of its valley.

2 Maximum slope: key must go in and out smoothly.

3 Radiused bottom: matches the radius of a finger pin.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 14 / 30

Page 15: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Key cross-section

One shape fits in all Primus locks.

Dictated by physical constraints: the pins (and therefore the controlsurfaces) are always in the same place relative to the cylinder housing.

CP

PRIMUS

HP

CEP

PRIMUS

J P

EFP

PRIMUS

FPPR

IMUS

FGP

PRIMUS

EP

PRIMUS

LP

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 15 / 30

Page 16: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Modeling the key in OpenSCAD

Programming language that compiles to 3D models.

First use to model keys was by Nirav Patel in 2011.

Full implementation of Primus key is a few hundred lines of code.

// top_code is a list of 6 integers.

// side_code is a list of 5 integers.

// If control = true, a LFIC removal key will be created.

module key(top_code, side_code, control = false) {

bow();

difference() {

envelope();

bitting(top_code, control);

sidebar(side_code);

}

}

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 16 / 30

Page 17: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

The result

key([4,9,5,8,8,7], [6,2,3,6,6]);

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 17 / 30

Page 18: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

1 Reverse-engineering the Primus

2 3D modeling Primus keys

3 Fabricating Primus keys

4 What it all means

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 18 / 30

Page 19: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Hand machining

Materials needed:

Hardware store key blank ($1)

Dremel-type rotary tool ($80)

Calipers ($20)

Cut, measure, and repeat ad nauseum.

Rob can crank one out in less than an hour.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 19 / 30

Page 20: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 20 / 30

Page 21: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 21 / 30

Page 22: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 22 / 30

Page 23: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 23 / 30

Page 24: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Computer-controlled milling

This is what the Schlage factory does.

High setup cost (hundreds of dollars): not practical for outsourcedone-off jobs.

Keep an eye on low-cost precision micromills.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 24 / 30

Page 25: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

3D printing

This is the game changing technology.

(From bottom to top, picture shows low resolution plastic, high resolutionplastic, and titanium.)

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 25 / 30

Page 26: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

3D printing results

Working keys out of standard plastic (Shapeways “White Strong andFlexible”), high-resolution plastic (Shapeways “Frosted Ultra Detail”),and titanium (from i.materialise) on the first try.

Plastic keys cost $1 to $5. Some strength issues, but workable.

Titanium keys cost $100 and outperform genuine Schlage keys.

Sufficient resolution from all processes.

Over the next few years, expect to see prices decrease further.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 26 / 30

Page 27: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

1 Reverse-engineering the Primus

2 3D modeling Primus keys

3 Fabricating Primus keys

4 What it all means

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 27 / 30

Page 28: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Results

Key decoding is easy: now that we know the dimensions, all youneed is a high-resolution photo of a key.

Key duplication is easy: takes $10 and the contents of this talk.

Master key extrapolation is easy: the sidebar is not mastered, socracking a Primus system is just like cracking a standard pin-tumblersystem.

Keyless manipulation is still hard: need to start with at least aphoto of a key (or else disassemble a lock).

Our recommendations

Primus should not be used for high-security applications.

Existing Primus installations should reevaluate their security needs.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 28 / 30

Page 29: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Implications

The modeling/printing pipeline translates physical security intoinformation security.

Patent protection defends against physical reproduction, but doesnothing about the electronic distribution of 3D models.

Once a class of keys has been 3D modeled, there is much more powerin the hands of unskilled attackers.

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 29 / 30

Page 30: Key Decoding and Duplication Attacks for the Schlage ... CON 21/DEF CON 21... · .015 Two Step.343 +.002 -0 ... FP P R I M U S FGP P R U S EP P R U S LP ... need is a high-resolution

Future work

Combine the 3D modeling software with existing image-to-key decodingsoftware and 3D printing services. We envision a one click process: put ina picture that you’ve snapped of a key and your credit card number, andget the 3D printed key in the mail a week later.

New York City “master keys” debacle: how long until 3D models becomeavailable? What will happen then?

dlaw, robj, gdkar (DEF CON 21) Attacking the Schlage Primus August 3, 2013 30 / 30