20170612ac-ir_research_en报告记录

 
 

 


 

命令执行
WinRM自带
winrs自带
at自带
bengix   ----

BITS (后台智能传送服务) 是一个 Windows 组件,它可以在前台或后台异步传输文件
dump hash
gsecdump  Extracts hash from SAM/AD or logon sessions
lslsass Acquires a password hash of active logon sessions from the Isass process

Find-GPOPasswords.ps1  Acquires any password descriptions in a group policy file


Mail PassView  
 WebBrowserPassView
Remote Desktop PassView


Htran
创建TCP会话和隧道其他端口通信

MS14-058 Exploit

MS15-078 Exploit
ntdsutil   A command to maintain Active Directory databases This tool is used to extract NTDS.DIT, a database for NTDS, and other tools are used to analyze passwords (executed in Active Directory).


 icacls
Changes the file access rights

This tool is used to change the rights to read a file that cannot be read by the used account.
- It is also used to capture rights so that the content of a file created by the attacker will not be viewable.

sdelete

此工具用于删除攻击过程中创建的文件,使其无法恢复


timestomp
对于由于攻击者的使用而更改时间戳的文件,该工具用于通过恢复时间戳来隐藏对文件的访问。


wevtutil



此工具用于删除攻击的证据。

源主机:wevtutil命令执行源

-目的主机:机器的wevtutil命令访问



csvde
工具用于提取现有帐户上的信息,并选择可作为攻击目标的用户和客户机。

源主机:CSVDE命令执行源

-目的主机:机器的信息通过CSVDE命令收集


ldifde
此工具用于提取现有帐户上的信息,并选择可作为攻击目标的用户和客户机。


Fake WPAD

2. Fake WPAD Proxy Server

在windows中,Internet Explorer默认会自动尝试通过访问”http://wpad/wpad.dat”来检测网络的代理设置。让人惊奇的是这也适用于一些windows服务,如Windows Update,但具体情况与Windows版本有关。

当然,URL”http://wpad/wpad.dat”在网络中是不存在的,因为主机名”wpad”在DNS域名服务器中是不存在的。然而,和上面一样,我们可以利用NBNS欺骗来伪造主机名。

在能够进行NBNS应答欺骗后,我们将127.0.0.1作为NBNS的伪造者。我们对目标机器(我们自己的机器)用NBNS响应包进行泛洪攻击,告诉对方WPAD主机的ip地址位127.0.0.1。

与此同时,我们在本机127.0.0.1上运行http 服务器。当它收到对”http://wpad/wpad.dat”的请求时,用类似下面的内容进行响应。

FindProxyForURL(url,host){
if (dnsDomainIs(host, "localhost")) return "DIRECT";
return "PROXY 127.0.0.1:80";}

这会导致目标机器上的所有流量都会通过我们运行在127.0.0.1上的服务器进行重定向。

有意思的是,即使是较低权限的用户进行的这种攻击,也会影响到该机器上的所有用户。这包括管理员,以及系统账户。下面的截图显示了,两个用户同时登录到了同一台机器上,低权限用户正进行本地NBNS欺骗,高权限用户在第二个图中显示受到了影响。










WMIC
前沿:WMIC命令在我们的工作中可以帮助我们减少对其他工具的依赖并节省我们的时间,实在是一个值得学习和研究的好东西
命令很多,这里我把网上目前能找到的较实用的一些命令整理出来,希望各位看官能找到自己需要的东西
 
详细的命令使用方法大家可以参考微软帮助
http://technet.microsoft.com/zh-cn/library/cc779482(WS.10).aspx
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
获得系统版本信息
wmic datafile where Name='c://windows//explorer.exe' get Manufacturer,Version,Filename
 
获得系统进程
wmic process list full        注意:
这里的full也可以换成brief(简洁)
 
获得硬件信息(这里以cpu为例)
wmic cpu get name,caption,maxclockspeed,description
 
将结果输出到d盘的1.txt里面
wmic /output:D:/1.txt cpu get name
 
wmic 获取硬盘固定分区盘符:
wmic logicaldisk where "drivetype=3" get name
 
wmic 获取硬盘各分区文件系统以及可用空间:
wmic logicaldisk where "drivetype=3" get name,filesystem,freespace
 
wmic 获取进程名称以及可执行路径:
wmic process get name,executablepath
 
wmic 删除指定进程(根据进程名称):
wmic process where name="qq.exe" call terminate
或者用
wmic process where name="qq.exe" delete
 
wmic 删除指定进程(根据进程PID):
wmic process where pid="123" delete
 
wmic 创建新进程
wmic process call create "C:/Program Files/Tencent/QQ/QQ.exe"
 
在远程机器上创建新进程:
wmic /node:192.168.1.10 /user:administrator /password:123456 process call create cmd.exe
 
关闭本地计算机
wmic process call create shutdown.exe
 
重启远程计算机
wmic /node:192.168.1.10/user:administrator /password:123456 process call create "shutdown.exe -r -f -m"
 
更改计算机名称
wmic computersystem where "caption='%ComputerName%'" call rename newcomputername
 
更改帐户名
wmic USERACCOUNT where "name='%UserName%'" call rename newUserName
 
wmic 结束可疑进程(根据进程的启动路径)
wmic process where "name='explorer.exe' and executablepath<>'%SystemDrive%//windows//explorer.exe'" delete
 
wmic 获取物理内存
wmic memlogical get TotalPhysicalMemory|find /i /v "t"
 
wmic 获取文件的创建、访问、修改时间
@echo off
'wmic datafile where name^="c://windows//system32//notepad.exe" get CreationDate^,LastAccessed^,LastModified
 
wmic 全盘搜索某文件并获取该文件所在目录
wmic datafile where "FileName='qq' and extension='exe'" get drive,path
for /f "skip=1 tokens=1*" %i in ('wmic datafile where "FileName='qq' and extension='exe'" get drive^,path') do (set "qPath=%i%j"&@echo %qPath:~0,-3%)
 
获取屏幕分辨率
wmic DESKTOPMONITOR where Status='ok' get ScreenHeight,ScreenWidth
 
获取共享资源(包括隐藏共享)
WMIC share list brief
 
获取U盘盘符,并运行U盘上的QQ.exe
@for /f "skip=1 tokens=*" %i in ('wmic logicaldisk where "drivetype=2" get name') do (if not "%i"=="" start d:/qq.exe)
 
获得进程当前占用的内存和最大占用内存的大小:
wmic process where caption='filename.exe' get WorkingSetSize,PeakWorkingSetSize
 
更改现有工作组为指定的工作组
wmic computersystem Where "name='计算机名称' call UnjoinDomainOrWorkgroup
 
退出所在域
wmic computersystem Where "name='计算机名称'" call joindomainorworkgroup "",1,"域名称","域管理员密码","域管理员用户名"
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
开2003的3389
wmic RDTOGGLE WHERE ServerName='%COMPUTERNAME%' call
SetAllowTSConnections 1
 
远程打开计算机远程桌面
wmic /node:%pcname% /USER:%pcaccount% PATH win32_terminalservicesetting WHERE (__Class!="") CALL SetAllowTSConnections 1
 
添加的计划任务,wmic添加的同样AT命令也是可以看到
wmic job call create "sol.exe",0,0,true,false,********154800.000000+480
wmic job call create "sol.exe",0,0,1,0,********154600.000000+480
这两句是相同的,TRUE可以用1表示,同样的FALSE可以用0值表示,时间前为何用八个星号,这是WMIC的特性,他显示时间的方式是YYYYMMDDHHMMSS.MMMMMM+时区 ,可是,我们并不需要指定年份和月份还有天,所以用*星号来替代
 
在wmic下查看BIOS信息
wmic bios list full
 
wmic还有停止、暂停和运行服务的功能:
启动服务startservice,停止服务stopservice,暂停服务pauseservice。
具体的命令使用格式就是:
wmic Service where caption=”windows time” call stopservice
●--停止服务
wmic Service where caption=”windows time” call startservice
●--启动服务
wmic Service where name=”w32time” call stopservice
●--停止服务,注意name和caption的区别。
 
 
远程创建进程
wmic /node:109.254.2.102 /user:"rdgad/administrator" /password:"1234" process call create commandline="cmd.exe /k echo xxxxx|clip.exe"




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章