[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Webapplication and security archtitecture



Matthias Mosimann wrote:
Hi everyone


I don't know if here is the right place for such a discussion. But I think I should try it here.

I want to develop a new web application that is able to read some data out of /proc and store it in a database. I also want to use some cmd tools in debian out of my webapp such as tar, zip and unzip.

What is the most secure architecture for such a system? I know there were a lot of discussions arround some web admin tools like webmin and the security bugs arround them. These tools are described as insecure. So what do I have to do that my application isn't insecure? Or what kind of possibilities do I have as developer to avoid a bad architecture.
Well, there's a bit of a difference there.

Webmin is nasty because it often doesn't do any kind of input checking or just it quite badly. Reading up about sql injections would give you an idea how this can be exploited - this however, is only one way.
If I'm not right here, please point me kindly to the right place. If there is any overview, faq or howto arround the architecture around secure webtools on debian, I would be glad to know them.

The application should be written in PHP.
I don't think there is, but couldn't swear to it.
You can already do a lot of this with existing php modules
If, for example, you look at http://pecl.php.net/package/statgrab you'll see you can already pull a lot of information out of what is available from /proc. http://pecl.php.net/package/bz2_filter and http://pecl.php.net/package/bz2 deal with bzip2
http://pecl.php.net/package/zip deals with zips
http://pecl.php.net/package/archive deals with tars

So with this in mind, all you need to do is write a very very simple php script that takes the values shunted out by statgrab and chuck this into a database. You need to know about security, and it's a massively more complex topic than I'm going to write about in a single email - but dealing with an untrusted source of input is a really major part of this.



Reply to: