‘Escalate the privileges using capabilities and read the flag.txt file in the “/root” directory. Submit its contents as the answer.’
I already following the step-by-step in module, but when I use ‘echo -e ‘:%s/^root:[^:]*:/root::/\nwq’ | /usr/bin/vim.basic -es /etc/passwd’ then ‘cat /etc/passwd | head -n1’ the ‘x’ from ‘root:x:0:0:root:/root:/bin/bash’ does not disappear, any clue how to remove the x from ‘root:x:0:0:root:/root:/bin/bash’?
same issue fro vim.basic cap_dac capabilty is already set which means we can over write the file but the file is read only that s y i guess we are unable to rewrite the file.
Unable to get any idea how to resolv this
tried lsattr and chattr but nothing is working out