Commit Graph

81 Commits

Author SHA1 Message Date
Soner Tari
30ed5b4200 Release v0.9.4 2022-12-26 14:44:45 +13:00
Soner Tari
e456f56001 Release v0.9.3 2022-05-02 22:40:39 +03:00
Soner Tari
923bea195a Fix unit tests with libressl 3.4.1 2021-11-14 23:22:53 +03:00
Soner Tari
c90f71f5ef Bump version to 0.9.2 2021-11-13 11:49:50 +03:00
Soner Tari
eba4eb3ea6 Fix syntax documentation for Log actions in struct filtering rules
And clean up
2021-11-13 10:57:16 +03:00
Soner Tari
e05dd2b884 Update release date 2021-11-07 23:12:56 +03:00
Soner Tari
9708225bb1 Rename LogAction to Log 2021-11-01 20:48:24 +03:00
Soner Tari
8f63ec7f82 Add ReconnectSSL option to enforce SSL options in struct filtering rules
The ReconnectSSL option allows rule developers to write struct filtering
rules using SNI and CN SSL specifications to override the SSL
configuration of a connection.

Otherwise, without this new option, filtering rules cannot change SSL
options using SSL filtering fields to match connections (the SSL config
in the rule would not have any effect on the server side of the matching
connection). Without ReconnectSSL, only DstIP and DstPort fields can be
used to override the SSL config of a connection.

If the ReconnectSSL option in a struct filtering rule is set, we
disconnect and free the server side of the matching SSL connection, and
reconnect it with the SSL options in the matching struct filtering rule.
This enforces the SSL config in the rule.

Do not use the ReconnectSSL option if server disconnect is not desirable
or acceptable in your case.
2021-10-30 16:27:13 +03:00
Soner Tari
98d9a05eac Add documentation for structured filtering rules 2021-10-29 22:49:18 +03:00
Soner Tari
07c3f08584 Release v0.9.0 2021-10-21 14:10:19 +03:00
Soner Tari
efc9f3175d Update version to 0.9.0 2021-10-16 20:49:53 +03:00
Soner Tari
64640d7574 Fix build with LibreSSL 3.4.1 on OpenBSD 7.0 2021-10-14 23:34:53 +03:00
Soner Tari
42d84629f3 Add support for inline comments with #
Just trim the char # onwards from the start of value. So values cannot
have the char # in them.
2021-10-11 19:27:01 +03:00
Soner Tari
f056f699c1 Add port option to all site specs, fix precedences in filtering rules
Now, all of the 'to' site fields in filtering rules can specify a port,
not just the dstip sites.

Fix the precedence of sites in the same type of rules. For example, if
we find a match with an sni site, we should not stop searching for a
match in cn, because a matching cn site may have a higher precedence
than the matching sni site. We should apply the action of the cn site,
although sni rules have precedence over cn. The same applies to http
host and uri rules too.

Fix the precedence of dstip rules.

Improve and update unit and e2e tests accordingly.
2021-10-07 22:22:23 +03:00
Soner Tari
9d2e523cd0 Use Aho-Corasick machines for substring matching
Now, the filter uses B-trees for exact string matching and Aho-Corasick
machines for substring matching. B-trees and AC machines are exported to
linked lists for debug logging only.

Also,
- Separate all_sites and all_ports filters from substring filters. They
are not related with substring filters actually, and ACM keywords cannot
be empty strings anyway. So now they should be handled separately too.
- Improve debug logging of filtering rules.
- Update unit tests accordingly, and improve.
- Fix pxyconn_filter(), keep searching for a match in substring filters
if exact match does not have a matching site rule.
- Increase common names max len and tokens. weather.gov has 73 tokens.
- Rename keyword to desc.
- Update documentation.
- Clean up.
2021-10-05 23:00:17 +03:00
Soner Tari
e654ca4e2c Fix memory leaks in filter
Add attributes
Update documentation
2021-10-03 13:08:27 +03:00
Soner Tari
15991dfb93 Use kbtree BST for exact match in user, keyword, and ip 'from' fields
So, now we use two separate data structures: binary search trees (BST)
for exact match and linked lists for substring match.

Currently, only user, keyword, and ip 'from' fields in filtering rules
use these two data structures. This also means that now we support exact
and substring matches in 'from' fields.

Filtering rules should be written with exact matches instead of
substring matches, as much as possible. Because BST search must be much
faster than substring search over linked lists.

We have modifed kbtree to support complex data structures in from
fields.
2021-10-02 12:20:28 +03:00
Soner Tari
c8f09d162a Add port field to Dst Host filter rules, and refactor for code reuse
Now the target IP address filters can use port specs too.
Refactor for code reuse, create filter_action struct used by rules,
sites, and ports.
Also, improve code and documentation.
2021-09-26 13:50:14 +03:00
Soner Tari
c38c065923 Add Include option for loading configuration from an include file 2021-09-21 19:20:43 +03:00
Soner Tari
0f5ed122fb Add Define option for macro definitions and macro expansion to filtering rules
The new Define option can be used for defining macros to be used in
filtering rules. Macro names must begin with a '$' char. Macro values
must be separated with spaces.

Macros are expanded by rewriting the rule with the values of macro.

PassSite rules do not support macros (the PassSite option will be
deprecated in favor of filtering rules in the future).
2021-09-20 00:58:00 +03:00
Soner Tari
11884271fd Add negation prefix ! to log actions
Now filtering rules can disable log actions too. This is possible thanks
to the newly added precedence field of rules. Log actions of filtering
rules at higher precedence can modify logging now. In other words, more
specific rules can change the log actions of more general rules.
HTTP filtering rules can only disable logging.
2021-09-18 18:18:30 +03:00
Soner Tari
0c9fe83bb5 Update unit tests with master and cert log actions 2021-09-18 01:01:47 +03:00
Soner Tari
8a57d52f62 Add master and cert log actions
Also, improve documentation
2021-09-17 20:08:04 +03:00
Soner Tari
f0c2ca6819 Add Match action and connect|content|pcap|mirror log actions in filtering rules
- Match action is added to be used with log actions only, the other
filter actions can specify log actions too
- Log actions do not configure any loggers. Global loggers for
respective log actions should have been configured for those log actions
to have any effect.
- If no filter rules are defined for a proxyspec, all log actions are
enabled. Otherwise, all log actions are disabled, and filtering rules
should enable them specifically.
- Fix max number of tokens in proxyspec and filter parsers
- Fix issues with rejecting unknown args in filter rule parser
- Do not use filter_rules field of proxyspec after config finished, it
is used for filter configuration and freed afterwards
2021-09-16 21:34:23 +03:00
Soner Tari
69753b250c Add split mode of operation similar to SSLsplit
The -n command line option enables split mode for all proxyspecs,
effectively making sslproxy behave like sslsplit.
Divert option can be set/unset globally and per-proxyspec.
Add e2e tests for split mode, and update make file for tests
accordingly.
Update documentation accordingly.
Improve code reuse, remove duplicate functions.

This change deserves a release of its own, hence v0.8.4.
2021-08-29 17:31:05 +03:00
Soner Tari
596aebb2f3 Update version to 0.8.3 and copyright year to 2021 2021-02-11 00:25:09 +03:00
Soner Tari
aded848043 Release v0.8.2 2020-12-15 17:12:50 +03:00
Soner Tari
6c0b981831 Update version to 0.8.1
Update TLS 1.3 documentation.
2020-09-08 14:33:25 +03:00
Soner Tari
9da7437919 Release v0.8.0 2020-05-24 00:22:23 +03:00
Soner Tari
826b612c1e Fix build version
Improve documentation
2020-05-21 16:22:32 +03:00
Soner Tari
59ce88b1ac Move tmp proxyspec vars to new tmp struct
These vars are used while configuring proxyspecs, and freed right after
they are used. So they should not be in proxyspec struct.
Refactor accordingly.
2020-05-14 00:14:40 +03:00
Soner Tari
ac4285cef1 Fix POP3 and SMTP protocol validation, thanks to the new testproxy e2e tests
Add testproxy e2e tests for POP3 and SMTP protocol validation.

We have detected that POP3 and SMTP protocol validation was broken
thanks to these new testproxy e2e tests. This is yet another example why
e2e tests are important.
2020-05-11 17:01:38 +03:00
Soner Tari
f3ac5ee4f2 Move passsite flag to sslctx
The passsite flag is ssl specific.
2020-05-10 21:53:24 +03:00
Soner Tari
f8580d6ac7 Update news
This is the first SSLproxy specific changelog.
2020-05-09 22:16:44 +03:00
Soner Tari
009fe9f6ad Merge sslsplit develop changes 2019-08-08 12:23:04 +03:00
Soner Tari
0d5af14325 Improve exit status handling, merged from sslsplit 2019-08-03 15:31:40 +03:00
Soner Tari
52d37297b6 Update with sslsplit develop changes, especially content logging
Change SIGHUP to behave like SIGUSR1
2018-11-03 18:23:31 +03:00
Soner Tari
d2e9ab4487 Merge sslsplit-develop changes 2018-09-15 02:51:26 +03:00
Soner Tari
0c8348db75 Merge sslsplit develop changes 2018-08-03 23:36:51 +03:00
Soner Tari
27650fab69 Support all command line options in the conf file as well
Update with the latest sslsplit-devel changes
2018-05-09 20:05:29 +03:00
Soner Tari
027b6e3a95 Update with sslsplit develop changes 2018-03-26 18:14:54 +03:00
Soner Tari
9d435e180c Update with SSLsplit 0.5.2 and develop branch changes as of 270218 2018-02-27 22:20:58 +03:00
Soner Tari
4c8831bd90 Update with SSLsplit 0.5.1 changes, fix LibreSSL version issues
Add VerifyPeer and AllowWrongHost options
2018-01-18 03:18:53 +03:00
Soner Tari
67ddee1585 Import sslsplit-devel changes
Add stats logs, initial
Add SSLproxy_SrcAddr header field
Clean-up
2017-07-25 16:07:39 +03:00
Daniel Roethlisberger
7677fe0655 SSLsplit 0.5.0 release 2016-03-27 15:46:35 +02:00
Daniel Roethlisberger
0dbb2aee8f Add autossl to NEWS 2016-03-27 15:07:34 +02:00
Daniel Roethlisberger
2f834419eb Handle inbound EOF before outbound CONNECTED
Fix segmentation fault upon receiving BEV_EVENT_EOF on the inbound
bufferevent while the outbound bufferevent has not received
BEV_EVENT_CONNECTED yet.

Issue:		#124
Patch by:	Eun Soo Park
2016-03-27 12:16:57 +02:00
Daniel Roethlisberger
76cb576ab9 Update NEWS 2016-03-25 16:33:42 +01:00
Daniel Roethlisberger
b3a3c36b70 Fix the SSL session timeout calculation
Issue:		#115
Reported by:	Eun Soo Park
2016-03-15 19:45:58 +01:00
Daniel Roethlisberger
73324dcd7b Update NEWS.md 2016-03-15 19:27:46 +01:00