Skip to content

Commit

Permalink
DUCTF 2023 challenges
Browse files Browse the repository at this point in the history
  • Loading branch information
josephsurin committed Sep 5, 2023
1 parent b03b2a1 commit 96e7aca
Show file tree
Hide file tree
Showing 185 changed files with 5,797 additions and 0 deletions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,35 @@ Fri, 23 Sept. 2022, 19:30 AEST — Sun, 25 Sept. 2022, 19:30 AEST
|[1337crypt v3](downunderctf-2022/1337crypt-v3)|crypto|⭐️⭐️⭐️|2|
|[kyber±](downunderctf-2022/kyber)|crypto|⭐️⭐️⭐️⭐️|1|

# DownUnderCTF 2023
Fri, 01 Sept. 2023, 19:30 AEST — Sun, 03 Sept. 2022, 19:30 AEST

[**Website**](https://duc.tf) | [**CTFTime**](https://ctftime.org/event/1954/) | [**Official Repository**](https://github.com/DownUnderCTF/Challenges_2023_Public)

|Name|Category|Difficulty|Solves|
|---|---|---|---|
|[static file server](downunderctf-2023/static-file-server)|beginner|👶|594|
|[downunderflow](downunderctf-2023/downunderflow)|beginner|👶|521|
|[complementary](downunderctf-2023/complementary)|beginner|👶|436|
|[randomly chosen](downunderctf-2023/randomly-chosen)|beginner|👶|365|
|[flag art](downunderctf-2023/flag-art)|beginner|👶|285|
|[one byte](downunderctf-2023/one-byte)|beginner|👶|189|
|[confusing](downunderctf-2023/confusing)|beginner|👶|157|
|[apbq rsa i](downunderctf-2023/apbq-rsa-i)|crypto|⭐️|126|
|[masked squares flag checker](downunderctf-2023/masked-squares-flag-checker)|rev|⭐️|62|
|[shifty mem](downunderctf-2023/shifty-mem)|pwn|⭐️⭐️|40|
|[mini dns server](downunderctf-2023/mini-dns-server)|misc|⭐️⭐️|39|
|[sideways](downunderctf-2023/sideways)|rev|⭐️⭐️|29|
|[fnv](downunderctf-2023/fnv)|crypto|⭐️⭐️|27|
|[apbq rsa ii](downunderctf-2023/apbq-rsa-ii)|crypto|⭐️⭐️|26|
|[binary mail](downunderctf-2023/binary-mail)|pwn|⭐️⭐️|26|
|[advanced vector expositions](downunderctf-2023/advanced-vector-expositions)|rev|⭐️⭐️⭐️|12|
|[lcg card gimmicks](downunderctf-2023/lcg-card-gimmicks)|crypto|⭐️⭐️|11|
|[number theoretic flag checker](downunderctf-2023/number-theoretic-flag-checker)|rev|⭐️⭐️|9|
|[handshake](downunderctf-2023/handshake)|crypto|⭐️⭐️⭐️|4|
|[encrypted mail](downunderctf-2023/encrypted-mail)|crypto|⭐️⭐️⭐️|3|
|[dilithium±](downunderctf-2023/dilithium)|crypto|⭐️⭐️⭐️⭐️|0|

# Cyber Apocalypse 2023
Sun, 19 March 2023, 00:00 AEDT — Thu, 23 March 2023, 23:59 AEDT

Expand Down
6 changes: 6 additions & 0 deletions ctfs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
description: ""
date: "Fri, 23 Sept. 2022, 19:30 AEST — Sun, 25 Sept. 2022, 19:30 AEST"
repo: https://github.com/DownUnderCTF/Challenges_2022_Public
- name: DownUnderCTF 2023
website: https://duc.tf
ctftime: https://ctftime.org/event/1954/
description: ""
date: "Fri, 01 Sept. 2023, 19:30 AEST — Sun, 03 Sept. 2022, 19:30 AEST"
repo: https://github.com/DownUnderCTF/Challenges_2023_Public
- name: Cyber Apocalypse 2023
website: https://ctf.hackthebox.com/event/details/cyber-apocalypse-2023-the-cursed-mission-821
ctftime: https://ctftime.org/event/1889/
Expand Down
26 changes: 26 additions & 0 deletions downunderctf-2023/advanced-vector-expositions/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# DownUnderCTF 2023 - advanced vector expositions

- **Category:** rev
- **Solves:** 12/2073
- **Difficulty:** ⭐️⭐️⭐️
- **Hosting type:** file
- **Tags:** AVX

---

> Let's read (and write) a book about AVX.

Handout files:

- [./publish/advanced_vector_expositions](./publish/advanced_vector_expositions)

## Solution

Flag: `DUCTF{m4ppy_m4tr1x_avx}`


- [**Solver**](./solve/solv.sage)



17 changes: 17 additions & 0 deletions downunderctf-2023/advanced-vector-expositions/details.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
id: ductf-2023-advanced_vector_expositions
name: advanced vector expositions
category: rev
ctf: DownUnderCTF 2023
difficulty: 3
tags:
- AVX
notes: ''
description: Let's read (and write) a book about AVX.
hosting: file
handout_files:
- ./publish/advanced_vector_expositions
flag: DUCTF{m4ppy_m4tr1x_avx}
solve_stats:
solved_teams: 12
num_teams: 2073
solver: ./solve/solv.sage
Binary file not shown.
67 changes: 67 additions & 0 deletions downunderctf-2023/advanced-vector-expositions/solve/solv.sage
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
A = [[202, 163, 202, 209], [174, 192, 4, 158], [163, 166, 173, 28], [164, 71, 12, 121]]
B = [[67, 179, 65, 81], [143, 85, 122, 152], [166, 9, 164, 172], [229, 188, 132, 154]]
C = [[214, 11, 115, 105], [235, 214, 230, 42], [98, 39, 2, 233], [245, 188, 4, 12]]
W = [[48, 137, 221, 237], [202, 32, 84, 224], [16, 184, 215, 110], [11, 228, 224, 92]]
BASE0 = [[23, 116, 107, 137], [55, 206, 120, 132], [45, 163, 18, 104], [222, 243, 65, 66]]
BASE1 = [[76, 44, 178, 28], [15, 250, 228, 140], [68, 166, 19, 235], [233, 18, 122, 80]]
BASE2 = [[240, 174, 82, 48], [165, 241, 121, 236], [171, 169, 200, 66], [140, 103, 130, 173]]
BASE3 = [[7, 230, 19, 243], [2, 233, 123, 44], [63, 31, 204, 171], [140, 41, 121, 37]]
BASE4 = [[30, 91, 122, 24], [232, 103, 150, 124], [250, 150, 28, 33], [222, 100, 37, 142]]
BASE5 = [[195, 121, 56, 176], [57, 145, 151, 98], [244, 86, 181, 44], [132, 43, 45, 177]]
BASE6 = [[227, 245, 157, 227], [113, 79, 139, 194], [37, 70, 180, 28], [174, 159, 49, 40]]
BASE7 = [[212, 199, 198, 30], [188, 149, 201, 195], [210, 174, 50, 64], [29, 220, 41, 103]]
BASE8 = [[7, 37, 193, 179], [46, 47, 55, 232], [147, 122, 101, 233], [133, 73, 84, 72]]
BASE9 = [[182, 189, 244, 203], [134, 234, 196, 91], [145, 207, 130, 83], [40, 163, 68, 127]]
BASE10 = [[127, 87, 19, 2], [52, 71, 84, 192], [57, 179, 120, 196], [98, 47, 65, 124]]
BASE11 = [[167, 235, 59, 54], [89, 233, 94, 214], [74, 85, 145, 101], [180, 240, 60, 30]]
BASE12 = [[214, 158, 82, 86], [179, 33, 120, 0], [235, 38, 131, 122], [166, 195, 112, 171]]
BASE13 = [[127, 225, 175, 149], [101, 73, 241, 151], [133, 39, 203, 146], [211, 88, 213, 46]]
BASE14 = [[249, 195, 76, 73], [1, 63, 61, 149], [45, 229, 248, 94], [162, 196, 158, 215]]
BASE15 = [[176, 123, 142, 237], [81, 241, 234, 211], [118, 80, 96, 227], [99, 138, 60, 63]]
bases = [BASE0, BASE1, BASE2, BASE3, BASE4, BASE5, BASE6, BASE7, BASE8, BASE9, BASE10, BASE11, BASE12, BASE13, BASE14, BASE15]

def vectorize(M):
return vector(sum(map(list, M.columns()), []))

def unvectorize(v):
n = int(sqrt(len(list(v))))
return Matrix([v[i:i+n] for i in range(0, n*n, n)]).T

F = GF(251)
A = Matrix(F, A)
B = Matrix(F, B)
C = Matrix(F, C)
I = Matrix.identity(F, 4)
bases = [Matrix(F, b) for b in bases]

L = I.tensor_product(A) + B.T.tensor_product(I)
X = unvectorize(L.solve_right(vectorize(C)))
v_bases = [vectorize(b) for b in bases]
cs = Matrix(v_bases).T.solve_right(vectorize(X))

print(cs)

"""
wwwwwwwwwwwww4wwwwww
wwwww3wwwwwwwwwwwwww
ww3wwwwwwwwwww8ww1ww
wwwwwwwwwwwwwwwwwwww
wwwwwwww2wwwwwwwwwww
wwwwwwwwwwwwwwwww7ww
wwww6wwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwww
wwwwww5wwwwwwwwwwwww
wwwwwwwwww8wwww7wwww
wwwwwwwwwwwwwwwwwwww
w3wwwwwwwwwwwwwwwwww
wwwwwwwwww5wwwwwwwww
wwwwwwwwwwwwwwwwwwww
wwwwwwwwwwwwwwwwwwww
wwwwwwwwwwww9wwwwwww
wwwwwwwwwwwwwwwwwwww
www2wwwwwwwwwwwwwwww
wwwwwwwwFwwwwww0wwww
wwwwwwww^wwwwwwwwwww
DUCTF{m4ppy_m4tr1x_avx}
"""
Loading

0 comments on commit 96e7aca

Please sign in to comment.