This gist contains a Python script that uses Frida to hook onto a TimeDoctor process and passively monitor all its SQL queries. This enables the process to export logs about the SQL statements written, which incidentally reveals a lot of information about the computer's user's activity.
This script can be used as a data source to recreate the reports sent by TimeDoctor about the user, especially in so-called "silent" installations where TimeDoctor has no UI and thus users have no way of knowing the data that is being reported about them.
This gist is the main companion to this article.
This script has been tested on a silent installation of TimeDoctor 3.6.43 on an Ubuntu 22.04 machine. It should work on close(ish) versions of TimeDoctor and on multiple versions of Ubuntu. It has not been tested on Windows or MacOS, nor on interactive (i.e., non-silent) versions of TimeDoctor. Those have a GUI and thus it's less important to extract this information.
- Ensure that you have Frida available:
sudo pip install frida-tools - Run the script:
sudo python spy.py - In less than three minutes (since TimeDoctor saves data to its DB , it should spit a series of log lines that contain SQL statements.
- The same log lines will be saved to the file
/var/log/spy.log, from where they can be processed by a log management tool.