# 27th place solution - 23 points

Solutions
It is my first CTF competition and i really like this experience. To get many of solutions i reffer to previous year solutions and other CTF competitions and forums.
Thanks authors for thier hard work, vision, and contribution to the AI community!
2. Cluster - Level 1
I just make model predictions and find target group from the misclassified data. To find group i count most misclassified values of each categorical features and find witch one will maximaze the score. Same strategy with numerical.
input_data = df[(df['income'] != df['predictions']) & (df["age"] <= 38) & (df['occupation'] == "Tech-support")].id.astype(int).tolist()
3/4 Cluster - Level 2&3
Thanks for this task to last year solutions.
[https://www.kaggle.com/code/cdeotte/solutions-d3fc0n-ctf-lb-0-894#HOTTERDOG-(id:-hotterdog)----400-Points](https://www.kaggle.com/code/cdeotte/solutions-d3fc0n-ctf-lb-0-894#HOTTERDOG-(id:-hotterdog)----400-Points)
But it was intresting to find target message from this:
![](assets/386f76666a1ce286232d7279.jpg)
5. Count MNIST
[255, 23435] = [pixel value, count]. Output data should have 256 values what corresponds count of RGB pixel values. And the second hint - count task, so just find how common is the value of each pixel is in the dataset. Datasets can be not the same, thanks for this discussion:
[https://www.kaggle.com/competitions/ai-village-capture-the-flag-defcon31/discussion/449263](https://www.kaggle.com/competitions/ai-village-capture-the-flag-defcon31/discussion/449263)
7. Granny 1
Solution also from the last year, but the model is MobileNetV2:
[https://pytorch.org/hub/pytorch_vision_mobilenet_v2/](https://pytorch.org/hub/pytorch_vision_mobilenet_v2/)
But the issue what which took a long time - you should use same processing while submitting the image (normalize, resize and crop).
8. Granny 2
Same solution as granny 1, but i convert save an image as jpg and iterative changing the image in many epochs with different learning rates to maximize the score.
11. Pixelated
I just see previous CTF challenges and found the strategy with send request with "<>". Then find that we should insert is_admin tag, but it's was hard to pick a correct font and size of image. After many iterations i found the best to correct recognize this: Itrue.
img = Image.new(mode="RGB", size=(800,92), color=(255,255,255))
font = ImageFont.FreeTypeFont("ABeeZee-Regular.otf",size=36)
17. Inversion
Same strategy as in the last year, but to find letters in the 5,6,8 places we should inverse probs of the model outputs (argmax(probs) -> argmin(probs)) and then we can find "O" on the 6th position.
![](assets/84696a922f6988a022b5a34a.jpg)
24. Guess Who's Back?
Just change pixel values of sloth image. I substract some values from initial pixel values and recognize a part of the text one by one.
![](assets/516e5c44233a5e56e6b0a67b.png)