百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
U

ugly-duckling

> 编程语言
开源

Ugly Duckling 是一款专为我们的 Crowdsource 社区设计的轻量级扫描器,用于提交概念验证模块。

186 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Ugly Duckling 是一款专为我们的 Crowdsource 社区设计的轻量级扫描器,用于提交概念验证模块。

ugly-duckling

What It Is

ugly-duckling is a very basic (and currently alpha-quality) vulnerability scanner built by the reasearch team at Detectify. It exists so that members of Detectify Crowdsource can submit proof-of-concept modules in a way that we can test and implement efficiently.

ugly-duckling is not in use internally at Detectify and was built specifically for this purpose.

Why?

Although we have shared one of our internal module formats with our Crowdsource members in the past, it is a complex format with many features that only make sense in an internal Detectify context. We wanted people to be able to develop, test, and run modules in a simple and easy to document format.

We also considered using a pre-existing scanner for this purpose - there are many great scanners our there to choose from after all - but not having control over the module format and available features might make it harder to maintain a tool that translates things to our internal formats.

Contributions

We welcome pull requests that implement bug fixes and minor improvements - we tried to implement only the bare minimum amount of functionality so we probably missed things!

If you have novel modules you would like to submit we recommend you join Detectify Crowdsource to submit them so that you can be rewarded for any hits they may produce.

Building

ugly-duckling is written in Go and has no external dependencies.

You can install it with go get:

▶ go get github.com/detectify/ugly-duckling

Or clone the repository and build it manually:

▶ git clone https://github.com/detectify/ugly-duckling.git
▶ cd ugly-duckling
▶ go install

Usage

ugly-duckling reads URLs on stdin, and takes a list of modules as its arguments (defaulting to ./modules/*.json if none are provided).

A standard invocation to run a single module against a single URL might look like this:

▶ echo https://example.com/ | ugly-duckling modules/test3.json

Or to run against multiple URLs contained in urls.txt:

▶ cat urls.txt | ugly-duckling modules/test.json

Options

  • -c / --concurrency - set the concurrency for HTTP requests (defaults to 1)
  • -v / --verbose - display debug type output (e.g. which modules have been loaded)

Module Format

Here is an example module that demonstrates all functionality in ugly-duckling:

json
{
	"request": {
		"method": "POST",
		"path": "/anything",
		"body": "{\"magicWord\": \"please!\"}",
		"headers": [
			"Content-Type: application/json",
			"Accept: application/json"
		]
	},
	"response": {
		"matchesRequired": 2,
		"matches": [
			{"type": "static", "pattern": "please!", "required": true},
			{"type": "regex", "pattern": "magic\\w"},
			{"type": "status", "code": 200},
			{"type": "header", "name": "Content-Type", "pattern": "application/.*"}
		],
		"mustNotMatch": [
			{"type": "regex", "pattern": "(server error|not found)"}
		]
	}
}

The request and response sections are both required. The minimum possible module has a path in the request section, and at least one thing in the matches list in the response section:

json
{
	"request": {
		"path": "/anything"
	},
	"response": {
		"matches": [
			{"type": "static", "pattern": "data"}
		]
	}
}

Request Section

The request section contains details about the HTTP request to be sent.

  • method - HTTP method to use; GET, POST, HEAD etc
  • path - Path and query string to append to the input URL
  • body - Data to be sent as the request body
  • headers - An array of headers to send with the request

Response Section

The response section contains details about how to check the response for a hit.

  • matchesRequired - How many matches must be made for a module to be considered a 'hit'
  • matches - An array of objects describing the matches to be performed
  • mustNotMatch - An array of objects describing things which must not be matched

Matches

Match objects can have one of a few different types:

  • static - an exact text match is performed using the pattern parameter
  • regex - a regular expression match is performed using the pattern parameter; the regex engine is the default Go engine.
  • status - the status code of the response is compared to the integer in the code parameter
  • header - a regular expression match is performed against the header specied in the name parameter using the pattern specified in the pattern parameter

Any match object in the matches array can have a required parameter set to true so that a match must be met for a module to be considered a hit.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言