Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4da3321
Fix syscall tracer plugin
zacogen Oct 27, 2024
3cbdcb4
Fix apicall tracer plugin
zacogen Nov 4, 2024
d243445
feat: cmake build fixes and proper while-building-link to libosi
Nov 21, 2024
100b3c9
fix: tagging panda v1.8.54
Nov 21, 2024
f87edd2
Merge branch 'single-build-fixes' into fix-tracer-plugins
Swashbuckler1 Nov 22, 2024
e2e323c
Merge branch 'master' into fix-tracer-plugins
zacogen Dec 24, 2024
fea00e7
Merge branch 'fix-tracer-plugins' of https://github.com/panda-re/pand…
Swashbuckler1 Jan 2, 2025
c755127
Merge branch 'master' into fix-tracer-plugins
zacogen Jan 6, 2025
98fefef
Merge branch 'fix-tracer-plugins' of https://github.com/panda-re/pand…
Swashbuckler1 Jan 13, 2025
4f651a1
Fix process introspection
zacogen Feb 4, 2025
bb58d4c
Update memory regions
zacogen Feb 4, 2025
4e01ac5
Update bbstats
zacogen Feb 5, 2025
0db696b
Merge branch 'fix-tracer-plugins' of https://github.com/panda-re/pand…
Swashbuckler1 Feb 5, 2025
6eba8a1
Commiting initial files
Swashbuckler1 Mar 4, 2025
3260937
Saving
Swashbuckler1 Mar 11, 2025
ca60a02
added callstack_instr stuff
Swashbuckler1 Apr 30, 2025
16b814a
Port most up to date libosi
Swashbuckler1 Apr 30, 2025
6710923
benchmarking syslog syscall detection/extraction
Swashbuckler1 Jul 11, 2025
5adf61e
Added example recordings
Swashbuckler1 Jul 11, 2025
0c67a83
Merged master and resolving conflicts
Swashbuckler1 Jul 14, 2025
e72b19f
Symbols/hooks code
Swashbuckler1 Jul 27, 2025
ac5f13a
Parsing pc
Swashbuckler1 Aug 5, 2025
8d4c8d4
Switched symbol name back to syslog
Swashbuckler1 Aug 6, 2025
9314f1c
memory snapshots
Swashbuckler1 Sep 15, 2025
37d40d1
evtxtract mods
Swashbuckler1 Apr 6, 2026
f7d8567
Proper parsing and exception handling
Swashbuckler1 Apr 8, 2026
0fb95b7
avro fix
Swashbuckler1 Apr 8, 2026
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
1 change: 1 addition & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,5 @@ add_subdirectory(callstack)
add_subdirectory(apicall_tracer)
add_subdirectory(memory_regions)
add_subdirectory(pmemdump)
add_subdirectory(logging_events)
#add_subdirectory(volatility)
4 changes: 2 additions & 2 deletions plugins/apicall_tracer/apicall_tracer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,10 @@ void uninit_plugin(void* self)
if (!g_initialized) {
// create output file
std::fstream results;
results.open(g_database_path,
results.open(g_database_path,
std::fstream::in | std::fstream::out | std::fstream::trunc);
results.close();
throw std::runtime_error(
"panda introspection never initialized. Corrupted recording?");
"panda introspection never initialized. Corrupted recording?");
}
}
41 changes: 41 additions & 0 deletions plugins/logging_events/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
set(PANDA_PLUGIN_NAME "logging_events")
set(PLUGIN_TARGET "panda_${PANDA_PLUGIN_NAME}")

# The logging events plugin requires linking against python
find_package(PythonLibs 3.8 REQUIRED)
if (NOT PYTHONLIBS_FOUND)
message(FATAL_ERROR "Could not find python libraries. Is python-dev installed?")
endif()
include_directories(${PYTHON_INCLUDE_DIRS})

# Set flags, build, and link the actual plugin
add_definitions(-DNEED_CPU_H)
include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11")
set(LINK_LIBS ${PYTHON_LIBRARIES} -lavro liboffset libiohal libosi)
set(SRC_FILES ${PANDA_PLUGIN_NAME}_new.cpp ../volatility/filter.cc)


set(LINK_LIBS_I386 ${LINK_LIBS} panda_ipanda-i386 panda_callstack-i386)
set(LINK_LIBS_X86_64 ${LINK_LIBS} panda_ipanda-x86_64 panda_callstack-x86_64)

set(TARGET_DEPS_I386 panda_ipanda-i386)
set(TARGET_DEPS_X86_64 panda_ipanda-x86_64)

add_custom_command(OUTPUT ${PANDA_PLUGIN_DIR_I386}/evtxglue.py
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/evtxglue.py ${PANDA_PLUGIN_DIR_I386}/evtxglue.py
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/evtxglue.py)
add_custom_command(OUTPUT ${PANDA_PLUGIN_DIR_X86_64}/evtxglue.py
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/evtxglue.py ${PANDA_PLUGIN_DIR_X86_64}/evtxglue.py
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/evtxglue.py)
add_custom_target(evtxglue-script ALL
DEPENDS ${PANDA_PLUGIN_DIR_I386}/evtxglue.py ${PANDA_PLUGIN_DIR_X86_64}/evtxglue.py)

add_i386_plugin(${PLUGIN_TARGET} SRC_FILES LINK_LIBS_I386)
add_x86_64_plugin(${PLUGIN_TARGET} SRC_FILES LINK_LIBS_X86_64)

add_dependencies(${PLUGIN_TARGET}-i386 ${TARGET_DEPS_I386})
add_dependencies(${PLUGIN_TARGET}-x86_64 ${TARGET_DEPS_X86_64})

install(FILES ${PANDA_PLUGIN_DIR_I386}/evtxglue.py DESTINATION lib/panda/i386)
install(FILES ${PANDA_PLUGIN_DIR_X86_64}/evtxglue.py DESTINATION lib/panda/x86_64)
Empty file added plugins/logging_events/Makefile
Empty file.
27 changes: 27 additions & 0 deletions plugins/logging_events/evtxglue.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import evtxtract, json, traceback
from collections import defaultdict

def run(imagename):
with open(imagename, 'rb') as f:
buf = f.read()
offsets = evtxtract.carvers.find_evtx_records(buf)

analysis_results = defaultdict(list)
for offset in offsets:
try:
record = evtxtract.carvers.extract_record(buf, offset)
analysis_results[record.substitutions[14][1]].append(str(record))
records.append(record)
except Exception:
continue

json_str = json.dumps(analysis_results, indent=1)
return json_str

if __name__ == "__main__":
import argparse

parser = argparse.ArgumentParser(description="Test analysis")
parser.add_argument("--image_name", default="../volatility/mymem.dd")
args = parser.parse_args()
print(run(args.image_name))
Binary file added plugins/logging_events/log_lib-rr-nondet.log
Binary file not shown.
Binary file added plugins/logging_events/log_lib-rr-snp
Binary file not shown.
Loading