爱意满满的作品展示区。
deplives

通过 DNS 发送消息的实现

  •  
  •   deplives · Oct 27, 2025 · 3426 views
    This topic created in 393 days ago, the information mentioned may be changed or developed.

    最近工作不太饱和,闲的无聊想了一个点子: 如果在某些网络环境中,只有 DNS 协议请求能够通过,那能否通过某种特殊的渠道实现互相的消息传递。 然后研究了一下,实现了一个只通过 DNS 就可以传输文本消息的小玩具

    并且搭建了一个对应的 DNS 服务器

    https://gist.githubusercontent.com/bob-zebedy/6e1949cee93d8df401246a858ebfbaf0/raw/d90210ac548380aacd4d8cf602b8aaa6b870e946/dnsay.py

    使用方法:下载上面的 py 脚本 python3 dnsay.py --dns-host 144.34.239.89 --group test

    --dns-host 144.34.239.89 就是我搭建的特殊的 dns 服务器

    --group 可以理解为聊天室,相同的 group 才能收到彼此的消息

    欢迎品尝

    11 replies  •  2025-10-29 21:57:06 +08:00
    lzoje
    lzoje
    Oct 27, 2025
    1
    上上周阮一峰周报有一个用 dns 代理免费用飞机 wifi 的。
    julyclyde
    julyclyde
    Oct 27, 2025
    2
    古代还有 ICMP 的
    python35
    python35
    Oct 27, 2025
    3
    之前还有 xshell 的后门就是用 dns 协议上传用户名密码 https://ti.qianxin.com/blog/articles/analysis-of-xshell-ghost/
    pagxir
    pagxir
    Oct 27, 2025 via Android
    4
    这个是古早点子了,看这个 https://github.com/yarrick/iodine
    wangweiggsn
    wangweiggsn
    Oct 27, 2025
    5
    py 3.13.9, 报 ModuleNotFoundError: No module named 'dns',运行 pip install dns.resolver 报 ERROR: Could not find a version that satisfies the requirement dns.resolver (from versions: none),放弃。
    xjzshttps
    xjzshttps
    Oct 27, 2025
    6
    我记得之前还有 dns 隧道
    Greatshu
    Greatshu
    Oct 27, 2025❤️1
    7
    有个叫 DCM 的木马,也是利用 DNS 通信,据说是国家队作品
    deplives
    deplives
    OP
    Oct 28, 2025
    8
    @wangweiggsn 哥,你需要的是 pip install dnslib dnspython cryptography
    wangweiggsn
    wangweiggsn
    Oct 28, 2025
    9
    @deplives 感谢,可以了,进去看了下,没人在里面说话,又退出了。
    julyclyde
    julyclyde
    Oct 29, 2025
    10
    @deplives 嘿嘿,挺烦这种 pip 和 import 名字不同的库
    感觉他们很不讲究
    chennqqi
    chennqqi
    Oct 29, 2025
    11
    DNS 隧道
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   972 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 19:43 · PVG 03:43 · LAX 11:43 · JFK 14:43
    ♥ Do have faith in what you're doing.