Live data from Hacker News

TIL you can de-obfuscate code with ChatGPT

twitter.com

41–50 of 111 posts

Re: TIL you can de-obfuscate code with ChatGPT

#41

Earlier quoted context omitted.

Don't think so. There's clearly the beginning of a while loop near the top of the obfuscated version. There's no loops at all in the 'de-obfuscated' version.

Here's GPT's own explanation what the purpose of that while loop is: --- This code uses JavaScript's `eval` function to obfuscate the code by looping over an array of strings and passing them as arguments to `eval` to create a variable. It also uses an anonymous function to obfuscate the code. The code is deobfuscated by replacing the `eval` function and the anonymous function with their respective strings.

That explanation is also not correct! The while loop is an obfuscation gadget (of sorts), but it doesn't use eval, it uses push and shift to rotate the array. The only use of eval is 'eval("find")', which is not top grade obfuscation.

Re: TIL you can de-obfuscate code with ChatGPT

#42

https://twitter.com/AlexAlexandrius/status/16178852870484254... So, all I've learned is that ChatGPT knows the obfuscated and de-obfuscated versions of code that it itself has generated.

Which is not runnable in the first place. Interesting though, as this shows exactly the problem. It looks legit, but it's some generated fake text.

Re: TIL you can de-obfuscate code with ChatGPT

#43
post #10

i would rather ask it to give me the python source of a program capable to deobfuscate THAT string. anything else is just naive, wishfull thinking and a waste of time. you will have to deobfuscate the code manually anyways but at least you got on HN EDIT: OMG... the obfuscated code was generated by chatgpt AND DOESNT EVEN WORK

Are you just now realizing these LLM’s can’t factually determine if what they output is correct?

No, i'm just now realizing that HN users can’t factually determine if what these LLM's output is correct.

Re: TIL you can de-obfuscate code with ChatGPT

#44
post #37

Earlier quoted context omitted.

I've been using it paired with Ghidra to give me a better idea of what's going on. It helped me create a no-CD crack for an old game.

Silly idea tho would it be helpful in creating the server side code for an online only game? I've seen a project for battlefield 3 tho already have the feeling it's a team effort at minimum?

It's not some magic bullet. It helps a ton with trying to give names to obfuscated function and variable names, but you have to be intelligent enough to know what the code's actually doing. It probably helps RE teams a lot, but until it can easily run across an entire codebase it's just another tool in the toolbox.

Re: TIL you can de-obfuscate code with ChatGPT

#45

I have to say, I find all the comments dismissing ChatGPT hilarious. I read them in a funny grandpa voice. However, we should look past the insignificant details. The main achievement is that we now have a really capable unstructured text-to-computer interface. We can hook it up to anything and it will give us answers with whatever properties we desire, in whatever shape we can think of.

What escapes a lot of people is that ChatGPT was a battle won in the UI/UX real first and foremost. GPT3 was old news, but throw a new paradigm and interface on it and here we are.

Re: TIL you can de-obfuscate code with ChatGPT

#46

I have to say, I find all the comments dismissing ChatGPT hilarious. I read them in a funny grandpa voice. However, we should look past the insignificant details. The main achievement is that we now have a really capable unstructured text-to-computer interface. We can hook it up to anything and it will give us answers with whatever properties we desire, in whatever shape we can think of.

I know, all those frusty old grumpyboots who actually want the thing to return factually accurate answers and valid code. Just be happy with plausible sounding answers people. Sheesh!

I've had a few instances where it returned bad code or was unable to solve a challenge, however most were fixed by better prompts, or by clarifying prompts. In a way I think there is a two-way "learning" process going on here. I'm training it how to give me what I ask for, and it trains me how to ask for what I want it to give me.

Re: TIL you can de-obfuscate code with ChatGPT

#47

Is it correct though? I’ve been toying around with ChatGPT for a few weeks now and I encountered a few situations in which ChatGPT was like 90% accurate at best. Things like suggesting snippets of configuration files or plugin research. It’s good to get an idea and get started somewhere, but I certainly cannot trust it blindly.

This is the original code https://twitter.com/AlexAlexandrius/status/16178998824000839...

It's very similar to the deobfuscated version, but ChatGPT wrote the code in the first place

Re: TIL you can de-obfuscate code with ChatGPT

#48

Is it correct though? I’ve been toying around with ChatGPT for a few weeks now and I encountered a few situations in which ChatGPT was like 90% accurate at best. Things like suggesting snippets of configuration files or plugin research. It’s good to get an idea and get started somewhere, but I certainly cannot trust it blindly.

Don't think so. There's clearly the beginning of a while loop near the top of the obfuscated version. There's no loops at all in the 'de-obfuscated' version.

The while loop does not come from the original code. Probably part of the obfuscation https://twitter.com/AlexAlexandrius/status/16178998824000839...

Re: TIL you can de-obfuscate code with ChatGPT

#49
post #18

Misleading, ChatGPT generated both obfuscated and de-obfuscated code

So what?

the "obfuscated" "version" doesnt even work.

alex literally asked chatgpt to come up with a math problem and its solution, both from whole cloth. and you ask so what.

well, everyone should ask "so what?" to alex.

Re: TIL you can de-obfuscate code with ChatGPT

#50

I have to say, I find all the comments dismissing ChatGPT hilarious. I read them in a funny grandpa voice. However, we should look past the insignificant details. The main achievement is that we now have a really capable unstructured text-to-computer interface. We can hook it up to anything and it will give us answers with whatever properties we desire, in whatever shape we can think of.

You've conflated the critical detail. No garbage-out is the critically significant problem with AI. Right now, ChatGPT is the ability to generate structured results from whatever format we can think of to whatever format we can think of. They may or may not be correct.
Post reply on HN