checkHash (Hash Filter)
- Print
- PDF
checkHash (Hash Filter)
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
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
Method | Request URI |
---|---|
GET | https://filesafer.apigw.ntruss.com/hashfilter/v1/checkHash |
Request headers
Header name | Description |
---|---|
x-ncp-apigw-timestamp | Time 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-key | Key issued from API Gateway |
x-ncp-iam-access-key | The API key issued from NAVER Cloud Platform or AccessKey issued from IAM |
x-ncp-apigw-signature-v2 | A signature that encrypts the request path and header with a SecretKey mapped to an AccessKey HmacSHA256 is used as the HMAC encryption algorithm |
accept | Indicate jsonapplication/json |
Request parameters
Parameter name | Required | Type | Description |
---|---|---|---|
hashCode | Yes | string | Hash value to view |
hashType | Yes | string | Algorithm type value with an extracted Hash to view and supports md5, sha1sha1 or md5 |
Responses
Response bodies
Field name | Required | Type | Description |
---|---|---|---|
returnCode | Yes | string | Processing result code for requests |
returnMessage | Yes | string | Processing result message for requests |
totalRows | Yes | int | Number of objects of hashCheckResultList |
hashCheckResultList | Yes | List | - Information on detections of the queried hash When there's an object in list: 악성코드 When there's no object in list: 정상 |
hashType | No | string | 악성코드로 탐지된 경우에만 포함 Algorithm type of hashcode and supports MD5, SHA-1 |
hashCode | No | string | 악성코드로 탐지된 경우에만 포함 Detected Hash value |
group | No | String | 악성코드로 탐지된 경우에만 포함 Displayed as "file" if the detected Hash value is the value of File object. Displayed as "url" if it's a string of URLs |
result | No | string | 악성코드로 탐지된 경우에만 포함 Has a value of "1" if the queried hash is detected. Has a value of "0" if not |
regDatetime | No | long | 악성코드로 탐지된 경우에만 포함 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?