Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 3 1 2 3 LastLast
Results 1 to 15 of 33
  1. #1
    Join Date
    Jul 2007
    Location
    Quezon City, Philippines
    Posts
    46

    protect your software from a usb device

    i have discovered a way to protect my software from a usb device. if the software will be copied to another portable device it will not run. my software will detect the serial of my usb drive and it should be the same to the serial i have put in the software. for example: the serial number of my drive is 12329039 then in my software it is recognize as 12329039 then the software will run or else it will exit. note that usb drives have a unique serial number and can be only changed once it was formatted. i have to note to my customers not to erase the software or format the usb drive. i could say that this is one of the best way to prevent your software from getting pirated. (one idea is to encrypt your serial numbers as many as you want just be sure the software can decrypt it)
    here is one part of my code:
    ------------------
    if drivetype~=2 then
    Dialog.Message("ERROR", "Unauthorized copy of Application, exiting program.", MB_OK, MB_ICONSTOP);
    Application.Exit(0);
    end
    ------------------
    this line of code determines if the software runs on a removable hardware/usb device if not then it will exit.
    this is only one part of my security.
    one more thing the software will run only at the usbdrive it was originally copied. it is already the EXE.

  2. #2
    Join Date
    Feb 2005
    Location
    Birmingham, Alabama
    Posts
    175
    thanks for sharing, but user Roboblue has already wrote a very nice app does this very thing. I would suggest that you should see his thread before wasting time coding something that has already been done.

  3. #3
    Join Date
    Jul 2007
    Location
    Quezon City, Philippines
    Posts
    46

    its hard to explain

    its hard to explain what im trying to say i know what roboblue is saying sir but what im trying to do here is different to what they do. my application is protecting every single file that could be copied in the application including the temp folder. im trying to make a web executable file that is secured entirely even on savvy users. im trying to maximize the security of the data in the application as it could be. im trying to look all the possible weakness of the application in terms of security.

    for example: i have an application made for a specific usb drive. that application will run only on that usb drive and prevent users to access the temp folder to protect the content of the application. hope it is now clear.
    plus im trying to code it purely by use of the ams command and not getting any help from dll's or such.
    Last edited by macko; 08-18-2007 at 01:09 PM.

  4. #4
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    I would love to see all the code.

  5. #5
    Join Date
    Jul 2007
    Location
    Quezon City, Philippines
    Posts
    46

    all the idea came from the ams users

    i came up to a high security type of application by putting all different ideas of ams users in one application.

    here's some part of my code:
    try to put these codes on the startup action of the application
    ---------------------------------------------------------------------------------------
    local sfx = Table.Count(_CommandLineArgs);
    for n,v in _CommandLineArgs do
    if (n == sfx) then
    strSFXmid = String.Mid(_CommandLineArgs[n], 11, -1);
    strSFXApPath = String.SplitPath(strSFXmid).Drive;
    end
    end
    (get the original path the software run. example e:, f:, g: )
    ------------------------------------------------------
    drivetype = Drive.GetType(strSFXApPath);
    if drivetype~=2 then --check if the application runs on the usb drive if not then error message.
    Dialog.Message("ERROR", "Unauthorized copy of Application, exiting program.", MB_OK, MB_ICONSTOP);
    Application.Exit(0);
    else
    expected_pass=2786886402;--sample serial number of my drive
    serialnumb= Drive.GetInformation(strSFXApPath.."\\");
    inform= serialnumb.SerialNumber;--check serial number of drive
    if (inform~=expected_pass) then
    Dialog.Message("ERROR", "Unauthorized copy of Application, exiting program.", MB_OK, MB_ICONSTOP);
    Application.Exit(0);
    else
    Dialog.TimedMessage("Welcome", "welcome to (your company)", 2000, MB_ICONINFORMATION);
    end
    end
    ---------------------------------------------------
    each software has its own built in unique serial number that came from the usb drive. if the usb drive is formatted then the serial of drive would change and the software will not run anymore.
    -----------------------------------------------------------------------------------------------------------------------------------
    -- Get the titles and window handles of all open windows.
    windows = Window.EnumerateTitles();

    -- A variable containing text in the title you want to search for.
    window_name = "Temp";


    -- Loop through the table of windows.
    for handle, title in windows do

    -- Check if the window title has the target text.
    result = String.Find(title, window_name, 1, false);

    -- if the string was found in the title, send the window a close message.
    if (result ~= -1) then
    Window.Close(handle, CLOSEWND_SENDMESSAGE);
    end
    end
    (this part closes the temp folder in order to protect the source file from being copied since when running an application it create a temporary copy of the source in the temp folder)
    ---------------------------------------------------------------------------------------------------------------------------
    i also put a code that when the software is running then the usb drive is unsafely removed the application will close.
    i don't know if i have covered all the weakness of the application in terms of security


    credits goes to those i learned these commands. i am trying to put all ideas in one application to have a well secured application.
    Last edited by macko; 08-18-2007 at 09:10 PM.

  6. #6
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014
    Nice job macko!

  7. #7
    Join Date
    Aug 2003
    Posts
    2,427
    this part closes the temp folder in order to protect the source file from being copied since when running an application it create a temporary copy of the source in the temp folder
    This doesn't make sense to me as I understand how AMS works.

    If you publish a project as an exe, then at runtime it is 'unpacked' to the system temp folder and runs in part from there. No "Temp" folder window is opened it's just that files are accessed from there. This doesn't happen if you don't publish to a standalone exe but then of course your project folder structure is available to browse.

    Open a Windows Explorer run your exe and then alt/tab (if necessary) back to the Windows Explorer window. You have access to the project files while the app is running.

    Or is this just another occasion on which I've totally misunderstood what's been said ?

  8. #8
    Join Date
    Jul 2007
    Location
    Quezon City, Philippines
    Posts
    46

    oh you did misunderstood sir

    this should be publish as a web executable and you must enable the encrypt data feature. you cannot read the data in a web executable if it is encrypted you need to know its password before you can unpacked the files inside the executable and the only way to see the data inside the application is by going to the temp folder.

    (this part closes the temp folder in order to protect the source file from being copied since when running an application it create a temporary copy of the source in the temp folder)-- what i failed to mention is that the code about closing the temp folder should be written in the page timer event so that the application will always determine whether sum1 is trying to access the temp folder. thats why when sum1 tries to access the temp folder while the application is running it will be closed.
    Last edited by macko; 08-21-2007 at 04:24 PM.

  9. #9
    Join Date
    Aug 2003
    Posts
    2,427
    Ooops.... - yes for some reason I was thinking about protecting content which this is not about but rather you are ensuring that the executable is running from a specific USB stick.

    Could be something to do with the fact that content represents 90%+ of the work that I usually put into a project so I read this and put my own meaning onto it.
    Last edited by longedge; 08-22-2007 at 01:35 AM.

  10. #10
    Join Date
    Apr 2007
    Location
    Mar Sara
    Posts
    292
    I'd not use the AMS Web Executable. Instead I'd build it to a folder, but AT1 Creator by MZ and use that, sine it doesn't extract the files, it loads them from memory (AFAIK), which is kinda hard to crack.

  11. #11
    Join Date
    May 2005
    Posts
    1,115
    Quote Originally Posted by macko View Post
    (this part closes the temp folder in order to protect the source file from being copied since when running an application it create a temporary copy of the source in the temp folder)-- what i failed to mention is that the code about closing the temp folder should be written in the page timer event so that the application will always determine whether sum1 is trying to access the temp folder. thats why when sum1 tries to access the temp folder while the application is running it will be closed.
    Yes but what if user is using Total Commander?
    Or copies the folder structure using command line?
    Or terminates the autoplay.exe process using Task Manager?
    This timer thing is trivial...
    Never know what life is gonna throw at you.
    (Based on a true story.)

  12. #12
    Join Date
    Jul 2007
    Location
    Quezon City, Philippines
    Posts
    46

    regarding the task manager

    my application will always ask the user if he/she wants to close the app whether by using the task manager or not. and never forget to put page.stoptimer on the shutdown event or on page close event if ur app has a page timer so exiting the app means terminating the timer. the serial is embedded inside the exe so how would they know what is the serial inside? even if they figure out the serial how could they change it since the application is compiled right? dont protect the exe only focus what the exe has: the structure and the data that's my target.

    and yes i'm trying to run a software limited to a single usb only. another usb means new serial number compiled inside the app.

    please try also read about U3 flash drive devices hope it may help those who want to massive produce their app/software/or whatever it is through usb flash drive.
    Last edited by macko; 08-22-2007 at 06:46 AM.

  13. #13
    Join Date
    Oct 2006
    Posts
    209
    well guys if u want to test ur app pass me a exe and i'll send u contents of that file.
    i m not very genius person but i know computing.

  14. #14
    Join Date
    May 2005
    Posts
    1,115
    Quote Originally Posted by macko View Post
    my application will always ask the user if he/she wants to close the app whether by using the task manager or not.
    It won't, if user goes to processes and terminate autorun.exe process (or whatever name you've chosen). It will die instantly.
    Never know what life is gonna throw at you.
    (Based on a true story.)

  15. #15
    Join Date
    Apr 2007
    Location
    Mar Sara
    Posts
    292
    Unless you find out how to reject APP_TERMINATE commands (like modern firewalls do) or even hide the process.

Page 1 of 3 1 2 3 LastLast

Similar Threads

  1. ANSI To UNICODE Is Finished!
    By coderanger in forum AutoPlay Media Studio 6.0
    Replies: 7
    Last Post: 08-13-2007, 09:27 AM
  2. Visual Patch 3.0 Simplifies Software Patch Packaging
    By Ted Sullivan in forum Announcements & News
    Replies: 0
    Last Post: 08-07-2007, 01:38 PM
  3. Frequently Asked Questions
    By Ted Sullivan in forum Visual Patch 2.0
    Replies: 0
    Last Post: 04-08-2005, 02:49 PM
  4. Autorun with USB mass storage device
    By pinchio in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 01-30-2004, 03:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts