Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rust: Vectors, ObfuscateX and DeobfuscateX

Avatar for VX1988 VX1988
March 14, 2025

Rust: Vectors, ObfuscateX and DeobfuscateX

Simple Rust Generator to hide strings in your binary

Video: https://youtu.be/DDaVy5WMw70?feature=shared

Avatar for VX1988

VX1988

March 14, 2025
Tweet

More Decks by VX1988

Other Decks in Education

Transcript

  1. Rust: Vectors, ObfuscateX and DeobfuscateX Simple Rust Generator to hide

    strings in your binary Fatah Hashim (VX1988) Personal Security Research, 2025
  2. Disclaimer • All the materials are for educational and research

    purposes only. • The views and opinions expressed in this content are my own and do not necessarily reflect the views and opinions of any company or organization that I am affiliated with. Personal Security Research ― Fatah Hashim (VX1988) | VX Engineering
  3. Background Fatah Hashim (VX1988) • Research Focus: Malware Code Research,

    Programming and Reverse-Engineering. • VX Engineering • MCC 2022 & GCC 2023 Alumni Personal Security Research ― Fatah Hashim (VX1988) | VX Engineering
  4. Topics Personal Security Research ― Fatah Hashim (VX1988) | VX

    Engineering 1. Rust Introduction ➢ Short introduction to software development in rust. 2. Basics of Rust Binaries Development ➢ Rust Basic Understanding. 3. Overview ObfuscateX & DeobfuscateX ➢ Tool Code Understanding and Demo Usage
  5. Setup and Tools • Rust toolchain oGo to https://rustup.rs/ and

    follow the instructions for your platform OS! oRun it and select option 1 (proceed with installation) oMake sure you can run rustup and cargo from your terminal, after installation oThree toolchains available at any time. ▪ Stable, Beta, Nightly ▪ Stable installed initially by default • OR (Web Browser Compiler) Rust Playground. • (Optional) Disassembler / Decompiler Tool. • Internet connection. Personal Security Research ― Fatah Hashim (VX1988) | VX Engineering
  6. Why Rust? i. Rust aims to be similar in terms

    of performance to C++. ii. It is multi-purpose language, carrying excellent communities. iii. It has an amazing inbuilt dependency build management called Cargo. Personal Security Research ― Fatah Hashim (VX1988) | VX Engineering
  7. Payload Encoding and Encryption • Why payload encoding/encryption? • Difference

    between encoding and encryption • Examples: Base64, XOR, AES Personal Security Research ― Fatah Hashim (VX1988) | VX Engineering
  8. Topics Personal Security Research ― Fatah Hashim (VX1988) | VX

    Engineering 1. Rust Introduction ➢ Short introduction to software development in rust. 2. Basics of Rust Binaries Development ➢ Rust Basic Code Understanding. 3. Overview ObfuscateX & DeobfuscateX ➢ Tool Code Understanding and Demo Usage
  9. Some Rust Basics Personal Security Research ― Fatah Hashim (VX1988)

    | VX Engineering • Language is case sensitive • Functions are declared with the fn keyword • Blocks of code are surrounded by curly braces { } • Function names ending with ! are macros • String literals surrounded by quotation marks “ ”
  10. Rust Recap: Arrays Personal Security Research ― Fatah Hashim (VX1988)

    | VX Engineering • Array is contiguous list of values of a specified type o Element access with index in brackets []
  11. Rust Recap: Vector 1/3 Personal Security Research ― Fatah Hashim

    (VX1988) | VX Engineering • Vector - similar to an array. • Slower than arrays, but more flexible.
  12. Rust Recap: Vector 2/3 Personal Security Research ― Fatah Hashim

    (VX1988) | VX Engineering Adding value with push:
  13. Topics Personal Security Research ― Fatah Hashim (VX1988) | VX

    Engineering 1. Rust Introduction ➢ Short introduction to software development in rust. 2. Basics of Rust Binaries Development ➢ Rust Basic Understanding. 3. Overview ObfuscateX & DeobfuscateX ➢ Tool Code Understanding and Demo Usage
  14. Project Comparison Personal Security Research ― Fatah Hashim (VX1988) |

    VX Engineering https://github.com/anvie/litcrypt.rs
  15. ObfuscateX Personal Security Research ― Fatah Hashim (VX1988) | VX

    Engineering https://github.com/VX1988/ObfuscateX
  16. DeobfuscateX Personal Security Research ― Fatah Hashim (VX1988) | VX

    Engineering https://github.com/VX1988/DeobfuscateX
  17. • Rust home page • Official rust docs • Rust

    playground • The Rust book • Rust by example • Awesome Rust • Rust GitHub repository 19 Personal Security Research ― Fatah Hashim (VX1988) | VX Engineering Useful Rust Resources