Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1010769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T09:08:03+00:00 2026-05-16T09:08:03+00:00

I have 3 components in my system: COM Object – Provide Services to application

  • 0

I have 3 components in my system:

  1. COM Object – Provide Services to application that has func1(), func2()
  2. App1 – Trusted Application that need to use the com object funcs (1 and 2)
  3. App2 – Malicious application, not authorized to use func1(), can use func2() it is not harmful.

How can the COM Object can “authenticate” App1 and allowing it to use func1() and func2() and deny access to func1() from App2 ?

One way to do it is by allowing only Administrators users to access func1() but this is not a good solution because of security best practice: run with least privileged user. App1 will only need admin to access to the COM Object, any security hole in App1 will give the attacker Admin access.

How can this be solved?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T09:08:03+00:00Added an answer on May 16, 2026 at 9:08 am

    In general you should define more exactly how you want to devide (identify) “good” aplication which are allowed to use your COM object from other “bad” applications.

    If your COM object are in-proc server (a DLL which will be loaded in the address space of the application which use it) then you can make “quick & dirty” solution: Inside of the DllMain you can test the name of the exe file which loaded your dll. You can do this with respect of GetModuleFileName with NULL as the first parameter. If a “wrong” exe try to load your dll the DllMain can return FALSE. The same test you can do in any of your method instead of DllMain.

    The best general way to solve your problem (the best which I see of cause) will be to add an additional method to your COM Object which you can use to authorize the caller. For example, to use any “secret” functions like func1() you can require the caller to call another authorize() function before. The caller give your COM Object as input prameter of authorize() some information which can be used to verify the caller permissions. If the authorization is OK, authorize() will gives back an authorization token (cookie) which can be anything which you can easy to verify later. The best tokens should be based on cryptografical algorithms like digitaly signing. The function func1() can have an additional parameter – the token (cookie) received from authorize1(). In this way you can implement any kind of authorization which you want. This way will works with any kind of COM Objects (not only with in-proc-servers).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a system that has many components interacting with each other. It occured
I have a .NET application that contains a checkbox (System.Windows.Forms.Checkbox). This component (WindowsForms10.BUTTON.app.0.378734a1) is
We've got an Enterprise system which has many processes (EXEs, services, DCOM servers, COM+
I have the following COM object installed on one of our servers that I
I have a COM component written in C++ that has a Print function. This
First of all, I have to say that I'm going to talk about System.ComponentModel.Component
Say I have components that I need to iterate through, for example From and
In SDL Tridion 2009 SP1 we have Components that are added to Structure Group
I have a COM object I imported in my test C# solution. Everything works
I have a Delphi application that communicates with web servers on the Internet using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.