Sharp - HackTheBox Writeup (10.10.10.219)

Posted on Mon, May 10, 2021 Hard Windows Reversing SMB .NET Remoting
Hard-difficulty Windows box with a focus on reverse engineering C# applications and enumerating SMB shares. Foothold gained by reversing the encryption in a Kanban application. Privilege escalation by abusing WCF server and client applications ported from .NET remoting.

Recon

Enumeration

HTTP enumeration with netcat:

RPC enumeration with rpcclient:

SMB shares enumeration with smbclient:

Reversing PortableKanban.Data.dll with dotPeek:

Exploitation

Exploring developer SMB share:

Reversing mysterious Client/Server application with dotPeek:

Getting a reverse shell through .NET remoting service with ExploitRemotingService:

Privilege Escalation

Exploring WCF client/server project files in Visual Studio:

Persistence

Resources

  1. https://infinitelogins.com/2020/06/17/enumerating-smb-for-pentesting/
  2. https://www.ivoidwarranties.tech/posts/pentesting-tuts/cme/crackmapexec-cheatsheet/
  3. https://github.com/tyranid/ExploitRemotingService