libera/#maemo/ Monday, 2018-10-29

MaxdamantusOkay, so luckily that certificate expired at Apr 24 14:09:34 2009.06:16
Maxdamantusbut if maemo has a clock set to a time before that, any SSL connection could be intercepted.06:17
MaxdamantusPresumably it's unused, unless there's something else in maemo that doesn't check the issuer expiry.06:18
MaxdamantusAh, actually, it's not used by microb. I guess it just tests the expiry time before checking that a certificate is in the store (since I was getting an "expired" error before setting my clock back)06:20
MaxdamantusDamn, turns out Opera Mobile doesn't use SNI.11:23
MaxdamantusI thought I saw the host it was connecting to before.11:23
Maxdamantusmicrob uses it though.11:24
bencohSNI support sounds quite mandatory to me nowadays ...11:24
MaxdamantusAnyway, this is what I've made so far: https://gist.github.com/Maxdamantus/e32ab94dbc5d9d43298428400020620e11:25
bencohMaxdamantus: silly question, but why not use one of the already available small-footprint proxies?11:25
Maxdamantusbencoh: such as?11:25
bencohtinyproxy or polipo11:26
Maxdamantustinyproxy is an HTTP proxy11:26
MaxdamantusNothing to do with SSL11:26
bencoh(tinyproxy might not have proper support for ssl, I don't quite remember)11:26
* Maxdamantus looks at polipo11:26
MaxdamantusAgain sounds like an HTTP proxy.11:26
bencohTinyproxy is a light-weight HTTP/HTTPS proxy daemon11:26
MaxdamantusThat's a fairly misleading description.11:27
KotCzarnyyou can have https proxy without any ssl11:27
KotCzarnyjust copy data as is11:27
KotCzarnyi do it in my own proxy11:27
KotCzarnyyou need a proxy that does ssl management if you want to interact in any way11:27
Wizzupa thread for every socket?11:28
MaxdamantusYes, that's the intention of my program above.11:28
MaxdamantusWizzup: for now, yes.11:28
Wizzupwell, looks lke you're having fun :)11:28
MaxdamantusI don't expect to be maintaining a large number of connections.11:28
bencohyou might be right about tinyproxy11:28
WizzupI'd personally do it in go - since it links statically with the latest tls support and does all of this multiplexing easily, but I guess there's no point to suggesting it :P11:28
Maxdamantusalso note that the program above is agnostic about a particular protocol.11:29
Wizzupsure, just tls + sni11:29
bencohpolipo caches content, so it probably handles ssl properly, though11:29
bencohMaxdamantus: you can't really be protocol-agnostic when it comes to starttls11:29
bencohand you'll eventually have to handle that as well11:29
bencoh(same goes for SNI, actually)11:30
Maxdamantusbencoh: well, it assumes that the entire socket is encapsulated in TLS.11:30
Maxdamantusotherwise it's protocol agnostic.11:30
Maxdamantus(though atm it doesn't forward ALPN)11:30
Maxdamantusalso regarding proxying, opera mobile doesn't seem to have the option to use a proxy.11:31
Maxdamantusand I'm guessing if microb/firefox has that option, it will still want to use SSL over the proxy.11:31
Wizzupwhat if you set the env variables?11:31
KotCzarnyin the worst case you have iptables11:32
Maxdamantus(ie, it'd rely on something like `CONNECT google.com:443`)11:32
WizzupMaxdamantus: yes, indeed, it will do it's own tls over the proxy.11:32
MaxdamantusWizzup: right, in which case polipo won't help, unless polipo actually does the funky TLS stuff that my program does.11:32
WizzupMaxdamantus: but you can intercept it11:32
Wizzupyes11:32
Maxdamantus(funky stuff = generating/signing certificates on the fly)11:32
Wizzupwhy do you need to do that, though?11:33
Wizzupif you have your own CA, you can just install a wildcard cert, no?11:33
MaxdamantusBecause if the browser makes a request to "google.com", the certificate used needs to have CN=google.com11:33
Wizzup(plus, generating keys + certs takes a -long- time)11:33
WizzupMaxdamantus: wildcard should work?11:33
MaxdamantusTLD wildcards are illegal.11:34
Wizzuphow do you think mitm proxies work?11:34
Maxdamantusie, *.com and * are illegal.11:34
MaxdamantusWizzup: they have to do what I do.11:34
Wizzupreally?11:34
Wizzupmhm11:34
MaxdamantusWizzup: that's almost certainly what "mitmproxy" does.11:34
Wizzupwell, I guess you can re-use the same key11:34
Wizzupthen it doesn't take long11:34
Maxdamantus(mitmproxy being some debugging utility written in Python, seems unsuitable for running locally on N900)11:34
MaxdamantusYes, I use the same key.11:34
Maxdamantusbut have to generate different certificates.11:35
Wizzupmaybe I'll do it in go for fun some time11:35
MaxdamantusThe "CAKEY.pem" passed in to my program is meant to be the key for the CA certificate, and it also uses that same key for all generated certificates.11:36
MaxdamantusIt could theoretically take in a second key for the latter, but that seems unnecessary.11:37
KotCzarnygenerating certs is not a big problem if you just need it for few frequent sites11:37
Wizzupyou could use transparent socks proxy if n900 supports it11:37
Wizzup(with iptables)11:37
Maxdamantusand when/if I get it working properly, I'd rather just keep the key in memory instead of storing it on the filesystem, so don't want to generate too many keys on boot.11:37
WizzupMaxdamantus: just generate a new intermediate?11:38
MaxdamantusWizzup: there's no intermediate.11:38
Wizzupthen generate one ;)11:38
MaxdamantusHow does an intermediate help?11:38
Wizzupif you want to keep the keys in memory...11:38
Wizzupeh, whatever :)11:39
MaxdamantusThe intermediate would need to be signed by the trusted certificate's key.11:39
siceloopera mobile *can* use a proxy. it's in about:opera, or some such11:39
siceloopera:config11:40
MaxdamantusOh, cool.11:40
MaxdamantusOkay, guess I'll adapt it to use that tomorrow.11:41
MaxdamantusThat should solve the lacking SNI issue too.11:41
Maxdamantussince whatever it sends to the proxy should have the hostname.11:41
Maxdamantusand yeah, that treats the proxy as an HTTP proxy and just uses "CONNECT github.com:443 HTTP/1.111:44
Maxdamantus"11:44
Maxdamantuseh, spaces.11:44
bencohhmm, mitmproxy looks pretty handy for android app REing11:47
Maxdamantusalso simplifies getting the browser to actually connect to the proxy.11:53
Maxdamantuswas intending on adding netfilter rules that did something like forward all :443 traffic to the proxy, unless the source is some particular address, which the proxy would bind to for outgoing connections.11:54
Maxdamantusbtw, https://github.com/kr/mitm might already be a sufficient Go implementation.11:58
MaxdamantusHave to be careful with all these things though, given how explicit you have to be in OpenSSL to actually get validation to work.12:01
Maxdamantuseg, checking that the certificate is valid and checking that the CN in the certificate matches what you're connecting to are different things.12:03
Maxdamantuseven though the hostname is specified in two places already (`BIO_set_conn_hostname` (for DNS lookup) and `SSL_set_tlsextl_host_name` (SNI))12:05
DocScrutinizer05BYEBYE Merkel15:59
DocScrutinizer05hurry up a bit! don't forget to take you rocks with you15:59
KotCzarnydont worry, refugees are there to stay16:00
DocScrutinizer05I don't care too much about any refugees16:01
KotCzarnywell, not refugees, hostile tools of national identity disintegration16:01
KotCzarnyalso, 2021? is that a joke?16:10
KotCzarny2 more years of the fun16:13
DocScrutinizer05alas you got a few points there16:29
* DocScrutinizer05 is tempted to run the streets shouting "HURRY UP! GET LOST!"16:30
DocScrutinizer05"I WONT SURVIVE ANOTHER 2 YEARS OF THAT NARCOTIC"16:30
DocScrutinizer05there's hope she can't pull off the chancellorship 2 years as lame duck16:34
halftuxdoes somebody know where I could find these automated generated maemo diff files to debian source packages?20:51
sicelowhich ones?20:52
halftuxlibsoup2.420:55
halftuxfrom original maemo source20:56
halftuxthere was an url were you could generate diff files from debian to maemo but I forget20:57
sicelono idea. :-/21:12
DocScrutinizer05halftux, sicelo: it's dead since ages23:16

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!