77

GitHub - hfiref0x/UACME: Defeating Windows User Account Control

 6 years ago
source link: https://github.com/hfiref0x/UACME
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

UACMe

  • Defeating Windows User Account Control by abusing built-in Windows AutoElevate backdoor.

System Requirements

  • x86-32/x64 Windows 7/8/8.1/10 (client, some methods however works on server version too).
  • Admin account with UAC set on default settings required.

Usage

Run executable from command line: akagi32 [Key] [Param] or akagi64 [Key] [Param]. See "Run examples" below for more info.

First parameter is number of method to use, second is optional command (executable file name including full path) to run. Second parameter can be empty - in this case program will execute elevated cmd.exe from system32 folder.

Note: Since 3.5.0 version all "fixed" methods are considered obsolete and removed altogether with all supporting code/units. If you still need them - use v3.2.x branch

Keys (click to expand/collapse)

Note:

  • Method (30) (63) and later implemented only in x64 version;
  • Method (30) require x64 because it abuses WOW64 subsystem feature;
  • Method (55) is not really reliable (as any GUI hacks) and included just for fun.

Run examples:

  • akagi32.exe 23
  • akagi64.exe 61
  • akagi32 23 c:\windows\system32\calc.exe
  • akagi64 61 c:\windows\system32\charmap.exe

Warning

  • This tool shows ONLY popular UAC bypass method used by malware, and re-implement some of them in a different way improving original concepts. There are different, not yet known to the general public, methods. Be aware of this;
  • This tool is not intended for AV tests and not tested to work in aggressive AV environment, if you still plan to use it with installed bloatware AV soft - use it at your own risk;
  • Some AV may flag this tool as HackTool, MSE/WinDefender constantly marks it as malware, nope;
  • If you run this program on real computer remember to remove all program leftovers after usage, for more info about files it drops to system folders see source code;
  • Most of methods created for x64, with no x86-32 support in mind. I don't see any sense in supporting 32 bit versions of Windows or wow64, however with small tweaks most of them will run under wow64 as well.

If you wondering why this still exists and working - here is the explanation - an official Microsoft WHITEFLAG (including totally incompetent statements as bonus) https://devblogs.microsoft.com/oldnewthing/20160816-00/?p=94105

Windows 10 support and testing policy

  • UACMe tested only with LSTB/LTSC variants (1607/1809) and Last RTM-1 versions, e.g. if current version is 2004 it will be tested on 2004 (19041) and previous version 1909 (18363);
  • Insider builds are not supported as methods may be fixed there.

Protection

  • Account without administrative privileges.

Malware usage

  • We do not take any responsibility for this tool usage in the malicious purposes. It is free, open-source and provided AS-IS for everyone.

Other usage

  • Currently used as "signature" by "THOR APT" scanner (handmade pattern matching fraudware from Germany). We do not take any responsibility for this tool usage in the fraudware;
  • The repository https://github.com/hfiref0x/UACME and it contents are the only genuine source for UACMe code. We have nothing to do with external links to this project, mentions anywhere as well as modifications (forks);
  • In July 2016 so-called "security company" Cymmetria released report about script-kiddie malware bundle called "Patchwork" and false flagged it as APT. They stated it was using "UACME method", which in fact is just slightly and unprofessionally modified injector dll from UACMe v1.9 and was using Carberp/Pitou hybrid method in malware self-implemented way. We do not take any responsibility for UACMe usage in the dubious advertising campaigns from third party "security companies".

Build

  • UACMe comes with full source code, written in C;
  • In order to build from source you need Microsoft Visual Studio 2015 and later versions.

Compiled Binaries

  • They are not provided since 2.8.9 and will never be provided in future. The reasons (and why you too should not provide them to the general public):
    • If you look at this project in a nutshell it is a HackTool, despite initial goal to be a demonstrator. Of course several AV's detects it as HackTool (MS WD for example), however most of VirusTotal patients detects it as generic "malware". Which is of course incorrect, however unfortunately some lazy malware writers blindly copy-paste code to their crapware (or even simple use this tool directly) thus some AV created signatures based on project code parts;
    • By giving compiled binaries to everyone you make life of script-kiddies much easier because having need to compile from source works as perfect barrier for exceptionally dumb script-kiddies and "button-clickers";
    • Having compiled binaries in the repository will ultimately lead to flagging this repository pages as malicious (due to above reasons) by various content filters (SmartScreen, Google Safe Browsing etc).
  • This decision is a final and won't be changed.

Instructions

  • Select Platform ToolSet first for project in solution you want to build (Project->Properties->General):

    • v140 for Visual Studio 2015;
    • v141 for Visual Studio 2017;
    • v142 for Visual Studio 2019.
  • For v140 and above set Target Platform Version (Project->Properties->General):

    • If v140 then select 8.1 (Note that Windows 8.1 SDK must be installed);
    • If v141/v142 then select 10.
  • The following SDK are required for building the binaries:

    • Windows 8.1 or Windows 10 SDK (tested with 19041 version)
    • NET Framework SDK (tested with 4.8 version)
  • To build working binary:

    • Compile payload units
    • Compile Naka module
    • Encrypt all payload units using Naka module
    • Generate secret blobs for these units using Naka module
    • Move compiled units and secret blobs to the Akagi\Bin directory
    • Rebuild Akagi

References

Authors

(c) 2014 - 2022 UACMe Project


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK