Commit graph

1783 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
6696d1c141
ui,fw: fixed adding dst/src port rules 2025-01-25 01:46:49 +01:00
Gustavo Iñiguez Goia
0dfec48120
ui, fw: fixed adding rules when using service name
We were failing adding system fw rules when the user selected a
destination port by service name.

We allow to specify port ranges with '-' (8080-8088), and as some
service names contain '-' in the name (ftp-data, netbios-ns), it was
failing.
2025-01-25 01:09:33 +01:00
Gustavo Iñiguez Goia
ced8410d43
allow to use lists of md5s to block connections
Besides domains, net ranges and IPs, now it's possible to
filter connections by the MD5 of a binary, if it's enabled.
2025-01-24 00:47:02 +01:00
Gustavo Iñiguez Goia
5184c45086
changed dns log messages
Moved some messages to Trace.
2025-01-22 19:19:57 +01:00
Gustavo Iñiguez Goia
f7803ebdcb
added trace logs for packets and ebpf
- Log packets.
 - Log special case.
 - Updated information on some rare cases when intercepting connections
   via eBPF.
2025-01-22 01:06:10 +01:00
Gustavo Iñiguez Goia
7a32f32f7a
netlink/ more improvements
- Fixed serializing netlink data:
   d237ee16c3 (diff-f7f6108a60b107adfb0930f5f73a6ae229f9943bb01949d1f8f3e247f869b2abL59-L60)
 - misc.
2025-01-22 00:33:10 +01:00
Gustavo Iñiguez Goia
d54f8d4777
netlink/ improvements
- Structs fields alignment fixed.
 - Dump more sockets via netlink, in order to display them with the
   SocketsMonitor task (netstat).
 - Fixed serializing netlink data:
d237ee16c3 (diff-f7f6108a60b107adfb0930f5f73a6ae229f9943bb01949d1f8f3e247f869b2abL59-L60)
2025-01-22 00:16:17 +01:00
Gustavo Iñiguez Goia
63a3b4e446
ebpf improvements
- changed formatting.
 - extract source IPs from UDP packets from ancillary messages.
 - hook inet_dgram_connect to solve intercepting some apps (parsec).
 - remove debugging / unused code.

More info on these changes:
fbdef1673d
20a03e11fe
f44d3e896b
93d1cefbc2

Closes: #1246.
2025-01-21 23:57:01 +01:00
Gustavo Iñiguez Goia
dd6b3c57f7
Merge pull request #1255 from staticssleever668/fix_unbound_service
ui: make sure 'service' variable is set
2025-01-13 21:09:54 +01:00
Yaroslav Chvanov
9e2ef5f491
ui: make sure 'service' variable is set
Fixes error when running `opensnitch-ui` again:
>     if service:
>        ^^^^^^^
> NameError: name 'service' is not defined. Did you mean: 'UIService'?

Fixes: cdf93c72c1 ("ui: fixed delay closing the GUI")
2025-01-13 22:04:58 +03:00
Gustavo Iñiguez Goia
45f5b62978
add new log level TRACE 2025-01-12 00:47:49 +01:00
Gustavo Iñiguez Goia
ff3ac6663a
allow to filter connections by username
Added new rule operand 'user.name' to filter connections by username.

More info #1236
2025-01-09 17:15:28 +01:00
Gustavo Iñiguez Goia
c0be3d15dc
ui: fixed closing the GUI with a popup active 2025-01-06 20:22:49 +01:00
Gustavo Iñiguez Goia
2357186093
Merge pull request #1252 from e3dio/master
fix #1245 UI rule deletion
2025-01-04 19:31:32 +01:00
e3dio
824b5c789a
fix #1245 2025-01-03 22:19:01 -07:00
Gustavo Iñiguez Goia
337b81a89b
ui: fixed acting on selected rows
When selecting rows with CTRL we were not copying/deleting rules
correctly.

Closes #1245
2025-01-04 00:44:34 +01:00
Gustavo Iñiguez Goia
422a2dd82d
pkg,ui: rpm/deb improvements
- deb: added python3-packaging dependency.
 - rpm:
   * make python3-notify2 package optional.
   * Added python3-packaging as dependency to load dynamically the
     protobuffers (python3-packaging for Fedora, python-rpm-packaging
     metapackage for OpenSuse).
2025-01-03 16:19:28 +01:00
Gustavo Iñiguez Goia
6f41dc6c3e
ui: added proto/ directory 2025-01-03 15:02:48 +01:00
Gustavo Iñiguez Goia
5dd4ef06bb
ui: allow to use multiple protobuffer versions
Protobuffers compiled with protobuf < 3.20.0 are incompatible with
protobuf >= 4.0.0:
https://github.com/evilsocket/opensnitch/wiki/GUI-known-problems#gui-does-not-show-up

This has been a source of problems for some users (#1214, #647), and
in some distributions, previous protobuffer does no longer work due to
incompatibility with the protobuf package version installed
(OpenSuse Tumbleweed).

So in order to solve this issue, we provide several protobuffers,
for old and new protobuf versions:
proto/ui_pb2* for protobuf >= 4.0.0
proto/pre3200/ui_pb2* for protobuf >= 3.6.0 and < 3.20.0

To avoid import errors, each protobuffer must be placed in its own
directory, and the name of the protobuffer files must be named with
the syntax <prefix>_pb2.py/<prefix>_pb2_grpc.py:
  ui_pb2.py and ui_pb2_grpc.py

The default compiled protobuffer will be opensnitch/proto/ui_*.py
instead of opensnitch/ui_*.py
2025-01-03 14:48:35 +01:00
Gustavo Iñiguez Goia
24a5105d77
ui,stats: fixed Events search with different languages
When a language other than English was used, the search in the Events
did not work.
2024-12-30 22:21:59 +01:00
Gustavo Iñiguez Goia
d8c3684f2b
ui,stats: improved nodes search 2024-12-26 13:27:44 +01:00
Gustavo Iñiguez Goia
6edb60c549
pkg,deb: updated notes for grpcio issue #647 2024-12-25 12:52:45 +01:00
Gustavo Iñiguez Goia
37bb9742a4
ui,stats: fixed displaying proc details dialog 2024-12-24 17:10:34 +01:00
Gustavo Iñiguez Goia
6e7aaf935b
ui: netstat/events view improvements
- Clicking on a column will display the details of that item (IP,
   process, etc).
   DstIP, DstPort and UserID columns will open the details of the
   selected item.
   Clicking on the PID column will open the process monitor dialog.
   The rest of the columns will open the details of the process.

 - On the Events tab, clicking on the PID column will open the process
   monitor dialog.
2024-12-21 23:31:25 +01:00
Gustavo Iñiguez Goia
5595a69927
ui: removed hardcoded labels color
It was set to blue, and when using dark themes it didn't look good.
2024-12-21 01:25:23 +01:00
Gustavo Iñiguez Goia
8f2ba67077
ui: fixed searching in tab Users 2024-12-20 15:44:52 +01:00
Gustavo Iñiguez Goia
fcaf3b8181
ui: display all fields in the detail views 2024-12-20 15:40:06 +01:00
Gustavo Iñiguez Goia
5629e2a405
ui,stats: simplified columns configuration
There're only two points where we need to reconfigure the columns:
on showEvent() and when saving the settings.
2024-12-18 21:40:28 +01:00
Gustavo Iñiguez Goia
843f537000
ui,stats: improved restoring columns 2024-12-18 16:18:54 +01:00
Gustavo Iñiguez Goia
eab75b8a48
ui,popups: strip non-printable characters from labels
Commands with non-printable characters were misaligning the labels.

Now these characters are exclude from the labels, and texts are
displayed as a single line.
2024-12-18 00:52:10 +01:00
Gustavo Iñiguez Goia
01e1341770
ui: allow to configure QT_QPA_PLATFORM from the GUI
Under Wayland the GUI doesn't work entirely well (#733).

Setting QT_QPA_PLATFORM to 'xcb' solves some issues, like correctly
positioning popups, but users had to configure it manually.

Now it's possible to configure it from the Preferences dialog.

Setting it to "" will use the default option of the Desktop Environment.
2024-12-17 20:07:27 +01:00
Gustavo Iñiguez Goia
c526907d75
reload procmon method after fw rules
There was a situation where if the ebpf modules path did not exist,
the fw rules were not added, causing the daemon to crash after
connecting to the GUI.
2024-12-17 12:33:38 +01:00
Gustavo Iñiguez Goia
7d2ca8d039
updated network_aliases.json path
- Load network_aliases.json by default from /etc/opensnitchd.
 - Don't exit if network_aliases.json doesn't exist.
 - Updated Makefile to install network aliases definitions.
2024-12-17 00:38:30 +01:00
Gustavo Iñiguez Goia
ed84394dfc
Merge pull request #1237 from nolancarougepro/lan_access_control
Lan access control
2024-12-17 00:15:37 +01:00
Gustavo Iñiguez Goia
dd89509b1c
ui,stats: don't allow clicking on empty hosts
In the Events tab, don't allow double clicking on the DstHost column if
the cell is empty.
2024-12-16 23:50:36 +01:00
Gustavo Iñiguez Goia
dc2c6959e9
ui,stats: fixed Events tab search
Closes #1243
2024-12-16 12:42:13 +01:00
nolancarougepro
ee0a1586ff Alias to DstIp combobox 2024-12-16 11:09:39 +01:00
Nolan CAROUGE
31da993797
Merge branch 'evilsocket:master' into lan_access_control 2024-12-16 09:46:50 +01:00
Gustavo Iñiguez Goia
80ab972203
ui,prefs: better feedback when saving options 2024-12-15 23:09:53 +01:00
Gustavo Iñiguez Goia
4e8b222bd4
ui,events: display all columns in the Events tab
Display by default all columns in the Events tab, and allow to configure
what columns to display.

Closes #1223
2024-12-15 23:04:47 +01:00
Gustavo Iñiguez Goia
7944532922
ui,prefs: allow to configure server (GUI) address
Up until now it when changing the node address, you changed the server
adress as well (i.e: the address where the GUI is listening for
connections).

This simplified configuration when you had 1 node and addresses were
changed at the same time. But in other situations, you were not able to
change the server (GUI) address from the Preferences dialog.

So now:
 - the address of each node is changed from the Nodes tab.
 - the address of the server (GUI) is changed from the UI tab.
2024-12-15 01:36:26 +01:00
Gustavo Iñiguez Goia
4264134856
ui,stats: minor adjustment to splitter widgets
- set a better size for rules' left panel.
 - hide node additional info by default.
2024-12-14 23:32:37 +01:00
Gustavo Iñiguez Goia
aa0d5f14dd
ui,fw: fixed enable/disable global button
When there were no nodes connected, we disabled the global fw button
that enables/disables the fw.

Unfortunately when a node connected to the GUI, this button was not
clickable anymore.
2024-12-13 23:38:28 +01:00
Gustavo Iñiguez Goia
d825f1e9b0
ui,fw: fixed restoring policies when disabling fw
When disabling the fw, we change the default input and output policy to
Accept, not to block connections.

Due to a problem reloading the fw in the daemon, the policy was not
changed as expected.

This problem must be fixed in the daemon, but for the time being,
sending two configuration changes solves the issue (one for changing the
policy, and another one for disabling the fw).

Closes: #1225
2024-12-13 21:11:50 +01:00
Gustavo Iñiguez Goia
b1e279fb6b
get process tree when using process conector
When the Process Connector is used to intercept exec events, get and
build the process tree of a process.

PROCESS CONNECTOR feature was added here: 7a9bb17829
2024-12-13 20:14:55 +01:00
nolancarougepro
fa96aa317d remove test_range in .json 2024-12-11 11:42:53 +01:00
nolancarougepro
30c4e70f1b modify ruleseditor to edit aliases 2024-12-11 08:59:31 +01:00
nolancarougepro
f4e7d38af5 modify daemon to accept aliases 2024-12-11 08:58:50 +01:00
nolancarougepro
ca5c5cdb43 modify prompt to add aliases 2024-12-11 08:56:16 +01:00
nolancarougepro
0addd29c51 add_network_aliases 2024-12-11 08:55:04 +01:00