]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blob - README
README: Add KNOWN ISSUES with a minor Firefox problem.
[tlsproxy/tlsproxy.git] / README
1 README
2 ======
3
4 tlsproxy is a TLS proxy for HTTPS which intercepts the connections and ensures
5 the server certificate doesn't change. Normally this isn't detected if a
6 trusted CA for the new server certificate is installed.
7
8 tlsproxy is licensed under GPL 3 (or later).
9
10
11 REQUIREMENTS
12 ------------
13
14 - GnuTLS library including development headers
15 - certtool (from by GnuTLS) to create TLS certificates
16
17
18 USAGE
19 -----
20
21 To use tlsproxy you must first run `tlsproxy-setup` in an (empty) directory.
22 This creates the following files:
23
24 - `proxy-ca.pem`:      CA which is used for all connections to the client
25 - `proxy-ca-key.pem`:  private key for the CA
26 - `proxy-key.pem`:     private key for the server
27 - `proxy-invalid.pem`: special certificate used for invalid pages
28
29 Then import the CA file `proxy-ca.pem` in your browser so it can validate the
30 pages sent by the proxy.
31
32 For each page you want to visit securely you must first obtain its server
33 certificate (in PEM format) (for example with `gnutls-cli --print-cert server`
34 - you need the first certificate). The next step is to _validate_ it. The
35 proxy doesn't perform any validation thus it's important that you make sure
36 the server certificate is the correct one!
37
38 Then run `tlsproxy-add hostname path-to-certificate` in the same directory as
39 above. This creates the following files:
40
41 - `certificate-example.org-proxy.pem`: certificate used by the proxy for the
42   connection to the client
43 - `certificate-example.org-server.pem`: original server certificate, used to
44   check if the current server certificate changed
45
46 If the validation is successful the proxy uses the `certificate-*-proxy.pem`
47 certificate to secure the connection to the client (signed by `proxy-ca.pem`).
48
49 If an error occurs in the validation (missing `certificate-*.pem` files,
50 fingerprint changed, etc.) it's logged by the proxy (stdout) and the special
51 `proxy-invalid.pem` certificate is used to send a 500 error message to the
52 client. The connection to the server is closed so there's no chance that any
53 client data is sent to the (possible) evil server. The invalide certificate is
54 also easy to spot in the browser because it uses an invalid hostname
55 ("invalid") and is self-signed.
56
57 If an internal error occurs before the TLS connection can be established a 503
58 Forwarding failure is sent to the client (unencrypted).
59
60
61 -u option
62 ~~~~~~~~~
63
64 The '-u' option passes through connections for hostnames with no stored
65 certificate (i.e. `certificate-*-server.pem` is missing or unreadable). In
66 this case the normal CA chain in your browser lets you validate the server
67 certificate. If the server certificate changes you're _not_ informed!
68
69 This option is useful if you often visit websites using HTTPS but you don't
70 use critical information (e.g. no passwords, etc.) on this website.
71
72 For hostnames with a stored server certificate everything works as usual and a
73 certificate change is detected.
74
75 WARNING: The option might cause security problems if you're not careful:
76
77 For example you normally visit https://example.org/ and store the server
78 certificate in `certificate-example.org.server.pem`. Without '-u' everything
79 is fine.
80
81 But if you use '-u' and an attacker redirects you to e.g.
82 https://www.example.org/ (or https://whatever.org/) (for example through a
83 link on a different site) then the proxy just forwards the TLS connection
84 (because it doesn't know the fingerprint for https://www.example.org/, that's
85 how '-u' works) and you won't be aware that a different server certificate
86 might be used!
87
88 If you always verify the authentication of the connection this isn't a
89 problem, but if you only check if it's a HTTPS connection then this attack is
90 possible.
91
92
93 KNOWN ISSUES
94 ------------
95
96 - Firefox (at least Iceweasel 3.5.16 on Debian) fails to load the error page
97   sent with the "invalid" certificate once the certificate has been accepted.
98   As the user shouldn't accept the invalid certificate this is a minor issue.