473,395 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

.NET Framework Question

I'm reading up on Visual C# and chapter 14 is introducing me to the
..net framework...

I'm a little curios it says that one of the function of the CLR is to
protect users from malicious code...

Q. How does it do that?
Q. What does it define as malicious code?

For instance a program that simply had a command to format the hard
drive i'd imagine would get through without a problem, so am I
misunderstanding malicious code here?

I'm really curious about this and can't wait for your replies,

Thanks,

Gary.

Mar 17 '06 #1
6 1131
If you think that program run by you can format HD, why don't you try it
from the command line:
format c:
It would be exactly the same.
Mar 17 '06 #2
Hello,

That is quite a simple, but very good example.

One of the main principals of the .net framework is security, which to be
honest, has been needed for years.

To create an application in .net and expect it to run on every machine is a
very silly mistake to make and you will quickly find yourself running into
issues.

The basic principal is simply, if code has not been trusted, it wont run and
thats it in laymens terms.

So if you try to run a peice of software wrote in .net over the network, you
may find it wont work,because it has not been trusted on the local computer.

Regards

Scott Blood
C# Developer

"PiotrKolodziej" <pi*************@gmail.com> wrote in message
news:75**************************@news.chello.pl.. .
If you think that program run by you can format HD, why don't you try it
from the command line:
format c:
It would be exactly the same.

Mar 17 '06 #3
Oh i see so its like the thing you see when you're installing applets
accross the internet and it asks if you trust the source... that's how
it differentiates malicious code from non malicious, if the user is
willing to click the 'i trust this' button!

thanks now I see what it means by malicious code

:)

Mar 17 '06 #4

<ga********@myway.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Oh i see so its like the thing you see when you're installing applets
accross the internet and it asks if you trust the source... that's how
it differentiates malicious code from non malicious, if the user is
willing to click the 'i trust this' button!

thanks now I see what it means by malicious code


Not entirely, but close. By providing fairly fine grained access control
over alot of features, the runtime offers levels of trust. Code run from the
internet, for example, probably will not have read/write access to the
registry or file system(other than isolated storage) or be capable of
calling into Win32 directly or accessing memory or what have you. This keeps
untrusted code from doing very bad things.

The trust system expands to the application level as well. A program that
uses plugins can, if written properly, restrict what the plugins are
permitted to do, programs that use .NET based scripts\macro's could restrict
the feature set macro's are permitted to have, and so on.

Still, this doesn't save you entirely. A user who is willing to move the
application into a more trusted zone will still run risks. It is a step, but
the user has to be careful too.
Mar 17 '06 #5
Hello,

As Daniel said, the levels of security within the framework, extend way past
what win32 offered us.

The plugin example is a very good one and is probably one of the reasons he
is an MVP.

If you create a simple application then ammends a registry entry and then
places a file on the users computer, depending on the trust levels
associated with the assembly or application, will depend on whether or not
these functions fail.

It is really your responsibility as a developer to ensure that the
application is wrote in a way, that hides the user from these complexities
and ensures that code being run will be allowed to run so that the user
dosn't receieve error messages that they may not understand or really want
to understand.

Regards
Scott Blood
C# Developer

"Daniel O'Connell [C# MVP]" <onyxkirx@--NOSPAM--comcast.net> wrote in
message news:eD**************@TK2MSFTNGP11.phx.gbl...

<ga********@myway.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
Oh i see so its like the thing you see when you're installing applets
accross the internet and it asks if you trust the source... that's how
it differentiates malicious code from non malicious, if the user is
willing to click the 'i trust this' button!

thanks now I see what it means by malicious code


Not entirely, but close. By providing fairly fine grained access control
over alot of features, the runtime offers levels of trust. Code run from
the internet, for example, probably will not have read/write access to the
registry or file system(other than isolated storage) or be capable of
calling into Win32 directly or accessing memory or what have you. This
keeps untrusted code from doing very bad things.

The trust system expands to the application level as well. A program that
uses plugins can, if written properly, restrict what the plugins are
permitted to do, programs that use .NET based scripts\macro's could
restrict the feature set macro's are permitted to have, and so on.

Still, this doesn't save you entirely. A user who is willing to move the
application into a more trusted zone will still run risks. It is a step,
but the user has to be careful too.

Mar 17 '06 #6
ga********@myway.com wrote:
I'm reading up on Visual C# and chapter 14 is introducing me to the
.net framework...

I'm a little curios it says that one of the function of the CLR is to
protect users from malicious code...

Q. How does it do that?


May be a good read:
http://www.awprofessional.com/articl...&seqNum=3&rl=1
Mar 17 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Francis Lavoie | last post by:
Hello I have some questions regarding webframework, I must say that I quite lost and these questions are basicly to help me understand the way it work. I have some knowledge with PHP and JSP....
6
by: Al Dykes | last post by:
I've just grabbed a PHP book and can deal with the syntax and now I need to decide to learn specific packages and features. Define "framework". What are the major framework flavors ? Under...
3
by: Newbee Adam | last post by:
what OS come with .NET framework!? How can I install .Net Framework on say a win 98 and win 2000 machine? does the .Net framework need for the win 98 and 2000 machone come with visual...
20
by: truetype | last post by:
Greetings! I consider to create an application using .NET Framework. It would be used by any kind user, mostly those who do not know anyting about programming and ..NET Framework. But have...
3
by: Eric | last post by:
Hi, I'm just looking into the samples that are delivered withthe Enterprise Localization Framework/Toolkit. I have set it up and it all works fine. But.. now i have a question. I read a...
23
by: Nak | last post by:
Hi there, Has anyone any ideas if the next Framework will be an update to version 1.1 or another completely new install so that people have 3 Frameworks on their system? And can VS.NET 2003 be...
5
by: Steve Sprague | last post by:
I have a .Net Framework question. I have installed VB.NET version 1.0.3705 I tried to install a small tutorial utillity. It told me I first needed to upgrade my Framework Version. So I went to...
5
by: x9012590125 | last post by:
Hi. I've been looking high and low, but nowhere is this simple question answered... This concerns .NET Framework v1.1 vs. v2.0. Does .NET Framework v2.0 include v1.1, + SP1, + post-SP1 bug...
10
by: lawrence k | last post by:
I work mostly in PHP, but at the web design firm where I work we are thinking of switching to Ruby on Rails. Our lead designer recently installed Typo on a client's site and he said to us, with...
8
by: Blasting Cap | last post by:
I'm using VS 2005, and have a dll in some code (system.core.dll) that was included in something someone sent me to run on my system. I have production on a server using Framework 2.0 that I want...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.