Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f1d4404
Benchmarking code
Swashbuckler1 Jan 16, 2026
a5f1950
Commented breakpoints
Swashbuckler1 Jan 16, 2026
0ffc8d3
Explained location of import
Swashbuckler1 Jan 16, 2026
b135e20
Matched driver with service
Swashbuckler1 Feb 5, 2026
46856b0
Refactored for panda code
Swashbuckler1 Feb 9, 2026
bcd3717
Dump memory of each translation block and analyze that
Swashbuckler1 Mar 17, 2026
7cf53f6
Handled unreadable values for socket
Swashbuckler1 Mar 17, 2026
ffc1a2f
Properly sourced venv
Swashbuckler1 Mar 18, 2026
e159bcd
Filter code
Swashbuckler1 Apr 1, 2026
0275c0c
Socket exists check
Swashbuckler1 Apr 1, 2026
107d1a8
dump_memory_tb
Swashbuckler1 Apr 8, 2026
b6e6052
Implemented PandaFileHandler
Swashbuckler1 Apr 12, 2026
e75e1b7
Debug information
Swashbuckler1 Apr 13, 2026
b6e071e
Switched to file://tmp/panda.panda
Swashbuckler1 Apr 13, 2026
a7b4a0f
Switched analysis point
Swashbuckler1 Apr 13, 2026
a296c80
Debug code
Swashbuckler1 Apr 16, 2026
801e8d4
Got hashing working
Swashbuckler1 Apr 24, 2026
8cfba8c
Working pipeline with good output but exceptions
Swashbuckler1 Apr 24, 2026
0c3a435
Removed debug code and rearranged
Swashbuckler1 Apr 24, 2026
f3ee206
Moved code into volglue.py and updated necessary files
Swashbuckler1 Apr 24, 2026
0ab22a8
Removed volglue3.py
Swashbuckler1 Apr 24, 2026
cfde17c
Add code to remove tempfiles after being dumped
Swashbuckler1 Apr 30, 2026
1add716
Edits for volatility3 refactor
Swashbuckler1 May 1, 2026
c39554a
fixed typos
Swashbuckler1 May 1, 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
2 changes: 1 addition & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ add_subdirectory(callstack)
add_subdirectory(apicall_tracer)
add_subdirectory(memory_regions)
add_subdirectory(pmemdump)
#add_subdirectory(volatility)
add_subdirectory(volatility)
2 changes: 1 addition & 1 deletion plugins/volatility/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set(PANDA_PLUGIN_NAME "volatility")
set(PLUGIN_TARGET "panda_${PANDA_PLUGIN_NAME}")

# The volatility plugin requires linking against python
find_package(PythonLibs 2.7 REQUIRED)
find_package(PythonLibs 3.8 REQUIRED)
if (NOT PYTHONLIBS_FOUND)
message(FATAL_ERROR "Could not find python libraries. Is python-dev installed?")
endif()
Expand Down
8 changes: 4 additions & 4 deletions plugins/volatility/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ either co-located with the plugin library. Results are stored as an `avro` recor

This plugin takes in a PANDA recording and outputs an avro record file,`volatility.panda` containing a list of processes information (process hashes, socket information, etc)

* A sample filter inupt file is require, it can be crafted as follows:
* A sample filter input file is required, it can be crafted as follows:
```
{
"threads": [
"thread_whitelist": [
[
pid,
tid1,
Expand All @@ -30,10 +30,10 @@ This plugin takes in a PANDA recording and outputs an avro record file,`volatili
## Usage

### Running manually
`volatility` plugin takes two arguments, `-os`, which asks for the type of operating system that the recording is used, and `--panda-arg filter=FILE.txt` to pass in the filter file to plugin. An example invocation: (NOTE: you need to have `RECORDING-rr-nondet.log`, `RECORDING-rr-snp`, and `filter.txt` in the path)
`volatility` plugin takes two arguments, `-os`, which asks for the type of operating system that the recording is used, and `--panda-arg filter:file=filter.json` to pass in the filter file to plugin. An example invocation:

```bash
panda-system-i386 -m 2048 -replay /path/to/RECORDING -panda 'volatility' -os windows-32-7sp1 --panda-arg filter:file=filter.txt
panda-system-i386 -m 2048 -replay /path/to/RECORDING -panda 'volatility' -os windows-32-7sp1 --panda-arg filter:file=filter.json
```

* To view the result avro record, we can use `jq` (a command line JSON processor for better visualization)
Expand Down
2 changes: 1 addition & 1 deletion plugins/volatility/filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ InstrumentationFilter::InstrumentationFilter(const char* filter_file)
filter_document.ParseStream(is);

// threads (pid, tid, asid)
rapidjson::Value::ConstMemberIterator itr = filter_document.FindMember("threads");
rapidjson::Value::ConstMemberIterator itr = filter_document.FindMember("thread_whitelist");

if (itr != filter_document.MemberEnd()) {
assert(itr->value.IsArray());
Expand Down
22 changes: 22 additions & 0 deletions plugins/volatility/memory-server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ extern "C" {
#define SUCCESS_CODE 0x79
#define FAILURE_CODE 0x77

#include <stdio.h>

int file_exists_access(const char *filename) {
// F_OK tests for existence of the file
if (access(filename, F_OK) == 0) {
return 1; // File exists
} else {
fprintf(stderr, "Error checking file existence: %s (errno: %d)\n", filename, errno);
return 0; // File does not exist or an error occurred
}
}


struct __attribute__((__packed__)) request {
uint64_t type; // {QUIT, READ, QUERY_SIZE}_MESSAGE, ... rest reserved
uint64_t address; // address to read from
Expand Down Expand Up @@ -299,6 +312,15 @@ static int setup_socket(char* path, struct sockaddr_un* address,
fprintf(stderr, "[%s] QemuMemoryAccess: bind failed\n", __FILE__);
return -2;
}
if (!file_exists_access(path)) {
fprintf(stdout, "%s not exists\n", path);
exit(1);
}
if (chmod(path, 0777) != 0) {
fprintf(stderr, "Failed to set permissions for %s\n", path);
exit(1);
}

if (listen(socket_fd, 0) != 0) {
fprintf(stderr, "[%s] QemuMemoryAccess: listen failed\n", __FILE__);
return -3;
Expand Down
Loading