Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
alterx — 基于DSL的快速可定制子域名字典生成器 | Kitploit
工具/GitHubGitHub/projectdiscovery/alterx
侦察DNS和子域名枚举信息收集渗透测试实用工具与框架子域名枚举
GitHubprojectdiscovery/alterx

alterx

基于DSL的快速可定制子域名字典生成器

查看仓库
98979651天前Kitploit 审核通过
分享

AlterX

功能特性 • 安装 • 用法 • 运行 AlterX • 加入 Discord


   使用 DSL 的快速且可自定义的子域名字典生成器。

image

功能特性

  • 快速且可自定义
  • 自动词汇扩充
  • 预定义变量
  • 可配置模式
  • 模式挖掘 - 自动发现子域名模式(Regulator 的 Go 移植版)
  • STDIN / 列表输入
  • 多种运行模式(默认、发现、两者兼有)

安装

要安装 alterx,你需要在系统上安装 Golang 1.26.10。你可以从这里下载 Golang。安装 Golang 后,你可以使用以下命令安装 alterx:

go install github.com/projectdiscovery/alterx/cmd/alterx@latest

从源码构建

# Clone the repository
git clone https://github.com/projectdiscovery/alterx.git
cd alterx

# Build using Makefile
make build

# Or build manually
go build ./cmd/alterx

可用的 Makefile 目标:

make help          # Show all available targets
make build         # Build the binary
make test          # Run tests
make test-coverage # Run tests with coverage
make lint          # Run linter
make fmt           # Format code
make clean         # Clean build artifacts
make install       # Install to $GOPATH/bin

帮助菜单

你可以使用以下命令查看可用的标志和选项:

Fast and customizable subdomain wordlist generator using DSL.

Usage:
  ./alterx [flags]

Flags:
INPUT:
   -l, -list string[]     subdomains to use when creating permutations (stdin, comma-separated, file)
   -p, -pattern string[]  custom permutation patterns input to generate (comma-seperated, file)
   -pp, -payload value    custom payload pattern input to replace/use in key=value format (-pp 'word=words.txt')

OUTPUT:
   -es, -estimate      estimate permutation count without generating payloads
   -o, -output string  output file to write altered subdomain list
   -ms, -max-size int  Max export data size (kb, mb, gb, tb) (default mb)
   -v, -verbose        display verbose output
   -silent             display results only
   -version            display alterx version

CONFIG:
   -config string  alterx cli config file (default '$HOME/.config/alterx/config.yaml')
   -en, -enrich    enrich wordlist by extracting words from input
   -ac string      alterx permutation config file (default '$HOME/.config/alterx/permutation_v0.0.1.yaml')
   -limit int      limit the number of results to return (default 0)

UPDATE:
   -up, -update                 update alterx to latest version
   -duc, -disable-update-check  disable automatic alterx update check

为什么选择 alterx ??

alterx 与其他子域排列工具(如 goaltdns)的不同之处在于它的 脚本化 功能。alterx 将模式作为输入,并基于该模式生成子域排列字典,类似于 nuclei 使用 fuzzing-templates 所做的工作。

主动子域枚举 之所以困难,在于找到一个实际存在的域名的概率。如果将发现可能子域的过程表示在一个刻度上,它应该看起来像这样

   Using Wordlist < generate permutations with subdomains (goaltdns) < alterx

几乎所有流行的子域名排列工具都使用硬编码模式,当运行这类工具时,它们会生成包含数百万个子域名的字典,这降低了使用 dnsx 等工具对其进行暴力破解的可行性。子域名命名并没有实际的约定,通常取决于注册子域名的人。使用 alterx 可以基于 passive subdomain enumeration(被动子域名枚举)的结果创建模式,这提高了发现子域名的概率以及对其进行暴力破解的可行性。

变量

alterx 使用类似于 nuclei-templates 的变量式语法。可以使用这些变量编写自己的模式。当域名作为输入传入时,alterx 会评估输入并从中提取变量。

基础 / 常用变量

{{sub}}     :  subdomain prefix or left most part of a subdomain
{{suffix}}  :  everything except {{sub}} in subdomain name is suffix
{{tld}}     :  top level domain name (ex com,uk,in etc)
{{etld}}    :  also know as public suffix (ex co.uk , gov.in etc)
变量api.scanme.shadmin.dev.scanme.shcloud.scanme.co.uk
{{sub}}apiadmincloud
{{suffix}}scanme.shdev.scanme.shscanme.co.uk
{{tld}}shshuk
{{etld}}--co.uk

高级变量

{{sld}}  :   second-level domain  (ex for api.scanme.sh => {{sld}} is scanme)
{{root}}  :  also known as eTLD+1 i.e only root domain (ex for api.scanme.sh => {{root}} is scanme.sh)
{{subN}}  :  here N is an integer (ex {{sub1}} , {{sub2}} etc) .

// {{subN}} is advanced variable which exists depending on input
// lets say there is a multi level domain cloud.nuclei.scanme.sh
// in this case {{sub}} = cloud and {{sub1}} = nuclei`
变量api.scanme.shadmin.dev.scanme.shcloud.scanme.co.uk
{{sld}}scanmescanmescanme
{{root}}scanme.shscanme.shscanme.co.uk
{{sub1}}-dev-
{{sub2}}---

模式

简单来说,模式可以被视为 template(模板),它描述了 alterx 应该生成哪些类型的模式。

// Below are some of example patterns which can be used to generate permutations
// assuming api.scanme.sh was given as input and variable {{word}} was given as input with only one value prod
// alterx generates subdomains for below patterns

"{{sub}}-{{word}}.{{suffix}}" // ex: api-prod.scanme.sh
"{{word}}-{{sub}}.{{suffix}}" // ex: prod-api.scanme.sh
"{{word}}.{{sub}}.{{suffix}}" // ex: prod.api.scanme.sh
"{{sub}}.{{word}}.{{suffix}}" // ex: api.prod.scanme.sh

以下是一个示例模式配置文件 - https://github.com/projectdiscovery/alterx/blob/main/permutations.yaml,可根据需要轻松自定义。

该配置文件使用可自定义的模式和动态载荷,为安全评估或渗透测试生成子域排列。模式包括基于短横线的、基于点的以及其他类型。用户可以创建自定义载荷部分,例如单词、区域标识符或数字,以满足其特定需求。

例如,用户可以定义一个新的载荷部分 env,其值为 prod 和 dev,然后在诸如 {{env}}-{{word}}.{{suffix}} 的模式中使用它,以生成类似 prod-app.example.com 和 dev-api.example.com 的子域。这种灵活性允许为独特的测试场景和目标环境定制子域列表。

用于生成的默认模式配置文件存储在 $HOME/.config/alterx/ 目录中,也可以使用 -ac 选项使用自定义配置文件。

示例

在 tesla.com 的现有被动子域列表上运行 alterx 的一个示例,为我们产生了使用 dnsx 解析的 10 个额外的新 且 有效的子域。

$ chaos -d tesla.com | alterx | dnsx



   ___   ____          _  __
  / _ | / / /____ ____| |/_/
 / __ |/ / __/ -_) __/>  <
/_/ |_/_/\__/\__/_/ /_/|_|

      projectdiscovery.io

[INF] Generated 8312 permutations in 0.0740s
auth-global-stage.tesla.com
auth-stage.tesla.com
digitalassets-stage.tesla.com
errlog-stage.tesla.com
kronos-dev.tesla.com
mfa-stage.tesla.com
paymentrecon-stage.tesla.com
sso-dev.tesla.com
shop-stage.tesla.com
www-uat-dev.tesla.com

类似地,-enrich 选项可用于将已知子域填充为 world 输入,以生成目标感知排列。

$ chaos -d tesla.com | alterx -enrich

   ___   ____          _  __
  / _ | / / /____ ____| |/_/
 / __ |/ / __/ -_) __/>  <
/_/ |_/_/\__/\__/_/ /_/|_|

      projectdiscovery.io

[INF] Generated 662010 permutations in 3.9989s

你可以在运行时使用 -pattern CLI 选项更改默认模式。

$ chaos -d tesla.com | alterx -enrich -p '{{word}}-{{suffix}}'

   ___   ____          _  __
  / _ | / / /____ ____| |/_/
 / __ |/ / __/ -_) __/>  <
/_/ |_/_/\__/\__/_/ /_/|_|

      projectdiscovery.io
下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    772
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    505
  • 3

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    420
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    345
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    260
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    251

探索所有工具

浏览我们的工具集合

查看所有工具 →