How UPX Packing Compresses Executables and Reduces Analysis Visibility

· 13:12 · Watch on YouTube ↗

Summary

A tutorial demonstrates how UPX compresses a Windows executable, unpacks it in memory, and changes its imports and visible strings, reducing static-analysis visibility and illustrating traits analysts can inspect.

Key points

  • The demonstration compiles a sample program and uses UPX to compress it into a packed executable that unpacks in memory when run.
  • The speaker identifies entropy, strings, and imports as characteristics analysts can inspect when assessing packed files.
  • In the example, packing reduces the visible imports needed for unpacking, while some network-related imports remain.
  • Strings visible in the original executable are not visible in the packed sample because the program code is compressed.
  • The tutorial compares the packed and unpacked files and explains that packing reduces visibility until analysts understand how to unpack the executable.
  • The speaker distinguishes UPX’s compression and efficiency goals from more obfuscation-focused malicious packers.

Article Details

Topics
  • [00:13] UPX packing as compression and obfuscation
  • [00:46] Sample program and in-memory unpacking process
  • [01:38] Packing indicators: entropy, strings, and imports
  • [04:09] Inspecting the PE file structure and imports
  • [06:50] Packing the sample with UPX
  • [09:09] Comparing imports and strings in packed and original files

MITRE ATT&CK

Products

Tools

Related Articles