System/Kernel


maildeliverer@delivery:~$ file /bin/bash ; uname -a ; cat /etc/*release
/bin/bash: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=ffe165dc81a64aea2b05beda07aeda8ad71f1e7c, stripped
Linux Delivery 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
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/"

4.19.0-13-amd64 Debian GNU/Linux 10 (buster) x86_64

Networks


maildeliverer@Delivery:~$ netstat -antup4
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:1025          0.0.0.0:*               LISTEN      -                   
tcp        0    612 10.10.10.222:22         10.10.14.5:33224        ESTABLISHED -                   
tcp        0      0 127.0.0.1:3306          127.0.0.1:56178         ESTABLISHED -                   
tcp        0      0 127.0.0.1:3306          127.0.0.1:56176         ESTABLISHED -                   
tcp        0      0 127.0.0.1:56180         127.0.0.1:3306          ESTABLISHED -                   
tcp        0      0 127.0.0.1:56178         127.0.0.1:3306          ESTABLISHED -                   
tcp        0      0 127.0.0.1:3306          127.0.0.1:56180         ESTABLISHED -                   
tcp        0      0 127.0.0.1:56176         127.0.0.1:3306          ESTABLISHED -                   
udp        0      0 0.0.0.0:631             0.0.0.0:*                           -                   
udp        0      0 10.10.10.222:60494      8.8.8.8:53              ESTABLISHED -                   
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           -                   
udp        0      0 0.0.0.0:58713           0.0.0.0:*                           -                   

127.0.0.1:3306 127.0.0.1:631 127.0.0.1:1025

Users & Groups


maildeliverer@delivery:~$ cat /etc/passwd ; ls -lasht /home
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
systemd-timesync:x:101:102:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin
systemd-network:x:102:103:systemd Network Management,,,:/run/systemd:/usr/sbin/nologin
systemd-resolve:x:103:104:systemd Resolver,,,:/run/systemd:/usr/sbin/nologin
messagebus:x:104:110::/nonexistent:/usr/sbin/nologin
sshd:x:105:65534::/run/sshd:/usr/sbin/nologin
avahi:x:106:115:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/usr/sbin/nologin
saned:x:107:116::/var/lib/saned:/usr/sbin/nologin
colord:x:108:117:colord colour management daemon,,,:/var/lib/colord:/usr/sbin/nologin
hplip:x:109:7:HPLIP system user,,,:/var/run/hplip:/bin/false
maildeliverer:x:1000:1000:MailDeliverer,,,:/home/maildeliverer:/bin/bash
systemd-coredump:x:999:999:systemd Core Dumper:/:/usr/sbin/nologin
mysql:x:110:118:MySQL Server,,,:/nonexistent:/bin/false
mattermost:x:998:998::/home/mattermost:/bin/sh
total 12K
4.0K drwxr-xr-x 19 root          root          4.0K Jul 14  2021 ..
4.0K drwxr-xr-x  3 maildeliverer maildeliverer 4.0K Jan  3  2021 maildeliverer
4.0K drwxr-xr-x  3 root          root          4.0K Dec 26  2020 .

mattermost

maildeliverer@delivery:~$ cut -d: -f1 /etc/passwd | xargs -n1 id
uid=0(root) gid=0(root) groups=0(root)
uid=1(daemon) gid=1(daemon) groups=1(daemon)
uid=2(bin) gid=2(bin) groups=2(bin)
uid=3(sys) gid=3(sys) groups=3(sys)
uid=4(sync) gid=65534(nogroup) groups=65534(nogroup)
uid=5(games) gid=60(games) groups=60(games)
uid=6(man) gid=12(man) groups=12(man)
uid=7(lp) gid=7(lp) groups=7(lp)
uid=8(mail) gid=8(mail) groups=8(mail)
uid=9(news) gid=9(news) groups=9(news)
uid=10(uucp) gid=10(uucp) groups=10(uucp)
uid=13(proxy) gid=13(proxy) groups=13(proxy)
uid=33(www-data) gid=33(www-data) groups=33(www-data)
uid=34(backup) gid=34(backup) groups=34(backup)
uid=38(list) gid=38(list) groups=38(list)
uid=39(irc) gid=39(irc) groups=39(irc)
uid=41(gnats) gid=41(gnats) groups=41(gnats)
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
uid=100(_apt) gid=65534(nogroup) groups=65534(nogroup)
uid=101(systemd-timesync) gid=102(systemd-timesync) groups=102(systemd-timesync)
uid=102(systemd-network) gid=103(systemd-network) groups=103(systemd-network)
uid=103(systemd-resolve) gid=104(systemd-resolve) groups=104(systemd-resolve)
uid=104(messagebus) gid=110(messagebus) groups=110(messagebus)
uid=105(sshd) gid=65534(nogroup) groups=65534(nogroup)
uid=106(avahi) gid=115(avahi) groups=115(avahi)
uid=107(saned) gid=116(saned) groups=116(saned),114(scanner)
uid=108(colord) gid=117(colord) groups=117(colord)
uid=109(hplip) gid=7(lp) groups=7(lp)
uid=1000(maildeliverer) gid=1000(maildeliverer) groups=1000(maildeliverer)
uid=999(systemd-coredump) gid=999(systemd-coredump) groups=999(systemd-coredump)
uid=110(mysql) gid=118(mysql) groups=118(mysql)
uid=998(mattermost) gid=998(mattermost) groups=998(mattermost)

SUIDs


maildeliverer@Delivery:~$ find / -perm -04000 -ls -type f 2>/dev/null
    29431     52 -rwsr-xr--   1 root     messagebus    51184 Jul  5  2020 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
    33503     20 -rwsr-xr-x   1 root     root          18888 Jan 15  2019 /usr/lib/policykit-1/polkit-agent-helper-1
     6243     12 -rwsr-xr-x   1 root     root          10232 Mar 28  2017 /usr/lib/eject/dmcrypt-get-device
   137443    428 -rwsr-xr-x   1 root     root         436552 Jan 31  2020 /usr/lib/openssh/ssh-keysign
    33500     24 -rwsr-xr-x   1 root     root          23288 Jan 15  2019 /usr/bin/pkexec
    22025     44 -rwsr-xr-x   1 root     root          44440 Jul 27  2018 /usr/bin/newgrp
    43400    156 -rwsr-xr-x   1 root     root         157192 Jan 20  2021 /usr/bin/sudo
    18672     84 -rwsr-xr-x   1 root     root          84016 Jul 27  2018 /usr/bin/gpasswd
    22172     64 -rwsr-xr-x   1 root     root          63568 Jan 10  2019 /usr/bin/su
    18669     56 -rwsr-xr-x   1 root     root          54096 Jul 27  2018 /usr/bin/chfn
    22498     52 -rwsr-xr-x   1 root     root          51280 Jan 10  2019 /usr/bin/mount
    18673     64 -rwsr-xr-x   1 root     root          63736 Jul 27  2018 /usr/bin/passwd
    18670     44 -rwsr-xr-x   1 root     root          44528 Jul 27  2018 /usr/bin/chsh
    22500     36 -rwsr-xr-x   1 root     root          34888 Jan 10  2019 /usr/bin/umount
    43220     36 -rwsr-xr-x   1 root     root          34896 Apr 22  2020 /usr/bin/fusermount

SGIDs


maildeliverer@delivery:~$ find / -perm -02000 -ls -type f 2>/dev/null
    36532      4 drwxrwsr-x   2 root     staff        4096 Jul 14  2021 /usr/local/share/fonts
   137000      4 drwxrwsr-x   4 root     staff        4096 Dec 26  2020 /usr/local/lib/python2.7
   138582      4 drwxrwsr-x   2 root     staff        4096 Dec 26  2020 /usr/local/lib/python2.7/site-packages
   137001      4 drwxrwsr-x   2 root     staff        4096 Dec 26  2020 /usr/local/lib/python2.7/dist-packages
     2422      4 drwxrwsr-x   3 root     staff        4096 Dec 26  2020 /usr/local/lib/python3.7
     2424      4 drwxrwsr-x   4 root     staff        4096 Jul 14  2021 /usr/local/lib/python3.7/dist-packages
   273904      4 drwxr-sr-x   2 root     staff        4096 Dec 26  2020 /usr/local/lib/python3.7/dist-packages/PyMySQL-0.10.1.dist-info
    11745      4 drwxr-sr-x   4 root     staff        4096 Jul 14  2021 /usr/local/lib/python3.7/dist-packages/pymysql
    11759      4 drwxr-sr-x   2 root     staff        4096 Jul 14  2021 /usr/local/lib/python3.7/dist-packages/pymysql/__pycache__
    11773      4 drwxr-sr-x   3 root     staff        4096 Jul 14  2021 /usr/local/lib/python3.7/dist-packages/pymysql/constants
    11782      4 drwxr-sr-x   2 root     staff        4096 Jul 14  2021 /usr/local/lib/python3.7/dist-packages/pymysql/constants/__pycache__
    19425     40 -rwxr-sr-x   1 root     shadow      39616 Feb 14  2019 /usr/sbin/unix_chkpwd
   268157      4 drwxrwsr-t   2 root     lpadmin      4096 Nov 28  2020 /usr/share/ppd/custom
    35366     12 -rwxr-sr-x   1 root     utmp        10232 Feb 18  2016 /usr/lib/x86_64-linux-gnu/utempter/utempter
    24547     16 -rwxr-sr-x   1 root     tty         14736 May  4  2018 /usr/bin/bsd-write
    20316     36 -rwxr-sr-x   1 root     tty         34896 Jan 10  2019 /usr/bin/wall
    29622     20 -rwxr-sr-x   1 root     mail        18944 Dec  3  2017 /usr/bin/dotlockfile
    18668     72 -rwxr-sr-x   1 root     shadow      71816 Jul 27  2018 /usr/bin/chage
    18671     32 -rwxr-sr-x   1 root     shadow      31000 Jul 27  2018 /usr/bin/expiry
    32737    316 -rwxr-sr-x   1 root     ssh        321672 Jan 31  2020 /usr/bin/ssh-agent
    24667     44 -rwxr-sr-x   1 root     crontab     43568 Oct 11  2019 /usr/bin/crontab
    37968     16 -rwxr-sr-x   1 root     mail        14648 Feb 26  2019 /usr/bin/mlock
    12355      4 drwxrwsr-x   2 root     staff        4096 Jul 14  2021 /var/local
    12401      4 drwxrwsr-x   2 root     mail         4096 Jul 14  2021 /var/mail
    15754      4 drwxr-s---   2 mysql    adm          4096 mar 27 10:54 /var/log/mysql
    11401      0 drwxr-sr-x   3 root     systemd-journal       60 mar 27 10:54 /run/log/journal
    11402      0 drwxr-s---   2 root     systemd-journal       80 mar 27 17:14 /run/log/journal/73630b912c6c4eedb85af22789dfb6f2

Processes


maildeliverer@Delivery:~$ ps -auxwww
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.2 169460 10136 ?        Ss   10:54   0:03 /sbin/init
root       258  0.0  0.2  39768 10540 ?        Ss   10:54   0:01 /lib/systemd/systemd-journald
root       282  0.0  0.1  22568  5276 ?        Ss   10:54   0:00 /lib/systemd/systemd-udevd
systemd+   319  0.0  0.1  95148  6552 ?        Ssl  10:54   0:01 /lib/systemd/systemd-timesyncd
root       321  0.0  0.2  48228 10788 ?        Ss   10:54   0:00 /usr/bin/VGAuthService
root       326  0.0  0.3 122852 12256 ?        Ssl  10:54   0:28 /usr/bin/vmtoolsd
root       417  0.0  0.1 225824  4352 ?        Ssl  10:54   0:00 /usr/sbin/rsyslogd -n -iNONE
root       424  0.0  0.0   8504  2736 ?        Ss   10:54   0:00 /usr/sbin/cron -f
root       426  0.0  0.1  19392  7192 ?        Ss   10:54   0:00 /lib/systemd/systemd-logind
root       459  0.0  0.2 180840 10560 ?        Ssl  10:54   0:00 /usr/sbin/cups-browsed
root       496  0.0  0.0  67848  1808 ?        Ss   10:54   0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
root       653  0.0  0.1  29076  7952 ?        Ss   10:54   0:00 /usr/sbin/cupsd -l
lp         659  0.0  0.1  19120  6316 ?        S    10:54   0:00 /usr/lib/cups/notifier/dbus dbus://
matterm+   769  0.0  3.5 1649852 143344 ?      Ssl  10:54   0:29 /opt/mattermost/bin/mattermost
root      1008  0.0  0.4  29536 18024 ?        S    10:55   0:00 python3 /root/py-smtp.py
matterm+  1068  0.0  0.4 1309304 17724 ?       Sl   11:08   0:00 plugins/com.mattermost.plugin-channel-export/server/dist/plugin-linux-amd64
matterm+  1077  0.0  0.6 1239060 26056 ?       Sl   11:08   0:02 plugins/com.mattermost.nps/server/dist/plugin-linux-amd64
root      4215  0.0  0.2  16928  8216 ?        Ss   20:02   0:00 sshd: maildeliverer [priv]
maildel+  4372  0.0  0.0  10916  3104 pts/0    R+   20:08   0:00 ps -auxwww

/usr/sbin/cron -f /usr/sbin/cups-browsed /usr/sbin/cupsd -l /opt/mattermost/bin/mattermost python3 /root/py-smtp.py

Cron & Systemd


maildeliverer@delivery:~$ crontab -l ; cat /etc/crontab ; systemctl list-timers
no crontab for maildeliverer
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
 
SHELL=/bin/sh
path=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
# example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
17 *	* * *	root    cd / && run-parts --report /etc/cron.hourly
25 6	* * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6	* * 7	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6	1 * *	root	test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
* * * * *	root	/root/mail.sh
#
NEXT                         LEFT          LAST                         PASSED       UNIT                         ACTIVATES
mon 2023-03-27 20:39:00 EDT  28min left    Mon 2023-03-27 20:09:01 EDT  1min 29s ago phpsessionclean.timer        phpsessionclean.servic
mon 2023-03-27 21:49:46 EDT  1h 39min left Mon 2023-03-27 10:54:22 EDT  9h ago       apt-daily.timer              apt-daily.service
tue 2023-03-28 00:00:00 EDT  3h 49min left Mon 2023-03-27 10:54:22 EDT  9h ago       logrotate.timer              logrotate.service
tue 2023-03-28 00:00:00 EDT  3h 49min left Mon 2023-03-27 10:54:22 EDT  9h ago       man-db.timer                 man-db.service
tue 2023-03-28 06:00:43 EDT  9h left       Mon 2023-03-27 10:54:22 EDT  9h ago       apt-daily-upgrade.timer      apt-daily-upgrade.serv
tue 2023-03-28 11:09:23 EDT  14h left      Mon 2023-03-27 11:09:23 EDT  9h ago       systemd-tmpfiles-clean.timer systemd-tmpfiles-clean
 
6 timers listed.
Pass --all to see loaded but inactive timers, too.
lines 1-10/10 (END)

* * * * * root /root/mail.sh

Sudo Version


maildeliverer@Delivery:~$ sudo -V
Sudo version 1.8.27
Sudoers policy plugin version 1.8.27
Sudoers file grammar version 46
Sudoers I/O plugin version 1.8.27

Sudo version 1.8.27

Glibc Version


maildeliverer@delivery:~$ ldd --version
ldd (Debian GLIBC 2.28-10) 2.28
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.