Commit graph

856 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
4f9b69961c
ui,pop-ups: updated AppImage pattern
rel: #1066
2023-11-25 01:09:59 +01:00
Gustavo Iñiguez Goia
198595a2b8
ui, popups: minor refactoring 2023-11-25 00:54:28 +01:00
Gustavo Iñiguez Goia
56775cd62a
ui,popups: add AppImages' path pattern to the options
If the path of the process starts with /tmp/.mount, it typically
indicates that the application is an AppImage.

These apps create a random directory under /tmp, with the pattern
/tmp/.mount_<appId>XXXXXX, where the AppImage is mounted (it's not
always the case, but it usually is).

a0373541c1/runtime.c (L202)

The problem is that if you allow the path to the executable, the next
time you launch the AppImage, the path won't match the rule, and you'll
be prompted again to allow the outbound connection.

So as a helper for the users, if we find the path of the process starts
with /tmp/.mount_, we add an option to the combo box to select the path,
which creates a regular expression to match the AppImage.

Requested here: #1066, #543, #408
2023-11-25 00:12:29 +01:00
Gustavo Iñiguez Goia
827d7398f5
ui: print a warning if XDG_SESSION_TYPE is not set
If XDG_SESSION_TYPE is not set there're no icons on the GUI.
More info: #999
2023-11-24 23:23:49 +01:00
Gustavo Iñiguez Goia
02cf65ac33
ui,popups: allow to update checksums
When the checksum of a binary changes, due to an update or something
else, you'll be prompted to allow the outbound connection if the
previous checksum of the rule doesn't match the new one.

Without a visual warning was almost impossible to know what was going
on. Besides, you had to dismiss that pop-up, find the rule, and update
the checksum.

Now there's a warning message, and you can update the rule from
the pop-up.

Related: #413
2023-11-24 00:57:13 +01:00
Gustavo Iñiguez Goia
ffd70836f6
ui, pop-ups: set details scrollbar position correctly
When adding the details of a connection, the scrollbar was always at the
bottom of the view.
2023-11-22 01:34:09 +01:00
Gustavo Iñiguez Goia
2f04d0f27f
ui: added option to save checksum settings 2023-11-20 00:47:00 +01:00
Gustavo Iñiguez Goia
afe92de45e
ui,prefs: added checksum option to the popup section
Added option to select by default on the pop-ups checksum verification.
2023-11-19 23:12:15 +01:00
Gustavo Iñiguez Goia
4499a5aaf0
ui,stats: fixed adding rules to the db from context menu
When cloning a rule, or applying a rule to a node, if the rule was of
type List (had multiple operators), the operators were not saved to the
DB.

Closes: #1027
2023-11-15 00:59:01 +01:00
Gustavo Iñiguez Goia
6d056b8a7b
Bump daemon and GUI versions
Current changes are no longer compatible with 1.6.x.
2023-11-09 01:05:46 +01:00
Gustavo Iñiguez Goia
9528fb0e6b
ui: use single quotes for raw strings
part of the previous commit. Missed this change.
2023-11-08 14:28:45 +01:00
Gustavo Iñiguez Goia
e6ae9ca6ef
ui: use raw strings notation to for regexps
and silence python3.12 warnings.
2023-11-08 13:58:59 +01:00
Gustavo Iñiguez Goia
2d96ec1fc7
ui: restrict unix socket to the current user
By default, restrict reading from the unix socket to the user who
launched the GUI.
2023-11-08 00:48:44 +01:00
Gustavo Iñiguez Goia
d08da08431
ui,prefs: set db in-memory name correctly
Instead of :memory:, use file::memory:

Related: #1030
2023-11-06 15:40:01 +01:00
Gustavo Iñiguez Goia
de58e099ec
ui: allow to delete old events of the in-memory db
Not deleting events from in-memory db can lead to a high mem usage under
certain scenarios.

Previous attempt to solve this issue wrote events to disk in a temporal
file (when using file::memory:?cache=shared).

Related issues: #844 #857

Closes: #1030
2023-11-04 00:27:50 +01:00
Gustavo Iñiguez Goia
9d1182a48f
ui,prefs: enable/disable max days db checkbox
When selecting to store events on disk, the max days db checkbox must be
clickable.
2023-11-03 23:02:42 +01:00
Gustavo Iñiguez Goia
e63f4c13c8
ui: preserve rules' columns width
Preserve rules' columns width when selecting rules left panel items.

Closes: #822
2023-10-31 01:19:01 +01:00
Gustavo Iñiguez Goia
1b26acbd21
ui: fixed crash while refreshing views
There was a problem while refreshing and reconfiguring the views'
columns, which caused segfaults.
2023-10-18 11:19:08 +02:00
Gustavo Iñiguez Goia
174c63c3ff
ui: improved views behaviour
- Fixed painting rows while scrolling using the mouse.
   Sometimes blank lines were inserted at the bottom of the views when
   scrolling with the mouse.
 - Avoid to rerepaint rows when switching views or scrolling.
 - Selecting a row marks it for tracking, ensuring it's deselected when
   the row is not visible, and reselected when the row becomes visible
   during scrolling.

The following behaviour has not changed:
 - Selecting a row that was previously selected, deselects it.
 - Keyboard navigation.

Not fixed yet:
 - Selecting all the rows of a view with the mouse, visibles and not visibles.
 - Entering into a detailed view, going back to the previous view, and
   select (restore) the row that was previously selected (causes a
   segfault in a particular case).

Related: #1037
2023-10-17 17:13:10 +02:00
Gustavo Iñiguez Goia
5fd7da8ef5
ui,stats: improved rules deletion
When selecting rules with CTRL+A it was not deleting all the rules.
Besides rules with the name empty was sent to the daemon.

Related: #1037
2023-10-13 23:51:37 +02:00
Gustavo Iñiguez Goia
4493c86bc3
pop-ups: avoid exceptions with old protobuf libs
reverse() doesn't exist on old protobuf libs.
2023-10-13 22:50:26 +02:00
Gustavo Iñiguez Goia
177d67d0a6
ui,rules: fixed refrehsing list, fixed typos
- Fixed refreshing list when deleting rules.
- Fixed typos that were preventing errors from being displayed correctly.

Closes: #1056
2023-10-12 23:11:52 +02:00
Gustavo Iñiguez Goia
72756c85b8
ui,rules: fixed typo
It was preventing from diplaying an error when trying to open the
ruleseditor to edit a rule.
2023-10-12 01:45:38 +02:00
Gustavo Iñiguez Goia
67149269cd
ui,ruleseditor: add rules correctly to the db
Operator list was not converted to JSON string when saving the rule to
the DB.

Related: #1047
2023-10-11 00:21:59 +02:00
Gustavo Iñiguez Goia
32e73257f9
ui,stats: fixed typo 2023-10-09 23:12:41 +02:00
Gustavo Iñiguez Goia
b93051026e
rules: improved operator list parsing and conversion
Previously when creating a new rule we followed these steps:
 - Create a new protobuf Rule object from the ruleseditor or the
   pop-ups.
 - If the rule contained more than one operator, we converted the
   list of operators to a JSON string.
 - This JSON string was sent back to the daemon, and saved to the
   DB.
 - The list of operators were never expanded on the GUI, i.e., they
   were not saved as a list of protobuf Operator objects.
 - Once received in the daemon, the JSON string was parsed and
   converted to a protobuf Operator list of objects.
   Both, the JSON string and the list of protobuf Operator objects were
   saved to disk, but the JSON string was ignored when loading the
   rules.

Saving the list of operators as a JSON string was a problem if you
wanted to create or modify rules without the GUI.

Now when creating or modifying rules from the GUI, the list of operators
is no longer converted to JSON string. Instead the list is sent to the
daemon as a list of protobuf Operators, and saved as JSON objects.

Notes:
 - The JSON string is no longer saved to disk as part of the rules.
 - The list of operators is still saved as JSON string to the DB.
 - About not enabled rules:
   Previously, not enabled rules only had the list of operators as JSON
   string, with the field list:[] empty.
   Now the list of operators is saved as JSON objects, but if the rule
   is not enabled, it won't be parsed/loaded.

Closes #1047
2023-10-09 14:55:15 +02:00
Gustavo Iñiguez Goia
9afb3a3f84
ui: reset md5 widgets state on creating new rule 2023-10-06 14:30:02 +02:00
Gustavo Iñiguez Goia
9fd1e85265
pop-ups: fixed crashes 2023-10-06 12:22:54 +02:00
Gustavo Iñiguez Goia
76e4f72039
Merge pull request #1039 from petterreinholdtsen/patch-1
Fixed typo in translatable string (Your are->You are).
2023-10-04 19:02:55 +00:00
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
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
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
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
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
122a471fcf
ui,prefs: don't crash if autologin setting fails 2023-07-26 11:14:11 +02:00