UptimeFaker

Personal tools
From Etheus
Jump to: navigation, search

This page describes a crude method of artificially increasing the amount uptime a system running Linux reports.

Contents

Background

Uptime in Linux is calculated from an internal counter called jiffies. On 32 bit machines, this counter is a 32 bit integer, and counts at a rate of 100Hz. It therefore takes 497 Days, 2 Hours, 27 Minutes and 52 Seconds before the integer rolls back to zero. The jiffies counter is used for timing by many sub-systems within the kernel, and so is not designed to be tampered with. The TCP layer is one such subsystem which makes use of this timer in order to generate the packet sequence numbers. TCP sequence numbers are used by web sites such as http://www.netcraft.com to publish uptime statistics for web servers. This project enables system uptime to be faked by altering the jiffies counter. It is a very dodgy process and often completely crashes the running Kernel and always has strange side effects on time based functions such as power management and the system clock. For these reasons I would strongly advise AGAINST tampering with the Jiffies counter.

Usage

The uptime faker is of the form of a shell script which creates and compiles a kernel module in /tmp. The shell script will insert the module into the running kernel in order to modify the internal jiffies counter. Once downloaded and extracted, uptime can be faked by running the script with a single parameter specyifing the required uptime in seconds. For example; ./uptime-faker.sh 4320000 Will give an uptime of 50 days. The kernel will report error messages when the module is inserted.

Download

The shell script can be downloaded using the links below

Warning

This script is DANGEROUS it has a very high chance of completely crashing the kernel, possibly causing it to destroy data on hard disks Make sure you have good backups which are not on disks connected to the running system. YOU CAN'T SAY I DIDN'T WARN YOU! This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Contacts

Project author: Craig Shelley craig@microtron.org.uk