.net - Compiling C# to Native? -
i think i'm confused compiling .net byte-code native code, or maybe i'm confused end result. please bear me try sort through think understand can me figure out i'm missing.
what i'd compile application written in c# down regular native code i'd if had written in c. reasoning has nothing performance, rather degree of protection. understand end-goal not impossible (or difficult) circumvent, feel reversing x86 assembly more difficult reversing reflector gives me.
right if throw c# application reflector, source-code back. typically when throw unmanaged c/c++ applications idapro , use hexrays decompiler, don't quite same degree of decompilation , have resort wading through x86 disassembly understand logic flow. it's understanding such great decompilation comes reflector due application being in msil instead of more terse native code hexrays tries decompile.
i have no concerns client machine still needing .net runtimes, i'm not trying circumvent of that. run normal software obfuscation programs upx
on program, , doing .net binary fails.
it understanding this related question ngen
want. i've tried using ngen
. after copying output file c:\windows\assemblies\...\applicationname.ni.exe
directory somewhere can double-click, , trying run produces error not being "a valid win32 application". further, when toss applicationname.ni.exe
reflector, same output did applicationname.exe
. since applicationname.ni.exe
supposed native code, expected reflector error out, didn't. if way i'm supposed this, why did reflector still give me such great decompilation?
so, summarize main question again: how can compile .net program native binary reflector won't decompile? or what's best practices protecting product written in .net language newbie reverse-engineers?
if need different tool, i'd prefer free , not codewall.
thanks!
update: understand i'm looking might limit of features of language reflection, think i'm fine that. none of code explicit assembly.load
calls or of sort. couldn't replaced getprocaddress/loadlibrary
calls anyway?
i validated .net native on vs2015 & windows 8.1 (when configured correctly, examine .proj validate) , building particular architecture (may overkill, haven't validated), produce native file give "harder reverse engineer" code looking me unabled read .dll via dotpeek(free .net decompiler jetbrains).
wiki
Comments
Post a Comment