Coder Social home page Coder Social logo

chennqqi / godnslog Goto Github PK

View Code? Open in Web Editor NEW
469.0 9.0 75.0 853 KB

An exquisite dns&http log server for verify SSRF/XXE/RFI/RCE vulnerability

Home Page: https://www.godnslog.com

License: Apache License 2.0

Dockerfile 0.23% Go 52.17% JavaScript 3.29% Vue 42.26% Less 2.05%
dnslog xss ssrf rce xxe rfi webscan vulnerability

godnslog's Introduction

GODNSLOG

A dns&http log server for verify SSRF/XXE/RFI/RCE vulnerability

English Doc | 中文文档

features

  • Standard Domain Resolve Service
  • DNSLOG
  • HTTPLOG
  • Rebinding/CustomRebinding
  • Push (callback)
  • Multi-user
  • dockerlized
  • python/golang client sdk
  • as a standard name resolve service with support A,CNAME,TXT,MX
  • xip

DNSLOG

super admin user: admin password will be showed in console logs when first run. you can change it by subcommand resetpw

HTTPLOG

build frontend

requirements:

yarn

cd frontend
yarn install
yarn build

build backend

requirements:

golang >= 1.13.0

go build

docker build

docker build -t "user/godnslog" .

For Chinese user:

docker build -t "user/godnslog" -f DockerfileCN .

RUN

i. Register your domain, eg: example.com Set your DNS Server point to your host, eg: ns.example.com => 100.100.100.100 Some registrar limit set to NS host, your can set two ns host point to only one address. Some registrar to ns host must be different ip address, you can set one to a fake addresss and then change to the same addresss

ii. self build

docker run -p80:8080 -p53:53/udp "user/godnslog"  serve -domain yourdomain.com -4 100.100.100.100

or use dockerhub

docker pull "sort/godnslog"
docker run -p80:8080 -p53:53/udp -p80:8080  "sort/godnslog" serve -domain yourdomain.com -4 100.100.100.100

iii. access http://100.100.100.100

Doc

guest/guest123

introduce payload api rebiding resolve

TODO && Known Issues

  • [ ]enhance reverse proxy
  • admin user can read all recordds
  • allow Anonymous user access document page
  • enable custom rebinding stage two setting
  • fix login logical problem

Follow me

godnslog's People

Contributors

chennqqi avatar tuuunya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godnslog's Issues

建议提供官方的docker-compose.yml文件

我这里有一份参考:

version: "3.5"

services:
  godnslog:
    image: sort/godnslog
    environment:
      - GIN_MODE=release
    ports:
      - "127.0.0.1:10080:8080"    # 反向代理模式
      - "53:53/udp"
    restart: always
    command: serve -domain yourdomain.com -4 x.x.x.x
    volumes:
      - ./godnslog.db:/app/godnslog.db   # 持久化存储

dnslog定时清理功能

dnslog定时清理功能可能是为了方便清理,但是遇到延时dnslog就不太方便,现在是2小时自动清理,好像是设置功能更新那里有bug没写好,点击更新服务端502错误。❌

DNS配置好后,无法解析。

按你文档中配置好自定义DNS HOST然后运行程序后,无法收到DNS请求。可以的话加个微信请教一下:o0x1024

同学,您这个项目引入了90个开源组件,存在3个漏洞,辛苦升级一下

检测到 chennqqi/godnslog 一共引入了90个开源组件,存在3个漏洞

漏洞标题:jwt-go 安全漏洞
缺陷组件:github.com/dgrijalva/[email protected]+incompatible
漏洞编号:CVE-2020-26160
漏洞描述:jwt-go是个人开发者的一个Go语言的JWT实现。
jwt-go 4.0.0-preview1之前版本存在安全漏洞。攻击者可利用该漏洞在使用[]string{} for m[\"aud\"](规范允许)的情况下绕过预期的访问限制。
影响范围:(∞, 4.0.0-preview1)
最小修复版本:4.0.0-preview1
缺陷组件引入路径:github.com/chennqqi/godnslog@->github.com/dgrijalva/[email protected]+incompatible

另外还有3个漏洞,详细报告:https://mofeisec.com/jr?p=ad9a2c

resetpw

resetpw子命令来自定义密码 这个是在哪操作的?

No user 是什么意思?

请求:
http://xxx.xxx.xxx.141/data/dns?q=1639741859796ypoii&t=1639741863&blur=1&hash=bc4481bd9cd9ce9d706dadf93369e24e
响应:
{"message":"No User","code":3,"timestemp":1639741900}

1639741859796ypoii 这个域名前缀在webui里面是能看到的,但是用api访问就不行,hash参数用文档里面的python算法验证了也没错,secret为blu35qr51z2jy0zxzoeraj2pl9egy9zb1vc73bjc67sz4ftew44fksxmczb9m4w6

image

HTTP Log建议

目前http log是一个web路径记录,实际测试的时候没有一个域名方便,可以改成一个单域名。dns和http都能接收。

新版本Chrome CORS错误

因为Chrome更新了安全策略,导致现在不升级到https无法正常加载资源了,作者有考虑升级吗

域名解析需要设置吗

我按照readme中设置了自定义DNS Host和DNS修改,但是请求dnslog还是没有记录,想请教下域名解析中需要设置什么记录吗

卡在初始化界面

登录界面无法登入,纯内网环境搭建好后,机器不可出网,卡在初始化界面,仅看到Pro和下面的Ant Design。

在反向代理的情景下待优化的功能

在反向代理场景下,安全设置中的HTTP地址显示的还是IP地址,但是实际上是访问不到的,因为默认可能不是使用godnslog服务,希望能改为显示域名

另外反向代理场景下域名重绑定功能不能添加IP

API 返回结果数量和排序问题

API 固定最多输出 DefaultQueryApiMaxItem 20 条结果,且结果为正序排列(老的在前,新的在后),导致数据总量超过 20 条时,除非老数据被自动清除,否则永远也看不到最新记录。

复现方法

生成测试数据:

for (( i=1; i<=100; i=i+1 )); do dig "test${i}.qwerty123456.example.com"; sleep 0.1; done

调用 API 搜索 test,响应无法看到最新数据:

{"message":"OK","code":0,"timestemp":1643031077,"result":[{"domain":"test1.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:33Z"},{"domain":"test2.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:34Z"},{"domain":"test3.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:34Z"},{"domain":"test4.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:34Z"},{"domain":"test5.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:34Z"},{"domain":"test6.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:34Z"},{"domain":"test7.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:34Z"},{"domain":"test8.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:34Z"},{"domain":"test9.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:34Z"},{"domain":"test10.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:35Z"},{"domain":"test11.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:35Z"},{"domain":"test12.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:35Z"},{"domain":"test13.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:35Z"},{"domain":"test14.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:35Z"},{"domain":"test15.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:35Z"},{"domain":"test16.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:35Z"},{"domain":"test17.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:35Z"},{"domain":"test18.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:36Z"},{"domain":"test19.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:36Z"},{"domain":"test20.qwerty123456.example.com","addr":"10.0.0.2","ctime":"2022-01-24T12:52:36Z"}]}

这个 API 目前只能用于针对性地判断特定记录是否存在,无法批量导出数据。

建议:API 响应结果倒序排列;另外建议增加返回结果数量参数,固定 20 条太少了,大批量扫描时容易错过部分记录

注:我使用的是 0.7.0 版本

查询界面功能建议

  1. 显示结果的数量
  2. 增加导出功能(JSON、CSV 等简单的格式就够用了)

注:我使用的是 0.7.0 版本

密码

师傅、搭建完成了,密码在哪里找啊

建议若干

1、支持用户注册,该功能运行在管理界面关闭
2、用户的第一层域名支持手工设置
3、用户的添加、维护,支持api 接口远程维护

4、docker时区问题

Ubuntu
Ubuntu 基础镜像中没有安装了 tzdata 包,因此我们需要先安装 tzdata 包。
我们可以将以下代码添加到 Dockerfile 中。

ENV TZ=Asia/Shanghai \
DEBIAN_FRONTEND=noninteractive

RUN apt update \
&& apt install -y tzdata \
&& ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& rm -rf /var/lib/apt/lists/*

5、查询界面可以给一点友好提醒
看到的ip不是目标的服务器的互联网ip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.