背景:最近公司分配了一个攻防演练的项目,目标资产较少,挖了几天都没有收获。后来其它师傅通过一个Struts2的框架漏洞成功Get Shell并打进内网,而我对内网这块一窍不通,所以趁着这几天跟着师傅们小小地体验了一番内网渗透。
Python3
,若无Python3
环境需要先安装。pip
安装即可$ git clone https://github.com/L-codes/Neo-reGeorg.git
$ python3 neoreg.py -h # 查看帮助
# 可选参数:
-h, --help # 显示此帮助信息并退出
-u URI, --url URI # 包含隧道脚本的url
-k KEY, --key KEY # 特定连接密钥
-l IP, --listen-on IP # 默认监听地址 (默认值: 127.0.0.1)
-p PORT, --listen-port PORT # 默认监听端口 (默认值: 1080)
-s, --skip # 跳过可用性测试
-H LINE, --header LINE # 将自定义标题行传递到服务器
-c LINE, --cookie LINE # 自定义到服务器的cookie
-x LINE, --proxy LINE # proto://host[:port] 在给定端口上使用代理
--read-buff Bytes # 本地读取缓冲区,每个日志发送的最大数据(默认值: 1024)
--read-interval MS # 读取数据间隔(毫秒) (默认值: 100)
--max-threads N # 代理最大线程数 (默认值: 1000)
-v # 显示详细信息 (使用-vv或者更多的v显示更详细的信息)
neoreg_server
目录,里面包含了各种语言类型的隧道文件$ python3 neoreg.py generate -k <password>
[+] Create neoreg server files:
=> neoreg_server/key.txt. # 密码
=> neoreg_server/tunnel.nosocket.php
=> neoreg_server/tunnel.js
=> neoreg_server/tunnel.php
=> neoreg_server/tunnel.ashx
=> neoreg_server/tunnel.aspx
=> neoreg_server/tunnel.tomcat.5.jsp
=> neoreg_server/tunnel.tomcat.5.jspx
=> neoreg_server/tunnel.jsp
=> neoreg_server/tunnel.jspx
$ python3 neoreg.py -k <password> -u http://xxx/tunnel.php
+------------------------------------------------------------------------+
Log Level set to [ERROR]
Starting socks server [127.0.0.1:1080], tunnel at [http://xx/tunnel.php]
+------------------------------------------------------------------------+
# Linux
$ git clone https://github.com/rofl0r/proxychains-ng.git # 下载
$ cd proxychains-ng && ./configure && make && make install # 编译安装
$ cp ./src/proxychains.conf /etc/proxychains.conf # 拷贝配置文件
$ cd .. && rm -rf proxychains-ng # 删除目录(可不执行)
# Mac
$ brew install proxychains-ng
# 找到proxychains.conf文件所在的路径
# 将socks4 127.0.0.1 9095改为 socks5 127.0.0.1 1080
$ vim /etc/proxychains.conf # Kali
$ vim /usr/local/etc/proxychains.conf # Mac
# 用法: proxychains4 XXX
$ proxychains4 curl ifconfig.io
如果要使用BurpSuite抓包进行如暴力破解等操作,还需要另外配置一下BurpSuite的代理
Command+R
进入恢复模式,在菜单中打开命令行,输入以下命令:$ csrutil enable --without debug # 忽略返回的警告
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有