Implement Socks + Gitea. Still needs a lot of rework. - #77
Open
0xEr3bus wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned in the README, I am still working on it and testing it further on other web apps that support Kerberos authentication. Basically, adds a SOCKS4/5 proxy that keeps an authenticated Kerberos HTTP relay session alive, so you can use a relayed account from a local browser instead of a one-shot on most web apps that support Kerberos auth. Mainly, it's copied from ntlmrelayx's -socks, but is for the Kerberos AP-REQ flow.
Windows SSPI keeps a replay cache for Kerberos authenticators. Sending the same AP-REQ a second time returns
SEC_E_LOGON_DENIED(0x8009030c), which surfaces to the browser as a 401 or a redirect to the login page.To get multiple requests from a single AP-REQ, the relay client spends it once at setup, against
-socks-login-path(default:/user/login?auth_with_sspi=1for Gitea), and captures the session cookies returned by the target. The SOCKS plugin then authenticates tunnelled requests with those cookies and only falls back to replaying the Negotiate header when no session cookie is available.