nettitude / PoshC2

A proxy aware C2 framework used to aid red teamers with post-exploitation and lateral movement.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] upload-file crashes when invoked with -source and -destination

ashr opened this issue · comments

commented

Description

upload-file implant alias crashes when invoked with 'upload-file -source sourcefilename -destination "destination"'

Execution Environment:

All of this must be filled in

Data Value
Full Posh version (all the text between the === at the top of the Implant Handler) PoshC2 v7.4.0 (f6664b1 2021-04-26 19:49:40)
OS & version Ubuntu 18.04.6 LTS
Using Docker/containerisation? No

Implant Info

  • What implant does the problem occur on?
    C# and PowerShell, have not tested python

  • How was the implant created? Running a default payload? Inject-shellcode? Custom payload?
    Custom payloads using x86 implants

Defensive Technologies

  • Is the target environment running any particular defensive products? AVs/EDRs etc?
    No

To Reproduce

Steps to reproduce the behavior:

  1. Run implant on target
  2. Select implant through posh client
  3. Invoke upload-file as per the help instruction 'upload-file -source /tmp/test.exe -destination "c:\temp\test.exe"'

Expected behavior

File upload success or a File not found exception or Destination path doesn't exist exception

Screenshots

Client view:
image

Attach files if required

Additional context

Typing 'upload-file' with no parameters causes a prompt for the source and destination and the functionality then works as expected. (Thank you m0rv4i for this)