Table of Contents
Description
This note hold quick info on how to access some common protocols and services. If some well known service is now listed here, it likely has it’s own note that covers basic connection.
RDP
Default connection
xfreerdp /u:<USER> /p:'<PASS>' /v:<IP> /size:90%- You can specify the port to use by xfreerdp by adding the
:PORTat the end of the IP. - You can use a
-fflag for a real full screen, but it will block your original navigation if you’re already using a VM.
Connection with a shared disk
Very useful, saved me a lot of trouble.
xfreerdp /u:<USER> /p:'<PASS>' /v:<IP> /size:90% /drive:personal_disk,/home/htb-ac-313174/DesktopSSH
Default connection
ssh <USER>@<IP>
<PASS>Connection with a private key
ssh -i <PRIVATE KEY>@<IP>SMB
You can connect to a windows host using psexec.py or smbclient if the SMB is available which in most instances is. psexec.py has a better shell.
smbclient
smbclient -L ////192.168.0.1// -U root to see the list of shares.
smbclient -U user \\\\10.129.42.197\\SHARENAME to see the files inside a specific share.
smbclient -N -L //10.129.14.128 for a null session.
smbclient -L 10.129.14.128 for anonymous session.
(Not 100% sure about the / and \. I think it’s better to use \ as it’s a Windows related protocol.
psexec.py
psexec.py FREIGHTLOGISTICS.LOCAL/sapsso@academy-ea-dc03.inlanefreight.local -target-ip 172.16.5.238
Or simply psexec.py admin@10.129.62.20 depending on if we want to use domains or not.
smbmap
Smbmap is another tool that helps us enumerate network shares and access associated permissions. An advantage of smbmap is that it provides a list of permissions for each shared folder.
smbmap -H 10.129.14.128
Using the -r or -R (recursive) option, one can browse the directories.
smbmap -H 10.129.14.128 -r notes
smbget
You can use smbget tool to download full folders using this command:
`smbget -R smb://
FTP
Simply use ftp command followed with an IP to connect to FTP. You will be prompted to provide credentials for the authenticated login.
FTP has an anonymous login like null session with SMB. Simply provide the username “anonymous” and blank or also “anonymous” as the password.