{
  "id": 455723,
  "title": "1188th Place Solution for the AI Village Capture the Flag @DEFCON31 Competition",
  "content": "<p>I will be honest, I had no idea how to progress in this competition. I was into Machine Learning but had never even heard of cybersecurity or CTF on ML models. In short, I was new and learned a lot.</p>\n<p>I could not complete any of the challenges except the test one whose solution even the host provided. In this discussion, I will be providing links on getting started or casually exploring cybersecurity in ML to beginners like me who didn't understand anything. I will also be listing a very short analysis on how top solutions solved the challenges. please take them as a hint if you get stuck somewhere and not just implement them without understanding the concept.</p>\n<p>Must Watch Links:</p>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=a92SWvqgMCE\" target=\"_blank\">AI poisoning</a></li>\n<li><a href=\"https://www.bucks.edu/media/bcccmedialibrary/con-ed/itacademy/fos2022/Casey-AI-Poisoning-pdf.pdf\" target=\"_blank\">PPT on AI poisoning</a></li>\n<li><a href=\"https://medium.com/swlh/how-to-fool-artificial-intelligence-fcf230bf37e\" target=\"_blank\">Fooling AI article</a></li>\n</ul>\n<p>HINTS SECTION (Try all challenges only then read)</p>\n<ul>\n<li>Test - answer given in demo notebook</li>\n<li>Clusters 1 - Try to find high scoring numerical value in dataset, use that as a key to get the flag.</li>\n<li>Clusters 2 - count of clusters is asked. one easy solution is to just randomly check all values 1 … solution.  Credits: solution for place 3.</li>\n<li>Cluster 3 - use the tnse_model model with config tsne_model = TSNE(perplexity=17, n_components=2, init='pca', n_iter=2500, random_state=23) and plot the output as a scatterplot with annotations.</li>\n<li>MNIST - Count of pixel values is just throwing away the solution at you.</li>\n<li>Count CIFAR - Unsolved</li>\n<li>Granny 1 - Difficult Challenges ( would suggest solving at last ) hint would be using model that gives similar output to the given model, ultra hint modified MobileNetV2. then use Basic Iterative Method FGSM.</li>\n<li>Granny 2 - similar to Granny 1 - Basic Iterative Method FGSM again. refer to 3rd place solution <a href=\"https://www.kaggle.com/code/mrmldjr/granny-1-and-2-solutions-ai-village-ctf/\" target=\"_blank\">here</a></li>\n<li>Granny 3 - Unsolved</li>\n<li>Passphrase - similar to granny find a model that gives similar output as example. solution <a href=\"https://www.kaggle.com/code/mrmldjr/passphrase-solution-ai-village-ctf-defcon31\" target=\"_blank\">here</a></li>\n<li>Pixelated - try sending server different HTML like queries as input you will get the answer in a few tries.</li>\n<li>Spanglish - send flag as input ;D</li>\n<li>Hush - answer is a quote. try giving multiple words/letters as input to pyttsx3.</li>\n<li>Pirate Flag - Multiple solutions, try asking the model directly for solution as if asking another human.</li>\n<li>semantle - try n number of english words, if you get a good score, try synonyms. Ans = rocks in sky.</li>\n<li>semantle 2 - try same solution with 5 word sets.</li>\n<li>inversion - a bit difficult but could be solved using guide <a href=\"https://www.kaggle.com/code/cdeotte/solutions-d3fc0n-ctf-lb-0-894#Inference-(id:-inference)----400-Points\" target=\"_blank\">here</a>, if could not solve hint \"We then take the first column response[:,0] and reshape this into a 32x32 image. This is our first letter! We display all 8 letters below\". still difficult? find solution <a href=\"https://www.kaggle.com/code/mrmldjr/inversion-solution-ai-village-ctf-defcon31\" target=\"_blank\">here</a></li>\n<li>Flag 1-6 : prompt injection. ask model for flag.</li>\n<li>guess who's back - just give a punchline from after the phrase guess who's back.</li>\n<li>Pickle - change pickled RCE obj to safe pickle</li>\n<li>Whats my IP? - change IP of <a href=\"mailto:joe@simpson.com\">joe@simpson.com</a></li>\n<li>what's my IP? 2 - find the whole set this time.</li>\n</ul>\n<p>This concludes all the found solutions. <br>\nSpecial reference:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/asalhi/ctf-23-flags-solution\" target=\"_blank\">Solutions Notebook 1</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/ai-village-capture-the-flag-defcon31/discussion/454720\" target=\"_blank\">Solution Place 3</a></li>\n</ul>\n<p>Best of luck hacking!!</p>",
  "comments": [
    {
      "id": 2526885,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-11-16T05:39:35.143000",
      "content": "<p>Thanks for sharing</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "comment_count": 1,
  "messages": [
    {
      "id": 2526866,
      "postDate": "2023-11-16T05:13:30.927Z",
      "content": "<p>I will be honest, I had no idea how to progress in this competition. I was into Machine Learning but had never even heard of cybersecurity or CTF on ML models. In short, I was new and learned a lot.</p>\n<p>I could not complete any of the challenges except the test one whose solution even the host provided. In this discussion, I will be providing links on getting started or casually exploring cybersecurity in ML to beginners like me who didn't understand anything. I will also be listing a very short analysis on how top solutions solved the challenges. please take them as a hint if you get stuck somewhere and not just implement them without understanding the concept.</p>\n<p>Must Watch Links:</p>\n<ul>\n<li><a href=\"https://www.youtube.com/watch?v=a92SWvqgMCE\" target=\"_blank\">AI poisoning</a></li>\n<li><a href=\"https://www.bucks.edu/media/bcccmedialibrary/con-ed/itacademy/fos2022/Casey-AI-Poisoning-pdf.pdf\" target=\"_blank\">PPT on AI poisoning</a></li>\n<li><a href=\"https://medium.com/swlh/how-to-fool-artificial-intelligence-fcf230bf37e\" target=\"_blank\">Fooling AI article</a></li>\n</ul>\n<p>HINTS SECTION (Try all challenges only then read)</p>\n<ul>\n<li>Test - answer given in demo notebook</li>\n<li>Clusters 1 - Try to find high scoring numerical value in dataset, use that as a key to get the flag.</li>\n<li>Clusters 2 - count of clusters is asked. one easy solution is to just randomly check all values 1 … solution.  Credits: solution for place 3.</li>\n<li>Cluster 3 - use the tnse_model model with config tsne_model = TSNE(perplexity=17, n_components=2, init='pca', n_iter=2500, random_state=23) and plot the output as a scatterplot with annotations.</li>\n<li>MNIST - Count of pixel values is just throwing away the solution at you.</li>\n<li>Count CIFAR - Unsolved</li>\n<li>Granny 1 - Difficult Challenges ( would suggest solving at last ) hint would be using model that gives similar output to the given model, ultra hint modified MobileNetV2. then use Basic Iterative Method FGSM.</li>\n<li>Granny 2 - similar to Granny 1 - Basic Iterative Method FGSM again. refer to 3rd place solution <a href=\"https://www.kaggle.com/code/mrmldjr/granny-1-and-2-solutions-ai-village-ctf/\" target=\"_blank\">here</a></li>\n<li>Granny 3 - Unsolved</li>\n<li>Passphrase - similar to granny find a model that gives similar output as example. solution <a href=\"https://www.kaggle.com/code/mrmldjr/passphrase-solution-ai-village-ctf-defcon31\" target=\"_blank\">here</a></li>\n<li>Pixelated - try sending server different HTML like queries as input you will get the answer in a few tries.</li>\n<li>Spanglish - send flag as input ;D</li>\n<li>Hush - answer is a quote. try giving multiple words/letters as input to pyttsx3.</li>\n<li>Pirate Flag - Multiple solutions, try asking the model directly for solution as if asking another human.</li>\n<li>semantle - try n number of english words, if you get a good score, try synonyms. Ans = rocks in sky.</li>\n<li>semantle 2 - try same solution with 5 word sets.</li>\n<li>inversion - a bit difficult but could be solved using guide <a href=\"https://www.kaggle.com/code/cdeotte/solutions-d3fc0n-ctf-lb-0-894#Inference-(id:-inference)----400-Points\" target=\"_blank\">here</a>, if could not solve hint \"We then take the first column response[:,0] and reshape this into a 32x32 image. This is our first letter! We display all 8 letters below\". still difficult? find solution <a href=\"https://www.kaggle.com/code/mrmldjr/inversion-solution-ai-village-ctf-defcon31\" target=\"_blank\">here</a></li>\n<li>Flag 1-6 : prompt injection. ask model for flag.</li>\n<li>guess who's back - just give a punchline from after the phrase guess who's back.</li>\n<li>Pickle - change pickled RCE obj to safe pickle</li>\n<li>Whats my IP? - change IP of <a href=\"mailto:joe@simpson.com\">joe@simpson.com</a></li>\n<li>what's my IP? 2 - find the whole set this time.</li>\n</ul>\n<p>This concludes all the found solutions. <br>\nSpecial reference:</p>\n<ul>\n<li><a href=\"https://www.kaggle.com/code/asalhi/ctf-23-flags-solution\" target=\"_blank\">Solutions Notebook 1</a></li>\n<li><a href=\"https://www.kaggle.com/competitions/ai-village-capture-the-flag-defcon31/discussion/454720\" target=\"_blank\">Solution Place 3</a></li>\n</ul>\n<p>Best of luck hacking!!</p>",
      "rawMarkdown": "I will be honest, I had no idea how to progress in this competition. I was into Machine Learning but had never even heard of cybersecurity or CTF on ML models. In short, I was new and learned a lot.\n\nI could not complete any of the challenges except the test one whose solution even the host provided. In this discussion, I will be providing links on getting started or casually exploring cybersecurity in ML to beginners like me who didn't understand anything. I will also be listing a very short analysis on how top solutions solved the challenges. please take them as a hint if you get stuck somewhere and not just implement them without understanding the concept.\n\nMust Watch Links:\n- [AI poisoning](https://www.youtube.com/watch?v=a92SWvqgMCE)\n- [PPT on AI poisoning](https://www.bucks.edu/media/bcccmedialibrary/con-ed/itacademy/fos2022/Casey-AI-Poisoning-pdf.pdf)\n- [Fooling AI article](https://medium.com/swlh/how-to-fool-artificial-intelligence-fcf230bf37e)\n\nHINTS SECTION (Try all challenges only then read)\n- Test - answer given in demo notebook\n- Clusters 1 - Try to find high scoring numerical value in dataset, use that as a key to get the flag.\n- Clusters 2 - count of clusters is asked. one easy solution is to just randomly check all values 1 ... solution.  Credits: solution for place 3.\n- Cluster 3 - use the tnse_model model with config tsne_model = TSNE(perplexity=17, n_components=2, init='pca', n_iter=2500, random_state=23) and plot the output as a scatterplot with annotations.\n- MNIST - Count of pixel values is just throwing away the solution at you.\n- Count CIFAR - Unsolved\n- Granny 1 - Difficult Challenges ( would suggest solving at last ) hint would be using model that gives similar output to the given model, ultra hint modified MobileNetV2. then use Basic Iterative Method FGSM.\n- Granny 2 - similar to Granny 1 - Basic Iterative Method FGSM again. refer to 3rd place solution [here](https://www.kaggle.com/code/mrmldjr/granny-1-and-2-solutions-ai-village-ctf/)\n- Granny 3 - Unsolved\n- Passphrase - similar to granny find a model that gives similar output as example. solution [here](https://www.kaggle.com/code/mrmldjr/passphrase-solution-ai-village-ctf-defcon31)\n- Pixelated - try sending server different HTML like queries as input you will get the answer in a few tries.\n- Spanglish - send flag as input ;D\n- Hush - answer is a quote. try giving multiple words/letters as input to pyttsx3.\n- Pirate Flag - Multiple solutions, try asking the model directly for solution as if asking another human.\n- semantle - try n number of english words, if you get a good score, try synonyms. Ans = rocks in sky.\n- semantle 2 - try same solution with 5 word sets.\n- inversion - a bit difficult but could be solved using guide [here](https://www.kaggle.com/code/cdeotte/solutions-d3fc0n-ctf-lb-0-894#Inference-(id:-inference)----400-Points), if could not solve hint \"We then take the first column response[:,0] and reshape this into a 32x32 image. This is our first letter! We display all 8 letters below\". still difficult? find solution [here](https://www.kaggle.com/code/mrmldjr/inversion-solution-ai-village-ctf-defcon31)\n- Flag 1-6 : prompt injection. ask model for flag.\n- guess who's back - just give a punchline from after the phrase guess who's back.\n- Pickle - change pickled RCE obj to safe pickle\n- Whats my IP? - change IP of joe@simpson.com\n- what's my IP? 2 - find the whole set this time.\n\nThis concludes all the found solutions. \nSpecial reference:\n- [Solutions Notebook 1](https://www.kaggle.com/code/asalhi/ctf-23-flags-solution)\n- [Solution Place 3](https://www.kaggle.com/competitions/ai-village-capture-the-flag-defcon31/discussion/454720)\n\nBest of luck hacking!!",
      "votes": 5
    },
    {
      "id": 2526885,
      "postDate": "2023-11-16T05:39:35.143Z",
      "content": "<p>Thanks for sharing</p>",
      "rawMarkdown": "Thanks for sharing\n",
      "votes": 1
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T16:01:26Z",
  "competition_id": 57818,
  "competition_slug": "ai-village-capture-the-flag-defcon31",
  "team_id": 11189165,
  "solution_url": "/competitions/ai-village-capture-the-flag-defcon31/writeups/shreyas-sukhadeve-iit-1188th-place-solution-for-th"
}