Compare commits
4 Commits
bf74dd7e22
...
1e7895f21a
Author | SHA1 | Date | |
---|---|---|---|
1e7895f21a
|
|||
bf645048e6
|
|||
86f265f22d
|
|||
84135a321e
|
0
01-VeryEasy3/VE3.gpr
Normal file
0
01-VeryEasy3/VE3.gpr
Normal file
11
01-VeryEasy3/VE3.rep/idata/00/00000000.prp
Normal file
11
01-VeryEasy3/VE3.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="a2e40c5a22540267163090739" />
|
||||
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||
<STATE NAME="NAME" TYPE="string" VALUE="VE3" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
BIN
01-VeryEasy3/VE3.rep/idata/00/~00000000.db/db.2.gbf
Normal file
BIN
01-VeryEasy3/VE3.rep/idata/00/~00000000.db/db.2.gbf
Normal file
Binary file not shown.
4
01-VeryEasy3/VE3.rep/idata/~index.bak
Normal file
4
01-VeryEasy3/VE3.rep/idata/~index.bak
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
01-VeryEasy3/VE3.rep/idata/~index.dat
Normal file
5
01-VeryEasy3/VE3.rep/idata/~index.dat
Normal file
@ -0,0 +1,5 @@
|
||||
VERSION=1
|
||||
/
|
||||
00000000:VE3:a2e40c5a22540267163090739
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
2
01-VeryEasy3/VE3.rep/idata/~journal.bak
Normal file
2
01-VeryEasy3/VE3.rep/idata/~journal.bak
Normal file
@ -0,0 +1,2 @@
|
||||
IADD:00000000:/VE3
|
||||
IDSET:/VE3:a2e40c5a22540267163090739
|
6
01-VeryEasy3/VE3.rep/project.prp
Normal file
6
01-VeryEasy3/VE3.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-VeryEasy3/VE3.rep/projectState
Normal file
15
01-VeryEasy3/VE3.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="VE3:" />
|
||||
</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-VeryEasy3/VE3.rep/user/00/00000000.prp
Normal file
11
01-VeryEasy3/VE3.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="a2e40c594c340888329008539" />
|
||||
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||
<STATE NAME="NAME" TYPE="string" VALUE="udf_a2e40c5a22540267163090739" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
BIN
01-VeryEasy3/VE3.rep/user/00/~00000000.db/db.1.gbf
Normal file
BIN
01-VeryEasy3/VE3.rep/user/00/~00000000.db/db.1.gbf
Normal file
Binary file not shown.
4
01-VeryEasy3/VE3.rep/user/~index.bak
Normal file
4
01-VeryEasy3/VE3.rep/user/~index.bak
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
01-VeryEasy3/VE3.rep/user/~index.dat
Normal file
5
01-VeryEasy3/VE3.rep/user/~index.dat
Normal file
@ -0,0 +1,5 @@
|
||||
VERSION=1
|
||||
/
|
||||
00000000:udf_a2e40c5a22540267163090739:a2e40c594c340888329008539
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
2
01-VeryEasy3/VE3.rep/user/~journal.bak
Normal file
2
01-VeryEasy3/VE3.rep/user/~journal.bak
Normal file
@ -0,0 +1,2 @@
|
||||
IADD:00000000:/udf_a2e40c5a22540267163090739
|
||||
IDSET:/udf_a2e40c5a22540267163090739:a2e40c594c340888329008539
|
4
01-VeryEasy3/VE3.rep/versioned/~index.bak
Normal file
4
01-VeryEasy3/VE3.rep/versioned/~index.bak
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
4
01-VeryEasy3/VE3.rep/versioned/~index.dat
Normal file
4
01-VeryEasy3/VE3.rep/versioned/~index.dat
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
8
01-VeryEasy3/VE3.txt
Normal file
8
01-VeryEasy3/VE3.txt
Normal file
@ -0,0 +1,8 @@
|
||||
1. What is the target platform of this executable?
|
||||
ARM32
|
||||
|
||||
2. Was this executable stripped?
|
||||
no
|
||||
|
||||
3. What is the secret password hardcoded into this executable? You must send this value by email to pascal+sre25@mod-p.ch before Mar. 10th, 2025, 12h00 CET to validate this lab and get 1 point.
|
||||
33X5yPBehep4
|
52
01-VeryEasy3/code.c
Normal file
52
01-VeryEasy3/code.c
Normal file
@ -0,0 +1,52 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
bool check_password(char *param_1) {
|
||||
bool uVar1;
|
||||
//33X5yPBehep4
|
||||
if (((((param_1[0] == '3') && (param_1[1] == '3')) && (param_1[2] == 'X')) &&
|
||||
((((param_1[3] == '5' && (param_1[4] == 'y')) &&
|
||||
((param_1[5] == 'P' && ((param_1[6] == 'B' && (param_1[7] == 'e')))))) &&
|
||||
(param_1[8] == 'h')))) &&
|
||||
(((param_1[9] == 'e' && (param_1[10] == 'p')) && (param_1[11] == '4')))) {
|
||||
uVar1 = true;
|
||||
}
|
||||
else {
|
||||
uVar1 = false;
|
||||
}
|
||||
return uVar1;
|
||||
}
|
||||
|
||||
uint64_t main(int param_1,char* *param_2) {
|
||||
size_t pw_length;
|
||||
bool pw_correct;
|
||||
uint64_t uVar3;
|
||||
|
||||
if (param_1 == 2) {
|
||||
pw_length = strlen((char *)param_2[1]);
|
||||
if (pw_length == 12) {
|
||||
pw_correct = check_password(param_2[1]);
|
||||
if (pw_correct == false) {
|
||||
fwrite("\nWrong password ! Try again...\n\n",1,0x20,stderr);
|
||||
uVar3 = 1;
|
||||
}
|
||||
else {
|
||||
fprintf(stderr,"\nCongratulations ! The right password is indeed %s :-)\n\n",param_2[1]);
|
||||
uVar3 = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fwrite("\nWrong password ! Try again...\n\n",1,0x20,stderr);
|
||||
uVar3 = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fwrite("\nMSE-SRE Challenge VE3 --- Enjoy !\n",1,0x23,stderr);
|
||||
fprintf(stderr,"\nUsage: %s <password>\n\n",*param_2);
|
||||
uVar3 = 1;
|
||||
}
|
||||
return uVar3;
|
||||
}
|
0
02-Easy3/E3.gpr
Normal file
0
02-Easy3/E3.gpr
Normal file
11
02-Easy3/E3.rep/idata/00/00000000.prp
Normal file
11
02-Easy3/E3.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="a2e40c5a09540945517759134" />
|
||||
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||
<STATE NAME="NAME" TYPE="string" VALUE="E3" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
BIN
02-Easy3/E3.rep/idata/00/~00000000.db/db.2.gbf
Normal file
BIN
02-Easy3/E3.rep/idata/00/~00000000.db/db.2.gbf
Normal file
Binary file not shown.
5
02-Easy3/E3.rep/idata/~index.bak
Normal file
5
02-Easy3/E3.rep/idata/~index.bak
Normal file
@ -0,0 +1,5 @@
|
||||
VERSION=1
|
||||
/
|
||||
00000000:E3:a2e40c5a09540945517759134
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
02-Easy3/E3.rep/idata/~index.dat
Normal file
5
02-Easy3/E3.rep/idata/~index.dat
Normal file
@ -0,0 +1,5 @@
|
||||
VERSION=1
|
||||
/
|
||||
00000000:E3:a2e40c5a09540945517759134
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
6
02-Easy3/E3.rep/project.prp
Normal file
6
02-Easy3/E3.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-Easy3/E3.rep/projectState
Normal file
15
02-Easy3/E3.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="E3:" />
|
||||
</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-Easy3/E3.rep/user/00/00000000.prp
Normal file
11
02-Easy3/E3.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="c0a82ee89d758705805429400" />
|
||||
<STATE NAME="FILE_TYPE" TYPE="int" VALUE="0" />
|
||||
<STATE NAME="READ_ONLY" TYPE="boolean" VALUE="false" />
|
||||
<STATE NAME="NAME" TYPE="string" VALUE="udf_a2e40c5a09540945517759134" />
|
||||
</BASIC_INFO>
|
||||
</FILE_INFO>
|
BIN
02-Easy3/E3.rep/user/00/~00000000.db/db.1.gbf
Normal file
BIN
02-Easy3/E3.rep/user/00/~00000000.db/db.1.gbf
Normal file
Binary file not shown.
4
02-Easy3/E3.rep/user/~index.bak
Normal file
4
02-Easy3/E3.rep/user/~index.bak
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
5
02-Easy3/E3.rep/user/~index.dat
Normal file
5
02-Easy3/E3.rep/user/~index.dat
Normal file
@ -0,0 +1,5 @@
|
||||
VERSION=1
|
||||
/
|
||||
00000000:udf_a2e40c5a09540945517759134:c0a82ee89d758705805429400
|
||||
NEXT-ID:1
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
2
02-Easy3/E3.rep/user/~journal.bak
Normal file
2
02-Easy3/E3.rep/user/~journal.bak
Normal file
@ -0,0 +1,2 @@
|
||||
IADD:00000000:/udf_a2e40c5a09540945517759134
|
||||
IDSET:/udf_a2e40c5a09540945517759134:c0a82ee89d758705805429400
|
4
02-Easy3/E3.rep/versioned/~index.bak
Normal file
4
02-Easy3/E3.rep/versioned/~index.bak
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
4
02-Easy3/E3.rep/versioned/~index.dat
Normal file
4
02-Easy3/E3.rep/versioned/~index.dat
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=1
|
||||
/
|
||||
NEXT-ID:0
|
||||
MD5:d41d8cd98f00b204e9800998ecf8427e
|
110
02-Easy3/E3.txt
Normal file
110
02-Easy3/E3.txt
Normal file
@ -0,0 +1,110 @@
|
||||
1. What is the target platform of this executable?
|
||||
ARM64
|
||||
|
||||
2. Was this executable stripped?
|
||||
yes
|
||||
|
||||
3. What is the algorithm used to check the validity of a password?
|
||||
A sum
|
||||
|
||||
4. Can you break this password checker, i.e., implementing a generator of valid passwords? You must send 16 different valid passwords by email to pascal+sre25@mod-p.ch before Mar. 10th, 2025, 12h00 CET to validate this lab and get 5 points.
|
||||
remiPGRz2oEt
|
||||
remikljzAME/
|
||||
remiYOxms6U2
|
||||
remi0eFRgAsu
|
||||
remimvApt0L9
|
||||
remisnB2BbvN
|
||||
remi2KTkcZvN
|
||||
remi+SUFTsrk
|
||||
remiRfREU/pz
|
||||
remilVPBPu5o
|
||||
remiHRP0Bsww
|
||||
remi8MhIHsak
|
||||
remiH9zy7NxL
|
||||
remigMB24ytt
|
||||
remiY+9atQeu
|
||||
remiEtFt+lIj
|
||||
remi+R2Lniry
|
||||
remiwUUJOgd8
|
||||
remiac+ZdwDU
|
||||
remiSXlJGapD
|
||||
remiIl7m2xBx
|
||||
remiEU+jWtUn
|
||||
remiaxC+vdk1
|
||||
remiHiSw7Bbg
|
||||
remilkOGhVOC
|
||||
remi0gaHUWzW
|
||||
remi8TwmiD4l
|
||||
remiNaewP4u9
|
||||
remiym1yGVJF
|
||||
remiOgHlqnB2
|
||||
remitImS5o8d
|
||||
remi8LoMz9df
|
||||
remiNOHgblLW
|
||||
remiAfqSJzFH
|
||||
remidpDk9COo
|
||||
remihkNOV8pO
|
||||
remiAu84iiah
|
||||
remi5VGexqVG
|
||||
remiTkZCq9uB
|
||||
remiuLCxf7KY
|
||||
remikfKzVV+P
|
||||
remiXWLR1Xox
|
||||
remiyZEGxL9a
|
||||
remiYIylFB5y
|
||||
remijGqFed9S
|
||||
remidQBkrcV0
|
||||
remiuwrG5GIS
|
||||
remic/C0wrVy
|
||||
remi2yPCGpag
|
||||
remiYjgOhdG1
|
||||
remi/Hi2gVtz
|
||||
remiX8Ebrrl6
|
||||
remi/kzJPaAm
|
||||
remiT1OShoKt
|
||||
remiiqIX2RtJ
|
||||
remisDGFQyAn
|
||||
remiZhbYBFUc
|
||||
remirboCaPO7
|
||||
remiXxhCuLR/
|
||||
remiwZ93maz8
|
||||
remiQg2N5gxq
|
||||
remiZ1bg5dwY
|
||||
remiJrg9kFy7
|
||||
remiFsWCSSMw
|
||||
remi5U1vzkBe
|
||||
remid2eZweX4
|
||||
remiVLx+JsdW
|
||||
remi9hEyHu6k
|
||||
remiByJ9AkzY
|
||||
remiB27epxnW
|
||||
remi6VpV8puN
|
||||
remiPACuhfCc
|
||||
remicv9OPBXr
|
||||
remie10Odvlb
|
||||
remi1x0UemzC
|
||||
remigEZl+ksB
|
||||
remiuLbX0bBn
|
||||
remiPPu2GJmx
|
||||
remiz5DCyd7s
|
||||
remi0otpk2NO
|
||||
remiXA5ZhMms
|
||||
remix+/QkrUh
|
||||
remigZaFyW+Z
|
||||
remiaq+xXLcA
|
||||
remilSn6AUVn
|
||||
remigz8tO4Kb
|
||||
remiblkTOX0Y
|
||||
remiEeXzs2i3
|
||||
remiVtkmnA75
|
||||
remiMN0XipuL
|
||||
remiiMJE7lfo
|
||||
remiFQ4cpzq4
|
||||
remiZJG+Ykzi
|
||||
remiQTSe6qRg
|
||||
remi/WcGuyJU
|
||||
remi77NvCekx
|
||||
remiHZV2szXN
|
||||
remiLCRr7tTk
|
||||
remitgnFQNLC
|
||||
remiZYpUKKgH
|
55
02-Easy3/code.c
Normal file
55
02-Easy3/code.c
Normal file
@ -0,0 +1,55 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
char sum_pw(char *param_1) {
|
||||
return param_1[11] +
|
||||
param_1[10] +
|
||||
param_1[9] +
|
||||
param_1[8] +
|
||||
param_1[7] +
|
||||
param_1[6] +
|
||||
param_1[5] +
|
||||
param_1[4] +
|
||||
param_1[3] +
|
||||
param_1[2] +
|
||||
param_1[1] +
|
||||
param_1[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
uint64_t main(int param_1,char* *param_2) {
|
||||
char cVar1;
|
||||
uint64_t ret;
|
||||
size_t pw_length;
|
||||
|
||||
if (param_1 == 2) {
|
||||
pw_length = strlen((char *)param_2[1]);
|
||||
if (pw_length == 12) {
|
||||
cVar1 = sum_pw(param_2[1]);
|
||||
if (cVar1 == 'j') {
|
||||
fprintf(stderr,"\nCongratulations ! A right password is indeed %s :-)\n\n",param_2[1]);
|
||||
ret = 0;
|
||||
}
|
||||
else {
|
||||
fwrite("\nWrong password ! Try again...\n\n",1,0x20,stderr);
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fwrite("\nWrong password ! Try again...\n\n",1,0x20,stderr);
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
fwrite("\nMSE-SRE Challenge E3 --- Enjoy !\n",1,0x22,stderr);
|
||||
fwrite("\nWhat I need is 1024 passwords passing the check!\n",1,0x32,stderr);
|
||||
fprintf(stderr,"\nUsage: %s <password>\n\n",*param_2);
|
||||
ret = 1;
|
||||
}
|
||||
return ret;
|
||||
}
|
82
02-Easy3/genKey.c
Normal file
82
02-Easy3/genKey.c
Normal file
@ -0,0 +1,82 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
const uint16_t NBR_PASSWORDS_REQUESTED = 100;
|
||||
const char TARGET = 'j';
|
||||
|
||||
const char list[] = {
|
||||
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
|
||||
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
|
||||
'/', '+'
|
||||
};
|
||||
char give_char(uint8_t index){
|
||||
if (index >= sizeof(list)) {
|
||||
printf("Error: Index out of bounds, max %zu\n", sizeof(list));
|
||||
exit(1);
|
||||
}
|
||||
return list[index];
|
||||
}
|
||||
|
||||
char sum_pw(char *pw) {
|
||||
return pw[11] +
|
||||
pw[10] +
|
||||
pw[9] +
|
||||
pw[8] +
|
||||
pw[7] +
|
||||
pw[6] +
|
||||
pw[5] +
|
||||
pw[4] +
|
||||
pw[3] +
|
||||
pw[2] +
|
||||
pw[1] +
|
||||
pw[0];
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
srand(time(NULL));
|
||||
|
||||
char password[13];
|
||||
const uint8_t max_char = sizeof(list);
|
||||
|
||||
password[0] = 'r';
|
||||
password[1] = 'e';
|
||||
password[2] = 'm';
|
||||
password[3] = 'i';
|
||||
|
||||
for(uint16_t n = 0; n < NBR_PASSWORDS_REQUESTED; n++) {
|
||||
password[4] = give_char(rand() % max_char);
|
||||
password[5] = give_char(rand() % max_char);
|
||||
password[6] = give_char(rand() % max_char);
|
||||
password[7] = give_char(rand() % max_char);
|
||||
password[8] = give_char(rand() % max_char);
|
||||
uint16_t i = 0;
|
||||
do {
|
||||
password[9] = give_char(rand() % max_char);
|
||||
password[10] = give_char(rand() % max_char);
|
||||
password[11] = give_char(rand() % max_char);
|
||||
if(i++ > 1000){
|
||||
password[4] = give_char(rand() % max_char);
|
||||
password[5] = give_char(rand() % max_char);
|
||||
password[6] = give_char(rand() % max_char);
|
||||
password[7] = give_char(rand() % max_char);
|
||||
password[8] = give_char(rand() % max_char);
|
||||
i = 0;
|
||||
}
|
||||
|
||||
} while (sum_pw(password) != TARGET);
|
||||
|
||||
password[12] = '\0';
|
||||
if (sum_pw(password) == TARGET) {
|
||||
printf("%s\n", password);
|
||||
} else {
|
||||
printf("Fuck\n");
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
0
02-Easy4/E4
Normal file → Executable file
0
02-Easy4/E4
Normal file → Executable file
26
02-Easy4/E4.txt
Normal file
26
02-Easy4/E4.txt
Normal file
@ -0,0 +1,26 @@
|
||||
1. Was this executable stripped?
|
||||
yes
|
||||
|
||||
2. How are the password checking functionalities entangled with the operating system?
|
||||
|
||||
|
||||
3. What is the algorithm used to check the validity of a password?
|
||||
|
||||
|
||||
4. Can you break this password checker, i.e., implementing a generator of valid passwords? You must send 16 different valid passwords by email to pascal+sre25@mod-p.ch before Mar. 24th, 2025, 12h00 CET to validate this lab and get 5 points.
|
||||
3A3A3A3A3A3A
|
||||
3A4B5C6D7E8F
|
||||
SaSaSaSaSaSa
|
||||
SaTbUcVdWeXf
|
||||
+9+9+9+9+9+9
|
||||
+99GGUUccq4B
|
||||
!//==KKYYggu
|
||||
>L3AGUES3AN\
|
||||
HVESDRHVESDR
|
||||
8F7E6D5C4B3A
|
||||
XfWeVdUcTbSa
|
||||
4BcqUcGU9G+9
|
||||
guYgKY=K/=!/
|
||||
N\3AESGU3A>L
|
||||
DRESHVDRESHV
|
||||
#1HVESLZP^#1
|
61
02-Easy4/code.c
Normal file
61
02-Easy4/code.c
Normal file
@ -0,0 +1,61 @@
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
||||
static char* input_pw;
|
||||
static char return_check_pw;
|
||||
|
||||
|
||||
|
||||
void check_pw(void) {
|
||||
uint8_t bVar1;
|
||||
char *pcVar2;
|
||||
char *pcVar3;
|
||||
|
||||
bVar1 = 0;
|
||||
pcVar2 = input_pw;
|
||||
do {
|
||||
pcVar3 = pcVar2 + 2;
|
||||
bVar1 = bVar1 | ((pcVar2[1] - 14) - pcVar2[0]);
|
||||
pcVar2 = pcVar3;
|
||||
} while (input_pw + 12 != pcVar3);
|
||||
return_check_pw = (int)(char)bVar1;
|
||||
return;
|
||||
}
|
||||
|
||||
void print_check_pw(void) {
|
||||
if (return_check_pw != 0) {
|
||||
fwrite("\nWrong password ! Try again...\n\n",1,0x20,stderr);
|
||||
return;
|
||||
}
|
||||
fprintf(stderr,"\nCongratulations ! A right password is indeed %s :-)\n\n",input_pw);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
uint64_t main(int param_1,char* *param_2) {
|
||||
char *__s;
|
||||
size_t sVar1;
|
||||
|
||||
if (param_1 == 2) {
|
||||
__s = (char *)param_2[1];
|
||||
sVar1 = strlen(__s);
|
||||
if (sVar1 == 12) {
|
||||
input_pw = __s;
|
||||
signal(10,check_pw);
|
||||
signal(12,print_check_pw);
|
||||
kill(0,10);
|
||||
kill(0,12);
|
||||
return 0;
|
||||
}
|
||||
fwrite("\nWrong password ! Try again...\n\n",1,0x20,stderr);
|
||||
} else {
|
||||
fwrite("\nMSE-SRE Challenge E4 --- Enjoy !\n",1,0x22,stderr);
|
||||
fwrite("\nWhat I need is 1024 passwords passing the check!\n",1,0x32,stderr);
|
||||
fprintf(stderr,"\nUsage: %s <password>\n\n",*param_2);
|
||||
}
|
||||
return 1;
|
||||
}
|
224
02-Easy5/E5.apk.jadx
Normal file
224
02-Easy5/E5.apk.jadx
Normal file
@ -0,0 +1,224 @@
|
||||
{
|
||||
"projectVersion": 1,
|
||||
"files": [
|
||||
"E5.apk"
|
||||
],
|
||||
"treeExpansions": [
|
||||
[
|
||||
"Files",
|
||||
"Inputs",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"data",
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"databinding",
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"ui.login",
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"model",
|
||||
"data",
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"ch.mod_p.sre24.e5.data.Result",
|
||||
"data",
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"ch.mod_p.sre24.e5.data.model.LoggedInUser",
|
||||
"model",
|
||||
"data",
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"ch.mod_p.sre24.e5.R",
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"ch.mod_p.sre24.e5.R.string",
|
||||
"ch.mod_p.sre24.e5.R",
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"ch.mod_p.sre24.e5.data.LoginDataSource",
|
||||
"data",
|
||||
"ch.mod_p.sre24.e5",
|
||||
"Source code",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"Resources",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"res",
|
||||
"Resources",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"resources.arsc",
|
||||
"Resources",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"assets",
|
||||
"Resources",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"dexopt",
|
||||
"assets",
|
||||
"Resources",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"kotlin",
|
||||
"Resources",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"META-INF",
|
||||
"Resources",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"res",
|
||||
"resources.arsc",
|
||||
"Resources",
|
||||
"E5.apk"
|
||||
],
|
||||
[
|
||||
"values",
|
||||
"res",
|
||||
"resources.arsc",
|
||||
"Resources",
|
||||
"E5.apk"
|
||||
]
|
||||
],
|
||||
"codeData": {
|
||||
"comments": [],
|
||||
"renames": []
|
||||
},
|
||||
"openTabs": [
|
||||
{
|
||||
"type": "class",
|
||||
"tabPath": "ch.mod_p.sre24.e5.data.model.LoggedInUser",
|
||||
"subPath": "java",
|
||||
"caret": 161,
|
||||
"view": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"active": false,
|
||||
"pinned": false,
|
||||
"bookmarked": false,
|
||||
"hidden": false
|
||||
},
|
||||
{
|
||||
"type": "class",
|
||||
"tabPath": "ch.mod_p.sre24.e5.data.LoginDataSource",
|
||||
"subPath": "java",
|
||||
"caret": 363,
|
||||
"view": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"active": true,
|
||||
"pinned": false,
|
||||
"bookmarked": false,
|
||||
"hidden": false
|
||||
},
|
||||
{
|
||||
"type": "class",
|
||||
"tabPath": "ch.mod_p.sre24.e5.R",
|
||||
"subPath": "java",
|
||||
"caret": 280334,
|
||||
"view": {
|
||||
"x": 0,
|
||||
"y": 129469
|
||||
},
|
||||
"active": false,
|
||||
"pinned": false,
|
||||
"bookmarked": false,
|
||||
"hidden": false
|
||||
},
|
||||
{
|
||||
"type": "class",
|
||||
"tabPath": "ch.mod_p.sre24.e5.data.Result",
|
||||
"subPath": "java",
|
||||
"caret": 471,
|
||||
"view": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"active": false,
|
||||
"pinned": false,
|
||||
"bookmarked": false,
|
||||
"hidden": false
|
||||
},
|
||||
{
|
||||
"type": "class",
|
||||
"tabPath": "ch.mod_p.sre24.e5.data.LoginRepository",
|
||||
"subPath": "java",
|
||||
"caret": 1091,
|
||||
"view": {
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"active": false,
|
||||
"pinned": false,
|
||||
"bookmarked": false,
|
||||
"hidden": false
|
||||
},
|
||||
{
|
||||
"type": "resource",
|
||||
"tabPath": "res/values/strings.xml",
|
||||
"subPath": "",
|
||||
"caret": 12643,
|
||||
"view": {
|
||||
"x": 0,
|
||||
"y": 2224
|
||||
},
|
||||
"active": false,
|
||||
"pinned": false,
|
||||
"bookmarked": false,
|
||||
"hidden": false
|
||||
}
|
||||
],
|
||||
"cacheDir": "/home/remi/.cache/jadx/projects/E5-ae11e035339100e020829e310de005fa",
|
||||
"enableLiveReload": false,
|
||||
"searchHistory": [],
|
||||
"pluginOptions": {}
|
||||
}
|
9
02-Easy5/E5.txt
Normal file
9
02-Easy5/E5.txt
Normal file
@ -0,0 +1,9 @@
|
||||
1. What programming languages are used to make this Android app?
|
||||
|
||||
2. What platforms does this Android app support?
|
||||
|
||||
3. What is the username and password verification process?
|
||||
|
||||
|
||||
4. To validate this lab and get 5 points, you must send the valid combination of username and password by email to pascal+sre25@mod-p.ch before Apr. 7th, 2025, 12h00 CET.
|
||||
user_14@evil.com - O89J7WXEY+HG
|
69
02-Easy5/E5/resources/AndroidManifest.xml
Normal file
69
02-Easy5/E5/resources/AndroidManifest.xml
Normal file
@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0"
|
||||
android:compileSdkVersion="34"
|
||||
android:compileSdkVersionCodename="14"
|
||||
package="ch.mod_p.sre24.e5"
|
||||
platformBuildVersionCode="34"
|
||||
platformBuildVersionName="14">
|
||||
<uses-sdk
|
||||
android:minSdkVersion="21"
|
||||
android:targetSdkVersion="34"/>
|
||||
<permission
|
||||
android:name="ch.mod_p.sre24.e5.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"
|
||||
android:protectionLevel="signature"/>
|
||||
<uses-permission android:name="ch.mod_p.sre24.e5.DYNAMIC_RECEIVER_NOT_EXPORTED_PERMISSION"/>
|
||||
<application
|
||||
android:theme="@style/Theme.E5"
|
||||
android:label="@string/app_name"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:allowBackup="true"
|
||||
android:supportsRtl="true"
|
||||
android:extractNativeLibs="true"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:appComponentFactory="androidx.core.app.CoreComponentFactory">
|
||||
<activity
|
||||
android:label="@string/title_activity_login"
|
||||
android:name="ch.mod_p.sre24.e5.ui.login.LoginActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<provider
|
||||
android:name="androidx.startup.InitializationProvider"
|
||||
android:exported="false"
|
||||
android:authorities="ch.mod_p.sre24.e5.androidx-startup">
|
||||
<meta-data
|
||||
android:name="androidx.emoji2.text.EmojiCompatInitializer"
|
||||
android:value="androidx.startup"/>
|
||||
<meta-data
|
||||
android:name="androidx.lifecycle.ProcessLifecycleInitializer"
|
||||
android:value="androidx.startup"/>
|
||||
<meta-data
|
||||
android:name="androidx.profileinstaller.ProfileInstallerInitializer"
|
||||
android:value="androidx.startup"/>
|
||||
</provider>
|
||||
<receiver
|
||||
android:name="androidx.profileinstaller.ProfileInstallReceiver"
|
||||
android:permission="android.permission.DUMP"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:directBootAware="false">
|
||||
<intent-filter>
|
||||
<action android:name="androidx.profileinstaller.action.INSTALL_PROFILE"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="androidx.profileinstaller.action.SKIP_FILE"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="androidx.profileinstaller.action.SAVE_PROFILE"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="androidx.profileinstaller.action.BENCHMARK_OPERATION"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
</manifest>
|
BIN
02-Easy5/E5/resources/DebugProbesKt.bin
Normal file
BIN
02-Easy5/E5/resources/DebugProbesKt.bin
Normal file
Binary file not shown.
BIN
02-Easy5/E5/resources/META-INF/CERT.RSA
Normal file
BIN
02-Easy5/E5/resources/META-INF/CERT.RSA
Normal file
Binary file not shown.
2629
02-Easy5/E5/resources/META-INF/CERT.SF
Normal file
2629
02-Easy5/E5/resources/META-INF/CERT.SF
Normal file
File diff suppressed because it is too large
Load Diff
2628
02-Easy5/E5/resources/META-INF/MANIFEST.MF
Normal file
2628
02-Easy5/E5/resources/META-INF/MANIFEST.MF
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
1.8.0
|
@ -0,0 +1 @@
|
||||
1.3.0
|
@ -0,0 +1 @@
|
||||
1.6.1
|
@ -0,0 +1 @@
|
||||
1.6.1
|
@ -0,0 +1 @@
|
||||
task ':arch:core:core-runtime:writeVersionFile' property 'version'
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.1.0
|
@ -0,0 +1 @@
|
||||
1.9.0
|
@ -0,0 +1 @@
|
||||
1.9.0
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.1.0
|
@ -0,0 +1 @@
|
||||
8.2.2
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.1.1
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.2.0
|
@ -0,0 +1 @@
|
||||
1.2.0
|
@ -0,0 +1 @@
|
||||
1.3.6
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
2.7.0
|
@ -0,0 +1 @@
|
||||
2.7.0
|
@ -0,0 +1 @@
|
||||
2.7.0
|
@ -0,0 +1 @@
|
||||
2.7.0
|
@ -0,0 +1 @@
|
||||
2.7.0
|
@ -0,0 +1 @@
|
||||
2.7.0
|
@ -0,0 +1 @@
|
||||
2.7.0
|
@ -0,0 +1 @@
|
||||
2.7.0
|
@ -0,0 +1 @@
|
||||
2.7.0
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.3.0
|
@ -0,0 +1 @@
|
||||
1.1.0
|
@ -0,0 +1 @@
|
||||
1.2.1
|
@ -0,0 +1 @@
|
||||
1.1.1
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.2.0
|
@ -0,0 +1 @@
|
||||
1.1.0
|
@ -0,0 +1 @@
|
||||
1.1.0
|
@ -0,0 +1 @@
|
||||
1.1.1
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.0.0
|
@ -0,0 +1 @@
|
||||
1.11.0
|
@ -0,0 +1,2 @@
|
||||
appMetadataVersion=1.1
|
||||
androidGradlePluginVersion=8.2.2
|
@ -0,0 +1 @@
|
||||
1.7.1
|
@ -0,0 +1 @@
|
||||
1.7.1
|
@ -0,0 +1 @@
|
||||
kotlinx.coroutines.android.AndroidExceptionPreHandler
|
@ -0,0 +1 @@
|
||||
kotlinx.coroutines.android.AndroidDispatcherFactory
|
BIN
02-Easy5/E5/resources/assets/dexopt/baseline.prof
Normal file
BIN
02-Easy5/E5/resources/assets/dexopt/baseline.prof
Normal file
Binary file not shown.
BIN
02-Easy5/E5/resources/assets/dexopt/baseline.profm
Normal file
BIN
02-Easy5/E5/resources/assets/dexopt/baseline.profm
Normal file
Binary file not shown.
BIN
02-Easy5/E5/resources/classes.dex
Normal file
BIN
02-Easy5/E5/resources/classes.dex
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
02-Easy5/E5/resources/kotlin/internal/internal.kotlin_builtins
Normal file
BIN
02-Easy5/E5/resources/kotlin/internal/internal.kotlin_builtins
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user