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 5981025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T21:53:07+00:00 2026-05-22T21:53:07+00:00

How would you implement a feature that would show the user a warning whenever

  • 0

How would you implement a feature that would show the user a warning whenever he opens a file with my application that comes from a source other than his computer?

This is a feature Visual Studio already has:

Visual Studio Warning Message Box

I was thinking about adding some of the user’s system information as a hash code to the file, but this is not very safe as someone else could get this information if he can access any of the files the “victim” has created on his system and see the system ID hash, and then create a file and modify it to contain this system hash.

My other option would be to store a hash of the file together with the system information as a single hash and add this hash instead of the system info hash alone. This way the “hacker” could not figure out the “victim”‘s system hash by opening one of his files.

I know nothing is 100% safe. I read it as a first comment to every single question related to security issues. But do you have any suggestion as what’s a good way to implement such a functionality?

  • 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-22T21:53:07+00:00Added an answer on May 22, 2026 at 9:53 pm

    I think your question is: How do I verify file origin for a given computer even if that computer is compromised?

    Let’s look at the general outline.

    • You create an application.
    • A user on another computer installs your application on their computer.
    • The user generates files.
    • The user’s computer is compromised.
    • The user opens a file in your application.

    Now for the questions:

    What type of compromise are we designing against?

    In the face of a complete compromise there is no solution. In a complete compromise an adversary can modify any application or operating system function.

    So, what compromises can we design against?

    There must be some functions we can still trust. An attacker could compromise your application, in which case any check done by your application could not be trusted. An attacker could compromise the operating system. It is a small step from an operating system compromise to an application compromise. So let’s assume that the attacker has not compromised the operating system or your application. Let’s assume that the attacker has the ability to modify any file on the system except for the file containing your executable, and the files containing essential operating system components.

    How do we authenticate origin?

    Hash values, such as SHA1 and MD5, are used to verify integrity. A hash value on a file can only tell you if the file has been unmodified since the hash was created. It does not tell you where the file came from. A digital signature provides a check on origin. A digital signature tells you that the signed data originated with a person who has control over the key used to sign the message.

    Now if you want to verify that a file on a computer originated from that computer, then every computer must have a different key to sign digital messages.

    This is not a problem if you have only one copy of your application on one computer. But, when you have more than one you need to think about key generation and distribution. Key generation and distribution is a very hard problem. Digital signatures require a public private key pair. The private key has to be protected, and it has to be unique for each computer. We assumed before that an attacker could not modify your application, but I think it is fair to assume that the attacker could read your executable. This assumption makes your executable a poor place to store your private key. You could encrypt you key, but then you need another key to decrypt your key. There are a few possible answers here:

    • Use the operating system to generate the key and to generate signatures.
    • Use a trusted network signing and verification service.
    • Memorize your key. Or memorize a password or pin used to encrypt your key.

    Using the operating system only works if the operating system provides these functions. A basic problem here is how do you know each computer has a unique key?

    The network server is very similar to the operating system, but you could provide greater protection for the server than for an individual’s computer. Given sufficient protection, you can assume that a compromise will be detected and in that event, it will stop the signing and verification service. It also gives you a guarantee of unique keys, because the server will generate a new unique key for each instance of the application.

    I think we’re all familiar with the issues involved with memorized passwords and pins. A slight variant here is that you could use a shorter or simpler password to encrypt a larger more complex key. The downside to the shorter/simpler password is that it becomes easier to brute force decrypt the longer/complex key.

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

Sidebar

Related Questions

I'm planning a chat-like web application, where whenever one user posts something, all other
I need to implement a feature that would allow users to filter table data
I have a need to implement a rating feature and would like to do
I released an app and I've implemented a user-requested feature and would like to
How would you implement a Plugin-system for your Java application? Is it possible to
As part of an application that I'm developing for Android I'd like to show
I would like to implement the following feature using jQuery scrollTo function or some
Why doesn’t Objective-C have namespaces? It seems like a simple feature that would make
I'm writing a drawing program and one feature I would like to implement is
We are working on a restful application that has a 'whiteboard' like feature. I

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.