Skip to content

Installing and Running Lind

Nicholas Renner edited this page Apr 1, 2020 · 9 revisions

Installing and Running Lind

Installation

1. Create a new container

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

2. Check and change the directory

cd intto the lind_project directory located at /home/lind/lind_project

3. Pull the latest updates and compile changes
  1. Use the Makefile make to see the options menu.
  2. Select download to update repositories
  3. Select all files to re-install all of Lind

Compiling and Running a program with 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.

1. Compile a hello world! from source with lindsh

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 
2. Copy the .nexe file to lindfs

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.

3. Check if the .nexe file has been copied over

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.

4. Run the .nexe file

You can run the executable with lind /hello.nexe or run /hello.nexe if you are in lindsh.