Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!

cracked.io | Best Forum Around | Free Premium Accounts




 3190

[Rust] How do I ensure my source code (when compiled) doesn't get leaked?

by novuh - 28 November, 2021 - 06:49 PM
This post is by a banned member (novuh) - Unhide
novuh  
Registered
13
Posts
5
Threads
2 Years of service
#1
I'm planning on using Rust as a backend for a project and I will be selling it. For obvious reasons I need to ensure the code that I have does not get leaked. I'm wondering if there is a way other than to "just compile it" to make to code unreadable or better yet defensive against disassembly. I know security via obscurity is usually frowned upon but it has worked in keeping competitors and malicious people from leaking or reverse-engineering my stuff in the past.

Thanks  Hackerman
website | novuh#2719 | seller/programmer
This post is by a banned member (Azteroid) - Unhide
Azteroid  
Registered
9
Posts
1
Threads
2 Years of service
#2
I'm just learning rust now and that's a good question, I'll let you know if I find the answer you're looking for
This post is by a banned member (klath12) - Unhide
klath12  
Registered
4
Posts
0
Threads
2 Years of service
#3
thanks
This post is by a banned member (0x145Lm) - Unhide
0x145Lm  
Registered
4
Posts
0
Threads
2 Years of service
#4
First of all there's no way to get the source code if your program as been compiled, however it's still possible to analyze it, debug it etc.., and tbh if the guy that reverse enginneer your software is experienced it'll be an easy task for him to know how your program works, but you can make his job harder by adding control-flow obfuscation for example (even though it might not be optimal since you are doing a backend server), obfuscate strings etc etc... But remember that it'll allways be possible to analyze your program it just depends on the guy who is analyzing it
This post is by a banned member (SHA512) - Unhide
SHA512  
Supreme
58
Posts
22
Threads
3 Years of service
#5
Rust is similar to golang, in that once it's compiled, it gives the assembler (as assembler converts assembly to your native machines binary. e.g. exe for windows, or maybe macos ".app") much information, so when its time to convert rust (or golang since its compile process is similar enough to be compared with) into assembly, theres hardly enough information for any decompiler to convert it back into rusts native source code. so there really is no need for obfuscation, but it's still an option.

like mentioned before, you can attempt to reverse engineer a program after disassembling it, (converting from exe to assembly, likely x86) but it'd be a huge pain. 

unless your program has like bloody nuclear codes hiddin inside of it, theres really no need to worry about decompilation
[Image: pepeglad.png]

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)