Skip to content
Tech Interview Prep
Technical interview guide

Embedded Security

How a device establishes that its firmware hasn't been tampered with, and the physical-access attack classes that don't exist in typical server-side security.

Read
65 min
Practice MCQs
25
Interview Q&A
25
Edition
v3
Editorial status
Reviewed

Scope: PSA Crypto 1.5, Storage 1.0, Attestation 2.0; current TF-M and MCUboot; NIST IR 8259A/SP 800-193; OWASP ISVS 1.0 reviewed 2026-09-04.

Curated: · Written: · Reviewed:

25 questions

MCQ-1A device boots BootROM → BL1 → BL2 → app, all four images in one SPI flash chip. The BootROM hashes BL1 and compares it to a digest burned into the SoC's OTP fuses. BL1 hashes BL2 and compares it to a digest stored in a config partition of the same flash. A lab swaps in a flash chip carrying a patched BL2 plus a matching digest in the config partition; the device boots the patched BL2 and prints 'secure boot OK'. Which single change closes that attack?
MCQ-3A device's boot ROM verifies an ECDSA signature over the firmware payload and a CRC over the image header. The header carries load address, entry point, version, and dependency IDs. An attacker edits the header's load address to point at a staged loader, recomputes the header CRC, and leaves the signed payload untouched. The device boots the staged loader. Which change to the signed object would have prevented this?
MCQ-5A field device boots with a bootloader that verifies an Ed25519 signature with a public key fused into OTP, then reads the 16-bit security_version at header offset 0x20 and refuses to boot if it is below the OTP monotonic counter. The counter reads 14 and the device had been running v6.0 with security_version 14. The vendor still publishes v4.1, signed with the same key, security_version 9, and it carries a command-injection bug that v6.0 fixed. The device is now running v4.1. Forensics: the flashed payload hashes to the same SHA-256 as the v4.1 payload in the vendor's public archive, the 64-byte signature block is byte-identical to the archive's, the bootloader's header dump of the flashed image shows security_version 14, the OTP counter still reads 14, and an earlier attempt to flash a genuinely signed v3.2 image (security_version 5) on this device was refused. Which explanation fits these facts?
MCQ-21A fleet of 50,000 field devices uses A/B slots with a monotonic anti-rollback counter in one-time-programmable fuses. The bootloader burns the counter to N+1 as soon as it accepts a signed image of version N+1, then writes the image to the inactive slot and reboots. Field data: 3% of devices that lose power between the burn and the completed write come back running the old firmware with the counter already at N+1, and the server's re-push of version N+1 is rejected as not newer, leaving them permanently on the old build. Which change removes the cause?
MCQ-14A firmware update parser reads a 6-byte header (`uint16_t len` then `uint32_t off`, both little-endian) and then runs `memcpy(sram + off, packet + 6, len)`. SRAM is 64 KiB mapped at 0x20000000. The only validation is `if (len > 512) return ERR;`. A captured packet carries len = 0x0040 and off = 0x0000FFE0. What does this packet do?
MCQ-12A Cortex-M33 firmware image runs the BLE advertisement parser, the sensor sampler, the motor-control loop and the flash-log writer as tasks in one privileged address space. Fuzzing with a 300-byte advertisement overflows the parser's 64-byte copy buffer and overwrites the motor-control loop's target-speed variable, spinning the motor to its 12,000 RPM limit. The overflow is driven by a length field inside the payload, so the outer packet length is within limits. Which change would have kept that write from reaching the motor variable?
MCQ-13A Cortex-M33 with TrustZone-M keeps an AES-128 key at 0x0C00_0000 in secure SRAM. The isolation claim rests on the MPU: the key's region is marked privileged-read-only and secure code runs privileged-only. In a pen test, non-secure code programs the Ethernet MAC's DMA descriptor to read 0x0C00_0000; the MAC's DMA channel is configured as a secure bus master, so the SAU admits the transfer and the key is copied to a non-secure buffer. The key must stay in secure SRAM and the MAC must keep serving non-secure networking. Which change makes the isolation claim hold?
MCQ-24An engineering team is deploying AES-128 cryptographic operations on an ARM Cortex-M microcontroller whose physical enclosure exposes shunt resistors and power rails to potential adversaries. Which countermeasure effectively mitigates power analysis and differential side-channel attacks on these cryptographic implementations?
MCQ-19A Cortex-M4 device boots from ROM, verifies the application image with ECDSA, and jumps to the image only if verification returns OK. The check compiles to a single conditional branch. In a lab, an attacker with physical access can vary VDD and the clock and inject a one-cycle glitch at a chosen offset. The team's threat model currently excludes physical attacks because 'the signature check is cryptographic.' Which outcome is the strongest reason to add voltage/clock glitching to that threat model?
MCQ-20A payments service encrypts card numbers with AES-128-GCM from a widely reviewed library. Keys come from a CSPRNG, are never logged, and traffic runs over TLS 1.3. The team's benchmark shows a 40 ns gap between an L1 hit and an L2 miss on the decryption core. An external researcher recovers the full AES key after collecting 2 million response-time samples from the decryption endpoint, sending ciphertexts of their own choosing each time. The library's AES uses a 1 KB S-box table indexed by key-dependent bytes. Which mechanism explains the recovery?
MCQ-25A payment terminal's tamper mesh fires while the device runs from a supercapacitor rail that can lose power at any instant. The device keeps its long-term keys in flash and must guarantee that none of them is recoverable after the event, even if power is cut mid-response. Which tamper response meets that guarantee?
MCQ-9A payments service encrypts each 4 KB session record with AES-256-GCM. The wrapper builds the 96-bit nonce from a per-process counter that starts at 0, and all 40 autoscaled instances load the same data key from config. Instances restart on deploys, crashes and scale events. A reviewer flags the design. Which change removes the failure mode?
MCQ-10A service encrypts each record with AES-256-GCM under a key rotated once a year. The 96-bit nonce is a 64-bit counter, zero-extended to 96 bits, that resets to 0 on every process start. The process restarts on each deploy, about 20 times a day, and each run encrypts roughly 10^6 records. What does this design produce?
MCQ-8A team builds a pool of 40 worker VMs by snapshotting a VM that has been up for an hour and cloning that snapshot. Each worker generates a 256-bit session-signing key at first start using getrandom(2). Two weeks later an audit finds that a token signed by one worker verifies under another worker's public key. What is the cause?
MCQ-7A payments service encrypts cardholder data with AES-256-GCM. One data-encryption key per environment is generated at deploy time and stored in a Kubernetes Secret; etcd is encrypted at rest with a KMS key, and the Secret is mounted into every pod. In a review, an engineer whose IAM role grants no KMS permissions runs `kubectl get secret db-dek -o jsonpath='{.data.key}' | base64 -d` and gets the working plaintext key. Which change removes that path to the plaintext key?
MCQ-11A fleet of 40,000 field devices stores its device credential in a 64-byte encrypted flash record: 16-byte AES-GCM ciphertext, 12-byte nonce, 4-byte record index. Firmware updates rewrite the record in place. An attacker with five minutes of physical access reads a device's record while it runs firmware v3, waits for the fleet to push v5, which revokes that credential, then writes the saved 64 bytes back over the record. The device reboots, the GCM tag verifies, decryption succeeds, and it authenticates to the backend with the revoked v3 credential. Which change to the record format closes this failure?
MCQ-17A fleet of 5,000 door controllers runs a protocol where each frame is AES-128-CBC encrypted under a session key negotiated at boot, with a 16-byte HMAC-SHA256 tag over the ciphertext and a 4-byte sequence number in the clear header. The receiver verifies the tag, decrypts, and executes the command; it never reads the sequence number. An attacker records a valid 'unlock' frame from controller 812 and replays it 40 seconds later, unchanged, from the same address; the door opens again. Which fix closes this hole?
MCQ-16A fuel-dispenser controller authenticates every command frame with HMAC-SHA256 over the payload and a 32-bit sequence number. It accepts any frame whose sequence number is within 64 of the highest it has accepted, raises that high-water mark to the largest sequence number it has accepted, and keeps no record of which sequence numbers inside the window it has already processed. The high-water mark is currently 950. An attacker on the bus captures one authenticated 'dispense 1 L' frame with sequence number 1000 and replays it 64 times before the legitimate sender's next frame arrives. What happens?
MCQ-22An attestation service issues a fresh 32-byte nonce per request and stores it in a set with a 5-minute TTL. On each quote it verifies the TPM signature, confirms the nonce is present in the set, and compares PCR[0–7] against a golden baseline. A red-team exercise shows that a quote captured off the wire can be replayed successfully for up to 5 minutes. Which defect explains this?
MCQ-18An STM32-based fleet of 12,000 meters ships with SWD enabled and RDP level 0. After a teardown post shows the AES key read from flash in under two minutes, the next build sets RDP level 1. Field returns then get more expensive: technicians can no longer attach a debugger to pull the fault log, so 40% of RMAs are closed by board swap instead of repair. Which change restores the RMA workflow without reopening the key-extraction path?
MCQ-2A team is threat-modeling a fleet of 40,000 IP cameras. Their model is a spreadsheet of CVEs in the RTSP stack, ranked by CVSS. Secure boot verifies the firmware with RSA-2048, signing keys are generated in an HSM and never leave it, and OTA uses TLS with a pinned certificate. The PCB carries an unpopulated 4-pin UART header, and the factory test image, the same image that ships, leaves that console enabled as an unauthenticated root shell. The team has room for one more abuse case before the design freeze. Which one does the scenario make the priority?
MCQ-4A fleet of 12,000 smart meters ships with one factory-installed client certificate that the cloud endpoint accepts from any source address for both telemetry and commands, plus a debug shell on TCP 8080 whose password is printed on the device label. Nothing about either can change after manufacture. A quarterly audit finds 240 meters answering on 8080 from public addresses, and 900 units that were returned, wiped of user data and resold: 780 of them still accept commands from the previous owner's operator account. Which change removes both findings?
MCQ-6A fleet of 50,000 sensors uses unique X.509 certificates per device. The backend validates each certificate, then reads a custom 'fleet' claim that is identical on all certificates and uses it to authorize publish access to any sensor's topic. An attacker extracts one sensor's private key. What is the blast radius?
MCQ-15A fleet command gateway picks the request principal from the transport: a request arriving on the backend command service's mTLS channel is attributed to the service account `svc-cmd`; a request arriving on a direct operator session is attributed to the operator's role. It then evaluates the first matching row of this policy: | principal | tenant | allowed commands | | --- | --- | --- | | svc-cmd | * | device:command | | operator | caller's tenant | reboot, diagnose | | viewer | caller's tenant | diagnose | The command service forwards the end user's ID and role in headers, but the gateway does not read them. A request arrives on the command service's mTLS channel: command `reboot`, target device `dev-9001` (registry tenant B), forwarded user `u-17` (role `operator`, tenant A). What does the gateway do with this request?
MCQ-23A device agent keeps security events in a 64-slot ring buffer that drops the oldest entry when full. Sixteen slots are reserved for high-severity events (tamper, integrity failure); the other 48 hold routine events (auth failures, boots, update decisions). During a 30-second network partition the device records 380 auth failures and 20 high-severity events while the collector is unreachable. When the link returns and the agent flushes the buffer, what does the collector receive?