Join our Newsletter — 33% off our NHI Course
Home› Guides› How USB and Peripherals Connect for Beginners: USB,…
Guide Endpoint Security

How USB and Peripherals Connect for Beginners: USB, Bluetooth and Thunderbolt and the trust they get

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 1 December 2026 11 min read
On this page

A peripheral is any device you plug into or pair with a computer, such as a keyboard, printer or drive.

This guide is for anyone who plugs things into a laptop and wonders how the computer decides what to trust. You do not need to be technical to be affected: every cable, dock and wireless mouse you connect is trusted to some degree.

In short

  • When you plug in a USB device, it tells the computer what kind of device it is, such as a keyboard, a drive or a printer.
  • The computer then loads a small program, called a driver, to talk to it. Signed drivers help show who made the driver and that it was not changed.
  • A device can claim to be something it is not, such as a stick that acts like a keyboard and types commands.
  • Fast ports such as Thunderbolt can give devices direct access to memory, so modern computers add extra checks for them.

What you will learn

  • Explain how a computer works out what a plugged-in device is.
  • Describe what a driver does and why signing matters.
  • Spot why a cable or stick from an unknown source is a risk.
  • Check a few settings that limit what new devices can do.
Device type label (class code)
a code a USB device sends to say what kind of device it is.
Device translator (driver)
a small program that lets the computer talk to one kind of device.
Direct memory access (DMA)
a way for some devices to read and write the computer's memory without going through the main processor.

What is a peripheral?

Think of a tradesperson arriving at your door who says, "I'm the electrician." You let them in to work on the wiring. You trusted the job title they gave you, without checking it.

Peripherals work in a similar way. A keyboard, mouse, printer, webcam, headset, drive or dock is a peripheral. When you connect one, it introduces itself, and the computer gives it the access that kind of device usually needs.

They connect in three main ways. USB is the common plug and cable. Bluetooth is a short-range wireless link. Thunderbolt and USB4 are fast ports often used for docks and screens.

Where the comparison stops working: you can see a tradesperson's face and van. A USB device's introduction is just data, and a changed device can send a false one with nothing visible to warn you.

For the risks of USB sticks in daily life, see USB and Removable Media for Beginners. This page looks at how the connection and the trust work.

Why does it matter?

A computer can treat a new device as trusted from the moment it is connected. That makes plug-in devices a quiet way in.

If you work in an office

What could happen: a free gadget or found stick acts like a keyboard and types commands on your computer.

Check this: only plug in devices from your IT team or a trusted shop.

Next: USB and Removable Media for Beginners

If you travel with a laptop

What could happen: someone with a few minutes alone with your laptop plugs a device into a fast port.

Check this: lock or shut down your laptop when you leave it, and keep it with you.

Next: Full Disk Encryption for Beginners

If you look after office devices

What could happen: a driver from an unofficial download site installs harmful software with high-level access.

Check this: get drivers only from the device maker or your system's own update service.

Next: Printer and Office Device Security for Beginners

What does it look like?

Here is a made-up summary of what a computer might record when a device is plugged in. It shows why the label alone is not proof.

Example only. All values are made up.

New device connected: port USB-2
Name reported:   EXAMPLE Flash Drive 0000            (1)
Says it is:      Storage                             (2)
Also says it is: Keyboard                            (3)
Driver loaded:   built-in keyboard driver            (4)
Seen before:     No                                  (5)
  1. The name is whatever the device sends. It can be made up.
  2. A storage label is normal for a flash drive.
  3. A flash drive that also says it is a keyboard is a warning sign.
  4. In a real screen, this line would show which driver the computer chose for that label.
  5. A new, unknown device is worth a second look.

Why this is risky: a keyboard can type anything the signed-in user could type, very fast.

The safer way: use devices you know, and ask IT about settings that block unexpected device types.

How does it work?

  1. You connect the device. You plug in a cable or pair over Bluetooth.
  2. The device says what it is. A USB device sends class codes that describe what it does, such as human input (keyboards and mice), storage, printer, audio or video [1].
  3. The computer picks a driver. The class code helps the computer choose a driver [1]. On Windows, a driver's digital signature shows who published it and helps show it was not changed [2].
  4. The device gets access. A keyboard can type, a drive can share files, and a fast device may reach memory directly.
  5. Wireless devices pair first. Bluetooth pairing sets up keys that can encrypt the link. Bonding saves those keys so the devices reconnect later [3].
Diagram titled How a computer decides to trust a plugged-in device. Four boxes joined by arrows: 1, Connect: plug in a cable or pair over Bluetooth. 2, Device says what it is: keyboard, storage, printer and so on. 3, Computer picks a driver: signed drivers show who made them. 4, Access given: a keyboard types, a drive shares files, a Thunderbolt device may reach memory. A dark label under box 2 says the label is a claim, not proof. A green bar under boxes 3 and 4 says safer: block unexpected device types and turn on memory protection.
Figure 1. The computer trusts the device's own label, so checks at each step matter.

Why a cable or stick can attack

In 2014, Security Research Labs showed that the control chip inside many USB devices could be reprogrammed. A changed device could pose as a keyboard and act for the signed-in user, or pose as a network card and redirect traffic [4].

The researchers said malware scanners could not read that chip's software. They also noted that a changed device can look as if someone had simply plugged in a new device [4].

Why fast ports get extra checks

Thunderbolt, USB4 and similar ports let some devices use direct memory access. Microsoft describes "drive-by" attacks on unattended computers. Someone with a few minutes of access could use such a port to take data or install harmful software [5].

Windows has a feature called Kernel DMA Protection. It blocks memory access from new external devices whose drivers do not support memory isolation, until an authorised user signs in or unlocks the screen [5]. Other systems have their own protections, so check your maker's guidance.

A worked example

This story is made up to show the idea.

Dario Quist works in a small architecture office. At a trade show, a stand gives him a free USB stick with a company logo. He brings it back and plugs it into his work laptop to see what is on it.

Nothing seems to happen. A few seconds later, a window flashes open and closes. Dario feels uneasy and pulls the stick out.

He tells Gideon Rosen, who looks after the office computers. Gideon checks the laptop's device list. It shows the stick reported itself as both storage and a keyboard.

Gideon disconnects the laptop from the network and asks the office's security supplier to check it. They find a small program that had been set to start each time the laptop turns on. They remove it and change Dario's passwords from a different computer.

After this, Gideon changes the office settings. New keyboards and drives now need approval before they work. He also checks that memory access protection is turned on for the laptops' fast ports.

Gideon also tells the whole office what happened, without blaming Dario. Two colleagues admit they have plugged in free sticks before. Gideon collects the sticks and checks those laptops too.

Dario now leaves free sticks in the bin and uses the office's own encrypted drives.

Myths and mistakes

What people thinkWhat is true
A USB stick can only hold files.A changed device can claim to be a keyboard or a network card.[4]
Antivirus will check the stick itself.Scanners check files, not the chip inside the device.[4]
A locked laptop is safe from plug-in devices.Locking helps a lot. Fast ports still need memory access protection turned on.[5]
Any driver download will do.Use drivers from the maker or your system's update service. Signing shows who published them.[2]
Bluetooth devices connect without any checks.Pairing sets up keys for an encrypted link. Remove pairings you no longer use.

What can I do this week?

  • Bin any free or found USB sticks instead of plugging them in.
  • Remove Bluetooth pairings for devices you no longer own.
  • Check that drivers come from the maker or your system's update service.
  • On a Windows laptop, ask IT whether memory access protection is on.
  • Read USB and Removable Media for Beginners for everyday USB stick safety.

Checklist

  • I know a device's label is a claim, not proof.
  • I only plug in devices from sources I trust.
  • I get drivers from the maker or my system's update service.
  • I lock or shut down my laptop when I leave it.
  • Memory access protection is on for fast ports where supported.
  • Old Bluetooth pairings are removed.
  • Our office has rules for which device types are allowed.

Common questions

How does my computer know what I plugged in?

The device tells it. A USB device sends codes that describe what kind of device it is, such as a keyboard, storage or printer. The computer uses that information to pick a driver. It mostly trusts what the device says about itself.

What is a driver?

A driver is a small program that lets the computer talk to a type of device. Many common drivers are built in. Others come from the device maker. Drivers run with high-level access, so they should come from trusted sources.

Can a phone charging cable be dangerous?

It can be. A cable with hidden electronics could act like another device. Use cables from shops you trust, and be careful with free or unknown ones. For charging in public places, see our guide to public USB charging.

Is Bluetooth safer than USB?

Neither is safe in every case. Bluetooth pairing sets up keys for an encrypted link, which helps. Wireless devices can still be paired by mistake or left paired for years. Pair only devices you own and remove ones you no longer use.

Why does my work laptop block some devices?

Many workplaces use device control. These settings allow only approved device types or makes, and may block storage or new keyboards. It reduces the chance that a harmful device can act on your computer.

Where next?

Ready for the detail? Read the practitioner guide: Removable Media and USB Control Guide. It goes further into device control policies, allow lists by device type and maker, and how to roll them out without breaking work.

Also useful:

Related NHI Mgmt Group resources: Printer and Office Device Security for Beginners, Endpoint Security for Beginners and Full Disk Encryption for Beginners.

Key terms

Device driver
A small program that lets the operating system talk to a type of hardware.
Driver signing
A digital signature on a driver that shows who published it and that it was not changed.
BadUSB
An attack where a USB device's chip software is changed so it acts as a different device.
DMA attack
Using a device's direct memory access to read or change a computer's memory without permission.
Kernel DMA Protection
A Windows feature that limits memory access by external devices until a user unlocks the computer.
Bluetooth pairing
The step where two Bluetooth devices set up shared keys so they can trust each other.
Device control
Settings that decide which devices and device types may connect to a computer.

Sources and further reading

  1. USB Implementers Forum, "Defined Class Codes". https://www.usb.org/defined-class-codes (accessed 1 Dec 2026).
  2. Microsoft, "Driver signing", Windows hardware developer documentation, Microsoft Learn, last updated 12 July 2025. https://learn.microsoft.com/en-us/windows-hardware/drivers/install/driver-signing (accessed 1 Dec 2026).
  3. Steve Karr, "Bluetooth pairing feature exchange", Bluetooth SIG blog, 29 March 2016. https://www.bluetooth.com/blog/bluetooth-pairing-part-1-pairing-feature-exchange/ (accessed 1 Dec 2026).
  4. Security Research Labs, "BadUSB: On accessories that turn evil", 31 July 2014. https://srlabs.de/bites/usb-peripherals-turn (accessed 1 Dec 2026).
  5. Microsoft, "Kernel DMA Protection", Windows security documentation, Microsoft Learn, last updated 15 August 2025. https://learn.microsoft.com/en-us/windows/security/hardware-security/kernel-dma-protection-for-thunderbolt (accessed 1 Dec 2026).

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.