Just curious if you can fake uptime , for example, increase it to 10 years?
uptime
I tried changing the system time and it wonβt do this trick.
Check out this utility: UptimeFaker .
alias uptime='echo " 11:07:17 up 10 BILLION YEARS!, 4 users, load average: 0.38, 0.52, 0.41"'
If you want extra fantasy, you can get the actual output of time and change it.
Yes, you should be able to connect gdb to a running kernel and crack uptime. You need to know where it is stored and have a character file. I assume that uptime is kept in something static distribution.
As an alternative, write a small kernel module that breaks in uptime when it loads (and immediately unloads).