{
  "id": 454579,
  "title": "11th Place Solution Code & \"Aha\" Moments [23 Flags]",
  "content": "<p>First I want to thank the awesome team that worked on this challenge and put it together! <a href=\"https://www.kaggle.com/moohax\" target=\"_blank\">@moohax</a> <a href=\"https://www.kaggle.com/monoxgas\" target=\"_blank\">@monoxgas</a> <a href=\"https://www.kaggle.com/lucasjt\" target=\"_blank\">@lucasjt</a> and <a href=\"https://www.kaggle.com/wcukierski\" target=\"_blank\">@wcukierski</a></p>\n<p>It was really fun and I learned a lot in the process.</p>\n<p>My solution code can be found in this notebook, which I am still making some minor updates to but it's mostly all there: <a href=\"https://www.kaggle.com/code/robikscube/23-solutions-capture-the-flag-defcon31\" target=\"_blank\">https://www.kaggle.com/code/robikscube/23-solutions-capture-the-flag-defcon31</a> - Feel free to ask any questions if anything doesn't make sense.</p>\n<p>Instead of going into detail about my solutions, since others have already done a great job of covering similar approaches, I wanted to instead list some of my favorite \"Aha\" moments from the competition. Since many problems involved really deep thinking, often leading to failure, it made these moments when things \"clicked\" even more sweet.</p>\n<ul>\n<li><strong>Cluster3</strong>: I knew it had to do with clustering, but when I eventually found out that 3D TSNE clustering made really cool looking spirals I knew I had cracked it.</li>\n<li><strong>Sloth</strong>: I still have trauma from last year's sloth, so I wasn't looking forward to this one. I was really excited when I quickly noticed that the unique count of pixel values \"201\" stood out and finding the flag after that wasn't too hard.</li>\n<li><strong>MNIST</strong>: I had been struggling to figure this one out for almost a week, I had convinced myself that the two columns had to do with the train/test split. One day while taking my dog on a walk it occured to me that the <code>input_data</code> hint could mean the columns were key:value pairs. I rushed home and got it a few minutes later.</li>\n<li><strong>Pickle</strong> After a few days of working on this felt like I had tried every pickle exploit out there- after taking a few days off from it I somehow found a working solution right away. I guess I just needed a break.</li>\n<li><strong>Semantle2</strong> I was expecting this to be a sentence and was getting really confused about how the high scoring words seemed to be random. It look me putting them in the right order… man, woman, camera.. and it clicked! This was one of my favorites, had a good laugh when I figured it out.</li>\n</ul>\n<p>Thanks for reading. Let me know if you had any similar type of moments.</p>\n<p>-Rob</p>",
  "comments": [
    {
      "id": 2520483,
      "author_name": "NIKHIL",
      "author_url": "",
      "post_date": "2023-11-10T21:45:33.997000",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/robikscube\" target=\"_blank\">@robikscube</a>. Great to read your solutions and talking about aha moments I also did have a few. </p>\n<ul>\n<li><strong>Cluster3</strong>: After figuring out the whole solution and extracting the coordinates and token still couldn't get the flag for 2 days. Then one morning I woke up and thought that I maybe interpreting some characters wrongly in the token string. I was reading the capital i in the string as small l. Changing that instantly got me the flag. Taking a break helps.</li>\n<li><strong>MNIST</strong>: I was thinking the 23435 value to be the index of the image for which the pixels are to be counted. Can't seem to figure out that number and was hard stuck. Then one day I just took the whole dataset and counted pixel values and it worked.</li>\n<li><strong>Pixelated</strong>: After realizing that it was an XML injection I tried various different fonts and fontsizes for the query but the OCR was just so bad at recognizing anything I give it. Then I randomly just got an idea of giving it all upper case letter image and it worked pretty well on that. That was the turning point for me in pixelated.</li>\n<li><strong>WITF3</strong>: This one was a fun challenge and I liked it a lot. After playing around with it the LLM doesn't give me the flag and only outputs \"I know you are, but what am I?\". After some thought it clicked to me that I have to give it a role. So I asked it to act as a professional puzzle solver and gave it a puzzle which output the flag.</li>\n<li><strong>Semantle2</strong>: Similar to you I was also hoping for a meaningful sentence but all the high scoring words didn't make any sentence. I got all words pretty quickly but for days I was convinced that man, woman and person are quite synonymous and can't be all together in the 5 words. After losing all hope I realized maybe they are all part of the sentence and got it after rearranging in the correct order. I was really frustrated after knowing the solution which I could have gotten a long ago had I not made the wrong assumption.</li>\n<li><strong>Sloth</strong>: I tried several different ideas but didn't know what to do with the image. After doing some random alterations to the image and taking the negative of it, I saw some unusual characters (just faintly) which was looking like a 'fla'. Then I understood that this was the hidden flag and didn't took me long to extract it.</li>\n</ul>\n<p>Also I had many aha moments on CIFAR where I thought that it was CIFAR-100 and the 3 values in the hint are R,G,B pixel values which needs to be counted and 10000 was the length of the test dataset. I also made sense of the output shape thinking 100 was for the 100 different classes but unfortunately nothing worked. </p>\n<p>I had also compiled a <a href=\"https://www.kaggle.com/code/nikhil1e9/defcon31-ctf-all-llm-solutions\" target=\"_blank\">notebook</a> for the solutions of all the LLM challenges. Plz feel free to go through it if you have some time and share your feedback.</p>\n<p>Thanks for reading</p>",
      "votes": 4,
      "replies": []
    },
    {
      "id": 2522567,
      "author_name": "Rida Mahmood",
      "author_url": "",
      "post_date": "2023-11-12T19:44:42.613000",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/robikscube\" target=\"_blank\">@robikscube</a>.. Although I haven't actively took part in the competition but this post and the 'ahaa' moments are urging me to explore them more. I'll see your solution and see what other interesting things I can find.. and yes, congratulations on achieving 11th place!!</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2521401,
      "author_name": "Ralph Bido",
      "author_url": "",
      "post_date": "2023-11-11T16:49:47.953000",
      "content": "<p>hey rob. will u be making a youtube video for this hackathon?</p>",
      "votes": 2,
      "replies": []
    }
  ],
  "comment_count": 3,
  "messages": [
    {
      "id": 2520434,
      "postDate": "2023-11-10T20:49:44.883Z",
      "content": "<p>First I want to thank the awesome team that worked on this challenge and put it together! <a href=\"https://www.kaggle.com/moohax\" target=\"_blank\">@moohax</a> <a href=\"https://www.kaggle.com/monoxgas\" target=\"_blank\">@monoxgas</a> <a href=\"https://www.kaggle.com/lucasjt\" target=\"_blank\">@lucasjt</a> and <a href=\"https://www.kaggle.com/wcukierski\" target=\"_blank\">@wcukierski</a></p>\n<p>It was really fun and I learned a lot in the process.</p>\n<p>My solution code can be found in this notebook, which I am still making some minor updates to but it's mostly all there: <a href=\"https://www.kaggle.com/code/robikscube/23-solutions-capture-the-flag-defcon31\" target=\"_blank\">https://www.kaggle.com/code/robikscube/23-solutions-capture-the-flag-defcon31</a> - Feel free to ask any questions if anything doesn't make sense.</p>\n<p>Instead of going into detail about my solutions, since others have already done a great job of covering similar approaches, I wanted to instead list some of my favorite \"Aha\" moments from the competition. Since many problems involved really deep thinking, often leading to failure, it made these moments when things \"clicked\" even more sweet.</p>\n<ul>\n<li><strong>Cluster3</strong>: I knew it had to do with clustering, but when I eventually found out that 3D TSNE clustering made really cool looking spirals I knew I had cracked it.</li>\n<li><strong>Sloth</strong>: I still have trauma from last year's sloth, so I wasn't looking forward to this one. I was really excited when I quickly noticed that the unique count of pixel values \"201\" stood out and finding the flag after that wasn't too hard.</li>\n<li><strong>MNIST</strong>: I had been struggling to figure this one out for almost a week, I had convinced myself that the two columns had to do with the train/test split. One day while taking my dog on a walk it occured to me that the <code>input_data</code> hint could mean the columns were key:value pairs. I rushed home and got it a few minutes later.</li>\n<li><strong>Pickle</strong> After a few days of working on this felt like I had tried every pickle exploit out there- after taking a few days off from it I somehow found a working solution right away. I guess I just needed a break.</li>\n<li><strong>Semantle2</strong> I was expecting this to be a sentence and was getting really confused about how the high scoring words seemed to be random. It look me putting them in the right order… man, woman, camera.. and it clicked! This was one of my favorites, had a good laugh when I figured it out.</li>\n</ul>\n<p>Thanks for reading. Let me know if you had any similar type of moments.</p>\n<p>-Rob</p>",
      "rawMarkdown": "First I want to thank the awesome team that worked on this challenge and put it together! @moohax @monoxgas @lucasjt and @wcukierski\n\nIt was really fun and I learned a lot in the process.\n\nMy solution code can be found in this notebook, which I am still making some minor updates to but it's mostly all there: https://www.kaggle.com/code/robikscube/23-solutions-capture-the-flag-defcon31 - Feel free to ask any questions if anything doesn't make sense.\n\nInstead of going into detail about my solutions, since others have already done a great job of covering similar approaches, I wanted to instead list some of my favorite \"Aha\" moments from the competition. Since many problems involved really deep thinking, often leading to failure, it made these moments when things \"clicked\" even more sweet.\n\n- **Cluster3**: I knew it had to do with clustering, but when I eventually found out that 3D TSNE clustering made really cool looking spirals I knew I had cracked it.\n- **Sloth**: I still have trauma from last year's sloth, so I wasn't looking forward to this one. I was really excited when I quickly noticed that the unique count of pixel values \"201\" stood out and finding the flag after that wasn't too hard.\n- **MNIST**: I had been struggling to figure this one out for almost a week, I had convinced myself that the two columns had to do with the train/test split. One day while taking my dog on a walk it occured to me that the `input_data` hint could mean the columns were key:value pairs. I rushed home and got it a few minutes later.\n- **Pickle** After a few days of working on this felt like I had tried every pickle exploit out there- after taking a few days off from it I somehow found a working solution right away. I guess I just needed a break.\n- **Semantle2** I was expecting this to be a sentence and was getting really confused about how the high scoring words seemed to be random. It look me putting them in the right order... man, woman, camera.. and it clicked! This was one of my favorites, had a good laugh when I figured it out.\n\nThanks for reading. Let me know if you had any similar type of moments.\n\n-Rob",
      "votes": 22
    },
    {
      "id": 2520483,
      "postDate": "2023-11-10T21:45:33.997Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/robikscube\" target=\"_blank\">@robikscube</a>. Great to read your solutions and talking about aha moments I also did have a few. </p>\n<ul>\n<li><strong>Cluster3</strong>: After figuring out the whole solution and extracting the coordinates and token still couldn't get the flag for 2 days. Then one morning I woke up and thought that I maybe interpreting some characters wrongly in the token string. I was reading the capital i in the string as small l. Changing that instantly got me the flag. Taking a break helps.</li>\n<li><strong>MNIST</strong>: I was thinking the 23435 value to be the index of the image for which the pixels are to be counted. Can't seem to figure out that number and was hard stuck. Then one day I just took the whole dataset and counted pixel values and it worked.</li>\n<li><strong>Pixelated</strong>: After realizing that it was an XML injection I tried various different fonts and fontsizes for the query but the OCR was just so bad at recognizing anything I give it. Then I randomly just got an idea of giving it all upper case letter image and it worked pretty well on that. That was the turning point for me in pixelated.</li>\n<li><strong>WITF3</strong>: This one was a fun challenge and I liked it a lot. After playing around with it the LLM doesn't give me the flag and only outputs \"I know you are, but what am I?\". After some thought it clicked to me that I have to give it a role. So I asked it to act as a professional puzzle solver and gave it a puzzle which output the flag.</li>\n<li><strong>Semantle2</strong>: Similar to you I was also hoping for a meaningful sentence but all the high scoring words didn't make any sentence. I got all words pretty quickly but for days I was convinced that man, woman and person are quite synonymous and can't be all together in the 5 words. After losing all hope I realized maybe they are all part of the sentence and got it after rearranging in the correct order. I was really frustrated after knowing the solution which I could have gotten a long ago had I not made the wrong assumption.</li>\n<li><strong>Sloth</strong>: I tried several different ideas but didn't know what to do with the image. After doing some random alterations to the image and taking the negative of it, I saw some unusual characters (just faintly) which was looking like a 'fla'. Then I understood that this was the hidden flag and didn't took me long to extract it.</li>\n</ul>\n<p>Also I had many aha moments on CIFAR where I thought that it was CIFAR-100 and the 3 values in the hint are R,G,B pixel values which needs to be counted and 10000 was the length of the test dataset. I also made sense of the output shape thinking 100 was for the 100 different classes but unfortunately nothing worked. </p>\n<p>I had also compiled a <a href=\"https://www.kaggle.com/code/nikhil1e9/defcon31-ctf-all-llm-solutions\" target=\"_blank\">notebook</a> for the solutions of all the LLM challenges. Plz feel free to go through it if you have some time and share your feedback.</p>\n<p>Thanks for reading</p>",
      "rawMarkdown": "Hi @robikscube. Great to read your solutions and talking about aha moments I also did have a few. \n\n- **Cluster3**: After figuring out the whole solution and extracting the coordinates and token still couldn't get the flag for 2 days. Then one morning I woke up and thought that I maybe interpreting some characters wrongly in the token string. I was reading the capital i in the string as small l. Changing that instantly got me the flag. Taking a break helps.\n- **MNIST**: I was thinking the 23435 value to be the index of the image for which the pixels are to be counted. Can't seem to figure out that number and was hard stuck. Then one day I just took the whole dataset and counted pixel values and it worked.\n- **Pixelated**: After realizing that it was an XML injection I tried various different fonts and fontsizes for the query but the OCR was just so bad at recognizing anything I give it. Then I randomly just got an idea of giving it all upper case letter image and it worked pretty well on that. That was the turning point for me in pixelated.\n- **WITF3**: This one was a fun challenge and I liked it a lot. After playing around with it the LLM doesn't give me the flag and only outputs \"I know you are, but what am I?\". After some thought it clicked to me that I have to give it a role. So I asked it to act as a professional puzzle solver and gave it a puzzle which output the flag.\n- **Semantle2**: Similar to you I was also hoping for a meaningful sentence but all the high scoring words didn't make any sentence. I got all words pretty quickly but for days I was convinced that man, woman and person are quite synonymous and can't be all together in the 5 words. After losing all hope I realized maybe they are all part of the sentence and got it after rearranging in the correct order. I was really frustrated after knowing the solution which I could have gotten a long ago had I not made the wrong assumption.\n- **Sloth**: I tried several different ideas but didn't know what to do with the image. After doing some random alterations to the image and taking the negative of it, I saw some unusual characters (just faintly) which was looking like a 'fla'. Then I understood that this was the hidden flag and didn't took me long to extract it.\n\nAlso I had many aha moments on CIFAR where I thought that it was CIFAR-100 and the 3 values in the hint are R,G,B pixel values which needs to be counted and 10000 was the length of the test dataset. I also made sense of the output shape thinking 100 was for the 100 different classes but unfortunately nothing worked. \n\nI had also compiled a [notebook]( https://www.kaggle.com/code/nikhil1e9/defcon31-ctf-all-llm-solutions) for the solutions of all the LLM challenges. Plz feel free to go through it if you have some time and share your feedback.\n\nThanks for reading",
      "votes": 4
    },
    {
      "id": 2522567,
      "postDate": "2023-11-12T19:44:42.613Z",
      "content": "<p>Hey <a href=\"https://www.kaggle.com/robikscube\" target=\"_blank\">@robikscube</a>.. Although I haven't actively took part in the competition but this post and the 'ahaa' moments are urging me to explore them more. I'll see your solution and see what other interesting things I can find.. and yes, congratulations on achieving 11th place!!</p>",
      "rawMarkdown": "Hey @robikscube.. Although I haven't actively took part in the competition but this post and the 'ahaa' moments are urging me to explore them more. I'll see your solution and see what other interesting things I can find.. and yes, congratulations on achieving 11th place!!",
      "votes": 1
    },
    {
      "id": 2521401,
      "postDate": "2023-11-11T16:49:47.953Z",
      "content": "<p>hey rob. will u be making a youtube video for this hackathon?</p>",
      "rawMarkdown": "hey rob. will u be making a youtube video for this hackathon?",
      "votes": 2
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T16:06:27Z",
  "competition_id": 57818,
  "competition_slug": "ai-village-capture-the-flag-defcon31",
  "team_id": 11047593,
  "solution_url": "/competitions/ai-village-capture-the-flag-defcon31/writeups/rob-mulla-11th-place-solution-code-aha-moments-23-"
}