views:

49

answers:

2

By security reason I ask this... Can .cs or .vb files to run in any way without calling those in asp.net?

+1  A: 

they can be compiled using csc.exe or vbc.exe and then run as .exe, but this can be done only if malevolent user has logged in at your server.

And if so he can do mostly anything his windows account permits.

elder_george
+1  A: 

C# and VB script requires a host to interpret the code. Windows Explorer wont interpret C# or VB script. However, there are applications which can be launched which will interpret the script. For example, cscript.exe can interpret *.vbs files and execute the code within it.

There are also other more malevolent techniques to trick applications into executing script. This is particularly used in getting Microsoft office to open exploits on computers via scripting.

Andrew Keith