NetExec icon indicating copy to clipboard operation
NetExec copied to clipboard

Hitting maximum character limit while executing powershell string

Open papashilingi opened this issue 1 year ago • 2 comments

Describe the bug I am trying to integrate netexec with powershell-empire platform. While incorporating the output from powershell-empire client string, the system bombs out with the Error 'Command exceeds maximum length of 8191 (was 10140). exiting.'

To Reproduce

  1. Open powershell-empire . sudo powershell-empire server

  2. Open powershell-empire client sudo powershell-empire client set up an http listener and attach it to a multi-launcher using usetager

  3. open netexec as below netexec smb ip.add.rr.es - u username -p password -X 'OUTPUT FROM POWERSHELL EMPIRE CLIENT ABOVE'

Expected behavior The expectation is I should be able to register hosts directly from netexec using powershell string generated from powershell.

*Screenshots My output has hashes/ip addresses/passwords of the environment.

NetExec info

  • OS: Linux kali 6.6.15-686-pae #1 SMP PREEMPT_DYNAMIC Kali 6.6.15-2kali1 (2024-05-17) i686 GNU/Linux
  • Version of nxc: 1.2.0 - ItsAlwaysDNS - kali

Additional context Thank you

papashilingi avatar Jun 08 '24 14:06 papashilingi

Thanks for the bug report! We will take a look into it.

NeffIsBack avatar Jun 08 '24 15:06 NeffIsBack

@papashilingi why don't you just use the empire_exec module?

Marshall-Hallenbeck avatar Jun 08 '24 16:06 Marshall-Hallenbeck