Devel
Devel is a easy level box which teach us how to properly enumerate services and exploit them.
Last updated
Was this helpful?
Devel is a easy level box which teach us how to properly enumerate services and exploit them.
Last updated
Was this helpful?
Initial Foothold : Upload file on ftp and execute through web server
Privilege Escation : Abusing SeImpersonatePrivilege Token
Lets Start with port scanning
We got two ports open one is 21 and another 80
On port 21 anonymous login is allowed that means we can login as user "anonymous" and with any password
Lets Start with FTP
Start FTP Session with username "anonymous" and any password
We got some files there are looking files related to web server
Lets confirm by visiting webpage
Yes the files we got are running on webserver
Now lets try to put files in ftp if that works then we can try to execute this files from webserver
we created a file called hi.txt and transfer it to ftp service
Now open webserver and try to access this file
Yes we can conclude that we can upload and execute file using ftp and webserver
From enumeration we got that we can upload file on ftp and we can execute them using webserver
Create a aspx reverse shell payload using msfvenom
The above payload will create a reverse shell in aspx format
Now transfer this payload using FTP
Now create Listener for getting reverse shell
We created netcat listener
Now try to execute or access this file on webserver
Yes the file executed and we got back the reverse shell
But this reverse shell is limited we dont have all the access rights
Lets hunt for privilege escalation
Lets run whoami /priv for getting all the privilege this service account has
In the above image you can observe that SetImpersonatePrivilege is enabled for this account
By abusing this token we can escalate our privileges
If you want to learn more about Abusing Token Privileges visit
For Abusing this token we can use JuicyPotato.exe from github
Lets transfer this executable to windows using ftp
We will also require reverse shell for using this exploit transfer that also
Lets generate this using msfvenom and transfer this to windows victim
Now set listener
For properly working of this exploit we will require CLSID
we get this from github
Also we require system name for getting CLSID
We can get it using systeminfo cmd
Now find the CLSID from the above github link and use it in our command
we got error in first try but after changing the CLSID we successed and got back our reverse shell
Now get the root flag
We successfully exploited this box