Skip to content

Commit

Permalink
Adds ELF parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
daschwanden committed Nov 28, 2024
1 parent 2ae3c93 commit 9d157c7
Show file tree
Hide file tree
Showing 8 changed files with 514 additions and 0 deletions.
Binary file added test_data/elf-3.tgz
Binary file not shown.
5 changes: 5 additions & 0 deletions turbinia/config/turbinia_config_tmpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@
'programs': ['de.py'],
'docker_image': None,
'timeout': 1200
}, {
'job': 'ElfAnalysisJob',
'programs': ['grep'],
'docker_image': None,
'timeout': 3600
}, {
'job': 'FileArtifactExtractionJob',
'programs': ['image_export'],
Expand Down
5 changes: 5 additions & 0 deletions turbinia/evidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,6 +1201,11 @@ class BinaryExtraction(CompressedDirectory):
pass


class ElfExtraction(CompressedDirectory):
"""ELF details extracted from evidence."""
pass


class MachoExtraction(CompressedDirectory):
"""Mach-O details extracted from evidence."""
pass
Expand Down
1 change: 1 addition & 0 deletions turbinia/jobs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from turbinia.jobs import containerd
from turbinia.jobs import dfdewey
from turbinia.jobs import docker
from turbinia.jobs import elf
from turbinia.jobs import file_system_timeline
from turbinia.jobs import finalize_request
from turbinia.jobs import fsstat
Expand Down
31 changes: 31 additions & 0 deletions turbinia/jobs/elf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
"""Job to execute elf analysis task."""

from turbinia.evidence import ElfExtraction
from turbinia.evidence import Directory
from turbinia.evidence import RawDisk
from turbinia.evidence import ReportText
from turbinia.jobs import interface
from turbinia.jobs import manager
from turbinia.workers.analysis import elf


class ElfAnalysisJob(interface.TurbiniaJob):
"""ELF analysis job."""

evidence_input = [ElfExtraction]
evidence_output = [ReportText]

NAME = 'ElfAnalysisJob'

def create_tasks(self, evidence):
"""Create task.
Args:
evidence: List of evidence objects to process
Returns:
A list of tasks to schedule.
"""
tasks = [elf.ElfAnalysisTask() for _ in evidence]
return tasks


manager.JobsManager.RegisterJob(ElfAnalysisJob)
2 changes: 2 additions & 0 deletions turbinia/task_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class TaskLoader():
'ChromeCredsAnalysisTask',
'DfdeweyTask',
'DockerContainersEnumerationTask',
'ElfAnalysisTask',
'FileArtifactExtractionTask',
'FileSystemTimelineTask',
'FinalizeRequestTask',
Expand Down Expand Up @@ -103,6 +104,7 @@ def get_task(self, task_name):
# Late imports to minimize what loads all Tasks
from turbinia.workers.abort import AbortTask
from turbinia.workers.analysis.chromecreds import ChromeCredsAnalysisTask
from turbinia.workers.analysis.elf import ElfAnalysisTask
from turbinia.workers.analysis.jenkins import JenkinsAnalysisTask
from turbinia.workers.analysis.jupyter import JupyterAnalysisTask
from turbinia.workers.analysis.linux_acct import LinuxAccountAnalysisTask
Expand Down
Loading

0 comments on commit 9d157c7

Please sign in to comment.