Direct Syscalls and Sleep Obfuscate #1171
-
Hi everyone, first of all, thanks for the amazing tool. Thanks a lot in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 7 replies
-
We already implement some direct syscalls, we may add more in the future --though typically these will be most effective to implement in your loader. Obfuscated sleep is complicated because of the go runtime, but we're open to ideas on how to implement it. |
Beta Was this translation helpful? Give feedback.
-
I cant think of a sensible way to recreate ekko sleep obfuscation or similar but i wrote a small PoC on how to encrypt a function while the beacon is sleeping. Given the size of sliver though it would be a pain to implement. Also reflect.ValueOf(toBEncrypted).Pointer() was pointing to the wrong address on go version go1.20.7 windows/amd64. All good on go1.21.0 mask.go
main.go
|
Beta Was this translation helpful? Give feedback.
-
I implemented some basic runtime sleep and heap encryption (https://github.com/parzel/GoSleepyCrypt) but its necessary to call shellcode for it. I also suspend the go runtime in the PoC to prevent a panic. As its synchronous, not sure how it would fit best into sliver though. |
Beta Was this translation helpful? Give feedback.
-
I believe I got Ekko to work properly using go. In order to get the goroutines to work I suspend all processes before encrypting memory and I resume straight after decrypting It would be interesting to see if it could be implemented on a larger project. https://github.com/scriptchildie/goEkko An obvious caveat. When the sleep obfuscation happens the go routines pause. Original code in c: |
Beta Was this translation helpful? Give feedback.
-
Any updates on sleep masking using Sliver? |
Beta Was this translation helpful? Give feedback.
-
I've attempted its implementation in this PR Anyone interested feel free to review and test out. |
Beta Was this translation helpful? Give feedback.
We already implement some direct syscalls, we may add more in the future --though typically these will be most effective to implement in your loader. Obfuscated sleep is complicated because of the go runtime, but we're open to ideas on how to implement it.