mirror of
https://github.com/mandiant/capa.git
synced 2025-12-12 15:49:46 -08:00
2
.github/pyinstaller/hooks/hook-vivisect.py
vendored
2
.github/pyinstaller/hooks/hook-vivisect.py
vendored
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
from PyInstaller.utils.hooks import copy_metadata
|
||||
|
||||
# in order for viv-utils to use pkg_resources to fetch
|
||||
|
||||
1
.github/pyinstaller/pyinstaller.spec
vendored
1
.github/pyinstaller/pyinstaller.spec
vendored
@@ -1,4 +1,5 @@
|
||||
# -*- mode: python -*-
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
import os.path
|
||||
import subprocess
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import re
|
||||
import sys
|
||||
import copy
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import sys
|
||||
import codecs
|
||||
import logging
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
from capa.features import Feature
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import abc
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import sys
|
||||
import builtins
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import sys
|
||||
import types
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import sys
|
||||
import string
|
||||
import struct
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import struct
|
||||
|
||||
import idc
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import idaapi
|
||||
import idautils
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import sys
|
||||
import string
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import idc
|
||||
import idaapi
|
||||
import idautils
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
from networkx import nx
|
||||
from networkx.algorithms.components import strongly_connected_components
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2017 FireEye, Inc. All Rights Reserved.
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
#
|
||||
# strings code from FLOSS, https://github.com/fireeye/flare-floss
|
||||
#
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import types
|
||||
|
||||
import viv_utils
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import string
|
||||
import struct
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import PE.carve as pe_carve # vivisect PE
|
||||
|
||||
import capa.features.extractors.strings
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import vivisect.const
|
||||
|
||||
from capa.features import Characteristic
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import collections
|
||||
|
||||
import envi
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import envi.memory
|
||||
import vivisect.const
|
||||
import envi.archs.i386.disasm
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
from capa.features import Feature
|
||||
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ json format:
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
"""
|
||||
import json
|
||||
import zlib
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
from capa.features import Feature
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import os
|
||||
|
||||
_hex = hex
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import sys
|
||||
import codecs
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
from collections import deque
|
||||
|
||||
import idc
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
from PyQt5 import QtCore
|
||||
|
||||
from capa.ida.explorer.model import CapaExplorerDataModel
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import idc
|
||||
import idaapi
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import logging
|
||||
import datetime
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import os
|
||||
import logging
|
||||
import collections
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import os
|
||||
import logging
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env python2
|
||||
"""
|
||||
identify capabilities in programs.
|
||||
|
||||
Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import json
|
||||
|
||||
import six
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import collections
|
||||
|
||||
import six
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import six
|
||||
import termcolor
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ example::
|
||||
0x10003a13
|
||||
0x10003415
|
||||
0x10003797
|
||||
|
||||
Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
"""
|
||||
import tabulate
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import collections
|
||||
|
||||
import tabulate
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import uuid
|
||||
import codecs
|
||||
import logging
|
||||
|
||||
@@ -5,6 +5,8 @@ Use the -i flag to update the rule in-place.
|
||||
Usage:
|
||||
|
||||
$ python capafmt.py -i foo.yml
|
||||
|
||||
Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
"""
|
||||
import sys
|
||||
import logging
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
# doesn't matter if this gets repeated later on in a hooks file
|
||||
|
||||
# Use a console with emojis support for a better experience
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
# doesn't matter if this gets repeated later on in a hooks file
|
||||
|
||||
# Use a console with emojis support for a better experience
|
||||
|
||||
@@ -19,6 +19,8 @@ and then select the existing capa report from the file system.
|
||||
|
||||
This script will verify that the report matches the workspace.
|
||||
Check the output window for any errors, and/or the summary of changes.
|
||||
|
||||
Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
|
||||
@@ -4,6 +4,8 @@ Check the given capa rules for style issues.
|
||||
Usage:
|
||||
|
||||
$ python scripts/lint.py rules/
|
||||
|
||||
Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -5,6 +5,8 @@ migrate rules and their namespaces.
|
||||
example:
|
||||
|
||||
$ python scripts/migrate-rules.py migration.csv ./rules ./new-rules
|
||||
|
||||
Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
"""
|
||||
import os
|
||||
import csv
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ Example::
|
||||
- set socket configuration
|
||||
- connect TCP socket
|
||||
...
|
||||
|
||||
Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
|
||||
@@ -55,6 +55,8 @@ Example::
|
||||
insn: 0x10001027: number(0x1)
|
||||
insn: 0x10001027: mnemonic(shl)
|
||||
...
|
||||
|
||||
Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
"""
|
||||
import sys
|
||||
import logging
|
||||
|
||||
2
setup.py
2
setup.py
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import collections
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import textwrap
|
||||
|
||||
import capa.rules
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import textwrap
|
||||
|
||||
import capa.rules
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import textwrap
|
||||
|
||||
import capa.main
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import codecs
|
||||
|
||||
from capa.features.extractors import helpers
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import textwrap
|
||||
|
||||
import capa.main
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import textwrap
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved.
|
||||
|
||||
import viv_utils
|
||||
|
||||
import capa.features
|
||||
|
||||
Reference in New Issue
Block a user