System/Kernel


www-data@swagshop:/var/www/html$ file /bin/bash ; uname -a ; cat /etc/*release
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, BuildID[sha1]=04eca96c5bf3e9a300952a29ef3218f00487d37b, stripped
linux swagshop 4.4.0-146-generic #172-ubuntu smp wed apr 3 09:00:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.6 LTS"
NAME="Ubuntu"
VERSION="16.04.6 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.6 LTS"
VERSION_ID="16.04"
home_url="http://www.ubuntu.com/"
support_url="http://help.ubuntu.com/"
bug_report_url="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
`4.4.0-146-generic`

Ubuntu 16.04.6 LTS (Xenial Xerus) x86_64

Networks


www-data@swagshop:/var/www/html$ netstat -antup4
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:22              0.0.0.0:*               LISTEN      -                    
tcp        0      0 10.10.10.140:48066      10.10.14.11:9999        ESTABLISHED 2545/sh         
udp        0      0 10.10.10.140:48391      1.1.1.1:53              ESTABLISHED - 

127.0.0.1:3306

Users & Groups


www-data@swagshop:/var/www/html$ cat /etc/passwd ; ll /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:/bin/bash
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-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false
systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false
systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false
systemd-bus-proxy:x:103:105:systemd Bus Proxy,,,:/run/systemd:/bin/false
syslog:x:104:108::/home/syslog:/bin/false
_apt:x:105:65534::/nonexistent:/bin/false
lxd:x:106:65534::/var/lib/lxd/:/bin/false
mysql:x:107:111:MySQL Server,,,:/nonexistent:/bin/false
messagebus:x:108:112::/var/run/dbus:/bin/false
uuidd:x:109:113::/run/uuidd:/bin/false
dnsmasq:x:110:65534:dnsmasq,,,:/var/lib/misc:/bin/false
sshd:x:111:65534::/var/run/sshd:/usr/sbin/nologin
haris:x:1000:1000:haris,,,:/home/haris:/bin/bash
total 12K
4.0k drwxr-xr-x 23 root  root  4.0k may 24 10:50 ..
4.0K drwxr-xr-x  3 root  root  4.0K Nov 12  2021 .
4.0K drwxr-xr-x  3 haris haris 4.0K Nov 12  2021 haris

haris

SUIDs


www-data@swagshop:/var/www/html$ find / -perm -04000 -ls -type f 2>/dev/null
    66711     40 -rwsr-xr-x   1 root     root        40152 May 16  2018 /bin/mount
    66761     44 -rwsr-xr-x   1 root     root        44168 May  7  2014 /bin/ping
    66762     44 -rwsr-xr-x   1 root     root        44680 May  7  2014 /bin/ping6
    73191     40 -rwsr-xr-x   1 root     root        40128 Mar 26  2019 /bin/su
    66746     28 -rwsr-xr-x   1 root     root        27608 May 16  2018 /bin/umount
    72887     32 -rwsr-xr-x   1 root     root        30800 Jul 12  2016 /bin/fusermount
     1261     84 -rwsr-xr-x   1 root     root        84120 Apr  9  2019 /usr/lib/x86_64-linux-gnu/lxc/lxc-user-nic
     5507    420 -rwsr-xr-x   1 root     root       428240 Mar  4  2019 /usr/lib/openssh/ssh-keysign
   145692    100 -rwsr-sr-x   1 root     root        98472 Mar 22  2019 /usr/lib/snapd/snap-confine
   151777     16 -rwsr-xr-x   1 root     root        14864 Mar 27  2019 /usr/lib/policykit-1/polkit-agent-helper-1
     9627     44 -rwsr-xr--   1 root     messagebus    42992 Jan 12  2017 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
      370     12 -rwsr-xr-x   1 root     root          10232 Mar 27  2017 /usr/lib/eject/dmcrypt-get-device
      269    136 -rwsr-xr-x   1 root     root         136808 Jul  4  2017 /usr/bin/sudo
     1318     36 -rwsr-xr-x   1 root     root          32944 Mar 26  2019 /usr/bin/newgidmap
    12494     52 -rwsr-sr-x   1 daemon   daemon        51464 Jan 14  2016 /usr/bin/at
     1319     36 -rwsr-xr-x   1 root     root          32944 Mar 26  2019 /usr/bin/newuidmap
     3473     72 -rwsr-xr-x   1 root     root          71824 Mar 26  2019 /usr/bin/chfn
     3510     76 -rwsr-xr-x   1 root     root          75304 Mar 26  2019 /usr/bin/gpasswd
     3489     56 -rwsr-xr-x   1 root     root          54256 Mar 26  2019 /usr/bin/passwd
     4128     40 -rwsr-xr-x   1 root     root          39904 Mar 26  2019 /usr/bin/newgrp
     6031     24 -rwsr-xr-x   1 root     root          23376 Mar 27  2019 /usr/bin/pkexec
     3512     40 -rwsr-xr-x   1 root     root          40432 Mar 26  2019 /usr/bin/chsh

/usr/bin/pkexec

SGIDs


www-data@swagshop:/var/www/html$ find / -perm -02000 -ls -type f 2>/dev/null
    49492     36 -rwxr-sr-x   1 root     shadow      35632 Apr  9  2018 /sbin/pam_extrausers_chkpwd
    49582     36 -rwxr-sr-x   1 root     shadow      35600 Apr  9  2018 /sbin/unix_chkpwd
    49930      4 drwxrwsr-x   2 root     mail         4096 Nov 12  2021 /var/mail
    49914      4 drwxrwsr-x   2 root     staff        4096 Nov 12  2021 /var/local
    52445      4 drwxr-sr-x   2 man      root         4096 Nov 12  2021 /var/cache/man
      310      0 drwxr-sr-x   3 root     systemd-journal       60 oct 31 13:23 /run/log/journal
      311      0 drwxr-s---   2 root     systemd-journal       80 oct 31 13:23 /run/log/journal/a42528f290483c7e699a808c5ccb3ada
    12550     12 -rwxr-sr-x   1 root     utmp               10232 Mar 11  2016 /usr/lib/x86_64-linux-gnu/utempter/utempter
   145692    100 -rwsr-sr-x   1 root     root               98472 Mar 22  2019 /usr/lib/snapd/snap-confine
     3575     28 -rwxr-sr-x   1 root     tty                27368 May 16  2018 /usr/bin/wall
     3471     64 -rwxr-sr-x   1 root     shadow             62336 Mar 26  2019 /usr/bin/chage
    12494     52 -rwsr-sr-x   1 daemon   daemon             51464 Jan 14  2016 /usr/bin/at
     5494    352 -rwxr-sr-x   1 root     ssh               358624 Mar  4  2019 /usr/bin/ssh-agent
    10042     16 -rwxr-sr-x   1 root     tty                14752 Mar  1  2016 /usr/bin/bsd-write
     3511     24 -rwxr-sr-x   1 root     shadow             22768 Mar 26  2019 /usr/bin/expiry
       58     36 -rwxr-sr-x   1 root     crontab            36080 Apr  5  2016 /usr/bin/crontab
    12114     40 -rwxr-sr-x   1 root     mlocate            39520 Nov 18  2014 /usr/bin/mlocate
    12573    428 -rwxr-sr-x   1 root     utmp              434216 Feb  7  2016 /usr/bin/screen
    10855      4 drwxrwsr-x   2 root     staff               4096 May  2  2019 /usr/local/share/fonts
   146090      4 drwxrwsr-x   7 root     staff               4096 May  2  2019 /usr/local/share/sgml
   146092      4 drwxrwsr-x   2 root     staff               4096 May  2  2019 /usr/local/share/sgml/stylesheet
   146093      4 drwxrwsr-x   2 root     staff               4096 May  2  2019 /usr/local/share/sgml/entities
   146095      4 drwxrwsr-x   2 root     staff               4096 May  2  2019 /usr/local/share/sgml/dtd
   146094      4 drwxrwsr-x   2 root     staff               4096 May  2  2019 /usr/local/share/sgml/misc
   146091      4 drwxrwsr-x   2 root     staff               4096 May  2  2019 /usr/local/share/sgml/declaration
    24706      4 drwxrwsr-x   6 root     staff               4096 Nov 12  2021 /usr/local/share/xml
    24709      4 drwxrwsr-x   2 root     staff               4096 Nov 12  2021 /usr/local/share/xml/entities
    24710      4 drwxrwsr-x   2 root     staff               4096 Nov 12  2021 /usr/local/share/xml/schema
    24707      4 drwxrwsr-x   2 root     staff               4096 Nov 12  2021 /usr/local/share/xml/misc
    24708      4 drwxrwsr-x   2 root     staff               4096 Nov 12  2021 /usr/local/share/xml/declaration
     3021      4 drwxrwsr-x   3 root     staff               4096 May  2  2019 /usr/local/lib/python3.5
     3022      4 drwxrwsr-x   2 root     staff               4096 Aug  1  2017 /usr/local/lib/python3.5/dist-packages

Processes


www-data@swagshop:/var/www/html$ ps -auxwww
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.2  37984  6004 ?        Ss   08:22   0:02 /sbin/init
root       500  0.0  0.1  29644  2808 ?        Ss   08:22   0:00 /lib/systemd/systemd-journald
root       537  0.0  0.0 102972  1504 ?        Ss   08:22   0:00 /sbin/lvmetad -f
root       559  0.0  0.2  44756  4380 ?        Ss   08:22   0:00 /lib/systemd/systemd-udevd
systemd+   770  0.0  0.1 100324  2564 ?        Ssl  08:22   0:00 /lib/systemd/systemd-timesyncd
message+   962  0.0  0.1  42900  3748 ?        Ss   08:22   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root       990  0.0  0.1  20100  2792 ?        Ss   08:22   0:00 /lib/systemd/systemd-logind
root       993  0.0  0.4  85440  8716 ?        Ss   08:22   0:00 /usr/bin/VGAuthService
syslog    1001  0.0  0.1 256392  3348 ?        Ssl  08:22   0:00 /usr/sbin/rsyslogd -n
root      1008  0.0  0.0  95368  1520 ?        Ssl  08:22   0:00 /usr/bin/lxcfs /var/lib/lxcfs/
root      1010  0.0  0.0   4396  1264 ?        Ss   08:22   0:00 /usr/sbin/acpid
root      1012  0.0  0.1  27732  3056 ?        Ss   08:22   0:00 /usr/sbin/cron -f
daemon    1014  0.0  0.1  26048  2176 ?        Ss   08:22   0:00 /usr/sbin/atd -f
root      1019  0.0  0.3 274592  6304 ?        Ssl  08:22   0:00 /usr/lib/accountsservice/accounts-daemon
root      1079  0.0  0.0  13372   160 ?        Ss   08:22   0:00 /sbin/mdadm --monitor --pid-file /run/mdadm/monitor.pid --daemonise --scan --syslog
root      1082  0.0  0.2 277092  5936 ?        Ssl  08:22   0:00 /usr/lib/policykit-1/polkitd --no-debug
root      1216  0.0  0.9 173324 19696 ?        Ssl  08:22   0:00 /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal
root      1240  0.0  0.3  65516  6260 ?        Ss   08:22   0:00 /usr/sbin/sshd -D
mysql     1247  0.0  8.2 1567128 169384 ?      Ssl  08:22   0:15 /usr/sbin/mysqld
root      1254  0.0  0.0   5220   148 ?        Ss   08:22   0:00 /sbin/iscsid
root      1255  0.0  0.1   5720  3516 ?        S<Ls 08:22   0:03 /sbin/iscsid
root      1327  0.0  0.0  14656  1864 tty1     Ss+  08:22   0:00 /sbin/agetty --noclear tty1 linux
root      1349  0.0  0.1  19620  2128 ?        Ss   08:22   0:00 /usr/sbin/irqbalance --pid=/var/run/irqbalance.pid
root      1383  0.0  1.4 405796 30380 ?        Ss   08:22   0:01 /usr/sbin/apache2 -k start
www-data  2557  0.0  0.1  34428  2952 ?        R    15:18   0:00 ps -auxwww

/lib/systemd/systemd-udevd /usr/sbin/cron -f /usr/lib/policykit-1/polkitd --no-debug /usr/sbin/mysqld

Cron & Systemd


www-data@swagshop:/var/www/html$ crontab -l ; cat /etc/crontab ; systemctl list-timers
# /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 UNIT                         ACTIVATES
thu 2023-01-26 18:53:57 EST  3h 33min left Thu 2023-01-26 08:22:31 EST  6h ago apt-daily.timer              apt-daily.service
fri 2023-01-27 06:10:05 EST  14h left      Thu 2023-01-26 08:22:31 EST  6h ago apt-daily-upgrade.timer      apt-daily-upgrade.service
fri 2023-01-27 08:37:28 EST  17h left      Thu 2023-01-26 08:37:28 EST  6h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
 
3 timers listed.

Sudo Version


www-data@swagshop:/var/www/html$ sudo -V
Sudo version 1.8.16
Sudoers policy plugin version 1.8.16
Sudoers file grammar version 45
Sudoers I/O plugin version 1.8.16

Sudo version 1.8.16

Glibc Version


www-data@swagshop:/var/www/html$ ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu11) 2.23
Copyright (C) 2016 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.23-0ubuntu11) 2.23