Programming Wiki: US

Programming Wiki : us

WikiHomePage :: Categories :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register



us is a Linux program, written in C, that simulates the program su. All filesystem modifications are simulated and do not effect the real system.


  1. Use a modified version of chroot that can run in user space.
    • Have us mimic the users directory structure in this chroot.
    • Have it use modified versions of ls and other tools that report information such as file sizes (since all files in the chroot will just be touched and empty).
    • us will do frivolous read and writes on in tmp space to simulate heavy disk usage for specific commands (rm, cp)
  2. Have everything happen within us.
    • us constructs the command prompt and environment. (probably can have bash do this and mimic it in us)
    • us recieves all input commands. It handles only the commands that have be specificially addressed and makes system calls for some commands while doing its own thing for others.
    • The fake directory structure is held in a data structure that the user is seeing and manulipating instead of the real thing.
  3. Have everything happen as normal, but us catches certain commands and modifies the behaviour.
    • Is this possible? Am I forgetting stuff?

Road Map

Version 0.01

Version 0.05

Version 0.10

Version 0.15

Possible Features

Psychological Trick

 Comments [Hide comments/form]
Here is what I would like to see in the first few versions of the progam:

Version 0.1

1) Display the expected prompt in the us program. This will require the appropriate shell configuration file to be scanned for the prompt settings, special commands, etc.

Version 0.2

1) The file system needs to be mimicked. There are a two ways to handle this. One way is to database everything and remember where the user is moving. The second way is to allow the program to make system calls, but limit which commands are run.

Version 0.3

1) For commands that we don't want run, we need a good output messages as to why they can't be run.
2) For commands that we want them to run, we might want to run everything into /dev/null or a hidden directory where everything is saved. This is dependent on how malicious we want to be.

Version 0.4

1) Add in functionality that will help trick people into installing the program.
-- AustinDuncan (2005-11-15 15:21:36)
cat Comment\ (2005-11-15\ 15:21:36) > Wiki->Edit\ Page
rm Comment\ (2005-11-15\ 15:21:36)
-- ScottRippee (2005-11-16 16:22:56)
Powered by Wikka Wakka Wiki
Page was generated in 0.0219 seconds