Easy A
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 Malicious code

View previous topic View next topic Go down 
AuthorMessage
iZulki
Member
Member
iZulki

Posts : 4
Join date : 2011-07-05

Malicious code Empty
PostSubject: Malicious code   Malicious code EmptySat Dec 10, 2011 4:37 am

I am creating an application that will compile code at runtime and then execute that code.

My worry is this: Someone might make a malicious script, that deletes files for example.

Is there an option in VB.NET that prevents Kill statements and other file operations from executing? Maybe a kind of 'security' feature?

If not, is there another approach that I should take?

Canning
Back to top Go down
Abstract
Member
Member
Abstract

Posts : 3
Join date : 2011-07-05

Malicious code Empty
PostSubject: Re: Malicious code   Malicious code EmptySat Dec 10, 2011 4:38 am

You could theoretically run the compiled code in its own app domain, thereby causing any Kill statements to only take down the process running the script, not your application's proces. If this process was run with zero-privileges, this might stop it doing any file I/O.

We'd have to know why you're compiling code to be able to suggest alternative approaches, however.
Back to top Go down
LiteFire
Member
Member
LiteFire

Posts : 4
Join date : 2011-07-05

Malicious code Empty
PostSubject: Re: Malicious code   Malicious code EmptySat Dec 10, 2011 4:38 am

The code is text. You can always parse it for things you feel are bad. Of course, the problem there is that you will only be able to parse it for things that you know to look for, which may not be an exhaustive set.
Back to top Go down
iZulki
Member
Member
iZulki

Posts : 4
Join date : 2011-07-05

Malicious code Empty
PostSubject: Re: Malicious code   Malicious code EmptySat Dec 10, 2011 4:39 am

LiteFire wrote:
The code is text. You can always parse it for things you feel are bad. Of course, the problem there is that you will only be able to parse it for things that you know to look for, which may not be an exhaustive set.

That idea is my last resort. So there is no 'security' feature built into VB.NET?
Back to top Go down
LiteFire
Member
Member
LiteFire

Posts : 4
Join date : 2011-07-05

Malicious code Empty
PostSubject: Re: Malicious code   Malicious code EmptySat Dec 10, 2011 4:40 am

Security feature? What were you really hoping that there would be? Were you seriously expecting that a programming language would be written with a compiler that would take a look at what the person was writing and decide whether or not to compile it based on whether or not the compiler thought it was benign?
Back to top Go down
Sponsored content




Malicious code Empty
PostSubject: Re: Malicious code   Malicious code Empty

Back to top Go down
 

Malicious code

View previous topic View next topic Back to top 
Page 1 of 1

 Similar topics

-
» Please format code in your posts using the [code][/code] tag!
» Login Code !?
» LG GM-200 RESET CODE without sim
» code request
» Can someone help me to understand this code?

Permissions in this forum:You cannot reply to topics in this forum
Easy A :: Malicious code Edit-trash Useless :: Trash-