Cython Reverse Engineering?

934 views
Skip to first unread message

Shalom Rav

unread,
Mar 31, 2011, 6:36:03 PM3/31/11
to cython-users
Is it easy / much easier to reverse engineer compiled cython code,
than say to c++ code?

Is there anything that can be done to make cython code more
'resistable' to reverse engineering?

Stefan Behnel

unread,
Mar 31, 2011, 8:18:05 PM3/31/11
to cython...@googlegroups.com
Shalom Rav, 01.04.2011 00:36:

> Is it easy / much easier to reverse engineer compiled cython code,
> than say to c++ code?

Never tried it, but I would expect that both are about equally tricky for a
human. Potentially, reverse engineering Cython code could be easier to
reverse engineer automatically than manually written code as it obviously
follows generation patterns.

But I think it needs to be tried to get a justified answer.


> Is there anything that can be done to make cython code more
> 'resistable' to reverse engineering?

If you are thinking of code obfuscation, this has never been a goal of the
Cython project (and it never will be).

Stefan

Shalom Rav

unread,
Mar 31, 2011, 8:31:10 PM3/31/11
to cython-users
Stefan,

>
> If you are thinking of code obfuscation, this has never been a goal of the
> Cython project (and it never will be).
>

This makes perfect sense. The question is, is there anything that can
be done to make the code 'more complicated' for reverse engineering?
Shall comments be removed? other tactics?

Lisandro Dalcin

unread,
Mar 31, 2011, 9:16:57 PM3/31/11
to cython-users
On 31 March 2011 21:31, Shalom Rav <csharppl...@gmail.com> wrote:
> Stefan,
>
>>
>> If you are thinking of code obfuscation, this has never been a goal of the
>> Cython project (and it never will be).
>>
>
> This makes perfect sense. The question is, is there anything that can
> be done to make the code 'more complicated' for reverse engineering?
> Shall comments be removed? other tactics?
>

Optimizing compilers will add extra fuzziness, not need at all to
remove code, etc... Take into account that Cython code calls the
Python C/API, this API do have public symbols with very readable
names. If you manage to run a code obfuscator in core Python sources
and build a custom binary (no idea how this could work, the generator
should also output a header plenty of #defines for you to #include),
then I think the whole stack will be harder to reverse-eng...


> On Mar 31, 8:18 pm, Stefan Behnel <stefan...@behnel.de> wrote:
>> Shalom Rav, 01.04.2011 00:36:
>>
>> > Is it easy / much easier to reverse engineer compiled cython code,
>> > than say to c++ code?
>>
>> Never tried it, but I would expect that both are about equally tricky for a
>> human. Potentially, reverse engineering Cython code could be easier to
>> reverse engineer automatically than manually written code as it obviously
>> follows generation patterns.
>>
>> But I think it needs to be tried to get a justified answer.
>>
>> > Is there anything that can be done to make cython code more
>> > 'resistable' to reverse engineering?
>>
>> If you are thinking of code obfuscation, this has never been a goal of the
>> Cython project (and it never will be).
>>
>> Stefan

--
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169

Reply all
Reply to author
Forward
0 new messages