关于bypassuac的探究——挖掘白名单的uac程序

有一些系统程序是会直接获取管理员权限同时不弹出UAC弹窗,这类程序被称为白名单程序。这些程序拥有autoElevate属性的值为True,会在启动时就静默提升权限。

那么我们要寻找的uac程序需要符合以下几个要求:

1. 程序的manifest标识的配置属性 autoElevate 为true
2. 程序不弹出UAC弹窗
3. 从注册表里查询Shell\Open\command键值对

首先是寻找autoElevate为true的程序,这里就写一个py脚本去批量跑一下,这里就找system32目录下面的

import os 
from subprocess import * 
 
path = 'c:\windows\system32' 
files = os.listdir(path) 
print(files) 
def GetFileList(path, fileList): 
    newDir = path 
    if os.path.isfile(path): 
        if path[-4:] == '.exe': 
            fileList.append(path) 
    elif os.path.isdir(path): 
        try: 
            for s in os.listdir(path): 
                newDir=os.path.join(path,s) 
                GetFileList(newDir, fileList) 
        except Exception as e: 
            pass 
    return fileList 
files = GetFileList(path, []) 
print(files) 

for eachFile in files: 
    if eachFile[-4:] == '.exe': 
        command = r'.\sigcheck64.exe -m {} | findstr auto'.format(eachFile) 
        print(command) 
        p1 = Popen(command, shell=True, stdin=PIPE, stdout=PIPE) 
        if '<autoElevate>true</autoElevate>' in p1.stdout.read().decode('gb2312'): 
            copy_command = r'copy {} .\success'.format(eachFile) 
            Popen(copy_command, shell=True, stdin=PIPE, stdout=PIPE) 
            print('[+] {}'.format(eachFile)) 
            with open('success.txt', 'at') as f: 
                f.writelines('{}\n'.format(eachFile))

 

整理之后exe如下所示

:\windows\system32\bthudtask.exe 
c:\windows\system32\changepk.exe 
c:\windows\system32\ComputerDefaults.exe 
c:\windows\system32\dccw.exe 
c:\windows\system32\dcomcnfg.exe 
c:\windows\system32\DeviceEject.exe 
c:\windows\system32\DeviceProperties.exe 
c:\windows\system32\djoin.exe 
c:\windows\system32\easinvoker.exe 
c:\windows\system32\EASPolicyManagerBrokerHost.exe 
c:\windows\system32\eudcedit.exe 
c:\windows\system32\eventvwr.exe 
c:\windows\system32\fodhelper.exe 
c:\windows\system32\fsquirt.exe 
c:\windows\system32\FXSUNATD.exe 
c:\windows\system32\immersivetpmvscmgrsvr.exe 
c:\windows\system32\iscsicli.exe 
c:\windows\system32\iscsicpl.exe 
c:\windows\system32\lpksetup.exe 
c:\windows\system32\MSchedExe.exe 
c:\windows\system32\msconfig.exe 
c:\windows\system32\msra.exe 
c:\windows\system32\MultiDigiMon.exe 
c:\windows\system32\newdev.exe 
c:\windows\system32\odbcad32.exe 
c:\windows\system32\PasswordOnWakeSettingFlyout.exe 
c:\windows\system32\pwcreator.exe 
c:\windows\system32\rdpshell.exe 
c:\windows\system32\recdisc.exe 
c:\windows\system32\rrinstaller.exe 
c:\windows\system32\shrpubw.exe 
c:\windows\system32\slui.exe 
c:\windows\system32\Sysprep\sysprep.exe 
c:\windows\system32\SystemPropertiesAdvanced.exe 
c:\windows\system32\SystemPropertiesComputerName.exe 
c:\windows\system32\SystemPropertiesDataExecutionPrevention.exe 
c:\windows\system32\SystemPropertiesHardware.exe 
c:\windows\system32\SystemPropertiesPerformance.exe 
c:\windows\system32\SystemPropertiesProtection.exe 
c:\windows\system32\SystemPropertiesRemote.exe 
c:\windows\system32\SystemSettingsAdminFlows.exe 
c:\windows\system32\SystemSettingsRemoveDevice.exe 
c:\windows\system32\Taskmgr.exe 
c:\windows\system32\tcmsetup.exe
c:\windows\system32\TpmInit.exe 
c:\windows\system32\WindowsUpdateElevatedInstaller.exe 
c:\windows\system32\WSReset.exe 
c:\windows\system32\wusa.exe

然后再去寻找不弹uac框的程序,这里我就从上往下开始尝试,找到的是ComputerDefaults.exe 这个exe

运行之后直接就会出现默认应用这个界面

用户账户控制(UAC)白名单的设置 Windows7下 UAC(User Account Control,用户帐户控制)是微软为提高系统安全而在Windows Vista中引入的新技术,它要求用户在执行可能会影响计算机运行的操作或执行更改影响其他用户的设置的操作之前,提供权限或管理员?密码。通过在这些操作启动前对其进行验证,UAC 可以帮助防止恶意软件和间谍软件在未经许可的情况下在计算机上进行安装或对计算机进行更改。 从Vista开始,微软开始这一新的安全工具吧,算是。对于一部分非法程序UAC确实可以在一定程度上对其进行防范。但是,对于很多用户来说,这个功能也带来了很多困扰。 所以就想有没有白名单之类的功能,可以将我们信任的程序直接允许运行。答案是有的。但是微软没有自带,哈哈。 网上的答案绝大多数都是停止UAC,废话,如果想停止的话就不会有人问这个问题了。 可以通过微软公司出品的Microsoft Application Compatibility Toolkit 5.6将信任程序加入系统白名单。 下载Application Compatibility Toolkit 安装成功有三个程序 以管理员的权限运行Compatibility Administrator 在Custom DataBases中新建数据库,添加一个Application Fix(下面空白出点击右键,creat new) 添上你的程序名,版本,程序路径 选择none 下一步 选中RunAsInvoker 完成 在菜单栏里选择file->save。。。保存为一个sdb文件 file->install
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值