Skip to content

Latest commit

 

History

History
502 lines (475 loc) · 39.3 KB

File metadata and controls

502 lines (475 loc) · 39.3 KB

RevEng.AI Java SDK

This is the Java SDK for the RevEng.AI API.

To use the SDK you will first need to obtain an API key from https://reveng.ai.

Installation

Once you have the API key you can install the SDK using Maven or Gradle:

Maven

Add this dependency to your project's POM:

<dependency>
    <groupId>ai.reveng</groupId>
    <artifactId>sdk</artifactId>
    <version>3.46.0</version>
    <scope>compile</scope>
</dependency>

Gradle

Add this dependency to your project's build file:

repositories {
    mavenCentral()
}

dependencies {
    implementation "ai.reveng:sdk:3.46.0"
}

Usage

The following is an example of how to use the SDK to get the logs of an analysis:

import ai.reveng.invoker.*;
import ai.reveng.invoker.auth.*;
import ai.reveng.model.*;
import ai.reveng.api.AnalysesCoreApi;

public class App {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: APIKey
        ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey");
        APIKey.setApiKey(System.getenv("API_KEY"));

        AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient);
        Integer analysisId = 715320; // Integer

        try {
            BaseResponseLogs result = apiInstance.getAnalysisLogs(analysisId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalysesCommentsApi#createAnalysisComment");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Reason: " + e.getResponseBody());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.reveng.ai

Class Method HTTP request Description
AnalysesCommentsApi createAnalysisComment POST /v2/analyses/{analysis_id}/comments Create a comment for this analysis
AnalysesCommentsApi deleteAnalysisComment DELETE /v2/analyses/{analysis_id}/comments/{comment_id} Delete a comment
AnalysesCommentsApi getAnalysisComments GET /v2/analyses/{analysis_id}/comments Get comments for this analysis
AnalysesCommentsApi updateAnalysisComment PATCH /v2/analyses/{analysis_id}/comments/{comment_id} Update a comment
AnalysesCoreApi bulkAddAnalysisTags PATCH /v2/analyses/tags/add Bulk Add Analysis Tags
AnalysesCoreApi createAnalysis POST /v2/analyses Create Analysis
AnalysesCoreApi deleteAnalysis DELETE /v2/analyses/{analysis_id} Delete Analysis
AnalysesCoreApi getAnalysisBasicInfo GET /v2/analyses/{analysis_id}/basic Gets basic analysis information
AnalysesCoreApi getAnalysisFunctionMap GET /v2/analyses/{analysis_id}/func_maps Get Analysis Function Map
AnalysesCoreApi getAnalysisLogs GET /v2/analyses/{analysis_id}/logs Gets the logs of an analysis
AnalysesCoreApi getAnalysisParams GET /v2/analyses/{analysis_id}/params Gets analysis param information
AnalysesCoreApi getAnalysisStatus GET /v2/analyses/{analysis_id}/status Gets the status of an analysis
AnalysesCoreApi insertAnalysisLog POST /v2/analyses/{analysis_id}/logs Insert a log entry for an analysis
AnalysesCoreApi listAnalyses GET /v2/analyses/list Gets the most recent analyses
AnalysesCoreApi lookupBinaryId GET /v2/analyses/lookup/{binary_id} Gets the analysis ID from binary ID
AnalysesCoreApi requeueAnalysis POST /v2/analyses/{analysis_id}/requeue Requeue Analysis
AnalysesCoreApi updateAnalysis PATCH /v2/analyses/{analysis_id} Update Analysis
AnalysesCoreApi updateAnalysisTags PATCH /v2/analyses/{analysis_id}/tags Update Analysis Tags
AnalysesCoreApi uploadFile POST /v2/upload Upload File
AnalysesDynamicExecutionApi getDynamicExecutionStatus GET /v2/analyses/{analysis_id}/dynamic-execution/status Get the status of a dynamic execution task
AnalysesDynamicExecutionApi getNetworkOverview GET /v2/analyses/{analysis_id}/dynamic-execution/network-overview Get the dynamic execution results for network overview
AnalysesDynamicExecutionApi getProcessDump GET /v2/analyses/{analysis_id}/dynamic-execution/process-dumps/{dump_name} Get the dynamic execution results for a specific process dump
AnalysesDynamicExecutionApi getProcessDumps GET /v2/analyses/{analysis_id}/dynamic-execution/process-dumps Get the dynamic execution results for process dumps
AnalysesDynamicExecutionApi getProcessRegistry GET /v2/analyses/{analysis_id}/dynamic-execution/process-registry Get the dynamic execution results for process registry
AnalysesDynamicExecutionApi getProcessTree GET /v2/analyses/{analysis_id}/dynamic-execution/process-tree Get the dynamic execution results for process tree
AnalysesDynamicExecutionApi getTtps GET /v2/analyses/{analysis_id}/dynamic-execution/ttps Get the dynamic execution results for ttps
AnalysesResultsMetadataApi getAnalysisFunctionsPaginated GET /v2/analyses/{analysis_id}/functions Get functions from analysis
AnalysesResultsMetadataApi getCapabilities GET /v2/analyses/{analysis_id}/capabilities Gets the capabilities from the analysis
AnalysesResultsMetadataApi getCommunities GET /v2/analyses/{analysis_id}/communities Gets the communities found in the analysis
AnalysesResultsMetadataApi getFunctionsList GET /v2/analyses/{analysis_id}/functions/list Gets functions from analysis
AnalysesResultsMetadataApi getPdf GET /v2/analyses/{analysis_id}/pdf Gets the PDF found in the analysis
AnalysesResultsMetadataApi getSbom GET /v2/analyses/{analysis_id}/sbom Gets the software-bill-of-materials (SBOM) found in the analysis
AnalysesResultsMetadataApi getTags GET /v2/analyses/{analysis_id}/tags Get function tags with maliciousness score
AnalysesResultsMetadataApi getVulnerabilities GET /v2/analyses/{analysis_id}/vulnerabilities Gets the vulnerabilities found in the analysis
AnalysesSecurityChecksApi createScurityChecksTask POST /v2/analyses/{analysis_id}/security-checks Queues a security check process
AnalysesSecurityChecksApi getSecurityChecks GET /v2/analyses/{analysis_id}/security-checks Get Security Checks
AnalysesSecurityChecksApi getSecurityChecksTaskStatus GET /v2/analyses/{analysis_id}/security-checks/status Check the status of a security check process
AnalysesXRefsApi getXrefByVaddr GET /v2/analyses/{analysis_id}/xrefs/{vaddr} [Beta] Look up xrefs by virtual address
AuthenticationUsersApi getRequesterUserInfo GET /v2/users/me Get the requesters user information
AuthenticationUsersApi getUser GET /v2/users/{user_id} Get a user's public information
AuthenticationUsersApi getUserActivity GET /v2/users/activity Get auth user activity
AuthenticationUsersApi getUserComments GET /v2/users/me/comments Get comments by user
AuthenticationUsersApi loginUser POST /v2/auth/login Authenticate a user
BinariesApi downloadZippedBinary GET /v2/binaries/{binary_id}/download-zipped Downloads a zipped binary with password protection
BinariesApi getBinaryAdditionalDetails GET /v2/binaries/{binary_id}/additional-details Gets the additional details of a binary
BinariesApi getBinaryAdditionalDetailsStatus GET /v2/binaries/{binary_id}/additional-details/status Gets the status of the additional details task for a binary
BinariesApi getBinaryDetails GET /v2/binaries/{binary_id}/details Gets the details of a binary
BinariesApi getBinaryDieInfo GET /v2/binaries/{binary_id}/die-info Gets the die info of a binary
BinariesApi getBinaryExternals GET /v2/binaries/{binary_id}/externals Gets the external details of a binary
BinariesApi getBinaryRelatedStatus GET /v2/binaries/{binary_id}/related/status Gets the status of the unpack binary task for a binary
BinariesApi getRelatedBinaries GET /v2/binaries/{binary_id}/related Gets the related binaries of a binary.
CollectionsApi createCollection POST /v2/collections Creates new collection information
CollectionsApi deleteCollection DELETE /v2/collections/{collection_id} Deletes a collection
CollectionsApi getCollection GET /v2/collections/{collection_id} Returns a collection
CollectionsApi listCollections GET /v2/collections Gets basic collections information
CollectionsApi updateCollection PATCH /v2/collections/{collection_id} Updates a collection
CollectionsApi updateCollectionBinaries PATCH /v2/collections/{collection_id}/binaries Updates a collection binaries
CollectionsApi updateCollectionTags PATCH /v2/collections/{collection_id}/tags Updates a collection tags
ConfigApi getConfig GET /v2/config Get Config
ExternalSourcesApi createExternalTaskVt POST /v2/analysis/{analysis_id}/external/vt Pulls data from VirusTotal
ExternalSourcesApi getVtData GET /v2/analysis/{analysis_id}/external/vt Get VirusTotal data
ExternalSourcesApi getVtTaskStatus GET /v2/analysis/{analysis_id}/external/vt/status Check the status of VirusTotal data retrieval
FirmwareApi getBinariesForFirmwareTask GET /v2/firmware/get-binaries/{task_id} Upload firmware for unpacking
FirmwareApi uploadFirmware POST /v2/firmware Upload firmware for unpacking
FunctionsAiDecompilationApi createAiDecompilationComment POST /v2/functions/{function_id}/ai-decompilation/comments Create a comment for this function
FunctionsAiDecompilationApi createAiDecompilationTask POST /v2/functions/{function_id}/ai-decompilation Begins AI Decompilation Process
FunctionsAiDecompilationApi deleteAiDecompilationComment DELETE /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} Delete a comment
FunctionsAiDecompilationApi getAiDecompilationComments GET /v2/functions/{function_id}/ai-decompilation/comments Get comments for this function
FunctionsAiDecompilationApi getAiDecompilationRating GET /v2/functions/{function_id}/ai-decompilation/rating Get rating for AI decompilation
FunctionsAiDecompilationApi getAiDecompilationTaskResult GET /v2/functions/{function_id}/ai-decompilation Polls AI Decompilation Process
FunctionsAiDecompilationApi getAiDecompilationTaskStatus GET /v2/functions/{function_id}/ai-decompilation/status Check the status of a function ai decompilation
FunctionsAiDecompilationApi updateAiDecompilationComment PATCH /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} Update a comment
FunctionsAiDecompilationApi upsertAiDecompilationRating PATCH /v2/functions/{function_id}/ai-decompilation/rating Upsert rating for AI decompilation
FunctionsBlockCommentsApi generateBlockCommentsForBlockInFunction POST /v2/functions/{function_id}/block-comments/single Generate block comments for a specific block in a function
FunctionsBlockCommentsApi generateBlockCommentsForFunction POST /v2/functions/{function_id}/block-comments Generate block comments for a function
FunctionsBlockCommentsApi generateOverviewCommentForFunction POST /v2/functions/{function_id}/block-comments/overview Generate overview comment for a function
FunctionsCoreApi aiUnstrip POST /v2/analyses/{analysis_id}/functions/ai-unstrip Performs matching and auto-unstrip for an analysis and its functions
FunctionsCoreApi analysisFunctionMatching POST /v2/analyses/{analysis_id}/functions/matches Perform matching for the functions of an analysis
FunctionsCoreApi autoUnstrip POST /v2/analyses/{analysis_id}/functions/auto-unstrip Performs matching and auto-unstrip for an analysis and its functions
FunctionsCoreApi batchFunctionMatching POST /v2/functions/matches Perform function matching for an arbitrary batch of functions, binaries or collections
FunctionsCoreApi cancelAiUnstrip DELETE /v2/analyses/{analysis_id}/functions/ai-unstrip/cancel Cancels a running ai-unstrip
FunctionsCoreApi cancelAutoUnstrip DELETE /v2/analyses/{analysis_id}/functions/unstrip/cancel Cancels a running auto-unstrip
FunctionsCoreApi getAnalysisStrings GET /v2/analyses/{analysis_id}/functions/strings Get string information found in the Analysis
FunctionsCoreApi getAnalysisStringsStatus GET /v2/analyses/{analysis_id}/functions/strings/status Get string processing state for the Analysis
FunctionsCoreApi getFunctionBlocks GET /v2/functions/{function_id}/blocks Get disassembly blocks related to the function
FunctionsCoreApi getFunctionCalleesCallers GET /v2/functions/{function_id}/callees_callers Get list of functions that call or are called by the specified function
FunctionsCoreApi getFunctionCalleesCallersBulk GET /v2/functions/callees_callers Get list of functions that call or are called for a list of functions
FunctionsCoreApi getFunctionCapabilities GET /v2/functions/{function_id}/capabilities Retrieve a functions capabilities
FunctionsCoreApi getFunctionDetails GET /v2/functions/{function_id} Get function details
FunctionsCoreApi getFunctionStrings GET /v2/functions/{function_id}/strings Get string information found in the function
FunctionsDataTypesApi generateFunctionDataTypesForAnalysis POST /v2/analyses/{analysis_id}/functions/data_types Generate Function Data Types
FunctionsDataTypesApi generateFunctionDataTypesForFunctions POST /v2/functions/data_types Generate Function Data Types for an arbitrary list of functions
FunctionsDataTypesApi getFunctionDataTypes GET /v2/analyses/{analysis_id}/functions/{function_id}/data_types Get Function Data Types
FunctionsDataTypesApi listFunctionDataTypesForAnalysis GET /v2/analyses/{analysis_id}/functions/data_types List Function Data Types
FunctionsDataTypesApi listFunctionDataTypesForFunctions GET /v2/functions/data_types List Function Data Types
FunctionsDataTypesApi updateFunctionDataTypes PUT /v2/analyses/{analysis_id}/functions/{function_id}/data_types Update Function Data Types
FunctionsDecompilationApi createDecompilationComment POST /v2/functions/{function_id}/decompilation/comments Create a comment for this function
FunctionsDecompilationApi deleteDecompilationComment DELETE /v2/functions/{function_id}/decompilation/comments/{comment_id} Delete a comment
FunctionsDecompilationApi getDecompilationComments GET /v2/functions/{function_id}/decompilation/comments Get comments for this function
FunctionsDecompilationApi updateDecompilationComment PATCH /v2/functions/{function_id}/decompilation/comments/{comment_id} Update a comment
FunctionsRenamingHistoryApi batchRenameFunction POST /v2/functions/rename/batch Batch Rename Functions
FunctionsRenamingHistoryApi getFunctionNameHistory GET /v2/functions/history/{function_id} Get Function Name History
FunctionsRenamingHistoryApi renameFunctionId POST /v2/functions/rename/{function_id} Rename Function
FunctionsRenamingHistoryApi revertFunctionName POST /v2/functions/history/{function_id}/{history_id} Revert the function name
ModelsApi getModels GET /v2/models Gets models
SearchApi searchBinaries GET /v2/search/binaries Binaries search
SearchApi searchCollections GET /v2/search/collections Collections search
SearchApi searchFunctions GET /v2/search/functions Functions search
SearchApi searchTags GET /v2/search/tags Tags search

Documentation for Models

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.