Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Techniques to reduce data harvesting from AJAX/JSON services

I was wondering if anyone had come across any techniques to reduce the chances of data exposed through JSON type services on the server (intended to supply AJAX functions) from being harvested by external agents.

It seems to me that the problem is not so difficult if you had say a Flash client consuming the data. Then you could send encrypted data to the client, which would know how to decrypt it. The same method seems impossible with AJAX though, due to the open nature of the Javascript source.

Has anybody implemented a clever technique here?

Whatever the method, it should still allow a genuine AJAX function to consume the data.

Note that I'm not really talking about protecting 'sensitive' information here, the odd record leaking out is not a problem. Rather I am thinking about stopping a situation where the whole DB is hoovered up by bots (either in one go, or gradually over time).

Thanks.

like image 664
UpTheCreek Avatar asked Nov 19 '09 12:11

UpTheCreek


1 Answers

First, I would like to clear on this:

It seems to me that the problem is not so difficult if you had say a Flash client consuming the data. Then you could send encrypted data to the client, which would know how to decrypt it. The same method seems impossible with AJAX though, due to the open nature of the Javascrip source.

It will be pretty obvious the information is being sent encrypted to the flash client & it won't be that hard for the attacker to find out from your flash compiled program what's being used for this - replicate & get all that data.

If the data does happens to have the value you are thinking, you can count on the above.

If this is public information, embrace that & don't combat it - instead find ways to capitalize on it.

If this is information that you are only exposing to a set of users, make sure you have the corresponding authentication / secure communication. Track usage as others have said, and have measures that act on it,

like image 90
eglasius Avatar answered Oct 01 '22 05:10

eglasius