How to prevent application from sending my private data to the internet?

I have a third-party dll (say, NotTrusted.dll), which I want to use in application (I’ll call my application NotTrusted.exe, because it is supposed to use dll, I don’t trust) written on .Net (Language: c#, Dev tool: Visual Studio 2008, OS: MS Windows 7 Pro). The problem is that this dll (for its normal work) should have access to my private data. My task is to protect this data from leaking from my computer.

Normal activity of the application NotTrusted.exe should be the following:

  1. Communicate with another application, which I’ll call KnownApp.exe, in 3 different ways:
    1.1. by DDE (Direct Data Exchange, a way of interprocess communication).
    1.2. by calling WinAPI functions (through the use of KnownAppAPI.dll)
    1.3. by sending Windows messages to KnownApp.exe
  2. Writing and reading files to/from directories "D:\Data\NotTrusted" and "D:\App\NotTrusted".

Both folders and applications are located on the same computer, KnownApp.exe should have access to the internet for its normal functioning.

I believe, that application KnownApp.exe will not send my private data to the internet, so I believe, that communication, described in 1. is not dangerous. However I want to be sure, that application NotTrusted.exe will not send my data by some other means.

Unfortunately, I am new to this field of knowledge (I’ve just installed COMODO Firewall). Please, say me, what is better to read or do to solve this problem.

I think you can make the untrusted .dll a blocked application in the CIS network security policy.

Even though it is not a .exe

You might want to check this using a .dll you know accesses the internet.

If this is what you meant then I’ll need to move this to firewall help!

Best wishes


be carefull !
if you blocked internet explorer in the past (both, running AND connecting to internet), steam was able to run backpacked some parts of IE still to connect to websites ! you wouldnt be asked “IE tries to connect”, the question was “steam tries to connect”. you see? it could happen exact the same with your trusted application, but in reallity the bad dll is sending (but, in the end its not important who does, personal data could get send)! now steam doesnt use parts of IE anymore, so i cant tell if this problem is happening today.

and in your case, .dll may be not as clear been blockable as the exe “seemed to be”, until this blocking failed proven.