Use chatGPT for Reverse Engineering (chatGPT as Decompiler)

preview_player
Показать описание
ChatGPT, a large language model trained by OpenAI, can be used for reverse engineering tasks, including decompilation. Decompilation is the process of converting low-level machine code into a higher-level programming language. ChatGPT can assist in this process by analyzing the assembly code and generating equivalent high-level code in a human-readable language such as C or Python. This can save time and effort in understanding complex code, especially in cases where the source code is not available. While the accuracy of decompilation is not always 100%, the generated code can provide a useful starting point for further analysis and modification. Overall, using ChatGPT as a decompiler can be a useful tool for reverse engineering tasks.
Рекомендации по теме
Комментарии
Автор

I'd also been thinking about this. I'd been discussing with colleagues, but never actually given it a try. I have an old 32 bit MacOS app I want to reverse engineer, tweak and re-build for 64 bit MacOS. I've been attempting to decompile, but having GPT potentially make more sense of the 'C' could be really useful.

christurner
Автор

ChatGPT(4) can truly understand program ASTs, even if the AST is not a standard one. It can write the exellent source codes from ASTs. But the problem is It can't write a program which truns the AST back to source codes(didn't run well). So, I still had to write codes to convert ASTs back into source codes.

yedemon
Автор

I've been wondering if anyone had tried this. Not sure if it should be kept quiet in case "open" ai decides to outlaw it. Either way, this is an excellent use case for it.

khatharrmalkavian
Автор

subbing before watching cos you get my respect for simply having this idea in the first place

bouipozz
Автор

I trying to decode python3.12 marshal this way and this is not working

AM_VIB
Автор

GPT-4 would probably be a lot better since it's better at almost everything.

KeinNiemand
Автор

For the last example, it was mainly inferring from the comments in the code. Try a different piece of assembly code and remove the comments this time.

conneljp