Over The Wire



Host: krypton.labs.overthewire.org

Port: 2231


Krypton Level 3

ssh krypton3@krypton.labs.overthewire.org -p 2231
CAESARISEASY

Objective

Well done. You’ve moved past an easy substitution cipher.

The main weakness of a simple substitution cipher is repeated use of a simple key. In the previous exercise you were able to introduce arbitrary plaintext to expose the key. In this example, the cipher mechanism is not available to you, the attacker.

However, you have been lucky. You have intercepted more than one message. The password to the next level is found in the file ‘krypton4’. You have also found 3 other files. (found1, found2, found3)

You know the following important details:

The message plaintexts are in American English (*** very important) - They were produced from the same key (*** even better!)

Enjoy.

CLI

kali@Kali:~$ ssh krypton3@krypton.labs.overthewire.org -p 2231
krypton3@krypton.labs.overthewire.org's password:

Welcome to OverTheWire!
Enjoy your stay!

krypton3@bandit:~$ cd /krypton/krypton3
krypton3@bandit:/krypton/krypton3$ ls -la
total 36
drwxr-xr-x 2 root root 4096 Sep 19 07:09 .
drwxr-xr-x 9 root root 4096 Sep 19 07:10 ..
-rw-r----- 1 krypton3 krypton3 1542 Sep 19 07:09 found1
-rw-r----- 1 krypton3 krypton3 2128 Sep 19 07:09 found2
-rw-r----- 1 krypton3 krypton3 560 Sep 19 07:09 found3
-rw-r----- 1 krypton3 krypton3 56 Sep 19 07:09 HINT1
-rw-r----- 1 krypton3 krypton3 37 Sep 19 07:09 HINT2
-rw-r----- 1 krypton3 krypton3 42 Sep 19 07:09 krypton4
-rw-r----- 1 krypton3 krypton3 785 Sep 19 07:09 README
krypton3@bandit:/krypton/krypton3$ for i in {A..Z}; do printf $i; cat found1 found2 found3 | tr -cd $i | wc -c; done
A55
B246
C227
D210
E64
F28
G227
H4
I19
J301
K67
L60
M86
N240
O12
P2
Q340
R4
S456
T75
U257
V130
W129
X71
Y84
Z132
krypton3@bandit:/krypton/krypton3$ for i in {A..Z}; do cat found1 found2 found3 | tr -cd $i | wc -c | tr -d '\n'; printf " $i \n"; done | sort -nr
456 S
340 Q
301 J
257 U
246 B
240 N
227 G
227 C
210 D
132 Z
130 V
129 W
86 M
84 Y
75 T
71 X
67 K
64 E
60 L
55 A
28 F
19 I
12 O
4 R
4 H
2 P
krypton3@bandit:/krypton/krypton3$ cat krypton4 | tr 'SQJUBNGCDZVWMYTXKELAFIORHP' 'ETAOINSRHDLUCMFYWGPBVKXQJZ'
krypton3@bandit:/krypton/krypton3$ cat krypton4 | tr 'SQJUBNGCDZVWMYTXKELAFIORHP' 'EATSORNIHCLDUPYFWGMBKVXQJZ'TXKELAFIORHP' 'EATSORNIHCLDUPYFWGMBKVXQJZ'
krypton3@bandit:/krypton/krypton3$ cat krypton4 | tr 'SQJUBNGCDZVWMYTXKELAFIORHP' 'EATSORNIHCLDUPYFWGMBKVXQJZ'
WELLD ONETH ELEVE LFOUR PASSW ORDIS BRUTE krypton3@bandit:/krypton/krypton3$

Krypton

  1. Level 0
  2. Level 1
  3. Level 2
  4. ~ Level 3
  5. Level 4