nfs

FourAndSix2 靶机渗透

陌路散爱 提交于 2019-11-30 08:41:06
0x01 简介 FourAndSix2是易受攻击的一个靶机,主要任务是通过入侵进入到目标靶机系统然后提权,并在root目录中并读取flag.tx信息 FourAndSix2.镜像下载地址: https://download.vulnhub.com/fourandsix/FourAndSix2.ova 0x02 信息收集 1.通过存活主机发现,确定目标机器IP 2.端口扫描发现 3.发现开放nfs服务,搜索漏洞利用代码 0x03 漏洞利用 msf5 > search nfs Matching Modules ================ # Name Disclosure Date Rank Check Description - ---- --------------- ---- ----- ----------- 0 auxiliary/dos/freebsd/nfsd/nfsd_mount normal No FreeBSD Remote NFS RPC Request Denial of Service 1 auxiliary/scanner/nfs/nfsmount normal Yes NFS Mount Scanner 2 exploit/netware/sunrpc/pkernel_callit 2009-09-30 good No NetWare 6.5

Grunt watch detects file changes only after 5 seconds with Vagrant and NFS

牧云@^-^@ 提交于 2019-11-30 05:03:21
Grunt watch (grunt-contrib-watch) is used to trigger reload of web app in browser. However, it is slow to notice file changes when running in a Vagrant virtual machine using NFS for synced folders. Changing a file triggers a reload only after about 5 seconds although it is expected to happen almost instantly. Why is grunt watch so slow to detect changes? Is there any way to make it faster? With VirtualBox synced folders grunt watch detects file changes almost instantly. However, as VirtualBox synced folders are unacceptably slow for certain other operations on large amounts of files it is

How do I determine if a directory is a mounted NFS mount point in shellscript

烈酒焚心 提交于 2019-11-30 04:46:59
I want to write a sh/bash script that can determine whether a particular directory is a mount point for an NFS filesystem. eg something like $ mkdir localdir $ mkdir remotedir $ mount host:/share ./remotedir $ classify_dirs.sh --> localdir is local --> remotedir is an NFS mount point AndrewR This question is effectively a dup of how-can-i-tell-if-a-file-is-on-a-remote-filesystem-with-perl The short answer is to use the stat command eg $ stat -f -L -c %T localdir ext2/ext3 $ stat -f -L -c %T remotedir nfs Then a directory is an NFS mount point if its type is 'nfs' and its parent directory isn't

IMX6学习记录(24)-NFS实现文件共享

我怕爱的太早我们不能终老 提交于 2019-11-30 01:11:29
上面是我创建的群聊,欢迎新朋友的加入。 1.Ubuntu配置 sudo apt-get install nfs-kernel-server portmap 在电脑上找个文件夹作为共享文件夹 sudo vi /etc/exports /home/jun/i.mx6/image/rootfs/nfs *(rw,sync,no_root_squash) sudo /etc/init.d/nfs-kernel-server restart 本地挂载测试 sudo mount -tnfs localhost:/home/jun/i.mx6/image/rootfs/nfs /mnt sudo umount /mnt 2.开发板配置 文件系统配置 更新文件系统 ping 192.168.1.111 测试主机和板子的网络连接 mount -tnfs 192.168.1.111:/home/jun/i.mx6/image/rootfs/nfs /mnt 正常 来源: CSDN 作者: Jun626 链接: https://blog.csdn.net/Jun626/article/details/103246245

Linux挂载总结

强颜欢笑 提交于 2019-11-30 00:01:46
Linux挂载 Linux操作手册:(此种挂载需用nfs)适用Linux挂载Linux 第一步:rpm -q nfs-utils查看是否安装nfs 第二步:关闭防火墙 systemctl stop firewall.service 第三步:root登录服务端,编辑/etc/exports,指定允许被其他计算机访问的共享目录和访问权限,比如加上/test/23.1.199.104(rw)表示允许23.199.104挂载/test目录,rw(可读可写),no_root_squash(表示客户端root用户对该目录具备写权限)验证得知,只配rw的话只能读不能写,加上 no root_squash就可以写了 第四步:使 exports目录生效,并查看已生效目录 exportfs -a 第五步:重启nfs服务器 service nfs-server restart 第六步:客户端运行挂载命令 mount -t nfs -o rw eg:23.1.199.103:/test /test 希望能对大家有所帮助,喜欢可以打赏~ 来源: CSDN 作者: zhengrn_6936 链接: https://blog.csdn.net/zhengrn_6936/article/details/89608229

Is there a good way to detect a stale NFS mount

巧了我就是萌 提交于 2019-11-29 21:48:51
I have a procedure I want to initiate only if several tests complete successfully. One test I need is that all of my NFS mounts are alive and well. Can I do better than the brute force approach: mount | sed -n "s/^.* on \(.*\) type nfs .*$/\1/p" | while read mount_point ; do timeout 10 ls $mount_point >& /dev/null || echo "stale $mount_point" ; done Here timeout is a utility that will run the command in the background, and will kill it after a given time, if no SIGCHLD was caught prior to the time limit, returning success/fail in the obvious way. In English: Parse the output of mount , check

centos7 如何使用ReaR进行系统备份(如何使用NFS方法设置ReaR备份)

我只是一个虾纸丫 提交于 2019-11-29 21:40:02
因为生产业务集群中的服务器比较多,经常出现配置故障,硬件故障,所以就想到系统备份,查了一些相关的资料,国内主流的方法是用tar命令打包整个操作系统,我试了效果并不理想,所以尝试用rear工具进行备份还原 操作系统是 # cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) 官方记录是 6 7 8都可以使用这个工具备份,我只测试了centos7的 首先备份下来的系统是要保存下来的,建议放到其他服务器,或者是专门的存储上,所以此案例使用的nfs的存储方式 ----------------------------------------------------前提条件--nfs准备------------------------------------------------------------------ nfs-server:10.0.0.52 nfs-client:10.0.0.51 nfs-server: nfs需要两个组件 # rpm -qa|grep -E "rpcbind|nfs-utils" rpcbind-0.2.0-47.el7.x86_64 nfs-utils-1.3.0-0.61.el7.x86_64 如果没有的话,自行安装,yum的方式即可 启动nfs服务需要先启动 rpcbind

NFS配置

元气小坏坏 提交于 2019-11-29 21:25:07
由于权限问题,开发人员没有访问生产环境was相关日志权限,因此他们是通过生产环境nfs挂载至测试环境,开发人员能够访问的环境进行查询。 NFS 1.配置NFS LOG挂载目录 源端操作 [root@yc01v yc1]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.5 (Santiago) [root@yc01v yc1]# cat /etc/exports /opt/tmp 10.8.5.158(rw,no_root_squash) /opt/IBM/WebSphere/yc1/logs 10.8.4.102(rw,no_root_squash) /opt/IBM/WebSphere/logs 10.8.4.102(ro) 编辑NFS文件配置 vi /etc/exports /opt/IBM/WebSphere/yc1/logs/yc1 10.8.0.56(ro,no_root_squash) 重启nfs服务 [root@yc01v yc1]# /etc/init.d/rpcbind restart [root@yc01v yc1]# /etc/init.d/nfs restart 服务器端nfs服务是否开机自启动进行验证 [root@yc01v yc1]# chkconfig --list

centos7配置nfs共享存储服务

◇◆丶佛笑我妖孽 提交于 2019-11-29 21:20:17
nfs 是一种网络文件系统,需要依赖rpc进行过程调度 注意nfs只验证id,验证用户名,并且只能在类unix os上进行文件共享服务,由于它的脆弱的验证机制,所以不适宜在internet上工作,在内网使用是非常可行的。 nfs服务端需要确定这两个包正确安装 nfs-utils rpcbind 若是ubuntu服务器,则是nfs-common,nfs-kernel-server两个包,rpcbind是默认安装的。 yum -y install nfs-utils rpcbind 编辑共享目录配置文件 /etc/exports /var/www/html 192.168.10.0/24(rw,async,no_root_squash) 192.168.20.0/24(ro) #多个网段或主机之间用空格分开 /var/www 192.168.10.0/24(ro,sync,root_squash) 参数:ro表示只读,rw表示可读写,sync同步写*即同时写入内存和硬盘,async异步*暂存于内存,no_root_squash表示如果客户端连接过来的用户是root,则对服务端的目录同样是root权限****请不要开启,好危险的,root_squash表示客户端是root则将其转为匿名用户的权限***建议开启。 http://cloud.yesky.com/info/332

【解决】挂载NFS服务时,不同共享客户端间的数据不同步

旧城冷巷雨未停 提交于 2019-11-29 19:20:43
问题现象 当您用台 ECS 挂载同一个 NFS 文件系统,在 ECS-A 上 append 写文件,在 ECS-B 用 tail -f 观察文件内容的变化。在 ECS-A 写完之后,在 ECS-B 看到文件内容变化会有 10-30 秒的延时。然而相同的场景下,如果直接在 ECS-B 上打开文件(比如 vi )却是立即可以看到更新的内容的。 原因 该现象与 mount 的选项以及 tail -f 实现相关。 用户使用的mount命令为: mount -t nfs4 /mnt/ 对于在 ECS-B 上以这一方式 NFS mount 的文件系统,默认情况下 kernel 对文件和目录的属性维护了一份metadata 缓存,文件和目录属性(包括许可权、大小、和时间戳记)缓存的目的是减少 NFSPROC_GETATTR 远程过程调用(RPC)的需求。 tail -f 的实现是 sleep + fstat 来观察文件属性(主要是文件大小)的变化,然后读入文件并输出。可见,tail -f 是否能实时输出文件内容主要取决于 fstat 的结果,由于 metadata cache 的存在,fstat 轮询到的并不是实时的文件属性。因此,即使在 NFS 服务器端文件已经更新了,但 tail -f 却没法知道文件已经改动了,于是输出就会出现延时。 解决方法 使用 mount 的 noac 选项可以