有一些系统程序是会直接获取管理员权限同时不弹出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
运行之后直接就会出现默认应用这个界面