checkHash (Hash Filter)
    • PDF

    checkHash (Hash Filter)

    • PDF

    Article Summary

    Overview

    • The chechHash API is a feature provided by "Hash Filter" in "File Safer" and an API that checks for malwares using the Hash values.
    • You can use this API through IAM authentication and API Gateway used in NAVER Cloud Platform.

    Requests

    MethodRequest URI
    GEThttps://filesafer.apigw.ntruss.com/hashfilter/v1/checkHash

    Request headers

    Header nameDescription
    x-ncp-apigw-timestampTime elapsed in milliseconds since January 1, 1970, 00:00:00 UTC
    The request is considered invalid if the time difference compared to the API Gateway server is more than 5 minutes
    x-ncp-apigw-api-keyKey issued from API Gateway
    x-ncp-iam-access-keyThe API key issued from NAVER Cloud Platform or AccessKey issued from IAM
    x-ncp-apigw-signature-v2A signature that encrypts the request path and header with a SecretKey mapped to an AccessKey
    HmacSHA256 is used as the HMAC encryption algorithm
    acceptIndicate json
    application/json

    Request parameters

    Parameter nameRequiredTypeDescription
    hashCodeYesstringHash value to view
    hashTypeYesstringAlgorithm type value with an extracted Hash to view and supports md5, sha1
    sha1 or md5

    Responses

    Response bodies

    Field nameRequiredTypeDescription
    returnCodeYesstringProcessing result code for requests
    returnMessageYesstringProcessing result message for requests
    totalRowsYesintNumber of objects of hashCheckResultList
    hashCheckResultListYesList- Information on detections of the queried hash
    When there's an object in list: 악성코드
    When there's no object in list: 정상
    hashTypeNostring악성코드로 탐지된 경우에만 포함
    Algorithm type of hashcode and supports MD5, SHA-1
    hashCodeNostring악성코드로 탐지된 경우에만 포함
    Detected Hash value
    groupNoString악성코드로 탐지된 경우에만 포함
    Displayed as "file" if the detected Hash value is the value of File object. Displayed as "url" if it's a string of URLs
    resultNostring악성코드로 탐지된 경우에만 포함
    Has a value of "1" if the queried hash is detected. Has a value of "0" if not
    regDatetimeNolong악성코드로 탐지된 경우에만 포함
    Time the Hash value registered

    Examples

    Request examples

    curl -X GET "https://filesafer.apigw.ntruss.com/hashfilter/v1/checkHash?hashCode=f093e7767bb63ac973b697d3fd1d40a78b87b8bf&hashType=sha1"
       -H "accept: application/json"
       -H "x-ncp-apigw-api-key: {x-ncp-apigw-api-key}"
       -H "x-ncp-iam-access-key: {x-ncp-iam-access-key}"
       -H "x-ncp-apigw-timestamp: {x-ncp-apigw-timestamp}"
       -H "x-ncp-apigw-signature-v2: {x-ncp-apigw-signature-v2}"
    

    Response examples (if detected as malware)

    {
      "returnCode": "0",
      "returnMessage": "success",
      "totalRows": 1,
      "hashCheckResultList": [
        {
          "hashType": "sha1",
          "hashCode": "f093e7767bb63ac973b697d3fd1d40a78b87b8bf",
          "group": "file",
          "result": "1",
          "regDatetime": 1497409737000
        }
      ]
    }
    

    Response examples (if not detected as malware)

    {
      "returnCode": "0",
      "returnMessage": "success",
      "totalRows": 0,
      "hashCheckResultList": [
      ]
    }
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.