Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

rev/ghost #49

Merged
merged 4 commits into from
Jun 4, 2024
Merged

rev/ghost #49

merged 4 commits into from
Jun 4, 2024

Conversation

glacialcascade
Copy link
Contributor

verify the dockerfile pls

@glacialcascade glacialcascade added rev Reverse Engineering Challenge needs-review Feel free to review this challenge labels May 28, 2024
@mud-ali
Copy link
Member

mud-ali commented Jun 3, 2024

dockerfile does not work

=> ERROR [3/3] RUN gcc -o chall ghost.c                                                      0.3s
------
 > [3/3] RUN gcc -o chall ghost.c:
0.299 ghost.c: In function 'Y':
0.299 ghost.c:5:22: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
0.299  int Y() { int k = 0; for(int i = 0; i < 9; i++) { k++; } return k; } 
0.299                       ^
0.299 ghost.c:5:22: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
------
Dockerfile:3
--------------------
   1 |     FROM gcc:4.9
   2 |     COPY ghost.c .
   3 | >>> RUN gcc -o chall ghost.c
   4 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c gcc -o chall ghost.c" did not complete successfully: exit code: 1

ghost/ghost.c Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lowk idk why you obfuscated a file thats not even given

couldve added some whitespace 😔

Opening the executable in a decompiler reveals a bunch of
unused functions, each named with a character (like a
lowercase/uppercase letter or a digit) and whose bodies each
refer to a number from 1 to 20.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is honestly not that obvious immediately imo,

not necessarily imperative, but i would recommend giving a hint along the lines of
Do you see any pattern? or smth similar idk exactly

Once you notice that the functions return values are the sequential numbers it becomes a lot more obvious what you need to do.

Alternatively, maybe the hint could like remind the player to look closely at the function names or smth.

tl;dr either they gotta realize that the unused functions spell out the flag, or that they return a series of numbers in order and then the rest falls in to place much better

@mud-ali mud-ali added documentation Improvements or additions to documentation files changes-requested Make the requested changes to the challenge before merging and removed needs-review Feel free to review this challenge labels Jun 3, 2024
@mud-ali mud-ali added approved Challenge approved and removed documentation Improvements or additions to documentation files changes-requested Make the requested changes to the challenge before merging labels Jun 3, 2024
@glacialcascade glacialcascade merged commit 870547a into main Jun 4, 2024
1 check passed
@glacialcascade glacialcascade deleted the rev/ghost branch June 10, 2024 23:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Challenge approved rev Reverse Engineering Challenge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants