Inside Paulo Abrantes' head
[ start | index | login or register ]
start > 2006-01-06 > 1

Bringing Hash Functions to Apache

Created by pabrantes. Last edited by pabrantes, 2 years and 233 days ago. Viewed 1,168 times. #4
[diff] [history] [edit] [rdf]
labels
Category:security
attachments
public_key_cryptography.jpg (16546)

Bringing Hash Functions to Apache

public_key_cryptography Some days ago I've started thinking if there would be a way of implementing the concept of "unautherize file modification awareness" into apache, via apache modules.

The main objective of implementing this concept is to give the ability of distinguish of a good page, from a modified (normally defaced) page to apache. If the defaces stopped showing, maybe the kiddies would stop doing them (or not).

The request process would be something like this:

  1. client request page X.
  2. see if page X was modified or not.
  3. if it's modified, issue an error, for example a 504 Server Temporary Unavailable, otherwise move to 4.
  4. just let the request continue.
And how could we see if the files were modified? The answer is, using an >> Hash Function.

For each file that should be protected an hash would be generated, and then stored in a configuration file where every pair (file,hash) was present.

Having this configuration file, a new problem arises, how can we secure it, in order to prevent an attacker from changing it? Once again, the answer relies in >>cryptography, using >>Asymetric Cryptography.

The sysadmin would generate an asymmetric key, the apache server would know the public key, and the configuration file with the hashes would be encrypted with the sysadmin secret key, in other words the configuration file would be signed by the sysadmin, so nobody can actually change it! Doing this, we have secured the configuration file.

Although, there are always attack vectores, if it's a more "experienced" attacker and actually gained root in the host, he can just turn off the support for this module in httpd.conf. But there is no system 100% secure, so there are always security problems somewhere.

So, does anyone think it's a good idea? Or it's just smoke and mirrors?

no comments | post comment
Who am I?
paulo-roca2My name is Paulo Abrantes AKA pabrantes and I'm a software developer. I'm currently employed at >>CIIST working as a Java developer in >>FenixEDU.

This blog is mostly about Java programming, domain driven design and snipsnap bliki developing. Everything written in this blog is my personal opinion and it may not reflect the opinions of my employer and co-workers.


Blog subscription
subscribe by rss subscribe by email

Links
>> Home
>> Paulo's Profile
>> Post History
>> Add to Technorati Favorites
>> Paulo's Photo Gallery
>> WishList
>> Posting without Login

Search Blog
Fellow Bloggers

Recent Posts

Java Programming: Bytecode Injection
Intermission: Sorry For Downtime
Software Developing: Studying The Bliki Domain Model
SnipSnap Developing: Trying to settle a roadmap
System Administration: Load Balancing with Apache
Blogging: Two years have passed
Software Developing: The SnipSnap Saga
Java Programming: Getting your code spicy with Groovy
Software Developing: Fluent Interfaces
Software Developing: Implementing a ShoutBox on SnipsSnip
Software Developing: SnipSnap, SnipIt and SnipSnip
Java Programming: Proxies and Access Control
Java Programming: Proxies and References
Java Programming: References' Package
YALM: Yet Another Layout Modification

For older posts, please refer to post-history for a complete Post History

Logged in Users: (0)
… and 6 Guests.
This is a modified version of snipsnap.org created by >>Paulo Abrantes