Skip to content

Update build docs and s2e-config-template.lua files in examples #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 15 additions & 7 deletions Documentation/Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,19 @@ S2E officially supports 64-bit Ubuntu (18.04, 20.04 LTS), older or later version

You need to manually install some additional tools or packages before building CRAX++.
* [pwntools](https://github.com/Gallopsled/pwntools) (4.7.0)
```
sudo -H python3 -m pip install pwntools==4.7.0
```

* [pybind11-dev](https://github.com/pybind/pybind11) (2.4.3-2build2)
```
sudo apt-get install pybind11-dev=2.4.3-2build2
```

* [ROPgadget](https://github.com/JonathanSalwan/ROPgadget) (6.6)
```
sudo -H python3 -m pip install ROPgadget==6.6
```

## Building S2E Manually

Expand Down Expand Up @@ -78,23 +89,20 @@ cd ~/s2e/source/CRAXplusplus/proxies/sym_file && make

Create an S2E project with our concolic execution proxy, `sym_stdin`.
```
cd ~/s2e/source/s2e/proxies/sym_stdin
make
cd ~/s2e
s2e new_project --image debian-9.2.1-x86_64 ~/s2e/source/CRAXplusplus/proxies/sym_stdin/sym_stdin
```

Run `setup.sh`. This applies several patches to the S2E source tree, and places some symlinks in your S2E project.
Run `setup.sh`. This applies several patches to the S2E source tree, places some symlinks in your S2E project, and merges the source code of CRAX++ into S2E source tree.
```
cd ~/s2e/source/CRAXplusplus
./setup.sh
```

Merge the source code of CRAX++ into S2E source tree, and rebuild S2E.
Rebuild S2E.
```
rm -rf ~/s2e/source/s2e/libs2eplugins/src/s2e/Plugins/CRAX
cp -ar ~/s2e/source/CRAXplusplus/src ~/s2e/source/s2e/libs2eplugins/src/s2e/Plugins/CRAX
cd ~/s2e
rm -rf build/stamps/libs2e-release-*
s2e build
```

Expand Down Expand Up @@ -141,7 +149,7 @@ Modify `s2e-config.template.lua` and tailor the exploitation techniques to your
techniques = {
"Ret2csu",
"BasicStackPivot",
"GotPartialOverwrite",
"Ret2syscall",
},
```

Expand Down
6 changes: 3 additions & 3 deletions examples/BID-8901-iwconfig/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_arg",
os.getenv("HOME") .. "/s2e/projects/sym_arg",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_arg",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_arg",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/CVE-2001-1413-ncompress/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_arg",
os.getenv("HOME") .. "/s2e/projects/sym_arg",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_arg",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_arg",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/CVE-2004-2093-rsync/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_env",
os.getenv("HOME") .. "/s2e/projects/sym_env",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_env",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_env",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_socket",
os.getenv("HOME") .. "/s2e/projects/sym_socket",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_socket",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_socket",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/CVE-2017-14493-dnsmasq/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_socket",
os.getenv("HOME") .. "/s2e/projects/sym_socket",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_socket",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_socket",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/OSVDB-ID-16373-glftpd/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_arg",
os.getenv("HOME") .. "/s2e/projects/sym_arg",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_arg",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_arg",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/actf2020-no_canary/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/actf2021-tranquil/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/aslr-nx-canary/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/aslr-nx-pie-alt1/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/aslr-nx-pie-canary-fullrelro/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/aslr-nx-pie-canary/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/aslr-nx-pie/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/aslr-nx/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/defcon27-quals-speedrun-002/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
6 changes: 3 additions & 3 deletions examples/ntucs2017-readme/s2e-config.template.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pluginsConfig.BaseInstructions = {
add_plugin("HostFiles")
pluginsConfig.HostFiles = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
},
allowWrite = true,
}
Expand All @@ -63,8 +63,8 @@ pluginsConfig.HostFiles = {
add_plugin("Vmi")
pluginsConfig.Vmi = {
baseDirs = {
"/home/aesophor/s2e/projects/sym_stdin",
"/home/aesophor/s2e/images/debian-9.2.1-x86_64/guestfs",
os.getenv("HOME") .. "/s2e/projects/sym_stdin",
os.getenv("HOME") .. "/s2e/images/debian-9.2.1-x86_64/guestfs",
},
}

Expand Down
Loading