7 ms·
Capturing the Flag with GPT-4
- yao420 4y agoI used it on the htb cyber apocalypse ctf a few weeks ago. It did phenomenal and I was able to get a ton of flags on the crypto and ML challenges I otherwise would not have even tried.
- edfletcher_t137 4y ago> And this time, I did it with the help of GTP-4 Should've had *GPT*-4 proofread this.
- isaacfrond 4y agoHehe, I make the typo all the time! I need to consciously remind myself: Generative Pre-trained Transformer.
- pmoriarty 4y agoJust remember the letters are in alphabetical order.
- dataangel 4y ago> Especially because this challenge actually includes a very tricky part related to base-27 It looks like a bog standard function for converting to a base X number. All GPT-4 had to do was paste 27 in.
- EGreg 4y ago[flagged]
- cjbprime 4y agoNeat! My mind-blown moment with GPT-4 was realizing that it will often be able to tell you the output of the (unique, not available in training data) scripts it writes for you.
- aix1 4y agoRelevant: https://www.engraved.blog/building-a-virtual-machine-inside/ https://www.engraved.blog/building-a-virtual-machine-inside/
- politelemon 4y agoThat is very interesting, which I'd like to try once GPT4 is widely available. I did try GPT3 with a CTF a few weeks ago, and it gave seemingly plausible code but outright incorrect answers.
- yreg 4y agoI did some advent of code exercises with GPT-3 and it often ended the script with something like // returns 1337 return result; Sometimes the comment stated the correct answer to the puzzle, but the script returned something else since it had a bug.
- moffkalast 4y agoGPT-3 isn't the 1337 h4x0r it thinks it is.
- erfgh 4y agoHum... maybe it runs the scripts and sees the output?
- SargeZT 4y agoIt does not. Regular ChatGPT without plugins does not have access to any tools. Throw it a script with some weird outputs and it'll definitely fail, every time. While the script 'evaluation' stuff can be pretty decently impressive, it is not actually executing anything.
- wokwokwok 4y agoIt is impressive, but no, it won’t. It’ll tell you what a typical output for the command might be, and the more complex the script, the more wrong and full of hallucinations it will be. There’s a huge difference. Specifically, you have no way of knowing the difference between accurate outputs and inaccurate outputs, without running the command yourself, making it largely worthless. Without access to environment, it’s not possible to magically know what the output of a command will be, it doesn’t have an embedded understanding of code, specifically not iterations and mapped data or mathematical functions. For trivial obvious outputs it’s good, but it’s not executing the code; it’s generating what seems like plausible output; and if the output is trivially derived from the input, it’ll be impressively accurate. …but, as the complexity of the task increases or the task deviates from “standard problem space” the triviality of generating accurate output decreases and it stops generating impressive outputs. Tldr; yes, but it doesn’t scale well beyond trivial outputs.
- charcircuit 4y agoI was hoping for someone to have poisoned GPT4's training data with a flag you had to get it to say. It would be a pretty big flex.
- cjbprime 4y agoEspecially since they would have had to do it in 2021! The MIT Mystery Hunt has occasionally managed to get the NYT crossword on the day of the hunt to contain a clue answer or two.
- divbzero 4y agoThe spinning globe in the background appears to have an East Pole and a West Pole.
- zitterbewegung 4y agoI tried using gpt4 on the qualifier rounds for hackasat and I think you need to know the basics of what is a good answer (or maybe satellite red teaming is too obscure) but I never got a flag out of it .
- rfoo 4y agoHehe, you can solve the two "Street" challenges with GPT-4, they are bog standard entry-level competitive programming challenge disguised as a reverse engineering challenge.
- amrb 4y agoI appreciate they say they need to learn more about 'exec' when asking GPT4, it also plays well into some of the reading strategies I've seen to get a high-level understanding then read the documentation with more general idea going in, could also lower frustration for new engineers so they push through to the end!
- gjadi 4y agoI get that it's a way to find out what GPT4 is capable of, but IMHO that defeats the point of a game like CTF. It's like playing with an aimbot. You may be beating the other players, but where's the fun?
- blowski 4y agoI often use cheats and walkthroughs, to the chagrin of my gamer friends. I have fun though, so who cares?
- catgpt23 4y ago[flagged]
- awestroke 4y agoYeah, this one was not hard to spot. Very obvious ChatGPT style. Try playing with a prompt preamble to set the writing style and tone.
- evertedsphere 4y agobesides, the account's called catgpt3, might as well pick a ... feline type of prompt
- ryan-c 4y agoI've run CTF games at major conferences. The point is to solve the challenges by any means necessary within the rules... and that which is not forbidden is allowed. If I, as a person running a CTF, did not want my players to do this, I would set up a few problems which would have incorrect (but not obviously so) "solutions" generated when fed to LLM. The Shamir's Secret Sharing reminds me of the time I was playing DEF CON CTF Quals, and had the bright idea to try to scan for challenges. I found one - it involved hiding fragments of a split secret in a modified version of ADVENT. I solved it. Even when the board was fully opened, it was nowhere to be seen. You does your hacks and you takes your chances...
- 4y ago
- fsniper 4y agoI thought "/shurdles" problem was to be solved via "chroot".
- pizzalife 4y agoYou need to be root or have CAP_SYS_CHROOT to use the chroot system call. You can however create a new user and mount namespace on distros that allow unprivileged namespaces (Ubuntu) and then chroot away. The challenge could have been solved that way depending on the kernel used and if the binary was a suid reading a flag file. But the way the challenge was designed, it's more about just changing argv[0] rather than the actual executable path.
- Matir 4y agoYep, challenge author here, and it was definitely to teach that `argv[0]` is not trustworthy. I've seen privileged processes try to re-invoke themselves (as, say, a child process) by looking at `argv[0]` rather than something like `/proc/self/exe` (which is also subject to race conditions if the directory is writable). The binary was not setuid, but was only executable (not readable) by the user used.
- pizzalife 4y ago>The binary was not setuid, but was only executable (not readable) by the user used. Ah, then ptrace/gdb could have been used to dump it out as well :). Looks like a fun CTF, too bad I was too busy for bsides this year..
- fsniper 4y agoYes. Thank you. I just missed that part. It's been a long while since doing basic linux administration. I am getting rusty.
- dsign 4y agoChat-GPT is quite capable of doing some "reasoning", but assume for a second it's not, and all it does is to search for human-written solutions and adapt them a little to your question. That alone is incredibly helpful.
- localplume 4y ago[dead]