Linux Privilege Escalation using Misconfigured NSF
After solving several OSCP Challenges we decided to write the article on the various method used for Linux privilege escalation, that could be helpful for our readers in their penetration testing project. In this article, we will learn how to exploit a misconfigured NFS share to gain root access to a remote host machine.
Table of contents
Introduction of NFS
Misconfigured NFS Lab setup
Scanning NFS shares
- Nmap script
- showmount
Exploiting NFS server for Privilege Escalation via:
Bash file
C program file
Nano/vi
- Obtain shadow file
- Obtain passwd file
- Obtain sudoers file
Let’s Start!!
Network File System (NFS): Network File System permits a user on a client machine to mount the shared files or directories over a network. NFS uses Remote Procedure Calls (RPC) to route requests between clients and servers. Although NFS uses TCP/UDP port 2049 for sharing any files/directories over a network.
Misconfigured NFS Lab setup
Basically, there are three core configuration files (/etc/exports, /etc/hosts.allow, and /etc/hosts.deny) you will need to configure to set up an NFS server. BUT to configure weak NFS server we will look only /etc/export file.
To install NFS service execute below command in your terminal and open /etc/export file for configuration
Full Article Read Here
Full read not found ??
Active looking for a job
6 年Can you Guide me into this Career
Lead Security Engineer
6 年Raj Chandel grt job & excellent work
Lead CyberSecurity @AT&T
6 年This looks like spoiler..