-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsee_cve_impacts.sh
executable file
·60 lines (51 loc) · 1.76 KB
/
see_cve_impacts.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#! /bin/bash
echo '----------------------------------------------------------------------'
echo ' First, running processes directly. Later we will run them with GDB.'
echo
echo
echo 'Running native version after you press enter.'
echo ' Process will crash via SEGFAULT with attacker controlled state.'
read -r
./gif2jpg.native ./test_images/CVE-2008-0554.gif /dev/null
echo
echo
echo
echo 'Running rWasm-compiled version after you press enter.'
echo ' Process will catch the execution stop exploit from causing harm by panic-ing.'
read -r
./gif2jpg.rwasm-built ./test_images/CVE-2008-0554.gif /dev/null
echo
echo
echo
echo 'Running vWasm-compiled version after you press enter'
echo ' Process will catch the execution stop exploit from causing harm by explicitly invoking SIGILL using ud2.'
read -r
./gif2jpg.vwasm-built ./test_images/CVE-2008-0554.gif /dev/null
echo
echo
echo
echo '----------------------------------------------------------------------'
echo ' Re-running processes, but now using GDB'
echo
echo
echo 'Running native version after you press enter.'
echo ' Process will crash via SEGFAULT with attacker controlled state.'
read -r
gdb --batch -ex 'r test_images/CVE-2008-0554.gif /dev/null' --args ./gif2jpg.native
echo
echo
echo
echo 'Running rWasm-compiled version after you press enter.'
echo ' Process will catch the execution stop exploit from causing harm by panic-ing.'
read -r
gdb --batch -ex 'r test_images/CVE-2008-0554.gif /dev/null' --args ./gif2jpg.rwasm-built
echo
echo
echo
echo 'Running vWasm-compiled version after you press enter'
echo ' Process will catch the execution stop exploit from causing harm by explicitly invoking SIGILL using ud2.'
read -r
gdb --batch -ex 'r test_images/CVE-2008-0554.gif /dev/null' --args ./gif2jpg.vwasm-built
echo
echo
echo