All projects

The problem

The HiveHack room at CyberSea included a router, an IP camera and an older Samsung smart TV. The task was to get the camera feed onto the TV, which had a browser but no native RTSP support.

The camera exposed RTSP on its default port and accepted default credentials. That made the challenge a lesson in discovery and configuration, not a sophisticated exploit. The remaining problem was compatibility: RTSP is not something the TV browser can play, so the stream needed conversion and an HTTP delivery path.

RTSP_TO_HTTP packages that path: a credential-audit script for the authorized lab camera, an FFmpeg pipeline that turns RTSP into HLS, and a Python server that makes the playlist and segments available to a browser.

Architecture

  1. Challenge LAN

    A wired Ethernet connection to the HiveHack router, with the camera and smart TV on the same local network.

  2. RTSP discovery and access

    Scan for TCP port 554, then test default credentials against the lab camera.

  3. FFmpeg HLS bridge

    Read the authenticated RTSP stream and transcode it into a playlist and short .ts segments.

  4. Python HTTP server

    Serve the player, playlist and segments on port 8000 with HLS MIME types.

  5. Samsung TV browser

    Open the server URL on the TV and play the HLS stream without native RTSP support.

The camera stream never reaches the TV directly. FFmpeg turns RTSP into HLS files, and the TV browser fetches them over HTTP. The bridge adds compatibility, not authentication.

Walkthrough

  1. Find the camera on the LAN

    The challenge provided physical access to the router, camera and TV, so I used a wired connection instead of attacking Wi-Fi. A scan limited to the standard RTSP port was enough to locate the camera.

    nmap -p 554 192.168.1.0/24
  2. Audit the RTSP credentials

    The camera accepted default credentials. rtsp_crack.py drives ffmpeg with a short read timeout and classifies the result from the error output. It is a lab helper for an authorized device, not a general-purpose attack tool.

    python3 crack/rtsp_crack.py --target CAMERA_IP --userlist crack/users.txt --passlist crack/passwords.txt --path stream1
  3. Verify the stream

    Before changing formats, I opened the RTSP URL in VLC and ffplay to confirm that the credentials worked and the live feed was playable.

    ffplay "rtsp://USER:PASSWORD@CAMERA_IP:554/stream1"
  4. Convert RTSP to HLS

    live_stream.sh loads the camera settings from .env, removes old segments, and runs FFmpeg with 1920x1080 output, H.264 at 25 fps, a 1 Mbps target, CRF 31, AAC audio and five-second HLS segments.

    bash live_stream.sh
  5. Serve the playlist over HTTP

    server.py serves the project directory on port 8000, registers the HLS MIME types and prints the LAN address to open on another device.

    python server.py
    http://LOCAL_IP:8000
  6. Play it on the TV

    The Samsung TV browser loaded the player page and played the HLS stream. Pause and play worked; the goal was live display rather than a full media interface.

Implementation

  • rtsp_crack.py runs ffmpeg with -rtsp_transport tcp, a three-second read and a ten-second process timeout, then classifies the result from ffmpeg stderr. The repository includes small lab username and password lists for the challenge.
  • live_stream.sh and live_stream.bat wrap the same FFmpeg invocation. The shell version deletes old .ts files before starting and sources the camera settings from .env.
  • server.py subclasses SimpleHTTPRequestHandler to add application/x-mpegURL and video/MP2T MIME types, plus a permissive Access-Control-Allow-Origin header.
  • index.html is a minimal browser player for the generated playlist. The TV never connects to the RTSP source; it only requests HLS files from the Python server.

Security takeaways

  • Default credentials and an exposed RTSP port were enough to reach the camera feed. Change defaults, disable unused services and keep surveillance devices on a restricted network segment.
  • The bridge inherits the source's weaknesses. FFmpeg reads a plaintext RTSP stream, and the demo HTTP server serves the result without authentication or TLS.
  • The server allows any origin and prints its LAN address for convenience. That is acceptable on an isolated challenge network, not on a shared or public one.
  • The sample .env contains challenge credentials, and live_stream.sh writes the RTSP URL to the terminal. For real use, keep secrets in an untracked file and avoid writing them to logs.

Scope and limitations

This was a CTF-style challenge, not a production deployment. The camera, router and TV were provided for the HiveHack room, and the workflow was not tested against arbitrary devices. The FFmpeg settings trade image quality and CPU for compatibility. server.py is a teaching server, not a hardened media service, and this page does not host a live feed or expose credentials.

Source references

Source review:

  • CRF & Embedded

    CC1101_DRIVER

    ESP-IDF C driver for CC1101 sub-GHz radio modules: set frequency, modulation and packet options, then send, receive or capture the demodulator output.

    Updated Source on GitHub

  • PythonSecurity

    modbus

    Python Modbus CLI for reading, watching and testing industrial devices over network and serial transports, with a built-in simulator.

    Updated Source on GitHub

7SOULSeven Inch Soul