-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:cybermouflons/CCSC-CTF-2024
- Loading branch information
Showing
32 changed files
with
486 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: "Drone Army" | ||
author: "rok0s" | ||
category: reverse | ||
|
||
description: | | ||
OrionTech's drones are controlled by a highly encrypted program that autonomously manages surveillance operations. Your goal is to reverse engineer this program to uncover its internal mechanisms and secrets, allowing you to hijack control of the drone fleet. | ||
value: 500 | ||
type: dynamic | ||
extra: | ||
initial: 500 | ||
minimum: 100 | ||
decay: 25 | ||
|
||
flags: | ||
- reverse/arm_bkp/poc.py | ||
|
||
tags: | ||
- reverse | ||
|
||
files: | ||
- "public/drone_army.s" | ||
|
||
state: visible | ||
version: "0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.section .data | ||
aa: .space 32 | ||
ac: .byte 0x26, 0x65, 0x36, 0x75, 0xe, 0x3a, 0x48, 0x5, 0x7c, 0x23, 0x13, 0x75, 0x2a, 0x72, 0x42, 0x30, 0x43, 0x1c, 0x4e, 0x7d, 0xb, 0x38, 0x4a, 0x7f, 0x1a, 0x5e, 0x7f, 0x5e, 0x23 | ||
|
||
sm: .asciz "Success!\n" | ||
fm: .asciz "Try again...\n" | ||
|
||
.section .text | ||
.global _start | ||
|
||
_start: | ||
mov x0, 0 | ||
ldr x1, =aa | ||
mov x2, 32 | ||
mov x8, 63 | ||
svc 0 | ||
mov x3, x0 | ||
sub x3, x3, #1 | ||
mov x4, #29 | ||
cmp x3, x4 | ||
bne dd | ||
ldr x1, =aa | ||
mov x4, 0x65 | ||
mov x5, 0 | ||
al: | ||
cmp x5, x3 | ||
bge bd | ||
ldrb w6, [x1, x5] | ||
eor w6, w6, w4 | ||
strb w6, [x1, x5] | ||
mov w4, w6 | ||
add x5, x5, 1 | ||
b al | ||
bd: | ||
ldr x6, =ac | ||
mov x7, 0 | ||
mov x8, 1 | ||
cbl: | ||
cmp x7, x3 | ||
bge bb | ||
ldrb w9, [x1, x7] | ||
ldrb w10, [x6, x7] | ||
cmp w9, w10 | ||
bne cbf | ||
add x7, x7, 1 | ||
b cbl | ||
cbf: | ||
mov x8, 0 | ||
b bb | ||
bb: | ||
cmp x8, 1 | ||
bne dd | ||
ldr x1, =sm | ||
mov x2, #10 | ||
b de | ||
dd: | ||
ldr x1, =fm | ||
mov x2, #13 | ||
de: | ||
mov x0, 1 | ||
mov x8, 64 | ||
svc 0 | ||
mov x0, 0 | ||
mov x8, 93 | ||
svc 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
.section .data | ||
aa: .space 32 | ||
ac: .byte 0x26, 0x65, 0x36, 0x75, 0xe, 0x3a, 0x48, 0x5, 0x7c, 0x23, 0x13, 0x75, 0x2a, 0x72, 0x42, 0x30, 0x43, 0x1c, 0x4e, 0x7d, 0xb, 0x38, 0x4a, 0x7f, 0x1a, 0x5e, 0x7f, 0x5e, 0x23 | ||
|
||
sm: .asciz "Success!\n" | ||
fm: .asciz "Try again...\n" | ||
|
||
.section .text | ||
.global _start | ||
|
||
_start: | ||
mov x0, 0 | ||
ldr x1, =aa | ||
mov x2, 32 | ||
mov x8, 63 | ||
svc 0 | ||
mov x3, x0 | ||
sub x3, x3, #1 | ||
mov x4, #29 | ||
cmp x3, x4 | ||
bne dd | ||
ldr x1, =aa | ||
mov x4, 0x65 | ||
mov x5, 0 | ||
al: | ||
cmp x5, x3 | ||
bge bd | ||
ldrb w6, [x1, x5] | ||
eor w6, w6, w4 | ||
strb w6, [x1, x5] | ||
mov w4, w6 | ||
add x5, x5, 1 | ||
b al | ||
bd: | ||
ldr x6, =ac | ||
mov x7, 0 | ||
mov x8, 1 | ||
cbl: | ||
cmp x7, x3 | ||
bge bb | ||
ldrb w9, [x1, x7] | ||
ldrb w10, [x6, x7] | ||
cmp w9, w10 | ||
bne cbf | ||
add x7, x7, 1 | ||
b cbl | ||
cbf: | ||
mov x8, 0 | ||
b bb | ||
bb: | ||
cmp x8, 1 | ||
bne dd | ||
ldr x1, =sm | ||
mov x2, #10 | ||
b de | ||
dd: | ||
ldr x1, =fm | ||
mov x2, #13 | ||
de: | ||
mov x0, 1 | ||
mov x8, 64 | ||
svc 0 | ||
mov x0, 0 | ||
mov x8, 93 | ||
svc 0 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
web/arcane-nebula/challenge.yml → web/arcane-runes/challenge.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "Arcane Nebula" | ||
name: "Arcane Runes" | ||
author: "koks" | ||
category: web | ||
|
||
|
4 changes: 2 additions & 2 deletions
4
web/arcane-nebula/docker-compose.yml → web/arcane-runes/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
web/arcane-nebula/setup/app/package.json → web/arcane-runes/setup/app/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "arcane-nebula", | ||
"name": "arcane-runes", | ||
"module": "index.ts", | ||
"type": "module", | ||
"devDependencies": { | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
web/arcane-nebula/solution/README.md → web/arcane-runes/solution/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Arcane Nebula | ||
# Arcane Runes | ||
|
||
## Solution | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Portal | ||
|
||
[![Try in PWD](https://raw.githubusercontent.com/play-with-docker/stacks/master/assets/images/button.png)](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/cybermouflons/CCSC-CTF-2023/master/web/portal/docker-compose.yml) | ||
|
||
|
||
**Category**: web | ||
|
||
**Author**: YetAnotherAlt123 | ||
|
||
## Description | ||
|
||
We found an admin portal. Do we really need to say more? | ||
|
||
|
||
|
||
## Run locally | ||
|
||
Launch challenge: | ||
``` | ||
curl -sSL https://raw.githubusercontent.com/cybermouflons/CCSC-CTF-2023/master/web/portal/docker-compose.yml | docker compose -f - up -d | ||
``` | ||
|
||
Shutdown challenge: | ||
``` | ||
curl -sSL https://raw.githubusercontent.com/cybermouflons/CCSC-CTF-2023/master/web/portal/docker-compose.yml | docker compose -f - down | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: "Portal" | ||
author: "YetAnotherAlt123" | ||
category: web | ||
|
||
description: | | ||
We found an admin portal. Do we really need to say more? | ||
value: 500 | ||
type: dynamic_docker | ||
extra: | ||
initial: 500 | ||
minimum: 100 | ||
decay: 25 | ||
redirect_type: http | ||
compose_stack: !filecontents docker-compose.yml | ||
|
||
flags: | ||
- CCSC{s1d3_t0_s1d3_4ND_fr0n7_tO_b4ck} | ||
|
||
tags: | ||
- web | ||
- hard | ||
|
||
state: visible | ||
version: "0.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: "3.7" | ||
|
||
services: | ||
challenge: | ||
image: ghcr.io/cybermouflons/ccsc2024/portal:latest | ||
restart: always | ||
ports: | ||
- 3000:3000 | ||
build: | ||
context: ./setup | ||
dockerfile: Dockerfile |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Start with the official Python image | ||
FROM python:3.9-slim | ||
|
||
ENV FLAG=CCSC{s1d3_t0_s1d3_4ND_fr0n7_tO_b4ck} | ||
|
||
# Install Python dependencies | ||
WORKDIR /app | ||
COPY requirements.txt /app/ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
# Copy the app | ||
COPY flag.txt /app | ||
COPY app.py /app | ||
COPY app-dev-version-abccdef.py /app | ||
|
||
RUN echo '#app:x:999:999::/app:/bin/false' >> /etc/passwd | ||
|
||
EXPOSE 3000 | ||
|
||
# Command to start services | ||
CMD python3 app-dev-version-abccdef.py & python3 app.py |
Oops, something went wrong.