Hostile 99% github Download

PixiEditor/PixiEditor 2.1.0.23

Legitimate open-source image editor

“PixiEditor is a Universal Editor for all your 2D needs”

C# recursively encrypts files and deletes originalsC# low-level keyboard capture source

Evidence

Directory file-enumeration API name reference PackageEncryptor.cs · lines 10–31
10:67… ng intermediateOutputPath, string outputPath,
11 ref string keyBase64, ref string ivBase64)
12 {
13 string[] files = Directory.GetFiles(resourcesPath, "*.*", SearchOption.AllDirectories);
14
15 if (files.Length == 0)
16 {
17 return true;
18 }
19
20 var path = Path.Combine(intermediateOutputPath, "resources.zip");
21
22 if (File.Exists(path))
23 {
24 File.Delete(path);
25 }
26
27 ZipFile.CreateFromDirectory(resourcesPath, path,
28 CompressionLevel.Fastest, false);
29 var data = File.ReadAllBytes(Path.Combine(intermediateOutputPath, "resources.zip"));
30 var encryptionKey = new byte[128 / 8];
31 var iv = new byt …
CreateEncryptor method-name reference PackageEncryptor.cs · lines 49–85
49:12… iv = Convert.FromBase64String(ivBase64);
50 }
51
52 var encryptedData = Encrypt(data, encryptionKey, iv);
53 File.WriteAllBytes(Path.Combine(outputPath, "resources.data"), encryptedData);
54
55 return true;
56 }
57
58 public static byte[] Encrypt(byte[] data, byte[] key, byte[] iv)
59 {
60 using var aes = Aes.Create();
61 aes.KeySize = 128;
62 aes.BlockSize = 128;
63 aes.Padding = PaddingMode.Zeros;
64
65 aes.Key = key;
66 aes.IV = iv;
67
68 using (var encryptor = aes.CreateEncryptor(aes.Key, aes.IV))
69 {
70 return PerformCryptography(data, encryptor);
71 }
72 }
73
74 private static byte[] PerformCryptography(byte[] data, ICryptoTransform cryptoTransform)
75 {
76 using (var ms = new MemoryStream())
77 using (var cryptoStream = new CryptoStream(ms, cryptoTransform, CryptoStreamMode.Write))
78 {
79 cryptoStream.Write(data, 0, data.Length);
80 cryptoStream.FlushFinalBlock();
81
⋯4 lines
GetKeyboardLayout API name reference Win32.cs · lines 159–178
159:9… int cchBuff,
160 uint wFlags);
161
162 [DllImport("user32.dll")]
163 public static extern nint GetKeyboardLayout(
164 uint idThread);
165
⋯4 lines
170
171 [DllImport("user32.dll")]
172 public static extern int ToUnicodeEx(
173 uint wVirtKey,
174 uint wScanCode,
⋯4 lines
MapVirtualKey API string reference Win32.cs · lines 180–192
180:19… );
181
182 [DllImport("user32.dll")]
183 public static extern bool GetKeyboardState(byte[] lpKeyState);
184
185 [DllImport("user32.dll")]
186 public static extern uint MapVirtualKeyExW(uint uCode, MapType uMapType, nint hkl);
187
188 [DllImport("user32.dll")]
⋯4 lines
SetWindowsHookEx reference in source Win32.cs · lines 194–200
194:51… all,
195 SetLastError = true)]
196 public static extern int SetWindowsHookEx(int idHook, HookProc lpfn, IntPtr hMod, int dwThreadId);
197
198 [DllImport(
199 "user32.dll",
200 CharSet = CharSet.Auto, …

Showing the top 5 files — 5 more files (42 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.