how to debug requests with a client certificate C# - c#

I am currently trying to make a secure request (HTTPS) via client certificate, but I'm having issues understanding if the client is actually sending the certificate itself.
I already tried fiddler for checking the traffic, but I was not able to find any filter or any doc about it (and the official docs of fiddler seems also down atm)
Cheers in advance

As far, I know you cannot use fiddler because it captures only HTTP(S) traffic, but SSL negotiation happens on transport (TCP) level. You can use wireshark traffic analyzer and this guide or this.

Related

SSL Stream with Client Certificate

I have followed the Microsoft Documentation (https://learn.microsoft.com/en-us/dotnet/api/system.net.security.sslstream?view=netframework-4.7.2) and able to create a
server that allows Https Connection.
Currently , The implementation does only Authentication from the Server end but I would like to
issue an another certificate from the Client that server can authenticate to establish the connection.
Most of the Documents only cover examples with client Authentication set to false. I am looking for sample example in which Server can receive and Authenticate the client certificate as well .
Any suggestions would be much helpful.
Thanks a lot in advance !!

How to forward SSL CONNECT requests (not intercept) on a school project proxy

I'm writing a basic HTTP proxy for a school project using HttpWebRequest HttpWebResponse. It's all working great for HTTP requests, but when it comes to receiving a HTTPS request it fails miserably.
I don't want the proxy to intercept and decrypt HTTPS traffic, merely just pass it along. I know I could just change the proxy server settings in windows to only handle HTTP traffic, but I'd really like to try and handle it some way. How can this be done?
Help appreciated.

Handle a HTTPS WebSocket handshake in C#

I have a local c# server running and listening on localhost and a browser connecting to a cloud service running a JavaScript HTML5 implementation of websockets. Standard ws://
This works great over HTTP:// and I can read the header and use it, but I need it to run in HTTPS:// I understand that I have to change to wss:// and this does connect to my server but the header is garbled/encrypted.
I have looked into SslStream but drawn a blank.
How do I handle this WebSocket Secure header in C#?
This question was answered in the comments:
If your app is behind a Proxy load balancer, it would normally manage the SSL for you (accessing your app without encryption).
If you need to manage SSL, complete the SSL handshake first (usually right after you accept the connection) and than parse protocol specific data (HTTP, Websockets, SMTP etc').

httplistener and http connect method

I am using the HTTP Proxy setting on my ipad to redirect traffic to my .net httplistener.
If i send http traffic using the ipad proxy sends the traffic to my httplistener, and
my code does its thing. If i send https traffic using the ipad and its http proxy I see the packets show up at my machine (sniff using wireshark) on port 8443, but my listener doesn't get kicked off. I have the prefixes and certificates correct. I proved this out by instructing a browser to go directly to my machine w/o the http proxy using port 8443.
I noticed from my sniffs of the https connection attempt that the HTTP CONNECT method
is contained in the packet. Its probably trying to tunnel the SSL traffic. Does http.sys or httpListener recognize/handle the CONNECT method ? I am curious why my httplistener isn't firing off ??
thoughts on how I can further troubleshoot this ?
It's not stated in your question, so have you actually setup your HttpListener to support SSL with a site certificate as documented in this question?
How do I add SSL to a .net application that uses httplistener - it will *not* be running on IIS

Capture incoming and outgoing soap request

I have a C# console application that calls SSRS soap based webservice (service runs on a remote machine). I want to capture the incoming and outgoing soap request.
How can this be done?
Thanks
Is this just for debugging purposes? If so, Fiddler is probably your best bet. Wireshark is also great, but it doesn't do the HTTPS stuff that Fiddler does.
It's possible to capture the data on the service side by effectively adding an incoming and outgoing filter which just passes the data along, logging it as it goes - but that's slightly fiddly from what I remember. Worth the effort if you're trying to do this for long-term audit etc, but for simple inspection I'd go with Fiddler.

Categories