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

17
2/queen2/README Normal file
View File

@@ -0,0 +1,17 @@
Welcome to queen2!
-----
We just learned about creating a GUI for applications, so we had
to try it. It's very basic, but it works! WOW! A new level of user
experience in contrast to these old style command line programs.
Sometimes, this event-stuff is a bit tricky because you don't
see directly which code is executed if you interact with the GUI..
Can you uncover the secret message we put into this program?
The flag is also the password for queen3.
Hints
-----
A debugger could be of great help after you identified interesting code regions.
You get the flag by passing your findings as parameter (in decimal) to the `get_token`-command on this VM.

BIN
2/queen2/a.out Executable file

Binary file not shown.

BIN
2/queen2/challenge Executable file

Binary file not shown.

24
2/queen2/test.c Normal file
View File

@@ -0,0 +1,24 @@
#include <stdint.h>
#include <sys/types.h>
#include <string.h>
#include <stdio.h>
char* FUN_001022f0(char* param_1,uint16_t param_2,int64_t len)
{
for (uint16_t i = 0; i < len; i = i + 1) {
*(char *)(param_1 + i) =
*(char *)(param_1 + i) ^
(char)(((int)(uint)param_2 >> ((char)(i % 2 << 3) & 0x1f)) % 0x100);
}
return param_1;
}
int main(int argc, char** args){
char local_78 [] = { 0x63, 0x39, 0x52, 0x24, 0x45, 0x35, 0x54, 0x77, 0x00, 0x1f, 0x4e, 0x22, 0x45, 0x24, 0x50, 0x24, 0x45, 0x22, 0x00, 0x22, 0x48, 0x33, 0x00, 0x34, 0x4f, 0x2e, 0x45, 0x25, 0x00, 0x37, 0x53, 0x76, 0x42, 0x3f, 0x54, 0x25, 0x00, 0x7e, 0x55, 0x26, 0x50, 0x33, 0x52, 0x76, 0x4c, 0x33, 0x46, 0x22, 0x00, 0x22, 0x4f, 0x76, 0x4c, 0x39, 0x57, 0x33, 0x52, 0x76, 0x52, 0x3f, 0x47, 0x3e, 0x54, 0x7f, 0x00, 0x22, 0x4f, 0x76, 0x47, 0x33, 0x54, 0x76, 0x54, 0x3e, 0x45, 0x76, 0x41, 0x38, 0x53, 0x21, 0x45, 0x24, 0x01, 0x56, 0x00, 0x25, 0x73, 0x00, 0x4e, 0x6f, 0x70, 0x65, 0x00, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f };
char* res;
//memcpy(local_78,"c9R$E5Tw",0x55);
res = FUN_001022f0(local_78,0x5620,0x55);
printf("%s", res);
}

45
2/queen2/txt Normal file
View File

@@ -0,0 +1,45 @@
combine the buttons to get the right number, which is checked in _INIT_2:
if (copy_from_param2 == 0x5620) {
local_98 = (undefined *)FUN_001022f0(local_78,0x5620,0x55);
}
which has been altered inbefore in _FINI_2:
for (i = 0; i < 0x10; i = i + 1) {
local_1a = local_1a << 1;
main_window_obj = gtk_builder_get_object(gtkbuilder,local_a8[i]);
iVar1 = gtk_toggle_button_get_active(main_window_obj);
if (iVar1 != 0) {
local_1a = local_1a + 1;
}
}
local_1a = local_1a ^ 0x1033;
so the number we are trying to get is: 0x5620 ^ 0x1033 == 0x4613
values of buttons were for me:
0010 0040 0800 0020
0100 0400 0080 2000
0200 0004 1000 0008
0002 4000 8000 0001
which results in the pattern:
x o o o
o x o o
x o o o
x x o x
x=pressed
now read this pattern left to right, top to bottom as 16bit variable, msb first
in my case: 0x848d == 33933
execute
get_token 33933