Get NTLM Credentials Fiddler - c#

I am not sure if this is possible, but I am running into an issue where a Web Service call is giving me back a 401 Unauthorized. I have looked at the Fiddler logs and confirmed this, but I am passing in the correct credentials through my app. Is there anyway to get credentials that are being passed to the service by looking at the Fiddler Headers or Auth tabs?

If you click the AUTH tab in Fiddler, it will show you the information about the authentication challenge response.
Note, however, that NTLM and Negotiate don't send the raw password over the network.
Is the target site HTTPS? If so, is Extended Protection enabled?

Related

Programmatically authenticate with Azure AD for Application Proxy

I have an on-premise hosted WCF service with REST endpoint which is configured for Anonymous authentication only in IIS. I installed and configured Azure App proxy connector on the server. I am able to contact the service fine with Pass-through authentication, but struggling to authenticate from a console app when Azure AD is chosen as security mechanism. I know I could have pass-through in Azure and turn on for example windows authentication in IIS, but this is unfortunately not an option in this case.
Using a browser, I am able to access the application fine, don't even need to enter credentials, our on-premise AD is connected and synchronized with Azure AD.
I followed this walk-through despite it is not regarding application proxy, and reusing parts of code I am able to get the Access Token for my application, but when I run the http request with Authorization header I don't get the result of service operation.
Using Fiddler I can note the following:
I get http 302 (Found). I can see my Authorization header in request, and in response I get a cookie AzureAppProxyAnalyticCookie
That is followed with http 200 to login.microsoftonline.com
Example I provided link for above works fine so it is clear that I am doing something wrong. Why is Authorization header not accepted and why am I being redirected to logon page?
Thanks in advance
This is working for another service, have no idea what was wrong with the first one, but suspecting something with DNS on local server. Won't be spending more time on this, point is that I shouldn't have experienced the redirect at all, although browser handled it and managed to get me authenticated.

WebService Connection, HTTPS UserName, password authentication fails with Anonymous error

A customer of us has adjusted their security on the webservices.
We normally called an ASMX webservice with no authentication. Now they have put a certificate on the HTTPS and added a Windows user for us to authenticate.
Regardless of what properties I'm setting and how I'm always getting:
"The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM,Basic realm="www.domain.com"'."
If I input the link inside a browser, then the browser asks for the username and password and I'm able to see the WSDL.
But if I remove the ?WSDL then it indicates that I'm not authorized.
Did somebody encountered such behavior and knows how to make sure the service is properly setup?
I have tried a number of possible combinations with adjusting the Transport/Message credentials to other values but it doesn't matter, it still gives me that error.

ASP.NET Always include Kerberos authentication in client response

Is there a way to configure IIS or mark up my code so that the client (any major modern browser) will always include Kerberos information in the response without having to make any modifications to the client itself?
In this specific server method, I'm using ASP.NET impersonation with delegation enabled in AD and it would seem that from firefox and a few other clients, Kerberos data is not being passed from the client to the server.
My application only has Windows Authentication enabled, but how can I force the requests to pass Kerberos information along?
If it helps, I'm using jquery's ajax to GET or POST my requests to the server.
As long as your server is returning "WWW-Authenticate" headers that indicate it accepts Kerberos authentication ("Negotiate"), the client should automatically supply the necessary credentials. Make sure that Negotiate is listed as a possible provider for Windows Authentication in the Authentication configuration of your application. You'll probably want to disable NTLM in that list.
You can tell if the client is sending Kerberos tickets if you look at the HTTP headers. It should have something like "Authorization: Negotiate YIIN..."; the first few base64 characters of the payload let you distinguish between Kerberos and NTLM.

NotFound for HTTPS Endpoint When Decrypting HTTPS Traffic

I'm currently developing an application in C# for Windows Phone against an HTTPS web service. An example of the endpoint that I'm accessing is as follows: https://apitest.letsfreckle.com/api/projects.json?token=lx3gi6pxdjtjn57afp8c2bv1me7g89j
When I inspect the network traffic using Fiddler with the "Decrypt HTTPS traffic" option enabled I get a "NotFound" exception in my code. If I disable the "Decrypt HTTPS traffic" option in Fiddler, then I get the response that I would expect in my code.
In Fiddler, I see the HTTP CONNECT request with a result of 200, but nothing else.
I'm using Fiddler v2.3.7.4 beta on 64-bit Windows 7 with no filters. I have no proxy servers configured and the problem persists if I disable my anti-virus protection (Microsoft Security Essentials). I have tried removing the interception certificates and the root and site-specific certificates are correctly re-created.
I appreciate that this scenario works perfectly well for the many Fiddler users out there, but would be grateful if you could shed any light on why it's not working for me.
UPDATE: I can hit the endpoint and get a response just fine using a browser and when not decrypting HTTPS traffic through Fiddler and when Fiddler is not involved.
You can install the certificate on the emulator, I use an HTTPS endopoint in my app too and I can decrypt the traffic.
You need to visit with IE Mobile this URL: http://yourmachine:8888/ and click on the link "install the root certificate", after you should be able to see the traffic beyond the handshake (CONNECT)
You need to start Fiddler bedore the emulator I think.

Properly authenticating against WCF service in a Claims environment

SharePoint web applications in Claims authentication mode supports NTLM, but only through the following steps:
HTTP 302 redirect to a second location.
HTTP 401 challenge for NTLM auth
HTTP 401 verification
HTTP 302 redirect back to original location (service)
Can I write a custom behavior, channel factory or binding to handle this? Is there a better way to go about this?
What you have listed is the standard NTLM hand shake.
One way to avoid it is to use Kerberos instead of NTLM. See: http://technet.microsoft.com/en-us/library/gg502594.aspx

Categories

Resources