text
stringlengths
0
9.3M
# Copyright (C) 2016-2018 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import errno import hashlib import logging import os import shutil import tempfile from pathlib import PureWindowsPath from lib.cuckoo.common.config i...
# Copyright (C) 2020 King-Konsto # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in th...
# From doomedraven for GCP with love import logging import time from lib.cuckoo.common.config import Config try: from google.api_core.exceptions import Forbidden from google.cloud import compute_v1 HAVE_GCP = True except ImportError: # pip install --upgrade google-cloud-compute HAVE_GCP = False ...
import json import requests from lib.cuckoo.common.config import Config proxmox_conf = Config("proxmox") def proxmox_shutdown_vm(machineName: str): """ Shuts down a virtual machine on a Proxmox server. Args: machineName (str): The name of the virtual machine to shut down. Raises: ...
# Copyright (C) 2015 Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from ctypes import POINTER, Structure, byref, cast, create_string_buffer, pointer, sizeof, string_at from ctypes import c_ubyte as BYTE f...
import os import json import logging from lib.cuckoo.common.constants import CUCKOO_ROOT log = logging.getLogger(__name__) def createProcessTreeNode(process): """Creates a single ProcessTreeNode corresponding to a single node in the tree observed cuckoo. @param process: process from cuckoo dict. """ ...
# Copyright (C) 2010-2015 Cuckoo Foundation. # Copyright (C) 2012 JoseMi Holguin (@j0sm1) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """IRC Protocol""" import logging import re from io import BytesIO from lib.cuckoo.common.utils import c...
import glob import importlib import inspect import logging import os import pkgutil from pathlib import Path from lib.cuckoo.common.config import Config log = logging.getLogger(__name__) integrations_conf = Config("integrations") def ratdecodedr_load_decoders(path: str): """ Loads and returns a dictionary ...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import random import sys from lib.cuckoo.common.colors import color, yellow from lib.cuckoo.common.constants import CUCKOO_VERSION def logo(): "...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """Table for all hook logging statements. This table is not automatically generated at the moment, but kept up-to-date by hand. """ table = ( ("...
import json import os from collections import defaultdict from lib.cuckoo.common.abstracts import CUCKOO_ROOT ttpDict = {} ttps_map_file = os.path.join(CUCKOO_ROOT, "data", "mitre", "TTPs.json") if os.path.exists(ttps_map_file): try: ttpDict = json.loads(open(ttps_map_file, "r").read()) except Excepti...
import os from lib.cuckoo.common.constants import CUCKOO_ROOT try: import pwd HAVE_PWD = True except ImportError: HAVE_PWD = False _root = CUCKOO_ROOT def getuser() -> str: return pwd.getpwuid(os.getuid())[0] if HAVE_PWD else "" def cwd(*args, **kwargs): """Return absolute path to this file ...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import datetime import logging import struct try: import bson HAVE_BSON = True except ImportError: HAVE_BSON = False else: # The BSON...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import binascii import contextlib import copy import hashlib import logging import mmap import os import struct import subprocess from pathlib import P...
# Copyright (C) 2023 doomedraven from pathlib import Path, PureWindowsPath from lib.cuckoo.common.constants import ANALYSIS_BASE_PATH def path_to_ascii(path: bytes): return path.decode() if isinstance(path, bytes) else path def path_object(path: bytes): return Path(path_to_ascii(path)) def path_get_file...
import logging import shutil import subprocess import tempfile from pathlib import Path from utils.tls import tlslog_to_sslkeylogfile EDITCAP = "editcap" EDITCAP_TIMEOUT = 60 log = logging.getLogger(__name__) def append_file_contents_to_file(file_with_contents: Path, append_to_file: Path): """Append the conten...
# Copyright (C) 2015 KillerInstinct, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import contextlib import hashlib import logging import os import struct from binascii import crc32 from pathlib import Pa...
from data.safelist.domains import domain_passlist as DOMAINS_DENYLIST from data.safelist.replacepatterns import ( FILES_DENYLIST, FILES_ENDING_DENYLIST, MUTEX_DENYLIST, NORMALIZED_PATHS, REGISTRY_TRANSLATION, SANDBOX_USERNAMES, SERVICES_DENYLIST, ) def is_uri_valid(url): for domain in ...
# Copyright (C) 2015-2019 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os.path from lib.cuckoo.common.constants import CUCKOO_ROOT from lib.cuckoo.common.path_utils import path_exists, path_read_file domains = set...
# Copyright (C) 2016 Will Metcalf # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import glob import logging import os import random import shutil import tempfile import zipfile from contextlib import suppress from xml.dom.minidom import parse ...
# ============================================================================= # Helper function to prevent code duplication for generic scoring. # ============================================================================= def _calculate_generic_score(matched: list) -> float: """Calculates a generic score based...
import json import logging import socket import tempfile import threading from pathlib import Path from lib.cuckoo.common.path_utils import path_exists log = logging.getLogger("socket-aux") lock = threading.Lock() def send_socket_command(socket_path: str, command: str, *args, **kwargs): """ Sends a command ...
# Original Copyright: 2020, Andrew Blair Schenck # https://github.com/andrewschenck/paramiko-jump # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # A copy of the License is available at: # http://www.apache.org/licenses/LICENSE-2.0 ...
# Copyright (C) 2016-2017 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import ctypes class Structure(ctypes.Structure): def as_dict(self): ret = {} for field, _ in self._fields_: value = g...
#!/usr/bin/python # Copyright(C) 2012 Open Information Security Foundation # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 2 of the License. # # This program is distributed in the hope ...
import re suricata_passlist = ( "agenttesla", "medusahttp", "vjworm", ) suricata_blocklist = ( "abuse", "agent", "base64", "backdoor", "common", "confidence", "custom", "dropper", "downloader", "evil", "executable", "f-av", "fake", "family", "fil...
argsd = { "pcap-file": [ { "name": "filename", "required": 1, }, { "name": "output-dir", "required": 1, }, { "name": "tenant", "type": int, "required": 0, }, { "nam...
from contextlib import suppress from pathlib import Path import olefile from lib.cuckoo.common.config import Config from lib.cuckoo.common.integrations.parse_pe import HAVE_PEFILE, IsPEImage, PortableExecutable from lib.cuckoo.common.objects import File from lib.cuckoo.common.path_utils import path_write_file web_cf...
# encoding: utf-8 # Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com). # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import re # this is with some fixes https://github.com/kvesteri/validators/blob/master/valida...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import contextlib import errno import fcntl import logging import os import random import shutil import socket im...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. def DispositionDict(): return {1: "REG_CREATED_NEW_KEY", 2: "REG_OPENED_EXISTING_KEY"} def ClsContextDict(...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import lib.cuckoo.common.utils_dicts as utils_dicts def api_name_ntcreatesection_arg_name_desiredaccess(arg_val...
# Copyright (C) 2015 KillerInstinct, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from django.contrib.auth.models import User # admin utils def disable_user(user_id: int) -> bool: """ Disables ...
import hashlib import json import logging import os import re import sys import tempfile import threading import time from collections import OrderedDict from contextlib import suppress from datetime import datetime, timedelta from pathlib import Path from random import choice from typing import Dict, List, Optional i...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import collections import logging import os # from contextlib import suppress from typing import Any, Dict, Set from lib.cuckoo.common.config import C...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging import os from contextlib import suppress from lib.cuckoo.common.config import Config log = loggi...
import concurrent.futures import functools import hashlib import json import logging import os import re import shlex import shutil import signal import subprocess # from contextlib import suppress from typing import Any, DefaultDict, List, Optional, Set, Union import pebble from lib.cuckoo.common.config import Conf...
import contextlib import logging import mmap import os.path from pathlib import Path from lib.cuckoo.common.config import Config from lib.cuckoo.common.constants import CUCKOO_ROOT from lib.cuckoo.common.path_utils import path_exists integrations_conf = Config("integrations") HAVE_FLOSS = False try: import floss...
import base64 import json import logging import requests from urllib3.exceptions import InsecureRequestWarning from lib.cuckoo.common.config import Config from lib.cuckoo.common.objects import File from lib.cuckoo.common.path_utils import path_exists from lib.cuckoo.common.utils import add_family_detection requests....
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging import os from lib.cuckoo.common.constants import CUCKOO_ROOT log = logging.getLogger("mitre") def mitre_generate_attck(results, mit...
# OneNoteExtractor # Copyright (C) 2023 Volexity, Inc. """Quick extractor for OneNote files, allowing for programmatic extraction of subfiles.""" import json import logging import re import struct # builtins from datetime import datetime, timedelta from typing import Iterator EMBEDDED_FILE_MAGIC = b"\xe7\x16\xe3\xb...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging import subprocess from typing import Any, Dict, List from lib.cuckoo.common.path_utils import pat...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from typing import Any, Dict, List from lib.cuckoo.common.utils import convert_to_printable try: from elfto...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import base64 import logging import struct from pathlib import Path from typing import Dict log = logging.getLog...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging import zlib from typing import Dict, List try: import olefile HAVE_OLEFILE = True except...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import contextlib import logging from pathlib import Path from subprocess import PIPE, Popen from typing import A...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import ctypes import logging import struct from typing import Any, Dict, Tuple from lib.cuckoo.common.structures...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import contextlib import hashlib import logging import os import xml.dom.minidom import zipfile from typing impor...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import json import logging from typing import Any, Dict from lib.cuckoo.common.integrations.pdfminer import pdfm...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import array import base64 import binascii import hashlib import itertools import json import logging import math...
import argparse import base64 import datetime import json import logging import sys from contextlib import suppress from hashlib import sha1, sha256 from struct import unpack MISSED_DEPS = False try: import mscerts from asn1crypto import pem, x509 from certvalidator import CertificateValidator, ValidationC...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import json import logging from datetime import datetime from typing import List try: import re2 as re excep...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from pathlib import Path from typing import List from lib.cuckoo.common.integrations.parse_encoded_script import...
import logging from typing import Any, Dict, Iterable, Set, Union try: from pdfminer import pdfdocument, pdfparser, pdftypes HAVE_PDFMINER = True except ImportError: HAVE_PDFMINER = False log = logging.getLogger(__name__) def _search_for_url(obj: Union[dict, list]) -> Iterable[str]: if obj is None:...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import contextlib import logging from typing import Any, Dict from lib.cuckoo.common.utils import convert_to_pri...
""" PyInstaller Extractor v2.0 (Supports pyinstaller 6.11.1, 6.11.0, 6.10.0, 6.9.0, 6.8.0, 6.7.0, 6.6.0, 6.5.0, 6.4.0, 6.3.0, 6.2.0, 6.1.0, 6.0.0, 5.13.2, 5.13.1, 5.13.0, 5.12.0, 5.11.0, 5.10.1, 5.10.0, 5.9.0, 5.8.0, 5.7.0, 5.6.2, 5.6.1, 5.6, 5.5, 5.4.1, 5.4, 5.3, 5.2, 5.1, 5.0.1, 5.0, 4.10, 4.9, 4.8, 4.7, 4.6, 4.5.1, ...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging from pathlib import Path from lib.cuckoo.common.config import Config from lib.cuckoo.common.utils...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. # Credits to @MalwareCantFly # Code taken from https://github.com/MalwareCantFly/Vba2Graph import errno import logging import os import sys from io imp...
# Copyright (C) 2010-2015 Cuckoo Foundation, KillerInstinct # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import binascii import contextlib import string from base64 import b64decode from itertools import chain, repeat from typing import Call...
#!/usr/bin/env python3 __description__ = "Decode an encoded VBScript, often seen as a .vbe file" __author__ = "John Hammond" __date__ = "02/10/2021" """ Credit for this baseline code goes to Didier Stevens, from his original repo. https://github.com/DidierStevens/DidierStevensSuite/blob/master/decode-vbe.py All I ha...
# Copyright (C) 2010-2015 Cuckoo Foundation, Optiv, Inc. (brad.spengler@optiv.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import base64 import logging import operator from collections import defaultdict from http import HTTPStatus imp...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging import os from lib.cuckoo.common.config import Config from lib.cuckoo.common.constants import CUCKOO_ROOT from lib.cuckoo.common.object...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
import logging import os from lib.cuckoo.common.integrations.file_extra_info_modules import ( ExtractorReturnType, collect_extracted_filenames, extractor_ctx, time_tracker, ) from lib.cuckoo.common.path_utils import path_write_file # from base64 import b64encode log = logging.getLogger(__name__) @...
import logging from lib.cuckoo.common.integrations.file_extra_info_modules import ( ExtractorReturnType, collect_extracted_filenames, extractor_ctx, time_tracker, ) from lib.cuckoo.common.integrations.pyinstxtractor import PyInstArchive log = logging.getLogger(__name__) @time_tracker def extract_det...
import contextlib import functools import logging import os import shlex import subprocess import tempfile import timeit from typing import List, Optional, TypedDict from lib.cuckoo.common.path_utils import path_mkdir, path_object log = logging.getLogger(__name__) class SuccessfulExtractionReturnType(TypedDict, tot...
import contextlib import functools import logging import os import queue import shutil import threading from typing import Any, Callable, Generator, MutableMapping, Optional, Tuple from lib.cuckoo.common.cleaners_utils import free_space_monitor from lib.cuckoo.common.config import Config from lib.cuckoo.common.constan...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. # https://blog.miguelgrinberg.com/post/what-s-new-in-sqlalchemy-2-0 # https://docs.sqlalchemy.org/en/20/changelog/migration_20.html# import hashlib im...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. # https://github.com/cuckoosandbox/cuckoo/blob/master/cuckoo/core/guest.py import datetime import glob import json import logging import ntpath import ...
# Copyright (C) 2016-2019 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import copy import json import logging import logging.handlers import os import threading import time import gevent.thread from lib.cuckoo.common.col...
import logging import threading import time from time import monotonic as _time from typing import Optional, Union from lib.cuckoo.common.abstracts import Machinery from lib.cuckoo.common.config import Config from lib.cuckoo.common.exceptions import CuckooCriticalError, CuckooMachineError from lib.cuckoo.core.database...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import inspect import json import logging import os import pkgutil import sys import timeit from collections import defaultdict from contextlib import ...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import errno import json import logging import os import socket import struct from contextlib import suppress from threading import Lock, Thread HAVE_...
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging from contextlib import suppress from lib.cuckoo.common.config import Config from lib.cucko...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import contextlib import enum import logging import os import queue import signal import sys import threading import time from collections import defau...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import copy import getpass as gt import grp import logging import logging.handlers import os import platform import socket import subprocess import sys...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
import io import logging import pyzipper import requests from lib.cuckoo.common.config import Config integrations_cfg = Config("integrations") log = logging.getLogger(__name__) _bazaar_map = { 32: "md5_hash", 40: "sha1_hash", 64: "sha256_hash", } def is_supported(hash: str, apikey: str = "") -> bool: ...
import logging import requests from lib.cuckoo.common.config import Config integrations_cfg = Config("integrations") log = logging.getLogger(__name__) def is_supported(hash: str, apikey: str) -> bool: """ Checks if the hash is supported by the VirusTotal service. Args: hash (str): The hash to ...
import logging import os from lib.cuckoo.common.config import Config from lib.cuckoo.common.constants import CUCKOO_ROOT from lib.cuckoo.common.load_extra_modules import load_downloaders from lib.cuckoo.common.path_utils import path_exists, path_mkdir cfg = Config() integrations_cfg = Config("integrations") log = lo...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
import logging import os import subprocess from urllib.parse import urlparse from lib.cuckoo.common.config import Config HAVE_AZURE = False cfg = Config() if cfg.cuckoo.machinery == "az": try: from azure.core.exceptions import AzureError from azure.identity import ClientSecretCredential fr...
# Copyright (C) 2024 davidsb@virustotal.com # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. # This module runs mitmdump to get a HAR file # mitmdump is behind mitmproxy project https://mitmproxy.org/ # NOTE /opt/mitmproxy/mitmdump_wrapper.sh #...
import json import logging import os import socket import subprocess import re from contextlib import closing from threading import Thread from lib.cuckoo.common.abstracts import Auxiliary from lib.cuckoo.common.config import Config from lib.cuckoo.common.constants import CUCKOO_ROOT from lib.cuckoo.core.rooter impor...
# Copyright (C) 2024 dsecuma # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. # This module uses some of the functions of the Windows auxiliary module # for comparing screenshots. import logging import math import os import time from io import B...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import functools import getpass import logging import os import signal import subprocess from stat import S_ISUID from lib.cuckoo.common.abstracts imp...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission.
import logging import sys import time from lib.cuckoo.common.config import Config from lib.cuckoo.core.database import Machine cfg = Config() HAVE_BOTO3 = False if cfg.cuckoo.machinery == "aws": try: import boto3 HAVE_BOTO3 = True except ImportError: sys.exit("Missed boto3 dependency:...
# Originally contributed by Check Point Software Technologies, Ltd. # in https://github.com/CheckPointSW/Cuckoo-AWS. # Modified by the Canadian Centre for Cyber Security to support Azure. import logging import re import socket import threading import time import timeit from typing import Optional, cast import sqlalch...
# Copyright (C) 2010-2015 Cuckoo Foundation. # Copyright (C) 2013 Christopher Schmitt <cschmitt@tankbusta.net> # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import libvirt from lib.cuckoo.common.abstracts import LibVirtMachinery from lib.cuc...
import logging from lib.cuckoo.common.config import Config from typing import List cfg = Config() HAVE_GCP = False if cfg.cuckoo.machinery == "gcp": try: from google.cloud import compute_v1 from google.oauth2 import service_account from google.auth import compute_engine HAVE_GCP =...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import xml.etree.ElementTree as ET from lib.cuckoo.common.abstracts import LibVirtMachinery from lib.cuckoo.common.exceptions import CuckooMachineErro...
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2019-2019 Christophe Vandeplas. # Copyright (C) 2014-2019 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """ Pseudo-machinery for using multiple machinery. """ im...
# Copyright (C) 2012-2014 The MITRE Corporation. # Copyright (C) 2015-2018 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import json import logging import socket import struct import sys from time import sleep import reque...
# Copyright (C) 2017 Menlo Security # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import logging import sys import time from lib.cuckoo.common.abstracts import Machinery from lib.cuckoo.common.config import Config from lib.cuckoo.common.exce...
# Copyright (C) 2015-2017 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. # https://qemu.readthedocs.io/en/latest/ import logging import os import os.path import subprocess import time import magic from lib.cuckoo.common.a...