Skip to content
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

TLS not working due to certificate expiration date checks. #7

Open
epilys opened this issue Aug 31, 2023 · 6 comments
Open

TLS not working due to certificate expiration date checks. #7

epilys opened this issue Aug 31, 2023 · 6 comments

Comments

@epilys
Copy link

epilys commented Aug 31, 2023

I haven't seen how the dynamic linking injection works in sdate, but it can be solved if the tls lib is added at the end of LD_PRELOAD. If the tls functions are static though, then there's nothing that can be done.

@epilys
Copy link
Author

epilys commented Aug 31, 2023

With certificate exp-check turned off, here's a screenshot of meli with sdate:

image

@df7cb
Copy link
Owner

df7cb commented Aug 31, 2023

Hi,
is there anything I should do on the sdate side?

@epilys
Copy link
Author

epilys commented Aug 31, 2023

Yes if you want to, there are some hacky workarounds but no catch-all solution.

it can be solved if the tls lib is added at the end of LD_PRELOAD.

Basically all libs defined in LD_PRELOAD are linked from right to left:

Objects are searched for and
added to the link map in the left-to-right order specified
in the list.
ld.so(8)

So if you test that a binary links to a library e.g. libssl or libgnutls.so (ldd "${binary}" | grep ...) it can append it at the end of LD_PRELOAD value. The TLS/SSL libraries will be linked first, getting the canonical time functions from libc.

@epilys
Copy link
Author

epilys commented Aug 31, 2023

Also I guess you can add the screenshot to "Programs compatible with sdate" in the website :)

@df7cb
Copy link
Owner

df7cb commented Sep 1, 2023

TBH I didn't even get what the problem is. What did you do exactly, how do I reproduce?

@epilys
Copy link
Author

epilys commented Sep 1, 2023

TLS libraries check that remote certificates have not expired. Since the dates are tampered with, they will not see valid certificates (i.e certificates that have expiration date in the future)

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

No branches or pull requests

2 participants