Thread: Security identifier

  1. #1
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318

    Security identifier

    I would like to make a program, that only runs on one computer.
    I thought I'd make it write down some security identity data of the computer. (called SID)
    I'd want to get the SID data, write it as a binary file. And then when you execute a program, that program reads that data and only runs when the SID-s match.

    Is this possible?

  2. #2
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    Your program should store the SID somewhere else, maybe in a server.
    Program should execute on a machine, generate a SID based on that machine and
    if(one SID exists in the server) compare it and execute if matched;
    else save the SID in the server;
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  3. #3
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    There is sample code here via search(get computer sid). As you know, defeating this type of protection is trivial. Using a hardware ID (harddisk, MAC) is more common as it is less likely to change.
    Last edited by anonytmouse; 09-20-2006 at 09:14 AM.

  4. #4
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I've thought of MAC address...

    My protection system would be something like this: an user gets a password, then he can register his program with that password and it can be only registered once with one password. Then the password will be saved somewhere (registry or temporary file, the password needs no protection anymore). When that person opens the program, the program will send the password and the MAC address to the server and if that password is registered with that MAC address, the program will open.

    Is this stupid?
    I am not making a commercial program, I am just going to share my program only to some certain people.

  5. #5
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    What I have seen is this:
    The program has a serial number, generated with an especial algorithm.
    Program starts and asks you the serial.
    If the serial was valid, it connects to server sends serial and MAC address and gets activated from there. MAC and serial are stored in the server. So after that if the program wants to get activation from another machine, server wont let it run.
    It is good because the value that determines activation of program is not local.

    But if you want to make things simpler, it's better to get the MAC of your clients, then give each of them one application with a unique password based on their MAC. Just make them execute a program to get their MAC and send it to your mailbox.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  6. #6
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Or, you could get really inventive and hardcode and use a PCB on a usb port to make it so that only a user with the USB PCB could actually run the program, however one could install it on any machine that one wanted.

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Spend more time adding more useful features, or removing some bugs, rather than wasting it on ultimately futile protection systems (perhaps)?

    "hey, look at the protection on this - lets hack it"
    "why bother, the rest of its crap anyway"
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    Reverse Engineer maxorator's Avatar
    Join Date
    Aug 2005
    Location
    Estonia
    Posts
    2,318
    I am trying to do very simple system. When protecting seems too complicated, then I won't do it. It is not important, but I just wanted to know, what is the best way to do it.

  9. #9
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Location
    Alabama
    Posts
    1,065
    Usually the only complete system that prevents a program from being run on multiple systems would be hardware.

    Numerous systems I have worked with in the past (systems that cost in the 100,000 USD range) sent either a USB stick or, for the older systems, a parallel passthrough PCB.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. An error is driving me nuts!
    By ulillillia in forum C Programming
    Replies: 5
    Last Post: 04-04-2009, 09:15 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. Game Pointer Trouble?
    By Drahcir in forum C Programming
    Replies: 8
    Last Post: 02-04-2006, 02:53 AM
  4. Why wont my function exit correctly?
    By LightsOut06 in forum C Programming
    Replies: 2
    Last Post: 10-09-2005, 09:23 PM
  5. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM