Skip to content
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

Add Ekko / Sleep Obfuscation to Sliver #1805

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

armysick
Copy link

Card

This PR implements Ekko / in-memory sleep obfuscation for a beacon.

Details

Based on the work of https://github.com/scriptchildie/goEkko, adapted from https://github.com/Cracked5pider/Ekko, it pauses Go runtime and encrypts the beacon's memory region with the Ekko technique.

Command -B / --sleep-obfuscation added on generate beacon to support this feature.
Only applicable for Windows.

Beacon while performing operations / active:
Beacon_Active

Beacon while in its sleep duration:
Beacon_Sleeping

@armysick armysick requested a review from a team as a code owner October 31, 2024 01:07
@moloch--
Copy link
Member

Looks awesome we'll try to get this reviewed and merged shortly!

Copy link
Member

@rkervella rkervella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of things to changes before I can dynamically test that one:

  • please don't print to stdout when you're not in debug mode
  • generate the XOR key dynamically at runtime instead of the hardcoded buffer of 0x55 values.

implant/sliver/ekko/ekko.go Outdated Show resolved Hide resolved
implant/sliver/ekko/ekko.go Outdated Show resolved Hide resolved
implant/sliver/ekko/ekko.go Outdated Show resolved Hide resolved
implant/sliver/ekko/ekko.go Outdated Show resolved Hide resolved
implant/sliver/ekko/ekko.go Outdated Show resolved Hide resolved
implant/sliver/ekko/ekko.go Outdated Show resolved Hide resolved
@armysick
Copy link
Author

Heya, @rkervella !

Thanks for the first review. Cleaned out the prints and randomised XOR key generation.
Tested it again and looking through process hacker, functionality remains the same after the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants