Skip to content
Write-up Beginner

Key and E: A Pentester’s Tale on How a Photo Opened Real Doors

A company's front door key was visible in a news report video, allowing an attacker to decode the key's bitting code from the image and cut a working duplicate. The attacker could then physically enter the office without being questioned.

Patricia Gagnon-Renaud Follow

Published on gosecure.ai

For most people, keys are simple yet magical objects: They grant access to places you belong and keep you out of places you don’t. But did you know that anyone could easily make a copy of a key from a simple picture?

GoSecure, on gosecure.ai

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

This is a physical security story rather than a web vulnerability. The target is an unnamed business whose front door key appeared on camera. A key is a physical secret: its cuts encode a bitting code, and anyone who learns that code can have a working copy made. The article walks through how a photograph of a key, published by the business itself, can be turned into a cut key and used to walk into an office.

The same process is presented as something a malicious actor could use to intrude undetected, and as something an Ethical Hacking team can use during a physical assessment.

Key in Door
Key in Door From the original on gosecure.ai

Setup

The example needs very little: a photograph of the key, knowledge of the key's model so the right measurement chart can be found, and a way to cut a blank. In this case the key is an SC1 from Schlage, described as a very common key in North America. The article mentions three ways to produce the copy: cutting it by hand with a key blank, a file and a caliper; 3D printing it with one of the several key generator tools; or taking the bitting code to a locksmith. The team chose the locksmith because it is the simplest and most reliable method.

No accounts, software versions or special tools are required beyond the photograph and the chart.

Finding it

The starting point is open-source intelligence. A malicious actor would typically look for pictures of keys on the company website and on social media such as Facebook, Twitter, LinkedIn or even YouTube. People post pictures of their keys when they sign a lease or a mortgage, and keys also turn up in the background, attached to a belt or on a lanyard. In this example the business had its front door keys shown in B-roll during the opening of a news report in which they were interviewed.

Figure 1. News report clip showing a key being inserted into a lock.

What makes the picture useful is that the key is visible well enough to measure the cuts. That is the whole finding: a public image leaked the shape of a physical secret.

Exploitation

Step 1: OSINT

Find a picture of a key. The article points to company websites and social media, and to past examples of people posting pictures of their keys after signing a lease or a mortgage. Keys in the background, on a belt or on a lanyard count too. In this case the source was the B-roll of a news report.

Step 2: Decoding

Decoding means measuring the height distance of each valley, the cuts made to the key, and extracting the corresponding bitting code from the measurement chart applicable to the key. A typical key has 5 or 6 positions to look for, giving a bitting code of 5 or 6 digits.

From the original on gosecure.ai

Figure 2. Key Close-up Clearly Showcasing 5 Positions.

With the key identified as an SC1, the team found the measurement chart for SC1 keys and overlaid it on the photograph. The article notes that one of the several tools found online could also have been used to help with decoding.

From the original on gosecure.ai

Figure 3. SC1 Key with Decoding Chart Overlayed.

Reading the key from bow to tip, which is right to left in the picture, yields the code 6-5-4-1-4.

Step 3: Cutting

With the bitting code in hand, the key can be cut. The options given are doing it yourself with a key blank, a file and a caliper; 3D printing it with one of the several key generator tools; or asking a locksmith to produce it. The team went to a local locksmith and left with a freshly cut key.

KEYBLOGFIG4
KEYBLOGFIG4 From the original on gosecure.ai

Figure 4. Snazzy New Key!

Step 4: Intruding

Use the key. The malicious actor is now ready to enter the office at a moment's notice, and because they hold a key, their presence is unlikely to be questioned. In the example, the newly cut key was tried in the presence of the business owner and successfully demonstrated the attack vector.

From the original on gosecure.ai

Figure 5. Video clip successfully demonstrating the working key.

Root cause

The weakness is not in the lock but in what was published. A key's cuts can be read from a sufficiently clear image, and the business allowed a usable view of its front door key into a public news report. Nothing in the process required unauthorised access to anything: the photograph was public, the measurement chart for a common key model is available, and a locksmith will cut a key from a code. The exposure was physical. and .

Impact

An attacker who can decode a key from a public image can obtain a working copy and enter the premises, and the article stresses that a person carrying a key is unlikely to be challenged. The demonstration was carried out with the business owner present, which shows the key worked. The article does not describe any other use of the technique, any specific loss, or the conditions under which a photograph would be too poor to decode.

Fix

The advice is direct: do not share pictures of keys online. Keys are like passwords and should never be shared with anyone. For organisations, the article recommends having the physical security posture of the business evaluated, whether it is a store, an office, a warehouse, in one or more locations, so that the current situation can be documented and recommendations made. The article does not say whether this particular business changed its locks or key.

Variants to test

  1. Search a company's website and social media for images showing keys, including background shots, belts and lanyards.
  2. Review video and news coverage filmed on the premises for B-roll that includes a key being used or held.
  3. Identify the key model from the visible profile and compare it against published measurement charts.
  4. Check whether the decoded code can be cut, by hand, by 3D printing or by a locksmith. A positive result is a key that operates the lock, as demonstrated here with the business owner present.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 9 min read.

What happened, in plain words

A business was interviewed for a news report. During the opening of that report, the cameras showed the business's front door key being put into its lock. That short clip was broadcast publicly. Someone watching it could pause the video, look closely at the key, work out the shape of its cuts, and have an identical key made. With that copy, they could walk up to the front door and open it.

This is not a story about hacking a website or breaking into a computer. It is a story about physical security: the locks and keys on a building. The team at GoSecure, an ethical hacking company, used this example to show how a photograph of a key can be turned into a working copy, and to explain why you should never post pictures of your keys online.

Key in Door
Key in Door From the original on gosecure.ai

The article describes the same process from two angles. A malicious actor, meaning someone with bad intentions, could use it to get into an office without being noticed. An ethical hacking team, meaning security professionals hired by the business to test its defences, could use it during a physical assessment, which is a test of how easy it is to get into a building in person.

The background: how keys and locks work

The key in this example opens a mechanical lock. Inside the lock there are small pins. When you push the right key into the lock, the cuts on the key push each pin to exactly the right height, and the lock turns. If the cuts are wrong, the pins do not line up and the key will not turn.

A key is therefore a physical secret. The pattern of cuts on the key is called its bitting code. Think of it like a password, but made of metal instead of letters and numbers. If someone knows your password, they can log in as you. If someone knows your bitting code, they can have a key cut that opens your door.

The article explains that a typical key has 5 or 6 positions, which are the spots along the key where cuts are made. Each position has a cut of a certain depth. By measuring the depth at each position, you get a series of numbers, and that series is the bitting code. For a key with 5 positions, the code is 5 digits long.

What you need to try this

The example needs very little:

  1. A photograph of the key, clear enough to see the cuts.
  2. Knowledge of the key's model, so you can find the right measurement chart.
  3. A way to cut a blank key into the right shape.

In this case, the key was an SC1 from Schlage. Schlage is a lock manufacturer, and SC1 is a very common key model in North America. The article mentions three ways to produce a copy:

  • Cut it by hand using a key blank (an uncut piece of key metal), a file and a caliper (a tool for measuring small distances precisely).
  • 3D print it using one of the several key generator tools available.
  • Take the bitting code to a locksmith, a shop that cuts keys for customers.

The team chose the locksmith because it is the simplest and most reliable method. No accounts, software versions or special tools are required beyond the photograph and the chart.

Step 1: Finding the picture (OSINT)

The first step is called OSINT, which stands for open-source intelligence. It simply means gathering information from public sources: things anyone can see, like websites, social media and news reports. It is the opposite of breaking in to steal information. You are just looking at what is already out there.

A malicious actor would typically look for pictures of keys on the company website and on social media such as Facebook, Twitter, LinkedIn or even YouTube. People love to post pictures of their keys when they sign a lease or a mortgage, and the article links to several past examples of this happening. Keys also often appear in the background of photos, attached to a belt or hanging on a lanyard, which is the strap people wear around their neck to hold an ID badge or keys.

In this example, the business had its front door keys shown in B-roll during the opening of a news report they were interviewed in. B-roll is the extra footage that TV producers use as background while someone is talking. It might show the outside of the building, people walking around, or in this case, a key being put into a lock.

Figure 1. News report clip showing a key being inserted into a lock.

What makes the picture useful is that the key is visible well enough to measure the cuts. That is the whole finding: a public image leaked the shape of a physical secret. Nobody had to break into anything to get it. The business published it themselves, probably without realising.

Step 2: Decoding the key

Once you have a picture of a key, the second step is to identify and decode it. Decoding means measuring the height distance of each valley, which are the cuts made to the key, and extracting the corresponding bitting code by looking at the measurement chart applicable to the key.

A measurement chart is a reference diagram that shows, for a particular key model, what depth of cut corresponds to which number. Each key model has its own chart, so you first need to work out which model you are looking at. In this example, the key is an SC1 from Schlage, which is a very common key in North America.

From the original on gosecure.ai

Figure 2. Key Close-up Clearly Showcasing 5 Positions.

Once the team found the measurement chart for SC1 keys, they could start decoding the key. The article notes that they could also have used one of the several tools found online to help with the decoding process. These are tools found online that can help with the decoding process.

From the original on gosecure.ai

Figure 3. SC1 Key with Decoding Chart Overlayed.

Using the chart, the team decoded the key from bow to tip. The bow is the round part you hold, and the tip is the end that goes into the lock. In the picture, that means reading from right to left. The result was the code 6-5-4-1-4. That is five numbers, one for each of the five positions on the key.

Step 3: Cutting the key

With the bitting code in hand, the key can be cut. The article gives three options again: doing it yourself with a key blank, a file and a caliper; 3D printing it with one of the several key generator tools; or asking a locksmith to produce it.

The team went to a local locksmith and left with a freshly cut key ready to be used. They chose this route because it is the simplest and most reliable method.

KEYBLOGFIG4
KEYBLOGFIG4 From the original on gosecure.ai

Figure 4. Snazzy New Key!

Step 4: Using the key

Once the new key has been cut, the fourth and last step is to use it. The malicious actor is now ready to intrude into the office at a moment's notice. And since the malicious actor has the key, who will question their presence? Someone carrying a key looks like they belong there. They do not need to force a door or break a window, which would attract attention.

In the example, the team tried the newly cut key with the presence of the business owner, which successfully demonstrated this attack vector. An attack vector is simply the path or method an attacker uses. Here, the path was: a public photo, a measurement chart, a locksmith, and a key that works.

From the original on gosecure.ai

Figure 5. Video clip successfully demonstrating the working key.

Why this works

The weakness is not in the lock itself. The lock does what it is supposed to do: it opens for the right key. The weakness is in what was published. A key's shape can be read from a sufficiently clear image. The business allowed a usable view of its front door key into a public news report.

Nothing in the process required unauthorised access to anything. The photograph was public, the measurement chart for a common key model is available, and a locksmith will cut a key from a code. The exposure was physical.

What the impact is

An attacker who can decode a key from a public image can obtain a working copy and enter the premises. The article stresses that a person carrying a key is unlikely to be challenged. The demonstration was carried out with the business owner present, which shows the key worked.

The article does not describe any other use of the technique, any specific loss, or the conditions under which a photograph would be too poor to decode.

How to protect yourself

The advice is direct: do not share pictures of keys online. Keys are like passwords and should never be shared with anyone.

For organisations, the article recommends having the physical security posture of the business evaluated. Physical security posture means the overall state of a building's defences: locks, doors, cameras, access procedures and so on. This applies whether the business is a store, an office or a warehouse, in one or more locations. The goal is to document the current situation and make recommendations to improve it.

The article does not say whether this particular business changed its locks or key.

How a security team would test for this

If you are testing a business's physical security, here is the same process turned into a checklist:

  1. Search a company's website and social media for images showing keys, including background shots, belts and lanyards.
  2. Review video and news coverage filmed on the premises for B-roll that includes a key being used or held.
  3. Identify the key model from the visible profile and compare it against published measurement charts.
  4. Check whether the decoded code can be cut, by hand, by 3D printing or by a locksmith. A positive result is a key that operates the lock, as demonstrated here with the business owner present.

Glossary

  • Bitting code: the series of numbers that describes the depth of each cut on a key, which is enough to make a copy.
  • B-roll: extra footage used as background in a news report or video, such as shots of a building or a key being used.
  • Bow: the round part of a key that you hold.
  • Caliper: a measuring tool used to measure small distances precisely.
  • Decoding: measuring the cuts on a key and converting them into a bitting code using a measurement chart.
  • Ethical hacking: security testing carried out with permission from the business, to find weaknesses before criminals do.
  • Key blank: an uncut piece of key metal that can be shaped into a working key.
  • Lanyard: a strap worn around the neck that holds an ID badge or keys.
  • Locksmith: a professional who cuts keys and repairs locks.
  • Low-entropy secret: a secret with relatively few possible combinations, making it easier to guess or copy.
  • Measurement chart: a reference diagram showing which cut depth corresponds to which number for a particular key model.
  • OSINT (open-source intelligence): gathering information from public sources such as websites, social media and news reports.
  • Physical assessment: a test of how easy it is to get into a building in person, rather than through a computer.
  • Physical security posture: the overall state of a building's defences, including locks, doors, cameras and access procedures.
  • Pin-tumbler lock: the common mechanical lock in which pins must be pushed to the right height by the key's cuts before the lock will turn.
  • SC1: a very common key model made by Schlage, widely used in North America.
  • Tip: the end of a key that goes into the lock.
  • Attack vector: the path or method an attacker uses to reach their goal.

Similar reports

Same bug class and techniques, clearest first.