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

Added detection of RLPack packer #615

Merged
merged 2 commits into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class PeHeuristics : public Heuristics
void getSecuROMHeuristics();
void getMPRMMGVAHeuristics();
void getActiveMarkHeuristics();
void getRLPackHeuristics();
void getPetiteHeuristics();
void getPelockHeuristics();
void getEzirizReactorHeuristics();
Expand Down
16 changes: 16 additions & 0 deletions src/cpdetect/compiler_detector/heuristics/pe_heuristics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,6 +675,21 @@ void PeHeuristics::getActiveMarkHeuristics()
}
}

/**
* Detection of RLPack packer
*/
void PeHeuristics::getRLPackHeuristics()
{
if (search.exactComparison("B800000000600BC07458E8000000005805430000008038E9750361EB35E800000000582500F0FFFF33FF66BB195A6683C33466391875120FB7503C03D0BBE944", toolInfo.epOffset) ||
search.exactComparison("57C7C772AFB4DF8D3D5FBA581AFFCF0FACF7F20FBDFEF7C75CDC30270FBAF7330FBBF70FCFBF64A909DB85F681DFAC194648F7DF0FA3F7C7C741BC79A085F7D1", toolInfo.epOffset))
{
addPacker(DetectionMethod::STRING_SEARCH_H, DetectionStrength::HIGH, "RLPack");
}

// TODO: Need to scan other RLPack variants. We would need a disassembler that normalizes instructions
s3rvac marked this conversation as resolved.
Show resolved Hide resolved
// with jump removing, so we can check sequence like "60E8--8D6424--8B6C24"
}

/**
* Detection of Petite packer
*/
Expand Down Expand Up @@ -1973,6 +1988,7 @@ void PeHeuristics::getFormatSpecificCompilerHeuristics()
getSecuROMHeuristics();
getMPRMMGVAHeuristics();
getActiveMarkHeuristics();
getRLPackHeuristics();
getPetiteHeuristics();
getPelockHeuristics();
getEzirizReactorHeuristics();
Expand Down