zoukankan      html  css  js  c++  java
  • 利用 dns 实现 app简易抓包

    场景:对H5打包的 app实现抓包

    环境:centos 8

    follow the guide: https://www.linuxtechi.com/setup-bind-server-centos-8-rhel-8/

    How to Setup DNS Server (Bind) on CentOS 8 / RHEL8

    step 1-2

    then 

    https://docstore.mik.ua/orelly/networking_2ndEd/dns/ch07_05.htm

    7.5. Logging in BIND 8 and 9 docstore.mik.ua/orelly/networking_2ndEd/dns/ch07_05.htm

    [root@uatdns01 ~]# cat /etc/named/named.conf
    options {
    //             listen-on port 53 { any; };
    //             listen-on-v6 port 53 { ::1; };
                 directory "/var/named";
                 dump-file "/var/named/data/cache_dump.db";
                 statistics-file "/var/named/data/named_stats.txt";
                  memstatistics-file "/var/named/data/named_mem_stats.txt";
    //              allow-query { any; };
                  recursion yes;
                  forward first;
                  forwarders {            #即访问非kevin.cn域名时将解析转发到这几个DNS地址(分别为阿里的DNS、google的DNS)上进行解析。
                         223.5.5.5;          #注意这里转发的是DNS地址,没有指定DNS转发域名。
                         223.6.6.6;
                         8.8.8.8;
                         8.8.4.4;
                   };
    };

      logging {
            channel default_debug {
            file "data/named.run";
            severity dynamic;
            };
            channel my_file {
            file "log.msgs"; severity dynamic;
            };
            category default { null; };
            category queries {
            my_file;
            };
      };

     

     

    # systemctl restart named

    在手机端设置wifi dns

    https://zhuanlan.zhihu.com/p/71385781

    在服务器端可看到 dns解析日志

    [root@iZ8vb1v402ygt7xht0rt2fZ ~]# tail -f /var/named/log.msgs
    client @0x7f48b4038490 220.194.172.244#7689 (query.hicloud.com): query: query.hicloud.com IN A + (172.27.189.30)
    client @0x7f48bc0c5210 220.194.172.244#7752 (cqs-drcn.emui.hicloud.com): query: cqs-drcn.emui.hicloud.com IN A + (172.27.189.30)
    client @0x7f48bc051610 220.194.172.244#7753 (stores1.hispace.hicloud.com): query: stores1.hispace.hicloud.com IN A + (172.27.189.30)
    client @0x7f48beed86c0 220.194.172.244#7754 (dns.weixin.qq.com): query: dns.weixin.qq.com IN A + (172.27.189.30)
    client @0x7f48b4034650 162.219.179.138#54179 (VERSION.BIND): query: VERSION.BIND CH TXT + (172.27.189.30)
    client @0x7f48b4034650 220.194.172.244#7755 (aqv.hicloud.com): query: aqv.hicloud.com IN A + (172.27.189.30)
    client @0x7f48beec3250 220.194.172.244#7756 (www.taobao.com): query: www.taobao.com IN A + (172.27.189.30)
    client @0x7f48b4038490 220.194.172.244#7757 (configsvr.msf.3g.qq.com): query: configsvr.msf.3g.qq.com IN A + (172.27.189.30)
    client @0x7f48bc0c5210 220.194.172.244#7758 (data.hicloud.com): query: data.hicloud.com IN A + (172.27.189.30)
    client @0x7f48bc051610 220.194.172.244#7759 (audid-api.taobao.com): query: audid-api.taobao.com IN A + (172.27.189.30)

    要想用户在web端看到,需要写段web代码:

  • 相关阅读:
    个人作业3——个人总结(Alpha阶段)
    结对编程2 单元测试
    英语学习app案例分析
    结对作业1
    java四则运算生成器
    个人附加作业 201421123108 王坤彬 网络1414
    个人作业3-(Alpha阶段)
    结对编程之单元测试 201421123108 王坤彬
    英语学习案例分析APP 201421123108 王坤彬
    结对编程 王坤彬 201421123108
  • 原文地址:https://www.cnblogs.com/diylab/p/13818426.html
Copyright © 2011-2022 走看看