# Answers

What would be the correct syntax to access an SMB share called "secret" as user "suit" on a machine with the IP 10.10.10.2 on the default port?\
&#x20;smbclient //10.10.10.2/secret -U suit -p 445

Great! Now you've got a hang of the syntax, let's have a go at trying to exploit this vulnerability. You have a list of users, the name of the share (smb) and a suspected vulnerability.\
&#x20;

Lets see if our interesting share has been configured to allow anonymous access, I.E it doesn't require authentication to view the files. We can do this easily by:

\- using the username "Anonymous"

\- connecting to the share we found during the enumeration stage

\- and not supplying a password.

Does the share allow anonymous access? Y/N?\
&#x20;Y

Great! Have a look around for any interesting documents that could contain valuable information. Who can we assume this profile folder belongs to?\
&#x20;John Cactus

What service has been configured to allow him to work from home?\
&#x20;ssh

Okay! Now we know this, what directory on the share should we look in?\
&#x20;.ssh

This directory contains authentication keys that allow a user to authenticate themselves on, and then access, a server. Which of these keys is most useful to us?\
id\_rsa

Download this file to your local machine, and change the permissions to "600" using "chmod 600 \[file]".

Now, use the information you have already gathered to work out the username of the account. Then, use the service and key to log-in to the server.

What is the smb.txt flag?\
&#x20;THM{smb\_is\_fun\_eh?}
