Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aliases Command Parsing - Issue with whitespaces #1827

Open
PhilippRieth opened this issue Dec 9, 2024 · 2 comments
Open

Aliases Command Parsing - Issue with whitespaces #1827

PhilippRieth opened this issue Dec 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@PhilippRieth
Copy link

Describe the bug
Spaces in arguments parsed as part of execute-assembly don't seem to be parsed correctly.

To Reproduce
(SharpPersis.exe is just an example, same issue with other assemblies)

Steps to reproduce the behavior:

  • Parse argument with spaces to execute-assembly
  • Spaces in argument 'My Scheduled Task' do not get parsed properly
sliver (MINIMAL_BIKE) > execute-assembly -i -M /home/user/tools/SharPersist.exe '' -t schtask -m add -a logon -n \"My Scheduled Task\" -c \"C:\\Program Files (x86)\\Program1\\implant.exe\"

[...SharpPersist error here due to the spaces in 'My Scheduled Task'...]
  • What works:
sliver (MINIMAL_BIKE) > execute-assembly -i -M /home/user/tools/SharPersist.exe '' -t schtask -m add -a logon -n \" MyScheduledTask\" -c \"C:\\Program Files (x86)\\Program1\\implant.exe\"
[*] Output:

[*] INFO: Adding scheduled task persistence
[*] INFO: Command: "C:\Program
[*] INFO: Command Args: logon
[*] INFO: Scheduled Task Name: "MyScheduledTask"
[*] INFO: Option:

the MethodInfo::Invoke_3 method returned an error:
The specified resource type cannot be found in the image file.
  • Still, you can see in line [*] INFO: Command: "C:\Program that it did not like the space in "C:\\Program Files (x86)\\Program1\\implant.exe"
  • I tried all sorts of things (Aliases and Extensions | sliver.sh) and can't seem to get the space parsed correctly.

Expected behavior

  • Being able to parse spaces in arguments while using execute-assembly

Sliver Version

  • Server v1.5.42
@Cyb3r-Monk
Copy link

I used a path that does not contain spaces and still couldn't create a scheduled task. Are you able to create it without spaces?

@rkervella rkervella added the bug Something isn't working label Dec 30, 2024
@rkervella
Copy link
Member

That's a bug. I fixed it in v1.6 but there has not been a backport to v1.5-master yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants