Commit graph

1799 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
85a3d7e8d8
pop-ups: removed pid field from main view
Moved to the detailed view.
2023-09-30 21:06:34 +02:00
Gustavo Iñiguez Goia
c8a17d6e8a
fixed monitor methods initialization
When using proc as monitor method, the ProcsEventsMonitor was not
being initialized.
2023-09-30 20:49:42 +02:00
Gustavo Iñiguez Goia
0556dc1c81
obtain process's parent hierarchy, checksums improvements
- Obtain the process's parent hierarchy.
 - Display the hierarchy on the pop-ups and the process dialog.
 - [pop-ups] Added a Detailed view with all the metadata of the
   process.
 - [cache-events] Improved the cache of processes.
 - [ruleseditor] Fixed enabling md5 checksum widget.

Related: #413, #406
2023-09-30 18:31:19 +02:00
Gustavo Iñiguez Goia
7a04a53eb1
display checksums on the process dialog
Display the checksums on the process details dialog.
Improved process' icon discovery.
2023-09-23 12:26:21 +02:00
Gustavo Iñiguez Goia
81a964bf83
updated rules tests 2023-09-22 01:21:27 +02:00
Gustavo Iñiguez Goia
1176fa5b9c
updated go.mod
Bumped gopacket and netlink versions.
2023-09-22 01:05:20 +02:00
Gustavo Iñiguez Goia
7a9bb17829
allow to filter connections by process checksum
Now you can create rules to filter processes by checksum. Only md5 is
available at the moment.

There's a global configuration option that you can use to enable or
disable this feature, from the config file or from the Preferences
dialog.

As part of this feature there have been more changes:

   - New proc monitor method (PROCESS CONNECTOR) that listens for
     exec/exit events from the kernel.
     This feature depends on CONFIG_PROC_EVENTS kernel option.

   - Only one cache of active processes for ebpf and proc monitor
     methods.

More info and details: #413.
2023-09-22 00:36:26 +02:00
petterreinholdtsen
b92b2f7a14
Fixed typo in translatable string (Your are->You are).
Typo discovered during translation.
2023-09-08 07:25:56 +02:00
Huoxi-any
5f907e545d update golang.org/x/net v0.0.0-20211209124913-491a49abca63 to 0.7.0 2023-09-05 20:49:33 +08:00
Gustavo Iñiguez Goia
79ac6306a5
Bump GUI version to v1.6.3 2023-08-17 00:28:37 +02:00
Gustavo Iñiguez Goia
eb89a90e55
ui: fixed setting daemon default action
Reject option was not being taken into account.

Closes #1017
2023-08-16 11:55:46 +02:00
Gustavo Iñiguez Goia
57838e821e
Merge pull request #1011 from lainedfles/db_wal
Introduce Sqlite WAL journal mode
2023-08-10 22:18:43 +00:00
selfdenial
feee8919b7 Introduce Sqlite3 WAL mode 2023-08-08 22:37:24 -06:00
Gustavo Iñiguez Goia
6556eed1ae
ui,prefs: allow to configure node's TLS settings 2023-07-31 13:16:52 +02:00
Gustavo Iñiguez Goia
ce7c3f8002
Bump versions to v1.6.2 2023-07-31 00:36:33 +02:00
Gustavo Iñiguez Goia
331fa177d8
ui,db: added neede files for schema upgrades, other improvements
- Added needed files to upgrade DB schema.
- Use datetime.strptime instead of fromisoformat, to support python3.6
- More debug logs to better analyze problems.

Related: #988
2023-07-31 00:19:39 +02:00
Gustavo Iñiguez Goia
ade3dc0047
ui,pop-ups: added missing import 2023-07-31 00:16:45 +02:00
Gustavo Iñiguez Goia
00a1dc4249
added Created column to the rules list
Closes #683
2023-07-30 18:16:56 +02:00
Gustavo Iñiguez Goia
cb57c1120d
ui,stats: added dst_ip column to rules details
Display dst_ip column when filtering connections by rule (tabs
Rule->double click on a rule).
2023-07-27 21:26:50 +02:00
Gustavo Iñiguez Goia
e638b0067e
misc: removed debug print, added info for missing icons
- Added description to the Icons() util, to describe why it's useful
(#998).
2023-07-27 21:20:39 +02:00
Gustavo Iñiguez Goia
7c7733483c
ui: fixed falling back to Qt's built-in icons
When the WM/DE is not properly configured, Qt does not load the system's
icon theme. In this scenario we try to use Qt's built-in icons.

Due to a bug, this was not working.

On the other hand, in order to display the icons of the system, one can
follow these instructions:
https://github.com/evilsocket/opensnitch/wiki/GUI-known-problems#no-icons-on-the-gui

Closes #998
2023-07-27 00:58:03 +02:00
Gustavo Iñiguez Goia
071f95572d
Merge pull request #997 from PeterDaveHello/zh_TW
Add basic Traditional Chinese locale
2023-07-26 14:14:50 +00:00
Gustavo Iñiguez Goia
43232b78a2
i18n: russian translation updated
Kudos to Темак
2023-07-26 15:46:28 +02:00
Gustavo Iñiguez Goia
6d65eb6f53
ui: control autostart feature exceptions
Display a warning if it fails.
2023-07-26 14:55:11 +02:00
Gustavo Iñiguez Goia
138b8d0c33
ui,prefs: fixed warning 2023-07-26 14:27:23 +02:00
Gustavo Iñiguez Goia
efded9edab
added icmp destination-unreachable to system-fw.json
Allow destination-unreachable ICMP types by default, not to display ICMP
pop-ups under certain circumstances.
More info:
https://github.com/evilsocket/opensnitch/discussions/946#discussioncomment-6035934
2023-07-26 11:40:17 +02:00
Gustavo Iñiguez Goia
122a471fcf
ui,prefs: don't crash if autologin setting fails 2023-07-26 11:14:11 +02:00
Peter Dave Hello
dd419f095c i18n: add basic Traditional Chinese translation 2023-07-26 02:10:17 +08:00
Gustavo Iñiguez Goia
d8e27b98d1
rpm: install ui binary under /usr/bin
Starting from a python3 release, distutils no longer install scripts
under /usr/bin by default, but under /usr/local/bin.
(around opensnitch v1.6.0-c5).

This causes on some immutable distros not to install the GUI, for
example Fedora SilverBlue:
https://github.com/projectatomic/rpm-ostree/issues/233

Closes #880
2023-07-25 16:36:44 +02:00
Gustavo Iñiguez Goia
57a7f5b63d
removed debugging logs, fixed build 2023-07-25 02:11:35 +02:00
Gustavo Iñiguez Goia
26b8415925
force to reestablish non-local connections on start
When we start to intercept connections, we flush out the conntrack
table, to force already established connections reconnect again so we
can intercept them, and let the user choose if allow or deny them.

Since we no longer use conntrack states to intercept TCP connections, we
now close existing connections, leaving to the applications reestablish
them again.
Local connections are excluded, because it may cause problems with some
local servers.

Both options interfere with the established connections, so you may
experience ocasional network interruptions when enabling the
interception for the first time.

Discussion: #995
2023-07-25 01:42:54 +02:00
Gustavo Iñiguez Goia
d1598fdf67
sys fw: allow to use wildcards to match interfaces
Now it's possible to use "br*" to match all network interfaces that
start with "br".

Closes #996
2023-07-24 16:11:12 +02:00
Gustavo Iñiguez Goia
a828ccdcba
reorganized sockets code
Moved sockets code block to netlink package.
2023-07-24 11:18:09 +02:00
Gustavo Iñiguez Goia
662cd2eda3
Better ebpf module errors
Report to the GUI and the logs, whether the modules have been found
or not, and if found, whether there have been any errors loading them.

Closes #868
2023-07-23 23:35:19 +02:00
Gustavo Iñiguez Goia
cb4d82f9ac
respect packet mark when requeueing packet 2023-07-23 22:33:08 +02:00
Gustavo Iñiguez Goia
8b4c8922c5
Added sample rule to allow localhost connections 2023-07-23 22:30:49 +02:00
Gustavo Iñiguez Goia
28f98e4fb6
misc
- Removed 'rules' from .gitignore
- Fixed typo.
2023-07-23 22:29:47 +02:00
Gustavo Iñiguez Goia
6e340a7e39
remote loggers improvements
- Remote logger: fixed a couple of leaks.
- Allow to use multiple remote loggers.
- Allow to use rfc3164 format.
2023-07-23 22:27:28 +02:00
Gustavo Iñiguez Goia
cdf6497ea7
Bump versions to v1.6.1 2023-07-23 22:18:58 +02:00
Gustavo Iñiguez Goia
f652174f75
changed addrs polling by async events
For the eBPF monitoring method, we listed and stored local addresses
every second, so that we could later check if the source IP of an
outbound connection was local or not, because sometimes we received
outbound connections like:
 443:1.1.1.1 -> 192.168.1.123:12345

This could have been alread solved on this change e090833, so maybe
we no longer need this code.

 - Now we subscribe to local addresses events, to receive add/remove
   events asynchronously, without having to list local addrs
   every second, alliviating CPU usage.

 - Fixed creating context object to cancel subroutines. It was not
   working properly when switching between proc monitor methods.
2023-07-23 21:14:47 +02:00
Gustavo Iñiguez Goia
e090833d29
intercept packets only with the SYN flag set
Using "ct state NEW" to intercept packets causes some undesired effects:
  We intercept packets that not only have the SYN flag set, like ACK,
  ACK+PSH or SYN+ACK. Mainly response packets.

  This means that the IPs are not always in the expected order:
  443:1.1.1.1 -> 192.168.1.123:12345
  which causes sometimes not to obtain the process of the connection,
  because the connection in the system appears as
  12345:192.168.1.123 -> 1.1.1.1:443

Intercepting packets with *only* the SYN flag set seems to resolve
this problem.
2023-07-23 15:14:05 +02:00
Gustavo Iñiguez Goia
481574f035
pop-ups: generate better rule names
Continuation of previous commit.
2023-07-22 21:27:46 +02:00
Gustavo Iñiguez Goia
ff22d94113
pop-ups: better unique rule names
When answering a pop-up we generate the rule name based on the
properties of the connection.
When sending the rule to the daemon, the daemon verifies that the name
is unique and save it. If it's not, it generates a unique name.

However, if you responded to a pop-up and later modified any property of
the rule without changing the name, if the same connection tried to be
established again, you were prompted to allow/deny it, generating the
same name for the rule.
This could cause some confusion, because when sending the new rule to
the daemon the rule name was regenerated to be unique, but on the GUI
it was not updated, and even more, the old-personalized rule was
replaced with the new one.
2023-07-21 11:53:34 +02:00
chncaption
6ede8f06a1 update golang.org/x/sys v0.0.0-20211205182925-97ca703d548d to 0.1.0 2023-07-21 14:42:51 +08:00
Gustavo Iñiguez Goia
3d8bdfc1e8
ui,rules: improved uid parsing
When creating rules filtering by UID, there're 3 possible "modes":
 - simple: 0, 1000, etc.
 - user: root (0), opensnitch (1000)
 - regexp: ^(0|1000)$

regexp was not being used correctly.
2023-07-20 16:02:12 +02:00
Gustavo Iñiguez Goia
c97c322bcb
allow to secure (abstract) unix socket comms
- Allow to use SSL certificates to secure unix sockets communications.
- Allow to use abstract users sockets for server and nodes.

Go gRPC doesn't seem to understand unix sockets addresses that start
with "unix-abstract:", and python gRPC doesn't seem to understand
"unix:@" addresses.
Therefore, on the server (python gRPC) we use the format "unix:@" to
specify the address where the server will listen on, and rewrite it to
"unix-abstract:" before starting the server.

Note about certs and abstract unix sockets:
 When creating the SSL certificates, you'll have to specify the
 address of the unix socket as the Common Name of the certificates:

  Address: "unix:@my-abstract-socket"

  Common Name: @my-abstract-socket
2023-07-19 01:31:13 +02:00
Gustavo Iñiguez Goia
aa7b1e1a02
misc: removed debug msg, fixed warning msg
- Fixed displaying verdict warning message.
 - Removed debug message.
2023-07-17 16:48:44 +02:00
Gustavo Iñiguez Goia
b40da93fb4
ui, prefs: fixed displaying restart dialog
Display restart dialog was always being displayed when applying changes,
regardless if something really changed.
2023-07-17 16:10:59 +02:00
Gustavo Iñiguez Goia
8740755f64
sys fw: report errors to the GUI after reloading
- Send errors to the server (GUI) if there's any error when reloading
   the system fw rules (far from being perfect/optimal, needs a
   rewrite).
 - Don't load the configuration after saving it, let the watcher reload
   it on write change to avoid double reload/duplicated errors.
2023-07-15 20:32:42 +02:00
Gustavo Iñiguez Goia
77c49d533c
ui,fw: export rules to clipboard, rule dialog improvements
- Added option to export fw rule to clipboard in json format.
- Improvements to receive notifications on the fw rules dialog.
2023-07-15 17:13:58 +02:00