Expiration Date

W

weetat

Hi all ,

I have a program which are deployed to our clients.
However , we are trying to setup a 30 day expiration lease for the
program.
When the program "first execute start date by the user" is over 30 day
, we will disable the program.
Any ideas how to disable and set 30 day expiration ?

Thanks.
 
A

Andrew Thompson

I have a program which are deployed to our clients.
However , we are trying to setup a 30 day expiration lease for the
program.
When the program "first execute start date by the user" is over 30 day
, we will disable the program.
Any ideas how to disable and set 30 day expiration ?

If it is practical to deploy the application via Webstart
for the 30 days (each time it is run) you could write the
..jnlp file and omit the 'offline-allowed' element.
<http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/syntax.html#information>

If the client does not want the software, simply remove
the .jnlp file or .jar.

This is not 'bullet-proof', as I doubt any system is, but
it would prevent average users from using the software after
you removed the jnlp/jar.

[ Hint, if you give further description of the nature of
your app. it might help get answers. How big is it? Is it
a web-app.? Does it rely on external resources such as D/B? ]

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
 
J

Jacob

weetat said:
I have a program which are deployed to our clients.
However , we are trying to setup a 30 day expiration lease for the
program.

For a small trusted client base, just tell them how
long they are supposed to run the program for free
and ask them to delete the installation afterwards
(or pay for it).

Technically it is actuallty pretty hard to do correctly.
If there is a unique login to your program you may
send this to a central repository (you) and log/block
usage there. This require your client to be online
and you will have to write an online "license"-server.

Otherwise you can play with registry files and
timestamps, but as you can't in general identify the
client machine (i.e. its MAC address) from within Java,
moving the installation around may fool this setup.
There is also the risk for a client to hack his system
clock, though in general this is not often done these
days as most of a system will collapse if the clock is
arbitrary skewed.

There are commercial license managers that handle this;
They will require license key files and a license manager
deamon running at the client network. Generally a pain
in the neck.
 
A

andreas kinell

Hi all ,

I have a program which are deployed to our clients.
However , we are trying to setup a 30 day expiration lease for the
program.
When the program "first execute start date by the user" is over 30 day
, we will disable the program.
Any ideas how to disable and set 30 day expiration ?

Thanks.

i'd like to add a question here, since i am dealing with a similar problem:
reverse engineering of java programs is very easy. is there any way
to make it at least as difficult as cracking an .exe (machine code)?

i have seen the most complicated solutions bypassed in the most simple
ways. (removing some "checkExpiration()" method and recompile the class,
etc.).

as for now, i can only imagine solutions which imply giving up platform
independence.

andreas
 
M

Michael Borgwardt

andreas said:
i'd like to add a question here, since i am dealing with a similar problem:
reverse engineering of java programs is very easy. is there any way
to make it at least as difficult as cracking an .exe (machine code)?

i have seen the most complicated solutions bypassed in the most simple
ways. (removing some "checkExpiration()" method and recompile the class,
etc.).

as for now, i can only imagine solutions which imply giving up platform
independence.

No, that is not neccessary. What you're looking for is known as
an "obfuscator".

http://www.google.de/search?hl=de&q=java+obfuscator
 
T

Tor Iver Wilhelmsen

andreas kinell said:
i'd like to add a question here, since i am dealing with a similar problem:
reverse engineering of java programs is very easy. is there any way
to make it at least as difficult as cracking an .exe (machine code)?

No, because the translation from Java to bytecode is much simpler than
compilation of C into machine code.

Solution: Don't call the method something as obvious as
checkExpiration() but countViols() or whatever.
 
S

steve

i'd like to add a question here, since i am dealing with a similar problem:
reverse engineering of java programs is very easy. is there any way
to make it at least as difficult as cracking an .exe (machine code)?

i have seen the most complicated solutions bypassed in the most simple
ways. (removing some "checkExpiration()" method and recompile the class,
etc.).

as for now, i can only imagine solutions which imply giving up platform
independence.

andreas

my favorite one, was the $2,000 , programming/execution mapping software.
almost fully obfusicated.

decompiled , reset "isdemoflag=true" to "isdemoflag=false", then popped the
class back into the jar.

being a dab hand at this sort of stuff, I know what annoys me.


anyway for your 30 day Demo. if you can make a callout to an external machine
in your company.


setup your "demo", give the customer a licence code.
anything will do.

on execution of the "loader" program , open a socket to an external server (
this server can be running a small java app) .



if licence code is good, pass back a small class file , or even a single
string.
this will contain the name of the internal class to execute. ( OR THE main
class file)
pass back to the client, then implement a "classloader" type setup in the
client code.

that should be a bit harder to "HACK", and gives you complete control on the
licences, you just need to allocate 1 or 2 machines as servers.

or if that seems a bit excessive get the program to "call home" say once
every 5 executions, i valid let it run, if not , erase a "jar" file.

steve
 
S

steve

unfortunatly obfuscators don't (or didn't) help that much. finding the
relevant code part still is (was) easy.
it write "was", because i am not up to date with the newest methods.
but thanks for the hint, i will have closer look at the newest tools around.

andreas

nothing works, check out:

djdec366.zip
http://www.javaworld.com/javaworld/jw-07-1997/jw-07-decompilers.html
http://www.javaworld.com/javaworld/javatips/jw-javatip22.html
but there is a very good article on "javaworld" ,showing how to decompile ANY
program, by tieing into the JVM.
 
M

Michael Borgwardt

steve said:
nothing works, check out:

djdec366.zip
http://www.javaworld.com/javaworld/jw-07-1997/jw-07-decompilers.html
http://www.javaworld.com/javaworld/javatips/jw-javatip22.html
but there is a very good article on "javaworld" ,showing how to decompile ANY
program, by tieing into the JVM.

The point of an obfuscator is NOT to make decompilation impossible.
The point is to make the result of decompilation impossible to understand
and therefore, impossible to modify.

A simple obfuscator would just rename packages, classes and methods to
random strings. This is not good enough to prevent a determined and skilled
attacker from locating a simple "expiration" query, but it makes a job far
more difficult and lengthy.

But a really good obfuscator can do a lot more nasty stuff, like using
reflection with widly pieced-together strings to call key classes and
methods.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top