ADD exercices week 1
This commit is contained in:
parent
f00f74c81f
commit
9df5ce5b66
14
01-VeryEasy1/VE1.txt
Normal file
14
01-VeryEasy1/VE1.txt
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
1. What compiler was used to build this executable?
|
||||||
|
GCC
|
||||||
|
|
||||||
|
2. What is the target platform for this executable?
|
||||||
|
x86_64
|
||||||
|
|
||||||
|
3. Is this executable linked statically or dynamically?
|
||||||
|
dynamically linked
|
||||||
|
|
||||||
|
4. What kind of reverse-engineering information is still embedded in this executable?
|
||||||
|
?
|
||||||
|
|
||||||
|
5. What is the secret password hardcoded into this executable? You need to email this value to pascal+sre25@mod-p.ch before Feb 24th, 2025, 12h00 CET to validate this lab and receive 1 point.
|
||||||
|
+3kfRmlG1rqb
|
0
01-VeryEasy1/VeryEasy01.gpr
Normal file
0
01-VeryEasy1/VeryEasy01.gpr
Normal file
11
01-VeryEasy1/VeryEasy01.rep/idata/00/00000000.prp
Normal file
11
01-VeryEasy1/VeryEasy01.rep/idata/00/00000000.prp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<FILE_INFO>
|
||||||
|
<BASIC_INFO>
|
||||||
|
<STATE NAME="CONTENT_TYPE" TYPE="string" VALUE="Program" />
|
||||||
|
<STATE NAME="PARENT" TYPE="string" VALUE="/" />
|
||||||
|
<STATE NAME="FILE_ID" TYPE="string" VALUE="a801f6f84e95338696086533" />
|
||||||
|
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||||
|
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||||
|
<STATE NAME="NAME" TYPE="string" VALUE="VE1" />
|
||||||
|
</BASIC_INFO>
|
||||||
|
</FILE_INFO>
|
BIN
01-VeryEasy1/VeryEasy01.rep/idata/00/~00000000.db/db.2.gbf
Normal file
BIN
01-VeryEasy1/VeryEasy01.rep/idata/00/~00000000.db/db.2.gbf
Normal file
Binary file not shown.
5
01-VeryEasy1/VeryEasy01.rep/idata/~index.bak
Normal file
5
01-VeryEasy1/VeryEasy01.rep/idata/~index.bak
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
00000000:VE1:a801f6f84e95338696086533
|
||||||
|
NEXT-ID:1
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
01-VeryEasy1/VeryEasy01.rep/idata/~index.dat
Normal file
5
01-VeryEasy1/VeryEasy01.rep/idata/~index.dat
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
00000000:VE1:a801f6f84e95338696086533
|
||||||
|
NEXT-ID:1
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
6
01-VeryEasy1/VeryEasy01.rep/project.prp
Normal file
6
01-VeryEasy1/VeryEasy01.rep/project.prp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<FILE_INFO>
|
||||||
|
<BASIC_INFO>
|
||||||
|
<STATE NAME="OWNER" TYPE="string" VALUE="remi" />
|
||||||
|
</BASIC_INFO>
|
||||||
|
</FILE_INFO>
|
15
01-VeryEasy1/VeryEasy01.rep/projectState
Normal file
15
01-VeryEasy1/VeryEasy01.rep/projectState
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<PROJECT>
|
||||||
|
<PROJECT_DATA_XML_NAME NAME="DISPLAY_DATA">
|
||||||
|
<SAVE_STATE>
|
||||||
|
<ARRAY NAME="EXPANDED_PATHS" TYPE="string">
|
||||||
|
<A VALUE="VeryEasy01:" />
|
||||||
|
</ARRAY>
|
||||||
|
<STATE NAME="SHOW_TABLE" TYPE="boolean" VALUE="false" />
|
||||||
|
</SAVE_STATE>
|
||||||
|
</PROJECT_DATA_XML_NAME>
|
||||||
|
<TOOL_MANAGER ACTIVE_WORKSPACE="Workspace">
|
||||||
|
<WORKSPACE NAME="Workspace" ACTIVE="true" />
|
||||||
|
</TOOL_MANAGER>
|
||||||
|
</PROJECT>
|
||||||
|
|
11
01-VeryEasy1/VeryEasy01.rep/user/00/00000000.prp
Normal file
11
01-VeryEasy1/VeryEasy01.rep/user/00/00000000.prp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<FILE_INFO>
|
||||||
|
<BASIC_INFO>
|
||||||
|
<STATE NAME="CONTENT_TYPE" TYPE="string" VALUE="ProgramUserData" />
|
||||||
|
<STATE NAME="PARENT" TYPE="string" VALUE="/" />
|
||||||
|
<STATE NAME="FILE_ID" TYPE="string" VALUE="a801f6f822125986500653561" />
|
||||||
|
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||||
|
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||||
|
<STATE NAME="NAME" TYPE="string" VALUE="udf_a801f6f84e95338696086533" />
|
||||||
|
</BASIC_INFO>
|
||||||
|
</FILE_INFO>
|
BIN
01-VeryEasy1/VeryEasy01.rep/user/00/~00000000.db/db.1.gbf
Normal file
BIN
01-VeryEasy1/VeryEasy01.rep/user/00/~00000000.db/db.1.gbf
Normal file
Binary file not shown.
4
01-VeryEasy1/VeryEasy01.rep/user/~index.bak
Normal file
4
01-VeryEasy1/VeryEasy01.rep/user/~index.bak
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
NEXT-ID:0
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
01-VeryEasy1/VeryEasy01.rep/user/~index.dat
Normal file
5
01-VeryEasy1/VeryEasy01.rep/user/~index.dat
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
00000000:udf_a801f6f84e95338696086533:a801f6f822125986500653561
|
||||||
|
NEXT-ID:1
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
2
01-VeryEasy1/VeryEasy01.rep/user/~journal.bak
Normal file
2
01-VeryEasy1/VeryEasy01.rep/user/~journal.bak
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
IADD:00000000:/udf_a801f6f84e95338696086533
|
||||||
|
IDSET:/udf_a801f6f84e95338696086533:a801f6f822125986500653561
|
4
01-VeryEasy1/VeryEasy01.rep/versioned/~index.bak
Normal file
4
01-VeryEasy1/VeryEasy01.rep/versioned/~index.bak
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
NEXT-ID:0
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
4
01-VeryEasy1/VeryEasy01.rep/versioned/~index.dat
Normal file
4
01-VeryEasy1/VeryEasy01.rep/versioned/~index.dat
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
NEXT-ID:0
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
0
02-Easy1/E1
Normal file → Executable file
0
02-Easy1/E1
Normal file → Executable file
12
02-Easy1/E1.txt
Normal file
12
02-Easy1/E1.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Questions
|
||||||
|
1. What compiler was used to build this executable?
|
||||||
|
GCC
|
||||||
|
|
||||||
|
2. What is the target platform for this executable?
|
||||||
|
x86_64
|
||||||
|
|
||||||
|
3. Is this executable linked statically or dynamically?
|
||||||
|
dynamically linked
|
||||||
|
|
||||||
|
4. What is the secret password hardcoded into this executable? You must email this value to pascal+sre25@mod-p.ch before Feb 24th, 2025, 12h00 CET to validate this lab and receive 5 points.
|
||||||
|
DwMxRPg1cjmVTHdV
|
0
02-Easy1/Easy01.gpr
Normal file
0
02-Easy1/Easy01.gpr
Normal file
11
02-Easy1/Easy01.rep/idata/00/00000000.prp
Normal file
11
02-Easy1/Easy01.rep/idata/00/00000000.prp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<FILE_INFO>
|
||||||
|
<BASIC_INFO>
|
||||||
|
<STATE NAME="CONTENT_TYPE" TYPE="string" VALUE="Program" />
|
||||||
|
<STATE NAME="PARENT" TYPE="string" VALUE="/" />
|
||||||
|
<STATE NAME="FILE_ID" TYPE="string" VALUE="a801f6f9e1526096743070060" />
|
||||||
|
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||||
|
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||||
|
<STATE NAME="NAME" TYPE="string" VALUE="E1" />
|
||||||
|
</BASIC_INFO>
|
||||||
|
</FILE_INFO>
|
BIN
02-Easy1/Easy01.rep/idata/00/~00000000.db/db.2.gbf
Normal file
BIN
02-Easy1/Easy01.rep/idata/00/~00000000.db/db.2.gbf
Normal file
Binary file not shown.
5
02-Easy1/Easy01.rep/idata/~index.bak
Normal file
5
02-Easy1/Easy01.rep/idata/~index.bak
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
00000000:E1:a801f6f9e1526096743070060
|
||||||
|
NEXT-ID:1
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
02-Easy1/Easy01.rep/idata/~index.dat
Normal file
5
02-Easy1/Easy01.rep/idata/~index.dat
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
00000000:E1:a801f6f9e1526096743070060
|
||||||
|
NEXT-ID:1
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
6
02-Easy1/Easy01.rep/project.prp
Normal file
6
02-Easy1/Easy01.rep/project.prp
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<FILE_INFO>
|
||||||
|
<BASIC_INFO>
|
||||||
|
<STATE NAME="OWNER" TYPE="string" VALUE="remi" />
|
||||||
|
</BASIC_INFO>
|
||||||
|
</FILE_INFO>
|
15
02-Easy1/Easy01.rep/projectState
Normal file
15
02-Easy1/Easy01.rep/projectState
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<PROJECT>
|
||||||
|
<PROJECT_DATA_XML_NAME NAME="DISPLAY_DATA">
|
||||||
|
<SAVE_STATE>
|
||||||
|
<ARRAY NAME="EXPANDED_PATHS" TYPE="string">
|
||||||
|
<A VALUE="Easy01:" />
|
||||||
|
</ARRAY>
|
||||||
|
<STATE NAME="SHOW_TABLE" TYPE="boolean" VALUE="false" />
|
||||||
|
</SAVE_STATE>
|
||||||
|
</PROJECT_DATA_XML_NAME>
|
||||||
|
<TOOL_MANAGER ACTIVE_WORKSPACE="Workspace">
|
||||||
|
<WORKSPACE NAME="Workspace" ACTIVE="true" />
|
||||||
|
</TOOL_MANAGER>
|
||||||
|
</PROJECT>
|
||||||
|
|
11
02-Easy1/Easy01.rep/user/00/00000000.prp
Normal file
11
02-Easy1/Easy01.rep/user/00/00000000.prp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<FILE_INFO>
|
||||||
|
<BASIC_INFO>
|
||||||
|
<STATE NAME="CONTENT_TYPE" TYPE="string" VALUE="ProgramUserData" />
|
||||||
|
<STATE NAME="PARENT" TYPE="string" VALUE="/" />
|
||||||
|
<STATE NAME="FILE_ID" TYPE="string" VALUE="c0a82f6b4fd12437693729253" />
|
||||||
|
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||||
|
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||||
|
<STATE NAME="NAME" TYPE="string" VALUE="udf_a801f6f9e1526096743070060" />
|
||||||
|
</BASIC_INFO>
|
||||||
|
</FILE_INFO>
|
BIN
02-Easy1/Easy01.rep/user/00/~00000000.db/db.3.gbf
Normal file
BIN
02-Easy1/Easy01.rep/user/00/~00000000.db/db.3.gbf
Normal file
Binary file not shown.
4
02-Easy1/Easy01.rep/user/~index.bak
Normal file
4
02-Easy1/Easy01.rep/user/~index.bak
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
NEXT-ID:0
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
02-Easy1/Easy01.rep/user/~index.dat
Normal file
5
02-Easy1/Easy01.rep/user/~index.dat
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
00000000:udf_a801f6f9e1526096743070060:c0a82f6b4fd12437693729253
|
||||||
|
NEXT-ID:1
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
2
02-Easy1/Easy01.rep/user/~journal.bak
Normal file
2
02-Easy1/Easy01.rep/user/~journal.bak
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
IADD:00000000:/udf_a801f6f9e1526096743070060
|
||||||
|
IDSET:/udf_a801f6f9e1526096743070060:c0a82f6b4fd12437693729253
|
4
02-Easy1/Easy01.rep/versioned/~index.bak
Normal file
4
02-Easy1/Easy01.rep/versioned/~index.bak
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
NEXT-ID:0
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
4
02-Easy1/Easy01.rep/versioned/~index.dat
Normal file
4
02-Easy1/Easy01.rep/versioned/~index.dat
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
VERSION=1
|
||||||
|
/
|
||||||
|
NEXT-ID:0
|
||||||
|
MD5:d41d8cd98f00b204e9800998ecf8427e
|
55
02-Easy1/code.c
Normal file
55
02-Easy1/code.c
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
ulong SECRETPASSWORD;
|
||||||
|
|
||||||
|
int main(int param_1, int *param_2) {
|
||||||
|
char* foo = "Hello";
|
||||||
|
uint8_t string_equality;
|
||||||
|
uint8_t output_value;
|
||||||
|
size_t input_length;
|
||||||
|
uint8_t local_20;
|
||||||
|
uint8_t itr;
|
||||||
|
|
||||||
|
local_20 = 1;
|
||||||
|
if (true /*param_1 == 2*/) {
|
||||||
|
|
||||||
|
itr = 0;
|
||||||
|
while( true ) {
|
||||||
|
//input_length = strlen((char *)param_2[1]); // 16
|
||||||
|
input_length = strlen(foo); // 16
|
||||||
|
if (16 <= itr) break;
|
||||||
|
local_20 = (local_20 * 3) % 257;
|
||||||
|
itr = itr + 1;
|
||||||
|
}
|
||||||
|
string_equality = strncmp(
|
||||||
|
// SECRETPASSWORD = 00402e82
|
||||||
|
// SECRETPASSWORD + ( (249+226)%257 ) * 8
|
||||||
|
// SECRETPASSWORD + (475%257) * 8
|
||||||
|
// SECRETPASSWORD + 218 * 8
|
||||||
|
// SECRETPASSWORD + 1744
|
||||||
|
*(char **)(SECRETPASSWORD + (ulong)((local_20 + 226) % 257) * 8),
|
||||||
|
foo,
|
||||||
|
16
|
||||||
|
);
|
||||||
|
// => DwMxRPg1cjmVTHdV
|
||||||
|
if (string_equality == 0) {
|
||||||
|
fprintf(stderr,"\nCongratulations ! The right password is indeed %s :-)\n\n",param_2[1]);
|
||||||
|
output_value = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fwrite("\nWrong password ! Try again...\n\n", 1, 32, stderr);
|
||||||
|
output_value = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
fwrite("\nMSE-SRE Challenge E1 --- Enjoy !\n", 1, 34, stderr);
|
||||||
|
fprintf(stderr, "\nUsage: %s <password>\n\n", *param_2);
|
||||||
|
output_value = 1;
|
||||||
|
}
|
||||||
|
return output_value;
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user