| <!DOCTYPE html> |
| <html lang="zh-CN"> |
| <head> |
| <meta charset="UTF-8" /> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| <meta name="viewport" content="width=device-width, initial-scale=1" /> |
|
|
| |
| <title>绕过Portal认证的另一个想法 | Mayx的博客</title> |
| <meta name="generator" content="Jekyll v3.9.5" /> |
| <meta property="og:title" content="绕过Portal认证的另一个想法" /> |
| <meta name="author" content="mayx" /> |
| <meta property="og:locale" content="zh_CN" /> |
| <meta name="description" content="也许反弹还是挺好用的?" /> |
| <meta property="og:description" content="也许反弹还是挺好用的?" /> |
| <meta property="og:site_name" content="Mayx的博客" /> |
| <meta property="og:type" content="article" /> |
| <meta property="article:published_time" content="2021-07-13T00:00:00+08:00" /> |
| <meta name="twitter:card" content="summary" /> |
| <meta property="twitter:title" content="绕过Portal认证的另一个想法" /> |
| <meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" /> |
| <meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" /> |
| <meta name="yandex-verification" content="fc0e535abed800be" /> |
| <script type="application/ld+json"> |
| {"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2021-07-13T00:00:00+08:00","datePublished":"2021-07-13T00:00:00+08:00","description":"也许反弹还是挺好用的?","headline":"绕过Portal认证的另一个想法","mainEntityOfPage":{"@type":"WebPage","@id":"/2021/07/13/wifi.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2021/07/13/wifi.html"}</script> |
| |
|
|
| |
| <link rel="canonical" href="https://mabbs.github.io/2021/07/13/wifi.html" /> |
| <link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" /> |
| <link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" /> |
| <link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" /> |
| <link rel="stylesheet" href="/assets/css/style.css?v=1777130406" /> |
| |
| <link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" /> |
| |
| <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" /> |
| <link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" /> |
| <link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" /> |
| <link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" /> |
| <link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" /> |
| <link rel="blogroll" type="text/xml" href="/blogroll.opml" /> |
| <link rel="me" href="https://github.com/Mabbs" /> |
| <script src="/assets/js/jquery.min.js"></script> |
| |
| |
| |
| |
| |
| <script> |
| var lastUpdated = new Date("Sat, 25 Apr 2026 23:20:06 +0800"); |
| var BlogAPI = "https://summary.mayx.eu.org"; |
| </script> |
| <script src="/assets/js/main.js"></script> |
| |
| |
| |
| <script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script> |
| <script> |
| window.dataLayer = window.dataLayer || []; |
| function gtag(){dataLayer.push(arguments);} |
| gtag('js', new Date()); |
| gtag('config', 'UA-137710294-1'); |
| </script> |
| |
| <script src="/assets/js/instant.page.js" type="module"></script> |
| |
| </head> |
|
|
| <body> |
| <noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee></noscript> |
| |
| <div class="wrapper"> |
| <header class="h-card"> |
| <h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1> |
|
|
| |
| <img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px; border-radius: 25%;" /> |
| |
|
|
| <p class="p-note">Mayx's Home Page</p> |
|
|
| <form action="/search.html"> |
| <input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." /> <input type="submit" value="搜索" /> |
| </form> |
| <br /> |
|
|
| |
|
|
| |
|
|
| <p class="view"><a class="u-url" href="/Mabbs/">About me</a></p> |
|
|
| <ul class="downloads"> |
| |
| <li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li> |
| |
| </ul> |
| </header> |
| <section class="h-entry"> |
|
|
| <small><time class="date dt-published" datetime="2021-07-13T00:00:00+08:00">13 July 2021</time> - 字数统计:1848 - 阅读大约需要6分钟 - Hits: <span id="/2021/07/13/wifi.html" class="visitors">Loading...</span></small> |
| <h1 class="p-name">绕过Portal认证的另一个想法</h1> |
|
|
| <p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p> |
| <div id="outdate" style="display:none;"> |
| <hr /><p> |
| 这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。 |
| </p> |
| </div> |
| <script> |
| daysold = Math.floor((new Date().getTime() - new Date("Tue, 13 Jul 2021 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000)); |
| if (daysold > 90) { |
| document.getElementById("outdate").style.display = "block"; |
| document.getElementById("outime").innerHTML = daysold; |
| } |
| </script> |
|
|
| <hr /> |
|
|
| <b>AI摘要</b> |
| <p id="ai-output">这篇文章作者讨论了在新宿舍环境中发现的使用Portal验证的WiFi,并注意到这种认证方式存在绕过的可能性。作者分享了之前尝试过的DNS隧道方法,虽然有效但普遍。一个不成熟的想法是利用可能存在的入站而非出站防火墙漏洞,通过主动连接的隧道,如搭建SSH或frp隧道来进行反弹式连接。这种方法在特定情况下(如公网IP且入站防火墙未开启)可行,但具有明显的局限性,如需要在同一网络内、防火墙可能随时变化等。作者表示这仅是理论上的另一个思路,实际操作中具有不确定性,更多是作为一种可能性探讨。</p> |
|
|
| <hr /> |
|
|
|
|
|
|
| <ul><li><a href="#起因">起因</a></li><li><a href="#绕过的思路">绕过的思路</a></li><li><a href="#另一个想法">另一个想法</a></li><li><a href="#局限性">局限性</a></li></ul> |
| <hr /> |
|
|
|
|
| <main class="post-content e-content" role="main"><p>也许反弹还是挺好用的?</p> |
| <h1 id="起因"> |
| |
| |
| <a href="#起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 起因 |
| |
| |
| </h1> |
| |
| <p>前段时间,我换了宿舍。待了一段时间之后我发现在新宿舍里比旧宿舍里多了一些WiFi,比如CMCC-EDU啥的。原来我们宿舍除了自己的WiFi就再没有别的了,那这个新的WiFi就引起了我的注意力。 </p><p> |
| 我很久以前也研究过类似的WiFi,这种WiFi通常不使用密码验证,而是使用Portal验证。这种验证更加的自由,所以很多公共区域的WiFi都使用的是这种方式。但是这种验证有一个很大的缺陷,那就是正常来说用密码的WiFi,即AP的密码算是在第一层,也就是物理层上做的验证,通常物理层验证还是很难破解的,毕竟这就相当于把网线剪了,再厉害的黑客也没办法,通常也只能靠些什么旁路攻击之类乱七八糟的歪门邪道,不如直接接入网络直接干合适。 </p><p> |
| 所以呢,当我可以直接接入WiFi时,不管怎么说,这都相当于我已经直接用网线直连到了这个网络中,然后只要想办法绕过认证服务器就可以。不过这么说也不是很准确,因为大多数人配交换机不会配的很严格,但是AP还要特地开个AP隔离就比较恶心。 </p><p> |
| 通常来说,这个所谓的认证服务器也不过是一个二级的防火墙,通常就是通过认证的设备就在出站白名单里加上这个MAC地址,这样这个设备就可以正常上网了。</p> |
| <h1 id="绕过的思路"> |
| |
| |
| <a href="#绕过的思路"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 绕过的思路 |
| |
| |
| </h1> |
| |
| <p>绕过Portal认证的方法网上大多数是给的通过DNS隧道来绕过,因为大多数的这种服务器都不会自己写的DNS,而是用已经很成熟的软件,所以通常解析都不会受到影响。根据这一点,很多人就想出了使用DNS作为隧道来达到免费上网的目的,一般来说有两种方法,第一个是防火墙完全不封DNS的情况,也就是对UDP 53端口完全不设限的情况,这种情况直接搭一个使用UDP的任意隧道都可以。 |
| 还有一种是只允许使用DHCP分配的DNS服务器,一般也为了考虑到认证通过后能正常上网,所以解析都是正常的,考虑到DNS的特点,我们可以给自己服务器设置一个NS解析,这样我们就能拿被指定的这个DNS服务器作为跳板来和远程的服务器通信了。不过这个就不能随便选择软件了,需要用能伪装成DNS流量的软件来搭隧道,比如dns2tcp之类的就可以。</p><p> |
| 其实吧那个CMCC-EDU我试过,确实解析是没有问题的,正好Github之前还给我送了一年<a href="https://mayx.me/">mayx.me</a>的域名,我回头有机会我试试看能不能建立隧道吧。</p> |
| <h1 id="另一个想法"> |
| |
| |
| <a href="#另一个想法"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 另一个想法 |
| |
| |
| </h1> |
| |
| <p>上面的方法虽然很不错,但是太常见了,网上基本上搜怎么绕过Portal认证基本上都是这些办法,比较没意思,而且一般来说现在新的厂家应该都封掉了这个办法吧?毕竟只要给指定的DNS上面也加一个认证,必须是通过认证的设备才能正常解析,或者是像中国防火长城一样来一波DNS污染,这样DNS隧道就不能正常工作了。所以学了些网络知识的我有个不成熟的想法,那就是这种防火墙一般拦截的是出站,会不会不拦截入站? </p><p> |
| 事实上我还试了一下,那个CMCC-EDU很神奇的居然分配的是公网IP,所以我就试了试去ping连接的设备,想不到也可以ping成功,不过也可能只是防火墙没有拦截ICMP,具体因为我没待几天就回家了,有了这个想法也只是简单的做了几个测试而已,所以我也不是很清楚。不过没关系,如果没拦截ICMP也可以用ptunnel搭ICMP隧道。 </p><p> |
| 不过如果入站真的没有防火墙,那么我可以试试主动连接的隧道,用起来有点像反弹。具体怎么搭这种隧道如果用的是Linux系统的设备可以看<a href="/2021/05/07/ssh.html">怎么搭SSH隧道</a>,不过我这次实验想用frp来搭,也就是连接CMCC-EDU的设备打开frps,然后找个能连外网的服务器用frpc连进来,在配置段中加入:</p> |
| <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[socks_proxy] |
| type = tcp |
| remote_port = 1080 |
| plugin = socks5 |
| </code></pre></div></div> |
| <p>最后就直接用<code class="language-plaintext highlighter-rouge">127.0.0.1:1080</code>这个隧道上网就可以了,如果是Windows设备的话用Proxifier来上网效果还是相当不错的。不过我目前在家里不好试,等我开学了回宿舍试试看。</p> |
| <h1 id="局限性"> |
| |
| |
| <a href="#局限性"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 局限性 |
| |
| |
| </h1> |
| |
| <p>像这个方法也只能说是特定情况的另一种可能性吧,因为限制也是蛮多的,首先大多数Portal认证的WiFi不可能给一个公网IP,想要反弹至少要在同一个网络中,就这个限制就挺严格的,可能也就校园网可以用,另外就是不开入站防火墙也可能只是疏忽,万一管理员开了这个办法也不行,这也只能靠赌,也并不怎么好使,所以说这也就只是另一个想法,看以后如果真的遇到了类似的问题看怎么解决吧。 </p><p> |
| 不过我确实也没接触过真正严格的网络,像那种极其严格的公司网络我也没见过,也许到时候如果有机会见一见的话就不会觉得这种垃圾防火墙算什么事情了吧😀。</p></main> |
|
|
|
|
| <small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=WiFi"><em>WiFi</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=Portal"><em>Portal</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E8%AE%A4%E8%AF%81"><em>认证</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E7%BB%95%E8%BF%87"><em>绕过</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2021-07-13-wifi.md">查看原始文件</a></span></small> |
|
|
|
|
| <h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4> |
| <p id="suggest-container">Loading...</p> |
| <script> |
| var suggest = $("#suggest-container"); |
| $.get(BlogAPI + "/suggest?id=/2021/07/13/wifi.html&update=" + lastUpdated.valueOf(), function (data) { |
| if (data.length) { |
| getSearchJSON(function (search) { |
| suggest.empty(); |
| var searchMap = {}; |
| for (var i = 0; i < search.length; i++) { |
| searchMap[search[i].url] = search[i]; |
| } |
| |
| var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide(); |
| for (var j = 0; j < data.length; j++) { |
| var item = searchMap[data[j].id]; |
| if (item) { |
| var link = $('<a href="' + item.url + '">' + item.title + '</a>'); |
| var contentPreview = item.content.substring(0, 100); |
| if (item.content.length > 100) { |
| contentPreview += "……"; |
| } |
| link.hover( |
| function(e) { |
| tooltip.text($(this).data('content')) |
| .css({ |
| top: e.pageY + 10, |
| left: e.pageX + 10 |
| }) |
| .show(); |
| }, |
| function() { |
| tooltip.hide(); |
| } |
| ).mousemove(function(e) { |
| tooltip.css({ |
| top: e.pageY + 10, |
| left: e.pageX + 10 |
| }); |
| }).data('content', contentPreview); |
| |
| suggest.append(link); |
| suggest.append(' - ' + item.date + '<br />'); |
| } |
| } |
| }); |
| } else { |
| suggest.html("暂无推荐文章……"); |
| } |
| }); |
| </script> |
|
|
| <br /> |
| <div class="pagination"> |
| |
| <span class="prev"> |
| <a href="/2021/06/10/distributed.html"> |
| 上一篇:关于去中心化分布式系统的探索 |
| </a> |
| </span> |
| |
| <br /> |
| |
| <span class="next"> |
| <a href="/2021/07/23/search.html"> |
| 下一篇:如何给博客加上全文搜索功能 |
| </a> |
| </span> |
| |
| </div> |
|
|
| |
| <link rel="stylesheet" href="/assets/css/gitalk.css"> |
| <script src="/assets/js/gitalk.min.js"></script> |
|
|
| <div id="gitalk-container"></div> |
|
|
| <script> |
| var gitalk = new Gitalk({ |
| clientID: '36557aec4c3cb04f7ac6', |
| clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb', |
| repo: 'mabbs.github.io', |
| owner: 'Mabbs', |
| admin: ['Mabbs'], |
| id: '/2021/07/13/wifi', |
| distractionFreeMode: false, |
| proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token" |
| }) |
| gitalk.render('gitalk-container') |
| </script> |
| |
|
|
| </section> |
| |
| <div id="landlord" style="left:5px;bottom:0px;"> |
| <div class="message" style="opacity:0"></div> |
| <canvas id="live2d" width="500" height="560" class="live2d"></canvas> |
| <div class="live_talk_input_body"> |
| <form id="live_talk_input_form"> |
| <div class="live_talk_input_name_body" > |
| <input type="checkbox" id="load_this" /> |
| <input type="hidden" id="post_id" value="/2021/07/13/wifi.html" /> |
| <label for="load_this"> |
| <span style="font-size: 11px; color: #fff;"> 想问这篇文章</span> |
| </label> |
| </div> |
| <div class="live_talk_input_text_body"> |
| <input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" /> |
| <button type="submit" class="live_talk_send_btn" id="talk_send">发送</button> |
| </div> |
| </form> |
| </div> |
| <input name="live_talk" id="live_talk" value="1" type="hidden" /> |
| <div class="live_ico_box" style="display:none;"> |
| <div class="live_ico_item type_info" id="showInfoBtn"></div> |
| <div class="live_ico_item type_talk" id="showTalkBtn"></div> |
| <div class="live_ico_item type_music" id="musicButton"></div> |
| <div class="live_ico_item type_youdu" id="youduButton"></div> |
| <div class="live_ico_item type_quit" id="hideButton"></div> |
| <input name="live_statu_val" id="live_statu_val" value="0" type="hidden" /> |
| <audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio> |
| <input id="duType" value="douqilai" type="hidden" /> |
| </div> |
| </div> |
| <div id="open_live2d">召唤伊斯特瓦尔</div> |
| |
| <footer> |
| <p> |
| <small>Made with ❤ by Mayx<br />Last updated at 2026-04-25 23:20:06<br /> 总字数:624725 - 文章数:181 - <a href="/rss.xml">Feed</a> - <a href="/README.html" >About</a></small> |
| </p> |
| </footer> |
| </div> |
| <script src="/assets/js/scale.fix.js"></script> |
| |
| <script src="/assets/js/main_new.js"></script> |
| <script src="/Live2dHistoire/live2d/js/live2d.js"></script> |
| <script src="/Live2dHistoire/live2d/js/message.js"></script> |
| |
| </body> |
| </html> |
|
|