Just curious, Can you fake an uptime
, for instance increase it to 10 years?
I have tried changing system time, and it won't do this trick.
Just curious, Can you fake an uptime
, for instance increase it to 10 years?
I have tried changing system time, and it won't do this trick.
alias uptime='echo " 11:07:17 up 10 BILLION YEARS!, 4 users, load average: 0.38, 0.52, 0.41"'
If you want to get extra-fancy, you could take the actual uptime output and modify that.
/usr/bin/uptime
with a shellscript would be one possible approach (people could still query /proc/uptime
however). –
Lorenzetti Yeah, you should be able to attach a gdb to the running kernel, and hack the uptime value. You'd need to know where it was kept, and have a symbols file. I am assuming here, that uptime is held in something statically allocated.
Alternatively, write a small kernel module which hacks the uptime when you load it (and immediately unloads again).
/dev/mem
and modify it directly. –
Billman © 2022 - 2024 — McMap. All rights reserved.
/usr/bin/uptime
to produce this? – Dependency