OWT bandit level 22->23 problem
In bandit level 22 you have to look in /etc/cron.d/ for the configuration and see what com 2025-1-3 13:48:0 Author: www.reddit.com(查看原文) 阅读量:7 收藏

In bandit level 22 you have to look in /etc/cron.d/ for the configuration and see what command is being executed(I found that it is this /usr/bin/cronjob_bandit23.sh).

------------------------------------------------------------ this is the script

#!/bin/bash

myname=$(whoami)

mytarget=$(echo I am user $myname | md5sum | cut -d ' ' -f 1)

echo "Copying passwordfile /etc/bandit_pass/$myname to /tmp/$mytarget"

cat /etc/bandit_pass/$myname > /tmp/$mytarget

---------------------------------------------------------------------------

so i ran echo I am user bandit23 | md5sum | cut -d ' ' -f 1

and got 8ca319486bfbbc3663ea0fbe81326349 , but there is a problem with this level, as the file created by the script is only readable by bandit23.

-r-------- 1 bandit23 bandit23 0 Jan 3 04:42 /tmp/8ca319486bfbbc3663ea0fbe81326349

any idea how to solve this

edit: OTW :( it is a typing mistake.


文章来源: https://www.reddit.com/r/HowToHack/comments/1hsmu2b/owt_bandit_level_2223_problem/
如有侵权请联系:admin#unsafe.sh