Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add signature network/check_against_urlhaus.py #459

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions modules/signatures/network/check_against_urlhaus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# This signature was contributed by Clevero (Marcel Caspar) - https://sittig.de
# See the file 'docs/LICENSE' for copying permission.

from lib.cuckoo.common.abstracts import Signature

class URLhaus(Signature):
name = "check_domains_against_URLhaus"
description = "Tries to contact a domain that was listed at URLhaus"
severity = 5
categories = ["dns"]
authors = ["Marcel Caspar, Sittig Technologies GmbH"]
minimum = "2.0"

def on_complete(self):
filepath = '/var/lib/peekaboo/urlhaus.txt'
with open(filepath) as fp:
line = fp.readline()
while line:
for match in self.check_domain(pattern=line.strip(), regex=True, all=True):
self.mark_ioc("domain", line.strip())
self.severity += 1
line = fp.readline()

return self.has_marks()