Compare commits

..
0 Commits
10 changed files with 79 additions and 19 deletions

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ version: "3.3"
services:
nginx:
restart: always
image: nginx:alpine
image: nginx:1.21.4
ports:
- "8000:80"
volumes:
+6 -1
View File
@@ -66,8 +66,13 @@ enableEmoji = true
[languages]
[languages.en]
title = "Juju"
subtitle = ""
keywords = "Crypto, Reverse"
copyright = '<a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a>'
readOtherPosts = "Read other posts"
[languages.en.params.logo]
logoMark = "juju@pwningway ~$ "
logoMark = "juju@synacktiv ~$ "
logoText = "objdump -d"
logoHomeLink = "/"
logoCursorColor = "#3884FF"
@@ -18,7 +18,7 @@ known cryptosystem to encrypt data, let's find this out.
{{< image src="/EXTerminated/panik.png" style="border-radius: 8px;" >}}
## Challenge description
`reverse` | `472 pts` `12 solves` :star::star:
`reverse` | `472 pts` `12 solves` `:star::star:`
```
Un client a détecté un seveur compromis sur son parc. Ce serveur semble avoir
perdu l'ensemble de ses données suite à une infection. Il nous indique que les
@@ -25,7 +25,7 @@ the flag without actually solving the intended puzzle, but more on that later.
{{< image src="/diplodocus/yee-dinosaur.gif" style="border-radius: 8px;" >}}
## Challenge description
`reverse` | `477 pts` `10 solves` :star::star::star:
`reverse` | `477 pts` `10 solves` `:star::star::star:`
```
Trouvez une entrée qui valide, et soumettez-la au service en ligne pour obtenir
le flag.
@@ -15,8 +15,7 @@ here, but in solving the underlying problem.
{{< image src="/brachiosaure/meme.jpg" style="border-radius: 8px;" >}}
## Challenge description
`reverse` | `477 pts` `10 solves` :star::star:
`reverse` | `477 pts` `10 solves` `:star::star:`
```
Vous aimez les QR Codes ? On vous demande d'écrire un générateur d'entrées
+1 -1
View File
@@ -24,7 +24,7 @@ the solver algorithm for the first puzzle so here you go.
## Challenge description
`reverse` | `482 pts` `8 solves` :star::star::star:
`reverse` | `482 pts` `8 solves` `:star::star::star:`
```
Trouvez une entrée permettant d'afficher le message de réussite, et envoyez-la
@@ -1,6 +1,6 @@
---
title: "Black box reversing | Archiver @ FCSC 2024"
date: "2024-04-14 22:00:00"
date: "2024-04-13 22:00:00"
author: "Juju"
tags: ["Reverse", "Writeup", "fcsc"]
toc: true
@@ -30,7 +30,7 @@ do without reading the code or debugging.
## Challenge description
`reverse` | `490 pts` `5 solves` :star::star:
`reverse` | `490 pts` `5 solves` `:star::star:`
```
Notre équipe SIGINT a intercepté un e-mail contenant une pièce jointe
@@ -290,7 +290,7 @@ Remember that I know that filename is `flag.txt`, and that I have
an associated ciphertext.
With a little bit of luck, the IV of the filename cipher text
is generated with the same key:
is generated with the key:
```console
>>> 0x82 ^ ord('f')
@@ -299,8 +299,10 @@ is generated with the same key:
Looks like it does.
Since I have a known plaintext and example cipher text, I can simply, xor
the plaintext with the filename IV to recover the xor key.
Since I have a known plaintext, example cipher text.
I can simply, xor the plaintext with the filename IV to recover
the xor key.
Then apply the same key to the file data IV to recover the
plain text:
@@ -320,4 +322,4 @@ print('FCSC{' + flag.decode() + '}')
```console
$ ./solve.py
FCSC{KKfYQogc}
```
```
@@ -1,5 +1,5 @@
---
title: "Decompiling a multi-process VM back to C | Megalosaure @ FCSC 2024"
title: "Decompiling a nanomites based VM back to C | Megalosaure @ FCSC 2024"
date: "2024-04-14 22:00:00"
author: "Juju"
tags: ["Reverse", "Writeup", "fcsc"]
@@ -19,7 +19,7 @@ We are instead met with a program that takes 20 minutes to validate the input an
## Challenge description
`reverse` | `487 pts` `6 solves` :star::star::star:
`reverse` | `487 pts` `6 solves` `:star::star::star:`
```
Voici un binaire qui vérifie si ce qu'on lui passe est le flag. À vous de jouer !
@@ -29,7 +29,7 @@ Author: `Cryptanalyse`
## Given files
[megalosaure](/megalosaure/src/megalosaure)
[megalosaure](/megalosaure/megalosaure)
# Writeup
@@ -783,4 +783,4 @@ Looking back at everything, we can clearly see that one pod is
actually a round of encryption, a block is encrypted through
`0x2c` rounds, with each block input being xored with the output
of the previous block (0 for the first block), thus the CBC and
null IV.
null IV.
@@ -15,7 +15,7 @@ not looking at it, so stay alert :eyes:.
## Challenge description
`reverse` | `467 pts` `14 solves` :star::star::star:
`reverse` | `467 pts` `14 solves` `:star::star::star:`
```
Trouvez le flag accepté par le binaire.
+55 -1
View File
@@ -4,7 +4,7 @@ import struct
from pwn import *
from typing import Optional, List
from Crypto.Util.number import inverse
#from z3 import *
from z3 import *
opcodes = {
@@ -210,6 +210,7 @@ class Child:
self.depends = []
self.unlocks = []
self.inputs = []
self.forced = False, 0
self.main_instr = None
while True:
instr = Instruction.disassemble(self.code)
@@ -254,6 +255,59 @@ class Child:
for unlock in self.unlocks:
locks[unlock] = (False, self)
def invert(self, desired):
instr = self.main_instr
op = instr.name
inputs = self.inputs
if len(inputs) == 0:
if op == 'push_m':
return desired
elif op == 'push32_i_i':
print(self.forced)
raise
else:
print(op)
elif len(inputs) == 1:
inp = inputs[0]
if op == "pop_m":
return inp.invert(desired)
if op == "not":
return inp.invert((~desired) % N)
else:
print(op)
else:
forced0 = inputs[0].forced
forced1 = inputs[1].forced
if not forced0 and not forced1:
return
forced_child = inputs[0] if forced0[0] else inputs[1]
unk_child = inputs[1] if forced0[0] else inputs[0]
if op == 'xor':
return unk_child.invert(desired ^ forced_child.forced[1])
elif op == 'sub':
if forced0:
return unk_child.invert((desired + forced_child.forced[1]) % N)
else:
return unk_child.invert((-desired + forced_child.forced[1]) % N)
elif op == 'add':
return unk_child.invert((desired - forced_child.forced[1]) % N)
elif op == 'and':
return unk_child.invert(desired & forced_child.forced[1])
elif op == 'or':
return unk_child.invert(desired | forced_child.forced[1])
elif op == 'mul':
return unk_child.invert(((desired) * inverse(forced_child.forced[1], N)) % N)
elif op == 'shl':
return unk_child.invert(((desired) * inverse(forced_child.forced[1], N)) % N)
else:
print(op)
def transpile(self, indent=0):
code = "(\n"
indent += 4
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.