diff options
| author | Brandon Miller <brandon@vector35.com> | 2024-03-21 10:52:21 -0400 |
|---|---|---|
| committer | Brandon Miller <bkmiller89@icloud.com> | 2024-04-25 10:56:18 -0400 |
| commit | 4b2b3d561b92a01f4d29b86d5510d39e4d1accf3 (patch) | |
| tree | 2d51e8c9c1fd539f27ffc52bcfe464ab6bd73ef0 /binaryninjaapi.h | |
| parent | 6ba7605eafb5419b82e2721026e9dc922de95347 (diff) | |
Base address detection widget in Triage view
Initial implementation of base address detection UI widget in triage
summary
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 6bd63a4b..6bd33c80 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -17378,6 +17378,61 @@ namespace BinaryNinja { const std::function<void(Symbol*, Type*)>& add); void Process(); }; + + struct BaseAddressDetectionSettings + { + std::string Architecture; + std::string Analysis; + uint32_t MinStrlen; + uint32_t Alignment; + uint64_t LowerBoundary; + uint64_t UpperBoundary; + BNBaseAddressDetectionPOISetting POIAnalysis; + uint32_t MaxPointersPerCluster; + }; + + enum BaseAddressDetectionConfidence + { + NoConfidence = 0, + LowConfidence = 1, + HighConfidence = 2, + }; + + /*! + \ingroup baseaddressdetection + */ + class BaseAddressDetection + { + BNBaseAddressDetection* m_object; + + public: + BaseAddressDetection(Ref<BinaryView> view); + ~BaseAddressDetection(); + + /*! Analyze program, identify pointers and points-of-interest, and detect candidate base addresses + + \param settings Base address detection settings + \return true on success, false otherwise + */ + bool DetectBaseAddress(BaseAddressDetectionSettings& settings); + + /*! Get the top 10 candidate base addresses and thier scores + + \param confidence Confidence level that the top base address candidate is correct + \return Set of pairs containing candidate base addresses and their scores + */ + std::set<std::pair<size_t, uint64_t>> GetScores(BaseAddressDetectionConfidence* confidence); + + /*! Abort base address detection + */ + void Abort(); + + /*! Determine if base address detection is aborted + + \return true if aborted by user, false otherwise + */ + bool IsAborted(); + }; } // namespace BinaryNinja |
