Class CodelessSignatureManager
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.sig.codeless.CodelessSignatureManager
- All Implemented Interfaces:
IEventListener
Manage a set of
ExecutableModel
, such that an unknown binary can be matched against these
models (see {match(INativeCodeUnit, CodelessSignaturePackageEntry)
), or identified as
containing code from the models (see {identifyLibraries(INativeCodeUnit)
).
This manager is intended to be used in post analysis 'one shot' style; in particular it does not keep any storage of already loaded/matched signatures.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
Provides the list of available signature packages entries (never null).static CodelessSignatureManager
getInstance
(IEnginesContext enginesContext) Search first suitable code unit that can be matched, in current project.identifyLibraries
(INativeCodeUnit<IInstruction> codeUnit) boolean
importState
(INativeCodeUnit<IInstruction> codeUnit, MatchingState state) boolean
isMatched
(INativeCodeUnit<IInstruction> codeUnit, CodelessSignaturePackageEntry entry) Check if a signature package has been matched against given code unit.match
(INativeCodeUnit<IInstruction> codeUnit, CodelessSignaturePackageEntry entry) Match given unit against given reference model.void
void
rescan()
scan()
Scan default folder to provide list of available packages.
-
Field Details
-
CODELESS_SIGS_EXTENSION
- See Also:
-
CODELESS_FOLDER_DEFAULT_NAME
- See Also:
-
-
Method Details
-
getInstance
-
addFolder
-
getAvailablePackages
Provides the list of available signature packages entries (never null). The corresponding packages are not necessarily loaded. -
rescan
public void rescan() -
scan
Scan default folder to provide list of available packages.This method should be executed once at startup.
-
isMatched
public boolean isMatched(INativeCodeUnit<IInstruction> codeUnit, CodelessSignaturePackageEntry entry) Check if a signature package has been matched against given code unit. -
getMatchableUnit
Search first suitable code unit that can be matched, in current project.FIXME: replace by a proper search for all compatible units, and let client decides which ones should be matched.
-
match
public MatchingState match(INativeCodeUnit<IInstruction> codeUnit, CodelessSignaturePackageEntry entry) Match given unit against given reference model.Note that a new Matcher is instantiated each time.
- Returns:
- final matching state, null if matching failed
-
importState
-
identifyLibraries
-
onEvent
- Specified by:
onEvent
in interfaceIEventListener
-