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 php-8.1.0-dev-backdoor.bcheck #227

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

r3nt0n
Copy link
Contributor

@r3nt0n r3nt0n commented Sep 3, 2024

BCheck Contributions

This Bcheck attempts to detect servers running PHP 8.1.0-dev, which was released with a backdoor allowing Code Injection.

  • BCheck compiles and executes as expected
  • BCheck contains appropriate metadata (name, version, author, description and appropriate tags)
  • Only .bcheck files have been added or modified
  • BCheck is in the appropriate folder
  • PR contains single or limited number of BChecks (Multiple PRs are preferred)
  • BCheck attempts to minimize false positives

Copy link
Collaborator

@PortSwiggerWiener PortSwiggerWiener left a comment

Choose a reason for hiding this comment

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

Many thanks for your submission.

It looks good. Only suggestion would be to check for the fingerprint (1787589) in the base response to eliminate potential false positives.

@r3nt0n
Copy link
Contributor Author

r3nt0n commented Sep 5, 2024

Thanks for the feedback!

The expected output used as a fingerprint includes the "int()" around the number, I thought that the chances to find that specific string were low enough.

Ideally, we would use a loop until find some calculation result which doesn't appear in the base response, and then send the request with the associated payload, but I'm not sure if this could be accomplished with the current Bcheck possibilities.

Maybe increasing the length of the expected output (like 13333337*13333337) could reduce false positives rate to something acceptable?

@PortSwiggerWiener
Copy link
Collaborator

No that's a fair point. I'll approve it now.

Thanks again for the submission.

Copy link
Contributor

@Hannah-PortSwigger Hannah-PortSwigger left a comment

Choose a reason for hiding this comment

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

Looks good! 👍

@Hannah-PortSwigger Hannah-PortSwigger merged commit ea7c0f4 into PortSwigger:main Sep 5, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants