Page 1 of 2

hardware ID enhancement

Posted: Thu Jul 21, 2011 5:41 pm
by aargh
Hi

It can be part of the "hardware ID" the domain name of computer?
If computer is not part of the domain used by the workgroup name.

This is one of the few ways to detect cloned vmware that I can not disable

Re: hardware ID enhancement

Posted: Thu Jul 21, 2011 6:10 pm
by Enigma
Hi aargh,

Do you have any ideas how to retrieve domain name of the computer?

If you need to detect a VMWare, probably better to write some plugin for Enigma..?

Re: hardware ID enhancement

Posted: Thu Jul 21, 2011 8:20 pm
by aargh
Hi Enigma

in C# i use this code to get domain name

Code: Select all

       private static bool IsInDomain(ref string dname)
        {
            dname = "";
            Win32.NetJoinStatus status = Win32.NetJoinStatus.NetSetupUnknownStatus;
            IntPtr pDomain = IntPtr.Zero;
            int result = Win32.NetGetJoinInformation(null, out pDomain, out status);
            if (pDomain != IntPtr.Zero)     Win32.NetApiBufferFree(pDomain);
            if (result == Win32.ErrorSuccess)
            {
                if (status == Win32.NetJoinStatus.NetSetupDomainName)
                {
                    dname = Marshal.PtrToStringAuto(pDomain);
                    if (dname == null) dname = "";
                    return true;
                }
                else return false;
            }
            else
            {
                throw new Exception("Domain Info Get Failed");
            }
      }

        internal class Win32
        {
            public const int ErrorSuccess = 0;
            [DllImport("Netapi32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
            public static extern int NetGetJoinInformation(string server, out IntPtr domain, out NetJoinStatus status);
            [DllImport("Netapi32.dll")]
            public static extern int NetApiBufferFree(IntPtr Buffer);

            public enum NetJoinStatus
            {
                NetSetupUnknownStatus = 0,
                NetSetupUnjoined,
                NetSetupWorkgroupName,
                NetSetupDomainName
            }
        }
This is simple wrapper to netapi32 library.

aargh

Re: hardware ID enhancement

Posted: Thu Jul 21, 2011 8:22 pm
by aargh
Enigma wrote:Hi aargh,

Do you have any ideas how to retrieve domain name of the computer?

If you need to detect a VMWare, probably better to write some plugin for Enigma..?
Detect vmware is not problem. Problem is how to detect cloned vmware image ;-(

Re: hardware ID enhancement

Posted: Thu Jul 21, 2011 8:45 pm
by aargh
Hi Enigma

Do you know any way to detect cloned vmware image?

aargh

P.S. I have already bought EnigmaProtector ;-)

Re: hardware ID enhancement

Posted: Fri Jul 22, 2011 12:43 pm
by Enigma
Hi aargh,
aargh wrote:P.S. I have already bought EnigmaProtector
Yes, thanks, I know :)
aargh wrote:Do you know any way to detect cloned vmware image?
No, really, no ideas. Probably your way with the domain name could help (probably, I did not test it, and not sure it will work). But, from other side, if virtual machine is cloned, then the domain name is also same, so even this way may not work.

Maybe it is better idea to disable execution under VMWare?

But for the users who will require to run application under VMWare you can make an another software license, not locked to particular PC and with the higher price?

Re: hardware ID enhancement

Posted: Fri Jul 22, 2011 1:41 pm
by aargh
Hi Enigma
Enigma wrote:Hi aargh,
aargh wrote:P.S. I have already bought EnigmaProtector
Yes, thanks, I know :)
aargh wrote:Do you know any way to detect cloned vmware image?
No, really, no ideas. Probably your way with the domain name could help (probably, I did not test it, and not sure it will work). But, from other side, if virtual machine is cloned, then the domain name is also same, so even this way may not work.
Fortunately, in the domain can not be two identical names.
Here it is mainly the clones in a single domain.
Enigma wrote: Maybe it is better idea to disable execution under VMWare?
Unfortunately this is not possible.
Enigma wrote: But for the users who will require to run application under VMWare you can make an another software license, not locked to particular PC and with the higher price?
Another prize is a possibility, but technical solutions would be nice ;-)

aargh

Re: hardware ID enhancement

Posted: Fri Jul 22, 2011 4:08 pm
by scorillo7
Hi Enigma and aargh,
i read and i read again the necesity for aargh.
The only solution on my opinion is serial check on a independent server.Like Kaspersky key,if 2 or more serial are on the same HWID but on different ip,checked close in time,the server will blacklist the serial and raise a function inside software to lock himself.
The system can send a value number random every check, which the software can save.Every time the cloned system has different value saved locally than the rest.Then you know this is a problem.I did'nt see another way with cloned systems.
Ok,this is a brainstormig or what? :)

Re: hardware ID enhancement

Posted: Sun Jul 24, 2011 5:59 pm
by Enigma
Hi aargh, I will recheck the idea with the domain name and ways how to implement it... Probably, it is possible..!

Re: hardware ID enhancement

Posted: Sun Jul 24, 2011 7:04 pm
by aargh
scorillo7 wrote:Hi Enigma and aargh,
i read and i read again the necesity for aargh.
The only solution on my opinion is serial check on a independent server.Like Kaspersky key,if 2 or more serial are on the same HWID but on different ip,checked close in time,the server will blacklist the serial and raise a function inside software to lock himself.
The system can send a value number random every check, which the software can save.Every time the cloned system has different value saved locally than the rest.Then you know this is a problem.I did'nt see another way with cloned systems.
Ok,this is a brainstormig or what? :)
Hi scorillo

It is clear to me that your solution is optimal.
Unfortunately, this principle can not be used in a given situation, and so seeking other options for a clear distinction of clones.
So I thought to use the domain name. Risk clone into another domain in my case is small.