Skip to content

Implement Socks + Gitea. Still needs a lot of rework. - #77

Open
0xEr3bus wants to merge 1 commit into
dirkjanm:masterfrom
0xEr3bus:master
Open

Implement Socks + Gitea. Still needs a lot of rework.#77
0xEr3bus wants to merge 1 commit into
dirkjanm:masterfrom
0xEr3bus:master

Conversation

@0xEr3bus

Copy link
Copy Markdown

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=1 for 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.

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.

1 participant