LocCheck is a tool for simplifying the process of researching file hashes, IP addresses, and other indicators of compromise (IOCs).
Features
- Look up hashes across multiple threat intelligence services, from a single command or a few lines of Python.
- Currenty supports the following services:
- Planned support:
Quickstart
pip install ioccheck
You can also run the code directly
git clone https://github.com/ranguli/ioccheck && cd ioccheck
poetry install
Usage
β ioccheck 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f
Checking hash 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f.
[] Hashing algorithm: SHA256 [] VirusTotal URL:
https://virustotal.com/gui/file/275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f/
[] VirusTotal detections: 61 engines (81%) detected this file. ββββββββββββββββ€βββββββββββββ€ββββββββββββββββββββββββββββββββ β Antivirus β Detected β Result β ββββββββββββββββͺβββββββββββββͺββββββββββββββββββββββββββββββββ‘ β Malwarebytes β No β β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β Avast β Yes β EICAR Test-NOT virus!!! β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β ClamAV β Yes β Win.Test.EICAR_HDB-1 β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β Kaspersky β Yes β EICAR-Test-File β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β BitDefender β Yes β EICAR-Test-File (not a virus) β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β Paloalto β No β β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β TrendMicro β Yes β Eicar_test_file β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β FireEye β Yes β EICAR-Test-File (not a virus) β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β Sophos β Yes β EICAR-AV-Test β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β Microsoft β Yes β Virus:DOS/EICAR_Test_File β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β McAfee β Yes β EICAR test file β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β Fortinet β Yes β EICAR_TEST_FILE β ββββββββββββββββΌβββββββββββββΌββββββββββββββββββββββββββββββββ€ β AVG β Yes β EICAR Test-NOT virus!!! β ββββββββββββββββ§βββββββββββββ§ββββββββββββββββββββββββββββββββ [*]VirusTotal reputation:
3392
Using the API
Creating a hash
>>>from ioccheck import Hash
>>>from ioccheck.services import VirusTotal
>>>eicar = Hash(“275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f”)
>>> #what kind of hash is this?
>>>print(eicar.hash_type)
SHA256
Looking up a hash
>>> # With no arguments, check() tries all supported services. API keys grabbed from ~/.ioccheck by default.
>>>eicar.check()
>>> #Alternatively:
>>>eicar.check(services=VirusTotal, config_path=/foo/bar/.ioccheck)
Researching a hash
>>>Check the VirusTotal report to see if Sophos detects our hash
>>>eicar.reports.virustotal.get_detections(engines=[“Sophos”])
{‘Sophos’: {‘category’: ‘malicious’, ‘engine_name’: ‘Sophos’, ‘engine_version’: ‘1.0.2.0’, ‘result’: ‘EICAR-AV-Test’, ‘method’: ‘blacklist’, ‘engine_update’: ‘20210314’}}
>>> #What is this hash known as?
>>> print(eicar.reports.virustotal.name)
‘eicar.com-2224’
>>> # How many AV engines are detecting this hash?
>>> eicar.reports.virustotal.detection_count
60
>>> # Just show me the VirusTotal API response!
>>> eicar.reports.virustotal.api_response
<vt.object.Object file 275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f>




.webp)
.png)

