This commit is contained in:
2025-12-15 13:31:12 +01:00
commit 26e0102f58
10165 changed files with 233472 additions and 0 deletions

15
2/Smoak1/README Normal file
View File

@@ -0,0 +1,15 @@
Welcome to smoak1!
-----
In this challenge, the flag is not directly in the binary, but there is a service running on 31334.
If you give the right responses, it will show you the flag.
To test if you know the algorithm or are just a very good guesser, we implemented two cycles for the check.
You can reach the flagservice with
nc localhost 31334
The flag is also the password for smoak2.
Hints
-----
Some things are the same all the time and are worth looking for on the internet.

BIN
2/Smoak1/a.out Executable file

Binary file not shown.

BIN
2/Smoak1/challenge Executable file

Binary file not shown.

70
2/Smoak1/test.c Normal file
View File

@@ -0,0 +1,70 @@
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>
uint64_t generate_challenge(){
time_t tVar1;
long challenge;
uint8_t rnds [9];
tVar1 = time((time_t *)0x0);
srand((uint)tVar1);
memset(rnds,0,9);
challenge = 0;
for (uint8_t i = 0; i < 8; i = i + 1) {
rnds[i] = (uint8_t)rand();
challenge = challenge * 0x100 + (ulong)rnds[i];
}
for(uint8_t i=0; i<sizeof(rnds); i++)
printf("%02X ", rnds[i]);
printf("\n");
printf("Challenge: %llX\n",challenge);
return challenge;
}
unsigned int FUN_001011b0(char *param_1,long param_2)
{
long start;
char *next_char_p;
int i;
char character;
unsigned int mask;
long len;
char *input_char;
mask = 0xffffffff;
len = param_2;
input_char = param_1;
while (start = len + -1, len != 0) {
next_char_p = input_char + 1;
character = *input_char;
for (i = 0; len = start, input_char = next_char_p, i < 8; i = i + 1) {
if ((((int)character ^ mask) & 1) == 0) {
mask = mask >> 1;
}
else {
mask = mask >> 1 ^ 0xedb88320;
}
character = character >> 1;
}
}
return mask ^ 0xffffffff;
}
int main(int argc, char** args){
//uint64_t challenge = generate_challenge();
uint64_t challenge = 0x84223EB2051265E3;
uint8_t rnds[9];
for(uint8_t i=0; i<8; i++){
rnds[7-i] = challenge & 0xFF;
challenge>>=8;
}
uint64_t resp = FUN_001011b0(rnds, 8);
printf("%ld", resp);
}