#1# Copyright (c) 2006-2025 Wade Alcorn - [email protected]2# Browser Exploitation Framework (BeEF) - https://beefproject.com3# See the file 'doc/COPYING' for copying permission4#5# BeEF Configuration file67beef:8version: '0.5.1.0'9# More verbose messages (server-side)10debug: false11# More verbose messages (client-side)12client_debug: false13# Used for generating secure tokens14crypto_default_value_length: 801516# Credentials to authenticate in BeEF.17# Used by both the RESTful API and the Admin interface18credentials:19user: "beef"20passwd: "beef"2122# Interface / IP restrictions23restrictions:24# subnet of IP addresses that can hook to the framework25permitted_hooking_subnet: ["0.0.0.0/0", "::/0"]26# subnet of IP addresses that can connect to the admin UI27#permitted_ui_subnet: ["127.0.0.1/32", "::1/128"]28permitted_ui_subnet: ["0.0.0.0/0", "::/0"]29# subnet of IP addresses that cannot be hooked by the framework30excluded_hooking_subnet: []31# slow API calls to 1 every api_attempt_delay seconds32api_attempt_delay: "0.05"3334# HTTP server35http:36debug: false #Thin::Logging.debug, very verbose. Prints also full exception stack trace.37host: "0.0.0.0"38port: "3000"3940# Decrease this setting to 1,000 (ms) if you want more responsiveness41# when sending modules and retrieving results.42# NOTE: A poll timeout of less than 5,000 (ms) might impact performance43# when hooking lots of browsers (50+).44# Enabling WebSockets is generally better (beef.websocket.enable)45xhr_poll_timeout: 10004647# Host Name / Domain Name48# If you want BeEF to be accessible via hostname or domain name (ie, DynDNS),49# set the public hostname below:50#public: "" # public hostname/IP address5152# Reverse Proxy / NAT53# If you want BeEF to be accessible behind a reverse proxy or NAT,54# set both the publicly accessible hostname/IP address and port below:55# NOTE: Allowing the reverse proxy will enable a vulnerability where the ui/panel can be spoofed56# by altering the X-FORWARDED-FOR ip address in the request header.57allow_reverse_proxy: false58#public: "example" # public hostname/IP address59#public_port: "" # public port (experimental)6061# Hook62hook_file: "/hook.js"63hook_session_name: "BEEFHOOK"6465# Allow one or multiple origins to access the RESTful API using CORS66# For multiple origins use: "http://browserhacker.com, http://domain2.com"67restful_api:68allow_cors: false69cors_allowed_domains: "http://browserhacker.com"7071# Prefer WebSockets over XHR-polling when possible.72websocket:73enable: false74port: 61985 # WS: good success rate through proxies75# Use encrypted 'WebSocketSecure'76# NOTE: works only on HTTPS domains and with HTTPS support enabled in BeEF77secure: true78secure_port: 61986 # WSSecure79ws_poll_timeout: 5000 # poll BeEF every x second, this affects how often the browser can have a command execute on it80ws_connect_timeout: 500 # useful to help fingerprinting finish before establishing the WS channel8182# Imitate a specified web server (default root page, 404 default error page, 'Server' HTTP response header)83web_server_imitation:84enable: true85type: "apache" # Supported: apache, iis, nginx86hook_404: false # inject BeEF hook in HTTP 404 responses87hook_root: false # inject BeEF hook in the server home page88# Experimental HTTPS support for the hook / admin / all other Thin managed web services89https:90enable: false91# Enabled this config setting if you're external facing uri is using https92public_enabled: false93# In production environments, be sure to use a valid certificate signed for the value94# used in beef.http.public (the domain name of the server where you run BeEF)95key: "beef_key.pem"96cert: "beef_cert.pem"9798database:99file: "beef.db"100101# Autorun Rule Engine102autorun:103# this is used when rule chain_mode type is nested-forward, needed as command results are checked via setInterval104# to ensure that we can wait for async command results. The timeout is needed to prevent infinite loops or eventually105# continue execution regardless of results.106# If you're chaining multiple async modules, and you expect them to complete in more than 5 seconds, increase the timeout.107result_poll_interval: 300108result_poll_timeout: 5000109110# If the modules doesn't return status/results and timeout exceeded, continue anyway with the chain.111# This is useful to call modules (nested-forward chain mode) that are not returning their status/results.112continue_after_timeout: true113114# Enables DNS lookups on zombie IP addresses115dns_hostname_lookup: false116117# IP Geolocation118# NOTE: requires MaxMind database. Run ./updated-geoipdb to install.119geoip:120enable: true121database: '/opt/GeoIP/GeoLite2-City.mmdb'122123# You may override default extension configuration parameters here124# Note: additional experimental extensions are available in the 'extensions' directory125# and can be enabled via their respective 'config.yaml' file126extension:127admin_ui:128enable: true129base_path: "/ui"130demos:131enable: true132events:133enable: true134evasion:135enable: false136requester:137enable: true138proxy:139enable: true140network:141enable: true142metasploit:143enable: false144social_engineering:145enable: true146xssrays:147enable: true148149150