Skip to main content

Bandit 8 Over The Wire

Lessons Learned

how to sort strings, then find the only unique string in a file.

Logging in

On a kali vm/ linux machine
Type:

ssh bandit8@bandit.labs.overthewire.org -p 2220 
cvX2JJa4CFALtqS87jk27qwqGhBM9plV

Completing The Challenge

The Goal:

password for next level located in the file data.txt and is the only line of text that occurs only once

The Solution:

bandit8@bandit:~$ ls data.txt 
bandit8@bandit:~$ sort data.txt | uniq -c | grep '1 ' 
1 UsvVyFSfZZWbi6wgC7dAFyFuR6jQQUhR

sort sorts lines in a file and groups them together
uniq returns only one of each unique line
-c is a counter
grep searches for a string
'1 ' avoids any string that doesn't end in 1specifically any string that ends with a one followed by a space

Comments

Popular posts from this blog

Network Services

Network Services https://tryhackme.com/room/networkservices 3. Enumerating SMB Conduct an nmap scan of your choosing, How many ports are open? running nmap 10.10.197.190 results in PORT STATE SERVICE 22/tcp open ssh 139/tcp open netbios-ssn 445/tcp open microsoft-ds MAC Address: 02:21:CD:94:98:F5 (Unknown) Show/Hide What ports is SMB running on? 139/445 Show/Hide this is the known default values for SMB Let's get started with Enum4Linux, conduct a full basic enumeration. For starters, what is the workgroup name? WORKGROUP Show/Hide looking at the rest of the info from enum4linux -a 10.10.197.190 ill summarize here ========================== | Target Information | ========================== Target ........... 10.10.197.190 RID Range ........ 500-550,1000-1050 Username ......... '' Password ......... '' Known Usernames .. administrator, guest, krbtgt, domain admins, root, bin, none =================================================...

Snort Challenge - The Basics

Rules Ive Used # This file intentionally does not come with signatures.  Put your local # additions here. # alert icmp any any <> any any (msg: "IP ID 35369 Found"; id:35369; sid: 1000001; rev:1) # log tcp any any <> any any (msg: "ALL SYN FLAGS"; flags:S;  sid: 1000001; rev:1;) # log tcp any any <> any any (msg: "ALL SYN FLAGS"; flags:P,A;  sid: 1000001; rev:1;) # log ip any any <> any any (msg: "SAME-IP IN IP"; sameip; sid:1000001; rev:1;)#This was not used in the first snort, they only wanted the next 2 rules, which showed less dups log udp any any <> any any (msg: "SAME-IP IN TCP"; sameip; sid:1000001; rev:1;) log tcp any any <> any any (msg: "SAME-IP IN UDP"; sameip; sid:1000002; rev:1;)  Snort Params: Some Sniffer mode parameters are explained in the table below; Parameter Description -v Verbose. Display the TCP/IP output in the console. -d Display the packet data (payload). -e Display...

Bandit 13 Over The Wire

Lessons Learned using ssh -i filename user@localhost which is the private key ssh connection Logging in On a kali vm/ linux machine Type: ssh bandit13@bandit.labs.overthewire.org -p 2220 8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL Completing The Challenge The Goal: The password for the next level is stored in /etc/bandit_pass/bandit14 and can only be read by user bandit14 . For this level, you don’t get the next password, but you get a private SSH key that can be used to log into the next level. Note: localhost is a hostname that refers to the machine you are working on The Solution: ssh -i sshkey.private bandit14@localhost the above command is use because we already have the private key. private keys should be used very carefully. Since we are already on the machine that hosts Bandit Over The Wire, we don't need to call the correct name, localhost will means the machine talks to itself. I don't know why, but specifying a port here caused issues. My assumption is the profiles is listeni...