Skip to content

Conversation

@kaitozaw
Copy link
Collaborator

Pull Request

Category

Bug

Feature/Issue Description

Q: Please give a brief summary of your feature/fix
A: This PR fixes a TLS initialisation failure in the Docker-based setup, where BeEF crashes with an EventMachine “Encryption not available” error.

Q: Give a technical rundown of what you have changed (if applicable)
A:
The root cause was that EventMachine was being built without SSL/TLS support inside the Docker image because OpenSSL development headers were missing at build time. Since bundle install is executed in the Docker builder stage, EventMachine’s native extension was compiled without TLS support.

This PR adds libssl-dev to the Docker builder stage so EventMachine is built with SSL/TLS support.
In addition, libssl-dev has been removed from the final runtime stage, as it is only required at build time and not needed once the native extension is compiled.

After these changes, BeEF starts correctly with HTTPS enabled and no longer raises the TLS-related runtime error.

@kaitozaw kaitozaw temporarily deployed to Integrate Pull Request December 19, 2025 00:14 — with GitHub Actions Inactive
@kaitozaw kaitozaw changed the title Fixes issue #3468 Fixes #3468 Dec 19, 2025
@kaitozaw kaitozaw changed the title Fixes #3468 Fixes issue #3468 Dec 19, 2025
@kaitozaw kaitozaw changed the title Fixes issue #3468 Fixes issue/TLS-init-failing (#3468) Dec 22, 2025
@kaitozaw kaitozaw force-pushed the issue/3468-TLS-init-failing branch from 681be9c to 447f095 Compare December 22, 2025 04:55
@kaitozaw kaitozaw temporarily deployed to Integrate Pull Request December 22, 2025 04:56 — with GitHub Actions Inactive
@zinduolis zinduolis temporarily deployed to Integrate Pull Request December 23, 2025 06:55 — with GitHub Actions Inactive
@zinduolis
Copy link
Contributor

zinduolis commented Dec 23, 2025

PR Review Summary: Fixes TLS Init Failing in Docker (#3470)

I have successfully verified this PR in a Docker environment.

Testing Steps Performed:

  1. Environment: Docker container build based on the current PR branch.
  2. Setup: Generated certificates for localhost via bundle exec rake ssl:replace.
  3. Configuration: Enabled HTTPS in config.yaml and set non-default credentials.
  4. Verification: Rebuilt and ran the container, confirming success on HTTPS.

Results:

  • Success: BeEF starts without the EventMachine "Encryption not available" error.
  • Success: Admin UI is accessible over HTTPS.
  • Stability: Non-HTTPS startup remains unaffected and works correctly.

The change correctly addresses the root cause by providing the necessary build-time dependencies.

Verdict: Approved.

@zinduolis zinduolis self-requested a review December 23, 2025 06:56
@zinduolis zinduolis merged commit e8a767d into beefproject:master Dec 23, 2025
5 checks passed
@kaitozaw kaitozaw deleted the issue/3468-TLS-init-failing branch December 23, 2025 07:03
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.

2 participants