Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve RTSP server authentication handling and auditing #1522

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

subbyte
Copy link

@subbyte subbyte commented Dec 25, 2024

In the latest version (v1.9.7), when using the RTSP module/server, a client fails authentication silently, which makes it very vulnerable to RTSP brute force attack:

  • There is no log of failed RTSP authentication
  • An attacker can test multiple RTSP requests with different credentials in a single TCP connection

This RP adds "failed auth" logging for rtsp server. In addition, the PR prevents an attacker packs many brute force authentication attempts into one TCP connection. After one authentication failed, the TCP connection will terminate, forcing the attacker to start a new TCP connection for the next brute force attempt, which makes it possible to be identified and blocked by a firewall like pf.

Note ffmpeg and ffmpeg-based players, e.g., mpv, have a special authentication behavior---even if username/password is provided in the URL, the first request does not include it, resulting in a failed authentication, while all subsequent requests (in the same TCP connection) add the authentication field in the header, resulting in successful authentications.

@subbyte subbyte changed the title Add authentication logging for RTSP server Add fail authentication logging for RTSP server Dec 25, 2024
@subbyte subbyte changed the title Add fail authentication logging for RTSP server Improve RTSP server authentication handling and auditing Dec 25, 2024
@AlexxIT AlexxIT self-assigned this Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants