N
Nak
Hi there,
I have just decided to attempt to secure my .NET app as much as
possible. The main reason I want to do this is because I have implemented a
plug-in engine, I thought that it would be quite easy for someone to make a
rogue plug-in that deleted files, or done other malicious tasks.
Anyway, the plugins that I have implemeneted so far are passed either 1
filename, or an array of filenames. Ideally I want to plugin to be able to
*read* ONLY the files that it has been passed, that means no access on *any*
other files or write access to the file.
I thought that this could be done quite simply by using the
FileIOPermission class. And yes it was, I implemented a quick deny and
revert deny before and after the plugin is called and it prevents the plugin
from writing to the file. But I could not work out how to set ALL
permissions, i.e. I want to set only read access for the files that it is
being passed and nothing else, how would I go about doing this?
Is there a way that you can deny permissions to everything and then
grant permissions to 1 thing? It would be nice to prevent the plug-ins from
doing *anything* malicious. Thank you very much for your help in advance,
and I look forward to advice on this one, a vice like grip shalt protect my
app's plugins from doing anything dubious!
Nick.
P.S.
Just a thought, is the best way to make an app 100% secure by deny all
permissions outright and having to grant permissions everytime a task is
performed that would need permissions? i.e.
1. When the app loads, deny all permissions
2. The app wants to change a system setting
3. The permissions are granted (or requested?)
4. The setting is changed
Just an idea, I'm probably miles of the mark!
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
I have just decided to attempt to secure my .NET app as much as
possible. The main reason I want to do this is because I have implemented a
plug-in engine, I thought that it would be quite easy for someone to make a
rogue plug-in that deleted files, or done other malicious tasks.
Anyway, the plugins that I have implemeneted so far are passed either 1
filename, or an array of filenames. Ideally I want to plugin to be able to
*read* ONLY the files that it has been passed, that means no access on *any*
other files or write access to the file.
I thought that this could be done quite simply by using the
FileIOPermission class. And yes it was, I implemented a quick deny and
revert deny before and after the plugin is called and it prevents the plugin
from writing to the file. But I could not work out how to set ALL
permissions, i.e. I want to set only read access for the files that it is
being passed and nothing else, how would I go about doing this?
Is there a way that you can deny permissions to everything and then
grant permissions to 1 thing? It would be nice to prevent the plug-ins from
doing *anything* malicious. Thank you very much for your help in advance,
and I look forward to advice on this one, a vice like grip shalt protect my
app's plugins from doing anything dubious!
Nick.
P.S.
Just a thought, is the best way to make an app 100% secure by deny all
permissions outright and having to grant permissions everytime a task is
performed that would need permissions? i.e.
1. When the app loads, deny all permissions
2. The app wants to change a system setting
3. The permissions are granted (or requested?)
4. The setting is changed
Just an idea, I'm probably miles of the mark!
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
"No matter. Whatever the outcome, you are changed."
Fergus - September 5th 2003
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\