BC-SECURITY / Empire

Empire is a post-exploitation and adversary emulation framework that is used to aid Red Teams and Penetration Testers.
https://bc-security.gitbook.io/empire-wiki/
BSD 3-Clause "New" or "Revised" License
4.06k stars 564 forks source link

[BUG] windows_launcher_bat stager seems to be broken #731

Closed bz-coro closed 1 month ago

bz-coro commented 1 month ago

Is there an existing issue for this?

Empire Version

5.4.2 Kali

Python Version

3.11.9

Operating System

Kali

Database

SQLite

Current Behavior

When trying to execute windows_launcher_bat payload it fails with error: 'iex' is not recognized as an internal or external command, operable program or batch file.

This can be fixed by double-quoting the command passed to powershell. The bug was introduced here: https://github.com/BC-SECURITY/Empire/commit/b6575e00ac066a8d87d2f62630ca7d460c2e2733#diff-d41d1030905fb82c8a4b5026769898c0085cf7e3e23865b480940a62ae90c275R104

Expected Behavior

Launcher works.

Steps To Reproduce

  1. Generate windows_launcher_bat
  2. Try executing it on a target machine.

Anything else?

No response

bz-coro commented 1 month ago

Ok, it was fixed in 5.6.3, but Kali is stuck on old release... duh...