Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real-time monitor: accept firewall rules with log enabled counted as Blocked Threat #1081

Open
francio87 opened this issue Feb 13, 2025 · 2 comments
Labels
verified All test cases were verified successfully

Comments

@francio87
Copy link
Member

francio87 commented Feb 13, 2025

Steps to reproduce

  • Enable BanIP
  • Create a firewall rule of type Accept with logging enabled for ICMP protocol, allowing traffic from LAN to WAN.
  • Execute a ping command from a machine within the network to a public IP.

Expected behavior

The log entries for the allowed traffic are properly recorded in /var/log/messages but not categorized as security threats in the real-time monitor

Actual behavior

The packets are written in the /var/log/messages :

Feb 13 18:00:22 fw-ldg kernel: [780449.208045] log-ping: IN=br-lan OUT=eth1 MAC=bc:24:11:7b:39:c4:04:2b:58:03:cd:36:08:00 SRC=192.168.110.50 DST=1.1.1.1 LEN=84 TOS=0x00 PREC=0x00 TTL=63 ID=11213 DF PROTO=ICMP TYPE=8 CODE=0 ID=7907 SEQ=1
Feb 13 18:00:24 fw-ldg kernel: [780451.842337] log-ping: IN=br-lan OUT=eth1 MAC=bc:24:11:7b:39:c4:04:2b:58:03:cd:36:08:00 SRC=192.168.110.50 DST=1.1.1.1 LEN=84 TOS=0x00 PREC=0x00 TTL=63 ID=12013 DF PROTO=ICMP TYPE=8 CODE=0 ID=7910 SEQ=1
Feb 13 18:00:47 fw-ldg kernel: [780474.110908] log-ping: IN=br-lan OUT=eth1 MAC=bc:24:11:7b:39:c4:04:2b:58:03:cd:36:08:00 SRC=192.168.110.50 DST=1.1.1.1 LEN=84 TOS=0x00 PREC=0x00 TTL=63 ID=30032 DF PROTO=ICMP TYPE=8 CODE=0 ID=7990 SEQ=1
Feb 13 18:00:48 fw-ldg kernel: [780475.355413] log-ping: IN=br-lan OUT=eth1 MAC=bc:24:11:7b:39:c4:04:2b:58:03:cd:36:08:00 SRC=192.168.110.50 DST=1.1.1.1 LEN=84 TOS=0x00 PREC=0x00 TTL=63 ID=30191 DF PROTO=ICMP TYPE=8 CODE=0 ID=7991 SEQ=1

The issue shows in the real-time monitor under the "security" section and increments the count for "Blocked threats."

root@fw-ldg:~# cat /tmp/ns.report/tsip-malware-report.json | jq '.malware_by_hour[] | select(.[0] == 18)'
[
  18,
  4
]

Components NethSecurity version: 8-23.05.5-ns.1.4.1

See also

@github-project-automation github-project-automation bot moved this to ToDo 🕐 in NethSecurity Feb 13, 2025
@Tbaile Tbaile added this to the NethSecurity 8.5 milestone Feb 14, 2025
@Tbaile Tbaile self-assigned this Mar 3, 2025
@Tbaile Tbaile moved this from ToDo 🕐 to In Progress 🛠 in NethSecurity Mar 3, 2025
@Tbaile Tbaile assigned francio87 and unassigned Tbaile Mar 4, 2025
@Tbaile Tbaile added the testing Packages are available from testing repositories label Mar 4, 2025
@Tbaile
Copy link
Contributor

Tbaile commented Mar 4, 2025

Image

Check the issue is not reproducible

@nethbot nethbot moved this from In Progress 🛠 to Testing in NethSecurity Mar 4, 2025
@francio87
Copy link
Member Author

Confirm fixed, logs are properly recorded in /var/log/messages

Mar  5 12:21:24 nsec8-vm kernel: [ 1720.118171] log-icmp: IN=br-lan OUT=eth1 MAC=52:54:00:6e:2c:b3:52:54:00:f3:f6:fb:08:00 SRC=10.20.30.105 DST=216.58.204.227 LEN=84 TOS=0x00 PREC=0x00 TTL=63 ID=63108 DF PROTO=ICMP TYPE=8 CODE=0 ID=569 SEQ=1 

and correctly not counted as a threat:

root@nsec8-vm:~# cat /tmp/ns.report/tsip-malware-report.json 
{"first_seen": 0, "malware_count": 0, "malware_by_hour": [[0, 0], [1, 0], [2, 0], [3, 0], [4, 0], [5, 0], [6, 0], [7, 0], [8, 0], [9, 0], [10, 0], [11, 0], [12, 0], [13, 0], [14, 0], [15, 0], [16, 0], [17, 0], [18, 0], [19, 0], [20, 0], [21, 0], [22, 0], [23, 0]], "malware_by_category": {}, "malware_by_chain": {}}

@francio87 francio87 removed their assignment Mar 5, 2025
@francio87 francio87 added verified All test cases were verified successfully and removed testing Packages are available from testing repositories labels Mar 5, 2025
@nethbot nethbot moved this from Testing to Verified in NethSecurity Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
verified All test cases were verified successfully
Projects
Status: Verified
Development

No branches or pull requests

2 participants