NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Installation and Licensing

Installation and Licensing Support for installation and licensing of NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 05-16-2012, 09:44 PM   #1
DionysusToast
Senior Member
 
Join Date: Jul 2010
Location: Bangkok
Posts: 162
Thanks: 4
Thanked 38 times in 12 posts
Default Securing Your NijnaTrader Code with CliSecure - Full Version

Hi All

I'm posting this here & on the BigMikeTrading forum.

I've been asked by a few people how to secure NinjaTrader code with CliSecure. Whilst I am no expert, it appears I might just be ahead of the curve.

My apps consist of NinjaScript and C# code developed in Visual Studio. Still, the instructions below will work if you just have Ninjascript stuff. These instructions will work for Ninja partners and non Ninja Partners:

1 – Export:



2 - Extract exported Zip file



3 – Open Zip File & delete the files

DionysusToast is offline  
Reply With Quote
The following 4 users say thank you to DionysusToast for this post:
Old 05-16-2012, 09:45 PM   #2
DionysusToast
Senior Member
 
Join Date: Jul 2010
Location: Bangkok
Posts: 162
Thanks: 4
Thanked 38 times in 12 posts
Default

4 – Copy other DLLs into the export folder (only if you have external DLLS)



5 – Open CliSecure, Add your DLL files



6 – Code Virtualization – Virtualize Methods (but avoid those that require high performance). Virtualize the Initialization section at least.

DionysusToast is offline  
Reply With Quote
The following 2 users say thank you to DionysusToast for this post:
Old 05-16-2012, 09:46 PM   #3
DionysusToast
Senior Member
 
Join Date: Jul 2010
Location: Bangkok
Posts: 162
Thanks: 4
Thanked 38 times in 12 posts
Default

7 – Code Encryption – Encrypt the code. I can’t get “prevent debugging” to work. My app fails if I use it.



8 – Renaming – use unprintable characters. Again, I can’t get cross assembly obfuscation to work.



9 – Control Flow Obfuscation

DionysusToast is offline  
Reply With Quote
The following 2 users say thank you to DionysusToast for this post:
Old 05-16-2012, 09:47 PM   #4
DionysusToast
Senior Member
 
Join Date: Jul 2010
Location: Bangkok
Posts: 162
Thanks: 4
Thanked 38 times in 12 posts
Default

10 – String obfuscation – will cause the Ninja partner licensing to fail



11 – Resource Encryption



12 – Merging

DionysusToast is offline  
Reply With Quote
The following 2 users say thank you to DionysusToast for this post:
Old 05-16-2012, 09:49 PM   #5
DionysusToast
Senior Member
 
Join Date: Jul 2010
Location: Bangkok
Posts: 162
Thanks: 4
Thanked 38 times in 12 posts
Default

13 – Click “Build” in CliSecure – it will create a “Secured” folder.



14 - You take the dll files (ignore the Map.xml file) and put them into your Export Folder



Then delete any other DLLs you had in there originally as they have all been merged into one.

15 – Now put the contents of this folder back into the zip file (note the files will be much larger than the originals)



DONE!
DionysusToast is offline  
Reply With Quote
The following 2 users say thank you to DionysusToast for this post:
Old 07-01-2012, 09:40 AM   #6
bxgforex
Junior Member
 
Join Date: Dec 2010
Location: VA, usa
Posts: 5
Thanks: 0
Thanked 0 times in 0 posts
Default what version of Clisecure is you used? trial or full(paid)?

Thank you for your post. It is very useful for me.
What version of Clisecure is you used? trial or full(paid)?
bxgforex is offline  
Reply With Quote
Old 07-01-2012, 10:03 AM   #7
DionysusToast
Senior Member
 
Join Date: Jul 2010
Location: Bangkok
Posts: 162
Thanks: 4
Thanked 38 times in 12 posts
Default

This was done using the full version...
DionysusToast is offline  
Reply With Quote
Old 01-11-2013, 08:21 AM   #8
neoikon
Senior Member
 
Join Date: Oct 2008
Location: Austin, TX
Posts: 119
Thanks: 44
Thanked 5 times in 4 posts
Default

Hello,

I am currently using the version of CliSecure that comes with being an NT partner.

So far, I'm finding it to be almost useless. People are hacking into my "secure" code and not only removing the NT licensing check, but also circumventing my own elaborate verification process that contacts my own servers and other local verification techniques.

This tends to imply they have a pretty good look at the code itself to make many modifications. (I also use cryptic variable names, etc, which doesn't seem to matter.)

Does having the full version of CliSecure help this (using the techniques below)? Is there anything extra I can do?

Daniel
neoikon is offline  
Reply With Quote
Old 01-12-2013, 05:27 PM   #9
NinjaTrader_RJ
NinjaTrader Customer Service
 
NinjaTrader_RJ's Avatar
 
Join Date: Jul 2008
Location: Denver, CO, USA
Posts: 1,828
Thanks: 4
Thanked 19 times in 18 posts
Default

Hi Daniel,

This is Raymond Stein of the Business Development Team as I wanted to jump in here since you mention you are a NinjaTrader Partner. I don't recognize your handle or email addres, so can you please send me an email to sales AT NinjaTrader DOT com so we can further assist?

To answer your question about the difference between the complimentary features of CLISecure you get with NinjaTrader and upgrading, the free NinjaTrader provided CliSecure is limited to the Code Protection module, which replaces the original code with stub methods so they can’t be decompiled. You can purchase the full version of CliSecure to gain some additional encryption features. Using the full version of CliSecure is not officially supported, however we have had several users report success using some or all of the additional protection enabled on their DLL’s. DionysusToast in this thread details what extra protection he was able to enable successfully.
If you have questions on what theses extra feature do and how to implement them I would suggest contacting the CliSecure team at sales AT secureteam DOT net for more information.
NinjaTrader_RJ is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CliSecure Protecting Your Code MarianoMA Automated Trading 28 12-14-2011 04:03 AM
Don't have license key for full version adwr070621 Installation and Licensing 1 05-24-2011 09:21 AM
CliSecure Full Version + Ninja DionysusToast Installation and Licensing 3 05-03-2011 11:38 AM
If I want to develop and code trading system which version do I need DancesWithBears Installation and Licensing 1 12-20-2010 08:10 AM
TT Credits (broker to full version) ggm01 Installation and Licensing 1 07-23-2009 05:09 AM


All times are GMT -6. The time now is 07:25 PM.