beefproject / beef

The Browser Exploitation Framework Project
https://beefproject.com
9.82k stars 2.18k forks source link

The UI management page does not display the hook IP host #1750

Closed zqhwsy123 closed 3 years ago

zqhwsy123 commented 5 years ago

Zombie hosts can access hook subpages properly .User can be hooked and UI pages also have log, but do not display online hosts, making it impossible to use the beef module

bcoles commented 5 years ago

I have no idea what you're asking, but maybe this will help:

https://github.com/beefproject/beef/wiki/Configuration

zqhwsy123 commented 5 years ago

image

zqhwsy123 commented 5 years ago

image I used another ip to access the hook page, which is also recorded here, but the online Browsers is not displayed. Version 4.7.0 can be displayed normally

zqhwsy123 commented 5 years ago

image This is a browser that I use version 4.7.0 to display properly.

bcoles commented 5 years ago

The format of the configuration file changed between 0.4.7.x and 0.4.7.4.

You must use an array [].

< 0.4.7.3

    restrictions:
        # subnet of IP addresses that can hook to the framework
        permitted_hooking_subnet: "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"

0.4.7.3+

    restrictions:
        # subnet of IP addresses that can hook to the framework
        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", "::1/128"]
        permitted_ui_subnet: ["0.0.0.0/0", "::/0"]
zqhwsy123 commented 5 years ago

The 4.7.3 default configuration I use is just a change to the server IP address, not to what you said.

zqhwsy123 commented 5 years ago

image

zqhwsy123 commented 5 years ago

In version 4.7.3 ,I can access "http://192.168.1.8:3000/demos/basic.html" normally, but the "online browser" option of http://192.168.1.8:3000/ui/panel does not display the host that has been blocked.

bcoles commented 5 years ago

What version are you using?

Are you using an non-default configuration? Have you changed any other configuration options?

Are you getting any errors in the web browser console?

What terminal output do you get with beef.debug: true and beef.http.debug: true ?

zqhwsy123 commented 5 years ago

I upgraded to version 4.7.3 with apt install beef-xss on kali. The configuration has only changed the http server address and credentials, and the rest of the configuration has not changed.

zqhwsy123 commented 5 years ago

root@kali:/usr/share/beef-xss# vim config.yaml root@kali:/usr/share/beef-xss# ./beef [17:12:41][] Browser Exploitation Framework (BeEF) 0.4.7.3-alpha [17:12:41] | Twit: @beefproject [17:12:41] | Site: https://beefproject.com [17:12:41] | Blog: http://blog.beefproject.com [17:12:41] |_ Wiki: https://github.com/beefproject/beef/wiki [17:12:41][] Project Creator: Wade Alcorn (@WadeAlcorn) [17:12:41][>] Loaded extension: 'proxy' [17:12:41][>] Loaded extension: 'xssrays' [17:12:41][>] Loaded extension: 'social_engineering' [17:12:41][>] Loaded extension: 'demos' [17:12:41][>] Loaded extension: 'admin_ui' [17:12:41][>] Loaded extension: 'network' [17:12:41][>] Loaded extension: 'events' [17:12:41][>] Loaded extension: 'requester' [17:12:41][>] Soft Load module: 'test_beef_debug' [17:12:41][>] Soft Load module: 'test_return_image' [17:12:41][>] Soft Load module: 'test_dns_tunnel_client' [17:12:41][>] Soft Load module: 'test_cors_request' [17:12:41][>] Soft Load module: 'test_return_long_string' [17:12:41][>] Soft Load module: 'test_network_request' [17:12:41][>] Soft Load module: 'test_http_redirect' [17:12:41][>] Soft Load module: 'test_return_ascii_chars' [17:12:41][>] Soft Load module: 'etag_client' [17:12:41][>] Soft Load module: 'inter_protocol_irc' [17:12:41][>] Soft Load module: 'inter_protocol_redis' [17:12:41][>] Soft Load module: 'inter_protocol_win_bindshell' [17:12:41][>] Soft Load module: 'cross_site_faxing' [17:12:41][>] Soft Load module: 's2c_dns_tunnel' [17:12:41][>] Soft Load module: 'inter_protocol_posix_bindshell' [17:12:41][>] Soft Load module: 'inter_protocol_imap' [17:12:41][>] Soft Load module: 'cross_site_printing' [17:12:41][>] Soft Load module: 'pfsense_reverse_root_shell_csrf' [17:12:41][>] Soft Load module: 'pfsense_2_3_2_reverse_root_shell_csrf' [17:12:41][>] Soft Load module: 'extract_cmd_exec' [17:12:41][>] Soft Load module: 'jenkins_groovy_code_exec' [17:12:41][>] Soft Load module: 'jboss_jmx_upload_exploit' [17:12:41][>] Soft Load module: 'resource_exhaustion_dos' [17:12:41][>] Soft Load module: 'ntfscommoncreate_dos' [17:12:41][>] Soft Load module: 'zenoss_add_user_csrf' [17:12:41][>] Soft Load module: 'zeroshell_2_0rc2_reverse_shell_csrf_sop' [17:12:41][>] Soft Load module: 'zeroshell_2_0rc2_admin_dynamic_token' [17:12:41][>] Soft Load module: 'zeroshell_2_0rc2_admin_password' [17:12:41][>] Soft Load module: 'zeroshell_2_0rc2_migrate_hook' [17:12:41][>] Soft Load module: 'zeroshell_2_0rc2_scanner' [17:12:41][>] Soft Load module: 'zeroshell_2_0rc2_reverse_shell_csrf_sop_bypass' [17:12:41][>] Soft Load module: 'zeroshell_2_0rc2_file_disclosure' [17:12:41][>] Soft Load module: 'zeroshell_2_0rc2_admin_static_token' [17:12:41][>] Soft Load module: 'coldfusion_dir_traversal_exploit' [17:12:41][>] Soft Load module: 'spring_framework_malicious_jar' [17:12:41][>] Soft Load module: 'Netgear_gs108t_csrf' [17:12:41][>] Soft Load module: 'Dlink_dgs_1100_port_mirroring_csrf' [17:12:41][>] Soft Load module: 'Dlink_dgs_1100_device_reset_csrf' [17:12:41][>] Soft Load module: 'Dlink_dgs_1100_fdb_whitelist_csrf' [17:12:41][>] Soft Load module: 'cisco_collaboration_server_5_xss' [17:12:41][>] Soft Load module: 'alienvault_ossim_3_1_xss' [17:12:41][>] Soft Load module: 'serendipity_1_6_xss' [17:12:41][>] Soft Load module: 'sqlitemanager_xss' [17:12:41][>] Soft Load module: 'vtiger_crm_upload_exploit' [17:12:41][>] Soft Load module: 'wanem_command_execution' [17:12:41][>] Soft Load module: 'skype_xss' [17:12:41][>] Soft Load module: 'apache_cookies' [17:12:41][>] Soft Load module: 'apache_felix_remote_shell' [17:12:41][>] Soft Load module: 'glassfish_war_upload_xsrf' [17:12:41][>] Soft Load module: 'hp_ucmdb_add_user_csrf' [17:12:41][>] Soft Load module: 'Wordpress_add_admin' [17:12:41][>] Soft Load module: 'firephp_code_exec' [17:12:41][>] Soft Load module: 'kemp_command_execution' [17:12:41][>] Soft Load module: 'airlive_add_user_csrf' [17:12:41][>] Soft Load module: 'Dlink_dcs_series_csrf' [17:12:41][>] Soft Load module: 'linksys_wvc_wireless_camera_csrf' [17:12:41][>] Soft Load module: 'dlink_sharecenter_cmd_exec' [17:12:41][>] Soft Load module: 'freenas_reverse_root_shell_csrf' [17:12:41][>] Soft Load module: 'shell_shock_scanner' [17:12:41][>] Soft Load module: 'farsite_X25_remote_shell' [17:12:41][>] Soft Load module: 'BeEF_bind_shell' [17:12:41][>] Soft Load module: 'Eudora_mail_beef_bind' [17:12:41][>] Soft Load module: 'Active_fax_beef_bind' [17:12:41][>] Soft Load module: 'ruby_nntpd_cmd_exec' [17:12:41][>] Soft Load module: 'rfi_scanner' [17:12:41][>] Soft Load module: 'php_dos' [17:12:41][>] Soft Load module: 'monowall_reverse_root_shell_csrf' [17:12:41][>] Soft Load module: 'Shell_shocked' [17:12:41][>] Soft Load module: 'asus_rt_n12e_get_info' [17:12:41][>] Soft Load module: 'asus_dslx11_dns_hijack' [17:12:41][>] Soft Load module: 'Huawei_smartax_mt880_csrf' [17:12:41][>] Soft Load module: 'wipg1000_cmd_injection' [17:12:41][>] Soft Load module: 'philips_dns_hijack' [17:12:41][>] Soft Load module: 'actiontec_q1000_csrf' [17:12:41][>] Soft Load module: 'ddwrt_v24_sp1_cmd_exec' [17:12:41][>] Soft Load module: 'iball_baton_ib_wra150n_dns_hijack' [17:12:41][>] Soft Load module: 'utstarcom_wa3002g4_dns_hijack' [17:12:41][>] Soft Load module: 'netgear_dgn2200_cmd_exec' [17:12:41][>] Soft Load module: 'linksys_e2500_dns_hijack' [17:12:41][>] Soft Load module: 'cisco_e2400_csrf' [17:12:41][>] Soft Load module: 'Netgear_dgn_2000_wan_mgmt_csrf' [17:12:41][>] Soft Load module: 'linksys_befsr41_csrf' [17:12:41][>] Soft Load module: 'asus_rt_n66u_cmd_exec' [17:12:41][>] Soft Load module: 'dlink_dsl500t_csrf' [17:12:41][>] Soft Load module: 'planet_vdr300nu_adsl_dns_hijack' [17:12:41][>] Soft Load module: 'linksys_wrt54g2_csrf' [17:12:41][>] Soft Load module: 'linksys_wrt54g_csrf' [17:12:41][>] Soft Load module: 'bt_home_hub_csrf' [17:12:41][>] Soft Load module: 'argw4_adsl_dns_hijack' [17:12:41][>] Soft Load module: 'inteno_eg101r1_voip_dns_hijack' [17:12:41][>] Soft Load module: 'telstra_zte_mf91_change_pw' [17:12:41][>] Soft Load module: 'shuttle_tech_915wm_dns_hijack' [17:12:41][>] Soft Load module: 'dlink_2640b_dns_hijack' [17:12:41][>] Soft Load module: 'tplink_dns_csrf' [17:12:41][>] Soft Load module: 'exper_ewm01_adsl_dns_hijack' [17:12:41][>] Soft Load module: 'asmax_ar804gu_cmd_exec' [17:12:41][>] Soft Load module: 'virgin_superhub_csrf' [17:12:41][>] Soft Load module: 'tenda_adsl_dns_hijack' [17:12:41][>] Soft Load module: 'comtrend_ct5367_csrf' [17:12:41][>] Soft Load module: 'telstra_zte_mf91_change_ssid' [17:12:41][>] Soft Load module: 'linksys_e2500_csrf' [17:12:41][>] Soft Load module: 'telstra_zte_mf91_disable_ap_isolation' [17:12:41][>] Soft Load module: 'comtrend_ct_series_dns_hijack' [17:12:41][>] Soft Load module: 'linksys_e2500_shell' [17:12:41][>] Soft Load module: 'dlink_dsl526b_dns_hijack' [17:12:41][>] Soft Load module: 'pikatel_96338_dns_hijack' [17:12:41][>] Soft Load module: 'dlink_dsl2640u_dns_hijack' [17:12:41][>] Soft Load module: 'beetel_bcm96338_router_dns_hijack' [17:12:41][>] Soft Load module: 'belkin_dns_csrf' [17:12:41][>] Soft Load module: 'ddwrt_v24_sp1_csrf' [17:12:41][>] Soft Load module: 'dlink_dir_615_csrf' [17:12:41][>] Soft Load module: 'com_officeconnect_cmd_exec' [17:12:41][>] Soft Load module: 'dlink_dsl2780b_dns_hijack' [17:12:41][>] Soft Load module: 'dlink_dsl2740r_dns_hijack' [17:12:41][>] Soft Load module: 'comtrend_ct5624_csrf' [17:12:41][>] Soft Load module: 'boastmachine_add_user_csrf' [17:12:41][>] Soft Load module: 'zenoss_command_execution' [17:12:41][>] Soft Load module: 'ie_ms12_004_midi' [17:12:41][>] Soft Load module: 'signed_applet_dropper' [17:12:41][>] Soft Load module: 'safari_launch_app' [17:12:41][>] Soft Load module: 'activex_command_execution' [17:12:41][>] Soft Load module: 'java_payload' [17:12:41][>] Soft Load module: 'ie_ms13_069_caret' [17:12:41][>] Soft Load module: 'windows_mail_client_dos' [17:12:41][>] Soft Load module: 'qnx_qconn_command_execution' [17:12:41][>] Soft Load module: 'groovyshell_server_command_execution' [17:12:41][>] Soft Load module: 'opencart_reset_password' [17:12:41][>] Soft Load module: 'firefox_extension_reverse_shell' [17:12:41][>] Soft Load module: 'hta_powershell' [17:12:41][>] Soft Load module: 'spoof_addressbar_data' [17:12:41][>] Soft Load module: 'replace_video_fake_plugin' [17:12:41][>] Soft Load module: 'fake_notification_ie' [17:12:41][>] Soft Load module: 'fake_notification_c' [17:12:41][>] Soft Load module: 'simple_hijacker' [17:12:41][>] Soft Load module: 'tabnabbing' [17:12:41][>] Soft Load module: 'fake_evernote_clipper' [17:12:41][>] Soft Load module: 'fake_notification_ff' [17:12:41][>] Soft Load module: 'fake_flash_update' [17:12:41][>] Soft Load module: 'clippy' [17:12:41][>] Soft Load module: 'fake_notification' [17:12:41][>] Soft Load module: 'text_to_voice' [17:12:41][>] Soft Load module: 'pretty_theft' [17:12:41][>] Soft Load module: 'sitekiosk_breakout' [17:12:41][>] Soft Load module: 'fake_lastpass' [17:12:41][>] Soft Load module: 'firefox_extension_dropper' [17:12:41][>] Soft Load module: 'firefox_extension_bindshell' [17:12:41][>] Soft Load module: 'gmail_phishing' [17:12:41][>] Soft Load module: 'lcamtuf_download' [17:12:41][>] Soft Load module: 'clickjacking' [17:12:41][>] Soft Load module: 'steal_autocomplete' [17:12:41][>] Soft Load module: 'edge_wscript_wsh_injection' [17:12:41][>] Soft Load module: 'ui_abuse_ie' [17:12:41][>] Soft Load module: 'get_all_cookies' [17:12:41][>] Soft Load module: 'inject_beef' [17:12:41][>] Soft Load module: 'execute_tabs' [17:12:41][>] Soft Load module: 'send_gvoice_sms' [17:12:41][>] Soft Load module: 'screenshot' [17:12:41][>] Soft Load module: 'grab_google_contacts' [17:12:41][>] Soft Load module: 'ping_sweep_ff' [17:12:41][>] Soft Load module: 'cross_origin_scanner_cors' [17:12:41][>] Soft Load module: 'ping_sweep' [17:12:41][>] Soft Load module: 'cross_origin_scanner_flash' [17:12:41][>] Soft Load module: 'get_proxy_servers_wpad' [17:12:41][>] Soft Load module: 'detect_tor' [17:12:41][>] Soft Load module: 'get_ntop_network_hosts' [17:12:41][>] Soft Load module: 'internal_network_fingerprinting' [17:12:41][>] Soft Load module: 'dns_rebinding' [17:12:41][>] Soft Load module: 'irc_nat_pinning' [17:12:41][>] Soft Load module: 'port_scanner' [17:12:41][>] Soft Load module: 'detect_soc_nets' [17:12:41][>] Soft Load module: 'dns_enumeration' [17:12:41][>] Soft Load module: 'f5_bigip_cookie_disclosure' [17:12:41][>] Soft Load module: 'f5_bigip_cookie_stealing' [17:12:41][>] Soft Load module: 'get_http_servers' [17:12:41][>] Soft Load module: 'fingerprint_routers' [17:12:41][>] Soft Load module: 'detect_burp' [17:12:41][>] Soft Load module: 'ping_sweep_java' [17:12:41][>] Soft Load module: 'identify_lan_subnets' [17:12:41][>] Soft Load module: 'doser' [17:12:41][>] Soft Load module: 'hijack_opener' [17:12:41][>] Soft Load module: 'confirm_close_tab' [17:12:41][>] Soft Load module: 'popunder_window' [17:12:41][>] Soft Load module: 'popunder_window_ie' [17:12:41][>] Soft Load module: 'iframe_above' [17:12:41][>] Soft Load module: 'man_in_the_browser' [17:12:41][>] Soft Load module: 'invisible_htmlfile_activex' [17:12:41][>] Soft Load module: 'jsonp_service_worker' [17:12:41][>] Soft Load module: 'clipboard_theft' [17:12:41][>] Soft Load module: 'iphone_tel' [17:12:41][>] Soft Load module: 'detect_coupon_printer' [17:12:41][>] Soft Load module: 'detect_protocol_handlers' [17:12:41][>] Soft Load module: 'hook_default_browser' [17:12:41][>] Soft Load module: 'physical_location_thirdparty' [17:12:41][>] Soft Load module: 'get_wireless_keys' [17:12:41][>] Soft Load module: 'get_system_info_java' [17:12:41][>] Soft Load module: 'get_registry_keys' [17:12:41][>] Soft Load module: 'get_internal_ip_webrtc' [17:12:41][>] Soft Load module: 'detect_cups' [17:12:41][>] Soft Load module: 'detect_google_desktop' [17:12:41][>] Soft Load module: 'detect_airdroid' [17:12:41][>] Soft Load module: 'get_internal_ip_java' [17:12:41][>] Soft Load module: 'get_connection_type' [17:12:41][>] Soft Load module: 'physical_location' [17:12:41][>] Soft Load module: 'detect_hp' [17:12:41][>] Soft Load module: 'get_battery_status' [17:12:41][>] Soft Load module: 'detect_software' [17:12:41][>] Soft Load module: 'detect_users' [17:12:41][>] Soft Load module: 'detect_local_drives' [17:12:41][>] Soft Load module: 'detect_default_browser' [17:12:41][>] Soft Load module: 'detect_antivirus' [17:12:41][>] Soft Load module: 'detect_activex' [17:12:41][>] Soft Load module: 'detect_realplayer' [17:12:41][>] Soft Load module: 'Detect_toolbars' [17:12:41][>] Soft Load module: 'spyder_eye' [17:12:41][>] Soft Load module: 'webcam_html5' [17:12:41][>] Soft Load module: 'detect_unsafe_activex' [17:12:41][>] Soft Load module: 'detect_mime_types' [17:12:41][>] Soft Load module: 'unhook' [17:12:41][>] Soft Load module: 'rickroll' [17:12:41][>] Soft Load module: 'get_form_values' [17:12:41][>] Soft Load module: 'overflow_cookiejar' [17:12:41][>] Soft Load module: 'deface_web_page' [17:12:41][>] Soft Load module: 'get_page_links' [17:12:41][>] Soft Load module: 'link_rewrite_click_events' [17:12:41][>] Soft Load module: 'clear_console' [17:12:41][>] Soft Load module: 'site_redirect' [17:12:41][>] Soft Load module: 'mobilesafari_address_spoofing' [17:12:41][>] Soft Load module: 'get_session_storage' [17:12:41][>] Soft Load module: 'ajax_fingerprint' [17:12:41][>] Soft Load module: 'get_page_html_iframe' [17:12:41][>] Soft Load module: 'deface_web_page_component' [17:12:41][>] Soft Load module: 'get_local_storage' [17:12:41][>] Soft Load module: 'link_rewrite' [17:12:41][>] Soft Load module: 'alert_dialog' [17:12:41][>] Soft Load module: 'remove_stuck_iframes' [17:12:41][>] Soft Load module: 'get_cookie' [17:12:41][>] Soft Load module: 'link_rewrite_tel' [17:12:41][>] Soft Load module: 'disable_developer_tools' [17:12:41][>] Soft Load module: 'get_page_html' [17:12:41][>] Soft Load module: 'prompt_dialog' [17:12:41][>] Soft Load module: 'site_redirect_iframe' [17:12:41][>] Soft Load module: 'get_stored_credentials' [17:12:41][>] Soft Load module: 'replace_video' [17:12:41][>] Soft Load module: 'link_rewrite_sslstrip' [17:12:41][>] Soft Load module: 'detect_extensions' [17:12:41][>] Soft Load module: 'detect_foxit' [17:12:41][>] Soft Load module: 'avant_steal_history' [17:12:41][>] Soft Load module: 'detect_lastpass' [17:12:41][>] Soft Load module: 'Play_sound' [17:12:41][>] Soft Load module: 'browser_fingerprinting' [17:12:41][>] Soft Load module: 'remove_hook_element' [17:12:41][>] Soft Load module: 'detect_firebug' [17:12:41][>] Soft Load module: 'webcam_permission_check' [17:12:41][>] Soft Load module: 'detect_wmp' [17:12:41][>] Soft Load module: 'get_visited_urls' [17:12:41][>] Soft Load module: 'get_visited_domains' [17:12:41][>] Soft Load module: 'Detect_unity' [17:12:41][>] Soft Load module: 'detect_vlc' [17:12:41][>] Soft Load module: 'webcam' [17:12:41][>] Soft Load module: 'detect_simple_adblock' [17:12:41][>] Soft Load module: 'detect_quicktime' [17:12:41][>] Soft Load module: 'detect_evernote_clipper' [17:12:41][>] Soft Load module: 'detect_office' [17:12:41][>] Soft Load module: 'detect_popup_blocker' [17:12:41][>] Soft Load module: 'detect_silverlight' [17:12:41][>] Soft Load module: 'fingerprint_browser' [17:12:41][>] Soft Load module: 'raw_javascript' [17:12:41][>] Soft Load module: 'local_file_theft' [17:12:41][>] Soft Load module: 'no_sleep' [17:12:41][>] Soft Load module: 'send_inotes_with_attachment' [17:12:41][>] Soft Load module: 'extract_inotes_list' [17:12:41][>] Soft Load module: 'send_inotes' [17:12:41][>] Soft Load module: 'read_inotes' [17:12:41][>] Soft Load module: 'inotes_flooder' [17:12:41][>] Soft Load module: 'unblockui' [17:12:41][>] Soft Load module: 'cryptoloot_miner' [17:12:41][>] Soft Load module: 'track_physical_movement' [17:12:41][>] Soft Load module: 'coinhive_miner' [17:12:41][>] Soft Load module: 'iframe_keylogger' [17:12:41][>] Soft Load module: 'invisible_iframe' [17:12:41][>] Soft Load module: 'blockui' [17:12:41][>] Soft Load module: 'read_gmail' [17:12:41][>] Soft Load module: 'iframe_sniffer' [17:12:41][>] Soft Load module: 'wordpress_post_auth_rce' [17:12:41][>] Soft Load module: 'phonegap_check_connection' [17:12:41][>] Soft Load module: 'phonegap_alert_user' [17:12:41][>] Soft Load module: 'phonegap_plugin_detection' [17:12:41][>] Soft Load module: 'phonegap_list_files' [17:12:41][>] Soft Load module: 'phonegap_keychain' [17:12:41][>] Soft Load module: 'phonegap_detect' [17:12:41][>] Soft Load module: 'phonegap_start_record_audio' [17:12:41][>] Soft Load module: 'phonegap_persistence' [17:12:41][>] Soft Load module: 'phonegap_beep' [17:12:41][>] Soft Load module: 'phonegap_prompt_user' [17:12:41][>] Soft Load module: 'phonegap_file_upload' [17:12:41][>] Soft Load module: 'phonegap_stop_record_audio' [17:12:41][>] Soft Load module: 'phonegap_globalization_status' [17:12:41][>] Soft Load module: 'phonegap_geo_locate' [17:12:41][>] Soft Load module: 'phonegap_persist_resume' [17:12:41][>] Soft Load module: 'phonegap_list_contacts' [17:12:41][] BeEF is loading. Wait a few seconds... [17:12:41][>] Server: mounted handler '/hook.js' [17:12:41][>] Server: mounted handler '/init' [17:12:41][>] Server: mounted handler '/' [17:12:41][>] Server: mounted handler '/dh' [17:12:41][>] Server: mounted handler '/api/hooks' [17:12:41][>] Server: mounted handler '/api/browserdetails' [17:12:41][>] Server: mounted handler '/api/modules' [17:12:41][>] Server: mounted handler '/api/categories' [17:12:41][>] Server: mounted handler '/api/logs' [17:12:41][>] Server: mounted handler '/api/admin' [17:12:41][>] Server: mounted handler '/api/server' [17:12:41][>] Server: mounted handler '/api/autorun' [17:12:41][>] Server: mounted handler '/api/proxy' [17:12:41][>] Server: mounted handler '/xssrays' [17:12:41][>] Server: mounted handler '/api/xssrays' [17:12:41][>] Server: mounted handler '/api/seng' [17:12:41][>] Server: mounted handler '/ps' [17:12:41][>] Server: mounted handler '/demos' [17:12:41][>] Server: mounted handler '/demos/clickjacking/clickjack_victim.html' [17:12:41][>] Server: mounted handler '/demos/clickjacking/clickjack_attack.html' [17:12:41][>] Server: mounted handler '/demos/butcher/index.html' [17:12:41][>] Server: mounted handler '/demos/secret_page.html' [17:12:41][>] Server: mounted handler '/demos/plain.html' [17:12:41][>] Server: mounted handler '/demos/report.html' [17:12:41][>] Server: mounted handler '/demos/basic.html' [17:12:41][>] Server: mounted handler '/ui/modules' [17:12:41][>] Server: mounted handler '/ui/panel' [17:12:41][>] Server: mounted handler '/ui/authentication' [17:12:41][>] Server: mounted handler '/ui/media' [17:12:41][>] [AdminUI] Initializing admin panel ... [17:12:41][>] [AdminUI] Minifying web_ui_all (384858 bytes) [17:12:43][>] [AdminUI] Minified web_ui_all (216351 bytes) [17:12:43][>] [AdminUI] Minifying web_ui_auth (1787 bytes) [17:12:43][>] [AdminUI] Minified web_ui_auth (1122 bytes) [17:12:43][>] Server: mounted handler '/ui/web_ui_all.js' [17:12:43][>] Server: mounted handler '/ui/web_ui_auth.js' [17:12:43][>] Server: mounted handler '/api/network' [17:12:43][>] Server: mounted handler '/event' [17:12:43][>] Server: mounted handler '/requester' [17:12:43][>] Server: mounted handler '/api/requester' [17:12:43][] 8 extensions enabled: [17:12:43] | Proxy [17:12:43] | XSSRays [17:12:43] | Social Engineering [17:12:43] | Demos [17:12:43] | Admin UI [17:12:43] | Network [17:12:43] | Events [17:12:43] | Requester [17:12:43][] 300 modules enabled. [17:12:43][] 1 network interfaces were detected. [17:12:43][*] running on network interface: 192.168.1.5 [17:12:43] | Hook URL: http://192.168.1.5:80/hook.js [17:12:43] | UI URL: http://192.168.1.5:80/ui/panel [17:12:43][] RESTful API key: ba3a1acdd4b14ceadbf0e7a434c7d09092bde312 [17:12:43][!] [GeoIP] Could not find MaxMind GeoIP database: '/var/lib/GeoIP/GeoLite2-City.mmdb' [17:12:43] |_ Run geoipupdate to install [17:12:43][] HTTP Proxy: http://127.0.0.1:6789 [17:12:43][*] BeEF server started (press control+c to stop) I, [2019-07-28T17:12:43.197925 #35810] INFO -- : Thin web server (v1.7.2 codename Bachmanity) D, [2019-07-28T17:12:43.197994 #35810] DEBUG -- : Debugging ON I, [2019-07-28T17:12:43.198013 #35810] INFO -- : Maximum connections set to 1024 I, [2019-07-28T17:12:43.198103 #35810] INFO -- : Listening on 192.168.1.5:80, CTRL+C to stop 192.168.1.4 - - [28/Jul/2019:17:12:54 +0800] "GET /favicon.ico HTTP/1.1" 404 233 0.0005 192.168.1.4 - - [28/Jul/2019:17:12:59 +0800] "GET /demos/basic.html HTTP/1.1" 200 1607 0.0012 192.168.1.4 - - [28/Jul/2019:17:13:00 +0800] "GET /hook.js HTTP/1.1" 200 586692 0.0274 192.168.1.4 - - [28/Jul/2019:17:13:00 +0800] "GET /dh?bh=LHK88ZjKBIhTR6AoD0G9QKKK4NgaywHidZZzk84bVRe2Vc1A3X81hi2hK0U6r4qcKSzrDRATZjSapz29&sid=1&pid=1&pc=8&d=W3siY2lkIjowLCJyZXN1bHRzIjp7ImJyb3dzZXIud2luZG93LmNvb2tpZXMiOiJCRUVGSE9PSz1MSEs4OFpqS0JJaFRSNkFvRDBHOVFLS0s0TmdheXdIaWRaWnprODRiVlJlMlZjMUEzWDgxaGkyaEswVTZyNHFjS1N6ckRSQVRaalNhcHoyOSIsImJyb3dzZXIubmFtZSI6IklFIiwiYnJvd3Nlci52ZXJzaW9uIjoiMTAiLCJicm93c2VyLmVuZ2luZSI6IlRyaWRlbnQiLCJicm93c2VyLm5hbWUucmVwb3J0ZWQiOiJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXT1c2NDsgVHJpZGVudC83LjA7IC5ORVQ&_=1564305179699 HTTP/1.1" 200 - 0.0011

zqhwsy123 commented 5 years ago

I can implement module functionality with previously written code that invokes the API interface, but the administrative interface simply does not display the hooked online browser

bcoles commented 5 years ago

That's strange. I'm not sure what the problem is.

我不知道

Your configuration looks fine.

Are there any errors in the web browser development console? (CTRL + SHIFT + J).

在猜测

At a guess, perhaps it is an issue with your local zh-cn. BeEF has been tested mostly with en-us browsers and systems.

If the API works, then it is probably an issue with the Admin UI JavaScript.

Sorry, I won't have time to look into fixing this any time soon.

zqhwsy123 commented 5 years ago

image

bcoles commented 5 years ago

Perhaps this will work as a temporary fix:

diff --git a/extensions/admin_ui/media/javascript/ui/panel/zombiesTreeList.js b/extensions/admin_ui/media/javascript/ui/panel/zombiesTreeList.js
index 5cd3b779..f8ac3fe2 100644
--- a/extensions/admin_ui/media/javascript/ui/panel/zombiesTreeList.js
+++ b/extensions/admin_ui/media/javascript/ui/panel/zombiesTreeList.js
@@ -492,7 +492,7 @@ try{
                        balloon_text += " <img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/unknown.png' /> ";
                        balloon_text += "Location: Unknown";
                } else {
-                       balloon_text += " <img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/country-squared/" + escape(hooked_browser.country_code.toLowerCase()) + ".svg' /> ";
+                       //balloon_text += " <img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/country-squared/" + escape(hooked_browser.country_code.toLowerCase()) + ".svg' /> ";
                        balloon_text += "Location: " + hooked_browser.city + ", " + hooked_browser.country;
                }

@@ -509,7 +509,7 @@ try{
                if (hooked_browser.country == 'Unknown') {
                        text += "<img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/unknown.png' /> ";
                } else {
-                       text += "<img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/country-squared/" + escape(hooked_browser.country_code.toLowerCase()) + ".svg' /> ";
+                       //text += "<img width='13px' height='13px' class='zombie-tree-icon' src='<%= @base_path %>/media/images/icons/country-squared/" + escape(hooked_browser.country_code.toLowerCase()) + ".svg' /> ";
                }

                text += hooked_browser.ip;
zqhwsy123 commented 5 years ago

image

zqhwsy123 commented 5 years ago

Change if to try?

bcoles commented 5 years ago

Change if to try?

That will fix the error as a temporary solution. It will not resolve the underlying problem. The country_code should never be null. It should be an empty string.

The appropriate fix should be to ensure that country_code is never stored as null.

I don't have time to look into what is causing the issue at the moment. I tested on my test system with geoip enabled, disabled, and misconfigured, and country_code was never null.

zqhwsy123 commented 5 years ago

thanks !

malwareoverflow commented 4 years ago

edit the script which throws the country error using vs code permission

sudo code --user-data-dir="~/.vscode-root" usr/share/beef-xss/extensions/admin_ui/media/javascript-min/web_ui_all.js

find e.country_code and replace with mactching one , the images are here /usr/share/beef-xss/extensions/admin_ui/media/images/icons/country-squared

sankalpsingha commented 4 years ago

I am getting the same issue. I dont know why. And I dont want to change the minified code. That's just weird.

bcoles commented 3 years ago

Fixed in #1975. Although the root cause of null country code was never identified.