Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Oqtane CMS database distribution detection template #11728

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MasoudAbdaal
Copy link

Dear Nuclei Templates Maintainers,

I am submitting a new template designed to detect which database distribution is utilized by an Oqtane CMS instance. This template aims to enhance security assessments by identifying the specific database in use.

Template Details:

  • ID: oqtane-cms-db

  • Name: Oqtane CMS Database - Detect

  • Author: Masoud Abdaal

  • Severity: Info

  • Description: Detects which database distribution the target Oqtane CMS uses.

  • References:

  • Classification:

    • CWE ID: CWE-200
    • CVSS Metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    • CVSS Score: 5.3
  • Metadata:

    • Max-Request: 1
    • Shodan Query: http.title:'Home - Default Site'
    • Product: Oqtane
    • Vendor: Oqtane
  • Tags: detect, tech, api, cms

Detection Logic:

The template sends a GET request to the /api/database endpoint of the target Oqtane CMS instance. It then examines the JSON response to extract the name field of the object where isDefault is set to true. This is achieved using a JSON extractor with the query .[] | select(.isDefault == true) | .name.

Example JSON Response:

[
  {
    "name": "LocalDB",
    "controlType": "Oqtane.Installer.Controls.LocalDBConfig, Oqtane.Client",
    "dbType": "Oqtane.Database.SqlServer.SqlServerDatabase, Oqtane.Database.SqlServer",
    "isDefault": false
  },
  {
    "name": "SQL Server",
    "controlType": "Oqtane.Installer.Controls.SqlServerConfig, Oqtane.Client",
    "dbType": "Oqtane.Database.SqlServer.SqlServerDatabase, Oqtane.Database.SqlServer",
    "isDefault": false
  },
  {
    "name": "SQLite",
    "controlType": "Oqtane.Installer.Controls.SqliteConfig, Oqtane.Client",
    "dbType": "Oqtane.Database.Sqlite.SqliteDatabase, Oqtane.Database.Sqlite",
    "isDefault": false
  },
  {
    "name": "MySQL",
    "controlType": "Oqtane.Installer.Controls.MySQLConfig, Oqtane.Client",
    "dbType": "Oqtane.Database.MySQL.MySQLDatabase, Oqtane.Database.MySQL",
    "isDefault": false
  },
  {
    "name": "PostgreSQL",
    "controlType": "Oqtane.Installer.Controls.PostgreSQLConfig, Oqtane.Client",
    "dbType": "Oqtane.Database.PostgreSQL.PostgreSQLDatabase, Oqtane.Database.PostgreSQL",
    "isDefault": true
  }
]

In this example, the template will identify "PostgreSQL" as the default database.

Impact:

Identifying the database distribution used by an Oqtane CMS instance can assist in tailoring security assessments and understanding potential database-specific vulnerabilities.

Best regards,

Masoud Abdaal

@GeorginaReeder
Copy link

Thanks for your contribution @MasoudAbdaal ! :)

@ritikchaddha ritikchaddha self-assigned this Mar 15, 2025
@ritikchaddha ritikchaddha added the Done Ready to merge label Mar 15, 2025
@ritikchaddha ritikchaddha requested a review from pussycat0x March 15, 2025 05:14
@ritikchaddha ritikchaddha added the good first issue Good for newcomers label Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Done Ready to merge good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants