OPNsense Forum

English Forums => Intrusion Detection and Prevention => Topic started by: fwRookie on December 13, 2021, 08:51:01 am

Title: log4j vulnerability detection
Post by: fwRookie on December 13, 2021, 08:51:01 am
It is possible to detect and block the log4j hacking attempts with the OPNSense firewall (or other parts) rules?
I know other firewalls already have rules available to detect and block possible attempts, like https://cloud.google.com/blog/products/identity-security/cloud-armor-waf-rule-to-help-address-apache-log4j-vulnerability

Title: Re: log4j vulnerability detection
Post by: Space on December 13, 2021, 09:46:11 am
Hi, I am not sure if this will help at all ... google states:

Quote
The Cloud Armor WAF rules use a variety of techniques to detect attempted obfuscations and bypasses within attempted exploits of CVE-2021-44228.

But there are probably just way to many ways to obfuscate that simple string ... good enough to catch the script kiddies.

Best regards,

    Space
Title: Re: log4j vulnerability detection
Post by: fwRookie on December 13, 2021, 10:11:04 am
https://rules.emergingthreatspro.com/open/suricata-5.0/
Suricata seems to have updated their rules set to detect this.
Title: Re: log4j vulnerability detection
Post by: XeroX on December 13, 2021, 04:06:43 pm
Snort Rules in server-web and server-other detect Log4j aswell. As long as traffic is not end to end encrypted.

https://www.snort.org/advisories/talos-rules-2021-12-11

Title: Re: log4j vulnerability detection
Post by: Julien on December 14, 2021, 03:12:44 pm
Snort Rules in server-web and server-other detect Log4j aswell. As long as traffic is not end to end encrypted.

https://www.snort.org/advisories/talos-rules-2021-12-11

are you using Snort on Opns? i am having issues with Suricata.
Title: Re: log4j vulnerability detection
Post by: fabian on December 14, 2021, 07:09:52 pm
nginx has naxsi which may be used for blocking as well.
Title: Re: log4j vulnerability detection
Post by: XeroX on December 17, 2021, 01:27:40 am
Snort Rules in server-web and server-other detect Log4j aswell. As long as traffic is not end to end encrypted.

https://www.snort.org/advisories/talos-rules-2021-12-11

are you using Snort on Opns? i am having issues with Suricata.

No I'm using suricata with additional Snort Rules. Use 29190. Don't use 3.x rules.
Title: Re: log4j vulnerability detection
Post by: dennis_u on December 19, 2021, 11:59:49 am
It is possible to detect and block the log4j hacking attempts with the OPNSense firewall (or other parts) rules?

Yes, it does. It even blocks my internal researches about the vulnerability (e.g. internal requests based und CSRF). Update your ET rules and test it.

But a more general question from my side: our OPNsense even blocks the "IPS blocks Log4Shell" logs to our SIEM, since they match the Log4shell patterns:

Code: [Select]
[Drop] [1:2034672:1] ET EXPLOIT Apache log4j RCE Attempt - 2021/12/12 Obfuscation Observed M1 (CVE-2021-44228) [Classification: Attempted Administrator Privilege Gain] [Priority: 1] {UDP} 10.10.x.1:51488 -> 10.10.x.69:516
The interface 10.10.x.1 points to valuable IT assets and I do not want to disable IPS here. Can I whitelist the OPNsense from IPS?
Title: Re: log4j vulnerability detection
Post by: koushun on January 19, 2022, 12:04:52 am
What dennis_u said!  :) Having the same issue.
Title: Re: log4j vulnerability detection
Post by: Julien on January 23, 2022, 04:41:55 pm
Snort Rules in server-web and server-other detect Log4j aswell. As long as traffic is not end to end encrypted.

https://www.snort.org/advisories/talos-rules-2021-12-11

are you using Snort on Opns? i am having issues with Suricata.
3.x rules what are those?

Thank you

No I'm using suricata with additional Snort Rules. Use 29190. Don't use 3.x rules.