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

Review file read/write operations #2284

Open
bcoles opened this issue Jan 24, 2022 · 0 comments
Open

Review file read/write operations #2284

bcoles opened this issue Jan 24, 2022 · 0 comments

Comments

@bcoles
Copy link
Collaborator

bcoles commented Jan 24, 2022

BeEF reads and writes to various files within the BeEF application directory and user's home directory.

Ideally, BeEF should never write to the application directory.

BeEF writes to the user's home directory in only three instances:

# grep -rn "\$home_dir" core/ extensions/ modules/
core/logger.rb:15:      @logger ||= Logger.new("#{$home_dir}/beef.log").tap do |log|
modules/host/get_wireless_keys/module.rb:15:    filename = "#{$home_dir}/exported_wlan_profiles_#{ip}_-_#{timestamp}_#{@datastore['cid']}.xml"
modules/browser/spyder_eye/module.rb:28:      filename = "#{$home_dir}/screenshot_#{ip}_-_#{timestamp}_#{@datastore['cid']}.png"

Review whether some data, if any, should instead be stored in the database.

Investigate a consistent approach and standard practice guidelines for future development.

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

No branches or pull requests

1 participant