System/Kernel


$ file /bin/bash ; uname -a ; cat /etc/*release
/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=1d878a5214eef416ceb5ee0c4f537fb9b417daf8, stripped
linux tartarsauce 4.15.0-041500-generic #201802011154 smp thu feb 1 12:05:23 UTC 2018 i686 athlon i686 GNU/Linux
$ DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 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.15.0-041500-generic Ubuntu 16.04.4 LTS (Xenial Xerus) i686

Networks


$ 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 10.10.10.88:45910       10.10.14.10:9999        ESTABLISHED 3957/sh         
tcp        1      0 10.10.10.88:80          10.10.14.10:58416       CLOSE_WAIT  -          

127.0.0.1:3306

Users & Groups


$ 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:/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-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
onuma:x:1000:1000:,,,:/home/onuma:/bin/bash
$ total 12K
4.0K drwxr-xr-x  3 root  root  4.0K May 12  2022 .
4.0K drwxrw----  5 onuma onuma 4.0K May 12  2022 onuma
4.0K drwxr-xr-x 22 root  root  4.0K May 12  2022 ..

onuma

SUIDs


$ find / -perm -04000 -ls -type f 2>/dev/null
    23320     28 -rwsr-xr-x   1 root     root        26492 Nov 30  2017 /bin/umount
    23292     36 -rwsr-xr-x   1 root     root        34812 Nov 30  2017 /bin/mount
    23340     40 -rwsr-xr-x   1 root     root        38932 May  7  2014 /bin/ping
    23397     32 -rwsr-xr-x   1 root     root        30112 Jul 12  2016 /bin/fusermount
    23357     40 -rwsr-xr-x   1 root     root        38900 May 16  2017 /bin/su
    23407    156 -rwsr-xr-x   1 root     root       157424 Jan 28  2017 /bin/ntfs-3g
    23341     44 -rwsr-xr-x   1 root     root        43316 May  7  2014 /bin/ping6
   130323    148 -rwSr--r-T   1 root     root       150667 Mar  9  2018 /var/www/html/webservices/wp/wp-content/plugins/gwolle-gb/frontend/captcha/\310\234\323\216\305\227g\315\267\315\274\310\234_5h377
    50055     20 -rwsr-xr-x   1 root     root        18216 Jan 17  2016 /usr/bin/pkexec
    40255     36 -rwsr-xr-x   1 root     root        34680 May 16  2017 /usr/bin/newgrp
    40128     48 -rwsr-xr-x   1 root     root        48264 May 16  2017 /usr/bin/chfn
    40130     40 -rwsr-xr-x   1 root     root        39560 May 16  2017 /usr/bin/chsh
    40350    160 -rwsr-xr-x   1 root     root       159852 Jul  4  2017 /usr/bin/sudo
    40191     80 -rwsr-xr-x   1 root     root        78012 May 16  2017 /usr/bin/gpasswd
    49131     36 -rwsr-xr-x   1 root     root        36288 May 16  2017 /usr/bin/newgidmap
    40266     52 -rwsr-xr-x   1 root     root        53128 May 16  2017 /usr/bin/passwd
    49779     52 -rwsr-sr-x   1 daemon   daemon      50748 Jan 14  2016 /usr/bin/at
    49130     36 -rwsr-xr-x   1 root     root        36288 May 16  2017 /usr/bin/newuidmap
    47907     48 -rwsr-xr--   1 root     messagebus    46436 Jan 12  2017 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
    42758    504 -rwsr-xr-x   1 root     root         513528 Jan 18  2018 /usr/lib/openssh/ssh-keysign
    50046     16 -rwsr-xr-x   1 root     root          13960 Jan 17  2016 /usr/lib/policykit-1/polkit-agent-helper-1
    40450      8 -rwsr-xr-x   1 root     root           5480 Mar 27  2017 /usr/lib/eject/dmcrypt-get-device
    49103     44 -rwsr-xr-x   1 root     root          42396 Jun 14  2017 /usr/lib/i386-linux-gnu/lxc/lxc-user-nic
    42574    104 -rwsr-sr-x   1 root     root         105004 Apr 11  2018 /usr/lib/snapd/snap-confine
 

/var/www/html/webservices/wp/wp-content/plugins/gwolle-gb/frontend/captcha/\310\234\323\216\305\227g\315\267\315\274\310\234_5h377 /bin/ntfs-3g /usr/bin/pkexec /usr/lib/policykit-1/polkit-agent-helper-1

SGIDs


$ find / -perm -02000 -ls -type f 2>/dev/null
    15731      0 drwxr-sr-x   3 root     systemd-journal       60 jan 23 06:39 /run/log/journal
    15732      0 drwxr-s---   2 root     systemd-journal      200 jan 23 08:15 /run/log/journal/3458f791ef4f18af61a8a5615a7da914
    69177      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /var/local
    75419      4 drwxr-sr-x   2 man      root                4096 May 12  2022 /var/cache/man
    69193      4 drwxrwsr-x   2 root     mail                4096 May 12  2022 /var/mail
    40260     40 -rwxr-sr-x   1 root     shadow             38664 Apr  9  2018 /sbin/unix_chkpwd
    40250     40 -rwxr-sr-x   1 root     shadow             38684 Apr  9  2018 /sbin/pam_extrausers_chkpwd
    50201      4 drwxrwsr-x   7 root     staff               4096 May 12  2022 /usr/local/share/sgml
    50203      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/share/sgml/stylesheet
    50202      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/share/sgml/declaration
    50204      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/share/sgml/entities
    50206      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/share/sgml/dtd
    50205      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/share/sgml/misc
    64305      4 drwxrwsr-x   6 root     staff               4096 May 12  2022 /usr/local/share/xml
    64307      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/share/xml/declaration
    64308      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/share/xml/entities
    64309      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/share/xml/schema
    64306      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/share/xml/misc
    53923      4 drwxrwsr-x   4 root     staff               4096 May 12  2022 /usr/local/lib/python2.7
    53925      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/lib/python2.7/dist-packages
    54072      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/lib/python2.7/site-packages
    43098      4 drwxrwsr-x   3 root     staff               4096 May 12  2022 /usr/local/lib/python3.5
    43099      4 drwxrwsr-x   2 root     staff               4096 May 12  2022 /usr/local/lib/python3.5/dist-packages
    49617     36 -rwxr-sr-x   1 root     mlocate            34452 Nov 18  2014 /usr/bin/mlocate
    42761    424 -rwxr-sr-x   1 root     ssh               431632 Jan 18  2018 /usr/bin/ssh-agent
    40139     40 -rwxr-sr-x   1 root     crontab            38996 Apr  5  2016 /usr/bin/crontab
    48312     12 -rwxr-sr-x   1 root     tty                 9788 Mar  1  2016 /usr/bin/bsd-write
    40176     24 -rwxr-sr-x   1 root     shadow             22000 May 16  2017 /usr/bin/expiry
    49801    456 -rwxr-sr-x   1 root     utmp              464152 Feb  7  2016 /usr/bin/screen
    40125     60 -rwxr-sr-x   1 root     shadow             61276 May 16  2017 /usr/bin/chage
    51050     28 -rwxr-sr-x   1 root     tty                26356 Nov 30  2017 /usr/bin/wall
     4380      8 -rwxr-sr-x   1 root     utmp                5480 Mar 11  2016 /usr/lib/i386-linux-gnu/utempter/utempter
    42574    104 -rwsr-sr-x   1 root     root              105004 Apr 11  2018 /usr/lib/snapd/snap-confine

Processes


$ ps -aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.2   6584  4992 ?        Ss   06:39   0:01 /sbin/init
root       481  0.1  0.1   7048  3268 ?        Ss   06:39   0:11 /lib/systemd/systemd-journald
root       507  0.0  0.2  14872  4236 ?        Ss   06:39   0:00 /lib/systemd/systemd-udevd
root       509  0.0  0.0  21480  1452 ?        Ss   06:39   0:00 /sbin/lvmetad -f
systemd+   772  0.0  0.1  12600  2376 ?        Ssl  06:39   0:00 /lib/systemd/systemd-timesyncd
root       899  0.0  0.1   5584  2708 ?        Ss   06:39   0:00 /usr/sbin/cron -f
syslog     907  0.0  0.1  30728  3348 ?        Ssl  06:39   0:04 /usr/sbin/rsyslogd -n
root       909  0.0  0.2  37672  5960 ?        Ssl  06:39   0:00 /usr/lib/accountsservice/accounts-daemon
root       920  0.0  0.0   2248  1100 ?        Ss   06:39   0:00 /usr/sbin/acpid
root       921  0.0  0.0  30424  1964 ?        Ssl  06:39   0:00 /usr/bin/lxcfs /var/lib/lxcfs/
root       925  0.0  0.6 854564 12896 ?        Ssl  06:39   0:00 /usr/lib/snapd/snapd
root       926  0.0  0.0   3800  1088 ?        Ss   06:39   0:00 /lib/systemd/systemd-logind
message+   933  0.0  0.1   6052  3952 ?        Ss   06:39   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
daemon     989  0.0  0.1   3484  2116 ?        Ss   06:39   0:00 /usr/sbin/atd -f
root       990  0.1  0.4  52144  9160 ?        Ssl  06:39   0:07 /usr/bin/vmtoolsd
root      1037  0.0  0.0   3136   124 ?        Ss   06:39   0:00 /sbin/mdadm --monitor --pid-file /run/mdadm/monitor.pid --daemonise --scan --syslog
root      1040  0.0  0.2  35768  5684 ?        Ssl  06:39   0:00 /usr/lib/policykit-1/polkitd --no-debug
root      1203  0.0  0.0   2988   116 ?        Ss   06:39   0:00 /sbin/iscsid
root      1204  0.0  0.1   3448  2996 ?        S<Ls 06:39   0:00 /sbin/iscsid
mysql     1217  0.0  6.5 545844 134356 ?       Ssl  06:39   0:03 /usr/sbin/mysqld
root      1258  0.0  0.0   4752  1644 tty1     Ss+  06:39   0:00 /sbin/agetty --noclear tty1 linux
root      1332  0.0  1.1 120160 24480 ?        Ss   06:39   0:00 /usr/sbin/apache2 -k start
www-data  1952  0.1  1.0 120792 20760 ?        S    06:57   0:05 /usr/sbin/apache2 -k start
www-data  1987  0.1  1.3 121588 28256 ?        S    06:57   0:05 /usr/sbin/apache2 -k start
www-data  1995  0.6  1.2 121128 25540 ?        R    06:57   0:32 /usr/sbin/apache2 -k start
www-data  2012  0.1  1.0 120784 21668 ?        S    06:57   0:05 /usr/sbin/apache2 -k start
www-data  2025 12.1  1.1 120784 23804 ?        S    06:57  10:01 /usr/sbin/apache2 -k start
www-data  2030  0.1  1.4 121044 29396 ?        S    06:57   0:05 /usr/sbin/apache2 -k start
www-data  2031  0.1  1.1 120784 23620 ?        S    06:58   0:05 /usr/sbin/apache2 -k start
www-data  2149  0.0  1.2 121204 25108 ?        S    06:59   0:04 /usr/sbin/apache2 -k start
www-data  2302  0.0  0.4 120392  8816 ?        S    07:05   0:03 /usr/sbin/apache2 -k start
www-data  2493  0.0  0.6 120588 13412 ?        S    07:11   0:03 /usr/sbin/apache2 -k start
www-data  4272  0.0  0.0   2372   624 ?        S    08:19   0:00 sh -c sh
www-data  4273  0.0  0.0   2372   612 ?        S    08:19   0:00 sh
www-data  4274  0.0  0.0   2372   612 ?        S    08:19   0:00 /bin/sh -i
www-data  4275  0.0  0.1   5680  2704 ?        R    08:20   0:00 ps -aux

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

/usr/sbin/apache2 -k start as root

Cron & Systemd


$ crontab -l ; cat /etc/crontab ; systemctl list-timers --all
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       UNIT                         ACTIVATES
mon 2023-01-23 08:20:13 EST  56s left Mon 2023-01-23 08:15:13 EST  4min 3s ago  backuperer.timer             backuperer.service
mon 2023-01-23 20:07:17 EST  11h left Mon 2023-01-23 06:39:26 EST  1h 39min ago apt-daily.timer              apt-daily.service
tue 2023-01-24 06:05:22 EST  21h left Mon 2023-01-23 06:39:26 EST  1h 39min ago apt-daily-upgrade.timer      apt-daily-upgrade.service
tue 2023-01-24 06:54:31 EST  22h left Mon 2023-01-23 06:54:31 EST  1h 24min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
n/a                          n/a      n/a                          n/a          snapd.refresh.timer         
n/a                          n/a      n/a                          n/a          snapd.snap-repair.timer      snapd.snap-repair.service
n/a                          n/a      n/a                          n/a          ureadahead-stop.timer        ureadahead-stop.service
 
7 timers listed.

Sudo Version


$ 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


$ ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu10) 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-0ubuntu10) 2.23