CREDS >>

TryHackMe – https://tryhackme.com/p/TheSysRat

HackTheBox – https://app.hackthebox.com/profile/1298347

Discovery >

nmap >

Nothing so interesting, let’s look on port 80 >

Port 80/TCP >>

And it is forbidden >

Let’s try dirsearch to brute-forcing content >

And there is an /blog end point >

We can found blog running on engine BlogEngine.NET 3.3.7.0 version >

And we can found some CVE on this version >

https://www.linkedin.com/redir/general-malware-page?url=https%3A%2F%2Fwww%2eexploit-db%2ecom%2Fexploits%2F47010

https://www.securitymetrics.com/blog/BlogEngineNET-Directory-Traversal-Remote-Code-Execution-CVE-2019-10719-CVE-2019-10720

https://www.linkedin.com/redir/general-malware-page?url=https%3A%2F%2Fwww%2eexploit-db%2ecom%2Fexploits%2F47014

Exfiltration user login data >

First what we can found are endpoints >

For us are really interesting this endpoint >

  • Users.xml

We can try to exfiltred user data using XML External Entity Injection >

https://www.linkedin.com/redir/general-malware-page?url=https%3A%2F%2Fwww%2eexploit-db%2ecom%2Fexploits%2F47014

Prepare malicious DTD file >

Prepare delivery inject xml >

Finding axd file to execution >

We can try syndication.axd >

Run python http.server >

And execute request >

If everything was OK, we will get this data on python http.server >

And we can decrypt (URL decode)>

Note: missing space in hash are “+” chars >

And we can decrypt our hashes by follow command >

We can found two hashes and we can crack one password to allow us to login to admin page >

User Flag Path >>

After gain admin panel we can try to get rev. shell, we can use this exploit >

https://www.securitymetrics.com/blog/BlogEngineNET-Directory-Traversal-Remote-Code-Execution-CVE-2019-10719-CVE-2019-10720

Prepare our PostView.ascx malicious theme file >

Upload Malicious theme file >

We can go over CONTENT – Posts – New Post – File Manager and upload our malicious file >

We can see path where was save it. Now we can send simple request >

Where cookie is injectable be our malicious theme file.

If everything was OK we can get rev. shell as merlin user >

But no flag there but we can found another users >

In the blog was a post not published >

We can look on it and there is a password contain >

So we can try user kingarthy connect over RDP >

And success! User flag is DONE !!


ROOT Path >>

After quick recon we have some possibilities as a merlin user >

And as kingarthy >

So we can try go over SeTakeOwnershipPrivilege >

Enable token, we can use this script >

https://raw.githubusercontent.com/fashionproof/EnableAllTokenPrivs/master/EnableAllTokenPrivs.ps1

Now we can takeown to Utilman.exe >

And we can get user full permission to Utilman.exe >

And simple copy cmd.exe to Utilman.exe >

If everything was OK we can lock or logout our sesion as user kingarthy >

And after run Utilman we will get shell as nt authority\system >

And we are DONE!

Exfilibur was completely PWNed !!

Happy hacking!!

Leave a Reply

Your email address will not be published. Required fields are marked *