Click here to Skip to main content
12,349,757 members (26,845 online)
   

C#

 
GeneralRe: Record desktop video with AviWriter Pin
Meryeme2-Mar-11 3:22
memberMeryeme2-Mar-11 3:22 
AnswerRe: Record desktop video with AviWriter Pin
Sandeep Mewara2-Mar-11 3:16
mvpSandeep Mewara2-Mar-11 3:16 
GeneralRe: Record desktop video with AviWriter Pin
Meryeme2-Mar-11 3:30
memberMeryeme2-Mar-11 3:30 
GeneralRe: Record desktop video with AviWriter Pin
Sandeep Mewara2-Mar-11 3:33
mvpSandeep Mewara2-Mar-11 3:33 
Questiongetting data from internet Pin
faraz342-Mar-11 2:36
memberfaraz342-Mar-11 2:36 
AnswerRe: getting data from internet Pin
OriginalGriff2-Mar-11 2:47
mvpOriginalGriff2-Mar-11 2:47 
AnswerRe: getting data from internet Pin
code in play2-Mar-11 5:14
membercode in play2-Mar-11 5:14 
GeneralRe: getting data from internet Pin
Cardon Fry2-Mar-11 7:33
memberCardon Fry2-Mar-11 7:33 
AnswerRe: getting data from internet Pin
Bernhard Hiller2-Mar-11 23:07
memberBernhard Hiller2-Mar-11 23:07 
QuestionHow can I use 3D modules(Such as DirectX or OpenGL)in my programming... Pin
hamidhesar2-Mar-11 0:37
memberhamidhesar2-Mar-11 0:37 
AnswerRe: How can I use 3D modules(Such as DirectX or OpenGL)in my programming... Pin
Pete O'Hanlon2-Mar-11 1:05
mvpPete O'Hanlon2-Mar-11 1:05 
QuestionProblem in sending sms from pc to mobile through AT commands [modified] Pin
aeman1-Mar-11 23:27
memberaeman1-Mar-11 23:27 
AnswerRe: Problem in sending sms from pc to mobile through AT commands Pin
Thomas Krojer1-Mar-11 23:33
memberThomas Krojer1-Mar-11 23:33 
QuestionAppDomain.CurrentDomain.SetData(SOME_SECRET_KEY, PrivateKey) [modified] Pin
devvvy1-Mar-11 22:53
memberdevvvy1-Mar-11 22:53 
Hello

If I set some secret/sensitive information in AppDomain ...
AppDomain.CurrentDomain.SetData(SOME_SECRET_KEY, PrivateKey)

How can I protect it from third party dll loaded on demand? For example, in our application which hosts third party dll,
MaliciousLib = Assembly.LoadFrom(DllPath);
oService = MaliciousLib.CreateInstance("xxxx.xxxx.xxxx");
ISomeService Service = (ISomeService) oService;
Service.DoSomeWork(...);


Here, MaliciousLib can also access AppDomain and retrieves secret key.

I'm considering loading third party dll's into separate app domain (In which case they can't have access to the main AppDomain right...? In which case, next logical question - how 3rd party lib communicates back to main assembly... while it can't access main assembly's AppDomain variables, perhaps "function call return" would suffice ...)[^]

But I just done some testing, User dll methods can still access AppDomain.CurrentDomain!
oSecret = AppDomain.CurrentDomain.GetData("KEY1");

Many articles discuss theories surrounding AppDomain, how one process can host multiple AppDomain and disaster occurring in one won't bring down the whole process - but really? Thought that's .NET v1 behavior - from v2 on disaster in one AppDomain will bring down the whole process. Also, regarding Get/SetData from security perspective, there's nothing on Google. From my experiment, there isn't any security control on Get/SetData![^]

So really how to protect main app from loaded third party components? Any suggestion?
dev
modified on Wednesday, March 2, 2011 11:25 PM

QuestionAssembly.GetExecutingAssembly - can we get "Key" which signed the assembly? Pin
devvvy1-Mar-11 22:49
memberdevvvy1-Mar-11 22:49 
AnswerRe: Assembly.GetExecutingAssembly - can we get "Key" which signed the assembly? Pin
Keith Barrow1-Mar-11 23:23
mentorKeith Barrow1-Mar-11 23:23 
GeneralRe: Assembly.GetExecutingAssembly - can we get "Key" which signed the assembly? [modified] Pin
devvvy2-Mar-11 16:08
memberdevvvy2-Mar-11 16:08 
QuestionHow to block read / write operation of cd/dvd [modified] Pin
Aisha sharma1-Mar-11 22:24
memberAisha sharma1-Mar-11 22:24 
AnswerRe: How to block read / write operation of cd/dvd Pin
Keith Barrow1-Mar-11 22:55
mentorKeith Barrow1-Mar-11 22:55 
AnswerRe: How to block read / write operation of cd/dvd Pin
Dalek Dave7-Mar-11 11:22
mvpDalek Dave7-Mar-11 11:22 
QuestionLoad picture from resource file with XAML Pin
Mc_Topaz1-Mar-11 21:25
memberMc_Topaz1-Mar-11 21:25 
AnswerRe: Load picture from resource file with XAML Pin
Pete O'Hanlon1-Mar-11 21:31
mvpPete O'Hanlon1-Mar-11 21:31 
GeneralRe: Load picture from resource file with XAML Pin
Mc_Topaz1-Mar-11 21:36
memberMc_Topaz1-Mar-11 21:36 
AnswerRe: Load picture from resource file with XAML Pin
ltuljo2-Mar-11 14:46
memberltuljo2-Mar-11 14:46 
QuestionPostgres database connection Pin
Software20071-Mar-11 9:32
memberSoftware20071-Mar-11 9:32 
AnswerRe: Postgres database connection Pin
orc_orc_orc1-Mar-11 9:38
memberorc_orc_orc1-Mar-11 9:38 
GeneralRe: Postgres database connection Pin
Software20071-Mar-11 9:45
memberSoftware20071-Mar-11 9:45 
GeneralRe: Postgres database connection Pin
Dave Kreskowiak1-Mar-11 9:46
mvpDave Kreskowiak1-Mar-11 9:46 
AnswerRe: Postgres database connection Pin
Dave Kreskowiak1-Mar-11 9:45
mvpDave Kreskowiak1-Mar-11 9:45 
GeneralRe: Postgres database connection Pin
Software20071-Mar-11 9:56
memberSoftware20071-Mar-11 9:56 
AnswerRe: Postgres database connection Pin
Pete O'Hanlon1-Mar-11 9:56
mvpPete O'Hanlon1-Mar-11 9:56 
GeneralRe: Postgres database connection Pin
Software20071-Mar-11 10:26
memberSoftware20071-Mar-11 10:26 
GeneralRe: Postgres database connection Pin
Pete O'Hanlon1-Mar-11 10:34
mvpPete O'Hanlon1-Mar-11 10:34 
GeneralRe: Postgres database connection Pin
Software20071-Mar-11 10:40
memberSoftware20071-Mar-11 10:40 
AnswerRe: Postgres database connection Pin
PIEBALDconsult1-Mar-11 13:55
memberPIEBALDconsult1-Mar-11 13:55 
QuestionFile.Move() method Pin
orc_orc_orc1-Mar-11 9:30
memberorc_orc_orc1-Mar-11 9:30 
AnswerRe: File.Move() method Pin
Dave Kreskowiak1-Mar-11 9:39
mvpDave Kreskowiak1-Mar-11 9:39 
GeneralRe: File.Move() method Pin
orc_orc_orc1-Mar-11 10:05
memberorc_orc_orc1-Mar-11 10:05 
QuestionAccess asymbly version Pin
jashimu1-Mar-11 3:02
memberjashimu1-Mar-11 3:02 
AnswerRe: Access asymbly version Pin
musefan1-Mar-11 3:15
membermusefan1-Mar-11 3:15 
GeneralRe: Access asymbly version Pin
jashimu1-Mar-11 3:22
memberjashimu1-Mar-11 3:22 
AnswerRe: Access asymbly version Pin
musefan1-Mar-11 3:26
membermusefan1-Mar-11 3:26 
AnswerRe: Access asymbly version Pin
Henry Minute1-Mar-11 3:16
mvpHenry Minute1-Mar-11 3:16 
GeneralRe: Access asymbly version Pin
musefan1-Mar-11 3:22
membermusefan1-Mar-11 3:22 
GeneralRe: Access asymbly version Pin
Henry Minute1-Mar-11 3:24
mvpHenry Minute1-Mar-11 3:24 
GeneralRe: Access asymbly version Pin
musefan1-Mar-11 3:29
membermusefan1-Mar-11 3:29 
AnswerRe: Access asymbly version Pin
Richard MacCutchan1-Mar-11 3:21
mvpRichard MacCutchan1-Mar-11 3:21 
QuestionCreating xml file using SAX parser Pin
HaroldVish1-Mar-11 2:18
memberHaroldVish1-Mar-11 2:18 
AnswerRe: Creating xml file using SAX parser Pin
Keith Barrow1-Mar-11 2:32
mentorKeith Barrow1-Mar-11 2:32 
QuestionCreate Update for Install Package Pin
Enobong Adahada1-Mar-11 0:34
memberEnobong Adahada1-Mar-11 0:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 24 Jun 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid