penelope icon indicating copy to clipboard operation
penelope copied to clipboard

Current working directory not respected

Open lalvarezt opened this issue 4 months ago • 1 comments

I was working on a HTB box and after the initial foothold with user X I escalated to user Y, then I tried to upload a file but it kept the path that I was on from user X (not sure I managed to get the point across 😅)

  • User X was in /home/X
  • su Y
  • cd /tmp
  • detach and try to upload, it goes to /home/X instead of /tmp

A possible workaround is to allow to pass a second argument to upload/download to put the destination path. wdyt?

great tool btw!

lalvarezt avatar Sep 11 '25 11:09 lalvarezt

This is a known issue and it is related somehow to https://github.com/brightio/penelope/discussions/73.

The shell and the agent are independent processes and I need to find a way to maintain the current working directory and the user privileges once the user changes shell process.

A possible workaround is to allow to pass a second argument to upload/download to put the destination path. wdyt?

Yes that would be a temporary workaround until find a way to synchronize the path automatically. I will add it to the roadmap.

Thanks!

brightio avatar Sep 11 '25 11:09 brightio

The best workaround so far is changing directory to /tmp or /var/tmp before switching users. Or getting a new shell from the new user would solve the issue as well.

strikoder avatar Dec 11 '25 05:12 strikoder