| java.lang.Object | |
| ↳ | com.pnfsoftware.jeb.core.units.code.asm.sig.NativeSignatureDBManager |
Manage a set of INativeSignaturePackage, such that a native item (routine, basic block,
instruction or data) can be matched against the INativeSignature contained in such
package.
Conflicts resolution, i.e. when several signature match, and processing of signatures' attributes are the client's responsibility.
Warning: for now the only signature target fully managed is routine.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | SIGLIB_EXTENSION | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| NativeSignatureDBManager() | |||||||||||
|
NativeSignatureDBManager(File folder)
Creates a NSDBManager with an initial folder that will be scanned.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
addFolder(File folder, boolean doRescan)
Add a new folder to search for native signature packages.
| ||||||||||
| List<NativeSignaturePackageEntry> |
getAvailablePackages()
Provides the list of available signature packages entries.
| ||||||||||
| List<NativeSignaturePackageEntry> |
getLoadedPackages()
Provides the list of signature packages entries for which the corresponding signatures are
loaded in memory.
| ||||||||||
| int | getNumberLoadedSigs() | ||||||||||
| boolean | isActive() | ||||||||||
| boolean |
loadPackage(INativeCodeAnalyzer<IInstruction> gca, NativeSignaturePackageEntry entry)
Loads a specific package for the given analysis.
| ||||||||||
| boolean |
loadPackage(NativeSignaturePackageEntry entry)
Loads a specific package for all analysis known to the manager.
| ||||||||||
| void |
loadPackages(INativeCodeAnalyzer<IInstruction> gca)
Loads in memory the available packages suitable for the given analysis.
| ||||||||||
| List<NativeSignatureMatchResult> |
match(INativeCodeAnalyzer<IInstruction> _gca, Collection<INativeMethodDataItem> routines, boolean uniqueMatchOnly, boolean maximumConfidenceLevel)
Match a list of native routines against the currently loaded signatures packages for this
analysis.
| ||||||||||
| void |
removeAllFolders()
Empties the list of scanned folders
| ||||||||||
| void |
removeAllPackages()
Empties the list of available packages.
| ||||||||||
| void |
removeFolder(File folder, boolean doRescan)
Remove a folder from the list of folders to search for native signature packages.
| ||||||||||
| void |
rescan()
Rescan registered folders to register/unregister native signature packages.
| ||||||||||
| void | setActive(boolean isActive) | ||||||||||
| void |
unloadPackages(INativeCodeAnalyzer<IInstruction> gca)
Unloads from memory the signatures packages used by the given analysis.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Creates a NSDBManager with an initial folder that will be scanned.
Add a new folder to search for native signature packages.
| doRescan | if true all registered folders are scanned for signature packages after the addition |
|---|
Provides the list of available signature packages entries. The corresponding packages are not necessarily loaded.
Provides the list of signature packages entries for which the corresponding signatures are loaded in memory.
Loads a specific package for the given analysis.
Loads a specific package for all analysis known to the manager.
Loads in memory the available packages suitable for the given analysis. The determination of the suitable packages is based on:
Match a list of native routines against the currently loaded signatures packages for this analysis. For each routine the algorithm searches for signatures whose all INativeFeatures match the routine.
The result can be incomplete: if a unique match was asked we stop the search as soon as we
found two matches and report an incomplete result, see
isComplete().
| uniqueMatchOnly | if true the complete results are the ones for which there is only one matching signature |
|---|---|
| maximumConfidenceLevel | if true the matching signatures -- if any -- will all be of the
maximum possible level of confidence. For example, if two matching signatures have
MEDIUM and one has LOW, only the
first two will be kept in the results. Otherwise, all matching signatures are
kept. |
Empties the list of scanned folders
Empties the list of available packages.
Remove a folder from the list of folders to search for native signature packages.
| doRescan | if true all registered folders are scanned for signature packages after the removal |
|---|
Rescan registered folders to register/unregister native signature packages. Such package
names end with SIGLIB_EXTENSION.
Unloads from memory the signatures packages used by the given analysis. Only the signatures storage specific to this analysis will be removed, i.e. if another analysis uses the same package it will be untouched.