Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>One approach would be to put the code that does the license check into a separate DLL. In the main application, load the DLL at runtime and calculate the checksum of the DLL itself. The app stores the checksum that was calculated with the DLL was built. If the checksums don't match, you have several options, show a wrong-version message - a bit obvious; Do not call the license check - less obvious but will be noticed when the attacker wonders why the license check doesn't get called; call a function with a similar name to the real license-check function.</p> <p>Think of it as using <strong>Public Key Encryption</strong>. Use a public key as part of the config and have a private key built into the app. If they mess with the public key, the digital signature of the app will be compromised in a detectable way. </p> <p>I agree with @camccann that it would help to understand the kind of attack you expect. As a last resort, split the license-check into as many parts as is feasible to make it harder to bypass by changing a single branch point. </p> <p>[EDIT]</p> <p>Another thought would be to use a <strong>State Machine</strong>. See the command structure example in the top answer to <a href="https://stackoverflow.com/questions/1647631/c-state-machine-design">this question</a>. Put the evaluation of the license check into the form of a hash lookup and a set of dummy function calls into an array along with the proper one. The decision code that evaluates the license check into a table/hash lookup for the appropriate function will not look like your typical </p> <pre><code>if(){ pass;} else { fail; } </code></pre> <p>construct.</p> <p>Two benefits,<br> 1) there isn't a boolean condition to bypass and<br> 2) they can't do a simple JMP instruction without knowing the address/name of the function to pass control to.</p> <p><a href="https://stackoverflow.com/questions/1371460/state-machines-tutorials">SO thread on a state machine turorial</a>.<br> <a href="https://stackoverflow.com/questions/133214/is-there-a-typical-state-machine-implementation-pattern">SO thread on state machine implementations</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload