
Шаблоны Nuclei Community edition — простой инструмент, позволяющий упорядочить все шаблоны Nuclei, предлагаемые сообществом, в одном месте.

Community edition шаблонов Nuclei — это простой инструмент, позволяющий собрать в одном месте все шаблоны Nuclei, предлагаемые сообществом.
go install -v github.com/xm1k3/cent/v2@latest
после установки выполните cent init, чтобы инициализировать cent с файлами конфигурации, которые вы найдёте здесь
Flags:
--config string config file (default is .config/cent/.cent.yaml)
-r, --by-repo Group templates by repository (use with -k)
-C, --console Print console output
-k, --keep-folders Keep templates organized in folders by category
-p, --path string Root path to save the templates (default "cent-nuclei-templates")
-t, --threads int Number of threads to use when cloning repositories (default 10)
-T, --timeout int Timeout in minutes for each git clone (default 2)
cent -h
cent check -h
cent init -h
cent update -h
cent summary -h
cent validate -h
cent version
Клонирует и помещает все шаблоны сообщества в папку cent-nuclei-templates
cent -p cent-nuclei-templates
Пример вывода:
cent started
[CLONED] https://github.com/projectdiscovery/nuclei-templates
[CLONED] https://github.com/0xSojalSec/nuclei-templates-4
[CLONED] https://github.com/0xPugazh/my-nuclei-templates
[CLONED] https://github.com/0xSojalSec/my-nuclei-templates-1
[CLONED] https://github.com/0x727/ObserverWard
[CLONED] https://github.com/0xAwali/Blind-SSRF
[CLONED] https://github.com/0x727/ObserverWard_0x727
[CLONED] https://github.com/0xAwali/Virtual-Host
[CLONED] https://github.com/0xSojalSec/Nuclei-Templates-API-Linkfinder
...
...
...
cent finished, you can find all your nuclei-templates in cent-nuclei-templates
Используйте флаг -k, чтобы сохранить внутреннюю структуру папок каждого репозитория:
cent -p cent-nuclei-templates -k
Это создаст структуру папок, например:
cent-nuclei-templates/
cves/
CVE-2021-1234.yaml
vulnerabilities/
template.yaml
others/
uncategorized-template.yaml
Шаблоны, не имеющие подпапки в исходном репозитории, помещаются в others/.
Используйте -k -r, чтобы также группировать шаблоны по их исходному репозиторию:
cent -p cent-nuclei-templates -k -r
cent-nuclei-templates/
projectdiscovery/nuclei-templates/
cves/
CVE-2021-1234.yaml
vulnerabilities/
template.yaml
user/repo-name/
others/
custom-template.yaml
Команда summary предоставляет подробную статистику по вашей коллекции шаблонов Nuclei:
# Display summary in table format
cent summary
# Display summary in JSON format
cent summary --json
# Limit number of tags displayed (default: 25)
cent summary --limit 10
# Search for specific data in summary
cent summary --search cve
cent summary --search wordpress
cent summary --search critical
# Update summary data
cent summary update
# Update with custom path
cent summary update -p /path/to/templates
=== NUCLEI TEMPLATES SUMMARY ===
+-------------------+-------+
| METRIC | COUNT |
+-------------------+-------+
| Total Templates | 3249 |
| CVE Templates | 3821 |
| Invalid Templates | 1 |
| Valid Templates | 3248 |
+-------------------+-------+
=== SEVERITY DISTRIBUTION ===
+----------+-------+
| SEVERITY | COUNT |
+----------+-------+
| CRITICAL | 582 |
| HIGH | 877 |
| MEDIUM | 877 |
| LOW | 63 |
| INFO | 744 |
+----------+-------+
=== TOP TAGS ===
+---------------+-------+
| TAG | COUNT |
+---------------+-------+
| cve | 1909 |
| xss | 569 |
| wordpress | 487 |
| lfi | 459 |
| wp-plugin | 450 |
+---------------+-------+
{
"metrics": {
"total_templates": 3249,
"cve_templates": 3821,
"invalid_templates": 1,
"valid_templates": 3248
},
"severity_distribution": {
"CRITICAL": 582,
"HIGH": 877,
"MEDIUM": 877,
"LOW": 63,
"INFO": 744
},
"tags": {
"cve": 1909,
"xss": 569,
"wordpress": 487
},
"last_updated": "2024-01-15 14:30:25"
}
Если вы обновили файл cent.yaml, добавив новые папки
exclude-dirs:
- ...
- dns
- ...
просто выполните:
cent update -p cent-nuclei-templates -d
и cent автоматически удалит все папки dns, присутствующие в cent-nuclei-templates, без клонирования всех репозиториев GitHub.
Пример вывода:
[D][-] Dir removed cent-nuclei-templates/dns
[D][-] Dir removed cent-nuclei-templates/dns/subdomain
То же самое касается exclude-files
cent update -p cent-nuclei-templates -f
# Initialize with default configuration
cent init
# Initialize with custom URL
cent init --url https://example.com/config.yaml
# Overwrite existing configuration
cent init --overwrite
# Check if configuration file exists
cent init check
# Check if all template repositories are accessible
cent check
# Remove inaccessible repositories from config
cent check --remove
После того как cent настроен правильно, вы можете выполнить сканирование с помощью Nuclei.
Пример
nuclei -u https://example.com -t ./cent-nuclei-templates -tags cve
nuclei -l urls.txt -t ./cent-nuclei-templates -tags cve
Более подробную документацию о Nuclei см. здесь
Вам необходимо настроить параметры cent в файле .config/cent/.cent.yaml
# Directories to exclude
exclude-dirs:
- .git
# Files to exclude
exclude-files:
- README.md
- .gitignore
- .pre-commit-config.yaml
- LICENSE
# Add github urls (simple format)
community-templates:
- https://github.com/projectdiscovery/nuclei-templates
- https://github.com/other/repo
# Extended format: pin a repo to a specific commit
- url: https://github.com/user/repo
commit: abc123f
# Extended format: per-repo exclude
- url: https://github.com/user/repo2
exclude:
- "workflows/"
- "fuzzing/"
Оба формата можно смешивать в одном файле конфигурации. Если указан commit, cent клонирует полный репозиторий и переключится на указанный коммит вместо использования мелкого клонирования. exclude для конкретного репозитория отфильтровывает соответствующие пути из этого репозитория.
Отказ от ответственности: разработчик этого инструмента не несёт ответственности за то, как сообщество использует собранные в нём шаблоны с открытым исходным кодом. Эти шаблоны не были проверены Project Discovery и предоставляются как есть.
Cent распространяется под лицензией Apache-2.0.
| Command | Description |
|---|
| check | Проверяет, доступны ли репозитории шаблонов |
| init | Инициализация файла конфигурации Cent |
| summary | Выводит подробную сводку по шаблонам Nuclei |
| update | Обновляет ваш репозиторий |
| validate | Проверяет шаблоны; если шаблон недействителен, он удаляется из папки |
| version | Выводит версию Cent |