Skip to content

Commit c5c6c2e

Browse files
committed
Minor grammatical fixes
1 parent ace96d6 commit c5c6c2e

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

2018-09-13_scs-ctf/binary_re/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ This looks like an oversight of the author - decrypted password probably shouldn
4242

4343
The tasks became even weirder from now on. The binary asked us a riddle [(terrible translation by Google Translate for curious)](https://translate.google.com/#auto/en/Od%20pi%C3%B3rka%20jestem%20l%C5%BCejszy%2C%20ale%20powstrzyma%C4%87%20na%20d%C5%82ugo%20nie%20zdo%C5%82a%20mnie%20najsilniejszy.%20Czym%20jestem%3F). We could just guess the solution or find it on the Internet, but reversing the binary turned out to be even easier.
4444

45-
All the answers are in the binary in plain text, and are compared with input using standard string comparsion. There are two problems though:
45+
All the answers are in the binary in plain text and are compared with input using standard string comparison. There are two problems though:
4646

4747
- Strings are obfuscated. Not intentionally - but Polish characters confuse IDA and GNU strings and not all the answers were immediately visible.
4848
- The binary is written in C++ and compiled without optimization.
4949

5050
![](comparsion.png)
5151

52-
But it's nothing that we can't deal with in a few minutes. Strings are initialized globaly, so first we had to find the static initialization routine in the codebase (easy with find-xref function in IDA. One could also search for the name `__static_initialization_and_destruction`, because symbols were not stripped).
52+
But it's nothing that we can't deal with in a few minutes. Strings are initialized globally, so first, we had to find the static initialization routine in the codebase (easy with find-xref function in IDA. One could also search for the name `__static_initialization_and_destruction`, because symbols were not stripped).
5353

5454
All the answers can be easily found by looking at that function in disassembly:
5555

2018-09-13_scs-ctf/crypto_rot/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Another ciphertext-only challenge. This time, ciphertext is even shorter:
88

99
We immediately can infer *something* about the encryption, because we know that `scsctf_2017{` encrypts to ```5?5?6B0a_`gL```. The same input characters encode to the same output characters, so this is a substitution cipher.
1010

11-
The chalenge title and description suggested `rot` operation. Alas, there are no obvious patterns in:
11+
The challenge title and description suggested `rot` operation. Alas, there are no obvious patterns in:
1212

1313
```python
1414
mapping = {
@@ -52,8 +52,8 @@ c 36
5252
Now, as I've said, we hate guessing. So we decided to approach this problem
5353
methodically, instead of getting into the task author's head.
5454

55-
One of my teammates noticed that there are only few possible differences for
56-
ascii values. So he tried subtracting `[36, 47, -47, 62]` from every ciphertext
55+
One of my teammates noticed that there are only a few possible differences for
56+
ASCII values. So he tried subtracting `[36, 47, -47, 62]` from every ciphertext
5757
character, and written down all printable results at every position:
5858

5959
```

2018-09-13_scs-ctf/crypto_xor/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ UxYSRSg6YzQ8KkNGUDQKdl8fRQNMAxhVcRNdRBgLEx8MHRI2XFcRTBMEClIWAhA1PTcucyNWVUEy
88
DCURDlkVV1E+SSMDTRddGwIXQxAPLFFfR10JBE4PUzMKJTExI3MTUkNUMBZ2fBVDBkoC
99
```
1010

11-
I dislike ciphertext-only challenges, because to solve them you need to guess the algorithm, and it's neither practical nor fun. Not to mention that basing the difficulty of your cipher on secretness of your algorithm is a [well-known antipattern in cryptography](https://en.wikipedia.org/wiki/Kerckhoffs%27s_principle).
11+
I dislike ciphertext-only challenges because to solve them you need to guess the algorithm, and it's neither practical nor fun. Not to mention that basing the difficulty of your cipher on secretness of your algorithm is a [well-known antipattern in cryptography](https://en.wikipedia.org/wiki/Kerckhoffs%27s_principle).
1212

13-
After wasting way too much time on guessing, we discoverd the encryption algorithm. We know the beginning of the flag (flag format is `scsctf_2018{.......}`), and xoring it with the ciphertext:
13+
After wasting way too much time on guessing, we have discovered the encryption algorithm. We know the beginning of the flag (flag format is `scsctf_2018{.......}`), and xoring it with the ciphertext:
1414

1515
```python
1616
import string
@@ -25,7 +25,7 @@ print xor(data, 'scsctf_2018{')
2525

2626
Yields `To demonstra` which looks like a beginning of an English sentence.
2727

28-
If the data was xored with completely random sequence of bytes, the scheme would be [provably secure](https://en.wikipedia.org/wiki/One-time_pad). But we expect the flag to be shorter than the whole ciphertext, so this turns into a [repeated key xor](https://en.wikipedia.org/wiki/XOR_cipher), a well-known weak cipher.
28+
If the data was xored with a completely random sequence of bytes, the scheme would be [provably secure](https://en.wikipedia.org/wiki/One-time_pad). But we expect the flag to be shorter than the whole ciphertext, so this turns into a [repeated key xor](https://en.wikipedia.org/wiki/XOR_cipher), a well-known weak cipher.
2929

3030
We brute-forced few key lengths to discover the proper one, and found it:
3131

2018-09-13_scs-ctf/web_serialize/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Serialize (Web)
22

3-
This challenge deserves highlighting, because it required absolutely no guessing.
3+
This challenge deserves highlighting because it required absolutely no guessing.
44

55
We have to deal with the following PHP code:
66

@@ -68,12 +68,12 @@ class MagicCode {
6868
}
6969
```
7070

71-
In the last line of code (that I somehow didn't copy), the POST data sent by user is base64 decoded and unserialized.
71+
In the last line of code (that I somehow didn't copy), the POST data sent by the user is base64 decoded and unserialized.
7272

7373
It's obvious what to do here: we need to craft a MagicCode object.
7474
The __destruct() method will be called by the runtime, and we will get a limited RCE on the server. In fact, it's enough to change `command` variable to `showFlag` to get "password" and `showSource` to get the flag.
7575

76-
Crafting PHP serialized payloads is relatively easy, because the serialization format is human readable and not very complicated. I crafted the following by hand (although in retrospect, I should've just used the code provided and serialize() function):
76+
Crafting PHP serialized payloads is relatively easy because the serialization format is human readable and not very complicated. I crafted the following by hand (although in retrospect, I should've just used the code provided and serialize() function):
7777

7878
```python
7979
import requests

0 commit comments

Comments
 (0)