Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

* Parse positionally independent WWW-Authentication header #26

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

Conversation

coffeegist
Copy link

Most of the time, the WWW-Authentication header comes back looking like this:

'WWW-Authenticate': 'NTLM Tl<..snip...>A=, Negotiate, Basic realm="autodiscover.site.com"'

The original code handled this fine. However, sometimes the header can come back in the following form:

'Www-Authenticate': 'Negotiate, Basic realm="autodiscover.site.com", NTLM Tl<...snip...>A='

When this happens, the program would throw an error during parsing: Error parsing internal domain name using OWA. This usually means OWA is being hosted on-prem or the target has a hybrid AD deployment.

This pull aims to reduce these false negatives by parsing until reaching the NTLM section of the header.

@byt3bl33d3r
Copy link
Owner

byt3bl33d3r commented Jun 11, 2020

@coffeegist good catch, thanks for this. I'm currently re-writing the entire thing (checkout the dev branch) and i'll make sure to add this in.
Cheers

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants