Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added B4nner Challenge #5

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
20 changes: 20 additions & 0 deletions B4nner/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions B4nner/README.md
Original file line number Diff line number Diff line change
@@ -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/).
33 changes: 33 additions & 0 deletions B4nner/challenge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
author: SlyPex
author_link: https://github.com/SlyPex
category: misc
connection_info: ssh [email protected] -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
11 changes: 11 additions & 0 deletions B4nner/challenge/banner
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@


## ## ### ###### ## ## #### ## ## #### ####### ## ## ####### #######
## ## ## ## ## ## ## ## ## ### ## ## ## ## ## ## ## ## ## ##
## ## ## ## ## ## ## ## #### ## ## ## ## ## ## ##
######### ## ## ## ##### ## ## ## ## ## ####### ##### ####### #######
## ## ######### ## ## ## ## ## #### ## ## ## ## ## ##
## ## ## ## ## ## ## ## ### ## ## ### ## ## ## ## ## ## ##
## ## ## ## ###### ## ## ### #### ## ## #### ####### ######### ## ## ######### #######


1 change: 1 addition & 0 deletions B4nner/challenge/flag.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shellmates{y0U_D0_KNOw_7hE_LEs$_C0MmAND}
4 changes: 4 additions & 0 deletions B4nner/challenge/shell
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

exec less /challenge/banner
exit 0
15 changes: 15 additions & 0 deletions B4nner/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions B4nner/solution/README.md
Original file line number Diff line number Diff line change
@@ -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}`