Nmap nfs-statfs NSE Script
This page contains detailed information about how to use the nfs-statfs NSE script. For list of all NSE scripts, visit the Nmap NSE Library.
Select: |
---|
Script Overview
Script source code: https://github.com/nmap/nmap/tree/master/scripts/nfs-statfs.nse
Script categories: discovery, safe
Target service / protocol: rpcbind, tcp, udp
Target network port(s): 111
List of CVEs: -
Script Description
The nfs-statfs.nse script retrieves disk space statistics and information from a remote NFS share.
The output is intended to resemble the output of df
.
The script will provide pathconf information of the remote NFS if the version used is NFSv3.
Nfs-statfs NSE Script Arguments
This is a full list of arguments supported by the nfs-statfs.nse script:
nfs-statfs.human
If set to 1
or true
, shows file sizes in a human readable format with suffixes like KB
and MB
.
- - -
To use this script argument, add it to Nmap command line like in this example:
nmap --script=nfs-statfs --script-args nfs-statfs.human=value <target>
Nfs-statfs NSE Script Example Usage
Here's an example of how to use the nfs-statfs.nse script:
nmap -p 111 --script=nfs-statfs <target>
nmap -sV --script=nfs-statfs <target>
Nfs-statfs NSE Script Example Output
Here's a sample output from the nfs-statfs.nse script:
PORT STATE SERVICE
| nfs-statfs:
| Filesystem 1K-blocks Used Available Use% Blocksize
| /mnt/nfs/files 5542276 2732012 2528728 52% 4096
|_ /mnt/nfs/opensource 5534416 620640 4632644 12% 4096
Nfs-statfs NSE Script Example XML Output
There is no sample XML output for this module. However, by providing the -oX <file>
option, Nmap will produce a XML output and save it in the file.xml
file.
Authors
- Patrik Karlsson
- Djalal Harouni
References
- https://nmap.org/nsedoc/scripts/nfs-statfs.html
- https://github.com/nmap/nmap/tree/master/scripts/nfs-statfs.nse
See Also
Related NSE scripts to the nfs-statfs.nse script:
Visit Nmap NSE Library for more scripts.
The nfs-statfs.nse script may fail with the following error messages. Check for the possible causes by using the code snippets highlighted below found in the script source code. This can often times help in identifying the root cause of the problem.
versions mismatch, nfs v%d - mount v%d
Here is a relevant code snippet related to the "versions mismatch, nfs v%d - mount v%d" error message:
192: nfs.version = nfs_comm.version
193:
194: -- use simple check since NFSv1 is not used anymore, and NFSv4 not supported
195: if (nfs_comm.version <= 2 and mnt_comm.version > 2) then
196: rpc.Helper.UnmountPath(mnt_comm, mount)
197: return false, string.format("versions mismatch, nfs v%d - mount v%d",
198: nfs_comm.version, mnt_comm.version)
199: end
200:
201: if nfs_comm.version < 3 then
202: status, res = nfsobj:StatFs(nfs_comm, fhandle)
Version
This page has been created based on Nmap version 7.92.
Go back to menu.