Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

bandit:rain #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 185 additions & 0 deletions assgn.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
#level 0
ssh [email protected] -p 2220
ls
cat

#level 1
cat ./-

#level2
cat 'spaces in the filename'

#l3
ls -a
cat .hidden

level #4
cd inhere
file ./*
cat ./-file07

level#5
find -size 1033c

level#6
cd ..
find -user bandit7 -group bandit6 -size 33c

level#7
cat data.txt | grep 'millionth'

level #8
cat data.txt | sort | uniq -c

level #9
strings data.txt | grep "==="

level#10
cat data.txt|base64 -d

level#11
cat data.txt|tr 'A-Za-z' 'N-ZA-Mn-za-m'

level#12
cat data.txt|xxd -r > data
file data
mv data data.gz
gzip -d data.gz
file data
mv data data.bz2
bzip2 -d data.bz2
mv data data.gz
gzip -d data
file data
mv data data.tar
tar -x -f data.tar
file data5.bin
mv data5.bin data5.tar
tar -x -f data5.tar
file data6
mv data6.bin data6.bz2
bzip2 -d data6.bz2
file data6
mv data6 data6.tar
tar -xf data6.tar
file data8.bin
mv data8.bin data8.gz
gzip -d data8.gz
file data8
cat data8

level#13
ssh bandit14@localhost -i sshkey.private

level#14
cat /etc/bandit_pass/bandit14
nc localhost 30000
fGrHPx402xGC7U7rXKDaxiWFTOiF0ENq

level 15
openssl s_client localhost:30001

level 16
nmap 31000-32000 localhost
openssl s_client localhost:31790

-----BEGIN RSA PRIVATE KEY-----
MIIEogIBAAKCAQEAvmOkuifmMg6HL2YPIOjon6iWfbp7c3jx34YkYWqUH57SUdyJ
imZzeyGC0gtZPGujUSxiJSWI/oTqexh+cAMTSMlOJf7+BrJObArnxd9Y7YT2bRPQ
Ja6Lzb558YW3FZl87ORiO+rW4LCDCNd2lUvLE/GL2GWyuKN0K5iCd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3KPwYWt0O6CdTkmJOmL8Ni
blh9elyZ9FsGxsgtRBXRsqXuz7wtsQAgLHxbdLq/ZJQ7YfzOKU4ZxEnabvXnvWkU
YOdjHdSOoKvDQNWu6ucyLRAWFuISeXw9a/9p7ftpxm0TSgyvmfLF2MIAEwyzRqaM
77pBAoGAMmjmIJdjp+Ez8duyn3ieo36yrttF5NSsJLAbxFpdlc1gvtGCWW+9Cq0b
dxviW8+TFVEBl1O4f7HVm6EpTscdDxU+bCXWkfjuRb7Dy9GOtt9JPsX8MBTakzh3
vBgsyi/sN3RqRBcGU40fOoZyfAMT8s1m/uYv52O6IgeuZ/ujbjY=
-----END RSA PRIVATE KEY-----
cd /tmp
mkdir mydir123
cd mydir123
touch new.txt
vim new.txt
chmod 400 new.txt
ssh bandit17@localhost -p 2220 -i new.txt

level 17
diff passwords.new passwords.old

level 18

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of doing ssh along with the linux command in both lines?

ssh [email protected] -p 2220 ls -la
ssh [email protected] -p 2220 cat readme

level 19
ls -l
file bandit20-do
./bandit20-do
./bandit20-do cat /etc/bandit_pass/bandit20

level 20

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of ./suconnect?

ls -l
./suconnect
nc -lp 4209
---in new terminal
./suconnect 4209
--in first terminal
lvl20pass
got back lvl21 pass

level 21
cd /etc/cron.d
cat cronjob_bandit22
cd /usr/bin
cat /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv

level 22
cd /etc/cron.d/
cat cronjob_bandit23
cd /usr/bin/
cat cronjob_bandit23.sh
echo I am user bandit23|md5sum|cut -d ' ' -f 1
cat /tmp/8ca319486bfbbc3663ea0fbe81326349

level 23
cd /etc/cron.d/
cat cronjob_bandit24
cat /usr/bin/cronjob_bandit24.sh
mkdir /tmp/newdir123
chmod 777 /tmp/newdir123
cd /tmp/newdir123
vim file.sh
--make bash script for cron--

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the bash script that you wrote?

cp file.sh /var/spool/bandit24/foo
cat paasnew

level 24
cd /tmp/newdir123
vim brute.sh
---write script--

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the script

chmod +x brtue.sh
./brute.sh
cat combinations.txt
cat combinations.txt | nc localhost 30002 > result.txt
cat result.txt | sort | uniq -c