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

Malware Masquerade (backend) #3241

Closed
11 tasks done
mssalvatore opened this issue Apr 22, 2023 · 0 comments · Fixed by #3256
Closed
11 tasks done

Malware Masquerade (backend) #3241

mssalvatore opened this issue Apr 22, 2023 · 0 comments · Fixed by #3256
Labels
Complexity: Medium Feature Issue that describes a new feature to be implemented. Impact: Medium sp/5
Milestone

Comments

@mssalvatore
Copy link
Collaborator

mssalvatore commented Apr 22, 2023

Description

Masquerade - to assume the appearance of something one is not [1]

A common way of detecting and identifying an executable as malware it to write a detection rule (for a tool like YARA) that checks for the existence of strings or unique byte sequences within the file. In order to improve the fidelity of Infection Monkey's malware emulation, users should be able to specify arbitrary data that will be injected into the agent binaries. This will enable Infection Monkey Agents to masquerade as specific types of malware. This may be particularly useful for a user who writes their own detection rules and needs a way to test them.

Approach

A null byte (or a few null bytes) followed by the desired data (bytes) can be appended to Linux or Windows binaries with no ill effects. The appended data will not execute, but simply be present within the binary.

See [2] for a note on signed Windows binaries.

Tasks

  • Create a MasqueradeAgentBinaryRepositoryDecorator. This will wrap IAgentBinaryRepository methods and append the masque data (supplied to the decorator's constructor) to the agent binaries when they are requested. (0d) @ilija-lazoroski
    • Don't forget caching
  • Add a apply_{linux,windows}_masque(masque: Optional[bytes]) function to IAgentBinaryService (0d) @mssalvatore
    • Implement AgentBinaryService.apply_{linux,windows}_masque(masque: Optional[bytes]), It should apply the masque decorator to the repository if the masque is not None, or remove the decorator if masque is None.
  • Add flask resources for GET/PUT /api/agent-binaries/{linux,windows}/masque (0d) - @shreyamalviya
    • The endpoint should accept raw bytes/octets
    • Don't forget unit tests
  • Modify one or more ETE tests to apply a masque. (0d) - @shreyamalviya
    • Depth 1
    • Depth 4
  • Remove vulture entries
@mssalvatore mssalvatore added Feature Issue that describes a new feature to be implemented. Impact: Medium Complexity: Medium labels Apr 22, 2023
@mssalvatore mssalvatore added this to the v2.2.0 milestone Apr 22, 2023
mssalvatore added a commit that referenced this issue Apr 24, 2023
This service will have more meat after #3241.
mssalvatore added a commit that referenced this issue Apr 24, 2023
This service will have more meat after #3241.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium Feature Issue that describes a new feature to be implemented. Impact: Medium sp/5
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant