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

Debian 12 issue #328

Open
NoipName opened this issue Aug 5, 2024 · 5 comments
Open

Debian 12 issue #328

NoipName opened this issue Aug 5, 2024 · 5 comments

Comments

@NoipName
Copy link

NoipName commented Aug 5, 2024

Hello,

I tried to install on Debian 12 the ModSecurity with Nginx 1.26.1

After the install, the module isn't working with a simple test with this command : curl http://<SERVER-IP/DOMAIN>/index.html?exec=/bin/bash

Normaly i should have a 403 like result, but i have my nginx page test so the test it's not work


The mod I install on Debian 11 with Nginx 1.18 and that work perfecly

I tried to find where's a problem and i think i found it
On Debian 11 the package libpcre++-dev is require for the mod
But the problem is this package libpcre++-dev isn't available on Debian 12 and i think ModSecurity can't read without that package
I tried fork the package on Debian 12 and that didn't work too

If someone tried and it's work for you can you help me ? :D

Thanks avance

@NoipName NoipName changed the title Debian 12 fonction Debian 12 issue Aug 5, 2024
@airween
Copy link
Member

airween commented Aug 6, 2024

Hi @NoipName,

I tried to install on Debian 12 the ModSecurity with Nginx 1.26.1

First of all: how did you install your ModSecurity+Nginx setup? From source? From Debian's official repository? Any 3rd party repository?

Also: have you installed CRS (or any rule set), and set it up for the engine?

After the install, the module isn't working with a simple test with this command : curl http://<SERVER-IP/DOMAIN>/index.html?exec=/bin/bash

Normaly i should have a 403 like result, but i have my nginx page test so the test it's not work

Could you show your modsecurity.conf's relevant content? Eg. is the SecRuleEngine set to On?

The mod I install on Debian 11 with Nginx 1.18 and that work perfecly

I tried to find where's a problem and i think i found it On Debian 11 the package libpcre++-dev is require for the mod But the problem is this package libpcre++-dev isn't available on Debian 12 and i think ModSecurity can't read without that package I tried fork the package on Debian 12 and that didn't work too

In Debian 12 most application upgrade its dependency to PCRE2. Libpcre++dev is the "old" PCRE library - and this is the development part of the PCRE library. You don't need that to run neither the library nor the connector. (Even the Nginx uses PCRE2 too, but it needs only the runtime library components.)

@NoipName
Copy link
Author

NoipName commented Aug 7, 2024

Hi @NoipName,

I tried to install on Debian 12 the ModSecurity with Nginx 1.26.1

First of all: how did you install your ModSecurity+Nginx setup? From source? From Debian's official repository? Any 3rd party repository?

Also: have you installed CRS (or any rule set), and set it up for the engine?

After the install, the module isn't working with a simple test with this command : curl http://<SERVER-IP/DOMAIN>/index.html?exec=/bin/bash
Normaly i should have a 403 like result, but i have my nginx page test so the test it's not work

Could you show your modsecurity.conf's relevant content? Eg. is the SecRuleEngine set to On?

The mod I install on Debian 11 with Nginx 1.18 and that work perfecly
I tried to find where's a problem and i think i found it On Debian 11 the package libpcre++-dev is require for the mod But the problem is this package libpcre++-dev isn't available on Debian 12 and i think ModSecurity can't read without that package I tried fork the package on Debian 12 and that didn't work too

In Debian 12 most application upgrade its dependency to PCRE2. Libpcre++dev is the "old" PCRE library - and this is the development part of the PCRE library. You don't need that to run neither the library nor the connector. (Even the Nginx uses PCRE2 too, but it needs only the runtime library components.)

Hello,
All installation it's from original source github of ModSecurity+Nginx and i use all directive gived by github
I installed also CRS 4.5.0 (lastest)
I checked in modsecurity SecRuleEngine is On
image

there's all package i installed for ModSec
image

There's my scripts for the installation :

image

thank you :D

@NoipName
Copy link
Author

NoipName commented Aug 7, 2024

I exported 2 config logs for compare
Left is Debian 12 with Nginx 1.26 and right is Debian 11 with Nginx 1.18

There's every different:

image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

@airween
Copy link
Member

airween commented Aug 7, 2024

What you see in your log after you sent the request above?

Also: could you turn on your debug log with value 9 for a while? Only for that request. Then please share the log (or send that to [email protected].

@airween
Copy link
Member

airween commented Oct 17, 2024

@NoipName any news?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants