---
I have touched on this issue in the sidelines of:
I would like to be able to decrypt SSL traffic when I download mail from the mail hub of my provider or hoster (or if some day I learn to host my own mail server for me, that day not expected soonSSL Decode & My Hard-Earned Advice for SPDY/HTTP2 in Firefox wrote:... the area is huge: mailing, Dillo (with some not completely implemented TLS), Lynx ...
There is surely also Dillo's traffic to decrypt (newbies, see http://www.dillo.org), and also when I connect to either my hoster, or github.com, or Devuan's Gitlab, or anywhere else, because I don't want SSL to preclude seeing anything to me. Not to me
But I'd like to stay now only with one small portion of what is almost completely opaque in my own box and my ways on the internet to me, when the presentation/application layer of the [O]pen [S]ystems nterconnection model, is encrypted with SSL, and that is I'd like to stay now only with:
my fetching of mail with getmail and how to decrypt it.
Regarding this page below, it took me a while to figure out that it was not really much related to my issue at all:
Follow SSL stream using Master-key and Session-ID
https://ask.wireshark.org/questions/422 ... session-id
Even though there is the string "mail" in this time-frozen howto (of historical --year 2011-- interest: that was the first time the Mozilla [N]etwork [S]ecurity [S]ervices library was put to marvelous use, for Wireshark, to the benefit of an ever-increasing-to-be-thereafter number of SSL-decrypting users.
I have only recently, and after having longed and asked[*] for that secret lore for years, finally joined those users in possession of what most of us thought forever obsured for us, and I told the world about it in that Gentoo topic linked at the start of this post.
But, I was saying, even though there is the string "mail" in that time-frozen breakground howto, it is about https, the SSL over HTTP, and it is not about either imaps, the SSL over IMAP, nor is it about pop3s, the SSL over POP3, the two being the most used among the mail protocols in todays world.
And I use both imaps and pop3s to fetch my mail, from two different accounts, respectively. And none of the two is, as of yet, decryptable to me.
My mentioning of that historical page that testifies to the breakthrough in SSL decryption, may (and it may not) show to be pertinent for imaps/pop3s decryption.
It may be so, because my attempts at openssl connectiong to my current hoster's mail bub:
Code: Select all
# openssl s_client -connect pop.t-com.hr:995
Code: Select all
# openssl s_client -connect lin16.mojsite.com:993
Code: Select all
# openssl s_client -connect mail.google.com:443 -ssl3
But the above way may not be really pertinent to solving this decryption issue, because it appears to me that my getmail commands (which consist of using a typical configuration for the respective servers; will probably post them on getmail mailing list when I ask for help there, and then give link here), that I issued first, and in another terminal, worked completely separately, probably in a completely different session each, than the respective openssl commands above, because...
[Because] the captured two separate sets of Session-ID and Master-Key, after I put them in my $SSLKEYLOGFILE that Wireshark uses for decrypytion (newbies see: https://wiki.wireshark.org/SSL), didn't get the two respective getmail's sessions decryted at all for me, after I opened the network capture containing those events (and the network I capture with my uncenz, as on https://github.com/uncenz ).
And this attempt at decryption of getmail's imaps/pop3s fetching of mail has after that got even more complex!
Since the whole of this story is, with all of this so far recounted to the kind reader, already pretty complex, allow me to post the next part of the even greater complexity that just made my own tries even more difficult, in the next post.
Also because some of the users will not need to deal with this additional complexity that I will have to deal with to solve this issue. Those users that don't have grsec-hardened kernel will not need that next post.
I however, don't use kernels that are not grsec-hardened, and so, I have to solve the complexity that aggravates this story for me, first.
---
[*] Yes I have asked about how to decrypt the SSL traffic in various places in these years on Gentoo Forums! However, apart from rare advanced users/developers, few people knew the news/the knowhow, at the time of my asking. See:
or:Postfix smtp/TLS, Bkp/Cloning Mthd, Censorship/Intrusion wrote:... when am I going to learn to decrypt and read the encrypted conversations that those surveillors do on my computer when I'm online? ...
[**] The twin command that I actually issued captures automatically the STDOUT for me in a timestamped file:Air-Gapped Gentoo Install, Tentative wrote: ... It takes an expert to decrypt what data, or what ploy, or what ever-else, the Schmoog did in these some half a minute that I tried to connect to DuckDuckgo.com ...
Code: Select all
# read FAKE; openssl s_client -connect lin16.mojsite.com:993 |& tee openssl_s_client-connect_lin16.mojsite.com_$(date +%y%m%d_%H%M%S) ; read FAKE; openssl s_client -connect pop.t-com.hr:995 |& tee pop.t-com.hr_$(date +%y%m%d_%H%M%S); read FAKE;
openssl_s_client-connect_lin16.mojsite.com_160131_214845:
Code: Select all
...
Session-ID: 46AD456B08AB1071DE058572C4CF8A0769FDE5C3E29F70704E2F2215E36CE6FE
...
Session-ID-ctx:
Master-Key: 09EDE667DAA18CB55C0B26BF4CE10DA864661B6BFC5C2486D41F0A4BC769FDCFC26567B143E04939FAF497EC36FFD9AB
...
openssl_s_client-connect_pop.t-com.hr_160131_215000:
Code: Select all
Session-ID: E0945C0ECEA7FB8AEE82738F8CA131CC5EF8FB1F1537672FCC2E348BE9CA5C5D
...
Master-Key: 1D432753541E1A5DC0707C2BBED399F1DB1986D6A0CA648AE6A4E2380B59CA126AE62A8CD0F11E695343D414EC219097
The lines are, in this case:
CLIENT_RANDOM <the-Session-ID> <the-Master-Key>
.
But, as I already stated, those appear to me to be two completely different sessions that do not help decrypting the two respective getmail sessions. BTW, I keep, and if need be will be able to post more complete content of those two files, later.
