added official hacktheboo2024 writeups
This commit is contained in:
parent
1f7a9b0566
commit
e3c46450f7
327 changed files with 14303 additions and 0 deletions
52
htb/hacktheboo2024/rev/[Very Easy] SpookyPass/README.md
Normal file
52
htb/hacktheboo2024/rev/[Very Easy] SpookyPass/README.md
Normal file
|
@ -0,0 +1,52 @@
|
|||
<img src="../../assets/banner.png" style="zoom: 80%;" align=center />
|
||||
|
||||
<img src="../../assets/htb.png" style="zoom: 80%;" align='left' /><font size="6">SpookyPass</font>
|
||||
|
||||
4<sup>th</sup> 10 24 / Document No. D24.102.169
|
||||
|
||||
Prepared By: clubby789
|
||||
|
||||
Challenge Author: clubby789
|
||||
|
||||
Difficulty: <font color=green>Very Easy</font>
|
||||
|
||||
Classification: Official
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Synopsis
|
||||
|
||||
SpookyPass is a Very Easy reversing challenge. Players will use `strings` to identify a password.
|
||||
|
||||
## Skills Learned
|
||||
- `strings`
|
||||
|
||||
# Solution
|
||||
|
||||
Running the binary, we're given a password prompt:
|
||||
|
||||
```
|
||||
Welcome to the SPOOKIEST party of the year.
|
||||
Before we let you in, you'll need to give us the password: foo
|
||||
You're not a real ghost; clear off!
|
||||
```
|
||||
|
||||
We'll use `strings` to look for hidden data in the program:
|
||||
|
||||
```sh
|
||||
$ strings ./pass
|
||||
# .. SNIP ..
|
||||
Welcome to the
|
||||
[1;3mSPOOKIEST
|
||||
[0m party of the year.
|
||||
Before we let you in, you'll need to give us the password:
|
||||
s3cr3t_p455_f0r_gh05t5_4nd_gh0ul5
|
||||
Welcome inside!
|
||||
You're not a real ghost; clear off!
|
||||
# .. SNIP ..
|
||||
```
|
||||
|
||||
If we try `s3cr3t_p455_f0r_gh05t5_4nd_gh0ul5` as the password, we'll be accepted and receive the flag.
|
Binary file not shown.
|
@ -0,0 +1,7 @@
|
|||
.PHONY := clean
|
||||
|
||||
pass: main.c
|
||||
gcc main.c -o pass
|
||||
|
||||
clean:
|
||||
rm -f pass
|
53
htb/hacktheboo2024/rev/[Very Easy] SpookyPass/src/main.c
Normal file
53
htb/hacktheboo2024/rev/[Very Easy] SpookyPass/src/main.c
Normal file
|
@ -0,0 +1,53 @@
|
|||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
// HTB{un0bfu5c4t3d_5tr1ng5}
|
||||
uint32_t parts[] = {
|
||||
U'H',
|
||||
U'T',
|
||||
U'B',
|
||||
U'{',
|
||||
U'u',
|
||||
U'n',
|
||||
U'0',
|
||||
U'b',
|
||||
U'f',
|
||||
U'u',
|
||||
U'5',
|
||||
U'c',
|
||||
U'4',
|
||||
U't',
|
||||
U'3',
|
||||
U'd',
|
||||
U'_',
|
||||
U'5',
|
||||
U't',
|
||||
U'r',
|
||||
U'1',
|
||||
U'n',
|
||||
U'g',
|
||||
U'5',
|
||||
U'}',
|
||||
0,
|
||||
};
|
||||
#define N_PARTS sizeof(parts)/sizeof(parts[0])
|
||||
|
||||
int main() {
|
||||
char buf[128];
|
||||
char flagbuf[N_PARTS] = { 0 };
|
||||
puts("Welcome to the \x1b[1;3mSPOOKIEST\x1b[0m party of the year!");
|
||||
printf("Before we let you in, you'll need to give us the password: ");
|
||||
fgets(buf, sizeof(buf), stdin);
|
||||
char* nl;
|
||||
if (nl = strchr(buf, '\n')) *nl = 0;
|
||||
if (strcmp(buf, "s3cr3t_p455_f0r_gh05t5_4nd_gh0ul5") == 0) {
|
||||
puts("Welcome inside!");
|
||||
for (int i = 0; i < N_PARTS; i++) {
|
||||
flagbuf[i] = parts[i];
|
||||
}
|
||||
puts(flagbuf);
|
||||
} else {
|
||||
puts("You're not a real ghost; clear off!");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue