From 46a8aa85bdb7ee19544e56188740f67b0f5b964d Mon Sep 17 00:00:00 2001 From: ARZ <60057481+AbdullahRizwan101@users.noreply.github.com> Date: Thu, 9 Sep 2021 17:23:19 +0500 Subject: [PATCH] Update Cheat Sheet.md --- Cheat Sheet.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cheat Sheet.md b/Cheat Sheet.md index 476816c..20731f4 100644 --- a/Cheat Sheet.md +++ b/Cheat Sheet.md @@ -226,7 +226,7 @@ sudo /usr/bin/ln ``` ### Escaping restricted Shell (rbash) -Using vi editor +#### Using vi editor ``` : set shell =/bin/sh @@ -236,6 +236,10 @@ Then setting the PATH variable `/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin` +#### Using -t 'bash --noprofile' + +When logging in with ssh we can using -t to enable pseudo-tty allocation and then we can change the PATH and SHELL varaible + ### Tar Exploitation When ever you see a cronjob running with a command `cd //andre/backup tar -zcf //filetar.gz *` go to that folder from which a backup is being created and running these command in that directory