App - Script

Sunday 8 November 2020, 12:55  #1
App - Script - shell Restriction step 13-14 rbash —
ertosns
  • 2 posts

I’m stuck at the final step, where rbash — is executed with -14 privilege, i tried options compounded with rbash —, but the sudoer is set for option rbash — exclusively.

I’m can’t modify the home directory .bashrc at any step, because it’s read-only mount, so the privilege must be during the rbash execution, which doesn’t accept any other option... contradiction!

PATH for step 14 is set inside step14, and i have tested out all possible commands that can escalate privilege, but doesn’t seem available under this restricted PATH... any thoughts?

Friday 13 November 2020, 17:02  #2
App - Script - shell Restriction step 13-14 rbash —
agregate
  • 2 posts

I’m having the same problem. It seems the only commands we can run are those listed under compgen -c and we can’t modify the arguments to enter the shell either...

Saturday 14 November 2020, 03:21  #3
App - Script - shell Restriction step 13-14 rbash —
agregate
  • 2 posts

Nevermind, I found the solution.
As a hint without spoiling too much, you haven’t done anything incorrect, it is necessary to open the shell in rbash with the — argument.
You need to look for two things in the restricted shell: a command you can execute and a certain file that the user owns.