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"




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