How to decrypt a pcode?

281 visualizaciones (últimos 30 días)
math98
math98 el 20 de Jun. de 2011
Comentada: Walter Roberson el 18 de Ag. de 2023
Hi,
Is there an experienced MATLAB user to provide me with some info on how to decrypt a given pcode?
P.S: It seems that I have to use a pcode version of my original code. Actually, I heard from an old MATLAB user that there are some ways to decrypt a pcode. (to obtain the original code) Of course, by advanced user (hackers :-O ) not newbies!!
Thanks
  4 comentarios
Rik
Rik el 8 de Oct. de 2021
@David regarding your flag ("This post discusses decryption which goes against the community terms of use"):
Where exactly does it prohibit this? 2.a.v.b prohibits posting anything that violates any law and 2.a.vi specifically mentions export control laws. The prohibition on discussions about cryptography is generally understood to only apply to actual code/algorithms, not to pure informational content.
The way I read this thread, the original question was if there are ways to decrypt p-code. The answer is 'yes, but not in a legal way'. No actual discussions of how p-code encryption works has taken place. In fact, Mathworks provides more details in the documentation than can be found on this page.
It is your own website and you can enforce any rule you like, but I don't see how this violates the terms of use.
Fangjun Jiang
Fangjun Jiang el 8 de Oct. de 2021
I second to that. Users are going to ask this question anyway. This Q&A provides good and useful info.

Iniciar sesión para comentar.

Respuesta aceptada

Jan
Jan el 20 de Jun. de 2011
Editada: Jan el 26 de Dic. de 2017
No, there is no decoding method for P-coded functions.
You can use the debugger to step through the code line by line, inspect changes to variables and get a list of called functions. But you cannot get the source code as clear text. And most likely: You are explicitly not wanted to! A decompilation or reverse-engineering of a program usually conflicts with the license conditions and is illegal.
[EDITED] This thread seems to show, that P-coding is less cryptic than I thought: http://www.mathworks.com/matlabcentral/answers/75012-pcode-obfuscation-cracked-alternatives
[EDITED 2] Modern Matlab versions prevent the debugging of P-files.
  5 comentarios
Jan
Jan el 20 de Jun. de 2011
Editada: Jan el 2 de Ag. de 2013
@math98: Matlab has some undocumented features. I'd go into details, if I see a legal demand. Some general remarks about the security of P-files: http://www.mathworks.com/matlabcentral/newsreader/view_thread/284802 , http://www.mathworks.com/matlabcentral/newsreader/view_thread/271697
wonderkismet
wonderkismet el 10 de Dic. de 2020
Editada: Rik el 10 de Dic. de 2020
Click to Send Request for pcode Recovery [link removed]

Iniciar sesión para comentar.

Más respuestas (4)

ou dk
ou dk el 2 de En. de 2020
in fact ,i can decrypt all type code,include standalone program,p code,other language compiled matlab program.
  24 comentarios
Rik
Rik el 18 de Ag. de 2023
Given Bruno's posting history, I doubt trolling is likely. While it is improbable for someone to crack the p-code encryption, it is not impossible. Escpecially the caveat that only specific version(s) are cracked lends some credibility to the claim.
Walter Roberson
Walter Roberson el 18 de Ag. de 2023
I know of at least five people who have made credible claims that they know how decode older .p files.
I do not know whether anyone has decoded the newer .p files as of a small number of releases ago.

Iniciar sesión para comentar.


Meme Young
Meme Young el 11 de Ag. de 2020
Oh man you have really asked a good question, like claiming yourself to be a bank robber in front of a police department
  5 comentarios
Rik
Rik el 13 de Ag. de 2020
Comment posted as flag by Meme Young:
Ok Robin can you recover some p codes?
ou dk
ou dk el 22 de Ag. de 2020
A small number of files are available, but you can't use them for profit.

Iniciar sesión para comentar.


Fangjun Jiang
Fangjun Jiang el 20 de Jun. de 2011
I thought the Mathworks could do it. But they won't do it. After all, it is put in place to protect many of its source code (part of the reason, I believe). It can be used to protect the user's customer-developed source code too, which is what I like. Hacking is possible, technically. If you find a way, please let me know.
  9 comentarios
Yair Altman
Yair Altman el 21 de Jul. de 2011
@Jan - I have just seen this thread and I must say that I take offense at being labeled a cracker or hacker. For the record, and you can quote me on this, none of what I do or publish is illegal, to the best of my knowledge and intentions. I am very careful about this. My livelihood depends on Matlab to a large extent and I will not cut the branch I'm sitting on.
Jan
Jan el 21 de Jul. de 2011
@Yair: Sorry. I did not meant the term "hacking" in any offending way and I'm definitely convinced from all I've seen and heared in the last years, that your work is legal and helpful for Matlab users and in consequence for TMW. I'm used to distinguish the illegal "cracking" from the legal "hacking", which means digging in the codes for the not barely obvious features. If any of your investigations and publications of the golden beans you've found is not legal -what is not the case!-, I'd strongly recommend that you get payed by TMW to catch up a legalization retrospectively.
Anyhow, Yair, I've deleted the concerning comment, because I know that the term "hacking" might be misunderstood.

Iniciar sesión para comentar.


jgd0008
jgd0008 el 9 de Feb. de 2018
I know it´s an old subject. This guy had an utility running on the web. I used a couple of times, had some minor flaws. However, it´s been asked to be taken down.
web-service.sippey.org/de_pcode
So, it´s possible
  2 comentarios
MOUSSAOUI FAOUZI
MOUSSAOUI FAOUZI el 31 de Dic. de 2021
Hello, all my Matlab files have been encrypted by ransomware online. Is there a way to recover and decrypt Matlab files? Thank you. moussaoui39fa@gmail.com
Walter Roberson
Walter Roberson el 31 de Dic. de 2021
Files that have been encrypted by ransomware are probably not recoverable by any method known to Mathworks.

Iniciar sesión para comentar.

Categorías

Más información sobre Programming en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by