473,408 Members | 1,908 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,408 software developers and data experts.

.NET Security

Frinavale
9,735 Expert Mod 8TB
Hi there,

I don't know if anyone can help me but I've been trying to secure my VB.NET web application so that no outside applications can call my application's custom resources.

Basically I want my code to check to see if the code calling it has permission to do so. I don't want any code that hasn't been written by me to access any of these custom resources.

I've been researching CAS the last few weeks and really like the idea of using Demands to check the application stack and make sure that all the calling code has a particular key.

I understand that this works using Strong Names and Trust Levels. (I could be wrong here so if anyone knows more I'd be grateful!)

I've managed to try out this technology and have successfully used Demands on a practice project that uses all .NET technology.

BUT my web application uses a resource that is unmanaged code (not .NET). All of my attempts to use the CAS have failed because of this small but major detail.

It seems that I cannot use .NET' CAS Security features for any of my web application's resources because of this one function call to an unmanaged assembly (which I also need to secure).

Does anyone know if I'm heading in the right direction here?
Is there a way to somehow use CAS even though I reference an unmanaged code assembly ?
(I've been trying to wrap it inside a .NET wrapper class but all my attempts have failed....)
Is there a way to some how use the Interop assembly in all of this?
Is this possible?
Is there another way to do this?

Thanks in advance!

-Frinny
Mar 12 '07 #1
3 1233
kenobewan
4,871 Expert 4TB
Could you provide provide an example of what you mean and any exceptions?
Mar 13 '07 #2
I understand that this works using Strong Names and Trust Levels. (I could be wrong here so if anyone knows more I'd be grateful!)
Strong names are used to uniquely identify assemblies. F.X Dana Developer creates a dll "lib.dll" with a function "void InitSystem()".

Suppose Hans Haxxor creates an malware dll called lib.dll with a badness-function he calls "void InitSystem()". If he manages to replace Dana's dll with his bad one he might do bad things.

For your system to avoid that you can use strong names. F.x Dana can be sure that her dll is called or no dll at all.

HTH,
Per

--
Per Erik Strandberg
Home: http://www.pererikstrandberg.se/blog/ .
Optimization in .NET: http://tomopt.com/tomnet/ .
Mar 14 '07 #3
Frinavale
9,735 Expert Mod 8TB
Strong names are used to uniquely identify assemblies. F.X Dana Developer creates a dll "lib.dll" with a function "void InitSystem()".

Suppose Hans Haxxor creates an malware dll called lib.dll with a badness-function he calls "void InitSystem()". If he manages to replace Dana's dll with his bad one he might do bad things.

For your system to avoid that you can use strong names. F.x Dana can be sure that her dll is called or no dll at all.

HTH,
Per

--
Per Erik Strandberg
Home: http://www.pererikstrandberg.se/blog/ .
Optimization in .NET: http://tomopt.com/tomnet/ .
I don't understand how Hans Haxxor can create an assembly that has the same Strong name as F.x Dana.

Strong names are created using some fancy cryptographic Microsoft stuff combined with the name you've given the assembly and version etc. Therefore, no two assemblies should ever have the same strong name. If an assembly has the same strong name as another assembly its considered to be the same, so how does the Haxxor's software manage to get the same strong name as F.x Dana?

I've read this advice else where too, but I'm not clear on why.

If I'm not supposed to use Strong names, then how am I supposed to check that the code that's calling my application's components is my code?

-Frinny
Mar 15 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: robert | last post by:
well, talk about timely. i'm tasked to implement a security feature, and would rather do so in the database than the application code. the application is generally Oracle, but sometimes DB2. ...
116
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data...
4
by: Ashish | last post by:
Hi Guys I am getting the following error while implementing authentication using WS-security. "Microsoft.Web.Services2.Security.SecurityFault: The security token could not be authenticated...
1
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
3
by: Earl Teigrob | last post by:
Background: When I create a ASP.NET control (User or custom), it often requires security to be set for certain functionality with the control. For example, a news release user control that is...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.