System/Kernel


www-data@meta:/var/www/dev01.artcorp.htb/metaview$ file /bin/bash ; uname -a ; cat /etc/*release
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 meta 4.19.0-17-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) 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/"

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

Networks


www-data@meta:/var/www/dev01.artcorp.htb/metaview$ 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 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    301 10.10.11.140:42466      10.10.14.3:443          ESTABLISHED 3459/sh             
tcp        1      0 10.10.11.140:80         10.10.14.3:47356        CLOSE_WAIT  -                   
udp        0      0 10.10.11.140:51562      1.1.1.1:53              ESTABLISHED -                   

Users & Groups


www-data@meta:/var/www/dev01.artcorp.htb/metaview$ 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
thomas:x:1000:1000:thomas,,,:/home/thomas:/bin/bash
systemd-coredump:x:999:999:systemd Core Dumper:/:/usr/sbin/nologin
total 12K
4.0K drwxr-xr-x  4 thomas thomas 4.0K Jan 17  2022 thomas
4.0K drwxr-xr-x  3 root   root   4.0K Aug 29  2021 .
4.0K drwxr-xr-x 18 root   root   4.0K Aug 29  2021 ..

thomas

www-data@meta:/var/www/dev01.artcorp.htb/metaview$ 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=1000(thomas) gid=1000(thomas) groups=1000(thomas)
uid=999(systemd-coredump) gid=999(systemd-coredump) groups=999(systemd-coredump)

SUIDs


www-data@meta:/var/www/dev01.artcorp.htb/metaview$ find / -perm -04000 -ls -type f 2>/dev/null
   133029     36 -rwsr-xr-x   1 root     root        34888 Jan 10  2019 /usr/bin/umount
   132546     44 -rwsr-xr-x   1 root     root        44440 Jul 27  2018 /usr/bin/newgrp
   129080     64 -rwsr-xr-x   1 root     root        63736 Jul 27  2018 /usr/bin/passwd
   129076     44 -rwsr-xr-x   1 root     root        44528 Jul 27  2018 /usr/bin/chsh
   129078     84 -rwsr-xr-x   1 root     root        84016 Jul 27  2018 /usr/bin/gpasswd
   132693     64 -rwsr-xr-x   1 root     root        63568 Jan 10  2019 /usr/bin/su
   154418     36 -rwsr-xr-x   1 root     root        34896 Apr 22  2020 /usr/bin/fusermount
   133027     52 -rwsr-xr-x   1 root     root        51280 Jan 10  2019 /usr/bin/mount
   129075     56 -rwsr-xr-x   1 root     root        54096 Jul 27  2018 /usr/bin/chfn
   154209    156 -rwsr-xr-x   1 root     root       157192 Jan 20  2021 /usr/bin/sudo
     3196     12 -rwsr-xr-x   1 root     root        10232 Mar 28  2017 /usr/lib/eject/dmcrypt-get-device
   133851     52 -rwsr-xr--   1 root     messagebus    51184 Jul  5  2020 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
   141699    428 -rwsr-xr-x   1 root     root         436552 Jan 31  2020 /usr/lib/openssh/ssh-keysign

SGIDs


www-data@meta:/var/www/dev01.artcorp.htb/metaview$ find / -perm -02000 -ls -type f 2>/dev/null
   129888     40 -rwxr-sr-x   1 root     shadow      39616 Feb 14  2019 /usr/sbin/unix_chkpwd
   137687      4 drwxrwsr-x   3 root     staff        4096 Aug 29  2021 /usr/local/lib/python3.7
   137689      4 drwxrwsr-x   2 root     staff        4096 Aug 29  2021 /usr/local/lib/python3.7/dist-packages
   152491      4 drwxrwsr-x   2 root     staff        4096 Aug 29  2021 /usr/local/share/fonts
   129077     32 -rwxr-sr-x   1 root     shadow      31000 Jul 27  2018 /usr/bin/expiry
   129074     72 -rwxr-sr-x   1 root     shadow      71816 Jul 27  2018 /usr/bin/chage
   141692    316 -rwxr-sr-x   1 root     ssh        321672 Jan 31  2020 /usr/bin/ssh-agent
   130608     36 -rwxr-sr-x   1 root     tty         34896 Jan 10  2019 /usr/bin/wall
   134605     16 -rwxr-sr-x   1 root     tty         14736 May  4  2018 /usr/bin/bsd-write
      280      4 drwxrwsr-x   2 root     mail         4096 Aug 29  2021 /var/mail
      214      4 drwxrwsr-x   2 root     staff        4096 Jun 13  2021 /var/local
    11438      0 drwxr-sr-x   3 root     systemd-journal       60 apr 26 10:00 /run/log/journal
    11439      0 drwxr-s---   2 root     systemd-journal      100 apr 26 12:09 /run/log/journal/ba0a883de4e04ef0a7dac07fd75ab04d

Processes


www-data@meta:/var/www/dev01.artcorp.htb/metaview$ ps -auxwww
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.4 169348 10124 ?        Ss   10:00   0:02 /sbin/init
root       344  0.0  0.4  42976  8760 ?        Ss   10:00   0:00 /lib/systemd/systemd-journald
root       360  0.0  0.2  21940  4880 ?        Ss   10:00   0:00 /lib/systemd/systemd-udevd
root       389  0.0  0.5  48228 10828 ?        Ss   10:00   0:00 /usr/bin/VGAuthService
systemd+   391  0.0  0.3  93084  6540 ?        Ssl  10:00   0:00 /lib/systemd/systemd-timesyncd
root       416  0.0  0.5 122560 11668 ?        Ssl  10:00   0:07 /usr/bin/vmtoolsd
root       422  0.0  0.2 225824  5892 ?        Ssl  10:00   0:00 /usr/sbin/rsyslogd -n -iNONE
message+   432  0.0  0.1   8688  3636 ?        Ss   10:00   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root       434  0.0  0.1   8504  2844 ?        Ss   10:00   0:00 /usr/sbin/cron -f
root       435  0.0  0.3  19308  6432 ?        Ss   10:00   0:00 /lib/systemd/systemd-logind
root       616  0.0  0.3  15852  7056 ?        Ss   10:00   0:00 /usr/sbin/sshd -D
root       621  0.0  0.0   5612  1648 tty1     Ss+  10:00   0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root       638  0.0  0.9 196748 19804 ?        Ss   10:00   0:02 /usr/sbin/apache2 -k start
www-data  3260  0.0  0.6 196992 12964 ?        S    11:25   0:00 /usr/sbin/apache2 -k start
www-data  3458  0.0  0.0   2388   760 ?        S    11:34   0:00 sh -c exiftool '/var/www/dev01.artcorp.htb/metaview/uploads/phpBWxdj7.jpg' --system:all --exiftool:all -e
www-data  3459  0.0  0.0   2388   756 ?        S    11:34   0:00 /bin/sh -i
www-data  4063  0.0  0.4  17084  8248 ?        R    12:04   0:00 python3 -c import pty; pty.spawn("/bin/bash")
www-data  4064  0.0  0.1   7192  3432 pts/0    Ss   12:04   0:00 /bin/bash
www-data  4296  0.0  0.1  10832  2888 pts/0    R+   12:15   0:00 ps -auxwww

/usr/sbin/cron -f

Cron & Systemd


www-data@meta:/var/www/dev01.artcorp.htb/metaview$ crontab -l ; cat /etc/crontab ; systemctl list-timers
bash: /usr/bin/crontab: Permission denied
# /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 )
#
NEXT                         LEFT       LAST                         PASSED     
wed 2023-04-26 12:39:00 EDT  21min left Wed 2023-04-26 12:09:07 EDT  8min ago   
wed 2023-04-26 22:30:21 EDT  10h left   Wed 2023-04-26 10:00:10 EDT  2h 17min ag
thu 2023-04-27 00:00:00 EDT  11h left   Wed 2023-04-26 10:00:10 EDT  2h 17min ag
thu 2023-04-27 06:53:12 EDT  18h left   Wed 2023-04-26 10:00:10 EDT  2h 17min ag
thu 2023-04-27 10:15:11 EDT  21h left   Wed 2023-04-26 10:15:11 EDT  2h 2min ago
 
5 timers listed.
Pass --all to see loaded but inactive timers, too.
lines 1-9/9 (END)

Sudo Version


www-data@meta:/var/www/dev01.artcorp.htb/metaview$ 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


www-data@meta:/var/www/dev01.artcorp.htb/metaview$ 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.

ldd (Debian GLIBC 2.28-10) 2.28