Open AkechiShiro opened 7 months ago
I believe that the tool should have the permission to read this file inside the
virtualenvs
folder
I don't believe this is a read issue. In fact /usr/share/netexec/virtualenvs/envs.toml
doesn't exist. On the contrary, I think nxc is trying to create but can't as it's a root / write-protected folder.
➜ ls -lh /usr/share/netexec/virtualenvs/envs.toml
ls: cannot access '/usr/share/netexec/virtualenvs/envs.toml': No such file or directory
Once you executed the tool a root with sudo once, the file is created. You still have the issue after that, but you don't have the issue as long as you run it as root.
➜ sudo nxc…
Using virtualenv: /usr/share/netexec/virtualenvs/netexec-PWU1S8Zj-py3.11
…
➜ nxc…
[Errno 13] Permission denied: '/usr/share/netexec/virtualenvs/envs.toml'
nxc is able to read it as everyone, but it's writing that is required at each execution.
➜ ls -ls /usr/share/netexec/virtualenvs/envs.toml
4 -rw-r--r-- 1 root root 51 janv. 26 09:21 /usr/share/netexec/virtualenvs/envs.toml
It's not an issue of nxc but rather of the poetry virtualenv.
There is maybe an option to circumvent that with poetry so if you find how, let me know.
Thanks, I'll try to have a look at poetry and let you know if I find anything, you are correct the file does not exists.
I do agree with you this is an issue with peotry and not netexec.
I did not find any existing functionality not working as intended, I'm reporting this bug just for documentation purpose and if someone wants to further investigate a possible fix in the future.
Bug description
netexec
run as user after installation cannot readenvs.toml
in virtualenvs, I don't think this is as intended, or are we supposed to runnetexec
as root ?Steps to reproduce
sudo pacman -S netexec
netexec
as a normal user.Actual result: Describe here what happens after you run the steps above (i.e. the buggy behaviour) The tool works fine but fails to read this configuration file :
Expected result: Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour) I believe that the tool should have the permission to read this file inside the
virtualenvs
folder, however I'm not sure about the use case for this file, it seems related to the poetry virtual environment.Screenshots
Info for developers
GNU/Linux distribution: ArchLinux with BlackArch repositories added. Tool version: v1.1.0.r70.g9df72e2f-1
Link to debug log