Author Topic: Packer/obfuscator recommendation?  (Read 3349 times)

0 Members and 1 Guest are viewing this topic.

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Packer/obfuscator recommendation?
« on: September 19, 2016, 12:02:06 PM »
I saw the post with a big list, and wanted to use .net reactor.
I tried the trial and it would not protect my dll because it could not find the acad managed dll's in my assembly folder.
Those are false for "Copy Local" so not in the folder of course.
Anyone got .net reactor to work for acad?

Also, I do a lot of serialization, and some code uses reflection.
I read that causes problems, and I want my xml to be human readable so it can be checked and hacked if needed.
Has anyone spent some time on this and compared and come up with their favorite?

I know all can be deobfuscated, btw.
James Maeding

Keith Brown

  • Swamp Rat
  • Posts: 601
Re: Packer/obfuscator recommendation?
« Reply #1 on: September 19, 2016, 12:33:12 PM »
.NET Reactor works just fine for ACAD.  As I mentioned in the post on the official forums all you need to do if you want to keep your Copy Local equal to false is copy the AutoCAD dlls to the folder where you have the dll to be obsfucated.  It is as easy as that.  .NET Reactor just needs to find the referenced dlls, it does not interact with them.  Your other option is to set your Copy Local equal to true and then set your working directory to the AutoCAD Directory as shown below.  When you netload your dll it will use the installed AutoCAD dlls instead.


I have been using this setup for 1.5 years and the company I have been working for has been using it for many more beyond that without any issues.




I serialize to xml all of the time and have no issues.  My main custom settings files use xml and it is human readable and editable without any problems.  In addition, I serialize many classes and then add them as xdata to entities in the extension dictionary.  For me it is easier to do then to create XData.   I have a flag that I use to also save the xml to disk so that I can make sure that everything saves correctly.
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Packer/obfuscator recommendation?
« Reply #2 on: September 19, 2016, 05:46:43 PM »
Indeed, I totally missed your reply which is rare for me as I always watch email for replies.
Marked it as the solution, fed it to me like a baby :)
thanks a bunch!

James Maeding

jmaeding

  • Bull Frog
  • Posts: 304
  • I'm just here for the Shelties.
Re: Packer/obfuscator recommendation?
« Reply #3 on: September 19, 2016, 05:54:52 PM »
btw, one thing I do is add a script to the startup params, like:
/nologo /p "HA_C3D2015" /product C3D /b "C:\Programming\DotNet\myprog\Load Myprog.scr"

and the Load Myprog.scr is like:
netload
"C:\\Programming\\DotNet\\myprog\\bin\\Debug\\R20\\myassembly.dll"

So I don't have to do  a manual netload.
Curious why you don't do the same, I think that trick is fairly well known.
James Maeding

Keith Brown

  • Swamp Rat
  • Posts: 601
Re: Packer/obfuscator recommendation?
« Reply #4 on: September 19, 2016, 08:52:20 PM »
My Dlls auto register themselves after the first run so it's not needed.  I work with several different versions of the same dll so when I need to change the version I just need to run net load again.
Keith Brown | AutoCAD MEP Blog | RSS Feed
AutoCAD MEP 2014 / Revit MEP 2014 / EastCoast CAD/CAM addon / Visual Studio 2013

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: Packer/obfuscator recommendation?
« Reply #5 on: September 19, 2016, 11:08:12 PM »
I have my dll's build into a .bundle folder so they always autoload.

nobody

  • Swamp Rat
  • Posts: 861
  • .net stuff
Re: Packer/obfuscator recommendation?
« Reply #6 on: September 25, 2016, 01:37:48 AM »
I'm not clear on everything the question encompasses but I've been using Eazfuscator for a while and have not experienced any problems.

CADbloke

  • Bull Frog
  • Posts: 342
  • Crash Test Dummy
« Last Edit: October 04, 2016, 09:45:55 PM by CADbloke »

CADbloke

  • Bull Frog
  • Posts: 342
  • Crash Test Dummy
Re: Packer/obfuscator recommendation?
« Reply #8 on: October 07, 2016, 08:24:33 AM »
I just tried https://github.com/yck1509/ConfuserEx on a simple .NET AutoCAD plugin and it seems to work well. I opened it in DotPeek and the code looked even more unfathomable than when I wrote it. I didn't try any ILDASM or Anti-tampering stuff yet. It's worth a look at, although that repo was recently abandoned - https://yck1509.github.io/ConfuserEx/2016/07/01/confuserex-discontinue . Upside, it has been forked 357 times and this repo looks active. Also, it works (so far) and it's free.

It was easy enough to use but it did want to see local copies of the usual .NET AutoCAD DLL triad. It didn't obfuscate them but it wanted to see them.

... see attached pic - de4dot can't do much with it. That's encouraging.
« Last Edit: October 08, 2016, 01:20:55 AM by CADbloke »