09-19-2014 04:37 AM
Hello, I would like to know, how it is possible to put C++ code into LabView with secure way.
I tried it with creating .dll and in LabView call it with Call Library Function Node, but the .dll returns one value True or False and it is possible to crack it. Thats why I am looking for another solution.
Thanks for answers.
09-19-2014 06:22 AM
@TiborK wrote:
[...]and it is possible to crack it. Thats why I am looking for another solution.
Thanks for answers.
Why should one crack a DLL? And if that person has the knowledge and tools available to crack the DLL, he will also crack any other application you can provide....
So what is, except the "security" issue, your problem with the DLL?
Please note that the most obvious "workaround" would be implement the whole DLL functionality using generic LV. Again: This would not increase any "security" of the application.
Norbert
09-19-2014 07:07 AM - edited 09-19-2014 07:09 AM
If you want to verify that the .dll hasn't changed or been replaced, why not generate a (MD5) hash of the file contents and compare that to the .dll at runtime? You could also verify the file size as an additional measure. That should prevent anyone from easily replacing the dll with another one and your application not realising it.
Of course...anyone with enough knowledge could probably modify the hash in memory and/or generate a new file with the same MD5 hash so it's not entirely secure but I think what I have suggested should fulfil the requirement in all but the most extreme cases (someone REALLY wanted to modify your dll).
09-19-2014 10:11 AM
I would like to prevent to crack the dll, because it checks the licence which also communicate with token.
The .dll retunrs true or false to VI, so it is now very bad solved, because between a LabView and a .dll is just T/F.
09-19-2014 01:56 PM
Well, using a trivial interface makes it trivial to crack it. You should consider some challenge response interface instead. Pass some random value to the DLL and let it execute some calculations on it, then read the value back and check that you get the same value using the same algorithme. Definitely won't help against someone who can disassemble the DLL, but then nothing will really help against disassembly.
There is no other way to integrate external code into LabVIEW than shared libraries (all platforms) and ActiveX and .Net (Windows only).
09-19-2014 02:08 PM
Doesn't sound like a crack would be needed. Just a DLL that returns True and replace the current DLL with it. Might want to have some kind of question answer, or check the MD5 of the DLL in the LabVIEW code to detect modification.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-19-2014 02:21 PM
There are also third-party tools (some pre-made dlls, code wrappers, etc.) that can provide you with much more secure code / licensing check. The Third-Pary Licensing toolkit (from NI) combines LabVIEW and some third-party DLLs (softwarekey.com) for licensing. There are many others with varying costs and capabilities. If you choose to build something yourself, then you will need to be more creative than returning a boolean from a simple call...