Home page logo
/
Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News

File nfs-ls

Script types:
Categories: discovery, safe
Download: http://nmap.org/svn/scripts/nfs-ls.nse

User Summary

Attempts to get useful information about files from NFS exports. The output is intended to resemble the output of ls.

The script starts by enumerating and mounting the remote NFS exports. After that it performs an NFS GETATTR procedure call for each mounted point in order to get its ACLs. For each mounted directory the script will try to list its file entries with their attributes.

Since the file attributes shown in the results are the result of GETATTR, READDIRPLUS, and similar procedures, the attributes are the attributes of the local filesystem.

These access permissions are shown only with NFSv3:

  • Read: Read data from file or read a directory.
  • Lookup: Look up a name in a directory
(no meaning for non-directory objects).
  • Modify: Rewrite existing file data or modify existing
directory entries.
  • Extend: Write new data or add directory entries.
  • Delete: Delete an existing directory entry.
  • Execute: Execute file (no meaning for a directory).

Script Arguments

nfs-ls.maxfiles

If set, limits the amount of files returned by the script. If set to 0 or less, all files are shown. The default value is 10.

nfs-ls.time

Specifies which one of the last mac times to use in the files attributes output. Possible values are:

  • m: last modification time (mtime)
  • a: last access time (atime)
  • c: last change time (ctime)
The default value is m (mtime).

nfs-ls.human

If set to 1 or true, shows file sizes in a human readable format with suffixes like KB and MB.

mount.version, nfs.version, rpc.protocol

See the documentation for the rpc library.

Example Usage

nmap -p 111 --script=nfs-ls <target>
nmap -sV --script=nfs-ls <target>

Script Output

PORT    STATE SERVICE
111/tcp open  rpcbind
| nfs-ls:
|   Arguments:
|     maxfiles: 10 (file listing output limited)
|
|   NFS Export: /mnt/nfs/files
|   NFS Access: Read Lookup NoModify NoExtend NoDelete NoExecute
|     PERMISSION  UID   GID   SIZE     MODIFICATION TIME  FILENAME
|     drwxr-xr-x  1000  100   4096     2010-06-17 12:28   /mnt/nfs/files
|     drwxr--r--  1000  1002  4096     2010-05-14 12:58   sources
|     -rw-------  1000  1002  23606    2010-06-17 12:28   notes
|
|   NFS Export: /home/storage/backup
|   NFS Access: Read Lookup Modify Extend Delete NoExecute
|     PERMISSION  UID   GID   SIZE     MODIFICATION TIME  FILENAME
|     drwxr-xr-x  1000  100   4096     2010-06-11 22:31   /home/storage/backup
|     -rw-r--r--  1000  1002  0        2010-06-10 08:34   filetest
|     drwx------  1000  100   16384    2010-02-05 17:05   lost+found
|     -rw-r--r--  0     0     5        2010-06-10 11:32   rootfile
|_    lrwxrwxrwx  1000  1002  8        2010-06-10 08:34   symlink

Requires


Author: Patrik Karlsson, Djalal Harouni

License: Same as Nmap--See http://nmap.org/book/man-legal.html

Nmap Site Navigation

Intro Reference Guide Book Install Guide
Download Changelog Zenmap GUI Docs
Bug Reports OS Detection Propaganda Related Projects
In the Movies In the News
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]