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

Limit dll lifetime

Any thoughts, pointers, ideas relating to controlling dll's in such a way
that they have an expiry date.

eg, After, say, 1st September 2005 they no longer work.

I'd like to do this as we are installing our product (complex web
application + database) into a potential clients environment to allow them to
trial it. Problem is that we're setting up the full blown application. The
client is on the other side of the world so we're doing this remotely. All
they need to do is remove us from their firewall hole and we can't uninstall
the app.

The obvious (and presumably weakest?) way would be to check the machine
date/time during application startup. Changing the system clock or hacking
the dll would get round this, so this doesn't really appeal.

Is there some approach via signing the dll's I could investigate?

Should I get the application to "call home" via some sort of encrypted
messages to ensure it's allowed to run?

Is there some sort of method / approach / design that allows me to make this
reasonably secure (or at least enough effort / knowledge required to bypass
that makes it secure).

Gentlemen, your thoughts please!
Nov 17 '05 #1
2 2599
No matter what you do, the client has the potential of screwing you. I would
consider the following:

1. Obfuscate all of your code. Make it as hard as possible to reverse
engineer. I would consider spending the couple of K for a really good
obfuscator.

2. Polling home is a decent option, but I would consider a COM DLL for the
phone home operation to make it even harder to remove. Set up multiple
methods that get back answers and liberal seed throughout the app.

3. I would consider a timebomb built into the COM app (deletes all registry
entries, configs, etc.) if triggered. If they shut down access to the
Internet or go past a date without a new build deployed (and paid for), they
will lose the app.


--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Chris Walters" wrote:
Any thoughts, pointers, ideas relating to controlling dll's in such a way
that they have an expiry date.

eg, After, say, 1st September 2005 they no longer work.

I'd like to do this as we are installing our product (complex web
application + database) into a potential clients environment to allow them to
trial it. Problem is that we're setting up the full blown application. The
client is on the other side of the world so we're doing this remotely. All
they need to do is remove us from their firewall hole and we can't uninstall
the app.

The obvious (and presumably weakest?) way would be to check the machine
date/time during application startup. Changing the system clock or hacking
the dll would get round this, so this doesn't really appeal.

Is there some approach via signing the dll's I could investigate?

Should I get the application to "call home" via some sort of encrypted
messages to ensure it's allowed to run?

Is there some sort of method / approach / design that allows me to make this
reasonably secure (or at least enough effort / knowledge required to bypass
that makes it secure).

Gentlemen, your thoughts please!

Nov 17 '05 #2
Thanks for the ideas.... more thoughts below.

1. Obfuscation
Understood. I'm currently thinking the pro version of Dotfuscator. However,
I've no experience of this tool - or infact any other .net obfuscator. Do you
have any real world experience of any tools, any preferences etc. $2k to
spend is not an issue. Preferably I'd want something I can plug into VS.NET,
set and then forget about - letting it do its thing.

2. Poll home - using COM DLL
Interesting, not thought of it like that. The downside for me is a very real
lack of COM experience. Any good sites / books you can think of to lead the
way?

3. Timebomb
Even more interesting! I'd only considered making the app refuse to work or
offer crippled functionality. I'll run this one past the legal suits as
loosing the app might involve loosing the database, which means they'd loose
their work etc.

In terms of polling home - to ensure that I don't have the application
"explode" at an inappropriate time I guess I need to store hours or days
"failed" somewhere safe before triggering the self destruct. The registery or
filesystem could potentially be updated to hide these values - not sure what
to do about that.

Maybe I could flood the machine memory or force a reboot every 10 mins
instead - I'm sure that would trigger a call from the client!

Finally.... is this a realistic option:
* Servers boot up
* Windows service (c#) kicks in, calls home, authenticates itself (and
potentially downloads application updates / fixes etc. from home - might. do
this anyway.)
* Once authenticated, allows IIS to run (ie, keeps trying to stop IIS when
not authenticated)
* ASP.NET app "talks" to the Windows server every x hours to ensure all is
ok. If it doesn't get the OK then web site returns a blank page.
* Service periodically "calls home" to ensure all is ok.
* Ideally the "call home" would return some sort of hash on a secret
passpharse+day+month+year - this could then be recreated to prove the hash?

or am I being paranoid!

BTW - to date not bothered even attempting to do anything clever with the
database (SQL Server 2000) or stored procedures. Is there anything crafty I
could do here to lock this down. The client obviously has full physical and
administrator access to the database boxes.

Nov 17 '05 #3

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

Similar topics

6
by: Jason Heyes | last post by:
I am interested in the lifetime of a function argument in two cases. They are: 1. void foo(Bar bar); 2. void foo(const Bar &bar); In each case I call foo like so: foo(Bar());
8
by: pt | last post by:
Hallo, i wonder how it is going to be of this code below regarding of the return of temporary object. Prototypes: =========== bool Activation(TCHAR *c); std::basic_string<TCHAR> GetFile();
0
by: JD | last post by:
I'm currently writing a class to manage per-user configuration files, using the same format as the app.config file. This will be used in a Winforms app to manage user options, window positions,...
11
by: ian.davies52 | last post by:
Is there anything I can do about the apparent limit on the number of textboxes that have calculations as their control source on a form or report in ms-access? I have a query that pulls together...
14
by: MuZZy | last post by:
Hi, Lately i've been (and still am) fixing some memory leaks problems in the project i just took over when i got this new job. Among the other issues i've noticed that for localy created objects...
14
by: Frederick Gotham | last post by:
There is a common misconception, (one which I myself also held at one point), that a const reference can "extend the lifetime of a temporary". Examples such as the following are given: Snippet...
3
by: nagashre | last post by:
class A { public: A():a(0), b(0){} handleMyMsg( char* aa, char*bb); private: processMessage();
3
by: mario semo | last post by:
Hello, What does the C++ Norm says about the lifetime of compiler generated temporary variables? #include <stdio.h> class BaseRef {...
6
by: better_cs_now | last post by:
Hello all, class Foo {/* Details don't matter */}; class Bar { public: Bar(): m_Foo(/* Construct a Foo however it wants to be constructed */); const Foo &GetFoo() const { return m_Foo; }...
5
by: Juha Nieminen | last post by:
Let's assume we have a class like this: //--------------------------------------------------------- #include <iostream> class MyClass { public: MyClass() { std::cout << "constructor\n"; }...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.