[EN] Exploiting CCTV: RTSP Authentication Digest
An attacker on the same network could intercept RTSP digest authentication traffic and brute-force the password offline, then use the recovered credentials to access the CCTV stream.
medium.com
Published on medium.com
Versi Bahasa Indonesia
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 use of digest authentication over unencrypted RTSP, which allows an eavesdropper to capture the challenge and response and perform an offline brute-force attack.
Impact
An attacker on the same network could recover the camera password and view the video stream.
What the attacker needed
Attacker on same network; ability to ARP spoof; camera uses digest auth
How it was found
- Scan the internal network to find hosts with open RTSP ports.
- Perform ARP spoofing to intercept traffic between the camera and the gateway.
- Capture RTSP packets with Wireshark and identify a PLAY request containing digest authentication.
- Extract the username, realm, nonce, request URI, method, and response hash from the captured packet.
- Brute-force the password offline by computing the digest for each candidate and comparing to the captured response.
- Verify the recovered password by connecting to the RTSP stream with VLC.
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 uses digest authentication, it sends a challenge (a random number) and the client replies with a hash of the password and that challenge. If someone can listen to that exchange, they can try many passwords offline until the hash matches, because the challenge and response are visible. Here, the attacker did that and found the camera password.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.