Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can i modify uptime of machine?

Posted on 2009-04-10
8
Medium Priority
?
3,308 Views
Last Modified: 2012-05-06
Hello all,

I wanted to know if there is a way to modify a machine's uptime. For example when i issue the command     #uptime on a solaris box, is it possible to get fake results? Question goes for any OS.
0
Comment
Question by:AJKBOC
8 Comments
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 24114328
Of course yes, everything if fakeable. These programs just look up a place where the OS wrote the start date of the system on power up. You can fake the uptime program by creating a new uptime command and overwriting the old one; the new one reads the information to be displayed  from a file hidden somewhere. the user will never tell the difference
0
 
LVL 2

Author Comment

by:AJKBOC
ID: 24114372
i would need proof of that. i mean specific file, specific command.
0
 
LVL 16

Accepted Solution

by:
ai_ja_nai earned 1500 total points
ID: 24114439
For every OS of the planet? Are you kidding? Every OS has its own method. Beside that, the information you want to know is not written on disk, but in RAM, so it's not even searchable.

I can give you some hints for Linux, which I know: craft a uptime program on your own, which spits out a fixed line. Find the uptime command on filesystem (it should stay on /usr/bin/uptime), rename it in uptime.old and put the fake in its place. Every time the user type 'uptime' your program will be used.

Solaris and MacOSX should work more or less the same way. Windows it's a mistery.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:AJKBOC
ID: 24114450
of course i did not mean for every OS on the planet! Your answer though is quite acceptable and you deserve the points.
Thanks
0
 
LVL 48

Expert Comment

by:Tintin
ID: 24119555
I'd really like to know *why* you'd even want to do this.
0
 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 24119907
ol' good time trial cracking?
0
 
LVL 2

Author Comment

by:AJKBOC
ID: 24128063
nop. online uptime contest maybe? :-)
0
 
LVL 1

Expert Comment

by:slavikn
ID: 26413469
But this won't make the 'jiffies' C command return a fake value.
Is this possible at all?
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 3 hours left to enroll

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question