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

How to detect that the application itself is modifed.

Cat
Hello.
Let's say there is a simple Windows executable, app.exe
When app.exe is executed, I would like to check if the
app.exe is modified by others than me. Creating CRC data
would be a right choice but I then do I have to do that
all the time I recompile the app? Where to save the CRC
data anyway?

Any advice will be appreciated. Thank you, people.

Nov 17 '05 #1
5 1275
Cat wrote:
Hello.
Let's say there is a simple Windows executable, app.exe
When app.exe is executed, I would like to check if the
app.exe is modified by others than me. Creating CRC data
would be a right choice but I then do I have to do that
all the time I recompile the app? Where to save the CRC
data anyway?

Any advice will be appreciated. Thank you, people.


Generate new key by: sn -k keyname.snk

And add this to AssemblyInfo.cs:

[assembly:AssemblyKeyFile("keyname.snk")]

When someone modify your app it won't run.
Nov 17 '05 #2
One option would be to use third party tools that encrypt and wrap your
executable into an enclosing executable.

When the enclosing executable is run, it decompresses your application
in memory.

One such tool is Armadillo (aka SoftwarePassport).

--
EventStudio 2.5 - http://www.EventHelix.com/EventStudio
Generate Sequence diagrams from a simple declarative language

Nov 17 '05 #3
Cat
Thanks. This ways looks very simple and reasonable. The app won't run
all right, but the problem is it shows a crash dialogue like "... has
encountered a problem and needs to close. We are sorry..". Instead, I
just want to inform the users that this app might be infected by a
virus and guide them to my homepage to re-download it. To do that, my
app should run. Any other way?

Nov 17 '05 #4
Cat wrote:
Thanks. This ways looks very simple and reasonable. The app won't run
all right, but the problem is it shows a crash dialogue like "... has
encountered a problem and needs to close. We are sorry..". Instead, I
just want to inform the users that this app might be infected by a
virus and guide them to my homepage to re-download it. To do that, my
app should run.


That's a nice idea, but not very safe. Who says that if a virus has
infected your app, it's not already loaded when you get to the point
where you inform the user? Doing this "from the outside" of your app, as
the .NET framework does with assembly strong names, is a much safer
approach.

Oliver Sturm
--
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619 http://www.sturmnet.org/blog
Nov 17 '05 #5
Moreover, if it was virus that targeted .Net exe, they would surely "resign"
your app with it's own private key and app would load and run on way - with
what ever code the virus injected. Currently, the best you can do obfuscate
your code and sign it. Not fool proof, but raises the bar.

--
William Stacey [MVP]

"Oliver Sturm" <ol****@sturmnet.org> wrote in message
news:u$**************@TK2MSFTNGP14.phx.gbl...
Cat wrote:
Thanks. This ways looks very simple and reasonable. The app won't run
all right, but the problem is it shows a crash dialogue like "... has
encountered a problem and needs to close. We are sorry..". Instead, I
just want to inform the users that this app might be infected by a
virus and guide them to my homepage to re-download it. To do that, my
app should run.


That's a nice idea, but not very safe. Who says that if a virus has
infected your app, it's not already loaded when you get to the point where
you inform the user? Doing this "from the outside" of your app, as the
.NET framework does with assembly strong names, is a much safer approach.

Oliver Sturm
--
omnibus ex nihilo ducendis sufficit unum
Spaces inserted to prevent google email destruction:
MSN oliver @ sturmnet.org Jabber sturm @ amessage.de
ICQ 27142619 http://www.sturmnet.org/blog

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: someone | last post by:
Hi, Is it possible to detect if the user has shut down the window holding my ASP2.0 page and/or if the user goes to another page? For my application I need the user to click on the EXIT button...
2
by: Mike Stephens | last post by:
I have an application to minimizes when X is clicked. If the user wants to close the application they click the Exit Application button.This works fine and does exactly what I need. I have since...
2
by: Steven | last post by:
Hi, I have a program that monitors a few running applications. This monitoring program does not itself start these running applications. My question is how can the monitoring program detect that...
12
by: Patrick Dugan | last post by:
I have an vb.net application that is a module that uses a "application.run" in the sub main to start. There is no form involved (just a system tray icon) How can you detect when the application...
4
by: Harri Pesonen | last post by:
I have an ASP.NET application that runs threads in background. Application does not close if the web site is stopped. So how can the application get an event when the site has been stopped, so that...
9
by: SeC | last post by:
Hi. Is there any way to detect if application is being killed by 'End Process' via Task Manager ?
4
by: e-Ricc | last post by:
Hi guys! Im trying to detect when a user "kills" my c# app using windows task manager, i've tried with the form events _closing and _closed managing for example putting an if inside to detect...
4
by: goscottie | last post by:
I used submodal as my popup window. With some tweaks, it working great in my app. However, I can't find a way to detect session timeout in the popup window. The app is a form based...
2
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
Hi, I want an app that I'm writing to be able to hide itself whenever it hasn't been used for say 10 minutes. Is there a smart way to detect user activity within an app. Kind of overall...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.