from fl.preprocessing import load_mnist, data_to_client
from fl.model import NN
from fl.utils import plot_train_and_test, weights_to_json
from fl.federated_learning import federated
Challenge 2: Poison [2/2]
1 A Defense?
This time, a defense mechanism has been implemented. It aims to prevent any single client from having too much influence by enforcing a maximum variation on the weights. But is that enough?
2 Flag Retrieval
Just like in the first challenge, you need to send your weights to the API.
= ...
model raise NotImplementedError
import requests as rq
= "https://du-poison.challenges.404ctf.fr"
URL + "/healthcheck").json() rq.get(URL
= weights_to_json(model.get_weights())
d + "/challenges/2", json=d).json() rq.post(URL