1000 zips
Hello, I have a very simple challenge idea in mind. It can be added to coding section.
Idea : idea is that user will be provided with a zip/tar file. Which has been zipped/compressed 1000 times. Once you reach to last compression, you will get a txt file which will have the answer.
JAYSSJ11- “I’d rather be hated for who I am, than loved for who I am not.”
wasn’t that on the picoctf this year? remember doing something similar. Still a nice beginner challenge though
I break stuff….. a lot
It could be even better if the compression format is not always the same, like a tar in a zip in a rar…
@depressed We will be glad to help you if you have any question regarding the levels, but please post in appropriate threads.
Here is a script I made that could generate such a file:
#!/bin/bash original="secret.txt" fname=$original for i in {0..1000..1} do case $(echo $RANDOM % 6 | bc) in 0) nfname="$RANDOM.zip" zip $nfname $fname >> /dev/null echo "$i Zip $nfname" ;; 1) nfname="$RANDOM.7z" 7z a $nfname $fname >> /dev/null echo "$i 7zip $nfname" ;; 2) nfname="$RANDOM.tar.gz" tar -czf $nfname --owner defendtheweb $fname echo "$i GZ tar $nfname" ;; 3) nfname="$RANDOM.tar.bz2" tar -cjf $nfname --owner defendtheweb $fname echo "$i BZ2 tar $nfname" ;; 4) nfname="$RANDOM.tar.xz" tar -cJf $nfname --owner defendtheweb $fname echo "$i XZ tar $nfname" ;; 5) nfname="$RANDOM.rar" rar a $nfname $fname >> /dev/null echo "$i RAR $nfname" esac if [ "$fname" != "$original" ] then rm $fname fi fname=$nfname done
Of course additional formats could be added but I think, this is already enough.
I used to have an old signature containning echo "ls -Rla /" >> ~/.bashrc
, had to change it because newcomers started posting about strange issues with their terminal on the forum.
Some people execute code without thinking, but unless rar, tar, 7z or zip crashes your system, you are safe here.
Unless you replace the secret.txt
with *
and remove the if statement, you are safe. It could be a good idea for a trolling / sensitization ransomware (no, don’t do it).
@WHGhost I remember banging our head because we couldn’t know what happened to him and someone suggested that it might have been your signature. Gold days
Message me anytime!
Yeah we can mix things up a bit . Like a combination of zip, tar and rar. Yeah this challenge was in PICO CTF this year but this type of challenge is pretty common. Seen those in past too.
But again I think it serves as a good basic coding challenge.
JAYSSJ11- “I’d rather be hated for who I am, than loved for who I am not.”
I had to solve a very similar challenge in a cyber-security training course in 2018. It wasn’t very fun, by the way… however maybe that could fit well for a beginner chall.