• Stars
    star
    1,093
  • Rank 42,166 (Top 0.9 %)
  • Language
    C++
  • License
    GNU General Publi...
  • Created over 6 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Windows Feature Control Multi-tool

Mach2

Mach2 manages the Windows Feature Store, where Features (and associated on/off state) live. This store lives in the undocumented Windows Notification Facility (WNF), which provides publish-subscribe messaging for kernel components, system services, and user-space applications.

Windows currently contains thousands of Feature switches that turn on and off new and unfinished functionality, mitigations, test hooks, and overrides. Mach2 provides facilities to discover these switches and turn them on or off.

Without going into specifics, Mach2 commands generally fall into one of two buckets:

Scanning

Mach2 operates on Feature IDs for the bulk of its operations. But finding interesting Features to turn on and off can be a chore, so it includes a scanning function. This function scans Microsoft Program Database (PDB) files for Feature symbols and collects them for review. A user can then review the results and cherry pick which Features warrant further investigation.

Management

Mach2 can dump the current Feature Control store and resolve known IDs to names for convienence. (It reads simple key:value pairs from features.txt on disk.)

With a Feature ID in hand, Mach2 can enable or disable a Feature on the local system. Both of these actions create configuration state for the Feature and set the feature to Enabled or Disabled respectively. The user can also choose to Revert back to the default configuration -- that is, let the Feature turn itself on or off as desired. (There is a Default configuration state that could be set, the tool currently opts to remove reverted features from the configuration store altogether.)

While the tool can manipulate Feature states, the Feature itself drives state compliance. That is, it can choose to ignore its configured state. Various factors, including what's referred to internally as a staging configuration, can dictate whether a Feature respects its configurable state or not. (Always Disabled staged Features, for example, are crippled/stripped during Windows build compilation and cannot be turned on with Feature Control.)

Install

Installation is not required, however Mach2 utilizes registration-free COM activation to bring in DIA SDK components so msdia120.dll must be present.

Building from source

Compilation requires Visual Studio 2017 or newer, a recent version of the Windows 10 SDK installed, and vcpkg.

Step-by-step

  1. vcpkg --feature-flags=manifests install in the mach2 root folder
  2. Open mach2.sln in Visual Studio
  3. Change the target platform and configuration as needed
  4. Build

Usage

Mach2 relies on CLI11 to provide a canonical command line argument-driven interface. It's recommended you run the tool with --help for details on how to use the tool.

Testimonials

Microsoft

Please never use this tool. The ways in which it can hose your system (and also defeat the purpose of WIP) are myriad.

— Brandon Paddock (@BrandonLive) June 28, 2018 (archived)

You can cite me saying this. Hacking around in internal system state you don’t understand is very risky, and creates an inconsistent state that shouldn’t normally be possible. Plus mucks up data and wastes people’s time.

— Brandon Paddock (@BrandonLive) June 28, 2018 (archived)

Contributions

Contributions are greatly appreciated. Keep the license in mind (GPLv3).

Try to ping me in advance if you're working on any major changes to ensure we don't clash.

More Repositories

1

wsa-app-compatibility

Keeping track of Android apps and their compatibility with the Windows Subsystem for Android
553
star
2

uxstyle

C++
290
star
3

messageanalyzer-archive

Microsoft Message Analyzer EOL Archive
Roff
149
star
4

sample-win32-acrylicblur

Sample WPF Acrylic Blur app
C#
116
star
5

hashlnk

Utility to compute and apply a hash for "WinX" shortcuts
C++
113
star
6

sample-win10-aeroglass

Sample WPF Aero Glass-like blur app (deprecated)
C#
87
star
7

Remove-HypervisorChecks

A PowerShell script to remove hypervisor checks in both AMD and NVIDIA consumer GPU drivers for Microsoft Windows
PowerShell
74
star
8

eoraptor

Scan for wasteful PNG text chunks in PE files
C++
55
star
9

ExtensionsForOneDrive

Helpful extensions to augment OneDrive capabilities in Windows
C#
27
star
10

IndirectInput

A simple DirectInput wrapper to work around a Windows 10 device enumeration bug
C
23
star
11

draconyx

Simple tool to query Bluetooth devices on Windows 10 using Windows.Devices.Bluetooth and Windows.Devices.Enumeration APIs.
C#
16
star
12

playto-tools

Dot-sourced library of cmdlets to tinker with PlayTo in Windows 8/RT
PowerShell
12
star
13

regionpolicyevaluator-skeleton

A skeleton WinRT component that can serve as a substitute for the Region Policy Evaluator in Windows.
Rust
12
star
14

remotedesktop-keyfilter

Hook that intercepts defined keys within a remote desktop context and sends them to the OS
JavaScript
9
star
15

anzu

Dumps installed Universal Windows App package contents, notably those that are encrypted, with some simple JavaScript.
JavaScript
9
star
16

curated-windows-feedback

9
star
17

vstemplates.winrtconsole

A project template for creating a command-line application, with access to WinRT APIs.
8
star
18

devtools

CoApp Developer Tools
C#
6
star
19

directstorage-rs

Rust for the DirectStorage SDK (unofficial)
Rust
6
star
20

xbfdump

C#
5
star
21

Improve-The-Microsoft-Store

Track apps that are misleading or shouldn't be in the Microsoft Store
5
star
22

DumpImmersiveColors

C#
4
star
23

HoloLensApps

HTML
4
star
24

mux-repros

Minimal reproducible examples of MUX issues
C#
2
star
25

bonusbooster

Command & Conquer Alliances Bonus Booster (runs while you sleep)
C#
2
star
26

was-repros

Minimal reproducible examples of WAS issues
C++
2
star
27

wpdev.uservoice.com

Data scraped from wpdev.uservoice.com
2
star
28

washington-rs

Sample project demonstrating a complete MIDL to Rust workflow
Rust
2
star
29

BuildFeed

The collaborative build list - on https://buildfeed.net/
C#
2
star
30

project-reunion-rs

Experimental Rust workspace for Project Reunion
2
star
31

repro-1012c50820aa

.
Rust
1
star
32

blogs.windows.com-issues

Issue-only repository to track blogs.windows.com issues
1
star
33

fuzzy-chainsaw

C#
1
star
34

feedbackhub.online

HTML
1
star
35

doesitcomewiththepenloopyet.com

1
star
36

getpaintdotnet

1
star
37

windows-app-samples-rs

Rust
1
star
38

107135a7-7b3b-48d3-997c-83e55a7fbbcb

1
star
39

uxstyle.com

Website backing UxStyle project
1
star
40

super-broccoli

Repro for sqlite on smb failures; ignore.
C#
1
star
41

insiderhubcontent

1
star
42

opencv-tesseract-arm-vs2015

1
star
43

DragDropWobblyRepro

Repro for sub-pixel wobbles that appear when using Windows.ApplicationModel.DataTransfer.DataPackageOperation.Link
C#
1
star