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

Create symfony-default-key-rce #7642

Merged
merged 5 commits into from
Dec 28, 2024

Conversation

S4lt5
Copy link
Contributor

@S4lt5 S4lt5 commented Jul 7, 2023

Add check for common symfony default key for easy unauthenticated RCE

Template / PR Information

When investigating https://github.com/projectdiscovery/nuclei-templates/blob/main/http/misconfiguration/symfony-fragment.yaml I found a bunch of hits in the wild. Using the walkthrough, I was able to identify a lot of sites, in the wild, using the default symfony key. RCE was really trivial and there really isn't a CVE here I don't think.

I created this template to catch the lowest hanging fruit. There are some other defaults coverd in the primary reference in the template, but I'm not sure how many extra requests are worth sending out on a 'critical' scan.

There may be a case to add the following keys and make this a multiple 'step 2' set of requests:

  • ff6dc61a329dc96652bb092ec58981f7
  • ThisEzPlatformTokenIsNotSoSecret_PleaseChangeIt
  • and some others from the git POC

That said, this covers what was overwhelmingly most common in my experience, the old default "changeme" symfony key.

  • References:

Template Validation

I've validated this template locally?

  • YES
  • NO

S4lt5 added 2 commits July 7, 2023 13:42
Add check for common symfony default key for easy RCE
Fix janky formatting from linter
@pussycat0x pussycat0x added the Status: In Progress This issue is being worked on, and has someone assigned. label Jul 17, 2023
Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

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

@S4lt5 thanks! I've improved the template to cover additonal secret key with conditional flow execution.

$ nuclei -t http/misconfiguration/symfony/symfony-default-key-rce.yaml -u http://REDACTED

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.3.7

		projectdiscovery.io

[INF] Current nuclei version: v3.3.7 (latest)
[INF] Current nuclei-templates version: v10.1.1 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 154
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[symfony-rce] [http] [critical] http://REDACTED/_fragment?_path=what%3D-1%26_controller%3Dphpinfo&_hash=Aiv3yak1oWJTGf1Dr1ibZstkhLATjp%2BoxULrAcmP%2Fl0%3D [secretkey="ThisTokenIsNotSoSecretChangeIt"]

@ehsandeep ehsandeep removed the Status: In Progress This issue is being worked on, and has someone assigned. label Dec 28, 2024
@ehsandeep ehsandeep merged commit 603677d into projectdiscovery:main Dec 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants