Skip to content
Crypto Write-up Intermediate

Vulnerability in Dahua’s ONVIF Implementation Threatens IP Camera Security

The Dahua IP camera's ONVIF implementation did not enforce replay protection for WS-UsernameToken authentication, so an attacker who sniffed one unencrypted request could replay the credentials to perform privileged actions such as creating an administrator account.

nozominetworks Follow

Published on nozominetworks.com

Last year, Nozomi Networks Labs conducted extensive security research on multiple IP cameras and video surveillance systems. This research led to the discovery of vulnerabilities in Axis and ThroughTek devices.

Nozomi Networks Labs (@nozominetworks), on nozominetworks.com

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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the device did not implement the ONVIF-recommended replay protections (rejecting stale timestamps and caching used nonces), so it accepted replayed authentication data indefinitely.

Impact

An attacker who can sniff one unencrypted ONVIF request could replay it to create an administrator account and gain full privileges, including viewing live camera footage; the report notes that using HTTPS would have impeded exploitation.

What the attacker needed

Ability to sniff unencrypted ONVIF traffic; camera uses HTTP (default on tested model); WS-UsernameToken authentication in use

How it was found

  1. Capture an unencrypted ONVIF request authenticated with WS-UsernameToken.
  2. Replay the same authentication data in a new request from a different IP address after about 30 hours.
  3. The device accepts the replayed request and performs the action, such as creating an administrator.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When a camera checks a password, it should also make sure the same login attempt cannot be reused later. Here, the camera accepted an old login message again and again, so someone who saw one unencrypted message could reuse it to add their own admin account.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.