This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
-
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.
* t * deployment fixes and some yaml + sol tweaks --------- Co-authored-by: mud-ali <[email protected]>
- Loading branch information
Showing
5 changed files
with
98 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM --platform=linux/amd64 ubuntu@sha256:86ac87f73641c920fb42cc9612d4fb57b5626b56ea2a19b894d0673fd5b4f2e9 AS build | ||
|
||
RUN apt-get update -y && apt-get install -y gcc wget unzip && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN wget -O ynetd.c https://raw.githubusercontent.com/johnsonjh/ynetd/master/ynetd.c \ | ||
&& gcc -o ynetd ynetd.c \ | ||
&& rm -f /tmp/ynetd.zip | ||
|
||
COPY main.c . | ||
|
||
RUN gcc -o chall main.c | ||
|
||
FROM --platform=linux/amd64 ubuntu@sha256:86ac87f73641c920fb42cc9612d4fb57b5626b56ea2a19b894d0673fd5b4f2e9 | ||
|
||
RUN useradd -m -d /home/ctf -u 12345 ctf | ||
WORKDIR /home/ctf | ||
|
||
COPY --from=build chall chall | ||
COPY --from=build ynetd ynetd | ||
|
||
RUN chmod +x ./ynetd | ||
|
||
COPY flag.txt . | ||
|
||
RUN chown -R root:root /home/ctf | ||
|
||
USER ctf | ||
EXPOSE 9999 | ||
CMD ./ynetd -p 9999 ./chall |
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,23 @@ | ||
name: No Assembly Required | ||
categories: | ||
- rev | ||
value: 50 | ||
flag: | ||
file: ./flag.txt | ||
description: >- | ||
That's right! This challenge works right out of the box! | ||
No need to assemble anything, all totally preassembled. | ||
hints: | ||
- If it comes pre-assembled, all you can do is disassemble right? | ||
- Have you heard of Ghidra? | ||
files: | ||
- src: /home/ctf/chall | ||
dest: chall | ||
container: nc | ||
authors: | ||
- Andrew | ||
visible: true | ||
deploy: | ||
nc: | ||
build: . | ||
expose: 9999/tcp |
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 @@ | ||
camp{FACT:CPUs_arE_pRe_A5SEmbLed_too..._0caec8a70f9a2} |
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,36 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
static int NO_ONE_WILL_EVER_FIND_THIS_mwahahahahaha = 0x6FED; | ||
|
||
int main(int argv, char **argc) { | ||
|
||
setvbuf(stdout, NULL, _IONBF, 0); | ||
setvbuf(stdin, NULL, _IONBF, 0); | ||
setvbuf(stderr, NULL, _IONBF, 0); | ||
|
||
int lol = 0xf00d; | ||
|
||
puts("Hey."); | ||
sleep(1); | ||
printf("Password? "); | ||
int password = 0; | ||
scanf("%d", &password); | ||
|
||
int actual_password = lol | (NO_ONE_WILL_EVER_FIND_THIS_mwahahahahaha << 16); | ||
|
||
if (actual_password == password) { | ||
system("/bin/sh"); | ||
} else { | ||
puts("Cool"); | ||
sleep(1); | ||
puts("Yeah thats wrong!"); | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
// | ||
// Hello people who solved this | ||
// How does it feel to have shell haha | ||
// |
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,9 @@ | ||
Decompile with Ghidra | ||
|
||
Read the source code | ||
|
||
figure out the password | ||
|
||
enter it into the netcat, gaining shell access. | ||
|
||
Run `ls`, followed by `cat flag.txt` to get the flag. |