To anyone having problems with this problem, follow this video but when write the script in the /tmp folder and the cp it to /var/spool/bandit24/foo (yes the name is changed)
Yeah I'm totally stuck on this one. I've done it over and over again. I've tried it multiple ways to, just doesn't work. I see my file get. Shut, but then it disappears. I try not to spend a whole day on one. If anyone knows any other solution let me know.
I wrote a the bash code in different ways, calling the file different things like, get.sh, dump.sh, grab.sh, ect. Then I named the file "script.sh". Try it yourself, and watch what happens. Weird, but it.... well you'll see.
After many failed attempts, I tried saving the password in /tmp and not /tmp/lee as i was before and it worked. If anyone's not getting the password try this. Hope it helps.
Weird I just tried making another script in nano, cause before I used VI, and I called the script, script.sh, and it opened up the password for me. I don't get this one at all. Does some of the levels act buggy towards you sometimes? Cause every time I tried, like at least 12 times, each time it did something different. So I'm guessing there are multiple ways to get a task done, depending on our own logic and how much we know already? I'm guessing that's the case. Only a guess.
I did not create a dir in /tmp i just made the bash file put a .txt containing the password directly into /tmp (cat /etc/bandit_pass/bandit24 >> /tmp/password.txt) and i forgot to give permissions for all users (chmod 777), yet it worked. why ?
doing an ls -l in the / directory gives us the permissions for linux main files and among them is /tmp, looking at /tmp permissions: drwxrwx-wt 1871 root root 724992 Jun 1 01:36 tmp drwxrwx-wt explains it all. just answered my question :]
Strangely at 2:40 when you tried to list the directory you didn't have any permissions, but I do.. bandit23@bandit:~$ cd /var/spool/bandit24 bandit23@bandit:/var/spool/bandit24$ ls bandit27 bandit28 delirium_28 repo28 repo29 this was the response...
To anyone having problems with this problem, follow this video but when write the script in the /tmp folder and the cp it to /var/spool/bandit24/foo (yes the name is changed)
Thank you so much! I've been stuck at this step for hours, and luckily, I see your comment
wow, i over thought this 1 so hard haha, thanks for epic walk through man saved
Thank you man, you really made it easy to understand 👍🏽
Knowledge appreciated.
Awesome. No way I was gonna solve this without help lol
5:34
ls -al /tmp/john3
would give you permissions of that directory and its parent! No hoping required :)
My fave level yet!
Yeah I'm totally stuck on this one. I've done it over and over again. I've tried it multiple ways to, just doesn't work. I see my file get. Shut, but then it disappears. I try not to spend a whole day on one. If anyone knows any other solution let me know.
Did you find a solution?
I'm in the same boat...
I wrote a the bash code in different ways, calling the file different things like, get.sh, dump.sh, grab.sh, ect. Then I named the file "script.sh". Try it yourself, and watch what happens. Weird, but it.... well you'll see.
I got/foo: in my code, what should I do with it?
After many failed attempts, I tried saving the password in /tmp and not /tmp/lee as i was before and it worked. If anyone's not getting the password try this. Hope it helps.
awesome video continue bro :)
Thanks so much! Please let me know if there is anything you'd like to see, I am happy to provide. :)
i don't know why, but running cat /tmp/$(echo I am user bandit24 | md5sum | cut -d ' ' -f 1) worked for me
I am doing it again and again but can't solve this one.
Weird I just tried making another script in nano, cause before I used VI, and I called the script, script.sh, and it opened up the password for me. I don't get this one at all. Does some of the levels act buggy towards you sometimes? Cause every time I tried, like at least 12 times, each time it did something different. So I'm guessing there are multiple ways to get a task done, depending on our own logic and how much we know already? I'm guessing that's the case. Only a guess.
I did not create a dir in /tmp
i just made the bash file put a .txt containing the password directly into /tmp (cat /etc/bandit_pass/bandit24 >> /tmp/password.txt)
and i forgot to give permissions for all users (chmod 777), yet it worked. why ?
doing an ls -l in the / directory gives us the permissions for linux main files and among them is /tmp,
looking at /tmp permissions: drwxrwx-wt 1871 root root 724992 Jun 1 01:36 tmp
drwxrwx-wt explains it all.
just answered my question :]
Strangely at 2:40 when you tried to list the directory you didn't have any permissions, but I do..
bandit23@bandit:~$ cd /var/spool/bandit24
bandit23@bandit:/var/spool/bandit24$ ls
bandit27 bandit28 delirium_28 repo28 repo29
this was the response...
If you don't know what the time annotations mean for a cronjob check out crontab.guru
Its aganist the rules to share solutions! l4m3
Thanks for your words fouad 🙏
So inspiring
make the script inside the /var/spool/bandit24/foo , and write your script there and it will work
thanks
foo :)
Now:
echo "Executing and deleting all scripts in /var/spool/$myname/foo:"