Skip to content

Need a random function that returns a random word #622

Description

@wchen-vc

Randomizing a string in an exploit is a common technique to evade signature-based detection, and often that string is just a group of random letters together. For example, if we do:

random.RandLettersRange(5, 10)

We'd get something like:

dkena

However, I find that sometimes randomness like that does not always help the situation, it might stand out more. For example, if I were to randomize a payload filename, to me this type of name would stand out already without me even inspecting the content of it:

xkoqdha.png

But if I saw a name like this, I'd probably think it's ok because it looks more natural:

dog.png

Another reason mixed letters randomness wouldn't work so well is because modern security tools have evolved to measure the randomness of strings with entropy analysis. For example, Yara has math.entropy(), Splunk has entropy(). CrowdStrike, Sentinel also have ML models to spot them. In those cases, a real natural word would be more evasive.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgoPull requests that update go code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions