• passivedns 安装指南


    install passivedns on ubuntu

    Passive DNS对安全研究非常重要,因为它可以在前期帮助我们构建出目标的基础设施结构,并且可以得到以下三方面的答案:
    该域名曾经绑定过哪些IP
    这个IP有没有其他的域名
    该域名最早/最晚什么时候出现
    Passive DNS同时也在SOC的时候起到很大的帮助。通过识别的恶意域名,可以找到其他被恶意破坏的机器。目前有很多网站允许我们访问它的 Passive DNS系统,例如:
    Virustotal(https://www.virustotal.com/)、passivetotal(https://www.passivetotal.com)、CIRCL (https://www.circl.lu/services/passive-dns/)。有很多这样的网站,但是,自己在本地有一个当然会更方便。

    https://github.com/gamelinux/passivedns

    环境ubuntu16.04

    sudo -i

    apt-get install git-core binutils-dev libldns1 libldns-dev libpcap-dev libdate-simple-perl

    git clone git://github.com/gamelinux/passivedns.git

    cd passivedns/

    autoreconf --install

    ./configure

    make

    cd /src

    ./passivedns -l /home/sky/passivedns.log

    开始监听中...........................

    查看下监听的记录文件

    将记录文件内容导入mysql中

    安装mysql

    sudo apt-get install mysql-server mysql-client mysql-dev            #中途会让你输入一次root用户密码

    sudo apt-get install php5-mysql                                   #安装php5-mysql 是将php和mysql连接起来

    创建数据库

    mysql -uroot -p123456

    GRANT USAGE ON *.* TO 'pdns'@'localhost' IDENTIFIED BY 'pdns';

    GRANT SELECT,CREATE,INSERT,UPDATE ON pdns.* TO 'pdns'@'localhost';

    flush privileges;

    CREATE DATABASE pdns;

    log文件导入mysql

    apt-get install perl-dev libmysqld-dev libmysqlclient-dev

    PATH=/usr/bin:$PATH;export PATH

    perl -MCPAN -e shell

    install DBI

    install DBD::mysql

    cd tools

    perl pdns2db.pl --file /var/log/passivedns.log      如果直接运行会报错,需要先安装perl的DBI和DBD::mysql这2个模块,才能使用

    然后echo “select * from pdns limit 10;” | mysql -updns -ppdns -hlocalhost pdns

    结果如图:

    只要你浏览网页,他都会自己记录,然后手工导入mysql中,这样自已可能搭建像360天眼的passivedns

    当然也可以用其他网站已经提供好的如http://passivedns.mnemonic.no/search/能查询到最早2012年的

  • 相关阅读:
    mysql远程执行sql脚本
    数据库死锁
    sqlserver 数据库之调优
    sqlserver 数据库之性能优化
    Session共享的解决办法
    关于对session机制的理解--通俗易懂
    kafka之常用命令
    分布式消息队列之kafka
    vuejs调试代码
    json
  • 原文地址:https://www.cnblogs.com/nightnine/p/5483607.html
Copyright © 2020-2023  润新知