zoukankan      html  css  js  c++  java
  • .net流程混淆简单示例

    主要就是利用了ilasm对程序不进行优化(汇编程序编译时不会对程序做优化处理)

     

    用过Reflector的都知道,这是一个功能非常强大的反编译工具,几乎能够将你的.net代码完全还原,并且能够立即重新 

    编译运行,本文提供了一个方法让Reflector的反编译不能正常工作,据研究,目前很多代码混淆工具已经使用了该技术, 

    为了便于理解,我将该方法姑且叫做代码顺序扰乱技术。 

    下面来研究一个具体的例子: 

    1。StrConv.cs源代码如下:

    using System;
    public class StrTool
    {
        public static void Main(String[] argv)
        {
            String s1 = "\ud7d1\udec3\ue5b9\ueca6";
            int num = 0x4308d77e;
            Console.WriteLine(conv(s1, num));
        }
    
        public static string conv(string str, int num)
        {
            char[] chArray1 = str.ToCharArray();
            for (int num1 = 0; num1 < chArray1.Length; num1++)
            {
                chArray1[num1] = (char) (chArray1[num1] - num);
                num += 0x6fd;
            }
            return new string(chArray1);
        }
    }
  • 相关阅读:
    Median Value
    237. Delete Node in a Linked List
    206. Reverse Linked List
    160. Intersection of Two Linked Lists
    83. Remove Duplicates from Sorted List
    21. Merge Two Sorted Lists
    477. Total Hamming Distance
    421. Maximum XOR of Two Numbers in an Array
    397. Integer Replacement
    318. Maximum Product of Word Lengths
  • 原文地址:https://www.cnblogs.com/mokliu/p/2138144.html
Copyright © 2011-2022 走看看