# Offline packet capture sample of the private HTTP media service (TCP/8800)
# Export notes: digests are masked per export policy; identity names and algorithm parameters are retained (these are exactly what the analysis needs)
# Purpose: understand the authentication scheme of this channel, and use it to determine how the server's "expected value" is computed.

--- Request 1/2: client's first access (without credentials) ---
GET /preview HTTP/1.1
Host: <TARGET_HOST>:8800
Connection: close

--- Response 1/2 ---
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="TPC260", qop="auth", nonce="5f3c1a9d2b7e4068a1c4d9e07b2f8a35", opaque="9d1ef0c4b7a25683", algorithm=SHA-256

--- Request 2/2: a legitimate session of the Camera Controller (periodic image capture) ---
GET /preview HTTP/1.1
Host: <TARGET_HOST>:8800
Connection: close
Authorization: Digest username="hub_primary_2", realm="TPC260", nonce="5f3c1a9d2b7e4068a1c4d9e07b2f8a35",
               uri="/preview", qop=auth, nc=00000001, cnonce="0a4f113b",
               response="MASKED_IN_DIAGNOSTIC_EXPORT"

--- Response 2/2 ---
HTTP/1.1 200 OK
Content-Type: image/png
Content-Length: <redacted>

# Analysis hints:
# 1) The server uses RFC2617-style Digest, with the SHA-256 digest algorithm;
# 2) The digest input is composed of "username : realm : password" and "method : URI",
#    i.e. HA1 = SHA256("username:realm:password"), HA2 = SHA256("method:uri"),
#    response = SHA256("HA1:nonce:nc:cnonce:qop:HA2");
# 3) This channel's authentication table contains several identity rows (written into the device at the factory; see the account list on the device information page);
# 4) The digest itself is masked and cannot be replayed directly — you need to derive the server's expected value yourself.
