Cyber security

FormThief – A Deceptive Approach To Spoofing Windows Desktop Logins

FormThief is a project designed for spoofing Windows desktop login applications using WinForms and WPF. Below is an example run for KeePass 

Windows Forms (WinForms) and Windows Presentation Foundation (WPF) are two powerful UI frameworks provided by Microsoft for building desktop applications on the Windows platform.

While they are primarily used for developing software, they also offer a unique opportunity for spoofing login functions for legitimate Windows desktop applications.

The idea behind this was to identify desktop applications used by the target organisation, tailor a malicious forms application to the specific victim, then load the spoofed login application via beacon to capture user credentials.

I’m working on several others and will keep adding to this repo. Bitwarden is nearly finished; however, I encountered limitations with WinForms when replicating Bitwarden and LastPass. I will be porting both to WPF as soon as possible.

Improvements could be made to incorporate greater application functionality, I’ve only attempted to replicate the processes necessary to capture user credentials.

If users are persistant in trying to access other areas of the application I’ve added click counters which will trigger an exit or ‘crash’ the app so the victim doesn’t become too suspicious when things aren’t working as they normally would.

Prereqs

Information on application process executables, prereqs for creating convincing dialogs, and example attack vectors:

ApplicationExecutablesPrereqsExample Attack Vector
Cisco AnyConnectvpnui.exe/vpnagent.exeprocsearch ui process for “Connected”, should show ‘Connected to xyz…’ .

An XML file located in C:\ProgramData\Cisco\Cisco AnyConnect Secure Mobility Client\Profile\ should also contain available hostnames/gateways for the host
Identify the current connection gateway -> kill process -> pop new auth dialog with identified gateway
KeePassKeePass.exeIdentify any .kdbx files on the host (trying to dump the active .kdbx db with procsearch fails)Kill process -> pop new auth dialog with .kdbx file path
LastPasslpwinmetro.exeprocsearch LastPass process for “email” to identify active email addressKill process -> pop new auth dialog with identified email
OpenVPNopenvpn.exeprocsearch OpenVPN process for “.ovpn” to identify active profileKill process -> pop new auth dialog with target VPN profile
Windows Security (Outlook)OUTLOOK.exe/olk.exeprocsearch Outlook process for “email” to identify active email addressKill process -> pop new auth dialog with extracted email

Functionality within the included applications is fairly modular so it can be easily copy/pasted when creating new forms. Several items in proctools, which was created whilst working on this project, may also come in handy.

Usage

Clone the repo. Load the target application solution. Allow unsafe code and untick Prefer 32-bit. Build.

All applications except Windows Security (Outlook) work via inlineExecute-Assembly and bofnet_executeassembly.

I’ve inlcuded a simple C# script (wpfRunner.cs) for downloading the WPF Outlook.exe to the victim’s %TEMP% and executing directly from the host, not ideal but it works fine. Will update with a workaround.

NOTE: Only tested on Windows 10, NOT tested on Windows 11

All code confirmed working locally and via beacon at time of release. Please don’t hesitate to reach out with any issues or contributions.

Tamil S

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

2 weeks ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

3 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

4 weeks ago

Rust BOFs – Unlocking New Potentials In Cobalt Strike

This took me like 4 days (+2 days for an update), but I got it…

4 weeks ago

MaLDAPtive – Pioneering LDAP SearchFilter Parsing And Security Framework

MaLDAPtive is a framework for LDAP SearchFilter parsing, obfuscation, deobfuscation and detection. Its foundation is…

4 weeks ago