Mod_Security install?

69 posts / 0 new
Last post
Fri, 06/13/2008 - 17:01 (Reply to #51)
ronald
ronald's picture

that is correct. it also is valid for fcgi-bin or any other directory for that matter.
Hence why the button "do not allow php configuration" in the template is not worth much.

as joe said the php.ini is for users to edit, BUT <b>only </b>when you allow them to.
If you don't want that then it should also not be possible with a trick, it should also not be possible to let them alter the php5.ini if you don't want to allow it. What is the point of defining 2 subprocesses and let the user alter that to 10000000?

beginning sys admins don't know about chattr +i and even experienced admins are sometimes a little bit confused, heh scott :)) just kidding here, don't get mad

there is always a possibility to put some scripts in cgi-bin and do evil but in this case I am talking about making it more difficult to crack what you dont want to have cracked and to protect yourself better against inexperienced experimenters, giving you more time to respond to processes you don't want to see on your box.

Fri, 06/13/2008 - 17:04 (Reply to #52)
sgrayban

I wasn't confused. Just didn't think of that other little step of using mv is all.

Tue, 07/08/2008 - 12:32 (Reply to #53)
ronald
ronald's picture

i want to add that if users have filemanager with EXT enabled (the little hammer icon) then they will be able to undo the chattr +i with that tool.

hehe webmin is too powerful

Tue, 07/08/2008 - 12:37 (Reply to #54)
sgrayban

Isn't chattr -i faster ?

Tue, 07/08/2008 - 17:01 (Reply to #55)
ronald
ronald's picture

yes probably, but what i meant is that as a sys admin is doing his best to secure (let's say: $DOM/etc/php5/php.ini) with chattr +i and then any user can <b>undo </b>this through the filemanager with the EXT tool.
That doesn't seem right.

Scott do you know a way to disable that 'EXT' for all users at once through webmin?

Tue, 07/08/2008 - 17:24 (Reply to #56)
sgrayban

Actually you can disable the EXT -- what I did was create a new user group called 'hosting' and went though all the ACL's for each module and disabled or enforced what they could do in them.

In the &quot;Module Access Control&quot; for &quot;File Manager&quot; I just disabled all the features I didn't want them to have access to which included &quot;EXT (edit EXT attributes)&quot;.

Tue, 07/08/2008 - 17:26 (Reply to #57)
sgrayban

And of course you assign each user to the 'hosting' webmin group.

Sun, 08/16/2009 - 11:08 (Reply to #58)
sfatula

Scott,

You said:

"what I did was create a new user group called 'hosting' and went though all the ACL's for each module and disabled or enforced what they could do in them."

I can see one can do this for a group in file manager settings for the group, but, can't figure out what to put in the box that says "ONLY ALLOW ACCESS TO DIRECTORIES". Without this box, the user can get anywhere in file manager.

Thu, 06/12/2008 - 13:34
velvetpixel

Thanks Joe,

Yeah the instructions for running the configure script and then compiling with make are in the tarball but I am going to wait until you have a version in your repositories that I know won't bork my existing install :)

Fri, 06/13/2008 - 04:18
sgrayban

but even running the server under fcgi or cgi-wrapper what could they do ? not much I expect because they would be running as the user as if they logged in so unless that user is root or apache they can't do anything that a normal user can't.

Fri, 06/13/2008 - 05:25
sgrayban

Well you can do what I did --- make a copy of the php.ini file then add all you custom paths to it with the right VM variables then when a new server is created all is good.

Fri, 02/20/2009 - 09:45
worel

Just found that thread when i was searching for mod_security here in this forum.

What i can say is, that mod_security blocked every hacking attempt we tried on our webservers so far. Ok, most of them weren't very smart, i mean a lot of them were with automated tools. But also manually driven attacks are hard to place because a lot of the stuff u normally try is forbidden with the activated rules.

I use the rules from modsecurity.org and gotroot.com
Sometimes there are false positives, but a little bit of experience and playing with mod_sec and u can alter those rules to fit your needs.
Also we did some performance testing with mod_sec enabled. Fast enough! IF there are performance problems, than its not because of mod_sec in our infrastructure.

Hm, what else do we do to tighten our servers (apache)?
I also use mod_evasive and mod_spamhaus. (but i don't know how or if mod_spamhaus actually works, there is no way of testing this stuff)

At last, ossec is monitoring the hosts. I altered the config a little bit so that DOS attempts are recognized and blocked. Also mod_security events are recognized correctly. The rest is tweaking the tresholds. No problem with Bruteforce because ossec handles them perfectly so far. The only drawback is, that somebody could use that HIDS to lock out spoofed IP adresses. But it aint over now ;)

Before such a server starts to work, it is locked down by the RHEL 5.0 benchmark from http://cisecurity.com/benchmarks.html (they are free - most of them are pretty actual - this site if worth a look! no bs)

The only thing i'm missing is selinux and bastille for centos 5.2
First one is too much hassle in combination with virtualmin and the second one won't run on 5.x so far... anyway, u can set these settings by hand.

Is there a thread regarding security methods and best practices? I love that stuff!

Tue, 04/27/2010 - 22:29
eddieb

2 years later, is this still the best way to install mod_security?

thanks

Tue, 04/27/2010 - 23:16 (Reply to #64)
andreychek

Howdy,

This is a long thread -- what way are you looking at for installing mod_security, and on what distro? :-)

It does typically need to be manually downloaded and installed though, there aren't packages for it in the default repositories for most distros.

-Eric

Wed, 04/28/2010 - 08:11 (Reply to #65)
eddieb

CentOS 5.4. Need to protect against automated blanket attacks and integrate with CSF to block those automated attacks.

Thanks Eric.

Wed, 04/28/2010 - 09:29 (Reply to #66)
andreychek

Yeah, CentOS definitely doesn't have mod_security in it's repository. Installing manually by downloading it from the mod_security site and following their instructions is a common way to do that.

I think there are third party repositories that package mod_security and make it simpler to install, but I'm not familiar with any of them... I'd certainly suggest caution in what repositories you enable, as some can cause problems of various sorts. But if you run into one you trust that provides mod_security, that may save you some time :-)

-Eric

Wed, 04/28/2010 - 09:54 (Reply to #67)
eddieb

I trust Atomic Rocket Turtle.

http://downloads.prometheus-group.com/delayed/rules/

Thanks

Wed, 04/28/2010 - 09:54
eddieb

--Deleted--

Pages

Topic locked