This commit is contained in:
mr-tz
2024-06-19 15:12:52 +00:00
parent 740c739356
commit 0c9d3d09af
3 changed files with 5 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ from capa.helpers import assert_never
from capa.features.insn import API, Number
from capa.features.common import String, Feature
from capa.features.address import Address
from capa.features.extractors.vmray.models import Analysis, FunctionCall
from capa.features.extractors.vmray.models import Analysis
from capa.features.extractors.base_extractor import CallHandle, ThreadHandle, ProcessHandle
logger = logging.getLogger(__name__)

View File

@@ -99,7 +99,7 @@ class VMRayExtractor(DynamicFeatureExtractor):
flog_xml = zipfile.read("logs/flog.xml", pwd=b"infected")
flog = Analysis.from_xml(flog_xml)
# debug(flog)
debug(flog.processes[1])
pprint(flog.processes[0])
return cls(VMRayAnalysis(sv2, flog))
@@ -108,5 +108,6 @@ class VMRayExtractor(DynamicFeatureExtractor):
if __name__ == "__main__":
# TODO(mr): for testing, removeme
import sys
input_path = Path(sys.argv[1])
VMRayExtractor.from_zipfile(input_path)

View File

@@ -6,9 +6,9 @@
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.
from typing import Any, Dict, List, Union, Literal, Optional
from typing import Dict, List, Optional
from pydantic import Field, BaseModel
from pydantic import BaseModel
from pydantic_xml import BaseXmlModel, attr, element