LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-10-2013, 09:05 AM   #1
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Rep: Reputation: Disabled
web_server: PHP.CGI.Argument.Injection detection by mod_secure?


Hi,
Today our firewall detect this intrusion "web_server: PHP.CGI.Argument.Injection". We have a centos 6.4 machine with php 5.3.3 and with mod_secure enabled. We are wondering can mod_secure detect this type of intrusion and disabled it? What can we do to scan if there is any threat created? I have checked through the httpd access log and I didnt find the said ip detected by the firewall.

Last edited by newbie14; 07-10-2013 at 09:32 AM.
 
Old 07-10-2013, 09:46 AM   #2
David Trest
Member
 
Registered: Jul 2013
Distribution: CentOS/RHEL, Backtrack, many more.
Posts: 58

Rep: Reputation: Disabled
The firewall (what kind of firewall?) probably just blocked the event so your webserver didn't see it.

mod_security, with proper rules (such as OWASP) can detect many well-known injection rules, plus ones that just plain look squirrelly.

But you are running an application that sanitizes inputs, making injection all that much harder, right?
 
Old 07-10-2013, 11:22 AM   #3
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Dear David,
The firewall is fortinet. When you say sanitize means is it that things like mysql_real_escape_string? Yes I do this is on my login page anything else should I be doing ?
 
Old 07-10-2013, 12:49 PM   #4
David Trest
Member
 
Registered: Jul 2013
Distribution: CentOS/RHEL, Backtrack, many more.
Posts: 58

Rep: Reputation: Disabled
As long as you sanitize your input so someone can't put content in there that MySQL or any other interpreter will try to execute as code, you'll be fine.

But it still doesn't hurt to load mod_security rules like OWASP or others, prevents someone from piling in junk data anyways.
 
Old 07-10-2013, 01:09 PM   #5
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
I am not too sure is mysql_real_escape_string sufficient enough? Yes I have mod_secure running too what should I edit or change to edit to further harden it I just left it as it is without any additional changes?
 
Old 07-10-2013, 02:07 PM   #6
David Trest
Member
 
Registered: Jul 2013
Distribution: CentOS/RHEL, Backtrack, many more.
Posts: 58

Rep: Reputation: Disabled
That's something in your firewall, you'll need to confer with Fortinet about that. I don't know much about them.

Here's some information about the OWASP mod_security stuff: https://www.owasp.org/index.php/Cate...le_Set_Project
 
Old 07-10-2013, 10:55 PM   #7
newbie14
Member
 
Registered: Sep 2011
Posts: 646

Original Poster
Rep: Reputation: Disabled
Well on the php and apache should I do anything extra? What else can I use to sanitize my web pages from your experience? I have mod_security enable even before this too. Should I upgrade the rules or it can be done via the normal yum updates?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove script injection from .php and .html files spithakos Linux - Security 14 09-22-2011 03:11 PM
PHP session parameter injection gregorian Linux - Security 5 07-11-2010 01:25 PM
argument relations in CGI script m4rtin Programming 1 02-15-2010 06:51 PM
postgres injection scanner and php vulnerabilities testing tool tajamari Linux - Security 0 02-04-2008 03:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration