-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Struct name not obfuscated on struct bound methods #405
Comments
Can you provide some sample code so we can understand your suggestions better? |
Sure! type Task struct {
Anything int
}
func (task *Task) do_something() {
fmt.Println(task.Anything)
}
func main(){
test := Task{Anything: 1}
test.do_something()
} If you build this and run The "bug" (if it is a bug) is struct names not being obfuscated on main |
I believe this behavior is due to this logic which I think is outdated, as garble doesn't support plugins anymore: https://github.com/burrowers/garble/blob/master/main.go#L1354 |
I think we still eventually want to support plugins as per #87, so the fix here is probably to only do this when |
Their assessment is right; that's why that bit of code has a TODO. Right now it's too conservative. I think it would be reasonable to comment out or disable that bit of code entirely, for now. We simply don't support nor test any alternative build modes just yet. |
Was this not fixed by 474a919? As far as I can tell, we have no other logic currently to attempt to support plugins in any way. |
What version of Garble and Go are you using?
What environment are you running Garble on?
go env
OutputWhat did you do?
GOPRIVATE=* garble -literals -seed=random -tiny build
What did you expect to see?
main.(*jjf9Sh9s).iW1puRey.func8
maybe even
83hd8as.(*jjf9Sh9s).iW1puRey.func8
What did you see instead?
main.(*Task).iW1puRey.func8
Hey, not sure if this is a limitation of the obfuscator or a bug, but although the function names are obfuscated, the name of the struct the function is bound to is not obfusacated, which can facilitate reverse engineering.
I can simply do a search and replace before building to some randomized string and it works, but I do understand that there might be some technical reason to why it can't be done automatically.
Hiding "main" would also be helpful but not as much I guess, since the entry point is easy to find anyway.
Thanks for the package by the way, gives me some peace of mind while distributing my code.
The text was updated successfully, but these errors were encountered: