-
Notifications
You must be signed in to change notification settings - Fork 328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot intercept protocol in which SSL connection is initiated by the server #334
Comments
It may be because sslsplit does not support TLS 1.3 yet. Can you check the output of the -V option? |
It indeed looks like TLS v1.3 support is not there. Though I was running I also notice that there is a |
Your version of sslsplit is too old. So I'd recommend you build and use the develop branch instead. When you're building you can enable the DEBUG_PROXY and other switches in GNUmakefile, and then pass the -D option to sslsplit for debug logs. I probably should port the TLS 1.3 changes from sslproxy to the develop branch of sslsplit. But I don't think I can do that soon. |
I have built commit
However, it does not make any difference to the issue at hand. The one I was using before (Ubuntu repo) and the one I build look almost similar to me. Especially, if the lack of TLS v1.3 is the main issue, then that is not going to get solved even with the updated version, right? I have built with
Is there any option that I can turn on for even verbose logging, for example, what packets are received and what actions are being taken? In general, what does it do when a TLS v1.3 |
Per your previous suggestion, I built
It has got TLS v1.3 support, as expected. Since My However, the client still hangs as before, though I see Is there anything else to do to put |
I further tested
|
The You may see more details if you start sslproxy with You can pass Your python client complains about the CA cert you use with sslsplit/sslproxy. I think this may be the reason. You need to add that CA cert to the trust store of that python client, or on that system. Or you should somehow disable cert verification in that client. Cert verification in sslproxy is on by default, you should disable it too, by something like |
Passing
|
I still think that the issue may be the client not liking the CA cert you pass to sslproxy (isn't it self-signed?). Can you add the CA cert to the trust store of that client? Or disable that client's cert verification? You can even follow the function calls for each connection if you inspect verbose logs with -D4. But the logs you posted do not help much. |
Yes, the certificate is self-signed. Is there any way to turn on I missed the call stack log from
|
For now, I have enabled the As I pointed out in my original post, it's the "supposed" server that sends the |
No, I think you're right. I've been trying to rule out all usual suspects, and I had assumed you were confused about the "switched" roles of client and server. But if that's true, then it may explain the issue. So, as you say, if the client establishes the TCP connection only, and then goes silent, the server side does not get connected. In fact, as you have seen, sslsplit/sslproxy assumes the client has closed the connection. So, sslsplit or sslproxy may not help in this case, as they are. But before givin up, you can comment out the whole "if (n == 0)" condition block where "Socket got closed while waiting" log is written in protossl_fd_readcb(), then build and try again, i.e.:
This may establish the server side connection, hopefully. |
Commenting the block produces this:
I am trying to get a hold of the code, but I am wondering why |
To establish the initial TCP connection, I have added the
Now the protocol proceeds, but basically both the server and the proxy send |
I don't want to discourage you, but I think it wouldn't be easy to reverse the roles of client and server. |
I can imagine and probably I'll end up giving up :-( Still I want to take a last shot, even if something quick and dirty works just for my use-case. Can you please point me to the part of the code that sends the |
It's more complicated than that. |
I am trying to intercept a custom, SSL-encrypted protocol where the client (
192.168.150.201
) establishes an initial TCP connection from port9999
to the server (192.168.150.150
) at port541
, and then the server send a "Client Hello" in return. The issue is, as the title says, the SSL traffic is not getting intercepted by the server. The protocol looks "switched" to me in the sense that the server sends the "Client Hello" here. Can that be the reasonsslsplit
is failing to work?sslsplit
is running on a Ubuntu 22.04 Server (5.15.0-101-generic x86-64
) with a host IP of192.168.150.1
. The server and client are running on two VMs with the IPs listed above. The physical server, the server, and the client are a part of KVM NAT network (192.168.150.0/24
). The physical server, whichsslsplit
is running on, acts like a router.The traffic redirection is done via
iptables
:iptables -t nat -A PREROUTING -p tcp --dport 541 -j REDIRECT --to-ports 10541
sslsplit
is running as follows:sslsplit -D -l connections.log -j . -M ssl_key_logfile -S log -k server.key -c server.crt -b client.key -a client.crt ssl 192.168.150.1 10541
Communication between the client and the server:
To rule out any error on my part, I have tested my
sslsplit
setup on a simple SSL server-client app. It works as expected, i.e., I am able to intercept and view SSL-encrypted traffic.The text was updated successfully, but these errors were encountered: