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

通过 DNS 发送消息的实现

  •  
  •   deplives · Oct 27, 2025 · 2930 views
    This topic created in 221 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
        1
    lzoje  
       Oct 27, 2025
    上上周阮一峰周报有一个用 dns 代理免费用飞机 wifi 的。
    julyclyde
        2
    julyclyde  
       Oct 27, 2025
    古代还有 ICMP 的
    python35
        3
    python35  
       Oct 27, 2025
    之前还有 xshell 的后门就是用 dns 协议上传用户名密码 https://ti.qianxin.com/blog/articles/analysis-of-xshell-ghost/
    pagxir
        4
    pagxir  
       Oct 27, 2025 via Android
    这个是古早点子了,看这个 https://github.com/yarrick/iodine
    wangweiggsn
        5
    wangweiggsn  
       Oct 27, 2025
    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
        6
    xjzshttps  
       Oct 27, 2025
    我记得之前还有 dns 隧道
    Greatshu
        7
    Greatshu  
       Oct 27, 2025   ❤️ 1
    有个叫 DCM 的木马,也是利用 DNS 通信,据说是国家队作品
    deplives
        8
    deplives  
    OP
       Oct 28, 2025
    @wangweiggsn 哥,你需要的是 pip install dnslib dnspython cryptography
    wangweiggsn
        9
    wangweiggsn  
       Oct 28, 2025
    @deplives 感谢,可以了,进去看了下,没人在里面说话,又退出了。
    julyclyde
        10
    julyclyde  
       Oct 29, 2025
    @deplives 嘿嘿,挺烦这种 pip 和 import 名字不同的库
    感觉他们很不讲究
    chennqqi
        11
    chennqqi  
       Oct 29, 2025
    DNS 隧道
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3067 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 56ms · UTC 04:09 · PVG 12:09 · LAX 21:09 · JFK 00:09
    ♥ Do have faith in what you're doing.