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

ARE REST API cannot find AutorunEngine Models #2019

Closed
Squigilum opened this issue Nov 23, 2020 · 1 comment · Fixed by #2785
Closed

ARE REST API cannot find AutorunEngine Models #2019

Squigilum opened this issue Nov 23, 2020 · 1 comment · Fixed by #2785

Comments

@Squigilum
Copy link

Squigilum commented Nov 23, 2020

Submit Issue

Summary

Q: Please provide a brief summary of the issue that you experienced.
A: The REST API for the ARE does not work for listing or deleting rules. It will return failure due to an exception in the ARE.

Environment

Please identify the environment in which your issue occurred.

  1. BeEF Version: 0.5.0.0

  2. Ruby Version: 2.5.1p57

  3. Browser Details (e.g. Chrome v81.0): Can be observed with curl 7.68.0

  4. Operating System (e.g. OSX Catalina): Ubuntu 18.04

Configuration

Q: Have you made any changes to your BeEF configuration?
A: No

Q: Have you enabled or disabled any BeEF extensions?
A: No

Expected vs. Actual Behaviour

Expected Behaviour:
The REST API for the ARE allows listing of rules by ID (or all) and deletion of rules

Actual Behaviour:
The REST API returns failure, and an error is logged to the BeEF terminal window

Steps to Reproduce

Please provide steps to reproduce this issue.

  1. Ensure there is at least one rule in the arerules/enabled folder and start BeEF
  2. Attempt to list rules using the ARE REST API (can do via curl http://<BeEF IP>:3000/api/autorun/rule/list/all?token=<token>)
  3. The REST call will fail, and the error [!] [ARE] ERROR: uninitialized constant BeEF::Core::AutorunEngine::Models will be seen in the BeEF terminal window.

Additional Information

This issue was introduced in commit 0574bdf, which moved the models folder out of core/main/autorun_engine but did not update the REST API.

See pull request #2020 for a fix for this issue

@TEag1e
Copy link

TEag1e commented Nov 24, 2020

I had the same experience.

Browser Exploitation Framework (BeEF) 0.5.0.0-alpha-pre

图片

curl http://x.x.x.x:3000/api/autorun/rule/list/all?token=xyz

图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants