Home Nitro-LM Blog
Encrypting Flex Modules with Nitro-LM - 2

In part two, we cover using the Asset Encrypter application to encrypt AIR module swfs.  This demo also contains a before and after look at the code using a decompiler.

LM Encryption

 
Encrypting Flex Modules with Nitro-LM - 1

In this two-part article, I'm going to run through a quick demo of how to protect the source code in an AIR app from decompilers using the Nitro-LM module encryption technique.  Nitro-LM is a hosted licensing solution that can be enabled in your flex/AIR app for a nominal fee per license.

 In video 1, I go through setting up your application for Nitro-LM so that you can enable encryption on two example AIR module swfs.  

LM Encryption

 
Dear Customer: Just "guess"...

So what do you do when your company ships out thousands of CDs with License String Codes that are *not* printed properly?

Easy - post some advice on your support site telling customers to "guess" the final digits on the license string to get the software to work...  Classic! 

 

It is CRUCIAL to remember that "licensing" is the FIRST THING your customers see when evaluating or installing your product for use!   Why would you not strive to make it as painless as possible for your users?

...Click Read More to see the rest of this article... 

 
Prevent DLL Tampering on Windows Apps

Modifying or replacing a DLL is one way that a hacker can gain access to your protected application. If you're using the Nitro-LM solution with the DLL client, or even if you're only interested in protecting your own DLLs, the solution provided here should prove useful to you. For our purposes, we'll focus on how you can code your application to prevent tampering on the nitrolm.dll inside a C++ application.

Nitro-LM is an Internet-based licensing solution. It allows you to license and protect your application from unauthorized users. Nitro-LM offers many client options, one of which is the DLL method. Your application calls licensing functions inside the DLL to retrieve licenses, create users, store server variables, etc. It checks response codes from the function calls to determine whether operations succeeded or not.

How can you prevent a hacker from modifying this DLL, or replacing it entirely with their own that returns positive responses and thus unlocking an unauthorized copy of your software?

The nitrolm.dll file is digitally signed with Microsoft Authenticode technology. In order for your software to detect if the dll has been changed or tampered with, you'll need to verify the digital signature in your code.

The verification is a two-step process in this example. The first step is to verify the embedded signature on the DLL. This will detect if the DLL has been tampered with, but will still succeed if a hacker has replaced your signature with their own. The second step is to verify that the DLL is signed with the correct signature. This will ensure that the hacker hasn't replaced your certificate with their own, or replaced the DLL in its entirety with their own. The beginning of your main method should look something like this:

 
int APIENTRY WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPSTR     lpCmdLine,
                     int       nCmdShow)
{
    char str[1024];
    int ret = 0;
    char outmessage[512];
 
    //verify the dll's signature
    int success = VerifyEmbeddedSignature(L"nitrolm.dll", outmessage);
    if(success)
        int success = VerifyCertificate(L"nitrolm.dll", outmessage);
 
    if(success <= 0)
    {
        MessageBox(NULL, outmessage, "DLL Verification Error", 0);
        return 0;
    }
 
    <...call some dll method here...>
 
...Click Read More to see the rest of this article...
 
Stealing Code - Doug McCune Nails It!

Doug McCune, world renowned expert on Adobe Flex/AIR and recently published Author, recently put on a presentation in England regarding decompiling SWFs.  He covered many of the free and commercial applications used for both compiling and decompiling SWFs, and also the benefits/issues with obfuscation and encryption.

Doug has presented something very cool for people to think about - and he even plugged Nitro-LM in the process (mention as a commercial solution - not an endorsement).  As a side note, Nitro-LM already embraces his recommendations for security. Tongue out

The material presented by Doug can be easily applied to other languages and technologies - they all suffer the same issues.  His presentation is worth the read.  Click below to check it out:

 

 
Nitro-LM - New Admin Tool - Menu Navigation

Here is another screen-cam of the team's in-process Administration tool written in Flex. This video highlights the new menu navigation system. As with many flex apps, this menu component borrows from open source and combines it with proprietary code to create a seamless user experience.

The menu component uses the Open Source library Object Handles. Object Handles is used to handle the resizing of each individual menu item. It's a good example of taking open sourced software and making it do something the original developer probably never intended. Object Handles is really designed to handle moving, rotating, and resizing items on a free-form canvas. This menu locks down the capabilities to only use horizontal resizing. This gives the menu a similar feel to a VDividedBox except that you don't have to steal pixels from neighboring components.

User Manager

 
Cracked Software Just Got Easier

This video is for those people who are still in denial about their software being stolen.

 
Nitro-LM featured on The Flex Show

Andrew Westberg was recently featured on The Flex Show broadcasting from 360|Flex San Jose talking about Nitro-LM.

 
Nitro-LM - New Admin Tool

The team is in the process of developing a new Adobe Flex Administration tool for Nitro-LM.  Here is a short video from the User Management screen.  It allows you to search for users, and see their relationships to computers, software, companies, and other users.

It's useful to quickly see if users are sharing computers or usernames/passwords. In the first search, you'll see a fairly typical user.  The second search shows a company who is sharing machines and usernames.

User Manager

 
Obfuscation vs. Encryption

Most developers consider security of their application to be an afterthought - the last thing they do before pushing the application into production, and with good reason.  Specifically, developers do not want to be slowed down by logging in each time they launch their application, or held up in any way to test it by passing it through and obfuscator in order to test during development.

 

One of the strongest debates within development groups is do we “Obfuscate” or do we “Encrypt” our entire application (or portions of it)?

 

 
Licensing Rich Internet Applications (RIA)

Adobe this week has announced the release of Adobe Flex-3 Builder and Adobe AIR 1.0 (Adobe Integrated Runtime).  The playing field for the process of software development and delivery is about to change in some major ways...

 

A new “bar” of look, feel, capability, flexibility, distribution, user “experience” and overall “satisfaction” has been set! And, there is a very active and very creative community behind it...

 

WARNING: If your company is not paying close attention to this quickly emerging method of developing and distributing software, you will be shocked at how hard it will be to catch up to your competitors who are paying attention!  This is game changing technology!

 

 

 
Virtualization Goes Main Stream!!!

One of the biggest advances in computer science in recent years is Virtualization Technology.  Virtualization enables companies to do really cool things like reduce the number of physical servers required to support their organization by creating a “virtual” computer, and running 2, 4, 8, 16 of them on a single server!

 

Virtual machines can then be managed and accessed like any other computer, moved to other computers, backed up, create snap shots of a computer based on a pre-configured starting point, and much more.  Software development companies also can take advantage of virtualization technology to test their software on different operating systems, and when they are done, they just press a button and “roll-back” the virtual computer to a previously saved condition and do it again...

 
Never let a customer see this...

This is a perfect example of what not to do with your licensing solution

 

While testing some new software we bought, we got the above dialog after the installation process was “completed successfully”.   :(

 

Does this software vendor actually expect end users to go to their license vendor for assistance in getting their software installed?!?

 

 
Killing the Customer’s Copy Machine

 

We have heard a lot of things from customers, but one that literally “blows our mind” is when a prospective Nitro-LM customer seems ‘OK’ with losing money.

 

Excuses for permitting customers to steal...

Believe it or not, there are software companies (yes even public companies) out there that accept a customer purchasing a “single” license of their software, then installing/re-installing it repeatedly so that it runs on as many as 5, 10, 15, 20, even 50 computers!!!  WHY?!?

 

 
Embracing the “Death-Spiral”

 

We often find software customers in a ever increasing “death-spiral” relative to protecting their intellectual property.  To afraid to make change, and ever more complacent with continuous loss of revenue.

 

This is especially true when talking about your software license security model that has been in place for years, and an entire process of customer support and service centered around that legacy security model.  This is understandable, but not a valid reason to do nothing.

 
My mind is made up! Don't confuse me with the facts!

As software developers, it is hard to accept a “sunk cost” for development.  One aspect that never gets thought through, is the ability to replace something that is broken because the fear of negatively affecting the customer base due to a license outage, risk of introducing a security “hole”, or switching to something that you find a “crack” for on the internet less than one (1) week later.