473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Avoid 'every remote exploit' - is that possible?

In "A Note on Security In PHP" (partly in reference to a security flaw
that exists or recently did exist in phpBB) at
http://nl3.php.net/security-note.php
The PHP Group makes this claim:
"Every remote exploit can be avoided with very careful input validation."
This is very reassuring, if it is true, and it gives much to be said in
favor of implementing PHP in applications that accept remote user input.
But is it true?
One rarely sees an unqualified claim that any mechanism can provide
protection against every exploit, of any kind.
I wonder whether anyone who as read this Note on Security in PHP has
good reason to doubt this categorical claim over the capacity of
well-implemented input validation (using PHP) to "avoid every remote
exploit..."
I'm interested in any expressed view, supporting or refuting this claim.
- Jake Lloyd
Jul 17 '05 #1
4 1964
Jake Lloyd wrote:
In "A Note on Security In PHP" (partly in reference to a security flaw
that exists or recently did exist in phpBB) at
http://nl3.php.net/security-note.php
The PHP Group makes this claim:
"Every remote exploit can be avoided with very careful input validation."
This is very reassuring, if it is true, and it gives much to be said in
favor of implementing PHP in applications that accept remote user input.
But is it true?
One rarely sees an unqualified claim that any mechanism can provide
protection against every exploit, of any kind.
I wonder whether anyone who as read this Note on Security in PHP has
good reason to doubt this categorical claim over the capacity of
well-implemented input validation (using PHP) to "avoid every remote
exploit..."
I'm interested in any expressed view, supporting or refuting this claim.
- Jake Lloyd

Ho hum, anyone saying never is on a hiding to nothing.

It is possible to protect a website that employs PHP but it needs to be
done in conjunction with a security mindset.

Much of the protection needs to be at the Operating System level. Above
that think of firewalls. A concept that I find useful is that of an
onion sliced in half - don't laugh too much. Slice an onion in half and
one sees a series of concentric rings. Each of the rings maps to a level
of security.

With regard to PHP i think the quote is justified. Defensive coding is a
mindset that requires a "what if" type attitude. Unfortunately there are
a lot of mindless hooligans who enjoy finding security holes in systems.
I don't think this is neccesarily a bad practice as long as damage is
not caused to data.

Unfortunately many people developing websites do not have the technical
knowledge or the ability to engage with the concept of asynchronous
environments. Security problems reside within PHP code as the coders do
not consider the "what if" issues that arise.
Chris
Jul 17 '05 #2
NSpam wrote:
Jake Lloyd wrote:
In "A Note on Security In PHP" (partly in reference to a security flaw
that exists or recently did exist in phpBB) at
http://nl3.php.net/security-note.php
The PHP Group makes this claim:
"Every remote exploit can be avoided with very careful input validation."
This is very reassuring, if it is true, and it gives much to be said
in favor of implementing PHP in applications that accept remote user
input.
But is it true?
One rarely sees an unqualified claim that any mechanism can provide
protection against every exploit, of any kind.
I wonder whether anyone who as read this Note on Security in PHP has
good reason to doubt this categorical claim over the capacity of
well-implemented input validation (using PHP) to "avoid every remote
exploit..."
I'm interested in any expressed view, supporting or refuting this claim.
- Jake Lloyd


Ho hum, anyone saying never is on a hiding to nothing.

It is possible to protect a website that employs PHP but it needs to be
done in conjunction with a security mindset.

Much of the protection needs to be at the Operating System level. Above
that think of firewalls. A concept that I find useful is that of an
onion sliced in half - don't laugh too much. Slice an onion in half and
one sees a series of concentric rings. Each of the rings maps to a level
of security.

With regard to PHP i think the quote is justified. Defensive coding is a
mindset that requires a "what if" type attitude. Unfortunately there are
a lot of mindless hooligans who enjoy finding security holes in systems.
I don't think this is neccesarily a bad practice as long as damage is
not caused to data.

Unfortunately many people developing websites do not have the technical
knowledge or the ability to engage with the concept of asynchronous
environments. Security problems reside within PHP code as the coders do
not consider the "what if" issues that arise.
Chris

Most of the security problems associated with PHP are a result of sloppy
coding and unitialised variables. The sort of thing that a compliler
catches.

PHP like most scripting languages performs an implicit variable creation
if the referenced item does not exist.

Thus in C or any other strongly type language

x = 1;

result - compiler error with undefined variable

PHP

$x =1;

no problem

where the sloppiness comes in with PHP is when using GET and POST
content coupled with auto allocation of a symbol.

Effectively, one has to do the job of a compiler in the PHP source to
ensure that you know exactly where the content of the variable was
derived from.


Jul 17 '05 #3

where the sloppiness comes in with PHP is when using GET and POST
content coupled with auto allocation of a symbol.

A great example of this (and a common PHP coding error) occurs when
using session variables with register globals enabled. For example, if
users succesfully login and you have a session variable called
"authorized," you might say at the top of each page:

if($authorized == false)
//redirect to the login page

But if someone goes to any page and adds ?authorized=1 to the end of
the URL, they can bypass the login. Register globals registers GET and
POST variables in the global scope, and, by default, get registered
after session variables. In other words, if you have GET or POST
variables by the same name as a session variable, the GET or POST
variables will overwrite the session variable (although this order can
be changed in php.ini).

It's important to note that it isn't register globals by itself that
enables this, but rather the complacency that it allows programmers to
get away with. The safer route is to use $_SESSION['authorized']
instead. That will work with register globals enabled or disabled, but
disabling it forces you to use the $_ global variables instead. This
in turn guarantees that you know where the data came from.

Jul 17 '05 #4
"Jake Lloyd" <le******@acm.org> wrote in message
news:42***********************@news.wanadoo.fr...
In "A Note on Security In PHP" (partly in reference to a security flaw
that exists or recently did exist in phpBB) at
http://nl3.php.net/security-note.php
The PHP Group makes this claim:
"Every remote exploit can be avoided with very careful input validation."
This is very reassuring, if it is true, and it gives much to be said in
favor of implementing PHP in applications that accept remote user input.
But is it true?


That's a gross simplication of course. What they mean is "Every remote
exploit involving invalid input can be avoid with very careful input
validation." Other types of exploits, naturally enough, requires other
prevention methods.
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Velan | last post by:
Greetings, Would anyone know the HTML code concerning the MHTMLRedir.Exploit exploit..?
44
by: Carlos Andr?s | last post by:
Hi everybody. I've got a problem. I'd like to avoid opening a new window when you have pressed the shift key and you click in the left button of the mouse. I've tried the next solution, in the...
2
by: Alex Hunsley | last post by:
Symantec antivirus has apparently picked up a virus in my Python 2.4 (under cygwin): Scan type: Scheduled Scan Event: Threat Found! Threat: Bloodhound.Exploit.49 File: ...
14
by: dave.dolan | last post by:
Basically I'd like to implement the composite design pattern with leaves that are either of reference or value types, but even using generics I can't seem to avoid boxing (using ArrayList or...
40
by: navti | last post by:
I saw here http://java.sun.com/javase/6/docs/technotes/tools/share/jsdocs/index.html that javascript has built-in methods such as cp, dir, date etc how do i get these to run on the client...
11
by: Schraalhans Keukenmeester | last post by:
It's been mentioned here a couple of times in different threads regarding image uploading. It's not new, but I found a clear explanation of what it is and how to deal with it. Hope it helps some of...
8
by: Olivier BESSON | last post by:
Hello, VB.NET 1.1 IIS 6 I'm developping a winform client app of a web service of mine. I used to set the IDE with "halt in debugger" on "common language runtime exceptions". Every time i...
11
Niheel
by: Niheel | last post by:
http://bytes.com/images/howtos/information_overloaded.jpgPaul Graham wrote an interesting article a few months back about how the internet is leading to information overload for information workers...
36
by: CK | last post by:
How do I write a set based query? I have a groupSets table with fields setId, idField, datasource, nameField, prefix, active Data: 1,someIDfield, someTable, someField, pre1, 1 2,someotherIDfield,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.