-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathevaluate.sh
executable file
·31 lines (24 loc) · 1.11 KB
/
evaluate.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Runs the leakage evaluation.
# Takes the memory write trace output of the uninstrumented binary from taint-tracking (taint.out.memtrace)
# and generates the trace for the hardened binary with the memwrite-tracer.
# The C# MemtraceComparer is run to check the resulting traces for uniqueness of memory writes.
# Arguments:
# - Path to working directory (contains the original binary)
# - Path to instrumented files
# - List of interesting image-offset-ranges to be traced, e.g., "5.afc3.afe4;5.b05a.b07b"
# - Name of original binary
# ...further arguments for the original binary
# Example usage: ./evaluate.sh /path/to/workDir /path/to/instrDir "5.afc3.afe4;5.b05a.b07b" main 3
workDir=$1
instrDir=$2
interesting=$3
mainBinary=$4
echo -e "\e[1;94mRunning memory write tracer\e[0m"
pushd memwrite-tracer
bash run.sh $instrDir $interesting $mainBinary.instr ${@:5}
popd
echo -e "\e[1;94mRunning memory trace comparison\e[0m"
pushd evaluation/MemtraceComparer
dotnet run --no-build -c Release -- $workDir/taint.out.memtrace $instrDir/memtrace.out $instrDir/map.txt $instrDir/ignore.txt >$workDir/eval-result.txt
popd