Skip to content

Commit

Permalink
Updating PANDA_PATH to reflect move to /usr/local/lib/panda
Browse files Browse the repository at this point in the history
  • Loading branch information
zestrada committed Feb 9, 2024
1 parent a5420fc commit 10f4e1a
Show file tree
Hide file tree
Showing 34 changed files with 55 additions and 56 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG BASE_IMAGE
# Copy dependencies lists into container. We copy them all and then do a mv because
# we need to transform base_image into a windows compatible filename which we can't
# do in a COPY command.
COPY ./panda/dependencies/* /tmp
COPY ./panda/dependencies/* /tmp/
RUN mv /tmp/$(echo "$BASE_IMAGE" | sed 's/:/_/g')_build.txt /tmp/build_dep.txt && \
mv /tmp/$(echo "$BASE_IMAGE" | sed 's/:/_/g')_base.txt /tmp/base_dep.txt

Expand Down Expand Up @@ -129,13 +129,12 @@ COPY --from=cleanup /lib/libosi.so /lib/libiohal.so /lib/liboffset.so /lib/

# Workaround issue #901 - ensure LD_LIBRARY_PATH contains the panda plugins directories
#ARG TARGET_LIST="x86_64-softmmu,i386-softmmu,arm-softmmu,ppc-softmmu,mips-softmmu,mipsel-softmmu"
ENV LD_LIBRARY_PATH /usr/local/lib/python3.8/dist-packages/pandare/data/x86_64-softmmu/panda/plugins/:/usr/local/lib/python3.8/dist-packages/pandare/data/i386-softmmu/panda/plugins/:/usr/local/lib/python3.8/dist-packages/pandare/data/arm-softmmu/panda/plugins/:/usr/local/lib/python3.8/dist-packages/pandare/data/ppc-softmmu/panda/plugins/:/usr/local/lib/python3.8/dist-packages/pandare/data/mips-softmmu/panda/plugins/:/usr/local/lib/python3.8/dist-packages/pandare/data/mipsel-softmmu/panda/plugins/
ENV LD_LIBRARY_PATH /usr/local/lib/panda/x86_64:/usr/local/lib/panda/i386:/usr/local/lib/panda/arm:/usr/local/lib/panda/ppc:/usr/local/lib/panda/mips:/usr/local/lib/panda/mipsel
#PANDA_PATH is used by rust plugins
ENV PANDA_PATH /usr/local/lib/python3.8/dist-packages/pandare/data
ENV PANDA_PATH /usr/local/lib/panda


# Ensure runtime dependencies are installed for our libpanda objects and panda plugins
RUN ldconfig && \
update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && \
if (ldd /usr/local/lib/python*/dist-packages/pandare/data/*-softmmu/libpanda-*.so | grep 'not found'); then exit 1; fi && \
if (ldd /usr/local/lib/python*/dist-packages/pandare/data/*-softmmu/panda/plugins/*.so | grep 'not found'); then exit 1; fi
if (ldd /usr/local/bin/libpanda-*.so | grep 'not found'); then exit 1; fi
2 changes: 1 addition & 1 deletion panda/docs/time-travel.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Time-travel debugging requires the [`checkpoint`](../plugins/checkpoint) plugin

To enable checkpoints and time-travel debugging, and halt the replay until a GDB client attaches,
```sh
$PANDA_PATH/build/x86_64-softmmu/panda-system-x86_64 -replay foo -S -s -panda checkpoint
$PANDA_PATH/build/x86_64/panda-system-x86_64 -replay foo -S -s -panda checkpoint
```

To attach the GDB client and load PANDA commands, run
Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/asidstory/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,4 @@ Example

To run `asidstory` on a Windows XP 32-bit recording with a 180 character wide diagram:

`$PANDA_PATH/i386-softmmu/panda-system-i386 -replay foo -os windows-32-xpsp3 -panda asidstory:width=180`
`$PANDA_PATH/i386/panda-system-i386 -replay foo -os windows-32-xpsp3 -panda asidstory:width=180`
2 changes: 1 addition & 1 deletion panda/plugins/checkpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Example

To enable checkpoints and time-travel debugging, allocating 4GB of RAM to store checkpoints
```sh
$PANDA_PATH/build/x86_64-softmmu/panda-system-x86_64 -replay foo -S -s -panda checkpoint:space=4GB
$PANDA_PATH/build/x86_64/panda-system-x86_64 -replay foo -S -s -panda checkpoint:space=4GB
```
2 changes: 1 addition & 1 deletion panda/plugins/correlatetaps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ None.
Example
-------

`$PANDA_PATH/x86_64-softmmu/qemu-system-x86_64 -replay foo -panda callstack_instr -panda correlatetaps`
`$PANDA_PATH/x86_64/qemu-system-x86_64 -replay foo -panda callstack_instr -panda correlatetaps`
2 changes: 1 addition & 1 deletion panda/plugins/file_taint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Example
A typical run might first try to find out where the file `foo.txt` is first used:

```
$PANDA_PATH/i386-softmmu/panda-system-i386 -replay foo -panda osi \
$PANDA_PATH/i386/panda-system-i386 -replay foo -panda osi \
-panda osi_linux:kconf_group=debian-3.2.63-i686 \
-panda syscalls2:profile=linux_x86 -panda file_taint:filename=foo.txt
```
Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/filereadmon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Example
-------

```
$PANDA_PATH/i386-softmmu/panda-system-i386 -replay foo \
$PANDA_PATH/i386/panda-system-i386 -replay foo \
-os windows-32-xpsp3 -panda filereadmon
```
4 changes: 2 additions & 2 deletions panda/plugins/func_stats/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Note that, in hex reporting mode, addresses are reported in the simplest form. E

If you use the following command to dump the assembly in a given replay:

$PANDA_PATH/x86_64-softmmu/qemu-system-x86_64 -replay foo -d in_asm,op,int,rr > asm.out 2>&113.
$PANDA_PATH/x86_64/qemu-system-x86_64 -replay foo -d in_asm,op,int,rr > asm.out 2>&113.

Then you search by the `pc` in the instructions, you will find the following (for the above example record):

Expand Down Expand Up @@ -60,4 +60,4 @@ None.
Example
-------

`$PANDA_PATH/x86_64-softmmu/qemu-system-x86_64 -replay foo -panda func_stats:asids=0x0fb45000_0x08ca0000,hex=true,call_limit=200,stack_limit=16`
`$PANDA_PATH/x86_64/qemu-system-x86_64 -replay foo -panda func_stats:asids=0x0fb45000_0x08ca0000,hex=true,call_limit=200,stack_limit=16`
4 changes: 2 additions & 2 deletions panda/plugins/gdb/run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash
cargo build && \
cp ../target/debug/libpanda_gdb.so $PANDA_PATH/x86_64-softmmu/panda/plugins/panda_gdb.so && \
$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -os "linux-64-ubuntu:4.15.0-72-generic-noaslr-nokaslr" -replay catmaps -panda gdb:on_entry=1 -m 1G
cp ../target/debug/libpanda_gdb.so $PANDA_PATH/x86_64/panda/plugins/panda_gdb.so && \
$PANDA_PATH/x86_64/panda-system-x86_64 -os "linux-64-ubuntu:4.15.0-72-generic-noaslr-nokaslr" -replay catmaps -panda gdb:on_entry=1 -m 1G
4 changes: 2 additions & 2 deletions panda/plugins/gdb/run_noreplay.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash
cargo build && \
cp ../target/debug/libpanda_gdb.so $PANDA_PATH/x86_64-softmmu/panda/plugins/panda_gdb.so && \
$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -L $PANDA_PATH/pc-bios -os linux-64-ubuntu:4.15.0-72-generic-noaslr-nokaslr -panda "gdb:file=/bin/cat" -m 1024 ~/.panda/bionic-server-cloudimg-amd64-noaslr-nokaslr.qcow2 -nographic -loadvm root -redir tcp:2222::22
cp ../target/debug/libpanda_gdb.so $PANDA_PATH/x86_64/panda/plugins/panda_gdb.so && \
$PANDA_PATH/x86_64/panda-system-x86_64 -L $PANDA_PATH/pc-bios -os linux-64-ubuntu:4.15.0-72-generic-noaslr-nokaslr -panda "gdb:file=/bin/cat" -m 1024 ~/.panda/bionic-server-cloudimg-amd64-noaslr-nokaslr.qcow2 -nographic -loadvm root -redir tcp:2222::22
4 changes: 2 additions & 2 deletions panda/plugins/gdb/run_noreplay_arm.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash
cargo build --no-default-features --features=arm && \
cp target/debug/libpanda_gdb.so $PANDA_PATH/arm-softmmu/panda/plugins/panda_gdb.so && \
$PANDA_PATH/arm-softmmu/panda-system-arm -L $PANDA_PATH/pc-bios -os linux-64-ubuntu:4.15.0-72-generic-noaslr-nokaslr -panda "gdb:file=/bin/cat" -m 1024 ~/.panda/bionic-server-cloudimg-amd64-noaslr-nokaslr.qcow2 -nographic -loadvm root -redir tcp:2222::22
cp target/debug/libpanda_gdb.so $PANDA_PATH/arm/panda/plugins/panda_gdb.so && \
$PANDA_PATH/arm/panda-system-arm -L $PANDA_PATH/pc-bios -os linux-64-ubuntu:4.15.0-72-generic-noaslr-nokaslr -panda "gdb:file=/bin/cat" -m 1024 ~/.panda/bionic-server-cloudimg-amd64-noaslr-nokaslr.qcow2 -nographic -loadvm root -redir tcp:2222::22
4 changes: 2 additions & 2 deletions panda/plugins/gdb/run_noreplay_i386.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash
cargo build --no-default-features --features=i386 && \
cp target/debug/libpanda_gdb.so $PANDA_PATH/i386-softmmu/panda/plugins/panda_gdb.so && \
$PANDA_PATH/i386-softmmu/panda-system-i386 -L $PANDA_PATH/pc-bios -os linux-32-debian:3.2.0-4-686-pae -panda "gdb:on_entry=1" -m 128M ~/.panda/debian_7.3_x86.qcow -nographic -loadvm root -redir tcp:2222::22
cp target/debug/libpanda_gdb.so $PANDA_PATH/i386/panda/plugins/panda_gdb.so && \
$PANDA_PATH/i386/panda-system-i386 -L $PANDA_PATH/pc-bios -os linux-32-debian:3.2.0-4-686-pae -panda "gdb:on_entry=1" -m 128M ~/.panda/debian_7.3_x86.qcow -nographic -loadvm root -redir tcp:2222::22
4 changes: 2 additions & 2 deletions panda/plugins/gdb/run_noreplay_mips.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash
cargo build --no-default-features --features=mips && \
cp target/debug/libpanda_gdb.so $PANDA_PATH/mips-softmmu/panda/plugins/panda_gdb.so && \
$PANDA_PATH/mips-softmmu/panda-system-mips -L $PANDA_PATH/pc-bios -os linux-64-debian:3.2.0-4-arm-pae -panda "gdb:on_entry=1" -m 1G ~/.panda/debian_7.3_mips.qcow -nographic -loadvm root -M malta -kernel ~/.panda/vmlinux-3.2.0-4-4kc-malta -append "root=/dev/sda1"
cp target/debug/libpanda_gdb.so $PANDA_PATH/mips/panda/plugins/panda_gdb.so && \
$PANDA_PATH/mips/panda-system-mips -L $PANDA_PATH/pc-bios -os linux-64-debian:3.2.0-4-arm-pae -panda "gdb:on_entry=1" -m 1G ~/.panda/debian_7.3_mips.qcow -nographic -loadvm root -M malta -kernel ~/.panda/vmlinux-3.2.0-4-4kc-malta -append "root=/dev/sda1"
4 changes: 2 additions & 2 deletions panda/plugins/gdb/run_noreplay_ppc.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#/bin/bash
cargo build --no-default-features --features=ppc && \
cp target/debug/libpanda_gdb.so $PANDA_PATH/ppc-softmmu/panda/plugins/panda_gdb.so && \
$PANDA_PATH/ppc-softmmu/panda-system-ppc -L $PANDA_PATH/pc-bios -os linux-64-debian:3.2.0-4-ppc-pae -panda "gdb:on_entry=1" -m 1G ~/.panda/debian_7.3_mips.qcow -nographic -loadvm root
cp target/debug/libpanda_gdb.so $PANDA_PATH/ppc/panda/plugins/panda_gdb.so && \
$PANDA_PATH/ppc/panda-system-ppc -L $PANDA_PATH/pc-bios -os linux-64-debian:3.2.0-4-ppc-pae -panda "gdb:on_entry=1" -m 1G ~/.panda/debian_7.3_mips.qcow -nographic -loadvm root
6 changes: 3 additions & 3 deletions panda/plugins/keyfind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ Example

First, create a recording in which the guest establishes a TLS connection, and create a .pcap file at the same time. Start the guest under PANDA with normal arguments, and set a filename for the recorded packet capture

$PANDA_PATH/x86_64-softmmu/qemu-system-x86_64 \
$PANDA_PATH/x86_64/qemu-system-x86_64 \
-net dump,file=tls_session.pcap
Once the guest is running, open the QEMU monitor (Ctrl-a) and run `begin_record [tls_recording_name]` to start the record. Close the monitor, then run commands which will establish a TLS connection. Then, open the monitor again and run `end_record` to save the recording.


Once a recording is created, run PANDA with `keyfind` and provide either the name of the ciphersuite, or the ciphersuite ID:

$PANDA_PATH/x86_64-softmmu/qemu-system-x86_64 \
$PANDA_PATH/x86_64/qemu-system-x86_64 \
-replay tls_recording_name \
-panda keyfind:ciphersuite_name=TLS_AES_256_GCM_SHA384

OR

$PANDA_PATH/x86_64-softmmu/qemu-system-x86_64 \
$PANDA_PATH/x86_64/qemu-system-x86_64 \
-replay tls_recording_name \
-panda keyfind:ciphersuite_id=4866

Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/loaded/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ Example
-------

```
$PANDA_PATH/i386-softmmu/panda-system-i386 -replay foo \
$PANDA_PATH/i386/panda-system-i386 -replay foo \
-panda loaded -os linux-32-debian-3.2.81-686-pae
```
2 changes: 1 addition & 1 deletion panda/plugins/memorymap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ Example

To run `memorymap` on a Windows 2000 32-bit recording and report on two instructions specified by their addresses:

`$PANDA_PATH/i386-softmmu/qemu-system-i386 -replay foo -os windows-32-2000 -panda memorymap:pcs=0xbfeee8bd-0x80069a0f`
`$PANDA_PATH/i386/qemu-system-i386 -replay foo -os windows-32-2000 -panda memorymap:pcs=0xbfeee8bd-0x80069a0f`
4 changes: 2 additions & 2 deletions panda/plugins/memsavep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ Example

To dump memory at 66.2% to `mymem.dd`:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda memsavep:percent=66.2,file=mymem.dd

To dump memory when an instruction count of 3314667015 is reached:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda memsavep:instrcount=3314667015,file=mymem.dd
2 changes: 1 addition & 1 deletion panda/plugins/network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Example

To save traffic to `foo.pcap`:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda network:file=foo.pcap
6 changes: 3 additions & 3 deletions panda/plugins/osi_linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Example
Assuming you have a `kernelinfo.conf` in the current directory with a configuration named `my_kernel_info`, you can run the OSI test plugin on a Linux replay as follows:
```bash
$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda osi -panda osi_linux:kconf_file=kernelinfo.conf,kconf_group=my_kernel_info \
-panda osi_test
```
Expand All @@ -162,14 +162,14 @@ PANDA's `kernelinfo.conf` has the information for the Ubuntu kernels found on th

Newer kernels perform KASLR, however, and need a boot parameter to turn that off. This parameter is `nokaslr`. Thus, one can load an environment directly from one of these DVDs
```bash
$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 --monitor stdio \
$PANDA_PATH/x86_64/panda-system-x86_64 --monitor stdio \
-m 4096 \
-cdrom 'ubuntu-18.04.4-desktop-amd64.iso'
```
Being careful to add the `nokaslr` boot parameter. Then just add the binaries of interest to the live environment and start recording. The osi_test can be executed in the following way:

```bash
$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 \
$PANDA_PATH/x86_64/panda-system-x86_64 \
-m 4096 -replay foo -panda osi\
-panda osi_linux:kconf_group=ubuntu:5.3.0-28-generic:64 \
-os linux-64-ubuntu -panda osi_test > ositest.txt
Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/osi_test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ guest-os-specific plugin.
E.g. to run `osi_test` on an Windows 7 32-bit replay:

```sh
$PANDA_PATH/i386-softmmu/panda-system-i386 -replay mytrace \
$PANDA_PATH/i386/panda-system-i386 -replay mytrace \
-os windows-32-7sp1 -panda osi_test
```
The os-specific plugin is loaded implicitly by specifying `-os windows-32-7sp1`.
Expand Down
6 changes: 3 additions & 3 deletions panda/plugins/pc_search/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ Example

Passing a single pc:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda pc_search:pc=0x77c47f06
Passing multiple pcs and getting just first and last occurrence:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda pc_search:first_last_only=true,pc_file="pc_input.txt",out_file="my_pc_matches.txt"
Passing a range of pcs:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda pc_search:pc_range=0x79a33c06-0x79a33d32,out_file="my_pc_matches.txt"


Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/replaymovie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Example

Generating the still frames:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda replaymovie

Creating the movie:
Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/scissors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Example
Snipping from instruction 12345 to 8675309 into `foo_reduced[.rr2]`:

```sh
$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo[.rr2] \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo[.rr2] \
-panda scissors:name=foo_reduced[.rr2],start=12345,end=8675309
```

Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/stringsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ To search for JPEG files being read or written in memory, create a file named `j
Then run PANDA with stringsearch:
```sh
$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda callstack_instr -panda stringsearch:name=jpeg
```

Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/syscalls2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ bool init_plugin(void *self) {
And then invoke it as:

```sh
$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-os windows-32-7sp1 -panda syscalls2 -panda filereadmon
```

Expand Down
4 changes: 2 additions & 2 deletions panda/plugins/taint2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Example

To taint data from a file named `foo.dat` on Linux and then find out what branches depend on data from that file, placing output into the pandalog `foo.plog`:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo -panda osi \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo -panda osi \
-panda osi_linux:kconf_group=debian-3.2.63-i686 \
-panda syscalls2:profile=linux_x86 \
-panda file_taint:filename=foo.dat \
Expand All @@ -169,7 +169,7 @@ To taint data from a file named `foo.dat` on Linux and then find out what branch

Note that the `taint2` plugin is not explicitly listed here because it is automatically loaded by the `file_taint` plugin. If you wanted to pass custom options to `taint2`, such as disabling tainted pointers, you could instead do:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo -panda osi \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo -panda osi \
-panda osi_linux:kconf_group=debian-3.2.63-i686 \
-panda syscalls2:profile=linux_x86 \
-panda taint2:no_tp=y \
Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/tainted_branch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Example
To taint data from a file named `foo.dat` on Linux and then find out what branches depend on data from that file, placing output into the pandalog `foo.plog`:
$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo -panda osi \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo -panda osi \
-panda osi_linux:kconf_group=debian-3.2.63-i686 \
-panda syscalls2:profile=linux_x86 \
-panda file_taint:filename=foo.dat \
Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/tainted_instr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Example

To taint data from a file named `foo.dat` on Linux and then find out what instructions handle tainted data from that file, placing output into the pandalog `foo.plog`:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo -panda osi \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo -panda osi \
-panda osi_linux:kconf_group=debian-3.2.63-i686 \
-panda syscalls2:profile=linux_x86 \
-panda file_taint:filename=foo.dat \
Expand Down
6 changes: 3 additions & 3 deletions panda/plugins/tainted_net/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,22 @@ Example

To taint incoming network data and then find out what instructions depend on data from the network:

$PANDA_PATH/i386-softmmu/panda-system-i386 -net nic -net user \
$PANDA_PATH/i386/panda-system-i386 -net nic -net user \
-replay foo \
-panda tainted_net:label_incoming_network=true \
-panda tainted_instr

Note that the `taint2` plugin is not explicitly listed here because it is automatically loaded by the `tainted_net` plugin. If you wanted to pass custom options to `taint2`, such as disabling tainted pointers, you could instead do:

$PANDA_PATH/i386-softmmu/panda-system-i386 -net nic -net user \
$PANDA_PATH/i386/panda-system-i386 -net nic -net user \
-replay foo \
-panda taint2:no_tp=y \
-panda tainted_net:label_incoming_network=true \
-panda tainted_instr

To taint the string `quick` and then see if it is sent out over the network, writing the outgoing taint information to quick\_tnss.csv, do:

$PANDA_PATH/i386-softmmu/panda-system-i386 -net nic -net user \
$PANDA_PATH/i386/panda-system-i386 -net nic -net user \
-replay foo \
-panda stringsearch:str="quick" -panda tstringsearch \
-panda tainted_net:query_outgoing_network=true,file=quick_tnss.csv
Expand Down
4 changes: 2 additions & 2 deletions panda/plugins/tapindex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Example

Generate an index:

$PANDA_PATH/x86_64-softmmu/qemu-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/qemu-system-x86_64 -replay foo \
-panda tapindex

Then dump memory with `memdump`:

$PANDA_PATH/x86_64-softmmu/qemu-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/qemu-system-x86_64 -replay foo \
-panda memdump

Now search for something in the memory reads dump and store the offsets where it's found into a file named `foo_offsets.txt`:
Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/textprinter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ First create a file called `tap_points.txt` with your tap points. The following

Then run PANDA with `textprinter`:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda callstack_instr,stack_type=threaded -panda textprinter

You will get output in `read_tap_buffers.txt.gz` and `write_tap_buffers.txt.gz`. This snippet of such a log file shows four bytes (`0x62 0x72 0x61 0x6e`) being written to address `0x003f3830`:
Expand Down
2 changes: 1 addition & 1 deletion panda/plugins/tstringsearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Example

To taint a string `bogart` and then create a pandalog named `bogart.plog` listing all branches depending on that string via the `tainted_branch` plugin:

$PANDA_PATH/x86_64-softmmu/panda-system-x86_64 -replay foo \
$PANDA_PATH/x86_64/panda-system-x86_64 -replay foo \
-panda stringsearch:str=bogart -panda tstringsearch \
-panda tainted_branch -pandalog bogart.plog

0 comments on commit 10f4e1a

Please sign in to comment.