LittleBrother is a simple parental control application monitoring specific processes on Linux hosts to monitor and limit the play time of children.

Overview

LittleBrother-Logo

Parental Control Application LittleBrother

Overview

LittleBrother is a simple parental control application monitoring specific processes (read "games") on Linux hosts to monitor and limit the play time of (young) children. It is designed as a client server application running on several hosts and combining playing time spent across these hosts, but it also works on a standalone host.

When the application determines that a user has exceeded her play time, it will terminate the configured process. Usually, the user will get several spoken notifications (using the LittleBrotherTaskbar) before she is actually kicked out so that she can log out gracefully in time.

What's New?

The latest major feature changes are:

Version Feature/Fix Issue Link
0.4.9 New: Automatic check for new versions of LittleBrother Issue 150
Improvement: Separate LDAP search DN for groups and users Issue 144
Improvement: Cache timeout for LDAP data Issue 138
0.4.8 New: Full support for requesting optional time by users Issue 130
0.4.4 New: Use user specific patterns to prohibit applications Issue 129

Contact

Visit the project at Facebook or write comments to little-brother(at)web.de.

Screenshots

The following screenshots show the web frontend of LittleBrother. Click on the thumbnails to enlarge.

Screenshot Status Screenshot Status Screenshot Status Screenshot Status Screenshot Status Screenshot Status Screenshot Status

Change History

See here

GitHub Status

SourceForge Download Status

Download little-brother

Continuous Integration Status Overview

Status Master Release
CircleCI
Test Coverage
Snyk Vulnerability Known Vulnerabilities Known Vulnerabilities
Codacy Code Quality
Code Climate not available

Note: The vulnerability status is derived from the Python PIP packages found in requirements.txt.

Features

LittleBrother has the following features:

  • Any number of users can be monitored.

  • Each user can have a specific set of rules defining the permitted playtime.

  • Rules can be adapted to "contexts", such as the day of the week and/or a vacation schedule (currently only the German schedules are supported).

  • Play time can be restricted to a time window (from, to).

  • A maximum play time per day can be defined.

  • Users can be forced to take a break after a certain maximum session time.

  • Users can be forced to wait for a minimum break time after their activity.

  • Any number of Linux client hosts can be monitored.

  • There is a master host with a history of the activities of all users. This master host checks the rule sets and prompts the client hosts to terminate processes if required.

  • The master host offers a simple web interface for viewing the user activity over a configured history length (e.g. 7 days) and an administration page to dynamically define rule exceptions for a configured number of days into the future.

  • The web application can be run behind a proxy so that it will be accessible from away allowing remote administration after receiving calls from young users begging for more play time.

  • There is a helper application (LittleBrotherTaskbar) to display the remaining playtime of a monitored user and speak the notifications.

  • The application has international language support. Currently English, Italian and German translations are provided. Users are invited to provide translations for other languages.

  • Downtime of a server during playtime (e.g. due to hibernation) is automatically subtracted from the play time.

  • In addition to the time spent on Linux hosts the application can also monitor activity time on other devices such as smartphones or tables. It takes advantage of the fact that most modern operating systems put devices in some kind of power saving mode while they are not being used. This way, the network response (by pinging) can be used to determine the activity on those devices. In contrast to the Linux hosts, the application will not be able to terminate the activity. The play time, however, will be added to the overall playtime and hence will have an impact on the time allowed and also on the break time rules on the Linux hosts.

  • As of version 0.3.12 LittleBrother is able to use ProxyPing to ping devices behind firewalls provided the tool can be deployed on a Debian server behind the firewall.

  • As of version 0.3.13 LittleBrother slaves will terminate local user sessions if they cannot reach the master process for a certain time (defaults to 50 seconds). This ensures users cannot suppress being logged out by pulling the plug.

  • As of version 0.4.0 LittleBrother provides an administration feature to easily extend the current computer time or grant computer when the usage would normally be prohibited. This is called a time extension. During an active extension all other restrictions (maximum time per session, time of day, and maximum time per day) are deactivated. Time extension can even extend into the next day making long night session possible. However, any computer time actually spent during a time extension will contribute to the overall time played in the course of a day.

  • There is a Docker image available (currently for the slave only) which makes it really easy to run a slave on a Linux host with a Docker daemon available.

  • The application uses voice generation to inform the user over impending logouts. Also, these spoken messages are internationalized. Optionally, users can be notified using four different popup tools. Note that this functionality of the LittleBrother application has been replaced by the LittleBrotherTaskbar.

Architecture

The page gives a detailed description of the architecture of the application.

Tested Distributions

So far, LittleBrother has only been released as a Debian package. For other non-Debian based distributions there is some basic support using a generic installation script. See this page for details.

Distribution Version Architecture Comments Most Recent Test
Ubuntu 18.10 amd64 See pip3 issue 03.JUN.2019
Debian buster amd64 This distribution (buster-slim) is used as base image for Docker 01.JAN.2020
Debian 10.3 (buster) amd64 Feedback from a user as regular install with Mate desktop 05.MAR.2020
Mint 19 amd64 03.JAN.2020
Debian stretch armv6l 23.MAY.2020

Quick Install (Debian Package)

This guide will take you through the steps required to install, configure, and run the LittleBrother application on your system. This guide works both for master and slave setups. For setting up a slave there is a second option using Docker. See the Docker page for more details.

YouTube Videos

Thumbnail and Link to Video Duration Content Related Versions
little-brother-0_3_1 16 min Install LittleBrother Debian package, edit configuration file, add user, test functionality LittleBrother 0.3.1 on Ubuntu 19.3
little-brother-0_3_1 14 min Install LittleBrotherTaskbar pip3 package, register desktop service, test functionality LittleBrotherTaskbar 0.1.9 on Ubuntu 19.3

Download the Software

The application is available as a Debian package from the release directory at SourceForge. The latest build is available from the master directory. Install it as you would install any other Debian package with

dpkg -i PACKAGE.deb
apt-get install -f

Note that the second command is required to install missing dependencies since dpkg does not run a dependency check. Instead, it will return with an error which will then be "fixed" by apt-get.

After installation use

systemctl start little-brother

to start the application right away. The application will successfully start up provided that the default port 5555 is available on the host. You can check the success by trying to log into the web frontend.

Configuring the Application (Mostly Optional)

The default setup will fit most first-time users (except for the password). The following table contains various additional aspects that may require additional configuration.

Aspect Default Setting Alternatives Reference
Admin Password User admin with password test123 Use LDAP for authentication and authorization See "Setting Admin Password" below
Database backend File oriented database sqlite Full fledged database such as MySQL dor MariaDB See Advanced Configuration
Web frontend port 5555 Any other available port See Advanced Configuration
Web frontend base URL / Any other path See Advanced Configuration
User registry /etc/passwd Predefined users and UIDs or LDAP registry See Advanced Configuration
Master slave setup Use only a master host Use any number of slave hosts See Advanced Configuration
Mapping UIDs UIDs are synchronized across all hosts Each host (group) can have different UIDs See Advanced Configuration
Scanning Interval Every 5 seconds Any other interval See Advanced Configuration
Reverse proxy setup No reverse proxy Run little-brother behind a reverse proxy (e.g. nginx) See Advanced Configuration
Docker Support Slave is installed as Debian package Slave is run as Docker container See Docker.
Prometheus Support Not activated Activate Prometheus server port and provide run time statistics See Operational Monitoring.
Network Tempering Detection Automatic logout of monitored users after a network downtime of 50 seconds Set a different time out See Advanced Configuration

Setting the Admin Password

For the time being setting the admin password is the only standard configuration that still requires using an editor. See this issue. You have to be root to follow these steps (e.g. use sudo):

  • Use your favorite editor to edit the file /etc/little-brother/little-brother.conf.

  • Find the setting admin_password in the section [UnixUserHandler].

  • Change the password.

  • Save the file.

  • Restart the application by issuing:

    systemctl restart little-brother 
    

From now on the new password will have to be used to access the administration pages.

Using the Web-Frontend

You are all set now. It's time to set up users to be monitored and optionally devices. See the Web Frontend Manual.

Troubleshooting

So, you went through all the above but LittleBrother does not seem to work? Maybe this troubleshooting page can help you.

Caveats

The application LittleBrother is far from perfect. Some major caveats are listed here and/or in the issue list on GitHub (see here).

  • Every once in a while processes fail to terminate even though they have been killed by LittleBrother. In these cases the user will still be regarded as logged in although he/she is not. Usually this can only be solved by trying to kill the processes again using the master user. Database eloquent users may try to delete/correct the incorrect process time entries.

  • The web server only responds to HTTP requests. This is probably always OK for communication between the slaves and the master in local area network. If the master host is to be accessible from the internet, it should be put behind a reverse proxy handling the HTTPS termination (see below).

Internationalization

The application uses the PIP package Flask-Babel to provide internationalization for the web frontend. Currently, the following languages are supported or currently in preparation (in the order they were made available):

Flag Language Locale Status Translation provided by
Flag USA English en Up-to-date Marcus Rickert
Flag Germany German de Up-to-date Marcus Rickert
Flag Italy Italian it Revision 107 Albano Battistella
Flag Netherlands Dutch nl Revision 63 Simone & Lex
Flag Finland Finnish fi Revision 63 Isakkii Kosonen
Flag France French fr Revision 86 Albano Battistella
Flag Turkey Turkish tr Revision 63 Selay Dogan
Flag Russia Russian ru Revision 63 J. Moldawski
Flag Japan Japanese ja Revision 63 Arik M.
Flag Bangladesh Bangla bn Revision 63 Rownak Jyoti Zaman
Flag Thailand Thai th Revision 63 Busaba Kramer
Flag Denmark Danish da Revision 63 Erik Husmark
Flag Spain Spanish es Revision 63 Ruth Wucherpfennig-Krömer
Flag Croatia Croatian hr Revision 63 Incognito
Flag Lithuania Lithuanian lt In preparation N.N.

A revision number in the status column denotes that all texts up to that revision have been localized.

Your help with translations is greatly appreciated. Please, contact the author if you are interested in providing a translation. You do not necessarily have to clone this repository or be familiar with Python to do so.

Credits

Comments
  • Cannot install pyobjc-framework-CoreAudioKit

    Cannot install pyobjc-framework-CoreAudioKit

    Collecting pyobjc-framework-CoreAudioKit==6.1 Downloading pyobjc-framework-CoreAudioKit-6.1.tar.gz (18 kB) ERROR: Command errored out with exit status 1: command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4zrugjzk/pyobjc-framework-CoreAudioKit/setup.py'"'"'; file='"'"'/tmp/pip-install-4zrugjzk/pyobjc-framework-CoreAudioKit/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-4zrugjzk/pyobjc-framework-CoreAudioKit/pip-egg-info cwd: /tmp/pip-install-4zrugjzk/pyobjc-framework-CoreAudioKit/ Complete output (15 lines): Traceback (most recent call last): File "", line 1, in File "/tmp/pip-install-4zrugjzk/pyobjc-framework-CoreAudioKit/setup.py", line 33, in for fn in os.listdir("Modules") File "/tmp/pip-install-4zrugjzk/pyobjc-framework-CoreAudioKit/pyobjc_setup.py", line 408, in Extension os_level = get_os_level() File "/tmp/pip-install-4zrugjzk/pyobjc-framework-CoreAudioKit/pyobjc_setup.py", line 218, in get_os_level pl = plistlib.readPlist("/System/Library/CoreServices/SystemVersion.plist") File "/usr/lib/python3.6/plistlib.py", line 162, in readPlist with _maybe_open(pathOrFile, 'rb') as fp: File "/usr/lib/python3.6/contextlib.py", line 81, in enter return next(self.gen) File "/usr/lib/python3.6/plistlib.py", line 120, in _maybe_open with open(pathOrFile, mode) as fp: FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. dpkg: error processing package little-brother (--configure): installed little-brother package post-installation script subprocess returned error exit status 1 Setting up dh-python (3.20180325ubuntu2) ... Setting up libpython3-dev:amd64 (3.6.7-1~18.04) ... Setting up python3-cryptography (2.1.4-1ubuntu1.3) ... Setting up python3-keyrings.alt (3.0-1) ... Setting up python3-dev (3.6.7-1~18.04) ... Setting up python3-secretstorage (2.3.1-2) ... Setting up python3-keyring (10.6.0-1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Errors were encountered while processing: little-brother E: Sub-process /usr/bin/dpkg returned an error code (1)

    bug high priority 
    opened by dgofman 13
  • Taskbar / client does not get user informations

    Taskbar / client does not get user informations

    After upgrading from an 0.3x to 0.4.10 the client does not get user informations, according to the log:

    2021-11-20 19:22:08,786 - MasterConnector - DEBUG - Executing POST API call 'http://192.168.178.10:5555/api/events'
    2021-11-20 19:22:08,810 - App - DEBUG - Executing task app_control.check 0.006 [s] behind schedule... *** END ***
    2021-11-20 19:22:08,810 - App - DEBUG - Sleeping for 4.839537 seconds (or until next signal)
    2021-11-20 19:22:13,653 - App - DEBUG - Woken by signal
    2021-11-20 19:22:13,654 - App - DEBUG - Executing task app_control.scan_processes(ProcessHandler) 0.004 [s] behind schedule... *** START ***
    2021-11-20 19:22:13,654 - ClientProcessHandler - DEBUG - Scanning processes for users johann...
    2021-11-20 19:22:13,686 - App - DEBUG - Executing task app_control.scan_processes(ProcessHandler) 0.004 [s] behind schedule... *** END ***
    2021-11-20 19:22:13,686 - App - DEBUG - Executing task app_control.scan_processes(DeviceHandler) 0.003 [s] behind schedule... *** START ***
    2021-11-20 19:22:13,689 - App - DEBUG - Executing task app_control.scan_processes(DeviceHandler) 0.003 [s] behind schedule... *** END ***
    2021-11-20 19:22:13,689 - App - DEBUG - Sleeping for 0.094472 seconds (or until next signal)
    2021-11-20 19:22:13,784 - App - DEBUG - Woken by signal
    2021-11-20 19:22:13,785 - App - DEBUG - Executing task app_control.check 0.001 [s] behind schedule... *** START ***
    2021-11-20 19:22:13,785 - UserManager - WARNING - Cannot find user information for user 'johann', will retry later...
    2021-11-20 19:22:13,787 - MasterConnector - DEBUG - Executing POST API call 'http://192.168.178.10:5555/api/events'
    2021-11-20 19:22:13,809 - App - DEBUG - Executing task app_control.check 0.001 [s] behind schedule... *** END ***
    2021-11-20 19:22:13,810 - App - DEBUG - Sleeping for 4.974878 seconds (or until next signal)
    

    The taskbar says "Benutzer 'johann' nicht eingeloggt". This can be worked around by simply restarting the client (service little-brother restart). But this is surely not an option.

    Can I fix this by configuration or is it a real bug?

    bug high priority 
    opened by MrFly 8
  • enhance process matching by allowing substring matching in full command line

    enhance process matching by allowing substring matching in full command line

    pull-request #119

    When using Little-Brother to monitor time spend on playing java games (such as Minecraft), the process matching is not so useful (since the process name is java, which is potentially shared with other java programs that are not games).

    With this change, you can match a substring in the full command line (e.g. "minecraft") to distinguish a game from another java program. It changes existing behavior though in the sense that pattern matches that were negative before could now be positive (due to substring match, or match in full commandline). Regressions will be limited I guess though, as it won't cause current positive matches to change to negative.

    enhancement 
    opened by bhulsken 6
  • Cannot start little-brother.

    Cannot start little-brother.

    Installed little-brother_0.3.4_76.deb. little-brother_0.3.5_77 would not install. python2-dev depend could not be met. I try to start little-brother with 'systemctl start little-brother' but get

    "failed to add /run/systemd/ask-password to directory watch: no such file or directory Failed to start little-brother.service :launch helper exited with unknown return code 1 See system logs and 'systemctl status little-brother.service' for details."

    I don't know to proceed or how to view the error.

    P.S. I am also having trouble installing little-brother taskbar, but I don't know if i should mention that here or make another Issue. Thanks for any help :)

    bug 
    opened by SolidSouless 6
  • Update fails on Ubuntu 20.04 - virtualenv cleanup missing

    Update fails on Ubuntu 20.04 - virtualenv cleanup missing

    The update of the client / server fails on Ubuntu. Since 0.4.x I always have to remove /var/lib/little-brother/vitualenv/. I did this meanwhile six times from 0.4.9 to 0.4.11 (+ some times I did not think of it and first tried without deleting).

    It would be great, if the installer package could do this job as some pre-cleanup. It's sure not a big problem, already documented as workaround/problem solution and just one thing to do for the user. But it would reduce the admin's time for updates and fail rates.

    bug question 
    opened by MrFly 5
  • Message per popup

    Message per popup

    Current behavior: Feedback to the user is only given by spoken messages which might not be audible depending on the audio settings. Desired behavior: Optionally, it should be possible to have a popup inform the user about impending logouts.

    See https://superuser.com/questions/309961/linux-how-to-send-message-to-local-user-logged-into-x11

    enhancement 
    opened by marcus67 5
  • Service launch issue (arm64) : 'alembic' has no attribute 'migration'

    Service launch issue (arm64) : 'alembic' has no attribute 'migration'

    Looks like I have issue to instal latest release: 1437324B little-brother_0.4.8_107.deb Linux version 4.19.0-17-arm64 ([email protected]) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.194-3 (2021-07-18) MemTotal: 226084 kB

    Specifics:

    1. Install on clean Debian 10 after update,
    2. ARM64 hardware

    @little-brother:~$ sudo cat /etc/os-release PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/"

    @little-brother:~$ sudo tail -n 39 /var/log/little-brother/LittleBrother.log 2021-09-12 17:12:58,829 - root - INFO - Terminated with exit code 1 2021-09-12 17:23:33,978 - root - INFO - Started logging in CWD=/ using module python_base_app.log_handling 2021-09-12 17:23:33,985 - Configuration - INFO - Reading configuration file from '/etc/little-brother/little-brother.config' 2021-09-12 17:23:33,989 - Persistence - INFO - Database URL for normal access: 'sqlite://var/spool/little-brother/little-brother.sqlite.db' 2021-09-12 17:23:34,073 - Persistence - INFO - Checking whether to create database 'little_brother'... 2021-09-12 17:23:34,073 - App - INFO - Upgrading database to revision 'head' using alembic with working directory /var/lib/little-brother/virtualenv/lib/python3.7/site-packages/little_brother... 2021-09-12 17:23:34,122 - alembic.runtime.migration - INFO - Context impl SQLiteImpl. 2021-09-12 17:23:34,123 - alembic.runtime.migration - INFO - Will assume non-transactional DDL. 2021-09-12 17:23:34,135 - root - INFO - Starting daemon process... 2021-09-12 17:23:34,135 - App - INFO - Daemon starten... 2021-09-12 17:23:34,159 - App - INFO - Daemon gestarted 2021-09-12 17:23:34,165 - App - INFO - Starting app 'LittleBrother' 2021-09-12 17:23:34,167 - Persistence - INFO - Database URL for normal access: 'sqlite://var/spool/little-brother/little-brother.sqlite.db' 2021-09-12 17:23:34,192 - App - ERROR - Error 'module 'alembic' has no attribute 'migration'' in basic_init() 2021-09-12 17:23:34,192 - App - ERROR - Exception 'module 'alembic' has no attribute 'migration'' in run() 2021-09-12 17:23:34,192 - App - INFO - Shutting down services -- START 2021-09-12 17:23:34,192 - App - INFO - Shutting down services -- END 2021-09-12 17:23:34,201 - root - CRITICAL - module 'alembic' has no attribute 'migration' 2021-09-12 17:23:34,214 - root - ERROR - Stack trace = File "/var/lib/little-brother/virtualenv/lib/python3.7/site-packages/python_base_app/base_app.py", line 591, in main app.start() File "/var/lib/little-brother/virtualenv/lib/python3.7/site-packages/python_base_app/daemon.py", line 178, in start self.run(*args, **kwargs) File "/var/lib/little-brother/virtualenv/lib/python3.7/site-packages/python_base_app/base_app.py", line 483, in run raise previous_exception File "/var/lib/little-brother/virtualenv/lib/python3.7/site-packages/python_base_app/base_app.py", line 463, in run self.basic_init() File "/var/lib/little-brother/virtualenv/lib/python3.7/site-packages/python_base_app/base_app.py", line 449, in basic_init raise e File "/var/lib/little-brother/virtualenv/lib/python3.7/site-packages/python_base_app/base_app.py", line 444, in basic_init self.prepare_services(p_full_startup=p_full_startup) File "/var/lib/little-brother/virtualenv/lib/python3.7/site-packages/little_brother/app.py", line 243, in prepare_services self.check_migrations() File "/var/lib/little-brother/virtualenv/lib/python3.7/site-packages/little_brother/app.py", line 174, in check_migrations current_version = db_mig.get_current_version() File "/var/lib/little-brother/virtualenv/lib/python3.7/site-packages/little_brother/db_migrations.py", line 61, in get_current_version context = alembic.migration.MigrationContext.configure(self._persistence.get_connection())

    2021-09-12 17:23:34,214 - root - INFO - Terminated with exit code 1 vaidls@little-brother:~$

    bug high priority 
    opened by vaidls 4
  • debug_mode=True causes crash of client and/or server

    debug_mode=True causes crash of client and/or server

    The upgrade on client side failed with the following error:

    2021-01-18 11:52:33,079 - root - INFO - Started logging in CWD=/ using module python_base_app.log_handling
    2021-01-18 11:52:33,081 - Configuration - INFO - Reading configuration file from '/etc/little-brother/little-brother.config'
    2021-01-18 11:52:33,082 - root - INFO - Set logging level to DEBUG
    2021-01-18 11:52:33,082 - Persistence - INFO - Database URL for normal access: 'sqlite://var/spool/little-brother/little-brother.sqlite.db'
    2021-01-18 11:52:33,092 - Persistence - INFO - Checking whether to create database little_brother...
    2021-01-18 11:52:33,093 - App - INFO - Upgrading database to revision 'head' using alembic with working directory /var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother...
    2021-01-18 11:52:33,114 - alembic.runtime.migration - INFO - Context impl SQLiteImpl.
    2021-01-18 11:52:33,114 - alembic.runtime.migration - INFO - Will assume non-transactional DDL.
    2021-01-18 11:52:33,118 - root - INFO - Starting daemon process...
    2021-01-18 11:52:33,118 - App - INFO - Daemon starten...
    2021-01-18 11:52:33,124 - App - INFO - Daemon gestarted
    2021-01-18 11:52:33,125 - App - INFO - Starting app 'LittleBrother'
    2021-01-18 11:52:33,126 - Persistence - INFO - Database URL for normal access: 'sqlite://var/spool/little-brother/little-brother.sqlite.db'
    2021-01-18 11:52:33,139 - alembic.runtime.migration - INFO - Context impl SQLiteImpl.
    2021-01-18 11:52:33,139 - alembic.runtime.migration - INFO - Will assume non-transactional DDL.
    2021-01-18 11:52:33,143 - App - INFO - Database is on alembic version version_0_3
    2021-01-18 11:52:33,325 - Persistence - INFO - Open database for normal access
    2021-01-18 11:52:33,348 - App - INFO - Module python_base_app is using Babel translations in /var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/translations
    2021-01-18 11:52:33,348 - UnixUserHandler - INFO - Using admin user 'None'
    2021-01-18 11:52:33,361 - AppControl - INFO - Watching usernames: xxx
    2021-01-18 11:52:33,361 - App - WARNING - Slave instance will not start web server due to missing port number
    2021-01-18 11:52:33,362 - AppControl - INFO - Starting application in SLAVE mode communication with master at URL http://192.168.178.10:5555/api
    2021-01-18 11:52:33,362 - AppControl - DEBUG - Queue for send: AdminEvent (type=START_CLIENT, host=yyy, user=None, process=None, PID=-)
    2021-01-18 11:52:33,362 - AppControl - INFO - Using fully qualified domain name 'yyy' for process infos
    2021-01-18 11:52:33,363 - App - DEBUG - Executing task app_control.scan_processes(ProcessHandler) 0.001 [s] behind schedule... *** START ***
    2021-01-18 11:52:33,371 - ClientProcessHandler - DEBUG - Scanning processes...
    2021-01-18 11:52:33,411 - App - DEBUG - Executing task app_control.scan_processes(ProcessHandler) 0.001 [s] behind schedule... *** END ***
    2021-01-18 11:52:33,412 - App - DEBUG - Executing task app_control.scan_processes(DeviceHandler) 0.051 [s] behind schedule... *** START ***
    2021-01-18 11:52:33,430 - App - DEBUG - Executing task app_control.scan_processes(DeviceHandler) 0.051 [s] behind schedule... *** END ***
    2021-01-18 11:52:33,431 - App - DEBUG - Executing task app_control.check 0.069 [s] behind schedule... *** START ***
    2021-01-18 11:52:33,431 - AppControl - WARNING - Cannot find user information for user 'xxx', will retry later...
    2021-01-18 11:52:33,432 - MasterConnector - DEBUG - Executing POST API call 'http://192.168.178.10:5555/api/events'
    2021-01-18 11:52:33,496 - AppControl - DEBUG - Queue locally: AdminEvent (type=PROCESS_START, host=yyy, user=xxx, process=None, PID=-)
    2021-01-18 11:52:33,497 - AppControl - DEBUG - Queue locally: AdminEvent (type=SPEAK, host=yyy, user=xxx, process=None, PID=-)
    2021-01-18 11:52:33,497 - AppControl - DEBUG - Processing AdminEvent (type=PROCESS_START, host=yyy, user=xxx, process=None, PID=-)
    2021-01-18 11:52:33,498 - App - WARNING - Propagating exception due to debug_mode=True
    2021-01-18 11:52:33,498 - App - ERROR - Exception ''NoneType' object has no attribute 'handle_event_process_start'' in run()
    2021-01-18 11:52:33,498 - App - INFO - Shutting down services -- START
    2021-01-18 11:52:33,498 - AppControl - INFO - Artificially terminating 0 active processes on ClientProcessHandler
    2021-01-18 11:52:33,498 - AppControl - INFO - Artificially terminating 0 active processes on ClientDeviceHandler
    2021-01-18 11:52:33,498 - AppControl - DEBUG - Processing AdminEvent (type=SPEAK, host=yyy, user=xxx, process=None, PID=-)
    2021-01-18 11:52:33,513 - MasterConnector - DEBUG - Executing POST API call 'http://192.168.178.10:5555/api/events'
    2021-01-18 11:52:33,523 - App - INFO - Shutting down services -- END
    2021-01-18 11:52:33,523 - root - CRITICAL - 'NoneType' object has no attribute 'handle_event_process_start'
    2021-01-18 11:52:33,524 - root - ERROR - Stack trace =   File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 589, in main
        app.start()
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/daemon.py", line 178, in start
        self.run(*args, **kwargs)
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 481, in run
        raise previous_exception
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 464, in run
        self.event_queue()
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 404, in event_queue
        raise e
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 380, in event_queue
        task.handler_method()
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother/app_control.py", line 431, in check
        self.process_queue()
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother/app_control.py", line 724, in process_queue
        new_events = self.process_event(p_event=event)
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother/app_control.py", line 681, in process_event
        self.handle_event_process_start(p_event=p_event)
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother/app_control.py", line 536, in handle_event_process_start
        pinfo, updated = self.get_process_handler(p_id=p_event.processhandler).handle_event_process_start(p_event)
    
    2021-01-18 11:52:33,524 - root - INFO - Terminated with exit code 1
    

    I reverted the client to 0.3.8_80, but no change. Seems that this error is caused by the server.

    Edit, interesting one: Replaced the server AND client with 0.3.8_80 (installed over it), and removed the sql lite database. The problem persists.

    Last edit (maybe): The problem is caused by the flag "debug_mode=True" -> This causes an access to a (maybe) non existing object which crashes the client. Same problem on server side, of debug_mode=True:

    2021-01-18 12:45:23,108 - App - WARNING - Propagating exception due to debug_mode=True
    2021-01-18 12:45:23,108 - App - ERROR - Exception 'No row was found for one()' in run()
    2021-01-18 12:45:23,108 - App - INFO - Shutting down services -- START
    2021-01-18 12:45:23,108 - StatusServer - INFO - Stopping web server Web Server...
    2021-01-18 12:45:23,109 - StatusServer - INFO - Sending shutdown API request 'http://0.0.0.0:5555/shutdown/a607f8b8598211eb8345a7950af959f9'
    2021-01-18 12:45:23,124 - StatusServer - INFO - Waiting for the server thread to terminate
    2021-01-18 12:45:23,618 - StatusServer - INFO - HTTP server 'Web Server' shut down successfully
    2021-01-18 12:45:23,619 - AppControl - INFO - Artificially terminating 0 active processes on ClientProcessHandler
    2021-01-18 12:45:23,620 - AppControl - INFO - Artificially terminating 3 active processes on ClientDeviceHandler
    2021-01-18 12:45:23,620 - AppControl - DEBUG - Queue locally: AdminEvent (type=PROCESS_END, host=yyy, user=xxx, process=None, PID=-)
    2021-01-18 12:45:23,621 - AppControl - DEBUG - Queue locally: AdminEvent (type=PROCESS_END, host=yyy, user=xxx, process=None, PID=-)
    2021-01-18 12:45:23,621 - AppControl - DEBUG - Queue locally: AdminEvent (type=PROCESS_END, host=yyy, user=xxx, process=None, PID=-)
    2021-01-18 12:45:23,622 - AppControl - DEBUG - Processing AdminEvent (type=PROCESS_END, host=yyy, user=xxx, process=None, PID=-)
    2021-01-18 12:45:23,622 - ClientDeviceHandler - DEBUG - TERMINATED ProcessInfo (host=yyy, user=xxx, process=None, PID=[None], epoch=1610969592)
    2021-01-18 12:45:23,633 - App - ERROR - Exception 'No row was found for one()' while stopping services
    2021-01-18 12:45:23,633 - root - CRITICAL - No row was found for one()
    2021-01-18 12:45:23,639 - root - ERROR - Stack trace =   File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 589, in main
        app.start()
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/daemon.py", line 178, in start
        self.run(*args, **kwargs)
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 481, in run
        raise previous_exception
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 464, in run
        self.event_queue()
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 404, in event_queue
        raise e
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/python_base_app/base_app.py", line 380, in event_queue
        task.handler_method()
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother/app_control.py", line 422, in check
        self.process_queue()
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother/app_control.py", line 724, in process_queue
        new_events = self.process_event(p_event=event)
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother/app_control.py", line 687, in process_event
        self.handle_event_process_end(p_event=p_event)
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother/app_control.py", line 573, in handle_event_process_end
        self._persistence.update_process_info(p_process_info=pinfo)
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/little_brother/persistence.py", line 801, in update_process_info
        pinfo = session.query(ProcessInfo).filter(ProcessInfo.key == p_process_info.get_key()).one()
      File "/var/lib/little-brother/virtualenv/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3500, in one
        raise orm_exc.NoResultFound("No row was found for one()")
    
    bug 
    opened by MrFly 4
  • Stack trace =   File

    Stack trace = File "/usr/local/lib/python3.9/dist-packages/python_base_app/base_app.py", line 382,

    Ping target is ofline and other two targets is not processed.

    ii little-brother 0.4.15-116

    2022-01-29 21:27:44,951 - App - ERROR - Exception ['/bin/ping', '-w', '1', '-c', '1', 'fejapc.local'] returns exit code 2 in event queue 2022-01-29 21:27:44,952 - App - ERROR - Stack trace = File "/usr/local/lib/python3.9/dist-packages/python_base_app/base_app.py", line 382, in event_queue task.handler_method() File "/usr/local/lib/python3.9/dist-packages/little_brother/app.py", line 348, in p_handler_method=lambda: self._app_control._process_handler_manager.scan_processes( File "/usr/local/lib/python3.9/dist-packages/little_brother/process_handler_manager.py", line 311, in scan_processes events = p_process_handler.scan_processes( File "/usr/local/lib/python3.9/dist-packages/little_brother/client_device_handler.py", line 280, in scan_processes self.ping_device(p_reference_time=p_reference_time, p_device=device) File "/usr/local/lib/python3.9/dist-packages/little_brother/client_device_handler.py", line 237, in ping_device delay = self._pinger.ping(p_host=p_device.hostname) File "/usr/local/lib/python3.9/dist-packages/python_base_app/pinger.py", line 102, in ping return self.local_ping(p_host=p_host) File "/usr/local/lib/python3.9/dist-packages/python_base_app/pinger.py", line 166, in local_ping raise ConfigurationException(fmt.format(cmd=command, exitcode=proc.returncode))

    2022-01-29 21:28:14,957 - App - ERROR - Exception ['/bin/ping', '-w', '1', '-c', '1', 'fejapc.local'] returns exit code 2 in event queue 2022-01-29 21:28:14,958 - App - ERROR - Stack trace = File "/usr/local/lib/python3.9/dist-packages/python_base_app/base_app.py", line 382, in event_queue task.handler_method() File "/usr/local/lib/python3.9/dist-packages/little_brother/app.py", line 348, in p_handler_method=lambda: self._app_control._process_handler_manager.scan_processes( File "/usr/local/lib/python3.9/dist-packages/little_brother/process_handler_manager.py", line 311, in scan_processes events = p_process_handler.scan_processes( File "/usr/local/lib/python3.9/dist-packages/little_brother/client_device_handler.py", line 280, in scan_processes self.ping_device(p_reference_time=p_reference_time, p_device=device) File "/usr/local/lib/python3.9/dist-packages/little_brother/client_device_handler.py", line 237, in ping_device delay = self._pinger.ping(p_host=p_device.hostname) File "/usr/local/lib/python3.9/dist-packages/python_base_app/pinger.py", line 102, in ping return self.local_ping(p_host=p_host) File "/usr/local/lib/python3.9/dist-packages/python_base_app/pinger.py", line 166, in local_ping raise ConfigurationException(fmt.format(cmd=command, exitcode=proc.returncode))

    bug high priority 
    opened by vaidls 3
  • LDAP -> separate people / group organizational units

    LDAP -> separate people / group organizational units

    it is quite common to have different ou for groups (containing posixGroup) and people (containing posixUser), currently it seems the config does not allow for that:

    # Distinguished name of the sub tree containing Posix users and groups (mandatory) ldap_search_base_dn = ou=people,dc=example,dc=com

    would be good to be able to specify separate sub trees for people and groups, without that option I can't get ldap to work for my config (wheel group for admins is in Groups ou, users to monitor are in people ou).

    enhancement 
    opened by bhulsken 3
  • Delay execution of kill command so that notification can be played

    Delay execution of kill command so that notification can be played

    Current behavior: There is a race condition between the issuing of the kill command and the playback of the notification about the impending logout. This often results in the notification not being played at all. Desired behavior: The is a configurable delay between the issuing of the notification and the kill command.

    Note: Special care has to be taken that the kill command is not issued more than necessary.

    bug enhancement 
    opened by marcus67 3
  • Terminate in case of out of disk error

    Terminate in case of out of disk error

    When LittleBrother encounters an out of disk error, it's probably wise to terminate the application since it has a continuous (albeit small) disk space consumption.

    opened by marcus67 0
  • python_base_app_ldap_extension is not a git submodule

    python_base_app_ldap_extension is not a git submodule

    Not sure if this is deliberate, but python_base_app is a git submodule, while python_base_app_ldap_extension is not. For consistencies sake it might be good to either have both as submodules (or the opposite, remove both)?

    I can easily work around this by manually pulling python_base_app_ldap_extension before I build my rpm, so it's not an important or blocking issue for me in any way.

    Thanks!

    opened by bhulsken 0
  • Internal API does not heed setting for relative URL

    Internal API does not heed setting for relative URL

    Current behavior: The internal API URL for receiving communication from the clients does not heed the setting base_url which is used for the Web GUI. Desired behavior: It should be possible to set the relative URL for the internal API. This should be an optional configuration since the internal API may only be used across the local network which does not require a relative URL (other than /).

    enhancement 
    opened by marcus67 0
  • Remove dependency on python_ldap from Docker client images

    Remove dependency on python_ldap from Docker client images

    The client does not use the LDAP interface since only the master handles authorization. Therefore, the PIP dependency on python_ldap could be removed from the file requirements.txt. This would also simplify the Dockerfiles of the images since, currently, there is a big problem with installing the PIP images of python_ldap due a breaking change in libldap.

    enhancement 
    opened by marcus67 0
  • Playtime on a weekly basis

    Playtime on a weekly basis

    Hi,

    thanks for the project. I would like to grant my kids a certain playtime per week, and they would than use/distribute it on their own.

    Im wondering if it would be possible to use the optional Time but on a weekly basis? As far as i can tell from the code the dailystatistic handles this right now but each day has his own statistic.

    Where would i start when i would like to implement something like an accounting for personal playtime? In my mind they would have a daily amount like it is at the moment and additionally an weekly/monthly amount that they can spend.

    Cheers Thomas

    enhancement 
    opened by klimacht 1
Owner
null
Consolidating and extending hosts files from several well-curated sources. You can optionally pick extensions to block pornography, social media, and other categories.

Take Note! With the exception of issues and PRs regarding changes to hosts/data/StevenBlack/hosts, all other issues regarding the content of the produ

Steven Black 22.1k Jan 2, 2023
Arbitrium is a cross-platform, fully undetectable remote access trojan, to control Android, Windows and Linux and doesn't require any firewall exceptions or port forwarding rules

About: Arbitrium is a cross-platform is a remote access trojan (RAT), Fully UnDetectable (FUD), It allows you to control Android, Windows and Linux an

Ayoub 861 Feb 18, 2021
DependConfusion-X Tool is written in Python3 that scans and monitors list of hosts for Dependency Confusion

DependConfusion-X Tool is written in Python3 which allows security researcher/bug bounty hunter to scan and monitor list of hosts for Dependency Confusion.

Ali Fathi Ali Sawehli 4 Dec 21, 2021
A fully automated, accurate, and extensive scanner for finding vulnerable log4j hosts

log4j-scan A fully automated, accurate, and extensive scanner for finding vulnerable log4j hosts Features Support for lists of URLs. Fuzzing for more

Duc Linh Nguyen 4 Aug 8, 2022
pybotnet - A Python Library for building Botnet , Trojan or BackDoor for windows and linux with Telegram control panel

pybotnet A Python Library for building botnet , trojan or backdoor for windows and linux with Telegram control panel Disclaimer: Please note that this

</oNion 181 Jan 2, 2023
The Linux defender anti-virus software ported to work on CentOS Linux.

By: Seanpm2001, Et; Al. Top README.md Read this article in a different language Sorted by: A-Z Sorting options unavailable ( af Afrikaans Afrikaans |

Sean P. Myrick V19.1.7.2 2 Sep 12, 2022
Python library to remotely extract credentials on a set of hosts.

Python library to remotely extract credentials on a set of hosts.

Pixis 1.5k Dec 31, 2022
Proof of concept to check if hosts are vulnerable to CVE-2021-41773

CVE-2021-41773 PoC Proof of concept to check if hosts are vulnerable to CVE-2021-41773. Description (https://cve.mitre.org/cgi-bin/cvename.cgi?name=CV

Jordan Jay 43 Nov 9, 2022
TLaunch: Launch Programs on Multiple Hosts

TLaunch: Launch Programs on Multiple Hosts Introduction Deepmind launchpad is a library that helps writing distributed program in a simple way. But cu

Tsinghua AI Research Team for Reinforcement Learning 11 Nov 11, 2022
Coerce authentication from Windows hosts via MS-FSRVP (Requires FS-VSS-AGENT service running on host)

VSSTrigger Coerce authentication from Windows hosts via MS-FSRVP (Requires FS-VS

Filip Dragovic 6 Jul 24, 2022
This tool ability to analyze software packages of different programming languages that are being or will be used in their codes, providing information that allows them to know in advance if this library complies with processes.

This tool gives developers, researchers and companies the ability to analyze software packages of different programming languages that are being or will be used in their codes, providing information that allows them to know in advance if this library complies with processes. secure development, if currently supported, possible backdoors (malicious embedded code), typosquatting analysis, the history of versions and reported vulnerabilities (CVEs) of the package.

Telefónica 66 Nov 8, 2022
Scan all java processes on your host to check weather it's affected by log4j2 remote code execution

Log4j2 Vulnerability Local Scanner (CVE-2021-45046) Log4j 漏洞本地检测脚本,扫描主机上所有java进程,检测是否引入了有漏洞的log4j-core jar包,是否可能遭到远程代码执行攻击(CVE-2021-45046)。上传扫描报告到指定的服

null 86 Dec 9, 2022
A wordlist generator tool, that allows you to supply a set of words, giving you the possibility to craft multiple variations from the given words, creating a unique and ideal wordlist to use regarding a specific target.

A wordlist generator tool, that allows you to supply a set of words, giving you the possibility to craft multiple variations from the given words, creating a unique and ideal wordlist to use regarding a specific target.

Cycurity 39 Dec 10, 2022
A simple linux keylogger project.

The project This project is a simple linux keylogger. When activated, it registers all the actions made with the keyboard. The log files are registere

null 1 Oct 24, 2021
A simple tool to audit Unix/*BSD/Linux system libraries to find public security vulnerabilities

master_librarian A simple tool to audit Unix/*BSD/Linux system libraries to find public security vulnerabilities. To install requirements: $ sudo pyth

CoolerVoid 167 Dec 19, 2022
A Telegram Bot to force users to join a specific channel before sending messages in a group.

Promoter A Telegram Bot to force users to join a specific channel before sending messages in a group. Introduction A Telegram Bot to force users to jo

Mr. Dynamic 1 Jan 27, 2022
ShoLister - a tool that collects all available subdomains for specific hostname or organization from Shodan

ShoLister is a tool that collects all available subdomains for specific hostname or organization from Shodan. The tool is designed to be used from Penetration Tester and Bug Bounty Hunters.

Eslam Akl 45 Dec 28, 2022
OpenTOTP is yet another time-based, one-time passwords (OTPs) generator/verifier inspired by RFC 6238.

OpenTOTP is yet another time-based, one-time passwords (OTPs) generator/verifier inspired by RFC 6238. It generates and validates OTPs based

null 1 Nov 15, 2021
Pupy is an opensource, cross-platform (Windows, Linux, OSX, Android) remote administration and post-exploitation tool mainly written in python

Pupy Installation Installation instructions are on the wiki, in addition to all other documentation. For maximum compatibility, it is recommended to u

null 7.4k Jan 4, 2023