Web渗透测试实战——(2.1)Metasploit 6.0初步

一、什么是Metasploit

Metasploit本质上是一个健壮且通用的渗透测试框架。它可以执行渗透测试生命周期中涉及的所有任务。有了Metasploit的使用,只需要关注核心目标,支持行动都将通过框架的各个组件和模块来执行。此外,由于它是一个完整的框架,而不仅仅是一个应用程序,因此可以根据我们的需求进行定制和扩展。

二、技术要求

  1. Kali Linux
  2. The Metasploit Framework
  3. Nessus
  4. NMAP
  5. w3af
  6. Armitage

三、Metasploit各生命周期中使用的组件与模块

阶段使用
信息收集Auxiliary modules: portscan/syn,portscan/tcp,smb version, db nmap, scanner/ftp/ftp version, andgather/shodan search
枚举smb / smb_enumshares, smb/ smb_enumusers, and smb/smb login
获取访问权限所有 Metasploit exploits 和 payloads
提权meterpreter-use priv and meterpreter-getsystem
权限维持meterpreter - run persistence
行迹覆盖Metasploit Anti-Forensics Project

四、Metasploit 辅助工具

1. Nessus

最流行的漏洞评估工具之一。它属于漏洞扫描程序类别。一旦Nessus告诉我们目标系统上存在哪些漏洞,我们就可以将这些漏洞提供给Metasploit,看看它们是否可以被真正利用。

2. 安装

Windows

  1. https://www.tenable.com/products/nessus/
  2. 选择合适版本(32-bit/64-bit)
  3. 下载并安装msi文件
  4. Open a browser and navigate to the URL :https://localhost:8834/
  5. 设置新username和password以访问Nessus控制台
  6. 申请注册, 点击 registering this scanner
  7. 访问http://www.tenable.com/products/nessus/nessus-plugins/获取激活码,选择 Nessus Home 输入注册详尽信息
  8. 输入通过电子邮件收到的注册码

Linux(详细)

  1. https://www.tenable.com/downloads/nessus?loginAttempted=true
  2. 以 kali linux (Debian 64位)为例
    在这里插入图片描述
  3. 拖动文件,复制到kali linux 中
  4. dpkg -i Nessus-8.15.3-debian6_amd64.deb
  5. service nessusd start
  6. service nessusd status
  7. 访问 https://localhost:8834/
  8. 选择Managed Scanner,然后选择继续
  9. 选择Tenable.sc
  10. 设置usernamepassword ,之后等待安装
  11. 注册邮箱 ,获取激活码
  12. 控制台进入 Nessus文件:
    cd /opt/nessus/sbin/
    ./nessuscli fetch --challenge 获取challenge code
  13. 访问:https://plugins.nessus.org/v2/offline.php 输入challenge code 和激活码,下载all.-2.x.tar.gz
  14. all.-2.x.tar.gz拖动至/opt/nessus/sbin下:
	1cp all-2.0.tar.gz /opt/nessus/sbin/
	2cd /opt/nessus/sbin/
	3: ./nessuscli update all-2.0.tar.gz
	4:  cp -r /opt/nessus/lib/nessus/plugins/ /opt/nessus/lib/nessus/plugins.bak/
	5:  service nessusd restart
  1. 后续操作修改plugin_feed_info.inc文件:
	1: vim /opt/nessus/var/nessus/plugin_feed_info.inc
	2: vim /opt/nessus/lib/nessus/plugins/plugin_feed_info.inc
	3: service nessusd restart
	4: cd /opt/nessus/lib/nessus
	5: rm -rf plugins
	6: mv plugins.bak/ plugins
	7: 重启kali
	8: service nessusd start
	9: 重新访问 https://localhost:8834/ 等待更新

3. kali自带 Namp

4. kali 自带Metasploit

kali安装 (虚拟机)

https://www.kali.org/get-kali/#kali-virtual-machines
安装完成后:

  1. 控制台输入 msfconsole
    在这里插入图片描述
  2. msf命令教程:https://www.offensive-security.com/metasploit-unleashed/msfconsole-commands/

实例教程(仅供教学测试)

虚拟机:Windows XP(远程执行代码)https://docs.microsoft.com/en-us/security-updates/securitybulletins/2012/ms12-020

  1. msf6> search ms12-020
    在这里插入图片描述
  2. use auxiliary/dos/windows/rdp/ms12_020_maxchannelids
    在这里插入图片描述
  3. 查看并设置参数(本地局域网测试)
    show options
    在这里插入图片描述
    set RHOST 192.168.116.35
    RHOST => 192.168.116.129 在这里插入图片描述
  4. run
    在这里插入图片描述

五、整理的帮助文档

官方文档:https://www.offensive-security.com/metasploit-unleashed/

Metasploit社区:http://resources.metasploit.com/

Metasploit指南:https://metasploit.help.rapid7.com/docs


笔者因才疏学浅初次尝试,尚有许多不足,望多加指正!

该期下一分节:渗透测试实战——(2.2)使用Metasploit进行Web渗透

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Hands-On Penetration Testing on Windows pdf 页数:454 来源: https://itbooks.ctfile.com/fs/18113597-302639985 Master the art of identifying vulnerabilities within the Windows OS and develop the desired solutions for it using Kali Linux. Book Description Windows has always been the go-to platform for users around the globe to perform administration and ad hoc tasks, in settings that range from small offi ces to global enterprises, and this massive footprint makes securing Windows a unique challenge. This book will enable you to distinguish yourself to your clients. In this book, you'll learn advanced techniques to attack Windows environments from the indispensable toolkit that is Kali Linux. We'll work through core network hacking concepts and advanced Windows exploitation techniques, such as stack and heap overflows, precision heap spraying, and kernel exploitation, using coding principles that allow you to leverage powerful Python scripts and shellcode. We'll wrap up with post-exploitation strategies that enable you to go deeper and keep your access. Finally, we'll introduce kernel hacking fundamentals and fuzzing testing, so you can discover vulnerabilities and write custom exploits. By the end of this book, you'll be well-versed in identifying vulnerabilities within the Windows OS and developing the desired solutions for them. What You Will Learn Get to know advanced pen testing techniques with Kali Linux Gain an understanding of Kali Linux tools and methods from behind the scenes See how to use Kali Linux at an advanced level Understand the exploitation of Windows kernel drivers Understand advanced Windows concepts and protections, and how to bypass them using Kali Linux Discover Windows exploitation techniques, such as stack and heap overflows and kernel exploitation, through coding principles Authors Phil Bramwell Phil Bramwell acquired the Certified Ethical Hacker and Certified Expert Penetration Tester certifications at the age of 21. His professional experience includes Common Criteria design reviews and testing, network security consulting, penetration testing, and PCI-DSS compliance auditing for banks, universities, and governments. He later acquired the CISSP and Metasploit Pro Certified Specialist credentials. Today, he is a cybersecurity and cryptocurrency consultant and works as a cybersecurity analyst specializing in malware detection and analysis.

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值