mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #4654] [Feature Request] Encrpyt the Login msg with pre-defined shared secret #3678
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#3678
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @bigcat88 on GitHub (Jan 31, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4654
Describe the feature request
Hello, I would like to thank you in advance for your contribution to open source.
We are considering using your product for some of our open source tasks, and a couple of questions about security have arisen.
In
func (svr *Service) login()we see the following transmission of the first login message from FRPc to FRPs:Perhaps I did not fully understand their sources, but it seems to me that this message is encrypted only at the
TCP levelwith the built-in TCPTLS.If so, then a fairly simple attack is possible with control over the data transfer channel.
To make the hacking task more difficult, it is possible to encrypt this
Loginmessage with a hash from a "token"(which will not be transmitted over the network), but which is known to both the server and the client.My suggestion is to optionally introduce an additional key/token for this, and use something like
AES-GCMfor Encrypting the Login messageI hope I haven't missed anything obvious in the source code, correct me if I'm wrong.
Describe alternatives you've considered
If there are any ways other than generating custom
TLScertificates for this (and do they work for Login messages?), I'd be glad to hear it.Affected area
@bigcat88 commented on GitHub (Feb 4, 2025):
Sorry for bothering, we checked, with self-signed certificates if we specify Trusted CA - the MiTM attack we were thinking about is not possible.
Thank you for your software, we will use it :)