Skip to content

NFS Enumeration

lethanhtung01011980 edited this page Jan 7, 2020 · 12 revisions

Goals

  • To scan for NFS share

Install client

  • apt-get install nfs-common

To scan all NFS info

  • nmap -sV --script=nfs* victim-ip -T4

Enumerate NFS share

  • nmap -sV --script=nfs-ls victim-ip
  • showmount -e victim-ip

Check for no_all_squash

By enabling the root_squash, we can’t just get root privileges on the remote filesystem.

However, no_all_squash is enabled we can be authorized as any other user.

  • If already in the system: cat /etc/exports
  • /var/nfsshare *(rw,sync,root_squash,no_all_squash)
  • /opt *(rw,sync,root_squash,no_all_squash)

Mount NFS

To create user with uid and gid as owner of NFS folder in Victim PC.

  • mkdir /tmp/nfsshare
  • mount -t nfs -o vers=3 victim-ip:/var/nfsshare /tmp/nfsshare
  • NFS ver 3 don't have authentication.

Sidebar

0. COMMON exploits

1. Scan Info

1.2 Passive Gathering

1.3 Active Gathering

2. Pre-attack

2.2 File transfer

3. Get Reverse Shell

4. Exploits

4.2 Windows Exploits

4.3 Linux Exploits

4.4 Password crack

4.5 Buffer Overflow

4.6 Web attacks

6. Escalate Privilege

6.1 Escalate in Windows

6.2 Escalate in Linux

7. Access and further attacks

8. Port redirection and Tunnelling

9. Metasploit

10. Kali

11. Thirdparty scripts

Clone this wiki locally