Neo-reGeorg ——目前比較好用的http隧道工具,支持本地建立 socks5 代理


Neo-reGeorg

簡體中文 | English

Neo-reGeorg 是一個旨在積極重構 reGeorg 的項目,目的是:

  • 提高 tunnel 連接安全性
  • 提高可用性,避免特征檢測
  • 提高傳輸內容保密性
  • 應對更多的網絡環境場景

此工具僅限於安全研究和教學,用戶承擔因使用此工具而導致的所有法律和相關責任! 作者不承擔任何法律和相關責任!

Version

3.0.0 - 版本修改日志

Features

  • 傳輸內容經過變形 base64 加密,偽裝成 base64 編碼
  • 直接請求響應可定制化 (如偽裝的404頁面)
  • HTTP Headers 的指令隨機生成,避免特征檢測
  • HTTP Headers 可定制化
  • 自定義 HTTP 響應碼
  • 多 URL 隨機請求
  • 服務端 DNS 解析
  • 兼容 python2 / python3
  • 服務端環境的高兼容性
  • (僅 php) 參考 pivotnacci 實現單 Session 創建多 TCP 連接,應對部分負載均衡場景
  • aspx/ashx/jsp/jspx 已不再依賴 Session,可在無 Cookie 等惡劣環境正常運行
  • 支持內網轉發,應對負載均衡環境

Dependencies

Basic Usage

  • Step 1. 設置密碼生成 tunnel.(aspx|ashx|jsp|jspx|php) 並上傳到WEB服務器
$ python neoreg.py generate -k password [+] Create neoreg server files: => neoreg_servers/tunnel.jspx => neoreg_servers/tunnel_compatibility.jspx => neoreg_servers/tunnel.php => neoreg_servers/tunnel.ashx => neoreg_servers/tunnel.aspx => neoreg_servers/tunnel.jsp => neoreg_servers/tunnel_compatibility.jsp
  • Step 2. 使用 neoreg.py 連接 WEB 服務器,在本地建立 socks5 代理
$ python3 neoreg.py -k password -u http://xx/tunnel.php +------------------------------------------------------------------------+ Log Level set to [DEBUG] Starting socks server [127.0.0.1:1080] Tunnel at: http://xx/tunnel.php +------------------------------------------------------------------------+

注意,如果你的工具,如 nmap 不支持 socks5 代理設置,請使用 proxychains 等

Advanced Usage

  1. 支持生成的服務端,默認直接請求響應指定的頁面內容 (如偽裝的 404 頁面)
$ python neoreg.py generate -k <you_password> --file 404.html --httpcode 404 $ python neoreg.py -k <you_password> -u <server_url> --skip
  1. 如服務端 WEB,需要設置代理才能訪問
$ python neoreg.py -k <you_password> -u <server_url> --proxy socks5://10.1.1.1:8080
  1. 如需 Authorization 認證和定制的 Header 或 Cookie
$ python neoreg.py -k <you_password> -u <server_url> -H 'Authorization: cm9vdDppcyB0d2VsdmU=' --cookie "key=value;key2=value2"
  1. 需要分散請求,可上傳到多個路徑上,如內存馬
$ python neoreg.py -k <you_password> -u <url_1> -u <url_2> -u <url_3> ...
  1. 開啟內網轉發,應對負載均衡
$ python neoreg.py -k <you_password> -u <url> -r <redirect_url>
  1. 使用端口轉發功能,非啟動 socks5 服務 ( 127.0.0.1:1080 -> ip:port )
$ python neoreg.py -k <you_password> -u <url> -t <ip:port>
  • 更多關於性能和穩定性的參數設置參考 -h 幫助信息
# 生成服務端腳本
$ python neoreg.py generate -h usage: neoreg.py [-h] -k KEY [-o DIR] [-f FILE] [-c CODE] [--read-buff Bytes] Generate neoreg webshell optional arguments: -h, --help show this help message and exit -k KEY, --key KEY Specify connection key. -o DIR, --outdir DIR Output directory. -f FILE, --file FILE Camouflage html page file -c CODE, --httpcode CODE Specify HTTP response code. (default: 200) --read-buff Bytes Remote read buffer. (default: 513) # 連接服務端 $ python neoreg.py -h usage: neoreg.py [-h] -u URI [-r URL] [-t IP:PORT] -k KEY [-l IP] [-p PORT] [-s] [-H LINE] [-c LINE] [-x LINE] [--local-dns] [--read-buff Bytes] [--read-interval MS] [--write-interval MS] [--max-threads N] [-v] Socks server for Neoreg HTTP(s) tunneller. DEBUG MODE: -k (debug_all|debug_base64|debug_headers_key|debug_headers_values) optional arguments: -h, --help show this help message and exit -u URI, --url URI The url containing the tunnel script -r URL, --redirect-url URL Intranet forwarding the designated server (only jsp(x)) -t IP:PORT, --target IP:PORT Network forwarding Target, After setting this parameter, port forwarding will be enabled -k KEY, --key KEY Specify connection key -l IP, --listen-on IP The default listening address.(default: 127.0.0.1) -p PORT, --listen-port PORT The default listening port.(default: 1080) -s, --skip Skip usability testing -H LINE, --header LINE Pass custom header LINE to server -c LINE, --cookie LINE Custom init cookies -x LINE, --proxy LINE Proto://host[:port] Use proxy on given port --local-dns Use local resolution DNS --read-buff Bytes Local read buffer, max data to be sent per POST.(default: 2048 max: 2600) --read-interval MS Read data interval in milliseconds.(default: 300) --write-interval MS Write data interval in milliseconds.(default: 200) --max-threads N Proxy max threads.(default: 1000) -v Increase verbosity level (use -vv or more for greater effect)

Remind

  • Mac OSX 上運行 neoreg.py 時,高並發請求會出現網絡丟包情況,可通過 ulimit -n 2560 修改當前 shell 的 "最大文件打開數"

TODO

  • HTTP body 隱寫

  • 傳輸 Target 隱寫

License

GPL 3.0

Stargazers over time

Stargazers over time


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM