From 9a08be6f974b9554f27495e3709dff1298cbfe14 Mon Sep 17 00:00:00 2001 From: CoolHandSquid <42553774+CoolHandSquid@users.noreply.github.com> Date: Thu, 12 Aug 2021 08:55:42 -0400 Subject: [PATCH] HAC nfs --- pentesting/nfs-service-pentesting.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pentesting/nfs-service-pentesting.md b/pentesting/nfs-service-pentesting.md index a70d424cd..548ae152c 100644 --- a/pentesting/nfs-service-pentesting.md +++ b/pentesting/nfs-service-pentesting.md @@ -70,3 +70,30 @@ To easily list, mount and change UID and GID to have access to files you can use [NFS no\_root\_squash and no\_all\_squash privilege escalation](../linux-unix/privilege-escalation/nfs-no_root_squash-misconfiguration-pe.md) +## HackTricks Automatic Commands + +``` +Protocol_Name: NFS #Protocol Abbreviation if there is one. +Port_Number: 2049 #Comma separated if there is more than one. +Protocol_Description: Network File System #Protocol Abbreviation Spelled out + +Name: Notes +Description: Notes for NFS +Note: """ +It is a client/server system that allows users to access files across a network and treat them as if they resided in a local file directory. + +#apt install nfs-common +showmount 10.10.10.180 ~or~showmount -e 10.10.10.180 + should show you available shares (example /home) + +mount -t nfs -o ver=2 10.10.10.180:/home /mnt/ +cd /mnt +nano into /etc/passwd and change the uid (probably 1000 or 1001) to match the owner of the files if you are not able to get in + +https://book.hacktricks.xyz/pentesting/nfs-service-pentesting +""" + +Name: Nmap +Description: Nmap with NFS Scripts +Command: """nmap --script=nfs-ls.nse,nfs-showmount.nse,nfs-status.nse -p 2049 {IP}""" +```