# libfaketime Have you ever needed to spoof the time a process saw? As a solution I recently found libfaketime, a linux program where you can compile for either x86 or x64 and it can be used to spoof the system clock. For a little background, I was working with an old windows program recently that I had suspicion it generated random events from the system clock. Using a combination of [wine prebuilt](https://github.com/Kron4ek/Wine-Builds/) and [libfaketime](https://github.com/wolfcw/libfaketime) I was able verify that was in fact the case. To compile it as x86 add `-m32` to the CFLAG and LDFLAGS in src/Makefile and run make Then simply call it as a LD_PRELOAD with a time you would like to run the program at ``` WINEARCH=win32 LDFLAGS=-m32 LD_PRELOAD=/home/ubuntu/libfaketime32/src/libfaketime.so.1 FAKETIME="@2000-01-01 11:12:13" FAKETIME_DONT_RESET=1 /home/ubuntu/wine-7.0-4-proton-x86/bin/wine exploitme.exe ``` It's a real neat no RE effort way to spoof the exact time and millisecond of a program.