Linux Hacking: Shebang & Scripting | Bandit: OverTheWire (Level 23)

Поділитися
Вставка
  • Опубліковано 17 лис 2024

КОМЕНТАРІ • 25

  • @ahnaffaiaz223
    @ahnaffaiaz223 10 місяців тому +3

    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)

    • @meumeowmeow
      @meumeowmeow 24 дні тому

      Thank you so much! I've been stuck at this step for hours, and luckily, I see your comment

  • @remixednuts12345
    @remixednuts12345 3 роки тому +5

    wow, i over thought this 1 so hard haha, thanks for epic walk through man saved

  • @luisguevara8548
    @luisguevara8548 11 місяців тому

    Thank you man, you really made it easy to understand 👍🏽
    Knowledge appreciated.

  • @TheNotoriousFonzy
    @TheNotoriousFonzy 3 роки тому +6

    Awesome. No way I was gonna solve this without help lol

  • @KronK0321
    @KronK0321 6 років тому +2

    5:34
    ls -al /tmp/john3
    would give you permissions of that directory and its parent! No hoping required :)

  • @kanewilliams1653
    @kanewilliams1653 9 місяців тому

    My fave level yet!

  • @bugr33d0_hunter8
    @bugr33d0_hunter8 6 років тому +1

    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.

    • @avishabat5167
      @avishabat5167 6 років тому

      Did you find a solution?
      I'm in the same boat...

    • @bugr33d0_hunter8
      @bugr33d0_hunter8 6 років тому

      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.

  • @johnpaulcastillo8403
    @johnpaulcastillo8403 Рік тому

    I got/foo: in my code, what should I do with it?

  • @lj.youtube0901
    @lj.youtube0901 4 роки тому

    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.

  • @billy-cg1qq
    @billy-cg1qq 6 років тому +1

    awesome video continue bro :)

    • @_JohnHammond
      @_JohnHammond  6 років тому

      Thanks so much! Please let me know if there is anything you'd like to see, I am happy to provide. :)

  • @francity
    @francity 4 роки тому +2

    i don't know why, but running cat /tmp/$(echo I am user bandit24 | md5sum | cut -d ' ' -f 1) worked for me

  • @AliKhan-om5st
    @AliKhan-om5st 2 роки тому

    I am doing it again and again but can't solve this one.

  • @bugr33d0_hunter8
    @bugr33d0_hunter8 6 років тому

    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.

  • @phoenix2464
    @phoenix2464 6 років тому

    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 ?

    • @phoenix2464
      @phoenix2464 6 років тому

      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 :]

  • @Icecrax
    @Icecrax 5 років тому

    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...

  • @dannyv12
    @dannyv12 3 роки тому

    If you don't know what the time annotations mean for a cronjob check out crontab.guru

  • @mohamedfouad2304
    @mohamedfouad2304 6 років тому

    Its aganist the rules to share solutions! l4m3

    • @-antares_
      @-antares_ Рік тому

      Thanks for your words fouad 🙏
      So inspiring

  • @ismailhassan283
    @ismailhassan283 Рік тому +2

    make the script inside the /var/spool/bandit24/foo , and write your script there and it will work
    thanks

  • @grafinte
    @grafinte Рік тому

    foo :)
    Now:
    echo "Executing and deleting all scripts in /var/spool/$myname/foo:"