Empire icon indicating copy to clipboard operation
Empire copied to clipboard

Powershell stager for http(s) listener

Open zinzloun opened this issue 6 years ago • 4 comments

Empire Version

2.5

OS Information (Linux flavor, Python version)

kali-rolling 2019.1 x64, py 2.7.15+

Expected behavior and description of the error, including any actions taken immediately prior to the error. The more detail the better.

The powershell stagers script created for the http listener, having https enabled, when executed generates an error in the communication channel with the server. The problem is the TLS protocol version used by default in powershell cli which is 1.0 Tested on

  • win10pro x64, PS version 5.1
  • win 7pro SP1 x64, PS version 3.0

Screenshot of error, embedded text output, or Pastebin link to the error

My http listener configuration http

My stager multi/launcher configuration, also tested with windows/launcher_bat and windows/macro stager

PS payload executed on Win10 ["Request rejected: It's not possible to create a secure SSL\TLS channel..."] ps error win 10

Same thing on Win7 ps tls err win72

Packets exchanged between the server 192.168.1.66 and the win10 machine, same thing happens with the win7 machine wireshark tls err

TLS version of the generated certificate used by the listener listener_cert

Any additional information

I solved the problem forcing the payload agent generation on http.py file to use TLS1.2 diff

I don't know if it's the best approach or solution, in my case it solves all the problems with the stagers empire agents

Any additional comments will be very appreciated. Thank you to the Empire team for this wonderful framework

zinzloun avatar Jan 16 '19 16:01 zinzloun

I this problem and @zinzloun 's solution resolved it for me as well.

kylesmithit avatar Feb 26 '19 00:02 kylesmithit

What Win10 build and .NET version are you running on? I haven't been able to reproduce this.

mr64bit avatar Feb 28 '19 15:02 mr64bit

What Win10 build and .NET version are you running on? I haven't been able to reproduce this.

I do not think that the problem is related to the .Net, as far as I know the .Net set the TLS version available but not the default used in PS. Anyway following the information that you have requested: cattura cattura2

This is the CLR version used in my PS enviroment: cattura3

zinzloun avatar Feb 28 '19 18:02 zinzloun

Can confirm. The same issue happened to me as well and @zinzloun's solution worked.

shinobikitty avatar Apr 18 '19 16:04 shinobikitty