mandiant / mandiant/capa-rules

[Rule Idea] - Lazarus Decode Method

Open
#329 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

rule idea
Dominant language
No language data
Stars
736
Forks
245
Avg merge
4d 53m
Merged PRs (30d)
2

Description

## Prerequisites

* [x] Put an X between the brackets on this line if you have done all of the following:
* Checked that your rule idea isn't already filed: [search](https://github.com/fireeye/capa-rules/issues?q=is%3Aissue+is%3Aopen+)

## Summary
Lazarus uses a custom string decoding algo. The algorithm uses base64 and then a custom routine with arithmetic operations. Highlighted in the blog post here -> https://blog.malwarebytes.com/malwarebytes-news/2021/04/lazarus-apt-conceals-malicious-code-within-bmp-file-to-drop-its-rat/

## Examples

## Features
* `& 0x7f8`
* `<< 0x14`
* `0xFFFFFF80`
* `<< 0x11`
* `nxzor with counts`
* `characteristic loop`

## Additional context
![image](https://user-images.githubusercontent.com/57954766/115414120-c625e900-a1c3-11eb-873d-d7fd7338b3dd.png)

## Rule details

### Namespace
Could fit in either
* `data-manipulation/encoding`
* `anti-analysis/obfuscation/string`

### References
* https://blog.malwarebytes.com/malwarebytes-news/2021/04/lazarus-apt-conceals-malicious-code-within-bmp-file-to-drop-its-rat/
* https://github.com/hackOtack/Malware/blob/main/lazerous_string_decoder.cpp

### Other rule meta information

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Malwarebytes blog post and the linked lazerous_string_decoder.cpp reference, then compare the listed operations and loop characteristics with existing rules under data-manipulation/encoding and anti-analysis/obfuscation/string. Done means adding a capa rule that reliably identifies this Lazarus decoding method, with validation against suitable samples; the issue provides no local rule file or test path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
reverse-engineering, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.