0

I do not want certain applications to get my actual serial number (the one you get with ioreg -l | grep IOPlatformSerialNumber). How can the application get the serial number? Can I change the return request to a serial number I specified myself?

4
  • 2
    Basically any application can run the command you mention in the question (or use whatever system library call which achieves the same result), don't see how you can prevent them from doing so.
    – nohillside
    Sep 11 at 14:29
  • 1
    Why would you need to do this? Avoid licencing?
    – Solar Mike
    Sep 11 at 17:17
  • Yeah... sounds like an X-Y question about getting around licensing. What is the problem that you think this will fix?
    – benwiggy
    Sep 12 at 6:55
  • @Solar Mike Yes. There is a software I tried once couple years ago on my laptop, but back then I didn't need it so I uninstalled it. Now I wanted to try it again, but its trial period has expired. I tried intercepting and changing its network requests, but it didn't work. I can do this in a VM, but I wonder if there is any easier solutions. Apparently there isn't.
    – Joy Jin
    Sep 12 at 7:40
2

In general this is not easy to do (i.e. basically impossible for a non-technical user).

If you instead of this general case had a specific application in mind - that changes things considerably. With a specific application, you can use a system call tracer in order to discover which method the application uses to get to the serial number. Then you can override that particular method in order to return a faked serial number to the application. That could be done by modifying the application binary itself, by code injection through DYLD_INSERT_LIBRARIES or by a number of other methods.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .