Commit Graph

604 Commits

Author SHA1 Message Date
Richard Poole
5c8b5e30d5 connection upgrade feature: upgrade tcp to ssl on client hello
This code looks at the beginning of each read from the src for something
that looks like an ssl client hello message; if it finds one it tries to
upgrade the connection to proxied ssl. So it works only in the simple
case where the connection has no binary data before the upgrade attempt
(so there are no false positives), and where the client hello comes at
the beginning of a packet from the source.
2015-04-18 13:34:04 +01:00
Richard Poole
aaa4e94f84 bugfix: actually parse resolv.conf at startup 2015-04-18 13:02:33 +01:00
Richard Poole
0f2714ed8a spelling fix 2015-04-18 11:51:28 +01:00
Richard Poole
1f1f7b5559 bugfix: correct calls to log_dbg_printf 2015-04-18 11:50:26 +01:00
Daniel Roethlisberger
330ea4a74c Clarify explanation of -t
Issue:		#84
2015-03-29 14:19:39 +02:00
Daniel Roethlisberger
62b4848998 Add debug mode output to list of things to provide 2015-03-26 09:39:24 +01:00
Daniel Roethlisberger
7badc2fc13 Move all test RSA keys from 1024 bit to 2048 bit
Issue:		#83
2015-03-24 20:40:15 +01:00
Daniel Roethlisberger
77109df8d2 Improve docs on autogenerated 1024 bit RSA leaf key
Issue:		#83
2015-03-24 20:33:38 +01:00
Daniel Roethlisberger
6e53e93d0f Move from sha1 to sha256 in examples and tests
Note that OpenSSL may not support -sha256 on all platforms so we
actually check for support before using it in `make test`.  For the
examples, a modern version of OpenSSL that supports -sha256 is assumed.

Issue:		#83
2015-03-24 20:33:09 +01:00
Daniel Roethlisberger
35dae31624 Rename badly named local var to avoid grep FPs
Issue:		#83
2015-03-24 20:28:40 +01:00
Daniel Roethlisberger
9b5006d6f7 Add PCFLAGS for additional pkg-config flags
Allow for additional flags to pkg-config by means of a PCFLAGS variable.
This e.g. allows to set PCFLAGS='--static' for static builds in
combination with CFLAGS='-static' and LDFLAGS='-static'.

Issue:		#82
Reported by:	@kickwindbg
2015-03-23 22:10:00 +01:00
Daniel Roethlisberger
a14354d18b Allow uid, gid and mode of installed files to be tuned
Introducing the overridable variables INSTALLUID, INSTALLGID, BINUID,
BINGID, BINMODE, MANUID, MANGID, MANMODE that allow overriding of uid,
gid and mode of installed files.  Note that this solution still has the
limitation that uid, gid and mode of created directories cannot be set.

Issue:		#81
Reported by:	Shiloh Heurich
2015-03-17 00:09:19 +01:00
Daniel Roethlisberger
7ae02fa6d0 Merge branch 'master' into develop after 0.4.11 2015-03-16 00:58:27 +01:00
Daniel Roethlisberger
22b4d3c108 SSLsplit 0.4.11 maintenance release 2015-03-16 00:24:02 +01:00
Daniel Roethlisberger
317cd8190f Reorder major bug fixes 2015-03-16 00:20:18 +01:00
Daniel Roethlisberger
c8e9f231bd Fix loading of certificate chains with OpenSSL 1.0.2
SSLsplit was directly accessing `extra_certs` within `SSL_CTX` to get to
the extra certificates chain.  When building on OpenSSL 1.0.2 or newer,
use the new API instead of directly accessing `extra_certs`.

Issue:		#79
2015-03-16 00:18:41 +01:00
Daniel Roethlisberger
580d2286b9 Record the actual XNU version detected 2015-03-16 00:13:04 +01:00
Daniel Roethlisberger
89860add8a Add XNU header selection fallback
If the proper headers matching either the reported XNU version or OS X
version exactly cannot be found, use the latest headers that SSLsplit
knows about.  This fixes build on new releases of OS X that have no
source code published by Apple yet.
2015-03-16 00:13:04 +01:00
Daniel Roethlisberger
992c90db3b Escape # in shell invocation
This fixes the following make error on Mac OS X versions that we don't
explicitly support yet due to missing sources:

    GNUmakefile:55: *** unterminated call to function `shell': missing `)'.
    Stop.

Reported by:	Justin Garrick
2015-03-16 00:13:04 +01:00
Daniel Roethlisberger
00253f34db Quote dollar signs in shell invocation
Reported by:	Justin Garrick
2015-03-16 00:13:04 +01:00
Daniel Roethlisberger
d5e9d989d6 Remove make config from travis script 2015-03-15 23:00:25 +01:00
Daniel Roethlisberger
80b727054b Refactor proxyspec printing into proxyspec_str() 2015-03-15 22:55:34 +01:00
Daniel Roethlisberger
da47cd3fe1 Improve documentation of build process 2015-03-15 22:38:29 +01:00
Daniel Roethlisberger
e384d89b35 Replace percent in IPv6 addrs in filenames
Percent is used to specify the interface for link-local addresses.
Even though this is not strictly necessary for NTFS, it makes sense to
replace percent with underscore as well to have cleaner filenames.

Also add some unit tests for sys_ip46str_sanitize() that actually test
the intended behaviour.
2015-03-15 20:08:11 +01:00
Daniel Roethlisberger
0a67f845e6 Merge branch 'issue/74' into develop
Issue:		#74
Submitted by:	Adam Jacob Muller
2015-03-15 18:43:13 +01:00
Daniel Roethlisberger
568b5a681c Update documentation for new -F formats 2015-03-15 18:41:49 +01:00
Daniel Roethlisberger
ce002378b8 Use more intuitive letters for new format specs
%D for Destination host, %p for the (more interesting) destination port,
%S for Source host, %q for the (less interesting) source port.
2015-03-15 18:39:36 +01:00
Daniel Roethlisberger
e17108f9b7 Merge branch 'master' of https://github.com/AdamJacobMuller/sslsplit into issue/74 2015-03-15 18:28:10 +01:00
Daniel Roethlisberger
01d10b192a IPv6 addrs in filenames use underscore not colon
Use underscore instead of colon for all IPv6 addresses in generated
filenames in order to generate NTFS clean filenames.

Issue:		#69
2015-03-15 17:52:04 +01:00
Daniel Roethlisberger
914360eb5e Separate host and port into separate strings
Store host and port in separate strings internally and get rid of the
[host]:port representation where separate host and port would be
cleaner.  This includes the following user-visible changes:

-   Generated filenames that contain host and port, such as by -S and
    -F %d and %s, now use a host,port format instead of [host]:port.

-   Connect log now uses separate fields for host and port.

Issue:		#69 #74
Reported by:	Adam Jacob Muller
2015-03-15 17:23:46 +01:00
Daniel Roethlisberger
a027fb68cd Fix loading of certificate chains with OpenSSL 1.0.2
SSLsplit was directly accessing `extra_certs` within `SSL_CTX` to get to
the extra certificates chain.  When building on OpenSSL 1.0.2 or newer,
use the new API instead of directly accessing `extra_certs`.

Issue:		#79
2015-03-15 00:09:36 +01:00
Daniel Roethlisberger
3231c9c031 Record the actual XNU version detected 2015-03-02 23:13:48 +01:00
Daniel Roethlisberger
22abde706b Initialize af and addr even though not strictly necessary
The state machine makes sure that both af and addr are written to before
they are being read.  However, to silence compiler warnings, it does not
hurt to explicitly initialize af and addr anyway.  This gets rid of the
following spurious compiler warnings:

    opts.c: In function 'proxyspec_parse':
    opts.c:380:8: warning: 'af' may be used uninitialized in this function [-Wmaybe-uninitialized]
         af = sys_sockaddr_parse(&spec->connect_addr,
            ^
    opts.c:316:8: warning: 'addr' may be used uninitialized in this function [-Wmaybe-uninitialized]
         af = sys_sockaddr_parse(&spec->listen_addr,
            ^

Reported by:	Thomas Klausner
Issue:		#78
2015-03-02 10:23:48 +01:00
Daniel Roethlisberger
0ebfcc9491 Merge branch 'issue/76' into develop 2015-02-24 20:57:14 +01:00
Daniel Roethlisberger
62cd0b8af6 Update list of contributors 2015-02-24 20:56:27 +01:00
Daniel Roethlisberger
6a78aeed2d Minor rewording 2015-02-24 20:52:12 +01:00
Daniel Roethlisberger
692dccfeae Merge branch 'clarify-linux-REDIRECT' of https://github.com/fd0/sslsplit into issue/76 2015-02-24 20:43:02 +01:00
Daniel Roethlisberger
20ea783cf7 Add XNU header selection fallback
If the proper headers matching either the reported XNU version or OS X
version exactly cannot be found, use the latest headers that SSLsplit
knows about.  This fixes build on new releases of OS X that have no
source code published by Apple yet.
2015-02-24 19:24:12 +01:00
Daniel Roethlisberger
91da4674e5 Update copyright, license and tagline
-   Update copyright to 2015
-   Remove the non-standard "unmodified" from the 2-clause BSD license
-   Remove scalable from the tagline to avoid misinterpretations
2015-02-24 19:19:20 +01:00
Alexander Neumann
925209ef4f Add hints for using Linux iptables REDIRECT target 2015-02-22 17:47:41 +01:00
Adam Jacob Muller
9267cf9bb4 add support for:
%f - dest address
%h - dest port
%t - source address
%v - source port

format specifiers to pathspec
2015-02-08 20:20:02 -05:00
Daniel Roethlisberger
bb071336e0 Escape # in shell invocation
This fixes the following make error on Mac OS X versions that we don't
explicitly support yet due to missing sources:

    GNUmakefile:55: *** unterminated call to function `shell': missing `)'.
    Stop.

Reported by:	Justin Garrick
2015-01-17 18:24:58 +01:00
Daniel Roethlisberger
c9aa840214 Quote dollar signs in shell invocation
Reported by:	Justin Garrick
2015-01-14 22:45:59 +01:00
Daniel Roethlisberger
b8d8af7b29 Document the limitations of passthrough mode (-P) 2015-01-04 14:21:49 +01:00
Daniel Roethlisberger
4f0a019d5a Mention TravisCI and be explicit about branching 2014-12-14 15:16:53 +01:00
Daniel Roethlisberger
f16783cee2 Move cert writer to logger thread using privsep
Make -w and -W work in conjunction with dropping privileges and
chrooting by moving the cert writer code to a separate logger thread and
using the privsep framework to open the files if they do not exist
already.

Issue:		#70
2014-12-13 23:52:17 +01:00
Daniel Roethlisberger
3662eeae50 Update documentation 2014-12-13 03:23:32 +01:00
Daniel Roethlisberger
27cf6c90e7 Merge branch 'feature/genstore' into develop 2014-12-13 03:20:38 +01:00
Daniel Roethlisberger
3da7407f14 Use same hash algo in RSA sigs as orig cert uses 2014-12-13 03:18:13 +01:00
Daniel Roethlisberger
6ec6c56ded Refactored -w/-W and improved docs 2014-12-13 02:36:45 +01:00