Introduction#
There was an advent calendar on http://xmas.rip/ that had a little network riddle every day:
The riddles are very fun. I solved all except for the one on day 22.
Here are my solutions.
1/TCP#
Day 1:
Connect to port 1 using ncat
and the -C
option to send proper CRLF
linebreaks. Sadly, the service does not support the HELP
command that would output all services:
$
H
-
N
E
S
c
n
L
e
a
c
P
r
t
a
v
:
t
i
c
B
-
e
r
C
o
n
k
x
a
e
m
m
n
a
e
s
p
.
n
i
r
o
p
i
t
e
p
.
f
1
o
u
n
d
Start the wishlist service using the wishlist
command:
$
w
+
W
A
P
h
K
S
L
N
i
G
e
l
e
K
a
h
e
c
n
s
o
l
n
e
l
T
n
e
t
a
c
h
,
S
`
c
e
a
l
H
t
l
'
t
a
l
'
a
.
o
w
s
o
X
a
l
s
:
t
i
,
n
`
m
e
B
o
s
-
t
.
e
w
y
Y
r
s
B
-
t
"
a
_
i
a
o
E
e
y
e
r
C
'
`
t
s
d
u
c
o
e
o
s
-
o
h
d
e
u
k
x
l
i
w
e
m
,
'
w
S
i
n
v
h
n
a
-
"
i
a
s
e
e
a
s
"
s
n
t
w
d
t
p
.
h
t
i
r
Y
_
l
a
h
i
t
S
p
i
,
`
i
'
a
t
h
a
e
p
'
-
"
s
s
s
e
e
n
.
"
t
m
t
1
`
w
b
s
f
a
s
i
e
o
e
s
e
t
l
c
r
h
n
o
l
a
`
"
v
_
l
o
n
.
i
,
i
c
y
w
c
'
s
r
o
i
d
`
e
,
t
e
u
n
o
,
!
'
a
r
g
s
t
f
e
e
l
l
o
r
d
i
i
r
v
s
s
i
f
t
t
y
c
o
,
:
o
e
r
u
!
o
,
y
r
o
b
u
w
y
.
r
e
i
t
b
e
y
e
K
!
K
T
H
X
B
Y
E
t
o
f
i
n
i
s
h
y
o
u
r
l
i
s
t
:
2/TCP#
Day 2:
This service is vulnerable against Heartbleed:
$
I
I
I
m
m
v
m
R
m
R
m
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
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
d
v
e
n
t
a
n
d
M
e
r
r
y
C
h
r
i
s
t
m
a
s
!
.
H
a
p
p
y
1
s
t
a
d
v
e
n
t
a
n
d
M
e
r
r
y
C
h
r
i
s
t
m
a
s
!
.
H
a
p
p
y
1
s
t
a
d
v
e
n
t
a
n
d
M
e
r
r
y
C
h
r
i
s
t
m
a
s
!
.
H
a
p
p
y
1
s
t
a
d
v
e
n
t
a
n
d
M
e
r
r
y
C
h
r
i
s
t
m
a
s
!
.
H
a
p
p
y
1
s
t
a
d
v
e
n
t
a
n
d
M
e
r
r
y
C
h
r
i
s
t
m
a
s
!
.
H
a
p
p
y
1
s
t
a
d
v
e
n
t
a
n
d
M
e
r
r
y
C
h
r
i
s
t
m
a
s
!
[
C
U
T
]
3/SCTP#
Day 3:
Create a local TCP socket on port 1234 that forwards the traffic to xmas.rip
on port 3 via sctp
:
$
s
o
c
a
t
T
C
P
-
L
I
S
T
E
N
:
1
2
3
4
,
f
o
r
k
S
C
T
P
-
C
O
N
N
E
C
T
:
x
m
a
s
.
r
i
p
:
3
Connect to the local socket:
$
Y
a
c
y
u
,
r
l
H
T
l
T
o
P
c
a
l
v
h
e
o
r
s
t
S
:
C
1
T
2
P
3
4
i
s
a
m
a
z
i
n
g
!
H
e
a
d
v
e
r
t
o
/
x
m
a
s
t
o
g
e
t
x
m
a
s
.
r
i
p
v
i
a
S
C
T
P
!
!
This can also be used in the browser:
Configuring that port 3 is the HTTP protocol in SCTP:
Dissected HTTP in SCTP traffic in Wireshark:
The ncat
tool from the nmap project does also directly support SCTP:
$
G
H
H
S
D
C
C
C
C
Y
E
o
T
e
a
o
o
o
o
a
n
T
s
T
r
t
n
n
n
n
y
c
t
P
e
t
t
n
t
,
a
/
:
/
e
:
e
e
e
e
t
1
r
n
n
c
n
H
H
x
.
:
F
t
t
t
t
T
T
m
1
r
-
-
i
-
T
-
T
a
n
i
T
L
o
T
P
s
P
s
2
g
,
y
e
n
y
c
/
.
0
i
p
n
:
p
t
1
r
0
n
1
e
g
e
v
p
.
i
x
4
:
t
k
:
e
1
p
O
h
e
r
x
K
D
a
:
e
t
m
e
p
p
e
S
a
c
p
1
-
x
C
s
l
6
a
t
T
.
2
i
9
l
/
P
r
0
c
i
p
i
1
a
v
l
i
p
8
t
e
a
s
i
i
3
2
o
n
a
1
n
m
:
/
a
5
o
z
1
c
i
:
t
n
3
e
g
7
t
!
-
G
s
H
M
t
e
T
r
a
e
d
a
m
v
e
r
t
o
/
x
m
a
s
t
o
g
e
t
x
m
a
s
.
r
i
p
v
i
a
S
C
T
P
!
!
4/TCP#
Day 4:
Port 4 is closed:
$
S
N
H
O
P
4
N
t
m
o
t
O
/
m
n
a
a
s
h
R
t
a
m
r
p
t
e
T
c
p
a
t
r
p
p
i
s
i
d
n
c
s
a
S
c
o
-
g
a
d
T
l
n
n
n
u
d
A
o
e
N
p
r
T
s
:
-
m
r
e
E
e
P
a
e
(
s
d
1
n
p
p
0
s
o
.
e
S
u
I
-
7
r
0
s
E
n
P
p
.
t
2
R
k
7
5
f
V
n
a
4
0
f
s
o
I
o
d
o
r
C
w
d
x
(
r
l
E
n
r
m
a
x
e
a
h
x
t
m
s
s
t
m
e
a
s
.
t
a
n
s
r
p
s
c
.
(
i
s
.
y
r
1
p
:
r
)
i
/
i
.
p
h
/
p
o
n
(
s
m
(
n
t
a
5
o
p
1
t
u
.
.
p
o
7
s
)
r
5
c
g
.
a
s
6
n
c
)
8
n
a
.
e
n
a
2
d
n
t
2
)
e
7
:
d
2
)
0
2
i
1
0
n
8
0
-
1
0
1
:
.
2
4
0
-
1
8
0
d
4
0
s
:
e
2
7
c
2
0
o
:
1
n
0
:
d
6
1
s
1
C
0
E
0
T
:
:
2
0
7
c
The PCAP shows that santa first connected to xmas.rip on port 443 and was also not able to access port 4. After sending some SYN packets to port 42, 23, 16, 15 and 8, he was able to access port 4:
This is called port knocking.
Doing the same:
$
d
d
H
l
1
r
H
l
1
r
H
l
1
r
H
l
1
r
H
l
1
r
H
l
1
r
o
o
P
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
p
0
s
S
u
o
.
e
E
n
I
-
7
r
0
s
R
k
P
p
.
t
2
V
n
7
4
f
I
o
a
4
0
f
s
o
C
w
d
o
r
E
n
d
x
(
r
l
r
m
a
x
e
a
h
x
t
m
s
s
t
m
e
a
s
.
t
a
n
s
r
p
s
c
.
(
i
s
.
y
r
1
p
:
r
)
i
/
i
.
p
h
/
p
o
n
(
s
m
(
n
t
a
5
o
p
1
t
u
.
.
p
o
7
s
)
r
5
c
g
.
a
s
6
n
c
)
8
n
a
.
e
n
a
2
d
n
t
2
)
e
7
:
d
2
)
0
2
i
1
0
n
8
0
-
1
0
1
:
.
2
4
0
-
1
8
0
d
4
0
s
:
e
2
7
c
2
0
o
:
1
n
0
:
d
7
1
s
1
C
0
E
0
T
:
:
2
0
7
c
Accessing the service:
$
Y
-
o
j
c
u
g
u
s
r
u
-
l
n
-
c
-
h
o
t
v
t
e
p
r
_
:
e
`
/
d
_
L
/
;
x
S
`
_
m
a
;
;
a
n
_
`
`
s
t
;
;
_
/
.
a
;
_
`
`
r
'
_
;
.
/
-
i
s
,
`
`
`
=
p
-
,
=
:
L
-
\
.
=
4
o
,
;
_
_
/
s
`
{
;
`
'
t
.
_
\
`
'
'
{
_
_
(
-
s
`
`
_
_
)
`
e
H
}
/
'
C
}
\
c
A
`
_
`
`
'
'
_
r
N
_
_
'
.
`
_
e
G
_
_
e
_
t
S
_
.
_
!
I
A
.
;
e
.
N
N
{
`
`
T
}
\
{
T
A
}
`
_
H
.
E
'
R
}
;
E
5/TCP#
Day 5:
Visiting the page with a browser:
When the TLS connection is established, the server tells the client, that a
client certificate can be sent and which algorithms are supported. The message
No client certificate CA names sent
indicates that the server accepts client
certificates but does not tell the client from which CA they must be issued. It
could be issued by any arbitrary CA.
$
C
d
v
d
v
d
v
C
S
M
M
E
O
A
h
S
T
d
n
D
B
H
K
K
A
c
B
g
F
4
t
b
j
j
5
1
r
f
s
i
N
C
R
S
P
P
S
S
V
N
S
S
C
E
N
S
G
H
H
S
D
C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w
.
:
T
t
t
t
i
t
o
-
1
u
-
-
i
f
-
w
D
n
e
T
L
o
i
T
,
2
g
,
y
e
n
c
y
-
0
i
p
n
:
a
p
v
0
n
0
e
g
t
e
e
x
4
:
t
k
e
:
r
-
O
h
e
-
y
c
K
D
t
:
e
D
t
e
e
e
p
n
e
y
r
c
x
1
-
:
x
a
t
t
2
a
t
y
2
/
1
l
C
/
!
c
0
p
7
i
N
p
e
1
l
v
=
l
`
r
8
a
e
c
a
\
t
i
h
i
.
2
n
r
n
p
3
i
e
:
s
|
m
4
t
`
_
1
m
{
-
,
:
a
]
-
-
2
s
-
k
2
\
e
y
G
_
_
M
,
,
,
c
T
|
e
r
_
{
t
}
_
.
`
_
_
k
.
`
)
_
e
\
,
y
_
,
\
h
t
|
t
_
`
p
}
{
-
s
`
]
-
:
.
-
/
\
/
|
x
|
m
`
a
`
s
.
r
i
p
:
5
{
_
_
_
_
}
`
`
'
|
Done.
6/TCP#
Day 6:
Connecting to port 6:
$
n
c
x
m
a
s
.
r
i
p
6
Notthing happens.
Connecting to port 666 when port 6 is still connected:
$
n
c
x
m
a
s
.
r
i
p
6
6
6
Now, in the TCP connection on port 6, a calculation appears:
$
6
5
n
8
c
9
8
x
/
m
6
a
0
s
4
.
3
r
4
i
p
6
This has to be calculated quickly and sent to the connection on port 666, otherwise, the task failed:
$
6
Y
8
o
n
7
u
c
7
r
8
x
*
T
m
3
i
a
8
m
s
1
e
.
3
r
6
i
i
s
p
u
6
p
.
T
s
c
h
i
n
g
l
e
F
a
i
l
This can be done by a small script that creates a socket to both ports, reads the calculation from port 6 and sends the answer to port 666 until no calculation is sent anymore:
#!/usr/bin/env bash
host= "xmas.rip"
echo "[*] Connecting to $host on port 6..."
exec 3<> /dev/tcp/$host/6
sleep 0.5
echo "[*] Connecting to $host on port 666..."
exec 4<> /dev/tcp/$host/666
sleep 0.5
IFS= ''
while read -u 3 "task"
do
if [[ " $task" = ~ ^[ 0-9] ]]
then
echo "[*] Task: $task"
echo "[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ows nothing interesting:
$
J
i
e
n
c
g
h
l
o
e
t
e
s
t
|
n
c
x
m
a
s
.
r
i
p
9
Analyzing the eBPF code:
#include
#include
#include
#define ETH_HLEN 14
/*eBPF program.
Filter Packets
return 0 -> DROP the packet
return -1 -> KEEP the packet and return it to user space (userspace can read it from the socket_fd )
*/
int filter (struct __sk_buff * skb) {
u8 * cursor = 0 ;
struct ethernet_t * ethernet = cursor_advance (cursor, sizeof (* ethernet));
if (! (ethernet-> type == 0x0800 )) {
goto DROP;
}
struct ip_t * ip = cursor_advance (cursor, sizeof (* ip));
if (ip-> nextp != 0x06 ) {
goto DROP;
}
u32 tcp_header_length = 0 ;
u32 ip_header_length = 0 ;
u32 payload_offset = 0 ;
u32 payload_length = 0 ;
ip_header_length = ip-> hlen << 2 ;
if (ip_header_length < sizeof (* ip)) {
goto DROP;
}
void * _ = cursor_advance (cursor, (ip_header_length- sizeof (* ip)));
struct tcp_t * tcp = cursor_advance (cursor, sizeof (* tcp));
tcp_header_length = tcp-> offset << 2 ;
payload_offset = ETH_HLEN + ip_header_length + tcp_header_length;
payload_length = ip-> tlen - ip_header_length - tcp_header_length;
if (payload_length < 7 ) {
goto DROP;
}
unsigned long p[8 ];
int i = 0 ;
for (i = 0 ; i < 8 ; i++ ) {
p[i] = load_byte (skb , payload_offset + i);
}
if ((p[2 ] == 'A' ) && (p[5 ] == '0' ) && (p[0 ] == 'X' ) && (p[3 ] == 'S' ) && (p[1 ] == 'M' ) && (p[4 ] == '2' ) && (p[7 ] == '8' ) && (p[6 ] == '1' )) {
goto KEEP;
}
goto DROP;
//keep the packet and send it to userspace retruning -1
KEEP:
return - 1 ;
//drop the packet returning 0
DROP:
return 0 ;
}
The following requirement shave to be met.
The ethernet payload has to be IPv4:
$
I
P
a
v
w
4
k
'
$
2
=
=
0
8
0
0
{
p
0
r
8
i
0
n
0
t
}
'
/
i
e
p
t
c
i
/
p
e
4
t
h
e
r
t
y
p
e
s
#
I
n
t
e
r
n
e
t
I
P
(
I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:
:
:
:
:
:
:
:
:
:
:
:
:
:
e
$
$
$
$
$
P
d
$
:
:
:
:
:
:
:
:
:
:
:
:
:
:
e
$
$
$
$
$
"
$
$
.
:
:
:
:
:
:
:
:
:
:
:
:
:
.
$
$
$
$
$
`
$
$
.
:
:
:
:
:
:
:
:
:
:
:
:
:
.
e
$
$
$
$
,
$
$
"
:
:
:
:
:
:
:
:
:
:
:
:
:
.
$
F
$
$
,
$
$
?
:
:
:
:
:
:
:
:
:
:
:
:
:
c
"
$
$
$
.
:
:
:
:
:
:
:
:
:
:
:
:
.
%
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
Also Wireshark shows that this was transmitted via IPv6:
There might be some NAT from IPv6 to IPv4 or something like this and the eBPF filter is applied after the NAT. But I have no clue :).
10/TCP#
Day 10:
Analyzing the PCAP file shows which data are sent to the server:
This data can be explorted (right click, copy as escaped string) and then sent again to the server without implementing a .NET remoting client:
$
.
^
N
C
e
E
c
T
h
�
o
-
e
n
"
\
x
2
O
e
_
\
O
x
_
4
e
\
x
4
5
\
x
5
4
\
x
0
1
\
x
0
0
D
\
e
x
a
Y
0
r
o
0
u
\
S
r
x
a
0
n
N
0
t
a
\
a
m
x
,
e
0
0
H
\
e
x
r
0
e
0
\
x
7
8
\
x
0
0
\
x
0
0
\
x
0
0
\
x
0
6
\
x
0
0
\
x
0
1
\
x
0
1
\
x
1
8
\
x
0
0
\
x
0
0
\
x
0
0
\
x
6
1
\
x
7
0
\
x
7
0
\
x
6
c
\
x
6
9
\
x
6
3
\
x
6
1
\
x
7
4
\
x
6
9
\
x
6
f
\
x
6
e
\
x
2
f
\
x
6
f
\
x
6
3
\
x
7
4
\
x
6
5
\
x
7
4
\
x
2
d
\
x
7
3
\
x
7
4
\
x
7
2
\
x
6
5
\
x
6
1
\
x
6
d
\
x
0
4
\
x
0
0
\
x
0
1
\
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
p
o
7
s
)
r
5
c
g
.
a
s
6
n
c
)
8
n
a
.
e
n
a
2
d
n
t
2
)
e
7
:
d
2
)
0
2
i
1
0
n
8
0
-
1
0
1
:
.
2
4
3
-
1
8
2
d
1
0
s
:
e
1
7
c
4
0
o
:
1
n
2
:
d
0
1
s
1
C
0
E
0
T
:
:
2
0
7
c
The following example scapy source code was provided:
f
s
r
y
o
n
m
=
s
c
I
a
P
p
(
y
d
.
s
a
t
l
=
l
'
'
i
)
m
p
r
T
t
C
P
T
(
C
s
P
p
,
o
r
I
t
P
=
3
1
3
3
7
,
d
p
o
r
t
=
1
3
,
r
e
s
e
r
v
e
d
=
1
5
,
f
l
a
g
s
=
'
S
'
,
s
e
q
=
1
0
0
0
)
The reserved=15
option sets all reserved flags to 1
:
Performing a 3-way TCP handshake with scapy and setting all reserved flags to 1:
#!/usr/bin/env python3
from scapy.all import *
ip= IP(dst= "51.75.68.227" , flags= 4 )
TCP_SYN= TCP(sport= 1500 , reserved= 15 , dport= 13 , flags= "S" , seq= 100 )
TCP_SYNACK= sr1(ip/ TCP_SYN)
my_ack = TCP_SYNACK. seq + 1
TCP_ACK= TCP(sport= 1500 , dport= 13 , flags= "A" , seq= 101 , ack= my_ack)
send(ip/ TCP_ACK)
my_payload= "gugus"
TCP_PUSH= TCP(sport= 1500 , dport= 13 , flags= "PA" , seq= 102 , ack= my_ack)
response= sr1(ip/ TCP_PUSH/ my_payload)
print(response)
When this script is executed, the reserved bits are set to 1:
But the handshake was not successful. The system sends a TCP RST packet back when the SYN-ACK was received:
This is because the OS received the SYN-ACK packet and does not know what to do
with it (because not the OS but our scapy script performed the initial handshake
request). The following iptables rule drops the packet so that the system does
not send an RST packet back:
$
s
u
d
o
i
p
t
a
b
l
e
s
-
t
r
a
w
-
A
P
R
E
R
O
U
T
I
N
G
-
p
t
c
p
-
d
p
o
r
t
1
5
0
0
-
j
D
R
O
P
Execute the script again:
#
B
.
R
S
B
F
R
7
U
e
F
e
e
e
i
e
l
N
g
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g
5
p
.
w
S
1
7
1
.
(
.
c
5
l
y
7
l
.
0
e
5
o
6
T
s
.
s
8
x
6
e
.
o
n
8
d
2
c
o
.
.
2
+
)
2
7
T
?
2
]
L
7
:
F
y
]
1
U
e
:
4
V
s
1
)
H
4
'
W
'
P
c
4
(
a
T
E
n
r
C
'
x
D
t
u
S
C
A
b
3
)
e
T
n
t
e
5
o
s
o
t
0
t
a
S
h
b
0
e
l
.
i
l
s
i
h
s
e
t
d
.
o
f
k
n
o
w
n
h
o
s
t
s
.
15/TCP#
Day 15:
Using a simple WebSocket page from https://github.com/ethicalhack3r/scripts/blob/master/WebSockets.html .
It’s not possible to directly connect to the port 15:
Forwarding the local port 80 to port 15 on xmas.rip using socat:
$
s
u
d
o
s
o
c
a
t
T
C
P
-
L
I
S
T
E
N
:
8
0
,
f
o
r
k
T
C
P
-
C
O
N
N
E
C
T
:
x
m
a
s
.
r
i
p
:
1
5
Now it works:
16/TCP#
Day16:
Connect to the port:
#
W
Y
Y
^
e
o
o
C
n
l
u
u
c
c
r
r
a
o
t
m
f
A
e
i
n
x
r
s
m
t
s
w
a
o
t
e
s
r
.
S
C
r
a
h
f
i
n
a
o
p
t
l
r
a
l
1
s
e
E
6
n
A
U
g
X
n
e
?
i
:
c
i
o
s
r
>
n
1
.
V
.
G
.
u
h
m
m
m
R
e
i
n
d
e
e
r
S
e
r
v
e
r
.
T
h
i
s
i
s
a
b
i
n
a
r
y
c
h
a
l
l
e
n
g
e
;
-
)
.
There is some binary code after the string “Your first Challenge is”:
#
0
0
0
0
0
0
0
0
0
0
0
^
0
0
0
0
0
0
0
0
0
0
0
C
n
0
0
0
0
0
0
0
0
0
0
0
c
0
0
0
0
0
0
0
0
0
0
0
a
0
0
0
0
0
0
0
0
0
0
0
t
0
0
0
0
0
0
0
0
0
0
0
0
1
2
3
4
5
6
7
8
9
a
x
0
0
0
0
0
0
0
0
0
0
0
m
:
:
:
:
:
:
:
:
:
:
:
a
s
5
7
6
6
6
2
6
5
c
e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@
o
2
R
2
C
n
l
u
4
u
3
O
3
c
c
r
#
r
4
N
4
o
]
G
x
m
f
U
A
m
e
i
n
a
r
s
s
t
s
w
.
o
t
e
r
r
i
S
C
p
a
h
f
n
a
o
1
t
l
r
6
a
l
s
e
E
n
A
U
g
X
n
e
?
i
:
c
i
o
s
r
>
n
1
.
H
.
_
.
U
=
u
h
m
m
m
R
e
i
n
d
e
e
r
S
e
r
v
e
r
.
T
h
i
s
i
s
a
b
i
n
a
r
y
c
h
a
l
l
e
n
g
e
;
-
)
.
Installing Unicorn (a lightweight multi-platform, multi-architecture CPU emulator framework):
#
C
I
S
o
n
u
p
l
D
s
c
i
l
o
t
c
p
e
w
1
a
e
c
n
0
l
s
i
t
l
0
l
s
n
i
o
%
i
f
s
n
a
n
u
t
g
d
|
g
l
a
i
█
l
l
u
n
█
c
y
l
n
g
█
o
i
█
l
i
u
c
h
█
l
n
n
o
t
█
e
s
i
r
t
█
c
t
c
n
p
█
t
a
o
s
█
e
l
r
:
█
d
l
n
/
█
e
/
█
p
d
f
█
a
i
█
c
u
l
█
k
n
e
█
a
i
s
█
g
c
.
█
e
o
p
█
s
r
y
█
:
n
t
█
-
h
█
u
1
o
█
n
.
n
█
i
0
h
█
c
.
o
█
o
1
s
█
r
t
█
n
e
█
d
█
.
█
o
█
r
|
g
/
1
p
8
a
.
c
2
k
M
a
B
g
e
4
s
9
/
k
7
B
f
s
4
4
/
e
6
d
d
1
3
4
b
d
7
c
c
2
d
c
c
c
8
3
e
5
7
c
e
4
3
5
8
8
1
b
4
5
2
a
0
4
a
d
5
4
1
2
8
3
6
b
a
8
a
8
e
6
d
b
9
8
d
c
0
/
u
n
i
c
o
r
n
-
1
.
0
.
1
-
p
y
2
.
p
y
3
-
n
o
n
e
-
m
a
n
y
l
i
n
u
x
1
_
x
8
6
_
6
4
.
w
h
l
(
1
8
.
2
M
B
)
Download the code sample:
#
1
0
c
%
0
u
r
T
l
o
1
t
0
a
4
l
8
d
a
1
y
0
1
%
0
6
R
-
e
1
L
c
0
e
4
h
i
8
t
v
t
e
p
d
:
/
%
0
/
w
X
w
f
w
e
.
r
u
d
0
n
i
c
A
D
o
v
l
6
r
e
o
9
n
r
a
4
-
a
d
0
e
g
n
e
g
U
i
S
p
n
p
l
e
e
o
.
e
a
0
o
d
d
r
g
-
/
:
s
T
T
-
a
i
o
-
m
m
t
:
p
e
a
-
l
l
-
e
s
/
-
t
T
S
:
e
i
p
-
s
m
e
-
t
e
n
:
1
t
-
.
-
p
y
-
T
L
:
i
e
-
m
f
-
e
t
:
-
-
C
S
u
p
r
e
6
r
e
9
e
d
4
n
0
t
Delete some code that is not needed and adding some code that connects to the server, executes the bytecode and sends back the result:
#!/usr/bin/env python
from __future__ import print_function
from unicorn import *
from unicorn.x86_const import *
import socket
import re
def main ():
host = 'xmas.rip'
port = 16
s = socket. socket(socket. AF_INET, socket. SOCK_STREAM)
s. connect((host,port))
while True :
data = s. recv(1024 )
print(data)
data = s. recv(1024 )
print(data)
if "code" not in data and "EAX" not in data:
exit()
result = re. search("is(.*) \n\n\n Your" , data)
x86code = result. group(1 )
print("Code: :" + x86code)
emulated = emulate_code(x86code)
print("EAX Register:" + str(emulated))
s. send(str(emulated))
continue
def emulate_code (x86code):
# memory address where emulation starts
ADDRESS = 0x1000000
print("Emulate i386 code" + x86code)
try :
# Initialize emulator in X86-32bit mode
mu = Uc(UC_ARCH_X86, UC_MODE_32)
# map 2MB memory for this emulation
mu. mem_map(ADDRESS, 2 * 1024 * 1024 )
# write machine code to be emulated to memory
mu. mem_write(ADDRESS, x86code)
# initialize machine register EAX
mu. reg_write(UC_X86_REG_EAX, 0x0000 )
# emulate code in infinite time & unlimited instructions
mu. emu_start(ADDRESS, ADDRESS + len(x86code))
r_eax = mu. reg_read(UC_X86_REG_EAX)
return int(r_eax)
except UcError as e:
print("ERROR: %s " % e)
if __name__ == '__main__' :
main()
Execute the script:
#
W
Y
Y
C
E
E
W
Y
Y
C
E
E
F
e
o
o
o
m
A
o
o
o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
.
"
.
"
-
`
o
.
e
"
"
=
f
.
.
.
E
T
s
"
"
=
_
`
6
h
u
.
.
"
"
O
i
r
=
"
0
s
e
"
.
.
U
"
=
R
i
y
.
.
"
`
v
s
o
=
"
"
T
u
"
.
.
`
j
a
`
"
=
l
h
"
`
G
b
a
.
"
O
i
d
"
`
y
n
.
a
n
"
`
r
o
"
y
`
l
c
u
h
c
a
k
l
l
l
e
e
n
t
g
s
e
t
;
r
-
y
)
.
a
n
o
t
h
e
r
o
n
e
TCP stream in wireshark (the dots in the ASCII dump represent non-printable characters):
17/TCP#
Day 17:
This challenge is about an authentication protocol for TLS:
Curl supports SRP:
$
T
L
c
S
u
-
r
S
l
R
"
P
"
-
k
i
s
j
`
g
-
s
'
s
t
u
`
'
l
p
=
'
"
`
s
e
=
`
"
"
a
r
=
-
"
"
u
=
`
.
|
`
t
n
'
.
`
|
h
i
`
;
;
,
t
c
y
e
p
,
'
[
~
e
=
~
w
=
~
`
s
h
=
~
~
r
o
=
~
`
'
p
=
O
~
n
=
~
~
'
e
\
~
~
-
e
_
~
~
`
t
d
\
~
~
l
s
o
]
~
s
u
t
s
h
`
;
;
,
e
o
'
-
`
r
s
,
.
e
_
s
,
;
a
s
`
n
t
.
;
t
u
`
_
.
a
p
_
i
/
"
d
"
-
"
t
c
l
e
s
r
p
t
a
i
s
f
s
i
"
w
c
"
o
a
r
t
d
e
s
2
4
a
1
n
2
y
2
w
0
a
1
y
8
?
!
h
t
t
p
s
:
/
/
x
m
a
s
.
r
i
p
:
1
7
No server certificate is sent to the client in the server hello TLS message:
The client tells the server that he likes to do SRP by choosing appropriate cipher suites. The username is also sent in the client hello to the server:
18/UDP#
Day 18:
The message has to be correctly formatted:
#
t
I
^
e
n
C
n
s
v
c
t
a
a
l
t
i
d
-
u
m
e
x
s
m
s
a
a
s
g
.
e
r
i
f
p
o
r
1
m
8
a
t
A message according to RFC 1312 (https://tools.ietf.org/html/rfc1312 h) has to be created:
Parts of the message:
revision
recipient + nullbyte
recipterm + nullbyte
message + nullbyte
sender + nullbyte
senderterm + nullbyte
cookie + nullbyte
signature + nullbyte
Example from the RFC:
Building such a message and send it to the server:
#
-
I
(
n
e
v
c
a
h
l
o
i
d
-
e
s
i
"
g
B
n
s
a
a
t
n
u
t
r
a
e
\
x
x
0
x
0
\
x
0
0
H
i
\
x
0
0
s
a
n
d
y
\
x
0
0
s
o
s
o
\
x
0
0
s
s
\
x
0
0
x
x
\
x
0
0
"
;
s
l
e
e
p
1
)
|
n
c
a
t
-
u
x
m
a
s
.
r
i
p
1
8
Now, we have to calculate the signature. The following script was created:
#!/usr/bin/env python3
import socket
import hashlib
def main ():
host = "51.75.68.227"
port = 18
myip = "178.194.102.109"
revision = "B"
recipient = "santa"
recipterm = ""
message = "secret"
sender = "santa"
senderterm = "x"
cookie = "1"
signature = ""
signature = generate_signature(myip, sender)
data = revision \
+ recipient + ' \x00 ' \
+ recipterm + ' \x00 ' \
+ message + ' \x00 ' \
+ sender + ' \x00 ' \
+ senderterm + ' \x00 ' \
+ cookie + ' \x00 ' \
+ signature + ' \x00 '
print("Message: " + data)
sock = socket. socket(socket. AF_INET, socket. SOCK_DGRAM)
sock. sendto(data. encode(), (host,port))
data, addr = sock. recvfrom(1024 )
print (str(data, "utf-8" ))
def generate_signature (addr, sender):
source_ip = addr
blake = hashlib. blake2b(digest_size= 18 )
blake. update(source_ip. encode())
blake. update(sender. encode())
blake. update(b 'XMAS2018' )
return blake. hexdigest()
if __name__ == '__main__' :
main()
The message was accepted:
#
M
+
f
e
M
4
s
e
i
/
s
s
0
d
a
s
5
a
g
a
5
y
e
g
G
1
:
e
r
8
z
B
d
I
s
e
j
a
l
g
n
i
q
t
v
p
a
e
E
s
r
4
e
e
i
c
d
2
r
K
e
t
p
t
o
N
s
L
a
S
3
n
a
n
t
n
r
a
t
1
x
a
E
1
,
o
2
h
0
h
S
2
a
G
f
v
y
6
e
J
2
D
5
a
V
4
w
3
n
L
3
i
A
4
c
5
0
e
E
3
M
3
X
X
2
M
H
c
A
v
6
S
l
e
!
V
7
1
f
/
4
K
4
4
8
0
7
2
0
E
7
R
2
I
9
2
a
X
9
x
3
G
4
s
a
t
8
o
b
v
f
v
19/TCP#
Day 19:
Connect to the port and save the output in a file:
#
P
I
[
N
H
.
n
G
D
.
c
\
.
a
r
]
t
f
t
x
I
m
D
a
A
s
T
.
x
r
]
i
w
p
|
T
1
U
9
%
L
|
:
t
e
e
B
f
E
i
4
l
]
e
W
2
w
The file is an image:
$
f
i
f
l
i
e
l
2
e
:
f
P
i
N
l
G
e
2
i
m
a
g
e
d
a
t
a
,
2
5
6
x
2
5
6
,
8
-
b
i
t
/
c
o
l
o
r
R
G
B
A
,
n
o
n
-
i
n
t
e
r
l
a
c
e
d
Display the image:
Sending back the number from the image ( 65817752
) reveals the secret:
#
P
I
[
6
Y
d
^
N
H
.
5
o
Q
C
n
G
D
.
8
u
f
c
\
.
1
X
a
r
]
7
g
P
t
f
7
o
g
t
5
t
F
x
I
2
z
m
D
i
P
a
A
t
u
s
T
!
m
.
x
!
J
r
]
I
i
w
j
p
|
V
T
v
1
U
r
9
%
N
L
l
|
:
8
6
t
c
e
K
e
D
B
i
f
E
E
i
4
9
l
]
7
e
W
K
2
w
H
u
B
R
O
n
2
Q
U
u
6
Y
Z
n
0
Z
C
l
z
N
V
3
P
j
8
6
u
B
R
e
Q
0
j
S
C
20/TCP#
Day 20:
In DNS over HTTPS, the DNS request can be provided base64 encoded in the GET request:
The encoded data itself is a DNS payload as it would be for a normal DNS request (DNS on-the-wire format):
Creating such a message ( TXT
record of xmas
) using scapy and sending it to the server (using HTTP/2 and TLS):
#!/usr/bin/env python3
from scapy.all import *
from hyper import HTTPConnection
query = base64. b64encode(bytes(DNS(qd= DNSQR(qname= "xmas" , qtype= "TXT" )))). decode("utf-8" )
print("Binary query: " + query)
conn = HTTPConnection(host= 'xmas.rip' , port= 20 , secure= True )
conn. request('GET' , '/dns-query?dns=' + query)
resp = conn. get_response(). read()
print("Binary response: " + str(res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L
c
W
0
8
\
q
x
Z
0
I
c
S
\
F
x
h
0
u
0
9
\
C
x
3
1
0
0
F
\
+
x
H
0
K
0
L
\
6
x
X
0
6
1
Y
\
4
x
'
0
0
\
x
0
0
\
x
0
0
\
x
0
0
\
x
0
0
f
e
H
a
p
p
y
X
M
A
S
2
0
1
8
!
H
e
r
e
i
s
t
h
e
s
e
c
r
e
t
:
N
W
2
O
D
B
0
l
a
I
0
s
y
o
z
U
6
X
r
5
g
J
x
k
F
K
e
n
Z
+
f
X
i
L
q
/
g
g
A
C
L
W
8
q
Z
I
S
F
h
u
9
C
3
0
F
+
H
K
L
6
X
6
Y
4
'
21/UDP#
Day 21:
I did not solve this task. I had some problems setting up the go environment.
22/TCP#
Day 22:
When a connection to the port is established, a message says to which service you have to connect and which data you have to send. This is different every time and you don’t have much time:
$
p
F
$
p
^
$
p
^
$
p
^
r
A
r
C
r
C
r
C
n
o
I
n
o
n
o
n
o
c
t
L
c
t
c
t
c
t
a
o
E
a
o
a
o
a
o
t
c
D
t
c
t
c
t
c
o
^
o
o
o
x
l
C
x
l
x
l
x
l
m
m
m
m
a
=
a
=
a
=
a
=
s
s
s
s
.
s
.
s
.
s
.
t
r
c
r
c
r
c
r
c
i
t
i
t
i
t
i
p
p
p
p
p
p
p
p
,
,
,
,
2
2
2
2
p
2
p
2
p
2
p
2
o
o
o
o
r
r
r
r
t
t
t
t
=
=
=
=
2
2
2
2
1
1
1
1
5
3
6
4
0
9
9
1
,
,
,
,
m
m
m
m
a
a
a
a
g
g
g
g
i
i
i
i
c
c
c
c
s
s
s
s
t
t
t
t
r
r
r
r
i
i
i
i
n
n
n
n
g
g
g
g
=
=
=
=
V
0
B
7
9
Q
R
9
4
0
H
Q
9
1
6
L
3
Z
W
3
A
D
B
M
T
J
F
R
O
I
4
J
Q
5
U
W
N
T
X
6
Bash script for solving this task:
#!/usr/bin/env bash
host= "51.75.68.227"
main(){
echo "[*] Connecting to $host on port 22..."
exec 3<> /dev/tcp/$host/22
IFS= ''
while read -u 3 "task"
do
if [[ " $task" = ~ ^protocol ]]
then
echo
echo "[*] Task: $task"
IFS= " " read x x protocol x x port x x x magicstring <<< " $task"
protocol= ${ protocol/,/}
port= ${ port/,/}
magicstring= ${ magicstring/,/}
echo "Protocol: $protocol"
echo "Port: $port"
echo "String: $magicstring"
send_string " $protocol" " $port" " $magicstring"
else
echo " $task"
fi
done <&3
echo "[*] Finished."
}
send_string(){
protocol= " $1"
port= " $2"
magicstring= " $3"
case $protocol in
"tcp" )
echo "[*] TCP..."
echo " $magicstring" | ncat -v " $host" " $port"
;;
"udp" )
echo "[*] UDP..."
echo " $magicstring" | ncat -v --udp " $host" " $port"
;;
"sctp" )
echo "[*] SCTP..."
echo " $magicstring" | ncat -v --sctp " $host" " $port"
;;
esac
}
main
Execute the script:
#
[
[
P
P
S
[
N
N
N
[
P
P
S
[
N
N
N
[
P
P
S
[
N
N
N
[
*
*
r
o
t
*
c
c
c
*
r
o
t
*
c
c
c
*
r
o
t
*
c
c
c
*
]
]
o
r
r
]
a
a
a
]
o
r
r
]
a
a
a
]
o
r
r
]
a
a
a
]
/
t
t
i
t
t
t
t
t
i
t
t
t
t
t
i
t
t
t
d
C
T
o
:
n
U
:
:
:
T
o
:
n
T
:
:
:
T
o
:
n
T
:
:
:
:
F
a
o
a
c
g
D
a
c
g
C
a
c
g
C
-
i
y
n
s
o
2
:
P
V
C
1
s
o
2
:
P
V
C
1
s
o
2
:
P
V
C
1
:
:
>
n
2
n
k
l
1
.
e
o
1
k
l
1
.
e
o
1
k
l
1
.
e
o
1
o
~
o
:
@
:
i
2
e
:
:
3
Q
.
r
n
:
:
9
1
.
r
n
:
:
8
Q
.
r
n
|
<
s
c
9
U
.
s
n
b
2
E
.
s
n
b
3
0
.
s
n
b
-
h
t
p
u
7
i
e
y
p
t
L
i
e
y
p
t
K
i
e
y
:
e
i
r
d
2
o
c
t
r
c
T
o
c
t
r
c
Y
o
c
t
.
>
'
d
n
o
p
4
n
t
e
o
p
R
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wireshark:
23/TCP#
Creating an ethernet tunnel over SSH:
#
s
a
s
n
s
t
h
a
@
-
x
4
m
a
-
s
l
.
r
s
i
a
p
n
'
t
s
a
p
-
a
p
s
s
2
w
3
o
r
x
d
m
:
a
s
.
r
i
p
T
u
n
n
e
l
=
e
t
h
e
r
n
e
t
-
N
-
w
1
:
1
A new TAP ethernet device is created:
#
1
0
i
:
p
t
l
a
a
i
p
n
l
1
k
:
/
t
e
a
t
p
m
h
1
t
e
u
r
1
5
5
e
0
:
0
2
6
q
:
d
6
i
e
s
:
c
a
4
n
:
o
c
o
c
p
:
9
s
9
t
a
b
t
r
e
d
D
f
O
f
W
:
N
f
f
g
:
r
f
o
f
u
:
p
f
f
d
:
e
f
f
f
a
:
u
f
l
f
t
q
l
e
n
1
0
0
0
Bring up the new layer 2 tunnel interface:
#
i
p
l
i
n
k
s
e
t
d
e
v
t
a
p
1
u
p
Configure the device using DHCP:
#
d
h
c
l
i
e
n
t
t
a
p
1
In the DHCP ACK message the secret was revealed in a DHCP option:
24/TCP#
Day 24:
The page shows the secret letter by letter. But the secret can be printed in the JavaScript console:
Conclusion#
This advent calendar was very fun! I hope there will be one next year again! :)