Ⅰ 如何防止C++或C#程序被反編譯
兩者都不能反編譯,c++ 變成機器碼,反匯編就可以。c# 變成 il 位元組碼,ildasm 就能看。
混餚一下,加個殼什麼的比較可行。
然而加殼容易被殺毒軟體殺掉……
混餚下代碼就好了吧。比如 google 的 sdk 都混餚成變數名全部看不懂了。
Ⅱ dll如何防止反編譯
1
將你要破解的DLL文件放在C盤
2
執行 開始》所以程序》Microsoft Windows SDK v6.0A》tools》IL 反匯編程序
3
找到放在C盤的DLL文件
4
然後 文件》轉儲》確定位置並確認
5
好了 看看C盤是否多了 兩個文件 xxx.il xxx.res
6
修改 xxx.il 文件內的代碼
7
修改完成後將xxx.il和 xxx.res 把這兩個文件復制到 C:\Program Files\Microsoft Visual Studio 9.0\VC這個目錄下
8
然後執行:開始》所以程序》Microsoft Visual Studio 2008》Visual Studio Tools》Visual Studio 2008 命令提示
9
執行:ilasm /dll /resource=xxx.res xxx.il xxx代表你取的名字
10
然後去看看C:\Program Files\Microsoft Visual Studio 9.0\VC 這個目錄下是不是多了一個xxx.dll文件 把編譯出來的文件拿去使用就OK了
注意事項
一定要確定文件名稱和位置不能有錯!
Ⅲ android濡備綍浠g爜娣鋒穯錛岄槻姝apk紼嬪簭琚鍙嶇紪璇
涓嬮潰鍏蜂綋璇翠竴璇存庝箞鏍瘋㏒DK2.3涓嬬殑proguard.cfg鏂囦歡璧蜂綔鐢錛屽厛鏉ョ湅鐪媋ndroid-sdk-windows\tools\lib\proguard.cfg鐨勫唴瀹癸細view plain 1. -optimizationpasses 5 2. -dontusemixedcaseclassnames 3. - 4. -dontpreverify 5. -verbose 6. -optimizations !code/simplification/arithmetic,!field/*,!class/merging/* 7. 8. -keep public class * extends android.app.Activity 9. -keep public class * extends android.app.Application 10. -keep public class * extends android.app.Service 11. -keep public class * extends android.content.BroadcastReceiver 12. -keep public class * extends android.content.ContentProvider 13. -keep public class * extends android.app.backup.BackupAgentHelper 14. -keep public class * extends android.preference.Preference 15. -keep public class com.android.vending.licensing.ILicensingService 16. 17. -keepclasseswithmembernames class * { 18. native <methods>; 19. } 20. 21. -keepclasseswithmembernames class * { 22. public <init>(android.content.Context, android.util.AttributeSet); 23. } 24. 25. -keepclasseswithmembernames class * { 26. public <init>(android.content.Context, android.util.AttributeSet, int); 27. } 28. 29. -keepclassmembers enum * { 30. public static **[] values(); 31. public static ** valueOf(java.lang.String); 32. } 33. 34. -keep class * implements android.os.Parcelable { 35. public static final android.os.Parcelable$Creator *; 36. } 浠庤剼鏈涓鍙浠ョ湅鍒幫紝娣鋒穯涓淇濈暀浜嗙戶鎵胯嚜Activity銆丼ervice銆丄pplication銆丅roadcastReceiver銆丆ontentProvider絳夊熀鏈緇勪歡浠ュ強com.android.vending.licensing.ILicensingService錛 騫朵繚鐣欎簡鎵鏈夌殑Native鍙橀噺鍚嶅強綾誨悕錛屾墍鏈夌被涓閮ㄥ垎浠ヨ懼畾浜嗗滻瀹氬弬鏁版牸寮忕殑鏋勯犲嚱鏁幫紝鏋氫婦絳夌瓑銆) 璁﹑roguard.cfg璧蜂綔鐢ㄧ殑鍋氭硶寰堢畝鍗曪紝灝辨槸鍦╡clipse鑷鍔ㄧ敓鎴愮殑default.properties鏂囦歡涓鍔犱笂涓鍙モ減roguard.config=proguard.cfg鈥濆氨鍙浠ヤ簡 瀹屾暣鐨刣efault.properties鏂囦歡搴旇ュ備笅錛歷iew plain 1. # This file is automatically generated by Android Tools. 2. # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3. # 4. # This file must be checked in Version Control Systems. 5. # 6. # To customize properties used by the Ant build system use, 7. # "build.properties", and override values to adapt the script to your 8. # project structure. 9. 10. # Project target. 11. target=android-9 12. proguardproguard.config=proguard.cfg 澶у姛鍛婃垚錛屾e父鐨勭紪璇戠懼悕鍚庡氨鍙浠ラ槻姝浠g爜琚鍙嶇紪璇戜簡銆
Ⅳ 如何抵擋.net自帶的ildasm的反編譯,如何保
C# 編寫的代碼通過VS編譯器生成 dll 或 exe ,很容易被一些反編譯工具查看到源碼或對源碼進行修改。為防止代碼被反編譯或被篡改,我們可以進行一定的防範措施。但不能杜絕,因為DotNet編寫代碼運行必須編譯成IL 中間語言,IL是很規則,同時也很好反編譯。
反編譯防範措施:
設置項目代碼反匯編屬性
混淆
方法一:防止 Ildasm.exe(MSIL 反匯編程序) 反匯編程序集
方法很簡單在項目文件AssemblyInfo.cs中增加SuppressIldasm屬性。
效果很明顯,很難看出反編譯代碼所寫的真正邏輯。
缺點:C#代碼通過混淆工具生成後,增加了很多轉換過程。這使得反編譯工具無法很直觀看到源碼真正邏輯。但源碼代碼過多轉換會使軟體本身運行效率降低,甚至會出現報錯情況。