System/Kernel
www-data@nineveh:/var/www/html/department$ file /bin/bash ; uname -a ; cat /etc/*release
/bin/bash: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=0428e4834e687e231fa865562d32fbb64ce45577, stripped
linux nineveh 4.4.0-62-generic #83-ubuntu smp wed jan 18 14:10:15 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 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
nineveh 4.4.0-62-generic
Ubuntu 16.04.2 LTS (Xenial Xerus)
x86-64
Networks
www-data@nineveh:/var/www/html/department$ netstat -antup
netstat -antup
(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 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 0.0.0.0:443 0.0.0.0:* LISTEN -
tcp 0 0 10.10.10.43:80 10.10.14.5:37444 ESTABLISHED -
tcp 0 0 10.10.10.43:80 10.10.14.5:37748 TIME_WAIT -
tcp 0 0 10.10.10.43:80 10.10.14.5:37766 TIME_WAIT -
tcp 0 0 10.10.10.43:80 10.10.14.5:37756 TIME_WAIT -
tcp 0 296 10.10.10.43:39280 10.10.14.5:9999 ESTABLISHED 14906/nc
tcp 0 0 10.10.10.43:80 10.10.14.5:37736 TIME_WAIT -
tcp 0 0 10.10.10.43:80 10.10.14.5:37730 TIME_WAIT -
tcp 0 0 10.10.10.43:80 10.10.14.5:37770 TIME_WAIT -
tcp6 0 0 :::22 :::* LISTEN -
udp 0 0 10.10.10.43:45851 1.1.1.1:53 ESTABLISHED -
Users & Groups
www-data@nineveh:/var/www/html/department$ 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-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
amrois:x:1000:1000:,,,:/home/amrois:/bin/bash
sshd:x:111:65534::/var/run/sshd:/usr/sbin/nologin
total 12K
4.0K drwxr-xr-x 24 root root 4.0K Jan 29 2021 ..
4.0K drwxr-xr-x 4 amrois amrois 4.0K Dec 17 2020 amrois
4.0K drwxr-xr-x 3 root root 4.0K Jul 2 2017 .
amrois
SUIDs
www-data@nineveh:/var/www/html/department$ find / -perm -04000 -ls -type f 2>/dev/null
1113 12 -rwsr-xr-x 1 root root 10240 Feb 25 2014 /usr/lib/eject/dmcrypt-get-device
30430 44 -rwsr-xr-- 1 root messagebus 42992 Jan 12 2017 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
33867 56 -rwsr-xr-x 1 root root 56456 Jan 14 2017 /usr/lib/snapd/snap-confine
33552 40 -rwsr-xr-x 1 root root 38984 Feb 3 2017 /usr/lib/x86_64-linux-gnu/lxc/lxc-user-nic
36677 16 -rwsr-xr-x 1 root root 14864 Jan 17 2016 /usr/lib/policykit-1/polkit-agent-helper-1
40078 420 -rwsr-xr-x 1 root root 428240 Mar 16 2017 /usr/lib/openssh/ssh-keysign
33587 36 -rwsr-xr-x 1 root root 32944 Mar 29 2016 /usr/bin/newgidmap
792 40 -rwsr-xr-x 1 root root 40432 Mar 29 2016 /usr/bin/chsh
36694 24 -rwsr-xr-x 1 root root 23376 Jan 17 2016 /usr/bin/pkexec
33588 36 -rwsr-xr-x 1 root root 32944 Mar 29 2016 /usr/bin/newuidmap
790 52 -rwsr-xr-x 1 root root 49584 Mar 29 2016 /usr/bin/chfn
917 40 -rwsr-xr-x 1 root root 39904 Mar 29 2016 /usr/bin/newgrp
853 76 -rwsr-xr-x 1 root root 75304 Mar 29 2016 /usr/bin/gpasswd
928 56 -rwsr-xr-x 1 root root 54256 Mar 29 2016 /usr/bin/passwd
37092 136 -rwsr-xr-x 1 root root 136808 Jan 20 2021 /usr/bin/sudo
35303 52 -rwsr-sr-x 1 daemon daemon 51464 Jan 14 2016 /usr/bin/at
131151 44 -rwsr-xr-x 1 root root 44680 May 7 2014 /bin/ping6
131150 44 -rwsr-xr-x 1 root root 44168 May 7 2014 /bin/ping
131136 40 -rwsr-xr-x 1 root root 40152 Dec 16 2016 /bin/mount
131185 28 -rwsr-xr-x 1 root root 27608 Dec 16 2016 /bin/umount
148497 140 -rwsr-xr-x 1 root root 142032 Jan 28 2017 /bin/ntfs-3g
131167 40 -rwsr-xr-x 1 root root 40128 Mar 29 2016 /bin/su
148996 32 -rwsr-xr-x 1 root root 30800 Jul 12 2016 /bin/fusermount
/usr/bin/pkexec
SGIDs
www-data@nineveh:/var/www/html/department$ find / -perm -02000 -ls -type f 2>/dev/null
318 0 drwxr-sr-x 3 root systemd-journal 60 oct 16 14:59 /run/log/journal
319 0 drwxr-s--- 2 root systemd-journal 120 oct 16 16:38 /run/log/journal/368576dcd86922204f3e30a959597c55
131855 36 -rwxr-sr-x 1 root shadow 35632 Mar 16 2016 /sbin/pam_extrausers_chkpwd
131891 36 -rwxr-sr-x 1 root shadow 35600 Mar 16 2016 /sbin/unix_chkpwd
35384 12 -rwxr-sr-x 1 root utmp 10232 Mar 11 2016 /usr/lib/x86_64-linux-gnu/utempter/utempter
30999 16 -rwxr-sr-x 1 root tty 14752 Mar 1 2016 /usr/bin/bsd-write
35389 428 -rwxr-sr-x 1 root utmp 434216 Feb 7 2016 /usr/bin/screen
787 64 -rwxr-sr-x 1 root shadow 62336 Mar 29 2016 /usr/bin/chage
34746 40 -rwxr-sr-x 1 root mlocate 39520 Nov 18 2014 /usr/bin/mlocate
40103 352 -rwxr-sr-x 1 root ssh 358624 Mar 16 2017 /usr/bin/ssh-agent
801 36 -rwxr-sr-x 1 root crontab 36080 Apr 5 2016 /usr/bin/crontab
35303 52 -rwsr-sr-x 1 daemon daemon 51464 Jan 14 2016 /usr/bin/at
838 24 -rwxr-sr-x 1 root shadow 22768 Mar 29 2016 /usr/bin/expiry
1065 28 -rwxr-sr-x 1 root tty 27368 Dec 16 2016 /usr/bin/wall
[...]
Processes
www-data@nineveh:/var/www/html/department$ ps -aux | grep -i 'root' --color=auto
root 1 0.0 0.5 37988 6040 ? Ss 14:59 0:02 /sbin/init
[...]
root 473 0.0 0.3 28360 3104 ? Ss 14:59 0:00 /lib/systemd/systemd-journald
root 494 0.0 0.1 94776 1716 ? Ss 14:59 0:00 /sbin/lvmetad -f
root 504 0.0 0.3 44696 3840 ? Ss 14:59 0:00 /lib/systemd/systemd-udevd
root 570 0.0 0.9 194424 9784 ? Ssl 14:59 0:08 /usr/bin/vmtoolsd
root 1093 0.0 0.2 29012 2412 ? Ss 14:59 0:00 /usr/sbin/cron -f
root 1121 0.0 0.1 20104 1280 ? Ss 14:59 0:00 /lib/systemd/systemd-logind
root 1128 0.0 0.0 4404 696 ? Ss 14:59 0:00 /usr/sbin/acpid
root 1131 0.4 0.3 636904 3316 ? Ssl 14:59 0:55 /usr/bin/lxcfs /var/lib/lxcfs/
root 1136 0.0 0.8 85440 8928 ? Ss 14:59 0:00 /usr/bin/VGAuthService
root 1140 0.0 0.5 275772 5712 ? Ssl 14:59 0:00 /usr/lib/accountsservice/accounts-daemon
root 1142 0.0 1.8 263820 18324 ? Ssl 14:59 0:00 /usr/lib/snapd/snapd
root 1164 0.0 0.0 13380 148 ? Ss 14:59 0:00 /sbin/mdadm --monitor --pid-file /run/mdadm/monitor.pid --daemonise --scan --syslog
root 1182 0.0 0.5 277184 5904 ? Ssl 14:59 0:00 /usr/lib/policykit-1/polkitd --no-debug
root 1273 0.0 0.5 65524 5088 ? Ss 14:59 0:00 /usr/sbin/sshd -D
root 1294 0.0 0.0 5228 156 ? Ss 14:59 0:00 /sbin/iscsid
root 1295 0.0 0.3 5728 3528 ? S<Ls 14:59 0:01 /sbin/iscsid
root 1305 1.0 0.2 8756 2224 ? Ss 14:59 2:03 /usr/sbin/knockd -d -i ens160
root 1359 0.0 0.1 15944 1596 tty1 Ss+ 14:59 0:00 /sbin/agetty --noclear tty1 linux
root 1389 0.0 2.5 270376 25796 ? Ss 14:59 0:01 /usr/sbin/apache2 -k start
www-data 3948 0.0 0.1 11288 1096 pts/0 S+ 18:24 0:00 grep -i root --color=auto
/usr/sbin/cron -f
/usr/lib/policykit-1/polkitd --no-debug
/usr/sbin/knockd -d -i ens160
Cron & Systemd
www-data@nineveh:/var/www/html/department$ 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-16 22:07:16 CST 3h 19min left Mon 2023-01-16 18:08:48 CST 38min ago snapd.refresh.timer snapd.refresh.service
tue 2023-01-17 08:50:44 CST 14h left Mon 2023-01-16 18:08:48 CST 38min ago apt-daily.timer apt-daily.service
tue 2023-01-17 18:23:58 CST 23h left Mon 2023-01-16 18:23:58 CST 23min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.se
n/a n/a n/a n/a ureadahead-stop.timer ureadahead-stop.service
4 timers listed.
*/10 * * * * /usr/sbin/report-reset.sh
Sudo Version
www-data@nineveh:/var/www/html/department$ 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@nineveh:/var/www/html/department$ ldd --version
ldd (Ubuntu GLIBC 2.23-0ubuntu5) 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-0ubuntu5) 2.23