-
Notifications
You must be signed in to change notification settings - Fork 8
Installing and Running Lind
Pull the image from DockerHub, if you haven't already
docker pull securesystemslab/lind
Creating a new container:
docker run --privileged --ipc=host --cap-add=SYS_PTRACE -it securesystemslab/lind /bin/bash
cd
intto the lind_project
directory located at /home/lind/lind_project
- Use the Makefile
make
to see the options menu. - Select
download
to update repositories - Select all files to re-install all of Lind
You cannot directly use gcc
to compile programs for Lind. Instead, you can run the tool lindsh
first, and use the commands compile
, gcc
, or cc
in this special compiler.
Compile the hello.c
file under the /home/lind/lind_project/tests/test_cases/
directory
$ lindsh
compile ~/path/to/hello.c -o ~/lind_project/hello.nexe
cp ~/the/path/ hello.nexe
The first argument is where your executable file is located in the container. The second argument is where you want to put your executable in the Lind file system. Note you have to give the executable file a name in the Lind file system.
After exiting lindsh
you can use the lindfs
tool to check if it exists in the lind filesystem.
lindfs find | grep 'hello'
If you see your executable file is under the path you designated before, it means that you have successfully copied the file into the Lind file system.
You can run the executable with lind /hello.nexe
or run /hello.nexe
if you are in lindsh.