Click here to Skip to main content
15,891,661 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello everyone!

My hobby is finding some interesting stuff, coding, reversing etc.

Once i found a very interesting encryption code.
Its using Crypted resources, decrypting it with special byte key, and execute.
Here is the sample:

C#
//KEY 
		private static byte[] TSVCuLWZ = new byte[] {
			0xb7, 0x61, 0xd7, 0x3d, 0x66, 0x5e, 0xa6, 0xe8, 40, 0x87, 0x19, 0x49, 0xce, 0x54, 0x68, 0x4c,
			0xad, 0xa6, 0x2a, 0xf2, 160, 15, 210, 0xc6
		};
//Just a method to decrypt string (for more security)
		private static string FUJHE(string LSMFpfp, byte[] sQoPbDpAtuDXdRTcmnW)
		{
			string[] strArray = LSMFpfp.Split(new char[] { '#' });
			byte[] buffer = new byte[strArray.Length];
			for (int i = 0; i < strArray.Length; i++)
			{
				buffer[i] = byte.Parse(strArray[i]);
			}
			for (int j = 0; j < buffer.Length; j++)
			{
				for (int k = 0; k < sQoPbDpAtuDXdRTcmnW.Length; k++)
				{
					buffer[j] = (byte)(buffer[j] ^ sQoPbDpAtuDXdRTcmnW[k]);
				}
			}
			string str = "";
			foreach (byte num4 in buffer)
			{
				str = str + ((char)num4);
			}
			return str;
		}
//Main method, decrypting
static void Main(string[] EkhHJIncZlqF)
		{
			
			ResourceManager resourceManager = new ResourceManager("Project.VUCusDt", Assembly.GetExecutingAssembly());
			string text = "";
			for (int i = 0; i < 63; i++)
			{
				text += resourceManager.GetString(FUJHE("34#8#33#53#21#57#58#20#0#34#12#20", TSVCuLWZ) + i.ToString());
			}
			byte[] array = new byte[text.Length];
			for (int j = 0; j < array.Length; j++)
			{
				array[j] = (byte)text[j];
			}
			for (int k = 0; k < array.Length; k++)
			{
				for (int l = 0; l < TSVCuLWZ.Length; l++)
				{
					array[k] ^= TSVCuLWZ[l];
				}
			}
                    }
  //////////////

There is more code in Main method(Invoke function), but if needed ill post it later.

So here is question. How this method of encryption call?
Ofc file in resources can be wrotten on any language, and can be even a JPG file.

Only info i founded on site: cisco-blog[^]

But its goin' about malisious, and nothing about how it works.

If someone know about it, plese respond! Just mb any post on MSDN or smth
Thanks a lot!

One more thing. This files is kinda easy to reverse just by using Reflector (gaining resources and source) and make own project, then use File.WriteAllBytes and write an decrypted array. But how to make dat stuff like reversed i don't know...
Posted
Comments
Richard MacCutchan 25-Mar-15 4:45am    
Why not ask the person who wrote the blog?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900