Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to debug an ssl connection?

I have a client application that connects to a web service over https. I need to "sniff" all the network traffic between web service and my client to check if everything is okay, i.e, i have to debug the connection.

I have tried Wireshark but since I do not have server private key, data shown on wireshark screen is, of course, encrypted.

Is there a way to observe ssl network traffic between my client and web service when I do not have access to server itself and therefore private keys and other related stuff?

Thanks in advance.

like image 840
Hayri Uğur Koltuk Avatar asked Jun 14 '11 13:06

Hayri Uğur Koltuk


People also ask

How do I enable SSL debug logs?

Command-Line Properties for Enabling SSL Debuggingdebug=all property enables debug logging within the JSSE-based SSL implementation. The -Dssl. debug=true and -Dweblogic. StdoutDebugEnabled=true command-line properties enable debug logging of the SSL calling code within WebLogic Server.

Can SSL connection be hacked?

If you have an SSL certificate installed on your site, you may have wondered if they are quite as infallible as they're made out to be. For instance, can an SSL be hacked? The short answer is that while it is technically possible to hack an SSL, the probability of it happening is incredibly slim.


2 Answers

See this: Debugging SSL communications.

I know theoretically it can be done - you can setup a proxy that communicates with the target web-service, point your application to connect via this proxy. Its a known limitation - Https assumes you trust all proxy and certificates installed on your machine. Its a form of Man-in-the-middle attack.

See if Fiddler would be of some use.

Man-in-the-middle attacks

In a man-in-the-middle attack, the attacker intercepts user traffic to capture credentials and other relevant information. The attacker then uses this information to access the actual destination network. During the process, the attacker typically serves as a proxy/gateway that presents a false SSL VPN site to the user; this proxy/gateway passes whatever authentication the user enters on to the real destination site.

like image 112
YetAnotherUser Avatar answered Oct 19 '22 23:10

YetAnotherUser


do you have python installed?

pip install mitmproxy

mitmproxy -p 1234

even a video for you

(by the way, i had to apt-get install python-lxml on debian squeeze after an apt-get update)

like image 24
terminalv Avatar answered Oct 19 '22 22:10

terminalv