diff --git a/B4nner/Dockerfile b/B4nner/Dockerfile new file mode 100644 index 0000000..0b1234a --- /dev/null +++ b/B4nner/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:22.04 + +RUN apt-get update && \ + apt-get install -y openssh-server less && \ + rm -r /var/lib/apt/lists/* + +RUN useradd -m -d /challenge tawat +COPY challenge/ /challenge +RUN chown -R root:tawat /challenge && \ + mv /challenge/shell /usr/bin/ && \ + chsh -s /usr/bin/shell tawat && \ + echo 'tawat:ctf' | chpasswd && \ + rm -r /etc/update-motd.d/ && \ + ln -s /dev/null .bash_history + +WORKDIR /challenge + +EXPOSE 22 + +ENTRYPOINT service ssh start && tail -f /dev/null diff --git a/B4nner/README.md b/B4nner/README.md new file mode 100644 index 0000000..03e3d7e --- /dev/null +++ b/B4nner/README.md @@ -0,0 +1,19 @@ +# B4nner + +- **`Author:`** [SlyPex](https://github.com/SlyPex) +- **`CTF:`** [HackINI2K23](https://github.com/Shellmates/HackINI-2k23-public) +- **`Categorie:`** Linux +- **`Difficulty:`** Easy + +## Description + +> I made a cool banner for the CTF, What do you think ? + + +- **Connect with** `ssh tawat@localhost -p 1337` +- **password** `ctf` + + + +## Solution +Solution of the challenge can be found [here](solution/). diff --git a/B4nner/challenge.yml b/B4nner/challenge.yml new file mode 100644 index 0000000..0adb390 --- /dev/null +++ b/B4nner/challenge.yml @@ -0,0 +1,33 @@ +author: SlyPex +author_link: https://github.com/SlyPex +category: misc +connection_info: ssh ctf@b4nner.ctf.shellmates.club -o ProxyCommand="openssl s_client + -quiet -connect b4nner.ctf.shellmates.club:443 -servername b4nner.ctf.shellmates.club" +deployment: + autoban: false + conn_type: ssh + containerPort: 22 + deployed: true + isolate: false + name: b4nner + nodePort: 30201 + type: tcp +description: "> I made a cool banner for the CTF, What do you think ? \n\n**Password:**\ + \ ctf \n **Author**: SlyPex" +difficulty: easy +extra: + decay: 15 + initial: 500 + minimum: 50 +flags: +- shellmates{y0U_D0_KNOw_7hE_LEs$_C0MmAND} +name: B4nner +state: visible +tags: +- Linux +- Jail +- RTFM +type: dynamic +value: 500 +version: '0.1' +wave: 1 diff --git a/B4nner/challenge/banner b/B4nner/challenge/banner new file mode 100644 index 0000000..1fe0959 --- /dev/null +++ b/B4nner/challenge/banner @@ -0,0 +1,11 @@ + + + ## ## ### ###### ## ## #### ## ## #### ####### ## ## ####### ####### + ## ## ## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ## + ## ## ## ## ## ## ## ## #### ## ## ## ## ## ## ## + ######### ## ## ## ##### ## ## ## ## ## ####### ##### ####### ####### + ## ## ######### ## ## ## ## ## #### ## ## ## ## ## ## + ## ## ## ## ## ## ## ## ### ## ## ### ## ## ## ## ## ## ## + ## ## ## ## ###### ## ## ### #### ## ## #### ####### ######### ## ## ######### ####### + + diff --git a/B4nner/challenge/flag.txt b/B4nner/challenge/flag.txt new file mode 100644 index 0000000..3689f72 --- /dev/null +++ b/B4nner/challenge/flag.txt @@ -0,0 +1 @@ +shellmates{y0U_D0_KNOw_7hE_LEs$_C0MmAND} diff --git a/B4nner/challenge/shell b/B4nner/challenge/shell new file mode 100755 index 0000000..b4bf2bc --- /dev/null +++ b/B4nner/challenge/shell @@ -0,0 +1,4 @@ +#!/bin/sh + +exec less /challenge/banner +exit 0 diff --git a/B4nner/docker-compose.yml b/B4nner/docker-compose.yml new file mode 100644 index 0000000..04d2e5a --- /dev/null +++ b/B4nner/docker-compose.yml @@ -0,0 +1,15 @@ +services: + b4nner: + container_name: misc_b4nner + build: . + image: b4nner_chall:latest + ports: + - '1337:22' + deploy: + replicas: 1 + restart_policy: + condition: on-failure + resources: + limits: + cpus: '0.2' + memory: 50M diff --git a/B4nner/solution/README.md b/B4nner/solution/README.md new file mode 100644 index 0000000..5349bd0 --- /dev/null +++ b/B4nner/solution/README.md @@ -0,0 +1,9 @@ +# B4nner + +## Write-up + +- Inside the `less` command you need to **examine** another file by typing `:e` and then the file name `flag.txt`. + +## Flag + +`shellmates{y0U_D0_KNOw_7hE_LEs$_C0MmAND}`