New Module to Implement MS-NEGOEX Protocol#2195
Conversation
This file implements the NEGOEX protocol for SPNEGO extended negotiation, including message types, structures, and parsing functions. This commit is a initial, first start attempt at the protocol
Just cleaned up and trimmed up certain code elements from leftover.
The `createNegoMessage` function has been implemented to create a negoex message as either the initiator or acceptor
Implemented the function that's able to create an exchange message used within the NEGOEX protocol
|
Hello. This seems to be a big feature, so I would like to have it broken down into more than a couple of milestones/PRs: If you are ok with the plan, we can consider this one as PR 1 and focus on:
Test
We can discuss in detail the following PRs later. The idea is to have a solid foundation for NEGOEX/PKU2U functionality starting from this PR, to be used later in some interesting usecases. Let me know your thoughts thanks |
|
Hey @anadrianmanrique, Thanks for taking the time to lay it out all out that way and for the plan/feedback. I think the approach you laid out is solid as it makes it easier to build towards it bit by bit. Im happy to use this as PR 1 and start ticking off elements from the list for PR 1 Can I clarify for your point on "Remove or keep minimal NegoExContext.", if we were to remove it, then how would we be able to control/drive the state machine during PR 2 or would removing it just mean we remove for now and then re-add later on |
…eaders for the correct strucutre/format
Hi there!!, as discussed from the previous PR #2170 I have got this partial implementation of the MS-NEGOEX protocol up! Its no where near ready and I have only implemented the relevant structures, some helper functions for the protocol(such as checking the message headers or a function to create a message header) as well as some errors and a base class to act as a state machine to control the protocol flow.
I noticed in the spengo.py implementation, there was no "state" machine and so I wanted to ask before continuing with development what would the module/protocol need to look like?
An additional question how to implement the sub protocols that are to be negotiated by negoex. Officially only PKU2U needs NEGOEX and cloudAP uses it as well. Since neither are present in impacket yet, is there a certain design choice that needs to be taken to accommodate future additions?
Finally, NEGOEX has an additional network exchange that can be side stepped if we, as the initiator, send something the spec calls as an optimistic token that contains information on the protocol we want to negotiate. I haven't found an answer or a location in which I could understand how to generate this for PKU2U(which I guess is the only protocol someone could implement now that would use it).
I would appreciate any feedback on the above so I know how to carry forward with implementation :3