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

Bash script should find writeable location #57

Closed
lachlan2k opened this issue Aug 6, 2022 · 2 comments
Closed

Bash script should find writeable location #57

lachlan2k opened this issue Aug 6, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@lachlan2k
Copy link
Contributor

Currently, bash script links (ending in .sh), try and temporarily write the file in whatever directory it is run.
However, often when popping web RCE, the invoking user doesn't have permission to write in the current directory.
It would be cool if the script were to first try other folders like /tmp, /dev/shm, etc, before resorting to writing in the current directory.

Thank :)

@NHAS
Copy link
Owner

NHAS commented Aug 7, 2022

Huh, I was of the impression that if the script could be written to the current directory, it would also be able to write the binary. I'll have a look into this.

My only concern, is that people often set noexec on /tmp

@NHAS NHAS added the bug Something isn't working label Aug 7, 2022
@NHAS
Copy link
Owner

NHAS commented Aug 7, 2022

I've added a commit for this on unstable branch. Feel free to try it out

@NHAS NHAS closed this as completed Aug 7, 2022
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

2 participants