bandit Archives - ProdSens.live https://prodsens.live/tag/bandit/ News for Project Managers - PMI Tue, 02 Jan 2024 00:24:34 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 https://prodsens.live/wp-content/uploads/2022/09/prod.png bandit Archives - ProdSens.live https://prodsens.live/tag/bandit/ 32 32 Bandit Level 21 Level 22 https://prodsens.live/2024/01/02/bandit-level-21-level-22/?utm_source=rss&utm_medium=rss&utm_campaign=bandit-level-21-level-22 https://prodsens.live/2024/01/02/bandit-level-21-level-22/#respond Tue, 02 Jan 2024 00:24:34 +0000 https://prodsens.live/2024/01/02/bandit-level-21-level-22/ bandit-level-21-level-22

Introduction Welcome back, fearless hacker, to the Bandit challenges! In this level, we’ll learn to exploit cron jobs…

The post Bandit Level 21 Level 22 appeared first on ProdSens.live.

]]>
bandit-level-21-level-22

Introduction

Welcome back, fearless hacker, to the Bandit challenges! In this level, we’ll learn to exploit cron jobs and bashscript files.

Previous Flag

NvEJF7oVjkddltPSrdKEFOllh9V1IBcq

Exploring Cron Jobs

Our path to the next flag begins with exploring the cron jobs on the system. Let’s list the contents of the /etc/cron.d/ directory:

ls -la /etc/cron.d/

This reveals the existence of a cron job named cronjob_bandit22.

Analyzing Cron Job Configuration

Let’s examine the configuration of the cronjob_bandit22:

cat /etc/cron.d/cronjob_bandit22

The output indicates that there’s a scheduled job running every minute as bandit22:

* * * * bandit22 /usr/bin/cronjob_bandit22.sh &> /dev/null

Understanding the Script

cat /usr/bin/cronjob_bandit22.sh

The script does two things: it changes the permissions of a file in /tmp/ and then copies the password for Bandit level 22 into that file.

#!/bin/bash
chmod 644 /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
cat /etc/bandit_pass/bandit22 > /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv

Retrieving the Flag

Now, let’s check the contents of the file in /tmp/:

ls -la /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv
cat /tmp/t7O6lds9S0RqQh9aMcz6ShpAoZKF7fgv

This should unveil the password for Bandit level 22:

Flag:

WdDozAdTM2z9DiFEQ2mGlwngMfj4EZff

The post Bandit Level 21 Level 22 appeared first on ProdSens.live.

]]>
https://prodsens.live/2024/01/02/bandit-level-21-level-22/feed/ 0
Bandit Level 7 Level 8 https://prodsens.live/2023/07/30/bandit-level-7-level-8/?utm_source=rss&utm_medium=rss&utm_campaign=bandit-level-7-level-8 https://prodsens.live/2023/07/30/bandit-level-7-level-8/#respond Sun, 30 Jul 2023 00:25:46 +0000 https://prodsens.live/2023/07/30/bandit-level-7-level-8/ bandit-level-7-level-8

Introduction Bandit level 8 is all about finding a specific word in a file and extracting its value.…

The post Bandit Level 7 Level 8 appeared first on ProdSens.live.

]]>
bandit-level-7-level-8

Introduction

Bandit level 8 is all about finding a specific word in a file and extracting its value. In this level, we are given a file called data.txt and are tasked with finding the value of a specific word.

Steps

  1. Connect to the Bandit server using SSH with the following command:
ssh bandit7@bandit.labs.overthewire.org -p 2220
  1. Enter the password for Bandit level 8 when prompted: z7WtoNQU2XfjmMtWA8u5rN4vzqu4v99S.
  2. We are given a file called data.txt. Use the cat command to view the contents of the file:
cat data.txt
  1. We are tasked with finding the value of the word “millionth” in the file. To accomplish this, we can use the grep command to search for the word, and then use the awk command to extract its value. The command to do this is as follows:
cat data.txt | grep millionth | awk -F " " '{print $2}'
  1. After running the command, the value of the word “millionth” will be displayed in the terminal.
TESKZC0XvTetK0S9xNwm25STk5iWrBvP

Conclusion

In this level, we learned how to search for a specific word in a file using the grep command and how to extract its value using the awk command. With this knowledge, we were able to successfully complete the level and obtain the password for the next level.

The post Bandit Level 7 Level 8 appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/07/30/bandit-level-7-level-8/feed/ 0
Bandit Level 4 Level 5 https://prodsens.live/2023/07/23/bandit-level-4-level-5/?utm_source=rss&utm_medium=rss&utm_campaign=bandit-level-4-level-5 https://prodsens.live/2023/07/23/bandit-level-4-level-5/#respond Sun, 23 Jul 2023 03:24:37 +0000 https://prodsens.live/2023/07/23/bandit-level-4-level-5/ bandit-level-4-level-5

Introduction Bandit5 is the sixth level of the OverTheWire Bandit wargame. In this level, we will learn how…

The post Bandit Level 4 Level 5 appeared first on ProdSens.live.

]]>
bandit-level-4-level-5

Introduction

Bandit5 is the sixth level of the OverTheWire Bandit wargame. In this level, we will learn how to use the “file” command to determine the file type of a file and how to read the contents of a specific file. By completing this level, we will gain access to the password for the next level.

Steps

  1. Open your terminal application.
  2. Enter the following command to ssh into the remote server:
ssh bandit4@bandit.labs.overthewire.org -p 2220
  1. You will be prompted to enter a password. Enter the password from the previous level, “2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe”, and hit enter.
  2. You are now connected to the remote server and are able to execute commands.
  3. Enter the following command to view the file types of all files in the “inhere” directory:
file inhere/*
  1. The output will show that all files in the directory are “data” files, except for one file which is a ASCII text file, this human-readable file should contain the password for the next level.
  2. Enter the following command to read the contents of the file with the name “-file07” in the “inhere” directory:
cat inhere/-file07
  1. The output should show the password for the next level: lrIWWI6bB37kxfiCQZqUdOIYfr6eEeqR.

Congratulations! You have successfully completed Bandit5 and gained access to the password for the next level.

Conclusion

In this level, we learned how to use the “file” command to determine the file type of a file and how to read the contents of a specific file. These are important skills to have when working with files in Linux command line, and mastering them will be useful for solving future levels in the OverTheWire Bandit wargame.

The post Bandit Level 4 Level 5 appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/07/23/bandit-level-4-level-5/feed/ 0
Bandit Level 3 Level 4 https://prodsens.live/2023/07/17/bandit-level-3-level-4/?utm_source=rss&utm_medium=rss&utm_campaign=bandit-level-3-level-4 https://prodsens.live/2023/07/17/bandit-level-3-level-4/#respond Mon, 17 Jul 2023 04:25:51 +0000 https://prodsens.live/2023/07/17/bandit-level-3-level-4/ bandit-level-3-level-4

Introduction Bandit4 is the fifth level of the OverTheWire Bandit wargame. In this level, we will learn how…

The post Bandit Level 3 Level 4 appeared first on ProdSens.live.

]]>
bandit-level-3-level-4

Introduction

Bandit4 is the fifth level of the OverTheWire Bandit wargame. In this level, we will learn how to search for files that start with a dot and how to read the contents of a hidden file. By completing this level, we will gain access to the password for the next level.

Steps

  1. Open your terminal application.
  2. Enter the following command to ssh into the remote server:
ssh bandit3@bandit.labs.overthewire.org -p 2220
  1. You will be prompted to enter a password. Enter the password from the previous level, “aBZ0W5EmUfAf7kHTQeOwd8bauFJ2lAiG”, and hit enter.
  2. You are now connected to the remote server and are able to execute commands.
  3. Enter the following command to search for files that start with a dot in the “inhere” directory:
find /home/bandit3/inhere/ -name ".*"
  1. The output should show a file path that ends with “.hidden”. In this case, the path is /home/bandit3/inhere/.hidden.
  2. Enter the following command to read the contents of the hidden file:
cat /home/bandit3/inhere/.hidden
  1. The output should show the password for the next level: 2EW7BBsr6aMMoJ2HjW067dm8EgX26xNe.

Congratulations! You have successfully completed Bandit4 and gained access to the password for the next level.

Conclusion

In this level, we learned how to search for files that start with a dot and how to read the contents of a hidden file. These are important skills to have when working with files in Linux command line, and mastering them will be useful for solving future levels in the OverTheWire Bandit wargame.

The post Bandit Level 3 Level 4 appeared first on ProdSens.live.

]]>
https://prodsens.live/2023/07/17/bandit-level-3-level-4/feed/ 0